@bunnyapp/components 1.0.7 → 1.0.8

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 (170) hide show
  1. package/dist/cjs/index.js +730 -1052
  2. package/dist/cjs/playground/main.d.ts +1 -1
  3. package/dist/cjs/src/ajax.d.ts +1 -0
  4. package/dist/cjs/src/components/BunnyProvider.d.ts +9 -5
  5. package/dist/cjs/src/components/Checkout/Checkout.d.ts +4 -2
  6. package/dist/cjs/src/components/Checkout/InvoiceCheckout.d.ts +2 -1
  7. package/dist/cjs/src/components/Checkout/QuoteCheckout.d.ts +2 -1
  8. package/dist/cjs/src/components/FeatureUsageGraph.d.ts +1 -1
  9. package/dist/cjs/src/components/Invoice/Invoice.d.ts +2 -2
  10. package/dist/cjs/src/components/Invoice/InvoiceQuoteView.d.ts +1 -2
  11. package/dist/cjs/src/components/LegacyInvoicePDF.d.ts +2 -2
  12. package/dist/cjs/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +1 -1
  13. package/dist/cjs/src/components/PaymentForm/Finix/FinixCardForm.d.ts +1 -1
  14. package/dist/cjs/src/components/PaymentForm/FinixAch.d.ts +1 -1
  15. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +1 -1
  16. package/dist/cjs/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -0
  17. package/dist/cjs/src/components/PaymentForm/PaymentMethod/PaymentMethod.d.ts +2 -2
  18. package/dist/cjs/src/components/PaymentForm/PaymentMethod/PaymentMethodContext.d.ts +0 -1
  19. package/dist/cjs/src/components/PaymentForm/PaymentMethodForm.d.ts +1 -1
  20. package/dist/cjs/src/components/PaymentForm/Stripe/StripeForm.d.ts +1 -1
  21. package/dist/cjs/src/components/PaymentForm/Stripe/stripeUtils.d.ts +6 -6
  22. package/dist/cjs/src/components/PaymentForm/paymentUtils.d.ts +2 -2
  23. package/dist/cjs/src/components/Quote/Quote.d.ts +2 -2
  24. package/dist/cjs/src/components/Quotes/Quotes.d.ts +2 -1
  25. package/dist/cjs/src/components/Signup/PaymentForms.d.ts +2 -2
  26. package/dist/cjs/src/components/Signup/PaymentSuccess.d.ts +4 -3
  27. package/dist/cjs/src/components/Signup/Signup.d.ts +3 -1
  28. package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +4 -2
  29. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +1 -1
  30. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardColumnHeaders.d.ts +1 -1
  31. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -2
  32. package/dist/cjs/src/components/Transactions/Transactions.d.ts +3 -1
  33. package/dist/cjs/src/components/Transactions/TransactionsListContext.d.ts +1 -0
  34. package/dist/cjs/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  35. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -11
  36. package/dist/cjs/src/contexts/NavigationContext.d.ts +1 -1
  37. package/dist/cjs/src/graphql/mutations/accountSignup.d.ts +2 -2
  38. package/dist/cjs/src/graphql/mutations/accountUpdate.d.ts +2 -1
  39. package/dist/cjs/src/graphql/mutations/checkout.d.ts +2 -2
  40. package/dist/cjs/src/graphql/mutations/portalSessionCreate.d.ts +2 -2
  41. package/dist/cjs/src/graphql/mutations/quoteAccountSignup.d.ts +2 -2
  42. package/dist/cjs/src/graphql/mutations/quoteAddCoupon.d.ts +2 -1
  43. package/dist/cjs/src/graphql/mutations/quoteCompose.d.ts +2 -2
  44. package/dist/cjs/src/graphql/mutations/quoteCreate.d.ts +2 -2
  45. package/dist/cjs/src/graphql/mutations/quoteRecalculateTaxes.d.ts +2 -1
  46. package/dist/cjs/src/graphql/mutations/quoteSubscriptionReinstate.d.ts +2 -2
  47. package/dist/cjs/src/graphql/queries/getAccount.d.ts +2 -2
  48. package/dist/cjs/src/graphql/queries/getBranding.d.ts +2 -2
  49. package/dist/cjs/src/graphql/queries/getCurrentUserData.d.ts +2 -2
  50. package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +2 -1
  51. package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +2 -2
  52. package/dist/cjs/src/graphql/queries/getInvoice.d.ts +2 -2
  53. package/dist/cjs/src/graphql/queries/getPlanChangeOptions.d.ts +2 -2
  54. package/dist/cjs/src/graphql/queries/getPriceList.d.ts +2 -2
  55. package/dist/cjs/src/graphql/queries/getQuote.d.ts +2 -2
  56. package/dist/cjs/src/graphql/queries/getQuotes.d.ts +2 -2
  57. package/dist/cjs/src/graphql/queries/getSubscription.d.ts +2 -2
  58. package/dist/cjs/src/graphql/queries/getSubscriptions.d.ts +2 -2
  59. package/dist/cjs/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +6 -0
  60. package/dist/cjs/src/graphql/queries/getTransactions.d.ts +1 -1
  61. package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +7 -1
  62. package/dist/cjs/src/hooks/useHasTaxPlugin.d.ts +3 -2
  63. package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +11 -0
  64. package/dist/cjs/src/hooks/usePlugins.d.ts +6 -0
  65. package/dist/cjs/src/hooks/useSigningPlugins.d.ts +5 -1
  66. package/dist/cjs/src/index.d.ts +1 -0
  67. package/dist/cjs/src/utils/GraphQLClient.d.ts +2 -0
  68. package/dist/cjs/src/utils/quoteInvoiceUtils.d.ts +6 -0
  69. package/dist/esm/index.js +722 -1043
  70. package/dist/esm/playground/main.d.ts +1 -1
  71. package/dist/esm/src/ajax.d.ts +1 -0
  72. package/dist/esm/src/components/BunnyProvider.d.ts +9 -5
  73. package/dist/esm/src/components/Checkout/Checkout.d.ts +4 -2
  74. package/dist/esm/src/components/Checkout/InvoiceCheckout.d.ts +2 -1
  75. package/dist/esm/src/components/Checkout/QuoteCheckout.d.ts +2 -1
  76. package/dist/esm/src/components/FeatureUsageGraph.d.ts +1 -1
  77. package/dist/esm/src/components/Invoice/Invoice.d.ts +2 -2
  78. package/dist/esm/src/components/Invoice/InvoiceQuoteView.d.ts +1 -2
  79. package/dist/esm/src/components/LegacyInvoicePDF.d.ts +2 -2
  80. package/dist/esm/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +1 -1
  81. package/dist/esm/src/components/PaymentForm/Finix/FinixCardForm.d.ts +1 -1
  82. package/dist/esm/src/components/PaymentForm/FinixAch.d.ts +1 -1
  83. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +1 -1
  84. package/dist/esm/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -0
  85. package/dist/esm/src/components/PaymentForm/PaymentMethod/PaymentMethod.d.ts +2 -2
  86. package/dist/esm/src/components/PaymentForm/PaymentMethod/PaymentMethodContext.d.ts +0 -1
  87. package/dist/esm/src/components/PaymentForm/PaymentMethodForm.d.ts +1 -1
  88. package/dist/esm/src/components/PaymentForm/Stripe/StripeForm.d.ts +1 -1
  89. package/dist/esm/src/components/PaymentForm/Stripe/stripeUtils.d.ts +6 -6
  90. package/dist/esm/src/components/PaymentForm/paymentUtils.d.ts +2 -2
  91. package/dist/esm/src/components/Quote/Quote.d.ts +2 -2
  92. package/dist/esm/src/components/Quotes/Quotes.d.ts +2 -1
  93. package/dist/esm/src/components/Signup/PaymentForms.d.ts +2 -2
  94. package/dist/esm/src/components/Signup/PaymentSuccess.d.ts +4 -3
  95. package/dist/esm/src/components/Signup/Signup.d.ts +3 -1
  96. package/dist/esm/src/components/Subscriptions/Subscriptions.d.ts +4 -2
  97. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +1 -1
  98. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardColumnHeaders.d.ts +1 -1
  99. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -2
  100. package/dist/esm/src/components/Transactions/Transactions.d.ts +3 -1
  101. package/dist/esm/src/components/Transactions/TransactionsListContext.d.ts +1 -0
  102. package/dist/esm/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  103. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -11
  104. package/dist/esm/src/contexts/NavigationContext.d.ts +1 -1
  105. package/dist/esm/src/graphql/mutations/accountSignup.d.ts +2 -2
  106. package/dist/esm/src/graphql/mutations/accountUpdate.d.ts +2 -1
  107. package/dist/esm/src/graphql/mutations/checkout.d.ts +2 -2
  108. package/dist/esm/src/graphql/mutations/portalSessionCreate.d.ts +2 -2
  109. package/dist/esm/src/graphql/mutations/quoteAccountSignup.d.ts +2 -2
  110. package/dist/esm/src/graphql/mutations/quoteAddCoupon.d.ts +2 -1
  111. package/dist/esm/src/graphql/mutations/quoteCompose.d.ts +2 -2
  112. package/dist/esm/src/graphql/mutations/quoteCreate.d.ts +2 -2
  113. package/dist/esm/src/graphql/mutations/quoteRecalculateTaxes.d.ts +2 -1
  114. package/dist/esm/src/graphql/mutations/quoteSubscriptionReinstate.d.ts +2 -2
  115. package/dist/esm/src/graphql/queries/getAccount.d.ts +2 -2
  116. package/dist/esm/src/graphql/queries/getBranding.d.ts +2 -2
  117. package/dist/esm/src/graphql/queries/getCurrentUserData.d.ts +2 -2
  118. package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +2 -1
  119. package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +2 -2
  120. package/dist/esm/src/graphql/queries/getInvoice.d.ts +2 -2
  121. package/dist/esm/src/graphql/queries/getPlanChangeOptions.d.ts +2 -2
  122. package/dist/esm/src/graphql/queries/getPriceList.d.ts +2 -2
  123. package/dist/esm/src/graphql/queries/getQuote.d.ts +2 -2
  124. package/dist/esm/src/graphql/queries/getQuotes.d.ts +2 -2
  125. package/dist/esm/src/graphql/queries/getSubscription.d.ts +2 -2
  126. package/dist/esm/src/graphql/queries/getSubscriptions.d.ts +2 -2
  127. package/dist/esm/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +6 -0
  128. package/dist/esm/src/graphql/queries/getTransactions.d.ts +1 -1
  129. package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +7 -1
  130. package/dist/esm/src/hooks/useHasTaxPlugin.d.ts +3 -2
  131. package/dist/esm/src/hooks/usePaymentPlugins.d.ts +11 -0
  132. package/dist/esm/src/hooks/usePlugins.d.ts +6 -0
  133. package/dist/esm/src/hooks/useSigningPlugins.d.ts +5 -1
  134. package/dist/esm/src/index.d.ts +1 -0
  135. package/dist/esm/src/utils/GraphQLClient.d.ts +2 -0
  136. package/dist/esm/src/utils/quoteInvoiceUtils.d.ts +6 -0
  137. package/dist/index.d.ts +28 -14
  138. package/package.json +10 -7
  139. package/dist/cjs/src/atoms/pageContentRefAtom.d.ts +0 -1
  140. package/dist/cjs/src/atoms/planPickerQuoteDataAtom.d.ts +0 -2
  141. package/dist/cjs/src/atoms/updatingChargeQuantityIdAtom.d.ts +0 -2
  142. package/dist/cjs/src/components/Footer.d.ts +0 -4
  143. package/dist/cjs/src/components/PageContent.d.ts +0 -7
  144. package/dist/cjs/src/features/quantityChangeDrawer/QuantityChangeGridRow.d.ts +0 -11
  145. package/dist/cjs/src/features/quantityChangeDrawer/QuantityChangeGridTitle.d.ts +0 -6
  146. package/dist/cjs/src/features/quantityChangeDrawer/QuantityInput.d.ts +0 -21
  147. package/dist/cjs/src/features/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +0 -9
  148. package/dist/cjs/src/features/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +0 -14
  149. package/dist/cjs/src/graphql/QuoteRequests.d.ts +0 -6
  150. package/dist/cjs/src/graphql/SubscriptionRequests.d.ts +0 -2
  151. package/dist/cjs/src/graphql/queries/getFormattedInvoice.d.ts +0 -7
  152. package/dist/cjs/src/hooks/useCurrentUserData.d.ts +0 -2
  153. package/dist/cjs/src/hooks/useIsMobile.d.ts +0 -10
  154. package/dist/cjs/src/utils.d.ts +0 -9
  155. package/dist/esm/src/atoms/pageContentRefAtom.d.ts +0 -1
  156. package/dist/esm/src/atoms/planPickerQuoteDataAtom.d.ts +0 -2
  157. package/dist/esm/src/atoms/updatingChargeQuantityIdAtom.d.ts +0 -2
  158. package/dist/esm/src/components/Footer.d.ts +0 -4
  159. package/dist/esm/src/components/PageContent.d.ts +0 -7
  160. package/dist/esm/src/features/quantityChangeDrawer/QuantityChangeGridRow.d.ts +0 -11
  161. package/dist/esm/src/features/quantityChangeDrawer/QuantityChangeGridTitle.d.ts +0 -6
  162. package/dist/esm/src/features/quantityChangeDrawer/QuantityInput.d.ts +0 -21
  163. package/dist/esm/src/features/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +0 -9
  164. package/dist/esm/src/features/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +0 -14
  165. package/dist/esm/src/graphql/QuoteRequests.d.ts +0 -6
  166. package/dist/esm/src/graphql/SubscriptionRequests.d.ts +0 -2
  167. package/dist/esm/src/graphql/queries/getFormattedInvoice.d.ts +0 -7
  168. package/dist/esm/src/hooks/useCurrentUserData.d.ts +0 -2
  169. package/dist/esm/src/hooks/useIsMobile.d.ts +0 -10
  170. package/dist/esm/src/utils.d.ts +0 -9
@@ -1,7 +1,7 @@
1
1
  import { Quote } from "@bunnyapp/common";
2
- declare const getQuote: ({ id, token, subdomain, }: {
2
+ declare const getQuote: ({ id, token, apiHost, }: {
3
3
  id: string;
4
4
  token: string;
5
- subdomain: string;
5
+ apiHost: string;
6
6
  }) => Promise<Quote>;
7
7
  export default getQuote;
@@ -1,6 +1,6 @@
1
- declare const getQuotes: ({ token, subdomain, filter, }: {
1
+ declare const getQuotes: ({ token, apiHost, filter, }: {
2
2
  token: string;
3
- subdomain: string;
3
+ apiHost: string;
4
4
  filter?: string | undefined;
5
5
  }) => Promise<any>;
6
6
  export default getQuotes;
@@ -4,9 +4,9 @@ interface SubscriptionExtended extends Subscription {
4
4
  id?: string;
5
5
  }[];
6
6
  }
7
- declare const getSubscription: ({ token, id, subdomain, }: {
7
+ declare const getSubscription: ({ token, id, apiHost, }: {
8
8
  token: string;
9
9
  id: string;
10
- subdomain?: string | undefined;
10
+ apiHost: string;
11
11
  }) => Promise<SubscriptionExtended>;
12
12
  export default getSubscription;
@@ -1,7 +1,7 @@
1
- declare const getSubscriptions: ({ entityId, isInPreviewMode, token, subdomain, }: {
1
+ declare const getSubscriptions: ({ entityId, isInPreviewMode, token, apiHost, }: {
2
2
  entityId: string;
3
3
  isInPreviewMode?: boolean | undefined;
4
4
  token: string;
5
- subdomain: string;
5
+ apiHost: string;
6
6
  }) => Promise<any>;
7
7
  export default getSubscriptions;
@@ -0,0 +1,6 @@
1
+ import { TaxationRequiredAccountFields } from "@bunnyapp/common";
2
+ declare const getTaxationRequiredAccountFields: ({ token, apiHost, }: {
3
+ token: string;
4
+ apiHost: string;
5
+ }) => Promise<TaxationRequiredAccountFields | null>;
6
+ export default getTaxationRequiredAccountFields;
@@ -1,3 +1,3 @@
1
1
  import { TransactionKind } from "@bunnyapp/common";
2
- declare const getTransactions: (filter: string, token: string, subdomain: string, kindsToShow: TransactionKind[]) => Promise<any>;
2
+ declare const getTransactions: (filter: string, token: string, apiHost: string, kindsToShow: TransactionKind[]) => Promise<any>;
3
3
  export default getTransactions;
@@ -1,5 +1,11 @@
1
1
  /// <reference types="react" />
2
- declare const useSendAcceptQuote: (token: string, subdomain?: string, quoteId?: string) => {
2
+ declare const useSendAcceptQuote: ({ entityId, onErrorNavigate, quoteId, apiHost, token, }: {
3
+ entityId: string;
4
+ onErrorNavigate: (url: string) => void;
5
+ quoteId?: string | undefined;
6
+ apiHost: string;
7
+ token: string;
8
+ }) => {
3
9
  acceptBoxVisible: boolean;
4
10
  isAccepting: boolean;
5
11
  sendAccept: (changedFormItems: {
@@ -1,5 +1,6 @@
1
- declare const useHasTaxPlugin: ({ subdomain, token, }: {
2
- subdomain?: string | undefined;
1
+ declare const useHasTaxPlugin: ({ entityId, apiHost, token, }: {
2
+ entityId: string;
3
+ apiHost: string;
3
4
  token: string;
4
5
  }) => boolean;
5
6
  export default useHasTaxPlugin;
@@ -0,0 +1,11 @@
1
+ import { PluginData } from "@bunnyapp/common";
2
+ export declare const usePaymentPlugins: ({ entityId, apiHost, token, }: {
3
+ entityId: string;
4
+ apiHost: string;
5
+ token: string;
6
+ }) => {
7
+ paymentPlugins: PluginData[] | undefined;
8
+ paymentMethodAllowedPlugins: PluginData[] | undefined;
9
+ isFetched: boolean;
10
+ };
11
+ export default usePaymentPlugins;
@@ -0,0 +1,6 @@
1
+ declare const usePlugins: ({ entityId, apiHost, token, }: {
2
+ entityId: string;
3
+ apiHost: string;
4
+ token: string;
5
+ }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<any, Error>;
6
+ export default usePlugins;
@@ -1,2 +1,6 @@
1
1
  import { PluginData } from "@bunnyapp/common";
2
- export declare const useSigningPlugins: (token: string, subdomain?: string) => PluginData[] | undefined;
2
+ export declare const useSigningPlugins: ({ entityId, apiHost, token, }: {
3
+ entityId: string;
4
+ apiHost: string;
5
+ token: string;
6
+ }) => PluginData[] | undefined;
@@ -1,2 +1,3 @@
1
+ import "./styles/output.css";
1
2
  export * from "./components";
2
3
  export * from "./hooks";
@@ -0,0 +1,2 @@
1
+ import { GraphQLClient } from "graphql-request";
2
+ export declare const createGraphQLClient: (token: string, apiHost: string) => GraphQLClient;
@@ -0,0 +1,6 @@
1
+ import { DOCUMENT_NAME } from "@bunnyapp/common";
2
+ export declare const quoteMetaDescription: (vendorName: string) => string;
3
+ export declare const quoteMetaTitle: ({ documentName, vendorName, }: {
4
+ documentName: DOCUMENT_NAME;
5
+ vendorName: string;
6
+ }) => string;