@bunnyapp/components 1.8.1 → 1.8.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.
- package/README.md +51 -0
- package/dist/cjs/index.js +147 -30182
- package/dist/cjs/types/src/ajax.d.ts +1 -1
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
- package/dist/cjs/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
- package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
- package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +6 -6
- package/dist/cjs/types/src/components/DocumentTemplatePreview.d.ts +5 -1
- package/dist/cjs/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
- package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/MiniCreditCard.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +37 -18
- package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +4 -0
- package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +11 -0
- package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +6 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -0
- package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/constants.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +62 -37
- package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
- package/dist/cjs/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
- package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
- package/dist/cjs/types/src/components/Quote/Quote.d.ts +28 -1
- package/dist/cjs/types/src/components/Quote/Quote.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
- package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +18 -4
- package/dist/cjs/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
- package/dist/{esm/types/src/components/Quote/hooks/useSendAcceptQuote.d.ts → cjs/types/src/components/Quote/hooks/useAcceptQuote.d.ts} +16 -8
- package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
- package/dist/cjs/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
- package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +38 -0
- package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +2 -8
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +3 -3
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -5
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +41 -36
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +3 -19
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +18 -30
- package/dist/cjs/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +26 -24
- package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +1 -2
- package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +30 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
- package/dist/cjs/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/components/Logo.d.ts +2 -0
- package/dist/{esm/types/src/components/Signup → cjs/types/src/components/Signup/components}/PriceListDisplay.d.ts +11 -1
- package/dist/cjs/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
- package/dist/cjs/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
- package/dist/cjs/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/consts.d.ts +1 -0
- package/dist/cjs/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -3
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +15 -1
- package/dist/cjs/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +29 -0
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +12 -0
- package/dist/cjs/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
- package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
- package/dist/cjs/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
- package/dist/cjs/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
- package/dist/cjs/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
- package/dist/cjs/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
- package/dist/cjs/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/queries/{getQuote.d.ts → getSignupQuote.d.ts} +2 -2
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +1 -13
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -14
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlans_PlanFragment.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +7 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +1 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
- package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +9 -1
- package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
- package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +3 -11
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
- package/dist/cjs/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +0 -2
- package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +1 -3
- package/dist/cjs/types/src/graphql/mutations/checkout.d.ts +24 -14
- package/dist/cjs/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
- package/dist/cjs/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
- package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +2 -1
- package/dist/cjs/types/src/hooks/useIsExpired.d.ts +2 -1
- package/dist/cjs/types/src/hooks/useIsVisible.d.ts +4 -0
- package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +4 -0
- package/dist/cjs/types/src/hooks/usePaymentPlugins.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useUpdateCoupons.d.ts +8 -2
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +17 -4
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +1 -0
- package/dist/cjs/types/src/utils/couponUtils.d.ts +6 -6
- package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/esm/index.js +147 -30169
- package/dist/esm/types/src/ajax.d.ts +1 -1
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
- package/dist/esm/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
- package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
- package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +6 -6
- package/dist/esm/types/src/components/DocumentTemplatePreview.d.ts +5 -1
- package/dist/esm/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
- package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/MiniCreditCard.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +37 -18
- package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +4 -0
- package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +11 -0
- package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +6 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -0
- package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/constants.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
- package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
- package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +62 -37
- package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
- package/dist/esm/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
- package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
- package/dist/esm/types/src/components/Quote/Quote.d.ts +28 -1
- package/dist/esm/types/src/components/Quote/Quote.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
- package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +18 -4
- package/dist/esm/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
- package/dist/{cjs/types/src/components/Quote/hooks/useSendAcceptQuote.d.ts → esm/types/src/components/Quote/hooks/useAcceptQuote.d.ts} +16 -8
- package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
- package/dist/esm/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
- package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +38 -0
- package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +2 -8
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +3 -3
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -5
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +41 -36
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +3 -19
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +18 -30
- package/dist/esm/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/Signup.d.ts +26 -24
- package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +1 -2
- package/dist/esm/types/src/components/Signup/SignupContent.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +30 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
- package/dist/esm/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/components/Logo.d.ts +2 -0
- package/dist/{cjs/types/src/components/Signup → esm/types/src/components/Signup/components}/PriceListDisplay.d.ts +11 -1
- package/dist/esm/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
- package/dist/esm/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
- package/dist/esm/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/consts.d.ts +1 -0
- package/dist/esm/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -3
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +15 -1
- package/dist/esm/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +29 -0
- package/dist/esm/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +12 -0
- package/dist/esm/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
- package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
- package/dist/esm/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
- package/dist/esm/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
- package/dist/esm/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
- package/dist/esm/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
- package/dist/esm/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/queries/{getQuote.d.ts → getSignupQuote.d.ts} +2 -2
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +1 -13
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -14
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlans_PlanFragment.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +7 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +1 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
- package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +9 -1
- package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
- package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +3 -11
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
- package/dist/esm/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
- package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +0 -2
- package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +1 -3
- package/dist/esm/types/src/graphql/mutations/checkout.d.ts +24 -14
- package/dist/esm/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
- package/dist/esm/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
- package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
- package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +2 -1
- package/dist/esm/types/src/hooks/useIsExpired.d.ts +2 -1
- package/dist/esm/types/src/hooks/useIsVisible.d.ts +4 -0
- package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +4 -0
- package/dist/esm/types/src/hooks/usePaymentPlugins.d.ts +1 -1
- package/dist/esm/types/src/hooks/useUpdateCoupons.d.ts +8 -2
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +17 -4
- package/dist/esm/types/src/utils/chargeUtils.d.ts +1 -0
- package/dist/esm/types/src/utils/couponUtils.d.ts +6 -6
- package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/index.d.ts +139 -48
- package/package.json +24 -17
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
- package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -41
- package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
- package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +0 -50
- package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +0 -39
- package/dist/cjs/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
- package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
- package/dist/cjs/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
- package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -41
- package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
- package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +0 -50
- package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +0 -39
- package/dist/esm/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
- package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
- package/dist/esm/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
- /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
- /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const canApplyCoupons_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
3
|
id: string | null;
|
|
4
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
4
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
5
5
|
amountDue: number | null;
|
|
6
6
|
}, {}, {
|
|
7
|
-
fragment: "
|
|
7
|
+
fragment: "canApplyCoupons_QuoteFragment";
|
|
8
8
|
on: "Quote";
|
|
9
9
|
masked: true;
|
|
10
10
|
}>;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const canApplyCoupons_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
12
12
|
id: string;
|
|
13
13
|
state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
|
|
14
14
|
charges: {
|
|
15
15
|
discountedPrice: string | null;
|
|
16
16
|
}[] | null;
|
|
17
17
|
}, {}, {
|
|
18
|
-
fragment: "
|
|
18
|
+
fragment: "canApplyCoupons_SubscriptionFragment";
|
|
19
19
|
on: "Subscription";
|
|
20
20
|
masked: true;
|
|
21
21
|
}>;
|
|
22
|
-
export declare function
|
|
22
|
+
export declare function canApplyCoupons(maskedQuote: FragmentOf<typeof canApplyCoupons_QuoteFragment> | undefined | null, activeCouponsExist: boolean, maskedUpgradingSubscription?: FragmentOf<typeof canApplyCoupons_SubscriptionFragment>): boolean;
|
|
@@ -21,4 +21,4 @@ export declare const isAddonPurchased_SubscriptionChargeFragment: import("gql.ta
|
|
|
21
21
|
on: "Subscription";
|
|
22
22
|
masked: true;
|
|
23
23
|
}>;
|
|
24
|
-
export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment>): boolean;
|
|
24
|
+
export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment> | undefined): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as gql_tada from 'gql.tada';
|
|
3
|
+
import { ResultOf, FragmentOf } from 'gql.tada';
|
|
2
4
|
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
3
|
-
import { FormattedQuote } from '@/types/FormattedQuote';
|
|
4
5
|
import { Transaction, TransactionKind } from '@/types/Transaction';
|
|
5
|
-
import
|
|
6
|
-
import { FragmentOf, ResultOf } from 'gql.tada';
|
|
7
|
-
import Invoice$1 from '@/types/Invoice';
|
|
6
|
+
import react, { ReactNode, ComponentProps } from 'react';
|
|
8
7
|
import { QueryClient } from '@tanstack/react-query';
|
|
9
8
|
import { ThemeConfig } from 'antd';
|
|
10
|
-
import react from 'react';
|
|
11
9
|
|
|
12
10
|
type ShadowType = "shadow-none" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl";
|
|
13
11
|
|
|
14
12
|
type InvoiceQuoteContextProps = {
|
|
15
|
-
id?: string;
|
|
13
|
+
id?: string | null | undefined;
|
|
16
14
|
invoiceQuoteViewComponent?: React.ReactNode;
|
|
17
15
|
backButtonName?: string;
|
|
18
16
|
onBackButtonClick?: () => void;
|
|
@@ -22,7 +20,6 @@ type InvoiceQuoteContextProps = {
|
|
|
22
20
|
className?: string;
|
|
23
21
|
hideDownloadButton?: boolean;
|
|
24
22
|
onInvoiceLoaded?: (formattedInvoice: FormattedInvoice) => void;
|
|
25
|
-
onQuoteLoaded?: (formattedQuote: FormattedQuote) => void;
|
|
26
23
|
onQuoteUnavailableError?: () => void;
|
|
27
24
|
suppressQuoteUnavailableErrorNotification?: boolean;
|
|
28
25
|
};
|
|
@@ -41,10 +38,21 @@ declare global {
|
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
|
|
41
|
+
declare const OnQuoteLoadedFragment: gql_tada.TadaDocumentNode<{
|
|
42
|
+
vendorName: string | null;
|
|
43
|
+
quote: {
|
|
44
|
+
id: string | null;
|
|
45
|
+
};
|
|
46
|
+
}, {}, {
|
|
47
|
+
fragment: "OnQuoteLoadedFragment";
|
|
48
|
+
on: "FormattedQuote";
|
|
49
|
+
masked: true;
|
|
50
|
+
}>;
|
|
44
51
|
type QuoteProps = InvoiceQuoteContextProps & {
|
|
45
52
|
onQuoteAccepted?: () => void;
|
|
46
53
|
onQuoteUnavailableError?: () => void;
|
|
47
54
|
suppressQuoteUnavailableErrorNotification?: boolean;
|
|
55
|
+
onQuoteLoaded?: (formattedQuote: ResultOf<typeof OnQuoteLoadedFragment>) => void;
|
|
48
56
|
};
|
|
49
57
|
declare function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): react_jsx_runtime.JSX.Element;
|
|
50
58
|
|
|
@@ -85,6 +93,48 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
|
|
|
85
93
|
noQuotesMessage?: string;
|
|
86
94
|
}): react_jsx_runtime.JSX.Element;
|
|
87
95
|
|
|
96
|
+
type Props = {
|
|
97
|
+
className?: string;
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
onClickPrecondition?: () => Promise<boolean>;
|
|
100
|
+
buttonTextOverride?: {
|
|
101
|
+
text: string;
|
|
102
|
+
isProcessingText: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
declare function CheckoutNoPayment(props?: Props): react_jsx_runtime.JSX.Element;
|
|
106
|
+
|
|
107
|
+
type PayProps = {
|
|
108
|
+
disabled?: boolean;
|
|
109
|
+
onClickPrecondition?: () => boolean | Promise<boolean>;
|
|
110
|
+
};
|
|
111
|
+
declare function Pay(props?: PayProps): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
113
|
+
declare function Cancel(): react_jsx_runtime.JSX.Element;
|
|
114
|
+
|
|
115
|
+
type SaveButtonTextOverride = {
|
|
116
|
+
text: string;
|
|
117
|
+
isProcessingText: string;
|
|
118
|
+
};
|
|
119
|
+
declare function Save({ onClickPrecondition, buttonTextOverride, }: {
|
|
120
|
+
onClickPrecondition?: () => boolean | Promise<boolean>;
|
|
121
|
+
buttonTextOverride?: SaveButtonTextOverride;
|
|
122
|
+
}): react_jsx_runtime.JSX.Element;
|
|
123
|
+
|
|
124
|
+
type PaymentMethodDetailsProps = {
|
|
125
|
+
footer?: ReactNode;
|
|
126
|
+
};
|
|
127
|
+
declare function PaymentMethodDetailsRoot(props?: PaymentMethodDetailsProps): react_jsx_runtime.JSX.Element;
|
|
128
|
+
declare const PaymentMethodDetails: typeof PaymentMethodDetailsRoot & {
|
|
129
|
+
Cancel: typeof Cancel;
|
|
130
|
+
Save: typeof Save;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
type StoredPaymentMethodsProps = {
|
|
134
|
+
className?: string;
|
|
135
|
+
};
|
|
136
|
+
declare function StoredPaymentMethods(props?: StoredPaymentMethodsProps): react_jsx_runtime.JSX.Element;
|
|
137
|
+
|
|
88
138
|
declare const PaymentForm_PaymentMethodsFragment: gql_tada.TadaDocumentNode<{
|
|
89
139
|
[$tada.fragmentRefs]: {
|
|
90
140
|
MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
|
|
@@ -99,7 +149,6 @@ declare const PaymentForm_PaymentMethodsFragment: gql_tada.TadaDocumentNode<{
|
|
|
99
149
|
masked: true;
|
|
100
150
|
}>;
|
|
101
151
|
|
|
102
|
-
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
103
152
|
declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
|
|
104
153
|
id: string | null;
|
|
105
154
|
currencyId: string;
|
|
@@ -111,57 +160,98 @@ declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
|
|
|
111
160
|
on: "Quote";
|
|
112
161
|
masked: true;
|
|
113
162
|
}>;
|
|
114
|
-
|
|
163
|
+
|
|
164
|
+
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
165
|
+
declare const PaymentForm_InvoiceFragment: gql_tada.TadaDocumentNode<{
|
|
166
|
+
id: string | null;
|
|
167
|
+
currencyId: string;
|
|
168
|
+
[$tada.fragmentRefs]: {
|
|
169
|
+
PaymentProvider_InvoiceFragment: "Invoice";
|
|
170
|
+
};
|
|
171
|
+
}, {}, {
|
|
172
|
+
fragment: "PaymentForm_InvoiceFragment";
|
|
173
|
+
on: "Invoice";
|
|
174
|
+
masked: true;
|
|
175
|
+
}>;
|
|
176
|
+
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, checkoutPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
|
|
115
177
|
currencyId?: string;
|
|
116
|
-
invoice?:
|
|
178
|
+
invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
|
|
117
179
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
180
|
+
paymentHold?: {
|
|
181
|
+
quoteId: string;
|
|
182
|
+
amountToHold: number;
|
|
183
|
+
};
|
|
118
184
|
onPaymentSuccess?: (response: any) => void;
|
|
119
185
|
onPaymentHoldSuccess?: (response: any) => void;
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
*/
|
|
123
|
-
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
186
|
+
/** Precondition that must pass before checking out free/trial/paid/payment-hold quotes. */
|
|
187
|
+
checkoutPrecondition?: () => boolean | Promise<boolean>;
|
|
124
188
|
onSavePaymentMethod?: (response: any) => void;
|
|
125
189
|
onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
|
|
126
190
|
onSetDefaultPaymentMethod?: () => void;
|
|
127
191
|
accountId?: string;
|
|
128
|
-
overrideToken?: string;
|
|
129
192
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
130
|
-
|
|
131
|
-
payToAccept?: boolean;
|
|
132
|
-
amountToHold?: number;
|
|
133
|
-
};
|
|
134
|
-
disablePayButton?: boolean;
|
|
193
|
+
children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
|
|
135
194
|
}): react_jsx_runtime.JSX.Element | null;
|
|
195
|
+
type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
|
|
196
|
+
type PaymentFormRenderState = {
|
|
197
|
+
hasPaymentMethods: boolean;
|
|
198
|
+
isPaymentMethodDetailsOpen: boolean;
|
|
199
|
+
isPayableAvailable: boolean;
|
|
200
|
+
amountDue: number | undefined;
|
|
201
|
+
paymentPluginsCount: number | undefined;
|
|
202
|
+
};
|
|
203
|
+
declare function PaymentFormInternal(props: PaymentFormProps & {
|
|
204
|
+
disablePayButton?: boolean;
|
|
205
|
+
}): react_jsx_runtime.JSX.Element;
|
|
206
|
+
declare const PaymentForm: typeof PaymentFormInternal & {
|
|
207
|
+
StoredPaymentMethods: typeof StoredPaymentMethods;
|
|
208
|
+
Pay: typeof Pay;
|
|
209
|
+
CheckoutNoPayment: typeof CheckoutNoPayment;
|
|
210
|
+
PaymentMethodDetails: typeof PaymentMethodDetails;
|
|
211
|
+
};
|
|
136
212
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
213
|
+
type DefaultSignupValues = {
|
|
214
|
+
firstName?: string;
|
|
215
|
+
lastName?: string;
|
|
216
|
+
email?: string;
|
|
217
|
+
accountName?: string;
|
|
218
|
+
billingCountry?: string;
|
|
219
|
+
billingState?: string;
|
|
220
|
+
billingCity?: string;
|
|
221
|
+
billingZip?: string;
|
|
222
|
+
billingStreet?: string;
|
|
223
|
+
taxNumber?: string;
|
|
224
|
+
};
|
|
225
|
+
/** Extra account billing fields (shown in “Account billing details”) when the flag is true. */
|
|
226
|
+
type RequiredBillingDetailsFlags = {
|
|
227
|
+
billingCountry?: boolean;
|
|
228
|
+
billingState?: boolean;
|
|
229
|
+
billingCity?: boolean;
|
|
230
|
+
billingZip?: boolean;
|
|
231
|
+
billingStreet?: boolean;
|
|
232
|
+
taxNumber?: boolean;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
type SignupProps = {
|
|
141
236
|
priceListCode: string;
|
|
142
|
-
/**
|
|
143
|
-
|
|
144
|
-
/** An optional coupon code that gets applied automatically */
|
|
145
|
-
couponCode?: string;
|
|
146
|
-
/** A custom class name to apply to the component */
|
|
147
|
-
className?: string;
|
|
148
|
-
/** The shadow level to apply to the component */
|
|
149
|
-
shadow?: ShadowType;
|
|
237
|
+
/** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
|
|
238
|
+
enableTrial?: boolean;
|
|
150
239
|
/** A custom style to apply to the component */
|
|
151
240
|
style?: React.CSSProperties;
|
|
152
|
-
/** The default
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
|
|
156
|
-
/** The
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
|
|
162
|
-
}
|
|
241
|
+
/** The default form values to use for the signup */
|
|
242
|
+
defaultFormValues?: DefaultSignupValues;
|
|
243
|
+
/** Whether to require quote acceptance before checking out */
|
|
244
|
+
paymentRequiredToAcceptQuote?: boolean;
|
|
245
|
+
/** The document template ID to apply to the quote for the signup */
|
|
246
|
+
documentTemplateId?: string;
|
|
247
|
+
/** Which account billing fields to show and require */
|
|
248
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
249
|
+
/** A default coupon code to pre-apply to the checkout */
|
|
250
|
+
defaultCouponCode?: string;
|
|
251
|
+
};
|
|
252
|
+
declare function Signup({ priceListCode, enableTrial, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, defaultCouponCode, }: SignupProps): react_jsx_runtime.JSX.Element;
|
|
163
253
|
|
|
164
|
-
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
|
|
254
|
+
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications, configProviderProps, }: {
|
|
165
255
|
children: React.ReactNode;
|
|
166
256
|
darkMode?: boolean;
|
|
167
257
|
queryClient?: QueryClient;
|
|
@@ -171,6 +261,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
|
|
|
171
261
|
onUserUnavailable?: () => void;
|
|
172
262
|
onInvalidOrMissingAuthorization?: () => void;
|
|
173
263
|
suppressUserUnavailableErrorNotification?: boolean;
|
|
264
|
+
disableErrorNotifications?: boolean;
|
|
174
265
|
configProviderProps?: ThemeConfig | undefined;
|
|
175
266
|
}): react_jsx_runtime.JSX.Element;
|
|
176
267
|
|
|
@@ -257,17 +348,15 @@ declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, onPayme
|
|
|
257
348
|
defaultBillingPeriod?: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL";
|
|
258
349
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
259
350
|
|
|
260
|
-
declare const BillingDetails: ({
|
|
261
|
-
className?: string;
|
|
351
|
+
declare const BillingDetails: ({ countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isUpgradeFromTrial, style, onSavePaymentMethod, onPaymentMethodRemoved, }: {
|
|
262
352
|
countryListFilter?: (country: {
|
|
263
353
|
value: string;
|
|
264
354
|
label: string;
|
|
265
355
|
}) => boolean;
|
|
266
356
|
hideBillingDetailsForm?: boolean;
|
|
267
357
|
hidePaymentMethodForm?: boolean;
|
|
268
|
-
isCardEnabled?: boolean;
|
|
269
358
|
isUpgradeFromTrial?: boolean;
|
|
270
|
-
|
|
359
|
+
style?: React.CSSProperties;
|
|
271
360
|
onSavePaymentMethod?: (paymentMethodId: string) => void;
|
|
272
361
|
onPaymentMethodRemoved?: (paymentMethodId: string) => void;
|
|
273
362
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -286,6 +375,8 @@ declare const MiniCreditCard_PaymentMethodFragment: gql_tada.TadaDocumentNode<{
|
|
|
286
375
|
type: string | null;
|
|
287
376
|
identifier: string | null;
|
|
288
377
|
} | null;
|
|
378
|
+
state: "FAILED" | "UNKNOWN" | "SUCCESS" | null;
|
|
379
|
+
failureReason: string | null;
|
|
289
380
|
id: string;
|
|
290
381
|
}, {}, {
|
|
291
382
|
fragment: "MiniCreditCard_PaymentMethodFragment";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunnyapp/components",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"types": "dist/index.d.ts",
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "npm run clean && rollup -c",
|
|
13
|
+
"build": "npm run clean && NODE_ENV=production rollup -c",
|
|
14
14
|
"build-dev": "npm run clean && rollup -c -w",
|
|
15
|
+
"analyze": "npm run clean && NODE_ENV=production ANALYZE=true rollup -c",
|
|
16
|
+
"analyze-storybook": "ANALYZE=true storybook build",
|
|
15
17
|
"build-storybook": "storybook build",
|
|
16
18
|
"clean": "rimraf dist",
|
|
17
19
|
"storybook": "storybook dev -p 6006",
|
|
@@ -27,23 +29,21 @@
|
|
|
27
29
|
"author": "Bunny",
|
|
28
30
|
"license": "ISC",
|
|
29
31
|
"devDependencies": {
|
|
30
|
-
"@chromatic-com/storybook": "^
|
|
32
|
+
"@chromatic-com/storybook": "^5.2.1",
|
|
33
|
+
"@fontsource-variable/inter": "^5.2.8",
|
|
31
34
|
"@parcel/watcher": "^2.5.1",
|
|
32
35
|
"@rollup/plugin-commonjs": "^28.0.8",
|
|
33
36
|
"@rollup/plugin-json": "^6.1.0",
|
|
34
37
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
35
38
|
"@rollup/plugin-replace": "^6.0.2",
|
|
36
|
-
"@rollup/plugin-terser": "^0.
|
|
39
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
37
40
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
38
|
-
"@storybook/addon-
|
|
39
|
-
"@storybook/addon-
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/react": "^8.6.14",
|
|
43
|
-
"@storybook/react-vite": "^8.6.14",
|
|
44
|
-
"@storybook/test": "^8.6.14",
|
|
41
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
42
|
+
"@storybook/addon-onboarding": "^10.4.0",
|
|
43
|
+
"@storybook/react": "^10.4.0",
|
|
44
|
+
"@storybook/react-vite": "^10.4.0",
|
|
45
45
|
"@tanstack/eslint-plugin-query": "^5.91.2",
|
|
46
|
-
"@tanstack/react-query-devtools": "
|
|
46
|
+
"@tanstack/react-query-devtools": "5.75.4",
|
|
47
47
|
"@types/lodash": "^4.17.20",
|
|
48
48
|
"@types/lodash-es": "^4.17.12",
|
|
49
49
|
"@types/node": "^24.10.0",
|
|
@@ -53,22 +53,25 @@
|
|
|
53
53
|
"@vitejs/plugin-react": "^4.7.0",
|
|
54
54
|
"autoprefixer": "^10.4.21",
|
|
55
55
|
"dependency-cruiser": "^16.10.4",
|
|
56
|
-
"eslint-plugin-storybook": "^
|
|
56
|
+
"eslint-plugin-storybook": "^10.4.0",
|
|
57
57
|
"glob": "^11.0.3",
|
|
58
58
|
"gql.tada": "^1.9.0",
|
|
59
59
|
"less": "^4.4.2",
|
|
60
60
|
"msw": "^2.11.6",
|
|
61
61
|
"patch-package": "^8.0.1",
|
|
62
|
+
"postcss-import": "^16.1.1",
|
|
62
63
|
"postcss-less": "^6.0.0",
|
|
64
|
+
"postcss-url": "^10.1.3",
|
|
65
|
+
"rimraf": "^6.1.2",
|
|
63
66
|
"rollup": "^3.29.5",
|
|
64
67
|
"rollup-plugin-dts": "^6.2.3",
|
|
65
68
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
66
69
|
"rollup-plugin-postcss": "^4.0.2",
|
|
67
|
-
"
|
|
70
|
+
"rollup-plugin-visualizer": "^7.0.1",
|
|
71
|
+
"storybook": "^10.4.0",
|
|
68
72
|
"tailwindcss": "^3.4.18",
|
|
69
73
|
"typescript": "^5.9.3",
|
|
70
|
-
"vite": "^6.4.1"
|
|
71
|
-
"rimraf": "^6.1.2"
|
|
74
|
+
"vite": "^6.4.1"
|
|
72
75
|
},
|
|
73
76
|
"peerDependencies": {
|
|
74
77
|
"@ant-design/icons": "^6.0.0",
|
|
@@ -78,9 +81,10 @@
|
|
|
78
81
|
"@fortawesome/free-solid-svg-icons": "^7.0.0",
|
|
79
82
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
80
83
|
"@pdf-viewer/react": "^1.8.0",
|
|
84
|
+
"@sentry/react": "^10.53.1",
|
|
81
85
|
"@stripe/react-stripe-js": "^3.8.1",
|
|
82
86
|
"@stripe/stripe-js": "^7.7.0",
|
|
83
|
-
"@tanstack/react-query": "
|
|
87
|
+
"@tanstack/react-query": "5.75.4",
|
|
84
88
|
"antd": "^5.28.0",
|
|
85
89
|
"graphql": "^16.11.0",
|
|
86
90
|
"graphql-request": "^6.1.0",
|
|
@@ -101,5 +105,8 @@
|
|
|
101
105
|
},
|
|
102
106
|
"dependencies": {
|
|
103
107
|
"msw-storybook-addon": "^2.0.6"
|
|
108
|
+
},
|
|
109
|
+
"overrides": {
|
|
110
|
+
"minimatch": "^9.0.0"
|
|
104
111
|
}
|
|
105
112
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, }: {
|
|
4
|
-
html: string | null;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
formattedInvoice?: FormattedInvoice;
|
|
7
|
-
backButtonName?: string;
|
|
8
|
-
onBackButtonClick?: () => void;
|
|
9
|
-
onDownloadError?: () => void;
|
|
10
|
-
targetUrl?: string;
|
|
11
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default InvoiceQuoteView;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import Invoice from '@/types/Invoice';
|
|
3
|
-
import { PluginData } from '@/types/frontendTypes';
|
|
4
|
-
import { FragmentOf } from 'gql.tada';
|
|
5
|
-
import { PaymentType } from '../types/PaymentType';
|
|
6
|
-
export declare const useHandlePayment_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
7
|
-
id: string | null;
|
|
8
|
-
amount: number;
|
|
9
|
-
currencyId: string;
|
|
10
|
-
[$tada.fragmentRefs]: {
|
|
11
|
-
getQuoteAmountDue_QuoteFragment: "Quote";
|
|
12
|
-
};
|
|
13
|
-
}, {}, {
|
|
14
|
-
fragment: "useHandlePayment_QuoteFragment";
|
|
15
|
-
on: "Quote";
|
|
16
|
-
masked: true;
|
|
17
|
-
}>;
|
|
18
|
-
declare const useHandlePayment: ({ quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, plugin, paymentHoldOptions, accountId, }: {
|
|
19
|
-
quote?: FragmentOf<typeof useHandlePayment_QuoteFragment>;
|
|
20
|
-
invoice?: FormattedInvoice | Invoice;
|
|
21
|
-
onPaymentSuccess?: (response: any) => void;
|
|
22
|
-
onPaymentHoldSuccess?: (response: any) => void;
|
|
23
|
-
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
24
|
-
plugin: PluginData | undefined;
|
|
25
|
-
paymentHoldOptions: {
|
|
26
|
-
payToAccept?: boolean;
|
|
27
|
-
amountToHold?: number;
|
|
28
|
-
};
|
|
29
|
-
accountId: string | undefined;
|
|
30
|
-
}) => {
|
|
31
|
-
handleApproveHold: (overridePaymentMethodId?: string) => Promise<void>;
|
|
32
|
-
handlePayment: (overridePaymentMethodId: string) => Promise<void>;
|
|
33
|
-
handleCheckoutNoPayment: import("@tanstack/react-query").UseMutateFunction<{
|
|
34
|
-
savePaymentMethod: boolean | undefined;
|
|
35
|
-
}, Error, void, unknown>;
|
|
36
|
-
isPaying: boolean;
|
|
37
|
-
isPaid: boolean;
|
|
38
|
-
paymentType: PaymentType;
|
|
39
|
-
formattedAmountDue: string | undefined;
|
|
40
|
-
};
|
|
41
|
-
export default useHandlePayment;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
export declare const CheckoutSummary_PriceListFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
-
product: {
|
|
4
|
-
name: string;
|
|
5
|
-
} | null;
|
|
6
|
-
name: string;
|
|
7
|
-
}, {}, {
|
|
8
|
-
fragment: "CheckoutSummary_PriceListFragment";
|
|
9
|
-
on: "PriceList";
|
|
10
|
-
masked: true;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
13
|
-
id: string | null;
|
|
14
|
-
amountDue: number | null;
|
|
15
|
-
subtotal: number;
|
|
16
|
-
taxAmount: number;
|
|
17
|
-
currencyId: string;
|
|
18
|
-
quoteChanges: {
|
|
19
|
-
charges: {
|
|
20
|
-
id: string | null;
|
|
21
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
22
|
-
name: string | null;
|
|
23
|
-
coupon: {
|
|
24
|
-
couponCode: string;
|
|
25
|
-
} | null;
|
|
26
|
-
quantity: number | null;
|
|
27
|
-
subtotal: number | null;
|
|
28
|
-
currencyId: string;
|
|
29
|
-
}[];
|
|
30
|
-
}[] | null;
|
|
31
|
-
[$tada.fragmentRefs]: {
|
|
32
|
-
shouldShowCouponEditor_QuoteFragment: "Quote";
|
|
33
|
-
};
|
|
34
|
-
}, {}, {
|
|
35
|
-
fragment: "CheckoutSummary_QuoteFragment";
|
|
36
|
-
on: "Quote";
|
|
37
|
-
masked: true;
|
|
38
|
-
}>;
|
|
39
|
-
export default function CheckoutSummary({ quote: maskedQuote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceList: maskedPriceList, isAddingCoupon, couponCode, setCouponCode, activeCouponsExist, }: {
|
|
40
|
-
quote: FragmentOf<typeof CheckoutSummary_QuoteFragment>;
|
|
41
|
-
className?: string;
|
|
42
|
-
onAddCoupon: (couponCode: string) => void;
|
|
43
|
-
onRemoveCoupon: (couponCode: string) => void;
|
|
44
|
-
isRemovingCoupon: boolean;
|
|
45
|
-
priceList: FragmentOf<typeof CheckoutSummary_PriceListFragment> | undefined | null;
|
|
46
|
-
isAddingCoupon: boolean;
|
|
47
|
-
couponCode: string;
|
|
48
|
-
setCouponCode: (couponCode: string) => void;
|
|
49
|
-
activeCouponsExist: boolean;
|
|
50
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
export declare const PaymentForms_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
-
[$tada.fragmentRefs]: {
|
|
4
|
-
PaymentForm_QuoteFragment: "Quote";
|
|
5
|
-
};
|
|
6
|
-
}, {}, {
|
|
7
|
-
fragment: "PaymentForms_QuoteFragment";
|
|
8
|
-
on: "Quote";
|
|
9
|
-
masked: true;
|
|
10
|
-
}>;
|
|
11
|
-
export default function PaymentForms({ quote: maskedQuote, handlePaymentSuccess, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, defaultValues, }: {
|
|
12
|
-
quote?: FragmentOf<typeof PaymentForms_QuoteFragment> | null;
|
|
13
|
-
handlePaymentSuccess: () => void;
|
|
14
|
-
handleSubmit: (formData: FormData) => void;
|
|
15
|
-
proceedingToPayment: boolean;
|
|
16
|
-
accountId?: string;
|
|
17
|
-
overrideToken?: string;
|
|
18
|
-
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
19
|
-
defaultValues?: DefaultSignupValues;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export type FormData = {
|
|
22
|
-
firstName: string;
|
|
23
|
-
lastName: string;
|
|
24
|
-
email: string;
|
|
25
|
-
accountName: string;
|
|
26
|
-
billingCountry: string;
|
|
27
|
-
billingState: string;
|
|
28
|
-
billingCity: string;
|
|
29
|
-
billingZip: string;
|
|
30
|
-
billingStreet: string;
|
|
31
|
-
taxNumber: string;
|
|
32
|
-
};
|
|
33
|
-
export type DefaultSignupValues = {
|
|
34
|
-
firstName?: string;
|
|
35
|
-
lastName?: string;
|
|
36
|
-
email?: string;
|
|
37
|
-
accountName?: string;
|
|
38
|
-
billingCountry?: string;
|
|
39
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default function PaymentSuccessDisplay({ amountPaid, className, companyName, returnUrl, style, currencyId, }: {
|
|
2
|
-
amountPaid: number;
|
|
3
|
-
className: string;
|
|
4
|
-
companyName: string;
|
|
5
|
-
returnUrl?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
currencyId: string;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
|
|
2
|
-
token: string;
|
|
3
|
-
apiHost: string;
|
|
4
|
-
accountId: string;
|
|
5
|
-
quoteId: string;
|
|
6
|
-
paymentToken?: string;
|
|
7
|
-
paymentMethodId?: string;
|
|
8
|
-
pluginId: string;
|
|
9
|
-
priceListCode: string;
|
|
10
|
-
}) => Promise<{
|
|
11
|
-
errors: string[] | null;
|
|
12
|
-
quote: {
|
|
13
|
-
accountId: string;
|
|
14
|
-
amount: number;
|
|
15
|
-
amountDue: number | null;
|
|
16
|
-
applicationDate: unknown;
|
|
17
|
-
applied: boolean;
|
|
18
|
-
backdatedPeriods: boolean | null;
|
|
19
|
-
backdatedQuote: boolean | null;
|
|
20
|
-
billingDay: number | null;
|
|
21
|
-
contactId: string | null;
|
|
22
|
-
createdAt: unknown;
|
|
23
|
-
credits: number | null;
|
|
24
|
-
currencyId: string;
|
|
25
|
-
dealId: string | null;
|
|
26
|
-
discount: number | null;
|
|
27
|
-
discountValue: number;
|
|
28
|
-
endDate: unknown;
|
|
29
|
-
evergreen: boolean | null;
|
|
30
|
-
expiresAt: unknown;
|
|
31
|
-
id: string | null;
|
|
32
|
-
invoiceImmediately: boolean | null;
|
|
33
|
-
invoiceImmediatelyAvailable: boolean | null;
|
|
34
|
-
invoiceUntil: unknown;
|
|
35
|
-
isPendingApprovalRequest: boolean;
|
|
36
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
37
|
-
message: string | null;
|
|
38
|
-
name: string | null;
|
|
39
|
-
netPaymentDays: number | null;
|
|
40
|
-
notes: string | null;
|
|
41
|
-
number: string | null;
|
|
42
|
-
ownerId: string | null;
|
|
43
|
-
payableId: string | null;
|
|
44
|
-
periodAmount: number | null;
|
|
45
|
-
poNumber: string | null;
|
|
46
|
-
requiresApproval: boolean;
|
|
47
|
-
smallUnitAmountDue: number | null;
|
|
48
|
-
splitInvoice: boolean | null;
|
|
49
|
-
startDate: unknown;
|
|
50
|
-
state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
|
|
51
|
-
subtotal: number;
|
|
52
|
-
taxAmount: number;
|
|
53
|
-
taxCode: string | null;
|
|
54
|
-
updatedAt: unknown;
|
|
55
|
-
uuid: string;
|
|
56
|
-
} | null;
|
|
57
|
-
} | null>;
|
|
58
|
-
export default accountSignup;
|