@bunnyapp/components 1.5.0-beta.1 → 1.5.0-beta.3

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 (184) hide show
  1. package/dist/cjs/index.js +2841 -2624
  2. package/dist/cjs/src/components/BunnyProvider.d.ts +0 -1
  3. package/dist/cjs/src/components/Checkout/Checkout.d.ts +12 -6
  4. package/dist/cjs/src/components/Invoice/Invoice.d.ts +1 -1
  5. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +1 -2
  6. package/dist/cjs/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -11
  7. package/dist/cjs/src/components/Quote/Quote.d.ts +1 -1
  8. package/dist/cjs/src/components/QuoteProvider.d.ts +22 -0
  9. package/dist/cjs/src/components/Subscriptions/PageTitle.d.ts +1 -1
  10. package/dist/cjs/src/components/Subscriptions/QuantityDrawerContainer.d.ts +14 -0
  11. package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +1 -2
  12. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +5 -0
  13. package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/PriceListGrid.d.ts +3 -3
  14. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +8 -0
  15. package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -3
  16. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +7 -0
  17. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +10 -0
  18. package/dist/{esm/src/components/Subscriptions/PlanManager → cjs/src/components/Subscriptions/Upgrade}/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +2 -1
  19. package/dist/{esm/src/components/Subscriptions/PlanManager → cjs/src/components/Subscriptions/Upgrade}/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -1
  20. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +2 -0
  21. package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -2
  22. package/dist/{esm/src/components/Subscriptions/PlanManager → cjs/src/components/Subscriptions/Upgrade}/PlanPicker/planPickerMobile/PriceListGridMobile.d.ts +2 -1
  23. package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCard.d.ts +2 -1
  24. package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/priceListCardUtils.d.ts +1 -1
  25. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +8 -0
  26. package/dist/cjs/src/components/Subscriptions/Upgrade/Upgrade.d.ts +7 -0
  27. package/dist/cjs/src/components/Subscriptions/Upgrade/index.d.ts +1 -0
  28. package/dist/cjs/src/components/Subscriptions/index.d.ts +2 -1
  29. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +4 -2
  30. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +4 -2
  31. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +3 -1
  32. package/dist/cjs/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +2 -3
  33. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -1
  34. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +2 -3
  35. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -3
  36. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +2 -3
  37. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -0
  38. package/dist/cjs/src/components/Subscriptions/tagConsts.d.ts +1 -0
  39. package/dist/cjs/src/components/Transactions/Transactions.d.ts +2 -2
  40. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
  41. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +1 -1
  42. package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +1 -1
  43. package/dist/cjs/src/components/index.d.ts +1 -0
  44. package/dist/cjs/src/{components/Invoice → contexts}/InvoiceQuoteContext.d.ts +2 -2
  45. package/dist/cjs/src/{components/Subscriptions → contexts}/SubscriptionsContext.d.ts +0 -4
  46. package/dist/{esm/src/components/Transactions → cjs/src/contexts}/TransactionsListContext.d.ts +2 -2
  47. package/dist/cjs/src/graphql/QuoteRequests.d.ts +5 -0
  48. package/dist/cjs/src/graphql/mutations/quoteChargeUpdate.d.ts +2 -1
  49. package/dist/cjs/src/graphql/queries/getAddonPlans.d.ts +37 -0
  50. package/dist/cjs/src/graphql/queries/getFormattedInvoice.d.ts +7 -0
  51. package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +2 -1
  52. package/dist/cjs/src/graphql/queries/getPriceListChangeOptions.d.ts +2 -2
  53. package/dist/cjs/src/hooks/quotes/useQuoteCreate.d.ts +1 -4
  54. package/dist/cjs/src/hooks/quotes/useQuoteQuantities.d.ts +14 -0
  55. package/dist/cjs/src/hooks/useCurrentUserData.d.ts +11 -8
  56. package/dist/cjs/src/hooks/usePaymentMethod.d.ts +2 -1
  57. package/dist/cjs/src/hooks/usePriceListChangeOptions.d.ts +6 -0
  58. package/dist/cjs/src/hooks/useToggleAddonQuoteChange.d.ts +2 -2
  59. package/dist/cjs/src/utils/addonPlanUtils.d.ts +4 -1
  60. package/dist/cjs/src/utils/apiUtils.d.ts +5 -0
  61. package/dist/cjs/src/utils/chargeUtils.d.ts +2 -0
  62. package/dist/cjs/src/utils/featureAddonUtils.d.ts +5 -2
  63. package/dist/esm/index.js +2803 -2587
  64. package/dist/esm/src/components/BunnyProvider.d.ts +0 -1
  65. package/dist/esm/src/components/Checkout/Checkout.d.ts +12 -6
  66. package/dist/esm/src/components/Invoice/Invoice.d.ts +1 -1
  67. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +1 -2
  68. package/dist/esm/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -11
  69. package/dist/esm/src/components/Quote/Quote.d.ts +1 -1
  70. package/dist/esm/src/components/QuoteProvider.d.ts +22 -0
  71. package/dist/esm/src/components/Subscriptions/PageTitle.d.ts +1 -1
  72. package/dist/esm/src/components/Subscriptions/QuantityDrawerContainer.d.ts +14 -0
  73. package/dist/esm/src/components/Subscriptions/Subscriptions.d.ts +1 -2
  74. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +5 -0
  75. package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/PriceListGrid.d.ts +3 -3
  76. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +8 -0
  77. package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -3
  78. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +7 -0
  79. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +10 -0
  80. package/dist/{cjs/src/components/Subscriptions/PlanManager → esm/src/components/Subscriptions/Upgrade}/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +2 -1
  81. package/dist/{cjs/src/components/Subscriptions/PlanManager → esm/src/components/Subscriptions/Upgrade}/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -1
  82. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +2 -0
  83. package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -2
  84. package/dist/{cjs/src/components/Subscriptions/PlanManager → esm/src/components/Subscriptions/Upgrade}/PlanPicker/planPickerMobile/PriceListGridMobile.d.ts +2 -1
  85. package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCard.d.ts +2 -1
  86. package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/priceListCardUtils.d.ts +1 -1
  87. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +8 -0
  88. package/dist/esm/src/components/Subscriptions/Upgrade/Upgrade.d.ts +7 -0
  89. package/dist/esm/src/components/Subscriptions/Upgrade/index.d.ts +1 -0
  90. package/dist/esm/src/components/Subscriptions/index.d.ts +2 -1
  91. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +4 -2
  92. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +4 -2
  93. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +3 -1
  94. package/dist/esm/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +2 -3
  95. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -1
  96. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +2 -3
  97. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -3
  98. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +2 -3
  99. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -0
  100. package/dist/esm/src/components/Subscriptions/tagConsts.d.ts +1 -0
  101. package/dist/esm/src/components/Transactions/Transactions.d.ts +2 -2
  102. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
  103. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +1 -1
  104. package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +1 -1
  105. package/dist/esm/src/components/index.d.ts +1 -0
  106. package/dist/esm/src/{components/Invoice → contexts}/InvoiceQuoteContext.d.ts +2 -2
  107. package/dist/esm/src/{components/Subscriptions → contexts}/SubscriptionsContext.d.ts +0 -4
  108. package/dist/{cjs/src/components/Transactions → esm/src/contexts}/TransactionsListContext.d.ts +2 -2
  109. package/dist/esm/src/graphql/QuoteRequests.d.ts +5 -0
  110. package/dist/esm/src/graphql/mutations/quoteChargeUpdate.d.ts +2 -1
  111. package/dist/esm/src/graphql/queries/getAddonPlans.d.ts +37 -0
  112. package/dist/esm/src/graphql/queries/getFormattedInvoice.d.ts +7 -0
  113. package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +2 -1
  114. package/dist/esm/src/graphql/queries/getPriceListChangeOptions.d.ts +2 -2
  115. package/dist/esm/src/hooks/quotes/useQuoteCreate.d.ts +1 -4
  116. package/dist/esm/src/hooks/quotes/useQuoteQuantities.d.ts +14 -0
  117. package/dist/esm/src/hooks/useCurrentUserData.d.ts +11 -8
  118. package/dist/esm/src/hooks/usePaymentMethod.d.ts +2 -1
  119. package/dist/esm/src/hooks/usePriceListChangeOptions.d.ts +6 -0
  120. package/dist/esm/src/hooks/useToggleAddonQuoteChange.d.ts +2 -2
  121. package/dist/esm/src/utils/addonPlanUtils.d.ts +4 -1
  122. package/dist/esm/src/utils/apiUtils.d.ts +5 -0
  123. package/dist/esm/src/utils/chargeUtils.d.ts +2 -0
  124. package/dist/esm/src/utils/featureAddonUtils.d.ts +5 -2
  125. package/dist/index.d.ts +10 -6
  126. package/package.json +2 -2
  127. package/dist/cjs/src/components/PlanManagerQuoteProvider.d.ts +0 -19
  128. package/dist/cjs/src/components/QuotePreviewProvider.d.ts +0 -15
  129. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanManager.d.ts +0 -5
  130. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -2
  131. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -9
  132. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -7
  133. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +0 -11
  134. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +0 -2
  135. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelector.d.ts +0 -9
  136. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelectorContext.d.ts +0 -9
  137. package/dist/cjs/src/components/Subscriptions/QuotePreviewData.d.ts +0 -6
  138. package/dist/cjs/src/enums/SubscriptionState.d.ts +0 -8
  139. package/dist/esm/src/components/PlanManagerQuoteProvider.d.ts +0 -19
  140. package/dist/esm/src/components/QuotePreviewProvider.d.ts +0 -15
  141. package/dist/esm/src/components/Subscriptions/PlanManager/PlanManager.d.ts +0 -5
  142. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -2
  143. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -9
  144. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -7
  145. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +0 -11
  146. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +0 -2
  147. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelector.d.ts +0 -9
  148. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelectorContext.d.ts +0 -9
  149. package/dist/esm/src/components/Subscriptions/QuotePreviewData.d.ts +0 -6
  150. package/dist/esm/src/enums/SubscriptionState.d.ts +0 -8
  151. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/NextPriceListButton.d.ts +0 -0
  152. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/checkoutBar/CheckoutButton.d.ts +0 -0
  153. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/checkoutBar/CheckoutPrice.d.ts +0 -0
  154. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/BillingPeriodSelector.d.ts +0 -0
  155. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +0 -0
  156. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +0 -0
  157. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/FeatureGridCell.d.ts +0 -0
  158. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +0 -0
  159. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/PlanPickerGridCell.d.ts +0 -0
  160. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerUtils.d.ts +0 -0
  161. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardButton.d.ts +0 -0
  162. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardDescription.d.ts +0 -0
  163. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardFeature.d.ts +0 -0
  164. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardPrice.d.ts +0 -0
  165. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +0 -0
  166. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardTitle.d.ts +0 -0
  167. /package/dist/cjs/src/components/Subscriptions/{PlanManager → Upgrade}/PreviewModeAdvisary.d.ts +0 -0
  168. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/NextPriceListButton.d.ts +0 -0
  169. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/checkoutBar/CheckoutButton.d.ts +0 -0
  170. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/checkoutBar/CheckoutPrice.d.ts +0 -0
  171. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/BillingPeriodSelector.d.ts +0 -0
  172. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +0 -0
  173. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +0 -0
  174. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/FeatureGridCell.d.ts +0 -0
  175. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +0 -0
  176. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerDesktop/PlanPickerGridCell.d.ts +0 -0
  177. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/planPickerUtils.d.ts +0 -0
  178. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardButton.d.ts +0 -0
  179. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardDescription.d.ts +0 -0
  180. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardFeature.d.ts +0 -0
  181. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardPrice.d.ts +0 -0
  182. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +0 -0
  183. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PlanPicker/priceListCard/PriceListCardTitle.d.ts +0 -0
  184. /package/dist/esm/src/components/Subscriptions/{PlanManager → Upgrade}/PreviewModeAdvisary.d.ts +0 -0
@@ -6,7 +6,6 @@ export type BunnyContextValues = {
6
6
  apiHost: string;
7
7
  graphQLClient: GraphQLClient;
8
8
  token?: string;
9
- displayPayButtonNameAnyways?: boolean;
10
9
  darkMode?: boolean;
11
10
  onTokenExpired?: () => void;
12
11
  };
@@ -1,7 +1,13 @@
1
- import { PaymentMethod } from '@bunnyapp/common';
2
- import { CheckoutProps } from '../PaymentForm/PaymentFormTypes';
3
- interface CheckoutComponentProps extends CheckoutProps {
4
- storedPaymentMethod?: PaymentMethod;
5
- }
6
- declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, selectedPriceList, }: CheckoutComponentProps) => import("react/jsx-runtime").JSX.Element | null;
1
+ import { FormattedInvoice, Quote } from '@bunnyapp/common';
2
+ type CheckoutProps = {
3
+ invoice?: FormattedInvoice;
4
+ onCancel: () => void;
5
+ onFail: (error: any) => void;
6
+ onSuccess: () => void;
7
+ open: boolean;
8
+ quote?: Quote;
9
+ token?: string;
10
+ isUpdatingQuote: boolean;
11
+ };
12
+ declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
7
13
  export default Checkout;
@@ -1,5 +1,5 @@
1
+ import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
1
2
  import '../../styles/index.less';
2
- import { InvoiceQuoteContextProps } from './InvoiceQuoteContext';
3
3
  export type InvoiceProps = InvoiceQuoteContextProps & {
4
4
  hidePaymentForm?: boolean;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
2
- export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
2
+ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, }: {
3
3
  invoice?: FormattedInvoice | Invoice | undefined;
4
4
  quote?: Quote | undefined;
5
5
  onFail: (error: any) => void;
@@ -11,7 +11,6 @@ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymen
11
11
  accountId?: string | undefined;
12
12
  overrideToken?: string | undefined;
13
13
  customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
14
- currencyId?: string | undefined;
15
14
  paymentHoldOptions?: {
16
15
  payToAccept?: boolean | undefined;
17
16
  amountToHold?: number | undefined;
@@ -1,4 +1,4 @@
1
- import { Quote, FormattedInvoice, PluginData, PriceList } from "@bunnyapp/common";
1
+ import { PluginData } from '@bunnyapp/common';
2
2
  export type SavedPaymentMethodResponse = {
3
3
  paymentMethodId: string;
4
4
  };
@@ -12,13 +12,3 @@ export type InvoiceQuoteParentProps = {
12
12
  onSuccess: () => void;
13
13
  onFail: (error: any) => void;
14
14
  };
15
- export type CheckoutProps = {
16
- invoice?: FormattedInvoice;
17
- onCancel: () => void;
18
- onFail: (error: any) => void;
19
- onSuccess: () => void;
20
- open: boolean;
21
- quote?: Quote;
22
- selectedPriceList?: PriceList;
23
- token?: string;
24
- };
@@ -1,3 +1,3 @@
1
- import { InvoiceQuoteContextProps } from '../Invoice/InvoiceQuoteContext';
1
+ import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
2
2
  export declare const MarkupContainer: any;
3
3
  export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, }: InvoiceQuoteContextProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { PriceList, Quote } from '@bunnyapp/common';
3
+ export type QuoteContextValues = {
4
+ quote: Quote | undefined;
5
+ selectedPriceList: PriceList | undefined;
6
+ isQuotePending: boolean;
7
+ isAddonPlanLoading: boolean;
8
+ isFeatureAddonsLoading: boolean;
9
+ isUpdatingQuote: boolean;
10
+ setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>;
11
+ addFeatureAddonLoading: (featureAddonId: string) => void;
12
+ removeFeatureAddonLoading: (featureAddonId: string) => void;
13
+ getFeatureQuantity: (featureId: string, chargeId: string) => number | undefined;
14
+ onClearQuote: () => void;
15
+ onChangeSelectedPriceList: (priceList: PriceList) => void;
16
+ onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
17
+ };
18
+ export declare const QuoteContext: import("react").Context<QuoteContextValues>;
19
+ declare function QuoteProvider({ children }: {
20
+ children: React.ReactNode;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ export default QuoteProvider;
@@ -1,4 +1,4 @@
1
- declare const PageTitle: ({ onGoBack, title, }: {
1
+ declare const PageTitle: ({ onGoBack, title }: {
2
2
  onGoBack?: (() => void) | undefined;
3
3
  title: string;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { Subscription } from '@bunnyapp/common';
2
+ export type EditingQuoteDataType = {
3
+ id: string;
4
+ isTrial: boolean;
5
+ };
6
+ interface QuantityDrawerContainerProps {
7
+ subscriptions: Subscription[];
8
+ quantityDrawerOpen: boolean;
9
+ setQuantityDrawerOpen: (open: boolean) => void;
10
+ handlePortalErrors?: (errors: any) => void;
11
+ setHideExpiredState: (hide: boolean) => void;
12
+ }
13
+ declare const QuantityDrawerContainer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setHideExpiredState, }: QuantityDrawerContainerProps) => import("react/jsx-runtime").JSX.Element;
14
+ export default QuantityDrawerContainer;
@@ -3,7 +3,7 @@ export type EditingQuoteDataType = {
3
3
  id: string;
4
4
  isTrial: boolean;
5
5
  };
6
- declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, hideTitle, hideExpired, hideExpiredToggle, }: {
6
+ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, hideExpired, hideExpiredToggle, }: {
7
7
  handlePortalErrors?: ((errors: any) => void) | undefined;
8
8
  companyName: string;
9
9
  isInPreviewMode?: boolean | undefined;
@@ -15,7 +15,6 @@ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPrev
15
15
  subscriptionProductNameStyle?: import("react").CSSProperties | undefined;
16
16
  } | undefined;
17
17
  noSubscriptionsComponent?: React.ReactNode;
18
- hideTitle?: boolean | undefined;
19
18
  hideExpired?: boolean | undefined;
20
19
  hideExpiredToggle?: boolean | undefined;
21
20
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Subscription } from '@bunnyapp/common';
2
+ declare const PlanPicker: ({ upgradingSubscription }: {
3
+ upgradingSubscription?: Subscription | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default PlanPicker;
@@ -1,4 +1,4 @@
1
- import { PriceList, BillingPeriod, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
1
+ import { BillingPeriod, PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
2
2
  import { Dispatch, SetStateAction } from 'react';
3
3
  type PriceListGridProps = {
4
4
  availablePriceLists: PriceList[];
@@ -8,8 +8,8 @@ type PriceListGridProps = {
8
8
  subscriptions: Subscription[];
9
9
  priceListStart: number;
10
10
  setPriceListStart: Dispatch<SetStateAction<number>>;
11
- upgradingSubscriptionState?: Subscription;
12
11
  selectedBillingPeriod?: BillingPeriod | undefined;
12
+ onClickPriceListCard: (priceList: PriceList) => void;
13
13
  };
14
- declare const PriceListGrid: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, upgradingSubscriptionState, selectedBillingPeriod, }: PriceListGridProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const PriceListGrid: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, selectedBillingPeriod, onClickPriceListCard, }: PriceListGridProps) => import("react/jsx-runtime").JSX.Element;
15
15
  export default PriceListGrid;
@@ -0,0 +1,8 @@
1
+ import { PriceListCharge } from '@bunnyapp/common';
2
+ declare const CheckoutBarInput: ({ disabled, charge, quantity, onQuantityChanged, }: {
3
+ disabled?: boolean | undefined;
4
+ charge: PriceListCharge;
5
+ quantity: number;
6
+ onQuantityChanged: (quantity: number) => void;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default CheckoutBarInput;
@@ -1,8 +1,7 @@
1
- import { PriceList, Subscription } from '@bunnyapp/common';
2
- declare const CheckoutBarSummarySection: ({ open, selectedPriceList, onClickCheckout, upgradingSubscription, }: {
1
+ import { PriceList } from '@bunnyapp/common';
2
+ declare const CheckoutBarSummarySection: ({ open, selectedPriceList, onClickCheckout, }: {
3
3
  open: boolean;
4
4
  selectedPriceList: PriceList;
5
5
  onClickCheckout: () => void;
6
- upgradingSubscription?: Subscription | undefined;
7
6
  }) => import("react/jsx-runtime").JSX.Element;
8
7
  export default CheckoutBarSummarySection;
@@ -0,0 +1,7 @@
1
+ import { PriceList } from '@bunnyapp/common';
2
+ declare const PlanPickerCheckoutBar: ({ selectedPriceList, handlePortalErrors, onCheckoutSuccess, }: {
3
+ selectedPriceList: PriceList;
4
+ handlePortalErrors?: ((errors: any) => void) | undefined;
5
+ onCheckoutSuccess: () => void;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default PlanPickerCheckoutBar;
@@ -0,0 +1,10 @@
1
+ import { BillingPeriod, Plan, PriceList, Product, Subscription } from '@bunnyapp/common';
2
+ type PlanAddonsCardProps = {
3
+ selectedPriceList: PriceList;
4
+ subscriptions: Subscription[];
5
+ addonPlans: Plan[];
6
+ selectedProduct: Product | undefined;
7
+ selectedBillingPeriod: BillingPeriod;
8
+ };
9
+ declare const PlanAddonsCard: ({ selectedPriceList, subscriptions, addonPlans, selectedProduct, selectedBillingPeriod, }: PlanAddonsCardProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PlanAddonsCard;
@@ -1,5 +1,5 @@
1
1
  import { Feature, PriceList, Subscription } from '@bunnyapp/common';
2
- declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, noBorder, }: {
2
+ declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }: {
3
3
  hideButton?: boolean | undefined;
4
4
  description: string;
5
5
  disableSelectCurrentPlan: boolean;
@@ -10,5 +10,6 @@ declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCur
10
10
  subscriptionPlan?: Subscription | undefined;
11
11
  trialRemainingDays?: number | undefined;
12
12
  noBorder?: boolean | undefined;
13
+ onClickPriceListCard?: ((priceList: PriceList) => void) | undefined;
13
14
  }) => import("react/jsx-runtime").JSX.Element;
14
15
  export default PriceListCardDesktop;
@@ -10,6 +10,7 @@ type PriceListGridDesktopProps = {
10
10
  subscriptions: Subscription[];
11
11
  trialRemainingDays: number;
12
12
  selectedBillingPeriod?: BillingPeriod | undefined;
13
+ onClickPriceListCard: (priceList: PriceList) => void;
13
14
  };
14
- declare const PriceListGridDesktop: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, trialRemainingDays, selectedBillingPeriod, }: PriceListGridDesktopProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const PriceListGridDesktop: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, trialRemainingDays, selectedBillingPeriod, onClickPriceListCard, }: PriceListGridDesktopProps) => import("react/jsx-runtime").JSX.Element;
15
16
  export default PriceListGridDesktop;
@@ -0,0 +1,2 @@
1
+ import { PriceListCharge } from '@bunnyapp/common';
2
+ export declare const calculateNewQuantity: (priceListCharge: PriceListCharge, currentQuantity?: number) => number;
@@ -1,12 +1,13 @@
1
1
  import { Feature, PriceList, Subscription } from '@bunnyapp/common';
2
- declare const PriceListCardMobile: ({ description, disableOnClick, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, }: {
2
+ declare const PriceListCardMobile: ({ description, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, disableOnClickPriceListCard, onClickPriceListCard, }: {
3
3
  description: string;
4
- disableOnClick: boolean;
5
4
  feature?: Feature | undefined;
6
5
  isPriceListCurrentSubscription: boolean;
7
6
  isSelected: boolean;
8
7
  priceList: PriceList;
9
8
  subscriptionPlan?: Subscription | undefined;
10
9
  trialRemainingDays?: number | undefined;
10
+ disableOnClickPriceListCard: boolean;
11
+ onClickPriceListCard?: ((priceList: PriceList) => void) | undefined;
11
12
  }) => import("react/jsx-runtime").JSX.Element;
12
13
  export default PriceListCardMobile;
@@ -1,10 +1,11 @@
1
1
  import { PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
2
- declare const PriceListGridMobile: ({ availablePriceLists, priceListChangeOptions, selectedPriceList, selectedProduct, subscriptions, trialRemainingDays, }: {
2
+ declare const PriceListGridMobile: ({ availablePriceLists, priceListChangeOptions, selectedPriceList, selectedProduct, subscriptions, trialRemainingDays, onClickPriceListCard, }: {
3
3
  availablePriceLists: PriceList[];
4
4
  priceListChangeOptions?: PriceListChangeOptions | undefined;
5
5
  selectedPriceList?: PriceList | undefined;
6
6
  selectedProduct?: Product | undefined;
7
7
  subscriptions?: Subscription[] | undefined;
8
8
  trialRemainingDays?: number | undefined;
9
+ onClickPriceListCard: (priceList: PriceList) => void;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
10
11
  export default PriceListGridMobile;
@@ -1,10 +1,11 @@
1
1
  import { PriceList, Subscription } from '@bunnyapp/common';
2
- declare const PriceListCard: ({ hideButton, isSelected, priceList, subscriptions, trialRemainingDays, noBorder, }: {
2
+ declare const PriceListCard: ({ hideButton, isSelected, priceList, subscriptions, trialRemainingDays, noBorder, onClickPriceListCard, }: {
3
3
  hideButton?: boolean | undefined;
4
4
  isSelected: boolean;
5
5
  priceList: PriceList;
6
6
  subscriptions?: Subscription[] | undefined;
7
7
  trialRemainingDays?: number | undefined;
8
8
  noBorder?: boolean | undefined;
9
+ onClickPriceListCard?: ((priceList: PriceList) => void) | undefined;
9
10
  }) => import("react/jsx-runtime").JSX.Element | null;
10
11
  export default PriceListCard;
@@ -4,6 +4,6 @@ export declare const getActivePlanPriceData: (priceList?: PriceList, selectedPri
4
4
  activeCharge: PriceListCharge | undefined;
5
5
  } | undefined;
6
6
  export declare const isPriceListDisabled: ({ priceList, upgradingSubscription, }: {
7
- priceList: PriceList;
7
+ priceList?: PriceList | undefined;
8
8
  upgradingSubscription: Subscription | undefined;
9
9
  }) => boolean;
@@ -0,0 +1,8 @@
1
+ import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
+ declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, priceListChangeOptions, subscriptions, }: {
3
+ arePlanChangeOptionsLoading: boolean;
4
+ areSubscriptionsLoading: boolean;
5
+ priceListChangeOptions: PriceListChangeOptions;
6
+ subscriptions: Subscription[];
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default PriceListSelector;
@@ -0,0 +1,7 @@
1
+ import { Subscription } from '@bunnyapp/common';
2
+ declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, upgradingSubscription, }: {
3
+ onChangePlanCancel: () => void;
4
+ handlePortalErrors?: ((error: any) => void) | undefined;
5
+ upgradingSubscription?: Subscription | undefined;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default UpgradeWrapper;
@@ -0,0 +1 @@
1
+ export { default as Upgrade } from './Upgrade';
@@ -1 +1,2 @@
1
- export { default as Subscriptions } from "./Subscriptions";
1
+ export { default as Subscriptions } from './Subscriptions';
2
+ export { default as Upgrade } from './Upgrade/Upgrade';
@@ -1,5 +1,5 @@
1
- import { Quote, Subscription, SubscriptionCharge } from "@bunnyapp/common";
2
- declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions, subscriptionIndex, setEditingQuoteData, subscription, subscriptionCharge, }: {
1
+ import { Quote, Subscription, SubscriptionCharge } from '@bunnyapp/common';
2
+ declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions, subscriptionIndex, setEditingQuoteData, subscription, subscriptionCharge, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
3
3
  chargeIndex: number;
4
4
  editingQuote?: Quote | undefined;
5
5
  subscriptions: Subscription[];
@@ -7,5 +7,7 @@ declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions
7
7
  setEditingQuoteData: (value: any) => void;
8
8
  subscription: Subscription;
9
9
  subscriptionCharge: SubscriptionCharge;
10
+ setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
11
+ updatingChargeQuantityId: string | undefined;
10
12
  }) => import("react/jsx-runtime").JSX.Element | null;
11
13
  export default QuantityChangeGridRow;
@@ -2,11 +2,11 @@ import { Quote, Subscription, SubscriptionCharge } from '@bunnyapp/common';
2
2
  export type EditingSubscriptionType = {
3
3
  chargeId: string;
4
4
  chargeIndex: number;
5
- quantity: number;
5
+ quantity: number | undefined;
6
6
  subscription: Subscription;
7
7
  subscriptionIndex: number;
8
8
  };
9
- declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuoteData, subscription, subscriptionIndex, subscriptions, }: {
9
+ declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuoteData, subscription, subscriptionIndex, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
10
10
  charge: SubscriptionCharge;
11
11
  chargeIndex: number;
12
12
  editingQuote?: Quote | undefined;
@@ -17,5 +17,7 @@ declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuo
17
17
  subscription: Subscription;
18
18
  subscriptionIndex: number;
19
19
  subscriptions: Subscription[];
20
+ setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
21
+ updatingChargeQuantityId: string | undefined;
20
22
  }) => import("react/jsx-runtime").JSX.Element;
21
23
  export default QuantityInput;
@@ -2,7 +2,7 @@ import { Quote, Subscription } from '@bunnyapp/common';
2
2
  import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
3
3
  export declare const QUANTITY_CHANGE_HEADER_TITLE = "Update unit quantity";
4
4
  export declare const QUANTITY_CHANGE_HEADER_DESCRIPTION = "Adjust quantities below. The change will take effect immediately after checkout has been completed.";
5
- declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, onClose, open, openCheckout, setEditingQuoteData, subscriptions, }: {
5
+ declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, onClose, open, openCheckout, setEditingQuoteData, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
6
6
  editingQuote?: Quote | undefined;
7
7
  editingQuoteData?: EditingQuoteDataType | undefined;
8
8
  onClose: () => void;
@@ -10,5 +10,7 @@ declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, on
10
10
  openCheckout: () => void;
11
11
  setEditingQuoteData: (value: EditingQuoteDataType | undefined) => void;
12
12
  subscriptions: Subscription[];
13
+ setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
14
+ updatingChargeQuantityId: string | undefined;
13
15
  }) => import("react/jsx-runtime").JSX.Element | null;
14
16
  export default QuantityChangeDrawerDesktop;
@@ -1,5 +1,4 @@
1
- declare const ChangeQuantitiesButton: ({ canShowChangeQuantitiesButton, setQuantityDrawerOpen, }: {
2
- canShowChangeQuantitiesButton: boolean;
1
+ declare const ChangeQuantitiesButton: ({ setQuantityDrawerOpen, }: {
3
2
  setQuantityDrawerOpen: (value: boolean) => void;
4
- }) => import("react/jsx-runtime").JSX.Element | null;
3
+ }) => import("react/jsx-runtime").JSX.Element;
5
4
  export default ChangeQuantitiesButton;
@@ -1,8 +1,9 @@
1
1
  import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, }: {
2
+ declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, isPaymentMethodLoading, }: {
3
3
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
4
4
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
5
5
  priceListChangeOptions?: PriceListChangeOptions | undefined;
6
6
  subscription: Subscription;
7
+ isPaymentMethodLoading: boolean;
7
8
  }) => import("react/jsx-runtime").JSX.Element | null;
8
9
  export default SubscriptionCardActions;
@@ -1,8 +1,7 @@
1
- import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, }: {
1
+ import { Subscription } from '@bunnyapp/common';
2
+ declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick, subscription, }: {
3
3
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
4
4
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
5
- priceListChangeOptions?: PriceListChangeOptions | undefined;
6
5
  subscription: Subscription;
7
6
  }) => import("react/jsx-runtime").JSX.Element;
8
7
  export default SubscriptionCardHeader;
@@ -1,9 +1,8 @@
1
- import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionsList: ({ hideExpired, onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscriptions, }: {
1
+ import { Subscription } from '@bunnyapp/common';
2
+ declare const SubscriptionsList: ({ hideExpired, onChangePlanClick, onCancelSubscriptionClick, subscriptions, }: {
3
3
  hideExpired: boolean;
4
4
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
5
5
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
6
- priceListChangeOptions?: PriceListChangeOptions | undefined;
7
6
  subscriptions: Subscription[];
8
7
  }) => import("react/jsx-runtime").JSX.Element;
9
8
  export default SubscriptionsList;
@@ -1,8 +1,7 @@
1
- import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionCardDesktop: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, isAddon, }: {
1
+ import { Subscription } from '@bunnyapp/common';
2
+ declare const SubscriptionCardDesktop: ({ onChangePlanClick, onCancelSubscriptionClick, subscription, isAddon, }: {
3
3
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
4
4
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
5
- priceListChangeOptions?: PriceListChangeOptions | undefined;
6
5
  subscription: Subscription;
7
6
  isAddon?: boolean | undefined;
8
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -12,6 +12,7 @@ export declare const canShowChangeQuantities: ({ subscriptions }: {
12
12
  subscriptions: Subscription[];
13
13
  }) => boolean;
14
14
  export declare const canSubscriptionUpgradeFromTrial: (subscription: Subscription) => boolean;
15
+ export declare const canSubscriptionUpgradeFromTrialExpired: (subscription: Subscription) => boolean;
15
16
  export declare const isSubscriptionNotActive: (subscription: Subscription) => boolean;
16
17
  export declare const productPlanName: ({ plan, product }: {
17
18
  plan: Plan;
@@ -19,6 +20,7 @@ export declare const productPlanName: ({ plan, product }: {
19
20
  }) => string;
20
21
  export declare const isSubscriptionActiveOrPending: (subscription: Subscription) => boolean;
21
22
  export declare const isSubscriptionTrial: (subscription: Subscription) => boolean;
23
+ export declare const isSubscriptionTrialExpired: (subscription: Subscription) => boolean;
22
24
  export declare const isDiscount: (kind?: QuoteChangeKind) => boolean;
23
25
  export declare const hasPriceTiers: (charge: SubscriptionCharge) => boolean;
24
26
  export declare const hasMultiplePriceTiers: (charge: SubscriptionCharge) => boolean;
@@ -0,0 +1 @@
1
+ export declare const TAG_COLORS: Record<string, string>;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Transaction, TransactionKind } from '@bunnyapp/common';
3
3
  import { ShadowType } from '../../types/shadowType';
4
4
  import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
5
- import { TransactionDateType } from './TransactionsListContext';
5
+ import { TransactionDateType } from '../../contexts/TransactionsListContext';
6
6
  export default function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, filterTransactions, sortTransactions, transactionDateType, hidePaymentForm, }: {
7
7
  /** A custom component to render instead of the default invoice component */
8
8
  transactionComponent?: React.ReactNode;
@@ -49,7 +49,7 @@ export default function Transactions({ transactionComponent, showSearchBar, show
49
49
  hidePaymentForm?: boolean;
50
50
  }): import("react/jsx-runtime").JSX.Element;
51
51
  export declare function TransactionsDisplay({ transactions, onSearchValueChanged, search, }: {
52
- transactions: Transaction[];
52
+ transactions: Transaction[] | undefined;
53
53
  onSearchValueChanged: (value: string) => void;
54
54
  search: string;
55
55
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Transaction } from '@bunnyapp/common';
2
2
  export type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
3
3
  declare const TransactionsListDesktop: ({ transactions, onTransactionClick, }: {
4
- transactions: Transaction[];
4
+ transactions: Transaction[] | undefined;
5
5
  onTransactionClick?: ((transaction: Transaction) => void) | undefined;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
7
7
  export default TransactionsListDesktop;
@@ -1,6 +1,6 @@
1
1
  import { Transaction } from '@bunnyapp/common';
2
2
  declare const TransactionsListMobile: ({ transactions, onTransactionClick, }: {
3
- transactions: Transaction[];
3
+ transactions: Transaction[] | undefined;
4
4
  onTransactionClick: (transaction: Transaction) => void;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
6
6
  export default TransactionsListMobile;
@@ -1,3 +1,3 @@
1
1
  import { Transaction } from '@bunnyapp/common';
2
- import { TransactionDateType } from '../TransactionsListContext';
2
+ import { TransactionDateType } from '../../../contexts/TransactionsListContext';
3
3
  export declare function transactionDateToDisplay(transaction: Transaction, transactionDateType: TransactionDateType): string;
@@ -9,3 +9,4 @@ export { Subscriptions } from './Subscriptions';
9
9
  export { BillingDetails } from './BillingDetails';
10
10
  export { Footer } from './Footer';
11
11
  export { MiniCreditCard } from './PaymentForm/DemoPay/CreditCard';
12
+ export { Upgrade } from './Subscriptions';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ShadowType } from "../../types/shadowType";
3
- import { FormattedInvoice, FormattedQuote } from "@bunnyapp/common";
2
+ import { ShadowType } from '../types/shadowType';
3
+ import { FormattedInvoice, FormattedQuote } from '@bunnyapp/common';
4
4
  export type InvoiceQuoteContextProps = {
5
5
  id?: string;
6
6
  invoiceQuoteViewComponent?: React.ReactNode;
@@ -11,9 +11,5 @@ export type SubscriptionsContextValues = {
11
11
  hideExpired?: boolean;
12
12
  upgradingSubscription?: Subscription;
13
13
  setUpgradingSubscription: React.Dispatch<React.SetStateAction<Subscription | undefined>>;
14
- updatingChargeQuantityId?: string;
15
- setUpdatingChargeQuantityId: React.Dispatch<React.SetStateAction<string | undefined>>;
16
- subscriptionUpgradeId: string | null;
17
- setSubscriptionUpgradeId: React.Dispatch<React.SetStateAction<string | null>>;
18
14
  };
19
15
  export declare const SubscriptionsContext: import("react").Context<SubscriptionsContextValues>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Transaction, TransactionKind } from '@bunnyapp/common';
3
- import { ShadowType } from '../../types/shadowType';
4
- import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
3
+ import { ShadowType } from '../types/shadowType';
4
+ import { TransactionListColumnType } from '../components/Transactions/transactionsList/TransactionsListDesktop';
5
5
  export type TransactionsContextValues = {
6
6
  showSearchBar?: boolean;
7
7
  showTitle?: boolean;
@@ -21,3 +21,8 @@ export declare const quoteSubscriptionActivate: ({ subscriptionId, apiHost, toke
21
21
  apiHost: string;
22
22
  token?: string | undefined;
23
23
  }) => Promise<unknown>;
24
+ export declare const quoteSubscriptionReinstate: ({ subscriptionId, apiHost, token, }: {
25
+ subscriptionId: string;
26
+ apiHost: string;
27
+ token?: string | undefined;
28
+ }) => Promise<unknown>;
@@ -1,3 +1,4 @@
1
+ import { QuoteCharge } from '@bunnyapp/common';
1
2
  declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteChargeId, startDate, subtotal, apiHost, token, }: {
2
3
  discount?: number | undefined;
3
4
  name?: string | undefined;
@@ -8,5 +9,5 @@ declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteCharge
8
9
  subtotal?: number | undefined;
9
10
  apiHost: string;
10
11
  token: string;
11
- }) => Promise<unknown>;
12
+ }) => Promise<QuoteCharge>;
12
13
  export default quoteChargeUpdate;
@@ -0,0 +1,37 @@
1
+ import { Plan } from '@bunnyapp/common';
2
+ declare const getAddonPlans: ({ token, id, apiHost, }: {
3
+ token?: string | undefined;
4
+ id: string;
5
+ apiHost: string;
6
+ }) => Promise<{
7
+ priceLists: import("@bunnyapp/common").PriceList[];
8
+ addon?: boolean | undefined;
9
+ compatiblePlans?: Plan[] | undefined;
10
+ addonPlans?: Plan[] | undefined;
11
+ availableFrom?: string | undefined;
12
+ availableTo?: string | undefined;
13
+ basePrice?: number | undefined;
14
+ code?: string | undefined;
15
+ contactUsLabel?: string | undefined;
16
+ contactUsUrl?: string | undefined;
17
+ createdAt: string;
18
+ description?: string | undefined;
19
+ features?: import("@bunnyapp/common").Feature[] | undefined;
20
+ id: string;
21
+ internalNotes?: string | undefined;
22
+ isAvailableNow?: boolean | undefined;
23
+ isVisible?: boolean | undefined;
24
+ name: string;
25
+ planFeatures?: import("@bunnyapp/common").PlanFeature[] | undefined;
26
+ position: number;
27
+ pricingDescription?: string | undefined;
28
+ pricingStyle: import("@bunnyapp/common").PricingStyle;
29
+ product: import("@bunnyapp/common").Product;
30
+ productId: string;
31
+ selfServiceBuy?: boolean | undefined;
32
+ selfServiceCancel?: boolean | undefined;
33
+ selfServiceRenew?: boolean | undefined;
34
+ trialEndDate?: string | undefined;
35
+ updatedAt: string;
36
+ }[]>;
37
+ export default getAddonPlans;