@bunnyapp/components 1.0.76 → 1.1.0-beta.1

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 (104) hide show
  1. package/dist/cjs/index.js +881 -536
  2. package/dist/cjs/src/components/BillingDetails/BillingDetails.d.ts +7 -5
  3. package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +2 -2
  4. package/dist/cjs/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
  5. package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
  6. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +4 -5
  7. package/dist/cjs/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
  8. package/dist/cjs/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
  9. package/dist/cjs/src/components/QuotePreviewProvider.d.ts +17 -0
  10. package/dist/cjs/src/components/Quotes/Quotes.d.ts +6 -6
  11. package/dist/cjs/src/components/Quotes/Quotes.stories.d.ts +2 -2
  12. package/dist/cjs/src/components/Signup/PaymentForms.d.ts +9 -1
  13. package/dist/cjs/src/components/Signup/Signup.d.ts +11 -1
  14. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
  15. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
  16. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
  17. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
  18. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
  19. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
  20. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  21. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  22. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
  23. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
  24. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -3
  25. package/dist/cjs/src/components/Subscriptions/SubscriptionRequests.d.ts +0 -1
  26. package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
  27. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
  28. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +1 -1
  29. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -1
  30. package/dist/cjs/src/components/TaxationForm.d.ts +2 -2
  31. package/dist/cjs/src/components/Transactions/Transactions.d.ts +5 -5
  32. package/dist/cjs/src/components/Transactions/TransactionsListContext.d.ts +8 -8
  33. package/dist/cjs/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  34. package/dist/cjs/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
  35. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
  36. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
  37. package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +3 -3
  38. package/dist/cjs/src/components/icons/Bancontact.d.ts +4 -0
  39. package/dist/cjs/src/components/icons/IDeal.d.ts +4 -0
  40. package/dist/cjs/src/components/icons/Sepa.d.ts +4 -0
  41. package/dist/cjs/src/graphql/QuoteRequests.d.ts +1 -0
  42. package/dist/cjs/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
  43. package/dist/cjs/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
  44. package/dist/cjs/src/graphql/mutations/subscriptionTrialConvert.d.ts +7 -0
  45. package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +1 -4
  46. package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +2 -4
  47. package/dist/cjs/src/graphql/queries/getTransactions.d.ts +2 -2
  48. package/dist/cjs/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
  49. package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +2 -2
  50. package/dist/cjs/src/utils/couponUtils.d.ts +2 -0
  51. package/dist/cjs/src/utils/featureAddonUtils.d.ts +3 -0
  52. package/dist/esm/index.js +884 -539
  53. package/dist/esm/src/components/BillingDetails/BillingDetails.d.ts +7 -5
  54. package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +2 -2
  55. package/dist/esm/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
  56. package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
  57. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +4 -5
  58. package/dist/esm/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
  59. package/dist/esm/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
  60. package/dist/esm/src/components/QuotePreviewProvider.d.ts +17 -0
  61. package/dist/esm/src/components/Quotes/Quotes.d.ts +6 -6
  62. package/dist/esm/src/components/Quotes/Quotes.stories.d.ts +2 -2
  63. package/dist/esm/src/components/Signup/PaymentForms.d.ts +9 -1
  64. package/dist/esm/src/components/Signup/Signup.d.ts +11 -1
  65. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
  66. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
  67. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
  68. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
  69. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
  70. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
  71. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  72. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  73. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
  74. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
  75. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -3
  76. package/dist/esm/src/components/Subscriptions/SubscriptionRequests.d.ts +0 -1
  77. package/dist/esm/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
  78. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
  79. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +1 -1
  80. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -1
  81. package/dist/esm/src/components/TaxationForm.d.ts +2 -2
  82. package/dist/esm/src/components/Transactions/Transactions.d.ts +5 -5
  83. package/dist/esm/src/components/Transactions/TransactionsListContext.d.ts +8 -8
  84. package/dist/esm/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  85. package/dist/esm/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
  86. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
  87. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
  88. package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +3 -3
  89. package/dist/esm/src/components/icons/Bancontact.d.ts +4 -0
  90. package/dist/esm/src/components/icons/IDeal.d.ts +4 -0
  91. package/dist/esm/src/components/icons/Sepa.d.ts +4 -0
  92. package/dist/esm/src/graphql/QuoteRequests.d.ts +1 -0
  93. package/dist/esm/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
  94. package/dist/esm/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
  95. package/dist/esm/src/graphql/mutations/subscriptionTrialConvert.d.ts +7 -0
  96. package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +1 -4
  97. package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +2 -4
  98. package/dist/esm/src/graphql/queries/getTransactions.d.ts +2 -2
  99. package/dist/esm/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
  100. package/dist/esm/src/hooks/usePaymentPlugins.d.ts +2 -2
  101. package/dist/esm/src/utils/couponUtils.d.ts +2 -0
  102. package/dist/esm/src/utils/featureAddonUtils.d.ts +3 -0
  103. package/dist/index.d.ts +30 -19
  104. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ import { QuoteCharge } from '@bunnyapp/common';
1
2
  type QuoteChangeCreateChargeProps = {
2
3
  apiHost: string;
3
4
  price?: number;
@@ -8,5 +9,5 @@ type QuoteChangeCreateChargeProps = {
8
9
  subscriptionChargeId?: string;
9
10
  token?: string;
10
11
  };
11
- declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<unknown>;
12
+ declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<QuoteCharge>;
12
13
  export default quoteChargeCreate;
@@ -0,0 +1,7 @@
1
+ type QuoteChargeDeleteProps = {
2
+ apiHost: string;
3
+ quoteChargeId: string;
4
+ token?: string;
5
+ };
6
+ declare const quoteChargeDelete: ({ quoteChargeId, token, apiHost }: QuoteChargeDeleteProps) => Promise<unknown>;
7
+ export default quoteChargeDelete;
@@ -0,0 +1,7 @@
1
+ declare const subscriptionTrialConvert: ({ subscriptionId, paymentMethodId, apiHost, token, }: {
2
+ subscriptionId: string;
3
+ paymentMethodId?: string | undefined;
4
+ apiHost: string;
5
+ token?: string | undefined;
6
+ }) => Promise<any>;
7
+ export default subscriptionTrialConvert;
@@ -1,9 +1,6 @@
1
1
  import { FeatureUsage } from '@bunnyapp/common';
2
- declare const getFeatureUsage: ({ subscriptionChargeId, startDate, endDate, dataInterval, token, apiHost, }: {
2
+ declare const getFeatureUsage: ({ subscriptionChargeId, token, apiHost, }: {
3
3
  subscriptionChargeId: string;
4
- startDate?: string | undefined;
5
- endDate?: string | undefined;
6
- dataInterval?: number | undefined;
7
4
  token?: string | undefined;
8
5
  apiHost: string;
9
6
  }) => Promise<FeatureUsage>;
@@ -1,7 +1,5 @@
1
- import { FormattedQuote } from '@bunnyapp/common';
2
- declare const getFormattedQuote: ({ id, token, apiHost, }: {
3
- id?: string | undefined;
1
+ declare const getFormattedQuote: ({ token, apiHost }: {
4
2
  apiHost: string;
5
3
  token?: string | undefined;
6
- }) => Promise<FormattedQuote>;
4
+ }) => Promise<any>;
7
5
  export default getFormattedQuote;
@@ -1,3 +1,3 @@
1
- import { FrontendTransaction as T } from '@bunnyapp/common';
2
- declare const getTransactions: (filter: string, apiHost: string, token?: string) => Promise<T.Transaction[]>;
1
+ import { Transaction } from '@bunnyapp/common';
2
+ declare const getTransactions: (filter: string, apiHost: string, token?: string) => Promise<Transaction[]>;
3
3
  export default getTransactions;
@@ -0,0 +1,8 @@
1
+ import { PriceListCharge } from '@bunnyapp/common';
2
+ export declare const useQuoteUpdateFeatureAddon: (quoteId: string | undefined, featureAddon: PriceListCharge) => {
3
+ handleAddFeatureAddon: () => void;
4
+ handleRemoveFeatureAddon: () => void;
5
+ isPending: boolean;
6
+ isChecked: boolean;
7
+ editingQuoteLoaded: boolean;
8
+ };
@@ -19,10 +19,10 @@ type PaymentPlugin = {
19
19
  }[];
20
20
  };
21
21
  };
22
- export declare const usePaymentPlugins: ({ apiHost, token, selectedEntityId, }: {
22
+ export declare const usePaymentPlugins: ({ apiHost, token, accountId, }: {
23
23
  apiHost: string;
24
24
  token?: string | undefined;
25
- selectedEntityId?: string | null | undefined;
25
+ accountId?: string | undefined;
26
26
  }) => {
27
27
  paymentPlugins: PaymentPlugin[];
28
28
  isFetched: boolean;
@@ -0,0 +1,2 @@
1
+ import { Quote, Subscription } from '@bunnyapp/common';
2
+ export declare function shouldShowCouponEditor(quote: Quote, activeCouponsExist: boolean, upgradingSubscription: Subscription): boolean;
@@ -0,0 +1,3 @@
1
+ import { PriceList, PriceListCharge, Subscription } from '@bunnyapp/common';
2
+ export declare function isAddonPurchased(featureAddon: PriceListCharge, currentSubscription: Subscription | undefined): boolean;
3
+ export declare function priceListHasUnpurchasedFeatureAddons(priceList: PriceList, currentSubscription: Subscription | undefined): boolean;