@bunnyapp/components 1.0.58-beta.0.5 → 1.0.60
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/dist/cjs/index.js +338 -439
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +2 -2
- package/dist/cjs/src/components/Checkout/CouponComponent.d.ts +7 -0
- package/dist/cjs/src/components/Checkout/QuoteCheckout.d.ts +2 -2
- package/dist/cjs/src/components/Invoice/Invoice.d.ts +2 -2
- package/dist/cjs/src/components/Invoice/InvoiceQuoteView.d.ts +2 -2
- package/dist/cjs/src/components/LegacyInvoicePDF.d.ts +4 -3
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/PaymentMethodSelector.d.ts +1 -1
- package/dist/cjs/src/components/Quote/Quote.stories.d.ts +5 -5
- package/dist/cjs/src/components/Signup/PriceListDisplay.d.ts +4 -3
- package/dist/cjs/src/components/Signup/Signup.d.ts +5 -5
- package/dist/cjs/src/components/Signup/Signup.stories.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardButton.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +1 -2
- package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +2 -2
- package/dist/cjs/src/components/icons/CardIcon.d.ts +1 -3
- package/dist/cjs/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/cjs/src/graphql/mutations/quoteAddCoupon.d.ts +1 -1
- package/dist/cjs/src/graphql/mutations/quoteCompose.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getBillingDetails.d.ts +2 -2
- package/dist/cjs/src/graphql/queries/getBranding.d.ts +2 -2
- package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getPlanChangeOptions.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getPriceList.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getQuote.d.ts +1 -1
- package/dist/cjs/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +1 -1
- package/dist/cjs/src/mocks/handlers.d.ts +1 -1
- package/dist/cjs/src/utils/apiUtils.d.ts +0 -8
- package/dist/esm/index.js +320 -421
- package/dist/esm/src/components/Checkout/Checkout.d.ts +2 -2
- package/dist/esm/src/components/Checkout/CouponComponent.d.ts +7 -0
- package/dist/esm/src/components/Checkout/QuoteCheckout.d.ts +2 -2
- package/dist/esm/src/components/Invoice/Invoice.d.ts +2 -2
- package/dist/esm/src/components/Invoice/InvoiceQuoteView.d.ts +2 -2
- package/dist/esm/src/components/LegacyInvoicePDF.d.ts +4 -3
- package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/PaymentMethodSelector.d.ts +1 -1
- package/dist/esm/src/components/Quote/Quote.stories.d.ts +5 -5
- package/dist/esm/src/components/Signup/PriceListDisplay.d.ts +4 -3
- package/dist/esm/src/components/Signup/Signup.d.ts +5 -5
- package/dist/esm/src/components/Signup/Signup.stories.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardButton.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/Subscriptions.d.ts +1 -2
- package/dist/esm/src/components/Subscriptions/SubscriptionsContext.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +2 -2
- package/dist/esm/src/components/icons/CardIcon.d.ts +1 -3
- package/dist/esm/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/quoteAddCoupon.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/quoteCompose.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getBillingDetails.d.ts +2 -2
- package/dist/esm/src/graphql/queries/getBranding.d.ts +2 -2
- package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getPlanChangeOptions.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getPriceList.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getQuote.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +1 -1
- package/dist/esm/src/mocks/handlers.d.ts +1 -1
- package/dist/esm/src/utils/apiUtils.d.ts +0 -8
- package/dist/index.d.ts +4 -5
- package/package.json +3 -3
- package/dist/cjs/src/components/PaymentForm/CouponEditor.d.ts +0 -8
- package/dist/esm/src/components/PaymentForm/CouponEditor.d.ts +0 -8
package/dist/cjs/index.js
CHANGED
|
@@ -73,7 +73,7 @@ function styleInject(css, ref) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
var css_248z = ".ant-popover {\n z-index: 1050;\n}\n.ant-popover-inner-content {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-width: 300px;\n}\n.ant-popover-message-title {\n padding: 0;\n text-align: center;\n font-size: 1rem;\n}\n.ant-popover-buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ant-btn-link:disabled {\n color: #717d94 !important;\n}\n.ant-btn-link:disabled:hover {\n background-color: transparent !important;\n}\n.ant-notification {\n width: min-content;\n}\n.ant-notification-topRight {\n right: 0 !important;\n left: 0 !important;\n margin-left: auto !important;\n margin-right: auto !important;\n}\n.ant-notification-notice-wrapper {\n width: 350px !important;\n overflow: hidden !important;\n}\n.ant-notification-notice {\n padding: 16px !important;\n width: 350px !important;\n display: flex !important;\n box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.08), 0px 1px 18px rgba(0, 0, 0, 0.08), 0px 3px 5px rgba(0, 0, 0, 0.16) !important;\n}\n.ant-notification-notice-description {\n padding: 0 14px 0 0 !important;\n color: #232323 !important;\n font-size: 14px !important;\n word-break: break-all !important;\n overflow-wrap: break-word !important;\n}\n.ant-notification-notice-success {\n background-color: #edfffa !important;\n}\n.ant-notification-notice-error {\n background-color: #fff8f4 !important;\n}\n.ant-notification-notice-error .ant-notification-notice-message {\n color: #ff6e1c !important;\n font-weight: 500;\n}\n.ant-notification-notice-error .ant-notification-notice-icon {\n color: #ff6e1c;\n}\n.ant-notification-notice-success .ant-notification-notice-message {\n color: #00b76a !important;\n font-weight: 500;\n}\n.ant-notification-notice-success .ant-notification-notice-icon {\n color: #00b76a !important;\n}\n.ant-notification-notice-message {\n margin-bottom: 0 !important;\n}\n.ant-notification-notice-close {\n top: 16px !important;\n right: 16px !important;\n}\n.ant-menu-submenu-popup > .ant-menu .ant-menu-item {\n display: flex !important;\n align-items: center !important;\n}\n.ant-menu-submenu::after {\n display: none !important;\n}\n:root {\n --row-background: #ffffff;\n --row-background-alternate: rgba(100, 116, 139, 0.04);\n --row-background-dark: #121212;\n --row-background-alternate-dark: #1e1e1e;\n --bunny-blue-500: #3b82f6;\n --bunny-blue-200: #bfdbfe;\n --bunny-green-600: #059669;\n --bunny-green-200: #a7f3d0;\n --bunny-red-500: #ef4444;\n --bunny-red-200: #fecaca;\n --bunny-orange-500: #f97316;\n --bunny-orange-200: #fed7aa;\n --bunny-yellow-500: #f59e0b;\n --bunny-yellow-200: #fde68a;\n --bunny-purple-500: #8b5cf6;\n --bunny-purple-200: #ddd6fe;\n --bunny-black: #000000;\n}\n.bunny-component-wrapper {\n box-sizing: border-box;\n}\n.bunny-component-wrapper * {\n box-sizing: border-box;\n}\n.hidden {\n display: none;\n}\n.bunny-show-on-hover {\n opacity: 0;\n}\n.bunny-show-on-hover-container:hover .bunny-show-on-hover {\n opacity: 1;\n}\n.has-tooltip:hover .tooltip {\n visibility: visible;\n z-index: 100;\n}\n.pdf-only {\n display: none !important;\n}\n.notes p {\n margin: 0;\n padding: 0;\n padding-bottom: 0.25rem;\n}\n.bunny-icon-path {\n transition: fill 0.3s;\n}\n.bunny-shadow-padding-x {\n padding-right: 1rem;\n padding-left: 1rem;\n}\n.bunny-shadow-padding-xb {\n padding-right: 1rem;\n padding-left: 1rem;\n padding-bottom: 0.5rem;\n}\n.content-container {\n width: 100%;\n margin: 0 auto;\n}\n@media (min-width: 1220px) {\n .content-container {\n width: 1220px !important;\n margin: 0 auto;\n }\n}\n@media (min-width: 768px) {\n .bunny-shadow-padding-x {\n padding-right: 2rem;\n padding-left: 2rem;\n }\n .bunny-shadow-padding-xb {\n padding-right: 2rem;\n padding-left: 2rem;\n padding-bottom: 0.5rem;\n }\n .sm\\:flex {\n display: flex !important;\n }\n .sm\\:hidden {\n display: none !important;\n }\n}\n.bunny-shadow,\n.bunny-shadow-md {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.bunny-fixed {\n position: fixed;\n}\n.bunny-absolute {\n position: absolute;\n}\n.bunny-relative {\n position: relative;\n}\n.bunny-sticky {\n position: sticky;\n}\n.bunny-bottom-0 {\n bottom: 0px;\n}\n.bunny-bottom-4 {\n bottom: 1rem;\n}\n.bunny-left-0 {\n left: 0px;\n}\n.bunny-right-0 {\n right: 0px;\n}\n.bunny-top-0 {\n top: 0px;\n}\n.bunny-col-span-full {\n grid-column: 1 / -1;\n}\n.bunny-m-0 {\n margin: 0px;\n}\n.bunny-mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.bunny-mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.bunny-my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.bunny-my-24 {\n margin-top: 6rem;\n margin-bottom: 6rem;\n}\n.bunny-my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.bunny-mb-2 {\n margin-bottom: 0.5rem;\n}\n.bunny-mb-4 {\n margin-bottom: 1rem;\n}\n.bunny-mb-8 {\n margin-bottom: 2rem;\n}\n.bunny-mt-2 {\n margin-top: 0.5rem;\n}\n.bunny-mt-24 {\n margin-top: 6rem;\n}\n.bunny-mt-4 {\n margin-top: 1rem;\n}\n.bunny-flex {\n display: flex;\n}\n.bunny-grid {\n display: grid;\n}\n.bunny-contents {\n display: contents;\n}\n.bunny-h-1\\/2 {\n height: 50%;\n}\n.bunny-h-5 {\n height: 1.25rem;\n}\n.bunny-h-8 {\n height: 2rem;\n}\n.bunny-h-full {\n height: 100%;\n}\n.bunny-h-screen {\n height: 100vh;\n}\n.bunny-w-1\\/2 {\n width: 50%;\n}\n.bunny-w-3\\/5 {\n width: 60%;\n}\n.bunny-w-full {\n width: 100%;\n}\n.bunny-w-screen {\n width: 100vw;\n}\n.bunny-flex-1 {\n flex: 1 1 0%;\n}\n.bunny-shrink {\n flex-shrink: 1;\n}\n.bunny-shrink-0 {\n flex-shrink: 0;\n}\n.bunny-grow {\n flex-grow: 1;\n}\n.bunny-cursor-pointer {\n cursor: pointer;\n}\n.bunny-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.bunny-flex-row {\n flex-direction: row;\n}\n.bunny-flex-col {\n flex-direction: column;\n}\n.bunny-items-start {\n align-items: flex-start;\n}\n.bunny-items-end {\n align-items: flex-end;\n}\n.bunny-items-center {\n align-items: center;\n}\n.bunny-justify-end {\n justify-content: flex-end;\n}\n.bunny-justify-center {\n justify-content: center;\n}\n.bunny-justify-between {\n justify-content: space-between;\n}\n.bunny-gap-0 {\n gap: 0px;\n}\n.bunny-gap-1 {\n gap: 0.25rem;\n}\n.bunny-gap-2 {\n gap: 0.5rem;\n}\n.bunny-gap-3 {\n gap: 0.75rem;\n}\n.bunny-gap-4 {\n gap: 1rem;\n}\n.bunny-gap-6 {\n gap: 1.5rem;\n}\n.bunny-gap-8 {\n gap: 2rem;\n}\n.bunny-space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.bunny-overflow-auto {\n overflow: auto;\n}\n.bunny-overflow-hidden {\n overflow: hidden;\n}\n.bunny-overflow-visible {\n overflow: visible;\n}\n.bunny-whitespace-nowrap {\n white-space: nowrap;\n}\n.bunny-rounded {\n border-radius: 0.25rem;\n}\n.bunny-rounded-full {\n border-radius: 9999px;\n}\n.bunny-rounded-lg {\n border-radius: 0.5rem;\n}\n.bunny-rounded-md {\n border-radius: 0.375rem;\n}\n.bunny-border {\n border-width: 1px;\n}\n.bunny-border-2 {\n border-width: 2px;\n}\n.bunny-border-solid {\n border-style: solid;\n}\n.bunny-border-none {\n border-style: none;\n}\n.bunny-border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.bunny-bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bunny-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bunny-p-0 {\n padding: 0px;\n}\n.bunny-p-1 {\n padding: 0.25rem;\n}\n.bunny-p-2 {\n padding: 0.5rem;\n}\n.bunny-p-4 {\n padding: 1rem;\n}\n.bunny-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.bunny-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.bunny-px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.bunny-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.bunny-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.bunny-py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.bunny-pb-2 {\n padding-bottom: 0.5rem;\n}\n.bunny-pb-4 {\n padding-bottom: 1rem;\n}\n.bunny-pb-6 {\n padding-bottom: 1.5rem;\n}\n.bunny-pb-8 {\n padding-bottom: 2rem;\n}\n.bunny-pl-0 {\n padding-left: 0px;\n}\n.bunny-pl-4 {\n padding-left: 1rem;\n}\n.bunny-pr-4 {\n padding-right: 1rem;\n}\n.bunny-pt-12 {\n padding-top: 3rem;\n}\n.bunny-pt-2 {\n padding-top: 0.5rem;\n}\n.bunny-pt-4 {\n padding-top: 1rem;\n}\n.bunny-pt-5 {\n padding-top: 1.25rem;\n}\n.bunny-pt-6 {\n padding-top: 1.5rem;\n}\n.bunny-pt-\\[25vh\\] {\n padding-top: 25vh;\n}\n.bunny-text-left {\n text-align: left;\n}\n.bunny-text-center {\n text-align: center;\n}\n.bunny-text-right {\n text-align: right;\n}\n.bunny-text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.bunny-text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.bunny-text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.bunny-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.bunny-text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.bunny-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.bunny-font-bold {\n font-weight: 700;\n}\n.bunny-font-medium {\n font-weight: 500;\n}\n.bunny-font-normal {\n font-weight: 400;\n}\n.bunny-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.bunny-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.bunny-underline {\n text-decoration-line: underline;\n}\n.bunny-shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.bunny-duration-300 {\n transition-duration: 300ms;\n}\n.rotate-45,\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n}\n.shadow,\n.shadow-lg,\n.shadow-md,\n.shadow-none,\n.shadow-sm,\n.shadow-xl {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.visible {\n visibility: visible;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.sticky {\n position: sticky;\n}\n.-top-0\\.5 {\n top: -0.125rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-4 {\n bottom: 1rem;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.col-span-3 {\n grid-column: span 3 / span 3;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-0 {\n margin: 0px;\n}\n.mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.mb-8 {\n margin-bottom: 2rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-8 {\n margin-right: 2rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-6 {\n margin-top: 1.5rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.flex {\n display: flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-full {\n height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-1\\/3 {\n width: 33.333333%;\n}\n.w-12 {\n width: 3rem;\n}\n.w-2\\/3 {\n width: 66.666667%;\n}\n.w-4 {\n width: 1rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-32 {\n max-width: 8rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.shrink {\n flex-shrink: 1;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.border-collapse {\n border-collapse: collapse;\n}\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-0 {\n gap: 0px;\n}\n.gap-1 {\n gap: 0.25rem;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.gap-8 {\n gap: 2rem;\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-visible {\n overflow: visible;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-sm {\n border-radius: 0.125rem;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-none {\n border-style: none;\n}\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));\n}\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));\n}\n.border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.border-slate-300 {\n --tw-border-opacity: 1;\n border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));\n}\n.border-slate-700 {\n --tw-border-opacity: 1;\n border-color: rgb(51 65 85 / var(--tw-border-opacity, 1));\n}\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\n.bg-emerald-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));\n}\n.bg-green-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1));\n}\n.bg-orange-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 215 170 / var(--tw-bg-opacity, 1));\n}\n.bg-red-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\n.bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-8 {\n padding: 2rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n.pb-8 {\n padding-bottom: 2rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-4 {\n padding-left: 1rem;\n}\n.pt-1 {\n padding-top: 0.25rem;\n}\n.pt-12 {\n padding-top: 3rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.pt-5 {\n padding-top: 1.25rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.pt-8 {\n padding-top: 2rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-right {\n text-align: right;\n}\n.align-middle {\n vertical-align: middle;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.capitalize {\n text-transform: capitalize;\n}\n.text-emerald-600 {\n --tw-text-opacity: 1;\n color: rgb(5 150 105 / var(--tw-text-opacity, 1));\n}\n.text-emerald-700 {\n --tw-text-opacity: 1;\n color: rgb(4 120 87 / var(--tw-text-opacity, 1));\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity, 1));\n}\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.text-yellow-500 {\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity, 1));\n}\n.underline {\n text-decoration-line: underline;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-300 {\n transition-duration: 300ms;\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n@media (min-width: 768px) {\n .sm\\:flex {\n display: flex;\n }\n .sm\\:hidden {\n display: none;\n }\n}\n.bunny-invoice-container {\n padding: 0;\n box-sizing: border-box !important;\n line-height: 1.15;\n}\n@media only screen and (max-width: 768px) {\n select,\n textarea,\n input[type='text'],\n input[type='password'],\n input[type='datetime'],\n input[type='datetime-local'],\n input[type='date'],\n input[type='month'],\n input[type='time'],\n input[type='week'],\n input[type='number'],\n input[type='email'],\n input[type='url'],\n input[type='search'],\n input[type='tel'],\n input[type='color'] {\n font-size: 16px !important;\n }\n}\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
|
|
76
|
+
var css_248z = ".ant-popover {\n z-index: 1050;\n}\n.ant-popover-inner-content {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-width: 300px;\n}\n.ant-popover-message-title {\n padding: 0;\n text-align: center;\n font-size: 1rem;\n}\n.ant-popover-buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ant-btn-link:disabled {\n color: #717d94 !important;\n}\n.ant-btn-link:disabled:hover {\n background-color: transparent !important;\n}\n.ant-notification {\n width: min-content;\n}\n.ant-notification-topRight {\n right: 0 !important;\n left: 0 !important;\n margin-left: auto !important;\n margin-right: auto !important;\n}\n.ant-notification-notice-wrapper {\n width: 350px !important;\n overflow: hidden !important;\n}\n.ant-notification-notice {\n padding: 16px !important;\n width: 350px !important;\n display: flex !important;\n box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.08), 0px 1px 18px rgba(0, 0, 0, 0.08), 0px 3px 5px rgba(0, 0, 0, 0.16) !important;\n}\n.ant-notification-notice-description {\n padding: 0 14px 0 0 !important;\n color: #232323 !important;\n font-size: 14px !important;\n word-break: break-all !important;\n overflow-wrap: break-word !important;\n}\n.ant-notification-notice-success {\n background-color: #edfffa !important;\n}\n.ant-notification-notice-error {\n background-color: #fff8f4 !important;\n}\n.ant-notification-notice-error .ant-notification-notice-message {\n color: #ff6e1c !important;\n font-weight: 500;\n}\n.ant-notification-notice-error .ant-notification-notice-icon {\n color: #ff6e1c;\n}\n.ant-notification-notice-success .ant-notification-notice-message {\n color: #00b76a !important;\n font-weight: 500;\n}\n.ant-notification-notice-success .ant-notification-notice-icon {\n color: #00b76a !important;\n}\n.ant-notification-notice-message {\n margin-bottom: 0 !important;\n}\n.ant-notification-notice-close {\n top: 16px !important;\n right: 16px !important;\n}\n.ant-menu-submenu-popup > .ant-menu .ant-menu-item {\n display: flex !important;\n align-items: center !important;\n}\n.ant-menu-submenu::after {\n display: none !important;\n}\n:root {\n --row-background: #ffffff;\n --row-background-alternate: rgba(100, 116, 139, 0.04);\n --row-background-dark: #121212;\n --row-background-alternate-dark: #1e1e1e;\n --bunny-blue-500: #3b82f6;\n --bunny-blue-200: #bfdbfe;\n --bunny-green-600: #059669;\n --bunny-green-200: #a7f3d0;\n --bunny-red-500: #ef4444;\n --bunny-red-200: #fecaca;\n --bunny-orange-500: #f97316;\n --bunny-orange-200: #fed7aa;\n --bunny-yellow-500: #f59e0b;\n --bunny-yellow-200: #fde68a;\n --bunny-purple-500: #8b5cf6;\n --bunny-purple-200: #ddd6fe;\n --bunny-black: #000000;\n}\n.hidden {\n display: none;\n}\n.bunny-show-on-hover {\n opacity: 0;\n}\n.bunny-show-on-hover-container:hover .bunny-show-on-hover {\n opacity: 1;\n}\n.has-tooltip:hover .tooltip {\n visibility: visible;\n z-index: 100;\n}\n.pdf-only {\n display: none !important;\n}\n.notes p {\n margin: 0;\n padding: 0;\n padding-bottom: 0.25rem;\n}\n.bunny-icon-path {\n transition: fill 0.3s;\n}\n.bunny-shadow-padding-x {\n padding-right: 1rem;\n padding-left: 1rem;\n}\n.bunny-shadow-padding-xb {\n padding-right: 1rem;\n padding-left: 1rem;\n padding-bottom: 0.5rem;\n}\n.content-container {\n width: 100%;\n margin: 0 auto;\n}\n@media (min-width: 1220px) {\n .content-container {\n width: 1220px !important;\n margin: 0 auto;\n }\n}\n@media (min-width: 768px) {\n .bunny-shadow-padding-x {\n padding-right: 2rem;\n padding-left: 2rem;\n }\n .bunny-shadow-padding-xb {\n padding-right: 2rem;\n padding-left: 2rem;\n padding-bottom: 0.5rem;\n }\n .sm\\:flex {\n display: flex !important;\n }\n .sm\\:hidden {\n display: none !important;\n }\n}\n.bunny-shadow,\n.bunny-shadow-md {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.bunny-fixed {\n position: fixed;\n}\n.bunny-absolute {\n position: absolute;\n}\n.bunny-relative {\n position: relative;\n}\n.bunny-sticky {\n position: sticky;\n}\n.bunny-bottom-0 {\n bottom: 0px;\n}\n.bunny-bottom-4 {\n bottom: 1rem;\n}\n.bunny-left-0 {\n left: 0px;\n}\n.bunny-right-0 {\n right: 0px;\n}\n.bunny-top-0 {\n top: 0px;\n}\n.bunny-col-span-full {\n grid-column: 1 / -1;\n}\n.bunny-m-0 {\n margin: 0px;\n}\n.bunny-mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.bunny-mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.bunny-my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n.bunny-my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.bunny-my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.bunny-mb-2 {\n margin-bottom: 0.5rem;\n}\n.bunny-mb-4 {\n margin-bottom: 1rem;\n}\n.bunny-mb-8 {\n margin-bottom: 2rem;\n}\n.bunny-mt-2 {\n margin-top: 0.5rem;\n}\n.bunny-mt-4 {\n margin-top: 1rem;\n}\n.bunny-flex {\n display: flex;\n}\n.bunny-grid {\n display: grid;\n}\n.bunny-contents {\n display: contents;\n}\n.bunny-h-5 {\n height: 1.25rem;\n}\n.bunny-h-8 {\n height: 2rem;\n}\n.bunny-h-full {\n height: 100%;\n}\n.bunny-w-1\\/2 {\n width: 50%;\n}\n.bunny-w-full {\n width: 100%;\n}\n.bunny-flex-1 {\n flex: 1 1 0%;\n}\n.bunny-shrink {\n flex-shrink: 1;\n}\n.bunny-shrink-0 {\n flex-shrink: 0;\n}\n.bunny-grow {\n flex-grow: 1;\n}\n.bunny-cursor-pointer {\n cursor: pointer;\n}\n.bunny-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.bunny-flex-row {\n flex-direction: row;\n}\n.bunny-flex-col {\n flex-direction: column;\n}\n.bunny-items-end {\n align-items: flex-end;\n}\n.bunny-items-center {\n align-items: center;\n}\n.bunny-justify-end {\n justify-content: flex-end;\n}\n.bunny-justify-center {\n justify-content: center;\n}\n.bunny-justify-between {\n justify-content: space-between;\n}\n.bunny-gap-0 {\n gap: 0px;\n}\n.bunny-gap-1 {\n gap: 0.25rem;\n}\n.bunny-gap-2 {\n gap: 0.5rem;\n}\n.bunny-gap-3 {\n gap: 0.75rem;\n}\n.bunny-gap-4 {\n gap: 1rem;\n}\n.bunny-gap-6 {\n gap: 1.5rem;\n}\n.bunny-gap-8 {\n gap: 2rem;\n}\n.bunny-space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.bunny-overflow-auto {\n overflow: auto;\n}\n.bunny-overflow-hidden {\n overflow: hidden;\n}\n.bunny-overflow-visible {\n overflow: visible;\n}\n.bunny-whitespace-nowrap {\n white-space: nowrap;\n}\n.bunny-rounded {\n border-radius: 0.25rem;\n}\n.bunny-rounded-full {\n border-radius: 9999px;\n}\n.bunny-rounded-lg {\n border-radius: 0.5rem;\n}\n.bunny-rounded-md {\n border-radius: 0.375rem;\n}\n.bunny-border {\n border-width: 1px;\n}\n.bunny-border-2 {\n border-width: 2px;\n}\n.bunny-border-solid {\n border-style: solid;\n}\n.bunny-border-none {\n border-style: none;\n}\n.bunny-border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.bunny-bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bunny-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bunny-p-0 {\n padding: 0px;\n}\n.bunny-p-1 {\n padding: 0.25rem;\n}\n.bunny-p-2 {\n padding: 0.5rem;\n}\n.bunny-p-4 {\n padding: 1rem;\n}\n.bunny-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.bunny-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.bunny-px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.bunny-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.bunny-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.bunny-py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.bunny-pb-2 {\n padding-bottom: 0.5rem;\n}\n.bunny-pb-4 {\n padding-bottom: 1rem;\n}\n.bunny-pb-6 {\n padding-bottom: 1.5rem;\n}\n.bunny-pb-8 {\n padding-bottom: 2rem;\n}\n.bunny-pl-0 {\n padding-left: 0px;\n}\n.bunny-pl-4 {\n padding-left: 1rem;\n}\n.bunny-pt-12 {\n padding-top: 3rem;\n}\n.bunny-pt-2 {\n padding-top: 0.5rem;\n}\n.bunny-pt-4 {\n padding-top: 1rem;\n}\n.bunny-pt-5 {\n padding-top: 1.25rem;\n}\n.bunny-pt-6 {\n padding-top: 1.5rem;\n}\n.bunny-text-left {\n text-align: left;\n}\n.bunny-text-center {\n text-align: center;\n}\n.bunny-text-right {\n text-align: right;\n}\n.bunny-text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.bunny-text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.bunny-text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.bunny-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.bunny-text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.bunny-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.bunny-font-bold {\n font-weight: 700;\n}\n.bunny-font-medium {\n font-weight: 500;\n}\n.bunny-font-normal {\n font-weight: 400;\n}\n.bunny-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.bunny-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.bunny-underline {\n text-decoration-line: underline;\n}\n.bunny-shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.bunny-duration-300 {\n transition-duration: 300ms;\n}\n.rotate-45,\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n}\n.shadow,\n.shadow-lg,\n.shadow-md,\n.shadow-none,\n.shadow-sm,\n.shadow-xl {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.visible {\n visibility: visible;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.sticky {\n position: sticky;\n}\n.-top-0\\.5 {\n top: -0.125rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-4 {\n bottom: 1rem;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.col-span-3 {\n grid-column: span 3 / span 3;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-0 {\n margin: 0px;\n}\n.mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.mb-8 {\n margin-bottom: 2rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-8 {\n margin-right: 2rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-6 {\n margin-top: 1.5rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.flex {\n display: flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-full {\n height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-1\\/3 {\n width: 33.333333%;\n}\n.w-12 {\n width: 3rem;\n}\n.w-2\\/3 {\n width: 66.666667%;\n}\n.w-4 {\n width: 1rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-32 {\n max-width: 8rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.shrink {\n flex-shrink: 1;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.border-collapse {\n border-collapse: collapse;\n}\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-0 {\n gap: 0px;\n}\n.gap-1 {\n gap: 0.25rem;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.gap-8 {\n gap: 2rem;\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-visible {\n overflow: visible;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-sm {\n border-radius: 0.125rem;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-none {\n border-style: none;\n}\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));\n}\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));\n}\n.border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.border-slate-300 {\n --tw-border-opacity: 1;\n border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));\n}\n.border-slate-700 {\n --tw-border-opacity: 1;\n border-color: rgb(51 65 85 / var(--tw-border-opacity, 1));\n}\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\n.bg-emerald-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));\n}\n.bg-green-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1));\n}\n.bg-orange-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 215 170 / var(--tw-bg-opacity, 1));\n}\n.bg-red-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\n.bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-8 {\n padding: 2rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n.pb-8 {\n padding-bottom: 2rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-4 {\n padding-left: 1rem;\n}\n.pt-1 {\n padding-top: 0.25rem;\n}\n.pt-12 {\n padding-top: 3rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.pt-5 {\n padding-top: 1.25rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.pt-8 {\n padding-top: 2rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-right {\n text-align: right;\n}\n.align-middle {\n vertical-align: middle;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.capitalize {\n text-transform: capitalize;\n}\n.text-emerald-600 {\n --tw-text-opacity: 1;\n color: rgb(5 150 105 / var(--tw-text-opacity, 1));\n}\n.text-emerald-700 {\n --tw-text-opacity: 1;\n color: rgb(4 120 87 / var(--tw-text-opacity, 1));\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity, 1));\n}\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.text-yellow-500 {\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity, 1));\n}\n.underline {\n text-decoration-line: underline;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-300 {\n transition-duration: 300ms;\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n@media (min-width: 768px) {\n .sm\\:flex {\n display: flex;\n }\n .sm\\:hidden {\n display: none;\n }\n}\n.bunny-invoice-container {\n padding: 0;\n box-sizing: border-box !important;\n line-height: 1.15;\n}\n@media only screen and (max-width: 768px) {\n select,\n textarea,\n input[type='text'],\n input[type='password'],\n input[type='datetime'],\n input[type='datetime-local'],\n input[type='date'],\n input[type='month'],\n input[type='time'],\n input[type='week'],\n input[type='number'],\n input[type='email'],\n input[type='url'],\n input[type='search'],\n input[type='tel'],\n input[type='color'] {\n font-size: 16px !important;\n }\n}\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
|
|
77
77
|
styleInject(css_248z);
|
|
78
78
|
|
|
79
79
|
/******************************************************************************
|
|
@@ -170,67 +170,15 @@ var BrandContext = react.createContext({
|
|
|
170
170
|
topNavImageUrl: common.DEFAULT_TOP_NAV_IMAGE_URL,
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
var PACKAGE_VERSION = '1.0.58-beta.0.5';
|
|
175
|
-
var createRequestHeaders = function (token) {
|
|
176
|
-
var _a;
|
|
177
|
-
var bearerToken = token ? "Bearer ".concat(token) : null;
|
|
178
|
-
var headers = (_a = {
|
|
179
|
-
'Content-type': 'application/json; charset=utf-8'
|
|
180
|
-
},
|
|
181
|
-
_a[common.X_BUNNY_COMPONENTS_VERSION_HEADER_NAME] = PACKAGE_VERSION,
|
|
182
|
-
_a);
|
|
183
|
-
if (bearerToken) {
|
|
184
|
-
headers['Authorization'] = bearerToken;
|
|
185
|
-
}
|
|
186
|
-
return headers;
|
|
187
|
-
};
|
|
188
|
-
var getGraphQLBaseURL = function (apiHost) {
|
|
189
|
-
return "".concat(apiHost, "/graphql");
|
|
190
|
-
};
|
|
191
|
-
var useGraphQLRequest = function () { return function (query, apiHost, token, variables) { return __awaiter(void 0, void 0, void 0, function () {
|
|
192
|
-
var error_1;
|
|
193
|
-
return __generator(this, function (_a) {
|
|
194
|
-
switch (_a.label) {
|
|
195
|
-
case 0:
|
|
196
|
-
_a.trys.push([0, 2, , 3]);
|
|
197
|
-
return [4 /*yield*/, request__default["default"](getGraphQLBaseURL(apiHost), query, variables, createRequestHeaders(token))];
|
|
198
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
199
|
-
case 2:
|
|
200
|
-
error_1 = _a.sent();
|
|
201
|
-
throw error_1;
|
|
202
|
-
case 3: return [2 /*return*/];
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}); }; };
|
|
206
|
-
var gqlRequest = function (_a) {
|
|
207
|
-
var query = _a.query, apiHost = _a.apiHost, token = _a.token, vars = _a.vars, isInPreviewMode = _a.isInPreviewMode;
|
|
208
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
-
return __generator(this, function (_b) {
|
|
210
|
-
switch (_b.label) {
|
|
211
|
-
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
212
|
-
query: query,
|
|
213
|
-
apiHost: apiHost,
|
|
214
|
-
token: token,
|
|
215
|
-
vars: vars,
|
|
216
|
-
componentsVersion: PACKAGE_VERSION,
|
|
217
|
-
isInPreviewMode: isInPreviewMode,
|
|
218
|
-
})];
|
|
219
|
-
case 1: return [2 /*return*/, _b.sent()];
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
var MUTATION$a = "\n query entityBranding {\n entityBranding {\n accentColor\n brandColor\n topNavImageUrl\n }\n }\n";
|
|
173
|
+
var MUTATION$9 = "\n query entityBranding {\n entityBranding {\n accentColor\n brandColor\n topNavImageUrl\n }\n }\n";
|
|
226
174
|
var getBranding = function (_a) {
|
|
227
175
|
var token = _a.token, apiHost = _a.apiHost;
|
|
228
176
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
229
177
|
var response;
|
|
230
178
|
return __generator(this, function (_b) {
|
|
231
179
|
switch (_b.label) {
|
|
232
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
233
|
-
query: MUTATION$
|
|
180
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
181
|
+
query: MUTATION$9,
|
|
234
182
|
token: token,
|
|
235
183
|
apiHost: apiHost,
|
|
236
184
|
})];
|
|
@@ -273,7 +221,7 @@ function BunnyProvider(_a) {
|
|
|
273
221
|
apiHost: apiHost,
|
|
274
222
|
token: token,
|
|
275
223
|
onTokenExpired: onTokenExpired,
|
|
276
|
-
} }, { children: jsxRuntime.jsx(reactQuery.QueryClientProvider, __assign({ client: queryClient || extraQueryClient }, { children: jsxRuntime.jsx(ContextualWrapper, __assign({ darkMode: darkMode, configProviderProps: configProviderProps }, { children:
|
|
224
|
+
} }, { children: jsxRuntime.jsx(reactQuery.QueryClientProvider, __assign({ client: queryClient || extraQueryClient }, { children: jsxRuntime.jsx(ContextualWrapper, __assign({ darkMode: darkMode, configProviderProps: configProviderProps }, { children: children })) })) })));
|
|
277
225
|
}
|
|
278
226
|
function ContextualWrapper(_a) {
|
|
279
227
|
var children = _a.children, darkMode = _a.darkMode, configProviderProps = _a.configProviderProps;
|
|
@@ -281,7 +229,6 @@ function ContextualWrapper(_a) {
|
|
|
281
229
|
var branding = reactQuery.useQuery({
|
|
282
230
|
queryKey: common.QueryKeyFactory.default.brandingKey(token),
|
|
283
231
|
queryFn: function () { return getBranding({ token: token, apiHost: apiHost }); },
|
|
284
|
-
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
285
232
|
}).data;
|
|
286
233
|
var isMobile = common.useIsMobile();
|
|
287
234
|
var entityBranding = react.useMemo(function () {
|
|
@@ -418,46 +365,49 @@ var InvoiceQuoteView = function (_a) {
|
|
|
418
365
|
var _b = react.useContext(InvoiceQuoteContext), shadow = _b.shadow, hideDownloadButton = _b.hideDownloadButton;
|
|
419
366
|
var isMobile = common.useIsMobile();
|
|
420
367
|
var buttonsVisible = formattedInvoice && (!hideDownloadButton || onBackButtonClick);
|
|
421
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-full bunny-grow ".concat(isMobile ?
|
|
368
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-full bunny-grow ".concat(isMobile ? "bunny-overflow-hidden" : "") }, { children: [buttonsVisible ? (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-between bunny-items-center bunny-pb-4 ".concat(isMobile ? "bunny-shadow-padding-x" : ""), id: "acceptance" }, { children: [jsxRuntime.jsx("div", { children: onBackButtonClick ? (jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-pl-0", onClick: onBackButtonClick, style: {
|
|
422
369
|
color: secondaryColor,
|
|
423
|
-
}, type: "link" }, { children: backButtonName ||
|
|
424
|
-
return downloadFile(apiHost +
|
|
425
|
-
} }, { children: "Download" }))) : null] }))) : null, isMobile ? (jsxRuntime.jsxs(MarkupContainer, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-grow bunny-w-full bunny-shadow-padding-xb bunny-overflow-auto" }, { children: [jsxRuntime.jsx(interweave.Markup, { content: html }), children] }))) : (jsxRuntime.jsxs(MarkupContainer, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-p-4 bunny-w-full bunny-bg-white ".concat(shadow ? shadow :
|
|
426
|
-
minWidth:
|
|
370
|
+
}, type: "link" }, { children: backButtonName || "Back" }))) : null }), !hideDownloadButton ? (jsxRuntime.jsx(antd.Button, __assign({ icon: jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: function () {
|
|
371
|
+
return downloadFile(apiHost + "/api/pdf/invoice/" + formattedInvoice.id, token);
|
|
372
|
+
} }, { children: "Download" }))) : null] }))) : null, isMobile ? (jsxRuntime.jsxs(MarkupContainer, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-grow bunny-w-full bunny-shadow-padding-xb bunny-overflow-auto" }, { children: [jsxRuntime.jsx(interweave.Markup, { content: html }), children] }))) : (jsxRuntime.jsxs(MarkupContainer, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-p-4 bunny-w-full bunny-bg-white ".concat(shadow ? shadow : "bunny-shadow-md", " bunny-rounded-md"), style: {
|
|
373
|
+
minWidth: "750px",
|
|
427
374
|
} }, { children: [jsxRuntime.jsx(interweave.Markup, { content: html }), children] })))] })));
|
|
428
375
|
};
|
|
429
376
|
var templateObject_1$b;
|
|
430
377
|
|
|
431
|
-
var fetchPDF = function (
|
|
378
|
+
var fetchPDF = function (apiEndpoint, invoiceUuid, token) { return __awaiter(void 0, void 0, void 0, function () {
|
|
432
379
|
var response;
|
|
433
380
|
return __generator(this, function (_a) {
|
|
434
381
|
switch (_a.label) {
|
|
435
382
|
case 0:
|
|
436
|
-
if (!
|
|
437
|
-
throw new Error(
|
|
383
|
+
if (!invoiceUuid) {
|
|
384
|
+
throw new Error("Invoice ID is required to fetch PDF");
|
|
438
385
|
}
|
|
439
|
-
return [4 /*yield*/, fetch("".concat(
|
|
386
|
+
return [4 /*yield*/, fetch("".concat(apiEndpoint, "/api/legacy_invoices/").concat(invoiceUuid), {
|
|
387
|
+
method: "GET",
|
|
440
388
|
headers: {
|
|
389
|
+
"Content-type": "application/json; charset=utf-8",
|
|
441
390
|
Authorization: "Bearer ".concat(token),
|
|
442
391
|
},
|
|
392
|
+
// body: JSON.stringify({
|
|
393
|
+
// query: transactionMutation(filter),
|
|
394
|
+
// }),
|
|
443
395
|
})];
|
|
444
396
|
case 1:
|
|
445
397
|
response = _a.sent();
|
|
446
398
|
if (!response.ok)
|
|
447
|
-
throw new Error(
|
|
399
|
+
throw new Error("Failed to fetch PDF");
|
|
448
400
|
return [2 /*return*/, response.blob()]; // Return the PDF as a blob
|
|
449
401
|
}
|
|
450
402
|
});
|
|
451
403
|
}); };
|
|
452
|
-
function
|
|
453
|
-
var
|
|
454
|
-
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
404
|
+
function InvoicePDF(_a) {
|
|
405
|
+
var invoiceUuid = _a.invoiceUuid, apiHost = _a.apiHost, token = _a.token;
|
|
455
406
|
var _b = react.useState(undefined), pdfUrl = _b[0], setPdfUrl = _b[1];
|
|
456
|
-
var token = useToken();
|
|
457
407
|
var _c = reactQuery.useQuery({
|
|
458
|
-
queryKey: [
|
|
459
|
-
queryFn: function () { return fetchPDF(apiHost
|
|
460
|
-
enabled: Boolean(
|
|
408
|
+
queryKey: ["invoicePDF", invoiceUuid],
|
|
409
|
+
queryFn: function () { return fetchPDF(apiHost || "", invoiceUuid, token); },
|
|
410
|
+
enabled: Boolean(invoiceUuid),
|
|
461
411
|
}), pdfBlob = _c.data, isLoading = _c.isLoading;
|
|
462
412
|
react.useEffect(function () {
|
|
463
413
|
if (pdfBlob) {
|
|
@@ -469,10 +419,10 @@ function LegacyDocument(_a) {
|
|
|
469
419
|
if (isLoading || !pdfUrl)
|
|
470
420
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
471
421
|
return (jsxRuntime.jsx("iframe", { src: pdfUrl, style: {
|
|
472
|
-
border:
|
|
473
|
-
gridColumn:
|
|
474
|
-
minHeight:
|
|
475
|
-
minWidth:
|
|
422
|
+
border: "none",
|
|
423
|
+
gridColumn: "1/-1",
|
|
424
|
+
minHeight: "1000px",
|
|
425
|
+
minWidth: "780px",
|
|
476
426
|
}, title: "Invoice PDF", width: "100%" }));
|
|
477
427
|
}
|
|
478
428
|
|
|
@@ -484,7 +434,7 @@ var getPaymentMethods = function (_a) {
|
|
|
484
434
|
var _b;
|
|
485
435
|
return __generator(this, function (_c) {
|
|
486
436
|
switch (_c.label) {
|
|
487
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
437
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
488
438
|
query: paymentMethodsQuery(accountId ? "filter: \"accountId is ".concat(accountId, "\"") : ''),
|
|
489
439
|
token: token,
|
|
490
440
|
apiHost: apiHost,
|
|
@@ -505,7 +455,6 @@ var usePaymentMethod = function (_a) {
|
|
|
505
455
|
token: token,
|
|
506
456
|
}),
|
|
507
457
|
queryFn: function () { return getPaymentMethods({ apiHost: apiHost, token: token, accountId: accountId }); },
|
|
508
|
-
staleTime: 5 * 60 * 1000, // Consider data fresh for 5 minutes
|
|
509
458
|
}), data = _b.data, isLoading = _b.isLoading;
|
|
510
459
|
return {
|
|
511
460
|
paymentMethods: data,
|
|
@@ -522,7 +471,7 @@ var filterPaymentPlugins = function (plugins) {
|
|
|
522
471
|
((_d = (_c = plugin.components) === null || _c === void 0 ? void 0 : _c.frontend) === null || _d === void 0 ? void 0 : _d.length);
|
|
523
472
|
});
|
|
524
473
|
};
|
|
525
|
-
var MUTATION$
|
|
474
|
+
var MUTATION$8 = "{\n paymentPlugins {\n enabled\n entities\n guid\n hidden\n id\n name\n status\n type\n webhookEnabled\n components\n }\n}";
|
|
526
475
|
var getPaymentPlugins = function (_a) {
|
|
527
476
|
var apiHost = _a.apiHost, token = _a.token;
|
|
528
477
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -531,8 +480,8 @@ var getPaymentPlugins = function (_a) {
|
|
|
531
480
|
switch (_b.label) {
|
|
532
481
|
case 0:
|
|
533
482
|
_b.trys.push([0, 2, , 3]);
|
|
534
|
-
return [4 /*yield*/, gqlRequest({
|
|
535
|
-
query: MUTATION$
|
|
483
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
484
|
+
query: MUTATION$8,
|
|
536
485
|
token: token,
|
|
537
486
|
apiHost: apiHost,
|
|
538
487
|
})];
|
|
@@ -552,7 +501,6 @@ var usePaymentPlugins = function (_a) {
|
|
|
552
501
|
var _b = reactQuery.useQuery({
|
|
553
502
|
queryKey: ['paymentPlugins', token],
|
|
554
503
|
queryFn: function () { return getPaymentPlugins({ apiHost: apiHost, token: token }); },
|
|
555
|
-
staleTime: 5 * 60 * 1000, // Consider data fresh for 5 minutes
|
|
556
504
|
}), paymentPlugins = _b.data, isFetched = _b.isFetched;
|
|
557
505
|
var filteredPaymentPlugins = filterPaymentPlugins(paymentPlugins);
|
|
558
506
|
var paymentMethodAllowedPlugins = filteredPaymentPlugins === null || filteredPaymentPlugins === void 0 ? void 0 : filteredPaymentPlugins.filter(function (plugin) {
|
|
@@ -569,7 +517,7 @@ var getQuoteAmountDue = function (quote) {
|
|
|
569
517
|
return quote.amountDue;
|
|
570
518
|
};
|
|
571
519
|
|
|
572
|
-
var MUTATION$
|
|
520
|
+
var MUTATION$7 = "\n mutation checkout(\n $invoiceId: ID,\n $quoteId: ID,\n $paymentMethodId: ID,\n $paymentMethodData: CheckoutPaymentMethodAttributes\n ) {\n checkout(\n invoiceId: $invoiceId,\n quoteId: $quoteId,\n paymentMethodId: $paymentMethodId,\n paymentMethodData: $paymentMethodData\n ) {\n invoice {\n id\n state\n amount\n amountDue\n }\n payment {\n id\n state\n amount\n }\n paymentApplication {\n id\n invoiceId\n paymentId\n }\n transaction {\n id\n amount\n }\n }\n }\n";
|
|
573
521
|
var checkout = function (_a) {
|
|
574
522
|
var quoteId = _a.quoteId, invoiceId = _a.invoiceId, paymentMethodId = _a.paymentMethodId, paymentMethodData = _a.paymentMethodData, token = _a.token, apiHost = _a.apiHost;
|
|
575
523
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -585,8 +533,8 @@ var checkout = function (_a) {
|
|
|
585
533
|
if (paymentMethodData) {
|
|
586
534
|
mutationVars.paymentMethodData = __assign(__assign({}, paymentMethodData), { metadata: paymentMethodData.metadata });
|
|
587
535
|
}
|
|
588
|
-
return [4 /*yield*/, gqlRequest({
|
|
589
|
-
query: MUTATION$
|
|
536
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
537
|
+
query: MUTATION$7,
|
|
590
538
|
token: token,
|
|
591
539
|
vars: mutationVars,
|
|
592
540
|
apiHost: apiHost,
|
|
@@ -611,13 +559,14 @@ function usePay$1(_a) {
|
|
|
611
559
|
var customCheckoutFunction = react.useContext(PaymentContext).customCheckoutFunction;
|
|
612
560
|
var token = useToken();
|
|
613
561
|
var pay = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
614
|
-
var currencyId, response, response, error_1;
|
|
562
|
+
var amountDue, currencyId, response, response, error_1;
|
|
615
563
|
return __generator(this, function (_a) {
|
|
616
564
|
switch (_a.label) {
|
|
617
565
|
case 0:
|
|
566
|
+
amountDue = quote ? getQuoteAmountDue(quote) : invoice === null || invoice === void 0 ? void 0 : invoice.amountDue;
|
|
618
567
|
currencyId = (quote === null || quote === void 0 ? void 0 : quote.currencyId) || (invoice === null || invoice === void 0 ? void 0 : invoice.currencyId);
|
|
619
|
-
if (!currencyId) {
|
|
620
|
-
throw new Error(
|
|
568
|
+
if (!amountDue || !currencyId) {
|
|
569
|
+
throw new Error("No amount or currencyId");
|
|
621
570
|
}
|
|
622
571
|
_a.label = 1;
|
|
623
572
|
case 1:
|
|
@@ -764,6 +713,75 @@ var CheckoutFooter = function (_a) {
|
|
|
764
713
|
return (jsxRuntime.jsx(ActualCheckoutFooter, { plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, noPadding: noPadding }));
|
|
765
714
|
};
|
|
766
715
|
|
|
716
|
+
// Automatically sets the default payment method if there is none currently set
|
|
717
|
+
var useAutoSetDefaultPaymentMethod = function (_a) {
|
|
718
|
+
var accountId = _a.accountId, token = _a.token, handleSetDefault = _a.handleSetDefault, setDefaultPaymentMethodLoading = _a.setDefaultPaymentMethodLoading, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
|
|
719
|
+
var queryClient = reactQuery.useQueryClient();
|
|
720
|
+
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
721
|
+
var _c = usePaymentMethod({
|
|
722
|
+
accountId: accountId,
|
|
723
|
+
token: token,
|
|
724
|
+
apiHost: apiHost,
|
|
725
|
+
}), storedPaymentMethods = _c.paymentMethods, defaultPaymentMethod = _c.defaultPaymentMethod;
|
|
726
|
+
// Set the default payment method on the cache. Prevents 'handleSetDefault' from being called too many times.
|
|
727
|
+
function setDefaultPaymentMethodOnCache(targetPaymentMethod) {
|
|
728
|
+
var cachedPaymentMethods = queryClient.getQueryData(common.QueryKeyFactory.default.accountPaymentMethodKey({
|
|
729
|
+
accountId: accountId,
|
|
730
|
+
token: token,
|
|
731
|
+
}));
|
|
732
|
+
if (cachedPaymentMethods) {
|
|
733
|
+
for (var _i = 0, _a = cachedPaymentMethods; _i < _a.length; _i++) {
|
|
734
|
+
var paymentMethod = _a[_i];
|
|
735
|
+
paymentMethod.isDefault = paymentMethod.id === targetPaymentMethod.id;
|
|
736
|
+
}
|
|
737
|
+
queryClient.setQueryData(common.QueryKeyFactory.default.accountPaymentMethodKey({
|
|
738
|
+
accountId: accountId,
|
|
739
|
+
token: token,
|
|
740
|
+
}), cachedPaymentMethods);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
react.useEffect(function () {
|
|
744
|
+
if (setDefaultPaymentMethodLoading || !enabled)
|
|
745
|
+
return;
|
|
746
|
+
if ((storedPaymentMethods === null || storedPaymentMethods === void 0 ? void 0 : storedPaymentMethods.length) > 0 && !defaultPaymentMethod) {
|
|
747
|
+
handleSetDefault(storedPaymentMethods[0]);
|
|
748
|
+
setDefaultPaymentMethodOnCache(storedPaymentMethods[0]);
|
|
749
|
+
}
|
|
750
|
+
}, [
|
|
751
|
+
storedPaymentMethods,
|
|
752
|
+
defaultPaymentMethod,
|
|
753
|
+
handleSetDefault,
|
|
754
|
+
setDefaultPaymentMethodLoading,
|
|
755
|
+
queryClient,
|
|
756
|
+
accountId,
|
|
757
|
+
token,
|
|
758
|
+
]);
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
var usePaymentMethodSelectorPlugin = function (_a) {
|
|
762
|
+
var defaultPaymentMethod = _a.defaultPaymentMethod, defaultPaymentMethodPlugin = _a.defaultPaymentMethodPlugin, paymentMethodAllowedPlugins = _a.paymentMethodAllowedPlugins;
|
|
763
|
+
var _b = react.useState(), selectorPaymentMethodPlugin = _b[0], setSelectorPaymentMethodPlugin = _b[1];
|
|
764
|
+
react.useEffect(function () {
|
|
765
|
+
if (selectorPaymentMethodPlugin) {
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
if (defaultPaymentMethod) {
|
|
769
|
+
setSelectorPaymentMethodPlugin(defaultPaymentMethodPlugin);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
setSelectorPaymentMethodPlugin(paymentMethodAllowedPlugins === null || paymentMethodAllowedPlugins === void 0 ? void 0 : paymentMethodAllowedPlugins[0]);
|
|
773
|
+
}
|
|
774
|
+
}, [
|
|
775
|
+
defaultPaymentMethod,
|
|
776
|
+
defaultPaymentMethodPlugin,
|
|
777
|
+
paymentMethodAllowedPlugins,
|
|
778
|
+
]);
|
|
779
|
+
return {
|
|
780
|
+
selectorPaymentMethodPlugin: selectorPaymentMethodPlugin,
|
|
781
|
+
setSelectorPaymentMethodPlugin: setSelectorPaymentMethodPlugin,
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
|
|
767
785
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
768
786
|
|
|
769
787
|
function getDefaultExportFromCjs (x) {
|
|
@@ -18085,7 +18103,7 @@ var Visa = function (_a) {
|
|
|
18085
18103
|
return (jsxRuntime.jsxs("svg", __assign({ className: className, width: "70", height: "48", viewBox: "0 0 70 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M21.2505 32.5165H17.0099L13.8299 20.3847C13.679 19.8267 13.3585 19.3333 12.8871 19.1008C11.7106 18.5165 10.4142 18.0514 9 17.8169V17.3498H15.8313C16.7742 17.3498 17.4813 18.0514 17.5991 18.8663L19.2491 27.6173L23.4877 17.3498H27.6104L21.2505 32.5165ZM29.9675 32.5165H25.9626L29.2604 17.3498H33.2653L29.9675 32.5165ZM38.4467 21.5514C38.5646 20.7346 39.2717 20.2675 40.0967 20.2675C41.3931 20.1502 42.8052 20.3848 43.9838 20.9671L44.6909 17.7016C43.5123 17.2345 42.216 17 41.0395 17C37.1524 17 34.3239 19.1008 34.3239 22.0165C34.3239 24.2346 36.3274 25.3992 37.7417 26.1008C39.2717 26.8004 39.861 27.2675 39.7431 27.9671C39.7431 29.0165 38.5646 29.4836 37.3881 29.4836C35.9739 29.4836 34.5596 29.1338 33.2653 28.5494L32.5582 31.8169C33.9724 32.3992 35.5025 32.6338 36.9167 32.6338C41.2752 32.749 43.9838 30.6502 43.9838 27.5C43.9838 23.5329 38.4467 23.3004 38.4467 21.5514ZM58 32.5165L54.82 17.3498H51.4044C50.6972 17.3498 49.9901 17.8169 49.7544 18.5165L43.8659 32.5165H47.9887L48.8116 30.3004H53.8772L54.3486 32.5165H58ZM51.9936 21.4342L53.1701 27.1502H49.8723L51.9936 21.4342Z", fill: "#172B85" })] })));
|
|
18086
18104
|
};
|
|
18087
18105
|
|
|
18088
|
-
var Text$
|
|
18106
|
+
var Text$p = antd.Typography.Text;
|
|
18089
18107
|
var MiniCreditCard = function (_a) {
|
|
18090
18108
|
var className = _a.className, buttons = _a.buttons, _b = _a.hideDropdownMenu, hideDropdownMenu = _b === void 0 ? false : _b, _c = _a.hideDefaultTag, hideDefaultTag = _c === void 0 ? false : _c, onClickRemove = _a.onClickRemove, paymentMethodData = _a.paymentMethodData, onClickSetDefault = _a.onClickSetDefault, id = _a.id;
|
|
18091
18109
|
var darkMode = react.useContext(BunnyContext).darkMode;
|
|
@@ -18096,7 +18114,7 @@ var MiniCreditCard = function (_a) {
|
|
|
18096
18114
|
return darkMode ? 'var(--row-background-alternate)' : 'bg-slate-50';
|
|
18097
18115
|
}, [darkMode]);
|
|
18098
18116
|
var isDefault = paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.isDefault;
|
|
18099
|
-
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-row bunny-justify-between bunny-items-center bunny-p-1 bunny-px-3 bunny-border-solid ".concat(backgroundColor, " bunny-").concat(borderColor, " bunny-rounded-md bunny-border ").concat(className), id: id }, { children: paymentMethodData ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-row bunny-gap-4" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2 bunny-space-between bunny-w-full" }, { children: [jsxRuntime.jsx(CardImage, { paymentMethodData: paymentMethodData }), jsxRuntime.jsx(Issuer, { paymentMethodData: paymentMethodData }), jsxRuntime.jsx(Identifier, { paymentMethodData: paymentMethodData }), !hideDefaultTag && (jsxRuntime.jsx("div", { children: isDefault ? (jsxRuntime.jsx(antd.Tag, __assign({ bordered: false, color: "blue" }, { children: "Default" }))) : null }))] })) })), buttons ? (buttons) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !hideDropdownMenu && (jsxRuntime.jsx(DropdownMenu, { setDefault: onClickSetDefault, remove: onClickRemove, isDefault: isDefault !== null && isDefault !== void 0 ? isDefault : false, id: "credit-card-dropdown-".concat(paymentMethodData.id) })) }))] })) : (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-items-center justify-between w-full" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-gap-2 bunny-items-center" }, { children: [jsxRuntime.jsx(icons.CreditCardOutlined, {}), jsxRuntime.jsx(Text$
|
|
18117
|
+
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-row bunny-justify-between bunny-items-center bunny-p-1 bunny-px-3 bunny-border-solid ".concat(backgroundColor, " bunny-").concat(borderColor, " bunny-rounded-md bunny-border ").concat(className), id: id }, { children: paymentMethodData ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-row bunny-gap-4" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2 bunny-space-between bunny-w-full" }, { children: [jsxRuntime.jsx(CardImage, { paymentMethodData: paymentMethodData }), jsxRuntime.jsx(Issuer, { paymentMethodData: paymentMethodData }), jsxRuntime.jsx(Identifier, { paymentMethodData: paymentMethodData }), !hideDefaultTag && (jsxRuntime.jsx("div", { children: isDefault ? (jsxRuntime.jsx(antd.Tag, __assign({ bordered: false, color: "blue" }, { children: "Default" }))) : null }))] })) })), buttons ? (buttons) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !hideDropdownMenu && (jsxRuntime.jsx(DropdownMenu, { setDefault: onClickSetDefault, remove: onClickRemove, isDefault: isDefault !== null && isDefault !== void 0 ? isDefault : false, id: "credit-card-dropdown-".concat(paymentMethodData.id) })) }))] })) : (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-items-center justify-between w-full" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-gap-2 bunny-items-center" }, { children: [jsxRuntime.jsx(icons.CreditCardOutlined, {}), jsxRuntime.jsx(Text$p, __assign({ className: "bunny-text-slate-400", style: { fontSize: '12px' } }, { children: "No payment methods" }))] })), jsxRuntime.jsx(antd.Button, { disabled: true, type: "link" }), buttons] }))) })));
|
|
18100
18118
|
};
|
|
18101
18119
|
var Identifier = function (_a) {
|
|
18102
18120
|
var _b, _c, _d;
|
|
@@ -18105,9 +18123,9 @@ var Identifier = function (_a) {
|
|
|
18105
18123
|
return null;
|
|
18106
18124
|
}
|
|
18107
18125
|
if (((_c = paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.metadata) === null || _c === void 0 ? void 0 : _c.type) === 'cashapp') {
|
|
18108
|
-
return jsxRuntime.jsx(Text$
|
|
18126
|
+
return jsxRuntime.jsx(Text$p, { children: "Cashapp" });
|
|
18109
18127
|
}
|
|
18110
|
-
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Text$
|
|
18128
|
+
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Text$p, __assign({ className: "relative -top-0.5" }, { children: "****" })), jsxRuntime.jsx(Text$p, { children: (_d = paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.metadata) === null || _d === void 0 ? void 0 : _d.identifier })] }));
|
|
18111
18129
|
};
|
|
18112
18130
|
var Issuer = function (_a) {
|
|
18113
18131
|
var _b;
|
|
@@ -18116,7 +18134,7 @@ var Issuer = function (_a) {
|
|
|
18116
18134
|
var issuer = (_b = paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.metadata) === null || _b === void 0 ? void 0 : _b.issuer;
|
|
18117
18135
|
if (issuer.length == 0 || list.includes(issuer.toLowerCase()))
|
|
18118
18136
|
return null;
|
|
18119
|
-
return jsxRuntime.jsx(Text$
|
|
18137
|
+
return jsxRuntime.jsx(Text$p, { children: lodashExports.capitalize(issuer) });
|
|
18120
18138
|
};
|
|
18121
18139
|
var DropdownMenu = function (_a) {
|
|
18122
18140
|
var setDefault = _a.setDefault, remove = _a.remove, isDefault = _a.isDefault, id = _a.id;
|
|
@@ -18177,75 +18195,6 @@ var CardImage = function (_a) {
|
|
|
18177
18195
|
}
|
|
18178
18196
|
};
|
|
18179
18197
|
|
|
18180
|
-
// Automatically sets the default payment method if there is none currently set
|
|
18181
|
-
var useAutoSetDefaultPaymentMethod = function (_a) {
|
|
18182
|
-
var accountId = _a.accountId, token = _a.token, handleSetDefault = _a.handleSetDefault, setDefaultPaymentMethodLoading = _a.setDefaultPaymentMethodLoading, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
|
|
18183
|
-
var queryClient = reactQuery.useQueryClient();
|
|
18184
|
-
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
18185
|
-
var _c = usePaymentMethod({
|
|
18186
|
-
accountId: accountId,
|
|
18187
|
-
token: token,
|
|
18188
|
-
apiHost: apiHost,
|
|
18189
|
-
}), storedPaymentMethods = _c.paymentMethods, defaultPaymentMethod = _c.defaultPaymentMethod;
|
|
18190
|
-
// Set the default payment method on the cache. Prevents 'handleSetDefault' from being called too many times.
|
|
18191
|
-
function setDefaultPaymentMethodOnCache(targetPaymentMethod) {
|
|
18192
|
-
var cachedPaymentMethods = queryClient.getQueryData(common.QueryKeyFactory.default.accountPaymentMethodKey({
|
|
18193
|
-
accountId: accountId,
|
|
18194
|
-
token: token,
|
|
18195
|
-
}));
|
|
18196
|
-
if (cachedPaymentMethods) {
|
|
18197
|
-
for (var _i = 0, _a = cachedPaymentMethods; _i < _a.length; _i++) {
|
|
18198
|
-
var paymentMethod = _a[_i];
|
|
18199
|
-
paymentMethod.isDefault = paymentMethod.id === targetPaymentMethod.id;
|
|
18200
|
-
}
|
|
18201
|
-
queryClient.setQueryData(common.QueryKeyFactory.default.accountPaymentMethodKey({
|
|
18202
|
-
accountId: accountId,
|
|
18203
|
-
token: token,
|
|
18204
|
-
}), cachedPaymentMethods);
|
|
18205
|
-
}
|
|
18206
|
-
}
|
|
18207
|
-
react.useEffect(function () {
|
|
18208
|
-
if (setDefaultPaymentMethodLoading || !enabled)
|
|
18209
|
-
return;
|
|
18210
|
-
if ((storedPaymentMethods === null || storedPaymentMethods === void 0 ? void 0 : storedPaymentMethods.length) > 0 && !defaultPaymentMethod) {
|
|
18211
|
-
handleSetDefault(storedPaymentMethods[0]);
|
|
18212
|
-
setDefaultPaymentMethodOnCache(storedPaymentMethods[0]);
|
|
18213
|
-
}
|
|
18214
|
-
}, [
|
|
18215
|
-
storedPaymentMethods,
|
|
18216
|
-
defaultPaymentMethod,
|
|
18217
|
-
handleSetDefault,
|
|
18218
|
-
setDefaultPaymentMethodLoading,
|
|
18219
|
-
queryClient,
|
|
18220
|
-
accountId,
|
|
18221
|
-
token,
|
|
18222
|
-
]);
|
|
18223
|
-
};
|
|
18224
|
-
|
|
18225
|
-
var usePaymentMethodSelectorPlugin = function (_a) {
|
|
18226
|
-
var defaultPaymentMethod = _a.defaultPaymentMethod, defaultPaymentMethodPlugin = _a.defaultPaymentMethodPlugin, paymentMethodAllowedPlugins = _a.paymentMethodAllowedPlugins;
|
|
18227
|
-
var _b = react.useState(), selectorPaymentMethodPlugin = _b[0], setSelectorPaymentMethodPlugin = _b[1];
|
|
18228
|
-
react.useEffect(function () {
|
|
18229
|
-
if (selectorPaymentMethodPlugin) {
|
|
18230
|
-
return;
|
|
18231
|
-
}
|
|
18232
|
-
if (defaultPaymentMethod) {
|
|
18233
|
-
setSelectorPaymentMethodPlugin(defaultPaymentMethodPlugin);
|
|
18234
|
-
}
|
|
18235
|
-
else {
|
|
18236
|
-
setSelectorPaymentMethodPlugin(paymentMethodAllowedPlugins === null || paymentMethodAllowedPlugins === void 0 ? void 0 : paymentMethodAllowedPlugins[0]);
|
|
18237
|
-
}
|
|
18238
|
-
}, [
|
|
18239
|
-
defaultPaymentMethod,
|
|
18240
|
-
defaultPaymentMethodPlugin,
|
|
18241
|
-
paymentMethodAllowedPlugins,
|
|
18242
|
-
]);
|
|
18243
|
-
return {
|
|
18244
|
-
selectorPaymentMethodPlugin: selectorPaymentMethodPlugin,
|
|
18245
|
-
setSelectorPaymentMethodPlugin: setSelectorPaymentMethodPlugin,
|
|
18246
|
-
};
|
|
18247
|
-
};
|
|
18248
|
-
|
|
18249
18198
|
var SavePaymentMethodFooter = function (_a) {
|
|
18250
18199
|
var isSaving = _a.isSaving, onSave = _a.onSave, noPadding = _a.noPadding;
|
|
18251
18200
|
var isMobile = common.useIsMobile();
|
|
@@ -18407,7 +18356,7 @@ function useSave$1(_a) {
|
|
|
18407
18356
|
return { save: save, isSaving: isSaving };
|
|
18408
18357
|
}
|
|
18409
18358
|
|
|
18410
|
-
var Text$
|
|
18359
|
+
var Text$o = antd.Typography.Text;
|
|
18411
18360
|
var TEST_CARD = '4242424242424242';
|
|
18412
18361
|
var DemoPayForm = function (_a) {
|
|
18413
18362
|
var onFail = _a.onFail, onSavePaymentMethod = _a.onSavePaymentMethod, plugin = _a.plugin;
|
|
@@ -18469,7 +18418,7 @@ var DemoPayForm = function (_a) {
|
|
|
18469
18418
|
var onCardCvcChange = function (cvc) {
|
|
18470
18419
|
setCardDetails(__assign(__assign({}, cardDetails), { cvc: cvc }));
|
|
18471
18420
|
};
|
|
18472
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [jsxRuntime.jsxs(StyledInputs, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2", darkMode: darkMode !== null && darkMode !== void 0 ? darkMode : false }, { children: [jsxRuntime.jsx(DemoPayCardNumber, { onChange: onCardNumberChange, value: cardDetails.number }), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-2" }, { children: [jsxRuntime.jsx(DemoPayExpiry, { onChange: onCardExpiryChange, value: cardDetails.expiry }), jsxRuntime.jsx(DemoPayCardCvc, { onChange: onCardCvcChange, value: cardDetails.cvc })] }))] })), jsxRuntime.jsx(Text$
|
|
18421
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [jsxRuntime.jsxs(StyledInputs, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2", darkMode: darkMode !== null && darkMode !== void 0 ? darkMode : false }, { children: [jsxRuntime.jsx(DemoPayCardNumber, { onChange: onCardNumberChange, value: cardDetails.number }), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-2" }, { children: [jsxRuntime.jsx(DemoPayExpiry, { onChange: onCardExpiryChange, value: cardDetails.expiry }), jsxRuntime.jsx(DemoPayCardCvc, { onChange: onCardCvcChange, value: cardDetails.cvc })] }))] })), jsxRuntime.jsx(Text$o, { children: "DemoPay is for testing only." }), jsxRuntime.jsx(SavePaymentMethodFooter, { isSaving: isSaving, onSave: onSave })] })));
|
|
18473
18422
|
};
|
|
18474
18423
|
var StyledInputs = defaultStyled.div(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n .ant-input {\n background-color: ", " !important;\n }\n .ant-input:not(:focus) {\n border-color: ", " !important;\n }\n"], ["\n .ant-input {\n background-color: ", " !important;\n }\n .ant-input:not(:focus) {\n border-color: ", " !important;\n }\n"])), function (_a) {
|
|
18475
18424
|
var darkMode = _a.darkMode;
|
|
@@ -18700,12 +18649,11 @@ var PaymentMethodDetails = function (_a) {
|
|
|
18700
18649
|
}
|
|
18701
18650
|
};
|
|
18702
18651
|
|
|
18703
|
-
var CardIcon = function (
|
|
18704
|
-
|
|
18705
|
-
return (jsxRuntime.jsxs("svg", __assign({ className: className, width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("path", { d: "M15 3.75H3C2.17157 3.75 1.5 4.42157 1.5 5.25V12.75C1.5 13.5784 2.17157 14.25 3 14.25H15C15.8284 14.25 16.5 13.5784 16.5 12.75V5.25C16.5 4.42157 15.8284 3.75 15 3.75Z", stroke: common.SLATE_400, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M1.5 7.5H16.5", stroke: common.SLATE_400, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] })));
|
|
18652
|
+
var CardIcon = function () {
|
|
18653
|
+
return (jsxRuntime.jsxs("svg", __assign({ width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("path", { d: "M15 3.75H3C2.17157 3.75 1.5 4.42157 1.5 5.25V12.75C1.5 13.5784 2.17157 14.25 3 14.25H15C15.8284 14.25 16.5 13.5784 16.5 12.75V5.25C16.5 4.42157 15.8284 3.75 15 3.75Z", stroke: common.SLATE_400, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M1.5 7.5H16.5", stroke: common.SLATE_400, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] })));
|
|
18706
18654
|
};
|
|
18707
18655
|
|
|
18708
|
-
var Text$
|
|
18656
|
+
var Text$n = antd.Typography.Text;
|
|
18709
18657
|
var PaymentMethodSelector = function (_a) {
|
|
18710
18658
|
var paymentMethodAllowedPlugins = _a.paymentMethodAllowedPlugins, onSelect = _a.onSelect, value = _a.value;
|
|
18711
18659
|
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: paymentMethodAllowedPlugins === null || paymentMethodAllowedPlugins === void 0 ? void 0 : paymentMethodAllowedPlugins.map(function (plugin, index) { return (jsxRuntime.jsx(PaymentOption, { name: plugin.name, onClick: onSelect, paymentPlugin: plugin, selected: (value === null || value === void 0 ? void 0 : value.id) === plugin.id }, index)); }) })));
|
|
@@ -18714,11 +18662,11 @@ var PaymentOption = function (_a) {
|
|
|
18714
18662
|
var selected = _a.selected, paymentPlugin = _a.paymentPlugin, onClick = _a.onClick, name = _a.name;
|
|
18715
18663
|
var brandColor = react.useContext(BrandContext).brandColor;
|
|
18716
18664
|
var darkMode = react.useContext(BunnyContext).darkMode;
|
|
18717
|
-
var isAch = name === null || name === void 0 ? void 0 : name.toLowerCase().includes(
|
|
18718
|
-
var isCard = name === null || name === void 0 ? void 0 : name.toLowerCase().includes(
|
|
18719
|
-
return (jsxRuntime.jsxs(PaymentOptionContainer, __assign({ "$brandColor": brandColor, "$selected": selected, className: "bunny-flex bunny-justify-between bunny-items-center bunny-cursor-pointer bunny-py-2 bunny-rounded bunny-border-solid ".concat(darkMode
|
|
18665
|
+
var isAch = name === null || name === void 0 ? void 0 : name.toLowerCase().includes("ach");
|
|
18666
|
+
var isCard = name === null || name === void 0 ? void 0 : name.toLowerCase().includes("card");
|
|
18667
|
+
return (jsxRuntime.jsxs(PaymentOptionContainer, __assign({ "$brandColor": brandColor, "$selected": selected, className: "bunny-flex bunny-justify-between bunny-items-center bunny-w-full bunny-cursor-pointer bunny-py-2 bunny-px-4 bunny-rounded bunny-border-solid ".concat(darkMode
|
|
18720
18668
|
? "var(--row-background-dark) border-gray-500"
|
|
18721
|
-
:
|
|
18669
|
+
: "bunny-bg-slate-50 bunny-border-slate-200", " bunny-border"), onClick: function () { return onClick(paymentPlugin); } }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-2 bunny-items-center" }, { children: [jsxRuntime.jsx(antd.Checkbox, { checked: selected, className: darkMode ? "border-gray-400" : "" }), jsxRuntime.jsx(Text$n, { children: name })] })), isAch ? (jsxRuntime.jsx(icons.BankOutlined, { className: "bunny-text-slate-400" })) : isCard ? (jsxRuntime.jsx(CardIcon, {})) : (jsxRuntime.jsx(CardIcon, {}))] })));
|
|
18722
18670
|
};
|
|
18723
18671
|
var PaymentOptionContainer = defaultStyled.div(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n transition: border 0.3s ease;\n\n ", "\n\n &:hover {\n border-color: ", ";\n }\n"], ["\n transition: border 0.3s ease;\n\n ", "\n\n &:hover {\n border-color: ", ";\n }\n"])), function (_a) {
|
|
18724
18672
|
var $brandColor = _a.$brandColor, $selected = _a.$selected;
|
|
@@ -18928,7 +18876,7 @@ function StripeWrapper(_a) {
|
|
|
18928
18876
|
}
|
|
18929
18877
|
|
|
18930
18878
|
function Invoice(_a) {
|
|
18931
|
-
var id = _a.id, invoiceQuoteViewComponent = _a.invoiceQuoteViewComponent, backButtonName = _a.backButtonName, onBackButtonClick = _a.onBackButtonClick, onInvoiceDownloadError = _a.onInvoiceDownloadError, onPaymentSuccess = _a.onPaymentSuccess, _b = _a.shadow, shadow = _b === void 0 ?
|
|
18879
|
+
var id = _a.id, invoiceQuoteViewComponent = _a.invoiceQuoteViewComponent, backButtonName = _a.backButtonName, onBackButtonClick = _a.onBackButtonClick, onInvoiceDownloadError = _a.onInvoiceDownloadError, onPaymentSuccess = _a.onPaymentSuccess, _b = _a.shadow, shadow = _b === void 0 ? "shadow-md" : _b, className = _a.className, _c = _a.hideDownloadButton, hideDownloadButton = _c === void 0 ? false : _c, onInvoiceLoaded = _a.onInvoiceLoaded;
|
|
18932
18880
|
return (jsxRuntime.jsx(InvoiceQuoteContext.Provider, __assign({ value: {
|
|
18933
18881
|
id: id,
|
|
18934
18882
|
invoiceQuoteViewComponent: invoiceQuoteViewComponent,
|
|
@@ -18955,10 +18903,10 @@ function ActualInvoice() {
|
|
|
18955
18903
|
// Queries
|
|
18956
18904
|
var formattedInvoice = reactQuery.useQuery({
|
|
18957
18905
|
queryKey: common.QueryKeyFactory.default.createFormattedInvoiceKey({ id: id, token: token }),
|
|
18958
|
-
queryFn: function () { return common.getFormattedInvoice({ id: id, token: token, apiHost: apiHost
|
|
18906
|
+
queryFn: function () { return common.getFormattedInvoice({ id: id, token: token, apiHost: apiHost }); },
|
|
18959
18907
|
}).data;
|
|
18960
18908
|
// Derived state
|
|
18961
|
-
var isInvoicePayable = common.PAYABLE_INVOICE_STATES.includes((formattedInvoice === null || formattedInvoice === void 0 ? void 0 : formattedInvoice.state) ||
|
|
18909
|
+
var isInvoicePayable = common.PAYABLE_INVOICE_STATES.includes((formattedInvoice === null || formattedInvoice === void 0 ? void 0 : formattedInvoice.state) || "");
|
|
18962
18910
|
// Local state
|
|
18963
18911
|
var isMobile = common.useIsMobile(isInvoicePayable ? common.BreakpointNumbers.lg : undefined);
|
|
18964
18912
|
var onSuccess = function () {
|
|
@@ -18971,7 +18919,7 @@ function ActualInvoice() {
|
|
|
18971
18919
|
token: token,
|
|
18972
18920
|
}),
|
|
18973
18921
|
});
|
|
18974
|
-
showSuccessNotification(
|
|
18922
|
+
showSuccessNotification("Your invoice has been paid", "Payment successful");
|
|
18975
18923
|
onPaymentSuccess === null || onPaymentSuccess === void 0 ? void 0 : onPaymentSuccess();
|
|
18976
18924
|
};
|
|
18977
18925
|
var onFail = function (error) {
|
|
@@ -18984,18 +18932,18 @@ function ActualInvoice() {
|
|
|
18984
18932
|
}, [formattedInvoice]);
|
|
18985
18933
|
if (!formattedInvoice)
|
|
18986
18934
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
18987
|
-
return (jsxRuntime.jsx("div", __assign({ className: "bunny-invoice-container" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-6
|
|
18935
|
+
return (jsxRuntime.jsx("div", __assign({ className: "bunny-invoice-container" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-6 ".concat(isMobile ? "bunny-flex-col bunny-w-full bunny-overflow-hidden" : "", " ").concat(className) }, { children: [formattedInvoice.isLegacy ? (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-w-full" }, { children: jsxRuntime.jsx(InvoicePDF, { invoiceUuid: formattedInvoice.uuid, apiHost: apiHost, token: token }) }))) : (invoiceQuoteViewComponent || (jsxRuntime.jsx(InvoiceQuoteView, { html: formattedInvoice.html, formattedInvoice: formattedInvoice, backButtonName: backButtonName, onBackButtonClick: onBackButtonClick }))), isInvoicePayable && (jsxRuntime.jsx("div", __assign({ className: "bunny-w-full ".concat(hideDownloadButton || formattedInvoice.isLegacy ? "" : "pt-12") }, { children: jsxRuntime.jsx(PaymentForm, { onPaymentSuccess: onSuccess, onFail: onFail, invoice: formattedInvoice }) })))] })) })));
|
|
18988
18936
|
}
|
|
18989
18937
|
|
|
18990
|
-
var MUTATION$
|
|
18938
|
+
var MUTATION$6 = function (id) { return "\n query formattedQuote ($id: ID) {\n formattedQuote (id: $id) {\n payableId\n acceptedAt\n acceptedByName\n amount\n amountDue\n amountsByPeriod {\n id\n name\n amount\n }\n object { documents { id filename size date url } }\n billingCity\n billingCountry\n billingState\n billingStreet\n billingZip\n contactName\n currency\n customerBillingCity\n customerBillingCountry\n customerBillingState\n customerBillingStreet\n customerBillingZip\n customerName\n discount\n discountValue\n duration\n endDate\n expiresAt\n html\n formattedLines {\n amount\n amountsByPeriod {\n quantity\n id\n name\n startDate\n endDate\n amount\n amountsByTier {\n id\n tier {\n starts\n ends\n price\n }\n quantity\n amount\n }\n prorationRate\n }\n billingPeriodEnd\n billingPeriodStart\n chargeType\n discount\n frequency\n isRamp\n periods\n planName\n position\n price\n priceDecimals\n priceListChargeId\n priceListChargeName\n priceListId\n priceListName\n priceTiers {\n price\n starts\n }\n pricingModel\n productName\n prorationRate\n quantity\n showProductNameOnLineItem\n taxCode\n trialEndDate\n trialStartDate\n unitOfMeasure\n vatCode\n }\n netPaymentDays\n notes\n number\n poNumberRequired\n salesContactEmail\n sharedAt\n startDate\n state\n subtotal\n taxAmount\n taxNumberLabel\n taxNumberRequired\n vendorName\n }\n }"; };
|
|
18991
18939
|
var getFormattedQuote = function (_a) {
|
|
18992
18940
|
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
18993
18941
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
18994
18942
|
var response;
|
|
18995
18943
|
return __generator(this, function (_b) {
|
|
18996
18944
|
switch (_b.label) {
|
|
18997
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
18998
|
-
query: MUTATION$
|
|
18945
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
18946
|
+
query: MUTATION$6(),
|
|
18999
18947
|
token: token,
|
|
19000
18948
|
apiHost: apiHost,
|
|
19001
18949
|
vars: { id: id },
|
|
@@ -19267,7 +19215,7 @@ var AcceptQuoteModal = function (_a) {
|
|
|
19267
19215
|
}, open: acceptBoxVisible, title: "Accept quote", width: 400 }, { children: jsxRuntime.jsxs(antd.Form, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2", form: form, layout: "vertical" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Your name", name: "name", rules: createRules(true, "Your name") }, { children: jsxRuntime.jsx(antd.Input, { autoFocus: true, ref: firstInputRef }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Your job title", name: "title", rules: createRules(true, "Your job title") }, { children: jsxRuntime.jsx(antd.Input, {}) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Purchase order number", name: "poNumber", rules: createRules(poNumberRequired, "Purchase order number") }, { children: jsxRuntime.jsx(antd.Input, {}) })), taxNumberRequired && (jsxRuntime.jsx(antd.Form.Item, __assign({ name: "taxNumber", label: taxNumberLabel, rules: createRules(taxNumberRequired, taxNumberLabel) }, { children: jsxRuntime.jsx(antd.Input, {}) })))] })) })));
|
|
19268
19216
|
};
|
|
19269
19217
|
|
|
19270
|
-
var Text$
|
|
19218
|
+
var Text$m = antd.Typography.Text;
|
|
19271
19219
|
defaultStyled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n span {\n width: 100%;\n }\n"], ["\n span {\n width: 100%;\n }\n"])));
|
|
19272
19220
|
function Quote(_a) {
|
|
19273
19221
|
var id = _a.id, invoiceQuoteViewComponent = _a.invoiceQuoteViewComponent, onInvoiceDownloadError = _a.onInvoiceDownloadError, onPaymentSuccess = _a.onPaymentSuccess, _b = _a.shadow, shadow = _b === void 0 ? 'shadow-md' : _b, className = _a.className, _c = _a.hideDownloadButton, hideDownloadButton = _c === void 0 ? false : _c, onQuoteLoaded = _a.onQuoteLoaded;
|
|
@@ -19336,20 +19284,20 @@ function ActualQuote() {
|
|
|
19336
19284
|
var isAccepted = formattedQuote.state === 'ACCEPTED';
|
|
19337
19285
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 ".concat(isMobile ? 'bunny-w-full bunny-overflow-hidden' : '', " ").concat(className) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-justify-end bunny-items-center bunny-gap-4", id: "acceptance", style: {
|
|
19338
19286
|
color: entityBranding.secondaryColor,
|
|
19339
|
-
} }, { children: [isAccepted && formattedQuote.acceptedAt ? (jsxRuntime.jsx(Text$
|
|
19287
|
+
} }, { children: [isAccepted && formattedQuote.acceptedAt ? (jsxRuntime.jsx(Text$m, { children: "Quote was accepted by ".concat(formattedQuote.acceptedByName, " on ").concat(common.formatDate(formattedQuote.acceptedAt)) })) : null, (!isMobile || !isAccepted) && (jsxRuntime.jsxs("div", __assign({ className: isMobile ? 'flex w-full justify-end gap-2' : 'flex items-center justify-end gap-2' }, { children: [!isMobile && !hideDownloadButton ? (jsxRuntime.jsx(antd.Button, __assign({ icon: jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: function () { return downloadFile(apiHost + '/api/pdf/quote', token); } }, { children: "Download" }))) : null, !isAccepted ? (jsxRuntime.jsx(antd.Button, __assign({ disabled: isExpired || isAccepting, onClick: function () { return startAcceptance(); }, type: "primary" }, { children: isExpired ? 'Quote is expired' : 'Accept quote' }))) : null] })))] })), jsxRuntime.jsx(InvoiceQuoteView, __assign({ html: formattedQuote.html }, { children: ((_b = (_a = formattedQuote.object) === null || _a === void 0 ? void 0 : _a.documents) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: formattedQuote.object.documents.map(function (doc, index) {
|
|
19340
19288
|
return (jsxRuntime.jsx(antd.Button, __assign({ download: doc.filename, href: doc.url, type: "link" }, { children: doc.filename }), index));
|
|
19341
19289
|
}) }))) : null }))] })), jsxRuntime.jsx(AcceptQuoteModal, { acceptBoxVisible: acceptBoxVisible, formattedQuote: formattedQuote, setAcceptBoxVisible: setAcceptBoxVisible, setIsAccepting: setIsAccepting, sendAccept: sendAccept }), jsxRuntime.jsx(PandadocPollingModal, { isVisible: pandadocPollingModalVisible, setVisible: setPandadocPollingModalVisible, id: id })] }));
|
|
19342
19290
|
}
|
|
19343
19291
|
var templateObject_1$7;
|
|
19344
19292
|
|
|
19345
|
-
var QUOTES_QUERY = function (filter) { return "\n query quotes {\n quotes ".concat(filter ? "(".concat(filter, ")") :
|
|
19293
|
+
var QUOTES_QUERY = function (filter) { return "\n query quotes {\n quotes ".concat(filter ? "(".concat(filter, ")") : "", " {\n pageInfo {\n startCursor\n endCursor\n hasNextPage\n hasPreviousPage\n }\n nodes {\n id\n name\n account {\n name\n id\n }\n applicationDate\n state\n createdAt\n expiresAt\n currencyId\n amount\n number\n }\n }\n }"); };
|
|
19346
19294
|
var getQuotes = function (_a) {
|
|
19347
19295
|
var token = _a.token, apiHost = _a.apiHost, filter = _a.filter;
|
|
19348
19296
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19349
19297
|
var response;
|
|
19350
19298
|
return __generator(this, function (_b) {
|
|
19351
19299
|
switch (_b.label) {
|
|
19352
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
19300
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
19353
19301
|
query: QUOTES_QUERY(filter),
|
|
19354
19302
|
token: token,
|
|
19355
19303
|
vars: {},
|
|
@@ -19427,10 +19375,10 @@ var getColor = function (state) {
|
|
|
19427
19375
|
}
|
|
19428
19376
|
};
|
|
19429
19377
|
|
|
19430
|
-
var Text$
|
|
19378
|
+
var Text$l = antd.Typography.Text;
|
|
19431
19379
|
var TransactionDate = function (_a) {
|
|
19432
19380
|
var date = _a.date;
|
|
19433
|
-
return jsxRuntime.jsx(Text$
|
|
19381
|
+
return jsxRuntime.jsx(Text$l, __assign({ className: "bunny-text-sm" }, { children: common.formatDate(date) }));
|
|
19434
19382
|
};
|
|
19435
19383
|
|
|
19436
19384
|
var ArrowDownToLine = function (_a) {
|
|
@@ -19467,13 +19415,13 @@ var TransactionGridCell = defaultStyled.div.withConfig({
|
|
|
19467
19415
|
}, common.SLATE_600);
|
|
19468
19416
|
var templateObject_1$6;
|
|
19469
19417
|
|
|
19470
|
-
var Text$
|
|
19418
|
+
var Text$k = antd.Typography.Text;
|
|
19471
19419
|
var TransactionsEmptyState = function () {
|
|
19472
19420
|
var noTransactionsMessage = react.useContext(TransactionsListContext).noTransactionsMessage;
|
|
19473
|
-
return (jsxRuntime.jsx(Text$
|
|
19421
|
+
return (jsxRuntime.jsx(Text$k, __assign({ className: "bunny-flex bunny-justify-center bunny-p-4 bunny-text-base" }, { children: noTransactionsMessage || "There are no transactions" })));
|
|
19474
19422
|
};
|
|
19475
19423
|
|
|
19476
|
-
var Text$
|
|
19424
|
+
var Text$j = antd.Typography.Text;
|
|
19477
19425
|
var isInvoice = function (transaction) {
|
|
19478
19426
|
return transaction.kind === "INVOICE";
|
|
19479
19427
|
};
|
|
@@ -19485,7 +19433,7 @@ var TransactionRowTitle = function (_a) {
|
|
|
19485
19433
|
if (!isInvoice(transaction) && !isQuote(transaction)) {
|
|
19486
19434
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
19487
19435
|
}
|
|
19488
|
-
return (jsxRuntime.jsx(Text$
|
|
19436
|
+
return (jsxRuntime.jsx(Text$j, __assign({ className: "bunny-text-slate-400", style: { fontSize: "11px" } }, { children: transaction.transactionable.number })));
|
|
19489
19437
|
};
|
|
19490
19438
|
|
|
19491
19439
|
function transactionDateToDisplay(transaction, transactionDateType) {
|
|
@@ -19504,7 +19452,7 @@ function transactionDateToDisplay(transaction, transactionDateType) {
|
|
|
19504
19452
|
}
|
|
19505
19453
|
}
|
|
19506
19454
|
|
|
19507
|
-
var Text$
|
|
19455
|
+
var Text$i = antd.Typography.Text;
|
|
19508
19456
|
var TransactionsListDesktop = function (_a) {
|
|
19509
19457
|
var transactions = _a.transactions, onTransactionClick = _a.onTransactionClick;
|
|
19510
19458
|
var _b = react.useContext(TransactionsListContext), columns = _b.columns, transactionDateType = _b.transactionDateType;
|
|
@@ -19533,11 +19481,11 @@ var TransactionsListDesktop = function (_a) {
|
|
|
19533
19481
|
!showState &&
|
|
19534
19482
|
!showAmount &&
|
|
19535
19483
|
!showDownload &&
|
|
19536
|
-
!showAccountName && (jsxRuntime.jsx(TransactionGridCell, { children: jsxRuntime.jsx(Text$
|
|
19484
|
+
!showAccountName && (jsxRuntime.jsx(TransactionGridCell, { children: jsxRuntime.jsx(Text$i, { children: "No columns selected" }) })), showDate && (jsxRuntime.jsx(TransactionGridCell, __assign({ right: false }, { children: jsxRuntime.jsx(TransactionDate, { date: transactionDateToDisplay(transaction, transactionDateType) }) }))), showTitle && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(TransactionGridCell, __assign({ right: false, className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [jsxRuntime.jsx(Text$i, { children: lodashExports.capitalize(transaction.kind.toLowerCase()) }), jsxRuntime.jsx(TransactionRowTitle, { transaction: transaction })] })) })), showAccountName && (jsxRuntime.jsx(TransactionGridCell, __assign({ right: false }, { children: jsxRuntime.jsx(Text$i, { children: (_a = transaction.account) === null || _a === void 0 ? void 0 : _a.name }) }))), !showDate && !showTitle && !showAccountName && (jsxRuntime.jsx(TransactionGridCell, { right: false })), showDownload && (jsxRuntime.jsx(TransactionGridCell, { children: jsxRuntime.jsx(TransactionDownload, { transaction: transaction, token: token, apiHost: apiHost }) })), showState ? (jsxRuntime.jsx(TransactionGridCell, __assign({ right: true }, { children: jsxRuntime.jsx(StateTag, { state: transaction.state }) }))) : null, showAmount && (jsxRuntime.jsx(TransactionGridCell, __assign({ right: true }, { children: jsxRuntime.jsx(Text$i, { children: common.formatCurrency(((_b = transaction === null || transaction === void 0 ? void 0 : transaction.transactionable) === null || _b === void 0 ? void 0 : _b.amount) || transaction.amount, transaction.currencyId) }) })))] }), index));
|
|
19537
19485
|
}) }));
|
|
19538
19486
|
};
|
|
19539
19487
|
|
|
19540
|
-
var Text$
|
|
19488
|
+
var Text$h = antd.Typography.Text;
|
|
19541
19489
|
var TransactionsListMobile = function (_a) {
|
|
19542
19490
|
var transactions = _a.transactions, onTransactionClick = _a.onTransactionClick;
|
|
19543
19491
|
var _b = react.useContext(TransactionsListContext), columns = _b.columns, transactionDateType = _b.transactionDateType;
|
|
@@ -19560,12 +19508,12 @@ var TransactionsListMobile = function (_a) {
|
|
|
19560
19508
|
backgroundColor: index % 2 === 0
|
|
19561
19509
|
? "var(--row-background".concat(darkMode ? "-dark" : "", ")")
|
|
19562
19510
|
: "var(--row-background-alternate".concat(darkMode ? "-dark" : "", ")"),
|
|
19563
|
-
} }, { children: [jsxRuntime.jsx(TransactionGridCell, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [(showTitle || showState) && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showTitle && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Text$
|
|
19511
|
+
} }, { children: [jsxRuntime.jsx(TransactionGridCell, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [(showTitle || showState) && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showTitle && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Text$h, { children: lodashExports.capitalize(transaction.kind.toLowerCase()) }), jsxRuntime.jsx(TransactionRowTitle, { transaction: transaction })] })), showState && jsxRuntime.jsx(StateTag, { state: transaction.state })] }))), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showAccountName && jsxRuntime.jsx(Text$h, { children: (_a = transaction.account) === null || _a === void 0 ? void 0 : _a.name }), showAccountName && showDate && jsxRuntime.jsx(Text$h, { children: "\u00B7" }), showDate && (jsxRuntime.jsx(TransactionDate, { date: transactionDateToDisplay(transaction, transactionDateType) })), showDate && showAmount && jsxRuntime.jsx(Text$h, { children: "\u00B7" }), showAmount && (jsxRuntime.jsx(Text$h, { children: common.formatCurrency(transaction.transactionable.amount ||
|
|
19564
19512
|
transaction.amount, transaction.currencyId) }))] }))] })) }), showDownload && (jsxRuntime.jsx(TransactionGridCell, __assign({ right: true }, { children: jsxRuntime.jsx(TransactionDownload, { transaction: transaction, token: token, apiHost: apiHost }) })))] }), index));
|
|
19565
19513
|
}) }));
|
|
19566
19514
|
};
|
|
19567
19515
|
|
|
19568
|
-
var Text$
|
|
19516
|
+
var Text$g = antd.Typography.Text;
|
|
19569
19517
|
var DISPLAY_WIDTH = 1200;
|
|
19570
19518
|
function Transactions(_a) {
|
|
19571
19519
|
var transactionComponent = _a.transactionComponent, _b = _a.showSearchBar, showSearchBar = _b === void 0 ? true : _b, _c = _a.showTitle, showTitle = _c === void 0 ? true : _c, _d = _a.title, title = _d === void 0 ? "Past transactions" : _d, _e = _a.columns, columns = _e === void 0 ? ["date", "title", "state", "amount", "download"] : _e, className = _a.className, _f = _a.shadow, shadow = _f === void 0 ? "shadow-md" : _f, searchBarClassName = _a.searchBarClassName, _g = _a.useModal, useModal = _g === void 0 ? false : _g, onTransactionClick = _a.onTransactionClick, _h = _a.suppressTransactionDisplay, suppressTransactionDisplay = _h === void 0 ? false : _h, _j = _a.kindsToShow, kindsToShow = _j === void 0 ? [
|
|
@@ -19678,7 +19626,7 @@ function TransactionsDisplay(_a) {
|
|
|
19678
19626
|
onTransactionDisplayClose === null || onTransactionDisplayClose === void 0 ? void 0 : onTransactionDisplayClose(selectedTransaction);
|
|
19679
19627
|
setDrawerOpen(false);
|
|
19680
19628
|
}
|
|
19681
|
-
return (jsxRuntime.jsxs("div", __assign({ style: style }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-full bunny-shadow-padding-xb bunny-gap-2 ".concat(isMobile ? "bunny-overflow-hidden" : "", " ").concat(className) }, { children: [showTitle || showSearchBar ? (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex ".concat(isMobile ? "bunny-flex-col bunny-gap-1" : "bunny-flex-row bunny-items-center", " bunny-justify-between") }, { children: [showTitle ? (jsxRuntime.jsx(Text$
|
|
19629
|
+
return (jsxRuntime.jsxs("div", __assign({ style: style }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-full bunny-shadow-padding-xb bunny-gap-2 ".concat(isMobile ? "bunny-overflow-hidden" : "", " ").concat(className) }, { children: [showTitle || showSearchBar ? (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex ".concat(isMobile ? "bunny-flex-col bunny-gap-1" : "bunny-flex-row bunny-items-center", " bunny-justify-between") }, { children: [showTitle ? (jsxRuntime.jsx(Text$g, __assign({ className: "bunny-shrink-0 bunny-font-medium", style: { color: darkMode ? undefined : secondaryColor } }, { children: title }))) : (jsxRuntime.jsx("div", {}) // Empty div so justify-between works
|
|
19682
19630
|
), showSearchBar && (jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "bunny-w-full" : "") }, { children: jsxRuntime.jsx(antd.Input, { className: searchBarClassName
|
|
19683
19631
|
? searchBarClassName
|
|
19684
19632
|
: "border border-slate-200", onChange: function (e) {
|
|
@@ -19796,7 +19744,7 @@ function QuotesWrapper() {
|
|
|
19796
19744
|
return (jsxRuntime.jsx(TransactionsDisplay, { transactions: quotesAsTransactions, onSearchValueChanged: setSearch, search: search }));
|
|
19797
19745
|
}
|
|
19798
19746
|
|
|
19799
|
-
var MUTATION$
|
|
19747
|
+
var MUTATION$5 = function () { return "\nmutation AccountSignup (\n $pluginId: String!,\n $paymentMethodId: String,\n $priceListCode: String!,\n $accountId: ID!,\n $quoteId: ID!,\n $entityId: ID!\n) {\n accountSignup(\n pluginId: $pluginId,\n paymentMethodId: $paymentMethodId,\n priceListCode: $priceListCode,\n accountId: $accountId,\n quoteId: $quoteId,\n entityId: $entityId\n ) {\n errors\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n }\n}"; };
|
|
19800
19748
|
var accountSignup = function (_a) {
|
|
19801
19749
|
var token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId, quoteId = _a.quoteId, paymentToken = _a.paymentToken, paymentMethodId = _a.paymentMethodId, pluginId = _a.pluginId, priceListCode = _a.priceListCode, entityId = _a.entityId;
|
|
19802
19750
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -19814,8 +19762,8 @@ var accountSignup = function (_a) {
|
|
|
19814
19762
|
priceListCode: priceListCode,
|
|
19815
19763
|
entityId: entityId,
|
|
19816
19764
|
};
|
|
19817
|
-
return [4 /*yield*/, gqlRequest({
|
|
19818
|
-
query: MUTATION$
|
|
19765
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
19766
|
+
query: MUTATION$5(),
|
|
19819
19767
|
token: token,
|
|
19820
19768
|
vars: vars,
|
|
19821
19769
|
apiHost: apiHost,
|
|
@@ -19831,7 +19779,7 @@ var accountSignup = function (_a) {
|
|
|
19831
19779
|
});
|
|
19832
19780
|
};
|
|
19833
19781
|
|
|
19834
|
-
var MUTATION$
|
|
19782
|
+
var MUTATION$4 = function () { return "\nmutation QuoteAccountSignup (\n $accountName: String!,\n $billingContact: ContactAttributes!,\n $priceListCode: String!,\n $entityId: ID!\n) {\n quoteAccountSignup(\n priceListCode: $priceListCode,\n accountName: $accountName,\n billingContact: $billingContact,\n entityId: $entityId\n ) {\n account {\n id\n }\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n tenant {\n code\n }\n portalSessionToken\n errors\n }\n}"; };
|
|
19835
19783
|
var quoteAccountSignup = function (_a) {
|
|
19836
19784
|
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact, entityId = _a.entityId;
|
|
19837
19785
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -19846,8 +19794,8 @@ var quoteAccountSignup = function (_a) {
|
|
|
19846
19794
|
billingContact: billingContact,
|
|
19847
19795
|
entityId: entityId,
|
|
19848
19796
|
};
|
|
19849
|
-
return [4 /*yield*/, gqlRequest({
|
|
19850
|
-
query: MUTATION$
|
|
19797
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
19798
|
+
query: MUTATION$4(),
|
|
19851
19799
|
token: token,
|
|
19852
19800
|
vars: vars,
|
|
19853
19801
|
apiHost: apiHost,
|
|
@@ -19863,41 +19811,14 @@ var quoteAccountSignup = function (_a) {
|
|
|
19863
19811
|
});
|
|
19864
19812
|
};
|
|
19865
19813
|
|
|
19866
|
-
var MUTATION$
|
|
19867
|
-
var quoteAddCoupon = function (_a) {
|
|
19868
|
-
var quoteId = _a.quoteId, couponCode = _a.couponCode, token = _a.token, apiHost = _a.apiHost;
|
|
19869
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
19870
|
-
var vars, response, errors;
|
|
19871
|
-
var _b;
|
|
19872
|
-
return __generator(this, function (_c) {
|
|
19873
|
-
switch (_c.label) {
|
|
19874
|
-
case 0:
|
|
19875
|
-
vars = { quoteId: quoteId, couponCode: couponCode };
|
|
19876
|
-
return [4 /*yield*/, gqlRequest({
|
|
19877
|
-
query: MUTATION$4,
|
|
19878
|
-
token: token,
|
|
19879
|
-
vars: vars,
|
|
19880
|
-
apiHost: apiHost,
|
|
19881
|
-
})];
|
|
19882
|
-
case 1:
|
|
19883
|
-
response = _c.sent();
|
|
19884
|
-
errors = (_b = response === null || response === void 0 ? void 0 : response.quoteAddCoupon) === null || _b === void 0 ? void 0 : _b.errors;
|
|
19885
|
-
if (errors)
|
|
19886
|
-
throw errors;
|
|
19887
|
-
return [2 /*return*/, response.quote];
|
|
19888
|
-
}
|
|
19889
|
-
});
|
|
19890
|
-
});
|
|
19891
|
-
};
|
|
19892
|
-
|
|
19893
|
-
var MUTATION$3 = function () { return "\nquery PriceList($code: String!) {\n priceList (code: $code) {\n basePrice\n code\n createdAt\n currencyId\n id\n isVisible\n name\n periodMonths\n planId\n priceDescription\n productId\n product {\n name\n }\n sku\n trialAllowed\n trialLengthDays\n updatedAt\n }\n}"; };
|
|
19814
|
+
var MUTATION$3 = function () { return "\nquery PriceList($code: String!) {\n priceList (code: $code) {\n basePrice\n code\n createdAt\n currencyId\n id\n isVisible\n name\n periodMonths\n planId\n priceDescription\n productId\n sku\n trialAllowed\n trialLengthDays\n updatedAt\n }\n}"; };
|
|
19894
19815
|
var getPriceList = function (_a) {
|
|
19895
19816
|
var token = _a.token, code = _a.code, apiHost = _a.apiHost;
|
|
19896
19817
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19897
19818
|
var response;
|
|
19898
19819
|
return __generator(this, function (_b) {
|
|
19899
19820
|
switch (_b.label) {
|
|
19900
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
19821
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
19901
19822
|
query: MUTATION$3(),
|
|
19902
19823
|
token: token,
|
|
19903
19824
|
vars: { code: code },
|
|
@@ -19911,105 +19832,52 @@ var getPriceList = function (_a) {
|
|
|
19911
19832
|
});
|
|
19912
19833
|
};
|
|
19913
19834
|
|
|
19914
|
-
var QUOTE_QUERY = function (id) { return "\n query quote {\n quote(id: ".concat(id, ") {\n accountId\n amount\n amountDue\n smallUnitAmountDue\n currencyId\n formattedQuote {\n html\n }\n id\n payableId\n periodAmount\n subtotal\n taxAmount\n amountsByPeriod {\n amount\n startDate\n }\n quoteChanges {\n currencyId\n id\n kind\n charges {\n amountsByPeriod {\n amount\n startDate\n }\n amount\n billingPeriod\n currencyId\n feature {\n unitName\n }\n id\n name\n priceListCharge {\n id\n }\n priceList {\n id\n }\n couponId\n quantity\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n\n }\n }\n }"); };
|
|
19915
|
-
var getQuote = function (_a) {
|
|
19916
|
-
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
19917
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
19918
|
-
var response;
|
|
19919
|
-
return __generator(this, function (_b) {
|
|
19920
|
-
switch (_b.label) {
|
|
19921
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
19922
|
-
query: QUOTE_QUERY(id),
|
|
19923
|
-
token: token,
|
|
19924
|
-
vars: {},
|
|
19925
|
-
apiHost: apiHost,
|
|
19926
|
-
})];
|
|
19927
|
-
case 1:
|
|
19928
|
-
response = _b.sent();
|
|
19929
|
-
return [2 /*return*/, response === null || response === void 0 ? void 0 : response.quote];
|
|
19930
|
-
}
|
|
19931
|
-
});
|
|
19932
|
-
});
|
|
19933
|
-
};
|
|
19934
|
-
|
|
19935
|
-
var useCurrentUserData = function () {
|
|
19936
|
-
var queryClient = reactQuery.useQueryClient();
|
|
19937
|
-
var token = useToken();
|
|
19938
|
-
var currentUser = queryClient.getQueryData(common.QueryKeyFactory.default.currentUserKey(token));
|
|
19939
|
-
if (!currentUser)
|
|
19940
|
-
return {};
|
|
19941
|
-
return currentUser;
|
|
19942
|
-
};
|
|
19943
|
-
|
|
19944
|
-
var BunnyFooterIcon = function (_a) {
|
|
19945
|
-
var color = _a.color;
|
|
19946
|
-
return (jsxRuntime.jsxs("svg", __assign({ width: "45", height: "15", viewBox: "0 0 39 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsxs("g", __assign({ clipPath: "url(#clip0_6_851)" }, { children: [jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M14.5898 7.19708C14.5898 9.35053 13.0926 10.325 11.2495 10.325C9.39955 10.325 7.90234 9.35001 7.90234 7.18967V3.26221H10.1125V7.00052C10.1125 7.87719 10.5855 8.27725 11.2495 8.27725C11.9061 8.27725 12.3865 7.87719 12.3865 7.00052V3.26221H14.5898V7.19708Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M31.8943 12.9625H29.4793L31.8523 8.62816L28.9355 3.26221H31.4708L33.0457 6.35524L34.5924 3.26221H37.0075L31.8943 12.9625Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M15.1602 5.96827C15.1602 3.8148 16.6574 2.84033 18.5005 2.84033C20.3504 2.84033 21.8476 3.81533 21.8476 5.97568V10.1473H19.6374V6.16483C19.6374 5.28815 19.1645 4.8881 18.5005 4.8881C17.8439 4.8881 17.3634 5.28815 17.3634 6.16483V10.1473H15.1602V5.96827Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M22.4316 5.96827C22.4316 3.8148 23.9289 2.84033 25.7719 2.84033C27.6219 2.84033 29.1191 3.81533 29.1191 5.97568V10.1473H26.9089V6.16483C26.9089 5.28815 26.4359 4.8881 25.7719 4.8881C25.1154 4.8881 24.6349 5.28815 24.6349 6.16483V10.1473H22.4316V5.96827Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M7.40511 6.68957C7.40511 8.7236 6.02815 10.3227 4.17816 10.3227C3.23907 10.3227 2.61071 9.94378 2.19358 9.40371V10.1404H0.0605469V0.0405273H2.26381V3.91939C2.68041 3.42158 3.28802 3.07069 4.17763 3.07069C6.02759 3.07069 7.40511 4.66981 7.40511 6.68957ZM2.17229 6.69642C2.17229 7.60802 2.77937 8.2744 3.64823 8.2744C4.53783 8.2744 5.13107 7.59372 5.13107 6.69642C5.13107 5.79912 4.53783 5.11844 3.64823 5.11844C2.77937 5.11844 2.17229 5.78482 2.17229 6.69642Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M38.966 8.94801C38.966 9.76181 38.2668 10.4631 37.4618 10.4631C36.6499 10.4631 35.9434 9.76181 35.9434 8.94801C35.9434 8.14846 36.6494 7.46094 37.4618 7.46094C38.2668 7.46094 38.966 8.14846 38.966 8.94801Z", fill: color })] })), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", __assign({ id: "clip0_6_851" }, { children: jsxRuntime.jsx("rect", { width: "39", height: "13", fill: "white" }) })) })] })));
|
|
19947
|
-
};
|
|
19948
|
-
|
|
19949
|
-
var Text$h = antd.Typography.Text;
|
|
19950
|
-
var Footer = function (_a) {
|
|
19951
|
-
var className = _a.className;
|
|
19952
|
-
var _b = useCurrentUserData(), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
|
|
19953
|
-
var isMobile = common.useIsMobile();
|
|
19954
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-shrink-0 ".concat(isMobile ? 'bunny-flex-col bunny-gap-2 bunny-grow' : '', " ").concat(className) }, { children: [(termsUrl || privacyUrl) && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-3" }, { children: [termsUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: termsUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Terms" }))), privacyUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: privacyUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Privacy" })))] }))), jsxRuntime.jsx(BunnyMarketingLink, {})] })));
|
|
19955
|
-
};
|
|
19956
|
-
var BunnyMarketingLink = function () {
|
|
19957
|
-
var _a = react.useState(false), isHovered = _a[0], setIsHovered = _a[1];
|
|
19958
|
-
var isMobile = common.useIsMobile();
|
|
19959
|
-
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-end bunny-justify-end ".concat(isMobile ? '' : 'grow') }, { children: jsxRuntime.jsx(StyledBunnyLink, __assign({ className: "bunny-flex bunny-items-end bunny-justify-end bunny-text-slate-400", href: "https://bunny.com/", rel: "noopener noreferrer", target: "_blank" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center", onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: [jsxRuntime.jsx(Text$h, __assign({ className: "bunny-text-xs bunny-text-slate-400" }, { children: "Powered by\u00A0" })), jsxRuntime.jsx("div", __assign({ style: { paddingTop: '5px' } }, { children: jsxRuntime.jsx(BunnyFooterIcon, { color: isHovered ? common.PRIMARY_COLOR : common.SLATE_400 }) }))] })) })) })));
|
|
19960
|
-
};
|
|
19961
|
-
var StyedLink = styled__default["default"].a(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n color: ", ";\n transition: color 0.3s;\n &:hover {\n color: ", ";\n }\n text-decoration: none;\n font-size: 14px;\n"], ["\n color: ", ";\n transition: color 0.3s;\n &:hover {\n color: ", ";\n }\n text-decoration: none;\n font-size: 14px;\n"])), common.SLATE_400, common.SLATE_500);
|
|
19962
|
-
var StyledBunnyLink = styled__default["default"](StyedLink)(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n &:hover {\n color: ", " !important;\n }\n"], ["\n &:hover {\n color: ", " !important;\n }\n"])), common.PRIMARY_COLOR);
|
|
19963
|
-
var templateObject_1$5, templateObject_2$1;
|
|
19964
|
-
|
|
19965
|
-
var Title$1 = antd.Typography.Title;
|
|
19966
19835
|
function PaymentForms(_a) {
|
|
19967
19836
|
var quote = _a.quote, handlePaymentSuccess = _a.handlePaymentSuccess, handlePaymentFail = _a.handlePaymentFail, handleSubmit = _a.handleSubmit, proceedingToPayment = _a.proceedingToPayment, accountId = _a.accountId, overrideToken = _a.overrideToken, customCheckoutFunction = _a.customCheckoutFunction;
|
|
19968
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: quote ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: overrideToken ? (jsxRuntime.
|
|
19837
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: quote ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: overrideToken ? (jsxRuntime.jsx(PaymentForm, { onFail: handlePaymentFail, onPaymentSuccess: handlePaymentSuccess, accountId: accountId, quote: quote, overrideToken: overrideToken, customCheckoutFunction: customCheckoutFunction })) : null })) : (jsxRuntime.jsx(InitialSignupForm, { onSubmit: handleSubmit, submitting: proceedingToPayment })) }));
|
|
19969
19838
|
}
|
|
19970
19839
|
function InitialSignupForm(_a) {
|
|
19971
|
-
var
|
|
19840
|
+
var onSubmit = _a.onSubmit, submitting = _a.submitting;
|
|
19972
19841
|
var form = antd.Form.useForm()[0];
|
|
19973
19842
|
function handleSubmit() {
|
|
19974
19843
|
form.validateFields({ validateOnly: false }).then(function () {
|
|
19975
19844
|
onSubmit(form.getFieldsValue());
|
|
19976
19845
|
});
|
|
19977
19846
|
}
|
|
19978
|
-
return (jsxRuntime.
|
|
19979
|
-
|
|
19980
|
-
|
|
19981
|
-
|
|
19847
|
+
return (jsxRuntime.jsxs(antd.Form, __assign({ className: "bunny-flex bunny-flex-col bunny-justify-between bunny-h-full bunny-w-full", form: form, layout: "vertical", autoComplete: "off" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-space-y-2" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ name: "firstName", rules: [{ required: true, message: 'Please input your first name!' }] }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "First name" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "lastName", rules: [{ required: true, message: 'Please input your last name!' }] }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Last name" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "email", rules: [
|
|
19848
|
+
{ required: true, message: 'Please input your email!' },
|
|
19849
|
+
{ type: 'email', message: 'Please enter a valid email!' },
|
|
19850
|
+
] }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Email" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "accountName", rules: [{ required: true, message: 'Please input your company name!' }] }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Company name" }) }))] })), jsxRuntime.jsx(antd.Form.Item, { children: jsxRuntime.jsx(antd.Button, __assign({ type: "primary", onClick: handleSubmit, loading: submitting, className: "bunny-w-full bunny-mt-4" }, { children: "Proceed to payment" })) })] })));
|
|
19982
19851
|
}
|
|
19983
19852
|
|
|
19984
|
-
var Title = antd.Typography.Title, Text$
|
|
19853
|
+
var Title = antd.Typography.Title, Text$f = antd.Typography.Text;
|
|
19985
19854
|
function PaymentSuccessDisplay(_a) {
|
|
19986
19855
|
var amountPaid = _a.amountPaid, className = _a.className, companyName = _a.companyName, returnUrl = _a.returnUrl, style = _a.style, currencyId = _a.currencyId;
|
|
19987
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-justify-center bunny-h-full ".concat(className), style: style }, { children: [jsxRuntime.jsx(icons.CheckCircleFilled, { style: { fontSize: "48px", color: "rgb(52 211 153)" } }), jsxRuntime.jsxs(Title, __assign({ level: 3, className: "bunny-mt-2 bunny-m-0" }, { children: ["Payment of ", common.formatCurrency(amountPaid, currencyId), " successful"] })), returnUrl && (jsxRuntime.jsxs(Text$
|
|
19856
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-justify-center bunny-h-full ".concat(className), style: style }, { children: [jsxRuntime.jsx(icons.CheckCircleFilled, { style: { fontSize: "48px", color: "rgb(52 211 153)" } }), jsxRuntime.jsxs(Title, __assign({ level: 3, className: "bunny-mt-2 bunny-m-0" }, { children: ["Payment of ", common.formatCurrency(amountPaid, currencyId), " successful"] })), returnUrl && (jsxRuntime.jsxs(Text$f, __assign({ className: "bunny-text-slate-500 bunny-cursor-pointer bunny-underline", onClick: function () { return (window.location.href = returnUrl); } }, { children: ["Back to ", companyName] })))] })));
|
|
19988
19857
|
}
|
|
19989
19858
|
|
|
19990
|
-
var Text$
|
|
19859
|
+
var Text$e = antd.Typography.Text;
|
|
19991
19860
|
function PriceListDisplay(_a) {
|
|
19992
|
-
var priceListData = _a.priceListData;
|
|
19861
|
+
var priceListData = _a.priceListData, topNavImageUrl = _a.topNavImageUrl;
|
|
19993
19862
|
if (!priceListData)
|
|
19994
19863
|
return null;
|
|
19995
|
-
return (jsxRuntime.
|
|
19864
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-justify-between bunny-h-full bunny-my-12" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-space-y-8" }, { children: [jsxRuntime.jsx(antd.Image, { width: 24, src: topNavImageUrl, alt: "Logo", preview: false }), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col" }, { children: [jsxRuntime.jsx(Text$e, __assign({ className: "bunny-text-slate-500 bunny-font-bold bunny-text-lg" }, { children: priceListData.name })), jsxRuntime.jsxs(Text$e, __assign({ className: "bunny-font-bold bunny-text-xl" }, { children: [common.formatCurrency(priceListData.basePrice, priceListData.currencyId), " ", "/ month"] }))] })), priceListData.trialAllowed ? (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col" }, { children: [jsxRuntime.jsxs(Text$e, __assign({ style: { fontSize: "16px" }, className: "bunny-text-slate-500" }, { children: [priceListData.trialLengthDays, " day trial"] })), jsxRuntime.jsx(Text$e, __assign({ className: "bunny-text-slate-500", style: { fontSize: "12px" } }, { children: "You will not be charged until the last day of the trial." }))] }))) : null] })) })) }));
|
|
19996
19865
|
}
|
|
19997
19866
|
|
|
19998
19867
|
var showErrorNotification = common.useErrorNotification();
|
|
19999
19868
|
function Signup(_a) {
|
|
20000
|
-
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl,
|
|
19869
|
+
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, _b = _a.isCardEnabled, isCardEnabled = _b === void 0 ? true : _b, className = _a.className, _c = _a.shadow, shadow = _c === void 0 ? "shadow-md" : _c, style = _a.style, entityId = _a.entityId;
|
|
20001
19870
|
// Hooks
|
|
20002
19871
|
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
20003
19872
|
var tokenFromContexts = useToken();
|
|
20004
19873
|
var isMobile = common.useIsMobile();
|
|
20005
19874
|
var topNavImageUrl = react.useContext(BrandContext).topNavImageUrl;
|
|
20006
|
-
var
|
|
20007
|
-
var
|
|
20008
|
-
var
|
|
19875
|
+
var _d = react.useState(undefined), quote = _d[0], setQuote = _d[1];
|
|
19876
|
+
var _e = react.useState(undefined), accountId = _e[0], setAccountId = _e[1];
|
|
19877
|
+
var _f = react.useState(undefined), portalSessionToken = _f[0], setPortalSessionToken = _f[1];
|
|
20009
19878
|
var token = portalSessionToken || tokenFromContexts;
|
|
20010
|
-
var
|
|
20011
|
-
var
|
|
20012
|
-
var defaultCouponAppliedRef = react.useRef(undefined);
|
|
19879
|
+
var _g = react.useState(false), proceedingToPayment = _g[0], setProceedingToPayment = _g[1];
|
|
19880
|
+
var _h = react.useState(false), purchaseSucceeded = _h[0], setPurchaseSucceeded = _h[1];
|
|
20013
19881
|
var defaultPaymentMethod = usePaymentMethod({
|
|
20014
19882
|
accountId: accountId,
|
|
20015
19883
|
token: token,
|
|
@@ -20017,57 +19885,13 @@ function Signup(_a) {
|
|
|
20017
19885
|
}).defaultPaymentMethod;
|
|
20018
19886
|
var queryClient = reactQuery.useQueryClient();
|
|
20019
19887
|
// Queries
|
|
20020
|
-
var
|
|
20021
|
-
queryKey: [
|
|
19888
|
+
var priceListData = reactQuery.useQuery({
|
|
19889
|
+
queryKey: ["priceList", priceListCode],
|
|
20022
19890
|
queryFn: function () { return getPriceList({ token: token, apiHost: apiHost, code: priceListCode }); },
|
|
20023
|
-
})
|
|
20024
|
-
var _j = reactQuery.useQuery({
|
|
20025
|
-
queryKey: ['quote', initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id],
|
|
20026
|
-
queryFn: function () {
|
|
20027
|
-
if (!(initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id)) {
|
|
20028
|
-
throw new Error('Quote ID is required');
|
|
20029
|
-
}
|
|
20030
|
-
return getQuote({ token: token, apiHost: apiHost, id: initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id });
|
|
20031
|
-
},
|
|
20032
|
-
enabled: !!(initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id),
|
|
20033
|
-
}), data = _j.data, isLoadingQuote = _j.isLoading;
|
|
20034
|
-
var quote = data || initialQuote;
|
|
20035
|
-
var _k = reactQuery.useMutation({
|
|
20036
|
-
mutationFn: function (couponCode) {
|
|
20037
|
-
if (!quote) {
|
|
20038
|
-
throw new Error('Quote is required');
|
|
20039
|
-
}
|
|
20040
|
-
if (!token) {
|
|
20041
|
-
throw new Error('Token is required');
|
|
20042
|
-
}
|
|
20043
|
-
return quoteAddCoupon({
|
|
20044
|
-
quoteId: quote.id,
|
|
20045
|
-
couponCode: couponCode,
|
|
20046
|
-
apiHost: apiHost,
|
|
20047
|
-
token: token,
|
|
20048
|
-
});
|
|
20049
|
-
},
|
|
20050
|
-
onSuccess: function () {
|
|
20051
|
-
queryClient.refetchQueries({
|
|
20052
|
-
queryKey: ['quote', quote === null || quote === void 0 ? void 0 : quote.id],
|
|
20053
|
-
});
|
|
20054
|
-
showSuccessNotification('Coupon applied');
|
|
20055
|
-
},
|
|
20056
|
-
onError: function (error) {
|
|
20057
|
-
var _a, _b;
|
|
20058
|
-
showErrorNotification((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.errors[0]) === null || _b === void 0 ? void 0 : _b.message, 'Error adding coupon');
|
|
20059
|
-
},
|
|
20060
|
-
}), addCoupon = _k.mutate, isAddingCoupon = _k.isPending;
|
|
20061
|
-
// Handle default coupon application
|
|
20062
|
-
react.useEffect(function () {
|
|
20063
|
-
if (couponCode && (quote === null || quote === void 0 ? void 0 : quote.id) && defaultCouponAppliedRef.current !== couponCode) {
|
|
20064
|
-
addCoupon(couponCode);
|
|
20065
|
-
defaultCouponAppliedRef.current = couponCode;
|
|
20066
|
-
}
|
|
20067
|
-
}, [couponCode, quote === null || quote === void 0 ? void 0 : quote.id]);
|
|
19891
|
+
}).data;
|
|
20068
19892
|
function handleSubmit(formData) {
|
|
20069
19893
|
return __awaiter(this, void 0, void 0, function () {
|
|
20070
|
-
var
|
|
19894
|
+
var data, error_1;
|
|
20071
19895
|
return __generator(this, function (_a) {
|
|
20072
19896
|
switch (_a.label) {
|
|
20073
19897
|
case 0:
|
|
@@ -20086,9 +19910,9 @@ function Signup(_a) {
|
|
|
20086
19910
|
entityId: entityId,
|
|
20087
19911
|
})];
|
|
20088
19912
|
case 1:
|
|
20089
|
-
|
|
20090
|
-
setAccountId(
|
|
20091
|
-
setPortalSessionToken(
|
|
19913
|
+
data = _a.sent();
|
|
19914
|
+
setAccountId(data.account.id);
|
|
19915
|
+
setPortalSessionToken(data.portalSessionToken);
|
|
20092
19916
|
// We must invalidate the accountPaymentMethodKey query in order to clear payment methods from the provided api token,
|
|
20093
19917
|
// to instead use paymentMethods from portalSessionToken.
|
|
20094
19918
|
queryClient.invalidateQueries({
|
|
@@ -20098,7 +19922,7 @@ function Signup(_a) {
|
|
|
20098
19922
|
}),
|
|
20099
19923
|
});
|
|
20100
19924
|
setProceedingToPayment(false);
|
|
20101
|
-
|
|
19925
|
+
setQuote(data.quote);
|
|
20102
19926
|
return [3 /*break*/, 3];
|
|
20103
19927
|
case 2:
|
|
20104
19928
|
error_1 = _a.sent();
|
|
@@ -20124,16 +19948,16 @@ function Signup(_a) {
|
|
|
20124
19948
|
switch (_a.label) {
|
|
20125
19949
|
case 0:
|
|
20126
19950
|
if (!portalSessionToken) {
|
|
20127
|
-
throw new Error(
|
|
19951
|
+
throw new Error("Portal session token is required");
|
|
20128
19952
|
}
|
|
20129
19953
|
if (!accountId) {
|
|
20130
|
-
throw new Error(
|
|
19954
|
+
throw new Error("Account ID is required");
|
|
20131
19955
|
}
|
|
20132
19956
|
if (!(plugin === null || plugin === void 0 ? void 0 : plugin.id)) {
|
|
20133
|
-
throw new Error(
|
|
19957
|
+
throw new Error("Plugin ID is required");
|
|
20134
19958
|
}
|
|
20135
19959
|
if (!(defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.id)) {
|
|
20136
|
-
throw new Error(
|
|
19960
|
+
throw new Error("Payment method ID is required");
|
|
20137
19961
|
}
|
|
20138
19962
|
return [4 /*yield*/, accountSignup({
|
|
20139
19963
|
token: portalSessionToken,
|
|
@@ -20153,27 +19977,45 @@ function Signup(_a) {
|
|
|
20153
19977
|
function handlePaymentFail(error) {
|
|
20154
19978
|
showErrorNotification(error.response.message);
|
|
20155
19979
|
}
|
|
20156
|
-
|
|
20157
|
-
|
|
20158
|
-
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
|
|
19980
|
+
var WrapperComponent = function (_a) {
|
|
19981
|
+
var children = _a.children, className = _a.className, style = _a.style;
|
|
19982
|
+
return isCardEnabled ? (jsxRuntime.jsx(Card, __assign({ className: className, style: style }, { children: children }))) : (jsxRuntime.jsx("div", __assign({ className: className, style: style }, { children: children })));
|
|
19983
|
+
};
|
|
19984
|
+
return (jsxRuntime.jsx(WrapperComponent, __assign({ className: "bunny-p-4 bunny-flex bunny-flex-col ".concat(shadow, " ").concat(className), style: style }, { children: purchaseSucceeded ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (quote === null || quote === void 0 ? void 0 : quote.currencyId) !== undefined ? (jsxRuntime.jsx(PaymentSuccessDisplay, { amountPaid: (quote === null || quote === void 0 ? void 0 : quote.amountDue) || 0, className: "bunny-w-full", companyName: companyName, returnUrl: returnUrl, currencyId: quote === null || quote === void 0 ? void 0 : quote.currencyId })) : (jsxRuntime.jsx("div", { children: "No currency ID found from Quote" })) })) : (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex ".concat(isMobile ? "bunny-flex-col" : "bunny-flex-row", " bunny-h-full bunny-w-full") }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col ".concat(isMobile ? "bunny-items-center" : "bunny-w-1/2 bunny-items-center") }, { children: jsxRuntime.jsx(PriceListDisplay, { priceListData: priceListData, topNavImageUrl: topNavImageUrl }) })), jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "bunny-h-full" : "bunny-my-4") }, { children: jsxRuntime.jsx(antd.Divider, { className: "bunny-h-full", type: isMobile ? undefined : "vertical" }) })), jsxRuntime.jsx("div", __assign({ className: "bunny-flex ".concat(isMobile
|
|
19985
|
+
? "bunny-items-center bunny-justify-center bunny-my-12"
|
|
19986
|
+
: "bunny-w-1/2 bunny-items-center bunny-justify-center bunny-my-12") }, { children: jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "bunny-w-full" : "bunny-w-1/2") }, { children: jsxRuntime.jsx(PaymentForms, { quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: proceedingToPayment, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction }) })) }))] }))) })));
|
|
20162
19987
|
}
|
|
20163
|
-
|
|
20164
|
-
var
|
|
20165
|
-
|
|
19988
|
+
|
|
19989
|
+
var createRequestHeaders = function (token) {
|
|
19990
|
+
var bearerToken = token ? "Bearer ".concat(token) : null;
|
|
19991
|
+
var headers = {
|
|
19992
|
+
"Content-type": "application/json; charset=utf-8",
|
|
19993
|
+
};
|
|
19994
|
+
if (bearerToken) {
|
|
19995
|
+
headers["Authorization"] = bearerToken;
|
|
19996
|
+
}
|
|
19997
|
+
return headers;
|
|
19998
|
+
};
|
|
19999
|
+
var getGraphQLBaseURL = function (apiHost) {
|
|
20000
|
+
return "".concat(apiHost, "/graphql");
|
|
20001
|
+
};
|
|
20002
|
+
var useGraphQLRequest = function () {
|
|
20003
|
+
return function (query, apiHost, token, variables) { return __awaiter(void 0, void 0, void 0, function () {
|
|
20004
|
+
var error_1;
|
|
20005
|
+
return __generator(this, function (_a) {
|
|
20006
|
+
switch (_a.label) {
|
|
20007
|
+
case 0:
|
|
20008
|
+
_a.trys.push([0, 2, , 3]);
|
|
20009
|
+
return [4 /*yield*/, request__default["default"](getGraphQLBaseURL(apiHost), query, variables, createRequestHeaders(token))];
|
|
20010
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
20011
|
+
case 2:
|
|
20012
|
+
error_1 = _a.sent();
|
|
20013
|
+
throw error_1;
|
|
20014
|
+
case 3: return [2 /*return*/];
|
|
20015
|
+
}
|
|
20016
|
+
});
|
|
20017
|
+
}); };
|
|
20166
20018
|
};
|
|
20167
|
-
var showSuccessNotification = common.useSuccessNotification();
|
|
20168
|
-
function CheckoutSummary(_a) {
|
|
20169
|
-
var quote = _a.quote, className = _a.className; _a.onAddCoupon; var priceListData = _a.priceListData; _a.isAddingCoupon;
|
|
20170
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "".concat(className, " bunny-space-y-4") }, { children: [jsxRuntime.jsxs(Text$e, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-text-lg bunny-font-medium bunny-mb-4" }, { children: ["Checkout summary - ", priceListData === null || priceListData === void 0 ? void 0 : priceListData.product.name, " ", priceListData === null || priceListData === void 0 ? void 0 : priceListData.name] })), jsxRuntime.jsx("div", __assign({ className: "bunny-space-y-4" }, { children: quote === null || quote === void 0 ? void 0 : quote.quoteChanges.map(function (quoteChange) {
|
|
20171
|
-
return quoteChange === null || quoteChange === void 0 ? void 0 : quoteChange.charges.map(function (charge) {
|
|
20172
|
-
var multiplier = charge.kind === 'COUPON' ? -1 : 1;
|
|
20173
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-between" }, { children: [jsxRuntime.jsx("div", { children: charge.name }), jsxRuntime.jsx("div", { children: charge.quantity }), jsxRuntime.jsx("div", { children: common.formatCurrency(multiplier * charge.amount, charge.currencyId) })] }), charge.id));
|
|
20174
|
-
});
|
|
20175
|
-
}) })), jsxRuntime.jsx(CheckoutSummaryDivider, {}), jsxRuntime.jsxs("div", __assign({ className: "bunny-space-y-4" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-between" }, { children: [jsxRuntime.jsx("div", { children: "Subtotal" }), jsxRuntime.jsx("div", { children: common.formatCurrency(quote.amountDue, quote.currencyId) })] })), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-between" }, { children: [jsxRuntime.jsx("div", { children: "Taxes" }), jsxRuntime.jsx("div", { children: common.formatCurrency(quote.taxAmount, quote.currencyId) })] }))] })), jsxRuntime.jsx(CheckoutSummaryDivider, {}), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-between" }, { children: [jsxRuntime.jsx("div", { children: "Total" }), jsxRuntime.jsx("div", { children: common.formatCurrency(quote.amountDue + quote.taxAmount, quote.currencyId) })] }))] }), false ] })));
|
|
20176
|
-
}
|
|
20177
20019
|
|
|
20178
20020
|
var useQuoteSubscriptionUpgrade = function () {
|
|
20179
20021
|
var graphQLRequest = useGraphQLRequest();
|
|
@@ -20234,6 +20076,27 @@ var useQuoteDelete = function () {
|
|
|
20234
20076
|
}); };
|
|
20235
20077
|
};
|
|
20236
20078
|
|
|
20079
|
+
var QUOTE_QUERY = function (id) { return "\n query quote {\n quote ".concat(id ? "(id: ".concat(id, ")") : '', " {\n accountId\n amount\n amountDue\n smallUnitAmountDue\n currencyId\n formattedQuote {\n html\n }\n id\n payableId\n periodAmount\n subtotal\n taxAmount\n amountsByPeriod {\n amount\n startDate\n }\n quoteChanges {\n currencyId\n id\n charges {\n amountsByPeriod {\n amount\n startDate\n }\n amount\n billingPeriod\n currencyId\n feature {\n unitName\n }\n id\n name\n priceListCharge {\n id\n }\n priceList {\n id\n }\n quantity\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n\n }\n }\n }"); };
|
|
20080
|
+
var getQuote = function (_a) {
|
|
20081
|
+
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
20082
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
20083
|
+
var response;
|
|
20084
|
+
return __generator(this, function (_b) {
|
|
20085
|
+
switch (_b.label) {
|
|
20086
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
20087
|
+
query: QUOTE_QUERY(id),
|
|
20088
|
+
token: token,
|
|
20089
|
+
vars: {},
|
|
20090
|
+
apiHost: apiHost,
|
|
20091
|
+
})];
|
|
20092
|
+
case 1:
|
|
20093
|
+
response = _b.sent();
|
|
20094
|
+
return [2 /*return*/, response === null || response === void 0 ? void 0 : response.quote];
|
|
20095
|
+
}
|
|
20096
|
+
});
|
|
20097
|
+
});
|
|
20098
|
+
};
|
|
20099
|
+
|
|
20237
20100
|
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isAmendment\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
20238
20101
|
var getSubscriptions = function (_a) {
|
|
20239
20102
|
var apiHost = _a.apiHost, isInPreviewMode = _a.isInPreviewMode, token = _a.token;
|
|
@@ -20242,7 +20105,7 @@ var getSubscriptions = function (_a) {
|
|
|
20242
20105
|
var _b, _c;
|
|
20243
20106
|
return __generator(this, function (_d) {
|
|
20244
20107
|
switch (_d.label) {
|
|
20245
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
20108
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
20246
20109
|
isInPreviewMode: isInPreviewMode,
|
|
20247
20110
|
query: SUBSCRIPTIONS_QUERY,
|
|
20248
20111
|
token: token,
|
|
@@ -20273,7 +20136,7 @@ var quoteRecalculateTaxes = function (_a) {
|
|
|
20273
20136
|
switch (_d.label) {
|
|
20274
20137
|
case 0:
|
|
20275
20138
|
vars = { id: quoteId };
|
|
20276
|
-
return [4 /*yield*/, gqlRequest({
|
|
20139
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
20277
20140
|
query: QUOTE_RECALCULATE_TAXES,
|
|
20278
20141
|
token: token,
|
|
20279
20142
|
vars: vars,
|
|
@@ -20298,7 +20161,7 @@ var getTaxationRequiredAccountFields = function (_a) {
|
|
|
20298
20161
|
var _b, _c;
|
|
20299
20162
|
return __generator(this, function (_d) {
|
|
20300
20163
|
switch (_d.label) {
|
|
20301
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
20164
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
20302
20165
|
query: MUTATION$2,
|
|
20303
20166
|
token: token,
|
|
20304
20167
|
apiHost: apiHost,
|
|
@@ -20306,7 +20169,8 @@ var getTaxationRequiredAccountFields = function (_a) {
|
|
|
20306
20169
|
case 1:
|
|
20307
20170
|
response = _d.sent();
|
|
20308
20171
|
return [2 /*return*/, ((_c = (_b = response === null || response === void 0 ? void 0 : response.currentUser) === null || _b === void 0 ? void 0 : _b.taxationRequiredAccountFields) === null || _c === void 0 ? void 0 : _c.length) > 0
|
|
20309
|
-
? response.currentUser
|
|
20172
|
+
? response.currentUser
|
|
20173
|
+
.taxationRequiredAccountFields
|
|
20310
20174
|
: null];
|
|
20311
20175
|
}
|
|
20312
20176
|
});
|
|
@@ -20322,6 +20186,35 @@ var useHasTaxPlugin = function (_a) {
|
|
|
20322
20186
|
return Boolean(plugins === null || plugins === void 0 ? void 0 : plugins.some(function (plugin) { return plugin.type === "taxation"; }));
|
|
20323
20187
|
};
|
|
20324
20188
|
|
|
20189
|
+
var useCurrentUserData = function () {
|
|
20190
|
+
var queryClient = reactQuery.useQueryClient();
|
|
20191
|
+
var token = useToken();
|
|
20192
|
+
var currentUser = queryClient.getQueryData(common.QueryKeyFactory.default.currentUserKey(token));
|
|
20193
|
+
if (!currentUser)
|
|
20194
|
+
return {};
|
|
20195
|
+
return currentUser;
|
|
20196
|
+
};
|
|
20197
|
+
|
|
20198
|
+
var BunnyFooterIcon = function (_a) {
|
|
20199
|
+
var color = _a.color;
|
|
20200
|
+
return (jsxRuntime.jsxs("svg", __assign({ width: "45", height: "15", viewBox: "0 0 39 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsxs("g", __assign({ clipPath: "url(#clip0_6_851)" }, { children: [jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M14.5898 7.19708C14.5898 9.35053 13.0926 10.325 11.2495 10.325C9.39955 10.325 7.90234 9.35001 7.90234 7.18967V3.26221H10.1125V7.00052C10.1125 7.87719 10.5855 8.27725 11.2495 8.27725C11.9061 8.27725 12.3865 7.87719 12.3865 7.00052V3.26221H14.5898V7.19708Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M31.8943 12.9625H29.4793L31.8523 8.62816L28.9355 3.26221H31.4708L33.0457 6.35524L34.5924 3.26221H37.0075L31.8943 12.9625Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M15.1602 5.96827C15.1602 3.8148 16.6574 2.84033 18.5005 2.84033C20.3504 2.84033 21.8476 3.81533 21.8476 5.97568V10.1473H19.6374V6.16483C19.6374 5.28815 19.1645 4.8881 18.5005 4.8881C17.8439 4.8881 17.3634 5.28815 17.3634 6.16483V10.1473H15.1602V5.96827Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M22.4316 5.96827C22.4316 3.8148 23.9289 2.84033 25.7719 2.84033C27.6219 2.84033 29.1191 3.81533 29.1191 5.97568V10.1473H26.9089V6.16483C26.9089 5.28815 26.4359 4.8881 25.7719 4.8881C25.1154 4.8881 24.6349 5.28815 24.6349 6.16483V10.1473H22.4316V5.96827Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M7.40511 6.68957C7.40511 8.7236 6.02815 10.3227 4.17816 10.3227C3.23907 10.3227 2.61071 9.94378 2.19358 9.40371V10.1404H0.0605469V0.0405273H2.26381V3.91939C2.68041 3.42158 3.28802 3.07069 4.17763 3.07069C6.02759 3.07069 7.40511 4.66981 7.40511 6.68957ZM2.17229 6.69642C2.17229 7.60802 2.77937 8.2744 3.64823 8.2744C4.53783 8.2744 5.13107 7.59372 5.13107 6.69642C5.13107 5.79912 4.53783 5.11844 3.64823 5.11844C2.77937 5.11844 2.17229 5.78482 2.17229 6.69642Z", fill: color }), jsxRuntime.jsx("path", { className: "bunny-icon-path", d: "M38.966 8.94801C38.966 9.76181 38.2668 10.4631 37.4618 10.4631C36.6499 10.4631 35.9434 9.76181 35.9434 8.94801C35.9434 8.14846 36.6494 7.46094 37.4618 7.46094C38.2668 7.46094 38.966 8.14846 38.966 8.94801Z", fill: color })] })), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", __assign({ id: "clip0_6_851" }, { children: jsxRuntime.jsx("rect", { width: "39", height: "13", fill: "white" }) })) })] })));
|
|
20201
|
+
};
|
|
20202
|
+
|
|
20203
|
+
var Footer = function (_a) {
|
|
20204
|
+
var className = _a.className;
|
|
20205
|
+
var _b = useCurrentUserData(), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
|
|
20206
|
+
var isMobile = common.useIsMobile();
|
|
20207
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-shrink-0 ".concat(isMobile ? 'bunny-flex-col bunny-gap-2 bunny-grow' : '', " ").concat(className) }, { children: [(termsUrl || privacyUrl) && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-3" }, { children: [termsUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: termsUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Terms" }))), privacyUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: privacyUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Privacy" })))] }))), jsxRuntime.jsx(BunnyMarketingLink, {})] })));
|
|
20208
|
+
};
|
|
20209
|
+
var BunnyMarketingLink = function () {
|
|
20210
|
+
var _a = react.useState(false), isHovered = _a[0], setIsHovered = _a[1];
|
|
20211
|
+
var isMobile = common.useIsMobile();
|
|
20212
|
+
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-end bunny-justify-end ".concat(isMobile ? '' : 'grow') }, { children: jsxRuntime.jsx(StyledBunnyLink, __assign({ className: "bunny-flex bunny-items-end bunny-justify-end bunny-text-slate-400", href: "https://bunny.com/", rel: "noopener noreferrer", target: "_blank" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center", onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: ["Powered by\u00A0", jsxRuntime.jsx("div", __assign({ style: { paddingTop: '5px' } }, { children: jsxRuntime.jsx(BunnyFooterIcon, { color: isHovered ? common.PRIMARY_COLOR : common.SLATE_400 }) }))] })) })) })));
|
|
20213
|
+
};
|
|
20214
|
+
var StyedLink = styled__default["default"].a(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n color: ", ";\n transition: color 0.3s;\n &:hover {\n color: ", ";\n }\n text-decoration: none;\n font-size: 14px;\n"], ["\n color: ", ";\n transition: color 0.3s;\n &:hover {\n color: ", ";\n }\n text-decoration: none;\n font-size: 14px;\n"])), common.SLATE_400, common.SLATE_500);
|
|
20215
|
+
var StyledBunnyLink = styled__default["default"](StyedLink)(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n &:hover {\n color: ", " !important;\n }\n"], ["\n &:hover {\n color: ", " !important;\n }\n"])), common.PRIMARY_COLOR);
|
|
20216
|
+
var templateObject_1$5, templateObject_2$1;
|
|
20217
|
+
|
|
20325
20218
|
var MUTATION$1 = "\nmutation accountUpdate(\n $id: ID!,\n $attributes: AccountAttributes!) {\n accountUpdate(\n id: $id,\n attributes: $attributes\n ) {\n account {\n id\n billingCountry\n billingState\n billingStreet\n billingCity\n billingZip\n name\n }\n errors\n }\n }\n";
|
|
20326
20219
|
var accountUpdate = function (_a) {
|
|
20327
20220
|
var accountId = _a.accountId, attributes = _a.attributes, token = _a.token, apiHost = _a.apiHost;
|
|
@@ -20332,7 +20225,7 @@ var accountUpdate = function (_a) {
|
|
|
20332
20225
|
switch (_c.label) {
|
|
20333
20226
|
case 0:
|
|
20334
20227
|
vars = { id: accountId, attributes: attributes };
|
|
20335
|
-
return [4 /*yield*/, gqlRequest({
|
|
20228
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
20336
20229
|
query: MUTATION$1,
|
|
20337
20230
|
token: token,
|
|
20338
20231
|
vars: vars,
|
|
@@ -20396,10 +20289,10 @@ var FormBillingState = function (_a) {
|
|
|
20396
20289
|
|
|
20397
20290
|
var QuoteCheckout = function (_a) {
|
|
20398
20291
|
var account = _a.account, onSuccess = _a.onSuccess, onFail = _a.onFail, quote = _a.quote, taxationRequiredAccountFields = _a.taxationRequiredAccountFields;
|
|
20399
|
-
var
|
|
20292
|
+
var _b = react.useContext(BunnyContext), apiHost = _b.apiHost; _b.graphQLClient;
|
|
20400
20293
|
var token = useToken();
|
|
20401
20294
|
var isMobile = common.useIsMobile();
|
|
20402
|
-
var
|
|
20295
|
+
var _c = react.useState(false), isSaving = _c[0], setIsSaving = _c[1];
|
|
20403
20296
|
var paymentRequired = getQuoteAmountDue(quote) > 0;
|
|
20404
20297
|
var checkoutMutation = reactQuery.useMutation({
|
|
20405
20298
|
mutationFn: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -20407,9 +20300,9 @@ var QuoteCheckout = function (_a) {
|
|
|
20407
20300
|
switch (_a.label) {
|
|
20408
20301
|
case 0:
|
|
20409
20302
|
if (!quote)
|
|
20410
|
-
throw new Error(
|
|
20303
|
+
throw new Error("Quote is required");
|
|
20411
20304
|
if (paymentRequired)
|
|
20412
|
-
throw new Error(
|
|
20305
|
+
throw new Error("Payment is required");
|
|
20413
20306
|
return [4 /*yield*/, checkout({ quoteId: quote.id, token: token, apiHost: apiHost })];
|
|
20414
20307
|
case 1: return [2 /*return*/, _a.sent()];
|
|
20415
20308
|
}
|
|
@@ -20430,17 +20323,17 @@ var QuoteCheckout = function (_a) {
|
|
|
20430
20323
|
}
|
|
20431
20324
|
if (taxationRequiredAccountFields)
|
|
20432
20325
|
return (jsxRuntime.jsx(PaymentFormWrapper, __assign({ setMaxHeight: false }, { children: jsxRuntime.jsx(TaxationForm, { account: account, quote: quote }) })));
|
|
20433
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: paymentRequired ? (jsxRuntime.jsx(PaymentForm, { onFail: onFail, onPaymentSuccess: onSuccess, quote: quote })) : (jsxRuntime.jsx(PaymentFormWrapper, __assign({ setMaxHeight: false }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 ".concat(isMobile ?
|
|
20326
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: paymentRequired ? (jsxRuntime.jsx(PaymentForm, { onFail: onFail, onPaymentSuccess: onSuccess, quote: quote })) : (jsxRuntime.jsx(PaymentFormWrapper, __assign({ setMaxHeight: false }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 ".concat(isMobile ? "bunny-shadow-padding-x" : "") }, { children: [jsxRuntime.jsx(antd.Button, __assign({ onClick: handleCheckoutNoPayment, type: "primary" }, { children: isSaving ? "Processing..." : "Complete order" })), jsxRuntime.jsx("div", __assign({ className: "bunny-text-xs bunny-text-slate-500" }, { children: "No payment is required" }))] })) }))) }));
|
|
20434
20327
|
};
|
|
20435
20328
|
var PaymentFormWrapper = function (_a) {
|
|
20436
20329
|
var children = _a.children, setMaxHeight = _a.setMaxHeight, className = _a.className;
|
|
20437
20330
|
var isMobile = common.useIsMobile();
|
|
20438
|
-
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-6 bunny-shrink-0 ".concat(isMobile ?
|
|
20331
|
+
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-6 bunny-shrink-0 ".concat(isMobile ? "bunny-w-full bunny-shadow-padding-xb" : "", " ").concat(className), style: __assign({}, (isMobile
|
|
20439
20332
|
? setMaxHeight
|
|
20440
|
-
? { maxHeight:
|
|
20333
|
+
? { maxHeight: "60vh" }
|
|
20441
20334
|
: {}
|
|
20442
20335
|
: {
|
|
20443
|
-
width:
|
|
20336
|
+
width: "350px",
|
|
20444
20337
|
})) }, { children: children })));
|
|
20445
20338
|
};
|
|
20446
20339
|
|
|
@@ -20457,18 +20350,18 @@ var Checkout = function (_a) {
|
|
|
20457
20350
|
var queryClient = reactQuery.useQueryClient();
|
|
20458
20351
|
// Queries
|
|
20459
20352
|
var _d = reactQuery.useQuery({
|
|
20460
|
-
queryKey: [
|
|
20353
|
+
queryKey: ["getTaxationRequiredAccountFields", token],
|
|
20461
20354
|
queryFn: function () { return getTaxationRequiredAccountFields({ apiHost: apiHost, token: token }); },
|
|
20462
20355
|
enabled: Boolean(quote),
|
|
20463
20356
|
staleTime: 0,
|
|
20464
20357
|
}), taxationRequiredAccountFields = _d.data, isLoadingTaxationRequiredAccountFields = _d.isLoading;
|
|
20465
20358
|
var _e = reactQuery.useQuery({
|
|
20466
|
-
queryKey: [
|
|
20359
|
+
queryKey: ["account", quote === null || quote === void 0 ? void 0 : quote.accountId],
|
|
20467
20360
|
queryFn: function () {
|
|
20468
|
-
return (quote === null || quote === void 0 ? void 0 : quote.accountId) &&
|
|
20469
|
-
common.getAccount({ id: quote.accountId, apiHost: apiHost, token: token, componentsVersion: PACKAGE_VERSION });
|
|
20361
|
+
return (quote === null || quote === void 0 ? void 0 : quote.accountId) && common.getAccount({ id: quote.accountId, apiHost: apiHost, token: token });
|
|
20470
20362
|
},
|
|
20471
|
-
enabled: Boolean(quote === null || quote === void 0 ? void 0 : quote.accountId) &&
|
|
20363
|
+
enabled: Boolean(quote === null || quote === void 0 ? void 0 : quote.accountId) &&
|
|
20364
|
+
((taxationRequiredAccountFields === null || taxationRequiredAccountFields === void 0 ? void 0 : taxationRequiredAccountFields.length) || 0) > 0,
|
|
20472
20365
|
}), account = _e.data, isLoadingAccount = _e.isLoading;
|
|
20473
20366
|
reactQuery.useQuery({
|
|
20474
20367
|
queryKey: queryKeyFactory.createQuoteTaxCalculateKey({
|
|
@@ -20490,7 +20383,7 @@ var Checkout = function (_a) {
|
|
|
20490
20383
|
updatedQuote = _a.sent();
|
|
20491
20384
|
if (updatedQuote) {
|
|
20492
20385
|
quoteKey = queryKeyFactory.createObjectKey({
|
|
20493
|
-
objectName:
|
|
20386
|
+
objectName: "editingQuote",
|
|
20494
20387
|
id: updatedQuote.id,
|
|
20495
20388
|
token: token,
|
|
20496
20389
|
});
|
|
@@ -20519,7 +20412,7 @@ var Checkout = function (_a) {
|
|
|
20519
20412
|
return null;
|
|
20520
20413
|
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-fixed bunny-top-0 bunny-left-0 bunny-right-0 bunny-bottom-0 bunny-bg-slate-50 bunny-overflow-auto", style: {
|
|
20521
20414
|
zIndex: 1001,
|
|
20522
|
-
} }, { children: jsxRuntime.jsxs("div", __assign({ className: pageWrapperClassName(isMobile) }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-justify-end bunny-w-full" }, { children: jsxRuntime.jsx(icons.CloseOutlined, { className: "bunny-text-base bunny-shadow-padding-xb", onClick: onCancel }) })), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-end bunny-gap-6 bunny-pt-4 ".concat(isMobile ?
|
|
20415
|
+
} }, { children: jsxRuntime.jsxs("div", __assign({ className: pageWrapperClassName(isMobile) }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-justify-end bunny-w-full" }, { children: jsxRuntime.jsx(icons.CloseOutlined, { className: "bunny-text-base bunny-shadow-padding-xb", onClick: onCancel }) })), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-justify-end bunny-gap-6 bunny-pt-4 ".concat(isMobile ? "bunny-flex-col" : "bunny-shadow-padding-xb") }, { children: [((invoice === null || invoice === void 0 ? void 0 : invoice.html) || ((_b = quote === null || quote === void 0 ? void 0 : quote.formattedQuote) === null || _b === void 0 ? void 0 : _b.html)) && (jsxRuntime.jsx(InvoiceQuoteView, { html: invoice ? invoice.html : quote ? quote.formattedQuote.html : "" })), !isMobile && ((invoice === null || invoice === void 0 ? void 0 : invoice.html) || ((_c = quote === null || quote === void 0 ? void 0 : quote.formattedQuote) === null || _c === void 0 ? void 0 : _c.html)) && (jsxRuntime.jsx(antd.Divider, { className: "bunny-h-full", type: "vertical" })), invoice ? (jsxRuntime.jsx("div", __assign({ className: "bunny-w-full bunny-pt-12" }, { children: jsxRuntime.jsx(PaymentForm, { onPaymentSuccess: onSuccess, onFail: onFail, invoice: invoice }) }))) : quote ? (jsxRuntime.jsx(QuoteCheckout, { account: account, onFail: function (error) {
|
|
20523
20416
|
onFail(error);
|
|
20524
20417
|
}, onSuccess: onSuccess, quote: quote, taxationRequiredAccountFields: taxationRequiredAccountFields, token: token })) : (jsxRuntime.jsx(PaymentForm, { onFail: function (error) {
|
|
20525
20418
|
onFail(error);
|
|
@@ -20544,12 +20437,15 @@ var SubscriptionsContext = react.createContext({});
|
|
|
20544
20437
|
|
|
20545
20438
|
var QUOTE_CHARGE_UPDATE = "\n mutation QuoteChargeUpdate (\n $discount: Float,\n $endDate: ISO8601Date,\n $name: String,\n $price: Float,\n $quantity: Int,\n $quoteChargeId: ID!\n $startDate: ISO8601Date\n $subtotal: Float,\n ) {\n quoteChargeUpdate(\n discount: $discount\n endDate: $endDate\n name: $name\n price: $price\n quantity: $quantity\n quoteChargeId: $quoteChargeId\n startDate: $startDate\n subtotal: $subtotal\n ) {\n quoteCharge {\n id\n }\n }\n }\n";
|
|
20546
20439
|
var quoteChargeUpdate = function (_a) {
|
|
20547
|
-
var discount = _a.discount,
|
|
20548
|
-
|
|
20440
|
+
var discount = _a.discount,
|
|
20441
|
+
// endDate,
|
|
20442
|
+
name = _a.name, price = _a.price, quantity = _a.quantity, quoteChargeId = _a.quoteChargeId, startDate = _a.startDate, subtotal = _a.subtotal, apiHost = _a.apiHost, token = _a.token;
|
|
20443
|
+
return common.gqlRequest({
|
|
20549
20444
|
query: QUOTE_CHARGE_UPDATE,
|
|
20550
20445
|
vars: {
|
|
20551
20446
|
subtotal: subtotal,
|
|
20552
20447
|
discount: discount,
|
|
20448
|
+
// endDate,
|
|
20553
20449
|
name: name,
|
|
20554
20450
|
price: price,
|
|
20555
20451
|
quantity: quantity,
|
|
@@ -20806,17 +20702,22 @@ var PlanPickerCheckoutBar = function (_a) {
|
|
|
20806
20702
|
var quote;
|
|
20807
20703
|
return __generator(this, function (_a) {
|
|
20808
20704
|
switch (_a.label) {
|
|
20809
|
-
case 0:
|
|
20810
|
-
|
|
20811
|
-
|
|
20812
|
-
|
|
20813
|
-
|
|
20705
|
+
case 0:
|
|
20706
|
+
if (!quoteIdRef.current) {
|
|
20707
|
+
throw new Error('Quote ID is required');
|
|
20708
|
+
}
|
|
20709
|
+
return [4 /*yield*/, getQuote({
|
|
20710
|
+
id: quoteIdRef.current,
|
|
20711
|
+
token: token,
|
|
20712
|
+
apiHost: apiHost,
|
|
20713
|
+
})];
|
|
20814
20714
|
case 1:
|
|
20815
20715
|
quote = _a.sent();
|
|
20816
20716
|
return [2 /*return*/, quote];
|
|
20817
20717
|
}
|
|
20818
20718
|
});
|
|
20819
20719
|
}); },
|
|
20720
|
+
enabled: Boolean(quoteIdRef.current),
|
|
20820
20721
|
}).data;
|
|
20821
20722
|
react.useEffect(function () {
|
|
20822
20723
|
if (!(upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.id)) {
|
|
@@ -20902,7 +20803,7 @@ var getPriceListChangeOptions = function (_a) {
|
|
|
20902
20803
|
var response, priceListChangeOptions;
|
|
20903
20804
|
return __generator(this, function (_b) {
|
|
20904
20805
|
switch (_b.label) {
|
|
20905
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
20806
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
20906
20807
|
isInPreviewMode: isInPreviewMode,
|
|
20907
20808
|
query: PRICE_LIST_CHANGE_OPTIONS_QUERY,
|
|
20908
20809
|
vars: { subscriptionId: upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.id, productId: productId },
|
|
@@ -21044,18 +20945,18 @@ var PriceListCardButton = function (_a) {
|
|
|
21044
20945
|
var isPriceListNonSubscribedCurrentPlan = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.plan.id) === priceList.plan.id && !isPriceListCurrentSubscription;
|
|
21045
20946
|
var createButtonText = function () {
|
|
21046
20947
|
if (isPriceListCurrentSubscription)
|
|
21047
|
-
return
|
|
20948
|
+
return "Current";
|
|
21048
20949
|
if (isSelected)
|
|
21049
|
-
return
|
|
20950
|
+
return "Selected";
|
|
21050
20951
|
if (subscriptionPlan && !isPriceListNonSubscribedCurrentPlan)
|
|
21051
|
-
return
|
|
20952
|
+
return "Subscribed";
|
|
21052
20953
|
if (priceList.plan.pricingStyle === common.PricingStyle.CONTACT_US)
|
|
21053
20954
|
return priceList.plan.contactUsLabel;
|
|
21054
|
-
return
|
|
20955
|
+
return "Select";
|
|
21055
20956
|
};
|
|
21056
20957
|
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-grow bunny-w-full bunny-justify-end" }, { children: jsxRuntime.jsx(StyledCardButton, __assign({ className: "bunny-flex bunny-justify-center bunny-w-full" }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", disabled: disableOnClick, style: {
|
|
21057
|
-
maxWidth:
|
|
21058
|
-
}, type: isSelected ?
|
|
20958
|
+
maxWidth: "240px",
|
|
20959
|
+
}, type: isSelected ? "primary" : "default" }, { children: createButtonText() })) })) })));
|
|
21059
20960
|
};
|
|
21060
20961
|
var StyledCardButton = styled__default["default"].div(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n .ant-btn-primary {\n border-color: transparent !important;\n }\n .ant-btn-primary:disabled {\n background: ", ";\n color: ", ";\n }\n"], ["\n .ant-btn-primary {\n border-color: transparent !important;\n }\n .ant-btn-primary:disabled {\n background: ", ";\n color: ", ";\n }\n"])), common.SLATE_200, common.SLATE_600);
|
|
21061
20962
|
var templateObject_1$3;
|
|
@@ -21086,16 +20987,16 @@ var PlanPickerGridCell = function (_a) {
|
|
|
21086
20987
|
|
|
21087
20988
|
var PriceListCardDesktop = function (_a) {
|
|
21088
20989
|
var description = _a.description, disableOnClick = _a.disableOnClick, feature = _a.feature, isPriceListCurrentSubscription = _a.isPriceListCurrentSubscription, isSelected = _a.isSelected, onClick = _a.onClick, priceList = _a.priceList, subscriptionPlan = _a.subscriptionPlan, trialRemainingDays = _a.trialRemainingDays;
|
|
21089
|
-
return (jsxRuntime.jsx(PlanPickerGridCell, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-justify-between bunny-w-full bunny-rounded-md bunny-gap-4 bunny-pt-6 bunny-px-4 ".concat(disableOnClick ?
|
|
20990
|
+
return (jsxRuntime.jsx(PlanPickerGridCell, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-justify-between bunny-w-full bunny-rounded-md bunny-gap-4 bunny-pt-6 bunny-px-4 bunny-pb-4 ".concat(disableOnClick ? "" : "cursor-pointer"), onClick: function () {
|
|
21090
20991
|
if (!disableOnClick) {
|
|
21091
20992
|
if (priceList.plan.pricingStyle === common.PricingStyle.CONTACT_US) {
|
|
21092
|
-
window.open(priceList.plan.contactUsUrl,
|
|
20993
|
+
window.open(priceList.plan.contactUsUrl, "_blank");
|
|
21093
20994
|
}
|
|
21094
20995
|
else
|
|
21095
20996
|
onClick(priceList);
|
|
21096
20997
|
}
|
|
21097
20998
|
}, style: {
|
|
21098
|
-
height:
|
|
20999
|
+
height: "100%",
|
|
21099
21000
|
} }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-3" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsxRuntime.jsx(PriceListCardTitle, { isPriceListCurrentSubscription: isPriceListCurrentSubscription, priceList: priceList, trialRemainingDays: trialRemainingDays }), jsxRuntime.jsx(PriceListCardDescription, { description: description })] })), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsxRuntime.jsx(PriceListCardPrice, { priceList: priceList }), jsxRuntime.jsx(PriceListCardPriceDescription, { feature: feature, priceList: priceList })] }))] })), jsxRuntime.jsx(PriceListCardButton, { disableOnClick: disableOnClick, isPriceListCurrentSubscription: isPriceListCurrentSubscription, isSelected: isSelected, priceList: priceList, subscriptionPlan: subscriptionPlan })] })) }));
|
|
21100
21001
|
};
|
|
21101
21002
|
|
|
@@ -21646,7 +21547,7 @@ var getFeatureUsage = function (_a) {
|
|
|
21646
21547
|
vars = {
|
|
21647
21548
|
id: subscriptionChargeId,
|
|
21648
21549
|
};
|
|
21649
|
-
return [4 /*yield*/, gqlRequest({
|
|
21550
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
21650
21551
|
query: FEATURE_USAGE_MUTATION,
|
|
21651
21552
|
token: token,
|
|
21652
21553
|
vars: vars,
|
|
@@ -21657,7 +21558,7 @@ var getFeatureUsage = function (_a) {
|
|
|
21657
21558
|
if ((_b = response.featureUsageHistogram) === null || _b === void 0 ? void 0 : _b.data)
|
|
21658
21559
|
return [2 /*return*/, response.featureUsageHistogram];
|
|
21659
21560
|
else
|
|
21660
|
-
throw new Error(
|
|
21561
|
+
throw new Error("No data found");
|
|
21661
21562
|
}
|
|
21662
21563
|
});
|
|
21663
21564
|
});
|
|
@@ -22092,7 +21993,7 @@ var quoteChargeCreate = function (_a) {
|
|
|
22092
21993
|
var
|
|
22093
21994
|
// endDate,
|
|
22094
21995
|
price = _a.price, priceListChargeId = _a.priceListChargeId, quantity = _a.quantity, quoteChangeId = _a.quoteChangeId, startDate = _a.startDate, subscriptionChargeId = _a.subscriptionChargeId, token = _a.token, apiHost = _a.apiHost;
|
|
22095
|
-
return gqlRequest({
|
|
21996
|
+
return common.gqlRequest({
|
|
22096
21997
|
query: QUOTE_CHARGE_CREATE,
|
|
22097
21998
|
vars: {
|
|
22098
21999
|
// endDate,
|
|
@@ -22324,8 +22225,8 @@ var QuoteChangeSummarySection = function (_a) {
|
|
|
22324
22225
|
: openCheckout, disabled: !editingQuoteData, size: isMobile ? "large" : "middle", type: "primary" }, { children: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) ? "Activate Trial" : "Proceed to checkout" })) }))] })));
|
|
22325
22226
|
};
|
|
22326
22227
|
|
|
22327
|
-
var QUANTITY_CHANGE_HEADER_TITLE =
|
|
22328
|
-
var QUANTITY_CHANGE_HEADER_DESCRIPTION =
|
|
22228
|
+
var QUANTITY_CHANGE_HEADER_TITLE = "Update unit quantity";
|
|
22229
|
+
var QUANTITY_CHANGE_HEADER_DESCRIPTION = "Adjust quantities below. The change will take effect immediately after checkout has been completed.";
|
|
22329
22230
|
var QuantityChangeDrawerDesktop = function (_a) {
|
|
22330
22231
|
var editingQuote = _a.editingQuote, editingQuoteData = _a.editingQuoteData, onClose = _a.onClose, open = _a.open, openCheckout = _a.openCheckout, setEditingQuoteData = _a.setEditingQuoteData, subscriptions = _a.subscriptions;
|
|
22331
22232
|
var _b = react.useState(open), openLocal = _b[0], setOpenLocal = _b[1];
|
|
@@ -22347,22 +22248,22 @@ var QuantityChangeDrawerDesktop = function (_a) {
|
|
|
22347
22248
|
return (jsxRuntime.jsxs(antd.Drawer, __assign({ closeIcon: null, destroyOnClose: true, onClose: onClose, open: open, styles: isMobile
|
|
22348
22249
|
? {
|
|
22349
22250
|
body: {
|
|
22350
|
-
padding:
|
|
22351
|
-
overflow:
|
|
22251
|
+
padding: "1rem",
|
|
22252
|
+
overflow: "hidden",
|
|
22352
22253
|
background: common.SLATE_50,
|
|
22353
22254
|
},
|
|
22354
22255
|
wrapper: {
|
|
22355
|
-
width:
|
|
22256
|
+
width: "100vw",
|
|
22356
22257
|
},
|
|
22357
22258
|
}
|
|
22358
22259
|
: {
|
|
22359
22260
|
wrapper: {
|
|
22360
|
-
minWidth:
|
|
22261
|
+
minWidth: "600px",
|
|
22361
22262
|
},
|
|
22362
22263
|
}, title: jsxRuntime.jsx(DrawerHeader, { description: QUANTITY_CHANGE_HEADER_DESCRIPTION, onClose: onClose, title: QUANTITY_CHANGE_HEADER_TITLE, closeButtonClassName: "ant-drawer-close" }) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-grid bunny-pb-4", style: {
|
|
22363
|
-
gridTemplateColumns:
|
|
22364
|
-
rowGap:
|
|
22365
|
-
columnGap:
|
|
22264
|
+
gridTemplateColumns: "2fr 1fr 1fr",
|
|
22265
|
+
rowGap: "0.75rem",
|
|
22266
|
+
columnGap: "1rem",
|
|
22366
22267
|
} }, { children: [jsxRuntime.jsx(QuantityChangeGridTitle, { children: "ACTIVE SUBSCRIPTIONS" }), jsxRuntime.jsx(QuantityChangeGridTitle, __assign({ right: true }, { children: "CURRENT QUANTITY" })), jsxRuntime.jsx(QuantityChangeGridTitle, __assign({ right: true }, { children: "NEW QUANTITY" })), jsxRuntime.jsx(antd.Divider, { className: "bunny-col-span-full bunny-py-2" }), subscriptions.map(function (subscription, index) {
|
|
22367
22268
|
var _a;
|
|
22368
22269
|
var isTrial = ((_a = subscription.state) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === common.SubscriptionState.TRIAL;
|
|
@@ -22370,7 +22271,7 @@ var QuantityChangeDrawerDesktop = function (_a) {
|
|
|
22370
22271
|
var _a;
|
|
22371
22272
|
if ((isTrial && !charge.trial) ||
|
|
22372
22273
|
(!isTrial && charge.trial) ||
|
|
22373
|
-
((_a = charge.chargeType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
|
|
22274
|
+
((_a = charge.chargeType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === "USAGE")
|
|
22374
22275
|
return null;
|
|
22375
22276
|
return (jsxRuntime.jsx(QuantityChangeGridRow, { chargeIndex: chargeIndex, editingQuote: editingQuote, setEditingQuoteData: setEditingQuoteData, subscription: subscription, subscriptionCharge: charge, subscriptionIndex: index, subscriptions: subscriptions }, chargeIndex));
|
|
22376
22277
|
}) }), index));
|
|
@@ -22410,7 +22311,7 @@ var SubscriptionsNavigation = function (_a) {
|
|
|
22410
22311
|
|
|
22411
22312
|
var Text$1 = antd.Typography.Text;
|
|
22412
22313
|
var SubscriptionsWrapper = function (_a) {
|
|
22413
|
-
var handlePortalErrors = _a.handlePortalErrors, companyName = _a.companyName, _b = _a.isInPreviewMode, isInPreviewMode = _b === void 0 ? false : _b, productId = _a.productId, className = _a.className, _c = _a.styles, userStyles = _c === void 0 ? {} : _c, noSubscriptionsComponent = _a.noSubscriptionsComponent, _d = _a.hideTitle, hideTitle = _d === void 0 ? false : _d,
|
|
22314
|
+
var handlePortalErrors = _a.handlePortalErrors, companyName = _a.companyName, _b = _a.isInPreviewMode, isInPreviewMode = _b === void 0 ? false : _b, productId = _a.productId, className = _a.className, _c = _a.styles, userStyles = _c === void 0 ? {} : _c, noSubscriptionsComponent = _a.noSubscriptionsComponent, _d = _a.hideTitle, hideTitle = _d === void 0 ? false : _d, _e = _a.hideExpiredToggle, hideExpiredToggle = _e === void 0 ? false : _e;
|
|
22414
22315
|
var defaultStyles = {
|
|
22415
22316
|
gap: 4,
|
|
22416
22317
|
shadow: 'sm',
|
|
@@ -22431,7 +22332,6 @@ var SubscriptionsWrapper = function (_a) {
|
|
|
22431
22332
|
subscriptionProductNameStyle: styles.subscriptionProductNameStyle,
|
|
22432
22333
|
productId: productId,
|
|
22433
22334
|
isInPreviewMode: isInPreviewMode,
|
|
22434
|
-
hideExpired: hideExpired,
|
|
22435
22335
|
upgradingSubscription: upgradingSubscription,
|
|
22436
22336
|
setUpgradingSubscription: setUpgradingSubscription,
|
|
22437
22337
|
updatingChargeQuantityId: updatingChargeQuantityId,
|
|
@@ -22447,15 +22347,14 @@ var Subscriptions = function (_a) {
|
|
|
22447
22347
|
// Context
|
|
22448
22348
|
var token = useToken();
|
|
22449
22349
|
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
22450
|
-
var _b = react.useContext(SubscriptionsContext), setUpgradingSubscription = _b.setUpgradingSubscription, updatingChargeQuantityId = _b.updatingChargeQuantityId, setUpdatingChargeQuantityId = _b.setUpdatingChargeQuantityId, setSubscriptionUpgradeId = _b.setSubscriptionUpgradeId, className = _b.className, isInPreviewMode = _b.isInPreviewMode
|
|
22350
|
+
var _b = react.useContext(SubscriptionsContext), setUpgradingSubscription = _b.setUpgradingSubscription, updatingChargeQuantityId = _b.updatingChargeQuantityId, setUpdatingChargeQuantityId = _b.setUpdatingChargeQuantityId, setSubscriptionUpgradeId = _b.setSubscriptionUpgradeId, className = _b.className, isInPreviewMode = _b.isInPreviewMode;
|
|
22451
22351
|
// Local state
|
|
22452
22352
|
var _c = react.useState(), editingQuoteData = _c[0], setEditingQuoteData = _c[1];
|
|
22453
22353
|
var _d = react.useState(false), payModalVisible = _d[0], setPayModalVisible = _d[1];
|
|
22454
|
-
var _e = react.useState(true),
|
|
22354
|
+
var _e = react.useState(true), hideExpired = _e[0], setHideExpired = _e[1];
|
|
22455
22355
|
var _f = react.useState(false), quantityDrawerOpen = _f[0], setQuantityDrawerOpen = _f[1];
|
|
22456
22356
|
var _g = react.useState(false), expiredSwitchVisible = _g[0], setExpiredSwitchVisible = _g[1];
|
|
22457
22357
|
var _h = react.useState(false), isChangingPlan = _h[0], setIsChangingPlan = _h[1];
|
|
22458
|
-
var hideExpired = hideExpiredOverride !== null && hideExpiredOverride !== void 0 ? hideExpiredOverride : hideExpiredState;
|
|
22459
22358
|
// Hooks
|
|
22460
22359
|
var queryClient = reactQuery.useQueryClient();
|
|
22461
22360
|
var showSuccessNotification = common.useSuccessNotification();
|
|
@@ -22529,7 +22428,7 @@ var Subscriptions = function (_a) {
|
|
|
22529
22428
|
});
|
|
22530
22429
|
showSuccessNotification('Your plan has been updated', 'Payment successful');
|
|
22531
22430
|
setPayModalVisible(false);
|
|
22532
|
-
|
|
22431
|
+
setHideExpired(true);
|
|
22533
22432
|
};
|
|
22534
22433
|
var onCancel = function () {
|
|
22535
22434
|
setPayModalVisible(false);
|
|
@@ -22559,7 +22458,7 @@ var Subscriptions = function (_a) {
|
|
|
22559
22458
|
});
|
|
22560
22459
|
react.useEffect(function () {
|
|
22561
22460
|
if (allSubscriptionsExpired && subscriptions.length > 0)
|
|
22562
|
-
|
|
22461
|
+
setHideExpired(false);
|
|
22563
22462
|
}, [allSubscriptionsExpired, subscriptions]);
|
|
22564
22463
|
react.useEffect(function () {
|
|
22565
22464
|
if (hasExpiredOrCanceledSubscriptions && subscriptions.length > 0)
|
|
@@ -22570,7 +22469,7 @@ var Subscriptions = function (_a) {
|
|
|
22570
22469
|
setIsChangingPlan(false);
|
|
22571
22470
|
}, handlePortalErrors: handlePortalErrors }));
|
|
22572
22471
|
}
|
|
22573
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "".concat(className) }, { children: [!hideTitle ? jsxRuntime.jsx(PageTitle, { title: 'Subscriptions' }) : null, jsxRuntime.jsx(PageHeaderWithActions, __assign({ title: jsxRuntime.jsx(jsxRuntime.Fragment, { children: !hideExpiredToggle && (jsxRuntime.jsxs(Text$1, __assign({ className: "bunny-flex bunny-items-center bunny-justify-between", style: { minWidth: '120px' } }, { children: [hideExpired ? 'Active subscriptions' : 'All subscriptions', isMobile && expiredSwitchVisible && (jsxRuntime.jsx(HideExpiredToggle, { hideExpired: hideExpired, setHideExpired:
|
|
22472
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "".concat(className) }, { children: [!hideTitle ? jsxRuntime.jsx(PageTitle, { title: 'Subscriptions' }) : null, jsxRuntime.jsx(PageHeaderWithActions, __assign({ title: jsxRuntime.jsx(jsxRuntime.Fragment, { children: !hideExpiredToggle && (jsxRuntime.jsxs(Text$1, __assign({ className: "bunny-flex bunny-items-center bunny-justify-between", style: { minWidth: '120px' } }, { children: [hideExpired ? 'Active subscriptions' : 'All subscriptions', isMobile && expiredSwitchVisible && (jsxRuntime.jsx(HideExpiredToggle, { hideExpired: hideExpired, setHideExpired: setHideExpired }))] }))) }) }, { children: !isMobile && (jsxRuntime.jsx(SubscriptionsNavigation, { expiredSwitchVisible: !hideExpiredToggle && expiredSwitchVisible, hideExpired: hideExpired, setHideExpired: setHideExpired, setQuantityDrawerOpen: setQuantityDrawerOpen, subscriptions: subscriptions })) })), jsxRuntime.jsx(SubscriptionsListContainer, { companyName: companyName, hideExpired: hideExpired, onCancelSubscriptionClick: onCancelSubscriptionClick, onChangePlanClick: onChangePlanClick, subscriptions: subscriptions, subscriptionsAreLoading: subscriptionsAreLoading, noSubscriptionsComponent: noSubscriptionsComponent }), isMobile && (jsxRuntime.jsx("div", __assign({ className: "bunny-pt-4 bunny-pb-2" }, { children: jsxRuntime.jsx(SubscriptionsNavigation, { expiredSwitchVisible: expiredSwitchVisible, hideExpired: hideExpired, setHideExpired: setHideExpired, setQuantityDrawerOpen: setQuantityDrawerOpen, subscriptions: subscriptions }) }))), jsxRuntime.jsx(QuantityChangeDrawerDesktop, { editingQuote: quote, editingQuoteData: editingQuoteData, onClose: onClose, open: quantityDrawerOpen, openCheckout: function () { return setPayModalVisible(true); }, setEditingQuoteData: setEditingQuoteData, subscriptions: subscriptions }), jsxRuntime.jsx(Checkout, { onCancel: onCancel, onSuccess: onSuccess, onFail: onFail, open: payModalVisible, quote: quote, token: token, isMobile: isMobile, storedPaymentMethod: defaultPaymentMethod })] })));
|
|
22574
22473
|
};
|
|
22575
22474
|
var PageHeaderWithActions = function (_a) {
|
|
22576
22475
|
var children = _a.children, title = _a.title;
|
|
@@ -22595,7 +22494,7 @@ var billingDetailsUpdate = function (_a) {
|
|
|
22595
22494
|
switch (_c.label) {
|
|
22596
22495
|
case 0:
|
|
22597
22496
|
vars = { attributes: attributes };
|
|
22598
|
-
return [4 /*yield*/, gqlRequest({
|
|
22497
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
22599
22498
|
query: MUTATION,
|
|
22600
22499
|
token: token,
|
|
22601
22500
|
vars: vars,
|
|
@@ -22623,7 +22522,7 @@ var getBillingDetails = function (_a) {
|
|
|
22623
22522
|
var _b;
|
|
22624
22523
|
return __generator(this, function (_c) {
|
|
22625
22524
|
switch (_c.label) {
|
|
22626
|
-
case 0: return [4 /*yield*/, gqlRequest({
|
|
22525
|
+
case 0: return [4 /*yield*/, common.gqlRequest({
|
|
22627
22526
|
query: billingDetailsQuery(),
|
|
22628
22527
|
token: token,
|
|
22629
22528
|
apiHost: apiHost,
|