@bunnyapp/components 1.0.68-beta.8 → 1.0.68-beta.9
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 +326 -184
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +1 -3
- package/dist/cjs/src/components/Checkout/checkoutUtils.d.ts +1 -1
- package/dist/cjs/src/components/Signup/CheckoutSummary.d.ts +11 -0
- package/dist/cjs/src/components/Signup/PaymentForms.d.ts +6 -0
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanManager.d.ts +0 -4
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardDescription.d.ts +1 -1
- package/dist/cjs/src/graphql/mutations/quoteAccountSignup.d.ts +3 -1
- package/dist/cjs/src/graphql/mutations/quoteChangeAddCoupon.d.ts +8 -0
- package/dist/cjs/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +8 -0
- package/dist/esm/index.js +328 -185
- package/dist/esm/src/components/Checkout/Checkout.d.ts +1 -3
- package/dist/esm/src/components/Checkout/checkoutUtils.d.ts +1 -1
- package/dist/esm/src/components/Signup/CheckoutSummary.d.ts +11 -0
- package/dist/esm/src/components/Signup/PaymentForms.d.ts +6 -0
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanManager.d.ts +0 -4
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardDescription.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/quoteAccountSignup.d.ts +3 -1
- package/dist/esm/src/graphql/mutations/quoteChangeAddCoupon.d.ts +8 -0
- package/dist/esm/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +8 -0
- package/package.json +3 -3
- package/dist/cjs/src/graphql/mutations/quoteAddCoupon.d.ts +0 -8
- package/dist/esm/src/graphql/mutations/quoteAddCoupon.d.ts +0 -8
package/dist/cjs/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var request = require('graphql-request');
|
|
|
16
16
|
var react$1 = require('@pdf-viewer/react');
|
|
17
17
|
var reactStripeJs = require('@stripe/react-stripe-js');
|
|
18
18
|
var index_js = require('@stripe/stripe-js/pure/index.js');
|
|
19
|
-
var parse = require('html-react-parser');
|
|
20
19
|
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
21
20
|
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
22
21
|
var recharts = require('recharts');
|
|
@@ -28,7 +27,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
28
27
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
29
28
|
var theme__default = /*#__PURE__*/_interopDefaultLegacy(theme);
|
|
30
29
|
var request__default = /*#__PURE__*/_interopDefaultLegacy(request);
|
|
31
|
-
var parse__default = /*#__PURE__*/_interopDefaultLegacy(parse);
|
|
32
30
|
var pkg__default = /*#__PURE__*/_interopDefaultLegacy(pkg);
|
|
33
31
|
|
|
34
32
|
function styleInject(css, ref) {
|
|
@@ -58,7 +56,7 @@ function styleInject(css, ref) {
|
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
var css_248z = ":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-0 {\n margin-top: 0px;\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.mr-4 {\n margin-right: 1rem;\n}\n.mb-0 {\n margin-bottom: 0px;\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.whitespace-pre-wrap {\n white-space: pre-wrap;\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.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-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.bg-red-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 113 113 / 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-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / 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.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@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";
|
|
59
|
+
var css_248z = ":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-1 {\n grid-column: span 1 / span 1;\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-min-h-0 {\n min-height: 0px;\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-3 {\n grid-template-columns: repeat(3, 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-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / 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.hover\\:bunny-text-orange-400:hover {\n --tw-text-opacity: 1;\n color: rgb(251 146 60 / var(--tw-text-opacity, 1));\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";
|
|
62
60
|
styleInject(css_248z);
|
|
63
61
|
|
|
64
62
|
/******************************************************************************
|
|
@@ -156,7 +154,7 @@ var BrandContext = react.createContext({
|
|
|
156
154
|
});
|
|
157
155
|
|
|
158
156
|
// This will be replaced at build time by rollup-plugin-replace
|
|
159
|
-
var PACKAGE_VERSION = '1.0.68-beta.
|
|
157
|
+
var PACKAGE_VERSION = '1.0.68-beta.9';
|
|
160
158
|
var createRequestHeaders = function (token) {
|
|
161
159
|
var headers = common.createClientDevHeaders(token);
|
|
162
160
|
// Add the components version header
|
|
@@ -200,7 +198,7 @@ var gqlRequest = function (_a) {
|
|
|
200
198
|
});
|
|
201
199
|
};
|
|
202
200
|
|
|
203
|
-
var MUTATION$
|
|
201
|
+
var MUTATION$b = "\n query entityBranding {\n entityBranding {\n accentColor\n brandColor\n topNavImageUrl\n }\n }\n";
|
|
204
202
|
var getBranding = function (_a) {
|
|
205
203
|
var token = _a.token, apiHost = _a.apiHost;
|
|
206
204
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -208,7 +206,7 @@ var getBranding = function (_a) {
|
|
|
208
206
|
return __generator(this, function (_b) {
|
|
209
207
|
switch (_b.label) {
|
|
210
208
|
case 0: return [4 /*yield*/, gqlRequest({
|
|
211
|
-
query: MUTATION$
|
|
209
|
+
query: MUTATION$b,
|
|
212
210
|
token: token,
|
|
213
211
|
apiHost: apiHost,
|
|
214
212
|
})];
|
|
@@ -526,6 +524,41 @@ function LegacyDocument(_a) {
|
|
|
526
524
|
}, title: "Invoice PDF", width: "100%" }));
|
|
527
525
|
}
|
|
528
526
|
|
|
527
|
+
var MUTATION$a = "\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";
|
|
528
|
+
var checkout = function (_a) {
|
|
529
|
+
var quoteId = _a.quoteId, invoiceId = _a.invoiceId, paymentMethodId = _a.paymentMethodId, paymentMethodData = _a.paymentMethodData, token = _a.token, apiHost = _a.apiHost;
|
|
530
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
531
|
+
var mutationVars, response, errors;
|
|
532
|
+
return __generator(this, function (_b) {
|
|
533
|
+
switch (_b.label) {
|
|
534
|
+
case 0:
|
|
535
|
+
mutationVars = {
|
|
536
|
+
quoteId: quoteId,
|
|
537
|
+
invoiceId: invoiceId,
|
|
538
|
+
paymentMethodId: paymentMethodId,
|
|
539
|
+
};
|
|
540
|
+
if (paymentMethodData) {
|
|
541
|
+
mutationVars.paymentMethodData = __assign(__assign({}, paymentMethodData), { metadata: paymentMethodData.metadata });
|
|
542
|
+
}
|
|
543
|
+
return [4 /*yield*/, gqlRequest({
|
|
544
|
+
query: MUTATION$a,
|
|
545
|
+
token: token,
|
|
546
|
+
vars: mutationVars,
|
|
547
|
+
apiHost: apiHost,
|
|
548
|
+
})];
|
|
549
|
+
case 1:
|
|
550
|
+
response = _b.sent();
|
|
551
|
+
errors = (response === null || response === void 0 ? void 0 : response.checkout).errors;
|
|
552
|
+
if (errors)
|
|
553
|
+
throw errors;
|
|
554
|
+
return [2 /*return*/, {
|
|
555
|
+
savePaymentMethod: paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.savePaymentMethod,
|
|
556
|
+
}];
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
});
|
|
560
|
+
};
|
|
561
|
+
|
|
529
562
|
var paymentMethodsQuery = function (filter) { return "query paymentMethods {\n paymentMethods ".concat(filter ? "(".concat(filter, ")") : '', " {\n nodes {\n id\n pluginId\n accountId\n expirationDate\n plugin {\n guid\n id\n }\n state\n metadata {\n issuer\n identifier\n kind\n description\n icon\n type\n }\n isDefault\n }\n }\n}"); };
|
|
530
563
|
var getPaymentMethods = function (_a) {
|
|
531
564
|
var apiHost = _a.apiHost, token = _a.token, accountId = _a.accountId;
|
|
@@ -622,41 +655,6 @@ var getQuoteAmountDue = function (quote) {
|
|
|
622
655
|
return quote.amountDue || quote.amount;
|
|
623
656
|
};
|
|
624
657
|
|
|
625
|
-
var MUTATION$8 = "\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";
|
|
626
|
-
var checkout = function (_a) {
|
|
627
|
-
var quoteId = _a.quoteId, invoiceId = _a.invoiceId, paymentMethodId = _a.paymentMethodId, paymentMethodData = _a.paymentMethodData, token = _a.token, apiHost = _a.apiHost;
|
|
628
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
629
|
-
var mutationVars, response, errors;
|
|
630
|
-
return __generator(this, function (_b) {
|
|
631
|
-
switch (_b.label) {
|
|
632
|
-
case 0:
|
|
633
|
-
mutationVars = {
|
|
634
|
-
quoteId: quoteId,
|
|
635
|
-
invoiceId: invoiceId,
|
|
636
|
-
paymentMethodId: paymentMethodId,
|
|
637
|
-
};
|
|
638
|
-
if (paymentMethodData) {
|
|
639
|
-
mutationVars.paymentMethodData = __assign(__assign({}, paymentMethodData), { metadata: paymentMethodData.metadata });
|
|
640
|
-
}
|
|
641
|
-
return [4 /*yield*/, gqlRequest({
|
|
642
|
-
query: MUTATION$8,
|
|
643
|
-
token: token,
|
|
644
|
-
vars: mutationVars,
|
|
645
|
-
apiHost: apiHost,
|
|
646
|
-
})];
|
|
647
|
-
case 1:
|
|
648
|
-
response = _b.sent();
|
|
649
|
-
errors = (response === null || response === void 0 ? void 0 : response.checkout).errors;
|
|
650
|
-
if (errors)
|
|
651
|
-
throw errors;
|
|
652
|
-
return [2 /*return*/, {
|
|
653
|
-
savePaymentMethod: paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.savePaymentMethod,
|
|
654
|
-
}];
|
|
655
|
-
}
|
|
656
|
-
});
|
|
657
|
-
});
|
|
658
|
-
};
|
|
659
|
-
|
|
660
658
|
function usePay$1(_a) {
|
|
661
659
|
var _this = this;
|
|
662
660
|
var onPaymentSuccess = _a.onPaymentSuccess, onPaymentError = _a.onPaymentError, quote = _a.quote, invoice = _a.invoice, storedPaymentMethod = _a.storedPaymentMethod, plugin = _a.plugin;
|
|
@@ -18757,7 +18755,7 @@ var DemoPayForm = function (_a) {
|
|
|
18757
18755
|
cvc: '',
|
|
18758
18756
|
}), cardDetails = _d[0], setCardDetails = _d[1];
|
|
18759
18757
|
var onSave = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
18760
|
-
var error_1;
|
|
18758
|
+
var error_1, errorResponse;
|
|
18761
18759
|
return __generator(this, function (_a) {
|
|
18762
18760
|
switch (_a.label) {
|
|
18763
18761
|
case 0:
|
|
@@ -18773,7 +18771,12 @@ var DemoPayForm = function (_a) {
|
|
|
18773
18771
|
return [3 /*break*/, 3];
|
|
18774
18772
|
case 2:
|
|
18775
18773
|
error_1 = _a.sent();
|
|
18776
|
-
|
|
18774
|
+
errorResponse = {
|
|
18775
|
+
response: {
|
|
18776
|
+
message: error_1.message,
|
|
18777
|
+
},
|
|
18778
|
+
};
|
|
18779
|
+
onFail(errorResponse);
|
|
18777
18780
|
return [3 /*break*/, 3];
|
|
18778
18781
|
case 3: return [2 /*return*/];
|
|
18779
18782
|
}
|
|
@@ -19102,6 +19105,7 @@ var PaymentForm = function (_a) {
|
|
|
19102
19105
|
// Complex hooks
|
|
19103
19106
|
var paymentPlugins = usePaymentPlugins({ apiHost: apiHost, selectedEntityId: entityId, token: token }).paymentPlugins;
|
|
19104
19107
|
var selectedPaymentMethodPlugin = react.useMemo(function () {
|
|
19108
|
+
// TODO: consolate PluginData and PaymentPlugin into one type. Needs to be done on API side.
|
|
19105
19109
|
return paymentPlugins === null || paymentPlugins === void 0 ? void 0 : paymentPlugins.find(function (plugin) { var _a, _b, _c; return ((_a = plugin.id) === null || _a === void 0 ? void 0 : _a.toString()) === ((_c = (_b = defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.plugin) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.toString()); });
|
|
19106
19110
|
}, [paymentPlugins, defaultPaymentMethod]);
|
|
19107
19111
|
// Derived state
|
|
@@ -19110,6 +19114,7 @@ var PaymentForm = function (_a) {
|
|
|
19110
19114
|
var currencyId = (_b = ((quote === null || quote === void 0 ? void 0 : quote.currencyId) ||
|
|
19111
19115
|
(invoice === null || invoice === void 0 ? void 0 : invoice.currencyId) ||
|
|
19112
19116
|
currencyIdFromProps)) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
19117
|
+
var paymentRequired = quote ? getQuoteAmountDue(quote) > 0 : true;
|
|
19113
19118
|
// Custom hooks
|
|
19114
19119
|
var _e = useSetDefaultPaymentMethod(paymentPlugins || [], apiHost, token, accountId, function (message) {
|
|
19115
19120
|
showErrorNotification$1(message, 'Error setting default payment method');
|
|
@@ -19126,9 +19131,29 @@ var PaymentForm = function (_a) {
|
|
|
19126
19131
|
var _f = usePaymentMethodSelectorPlugin({
|
|
19127
19132
|
defaultPaymentMethod: defaultPaymentMethod,
|
|
19128
19133
|
defaultPaymentMethodPlugin: defaultPaymentMethodPlugin,
|
|
19129
|
-
paymentMethodAllowedPlugins: paymentPlugins,
|
|
19134
|
+
paymentMethodAllowedPlugins: paymentPlugins || [],
|
|
19130
19135
|
}), selectorPaymentMethodPlugin = _f.selectorPaymentMethodPlugin, setSelectorPaymentMethodPlugin = _f.setSelectorPaymentMethodPlugin;
|
|
19131
19136
|
var selectedPaymentPluginIsManualPayment = (selectorPaymentMethodPlugin === null || selectorPaymentMethodPlugin === void 0 ? void 0 : selectorPaymentMethodPlugin.name) === 'Manual Payment';
|
|
19137
|
+
// Mutations
|
|
19138
|
+
var _g = reactQuery.useMutation({
|
|
19139
|
+
mutationFn: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
19140
|
+
return __generator(this, function (_a) {
|
|
19141
|
+
switch (_a.label) {
|
|
19142
|
+
case 0:
|
|
19143
|
+
if (!quote)
|
|
19144
|
+
throw new Error('Quote is required');
|
|
19145
|
+
if (paymentRequired)
|
|
19146
|
+
throw new Error('Payment is required');
|
|
19147
|
+
return [4 /*yield*/, checkout({ quoteId: quote.id, token: token, apiHost: apiHost })];
|
|
19148
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
19149
|
+
}
|
|
19150
|
+
});
|
|
19151
|
+
}); },
|
|
19152
|
+
onSuccess: function () {
|
|
19153
|
+
handlePaymentSuccess();
|
|
19154
|
+
},
|
|
19155
|
+
onError: onFail,
|
|
19156
|
+
}), checkoutNoPayment = _g.mutate, isCheckingOutNoPayment = _g.isPending;
|
|
19132
19157
|
var onClickRemove = useRemovePaymentMethod(paymentPlugins || [], apiHost, token, accountId, onRemovePaymentMethod, function (message) {
|
|
19133
19158
|
showErrorNotification$1(message, 'Error removing payment method');
|
|
19134
19159
|
});
|
|
@@ -19165,14 +19190,14 @@ var PaymentForm = function (_a) {
|
|
|
19165
19190
|
storedPaymentMethods: storedPaymentMethods,
|
|
19166
19191
|
defaultPaymentMethod: defaultPaymentMethod,
|
|
19167
19192
|
customCheckoutFunction: customCheckoutFunction,
|
|
19168
|
-
} }, { children: jsxRuntime.jsx(StripeWrapper, __assign({ plugin: selectorPaymentMethodPlugin, token: token, apiHost: apiHost, currencyId: currencyId, accountId: accountId }, { children: jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-0 bunny-w-full" }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 bunny-px-4" }, { children: [storedPaymentMethods === null || storedPaymentMethods === void 0 ? void 0 : storedPaymentMethods.map(function (paymentMethod) { return (jsxRuntime.jsx(MiniCreditCard, { onClickRemove: function () { return onClickRemove(paymentMethod); }, onClickSetDefault: function () { return handleSetDefault(paymentMethod); }, paymentMethodData: paymentMethod, id: "payment-method-".concat(paymentMethod.id) }, paymentMethod.id)); }), (storedPaymentMethods === null || storedPaymentMethods === void 0 ? void 0 : storedPaymentMethods.length) === 0 && (jsxRuntime.jsx(MiniCreditCard, { onClickRemove: function () { }, onClickSetDefault: function () { } }))] })), jsxRuntime.jsx(antd.Collapse, { bordered: false, activeKey: showPaymentMethodForm ? '1' : undefined, ghost: true, collapsible: "disabled",
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19193
|
+
} }, { children: jsxRuntime.jsx(StripeWrapper, __assign({ plugin: selectorPaymentMethodPlugin, token: token, apiHost: apiHost, currencyId: currencyId, accountId: accountId }, { children: jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-0 bunny-w-full" }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: paymentRequired ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 bunny-px-4" }, { children: [storedPaymentMethods === null || storedPaymentMethods === void 0 ? void 0 : storedPaymentMethods.map(function (paymentMethod) { return (jsxRuntime.jsx(MiniCreditCard, { onClickRemove: function () { return onClickRemove(paymentMethod); }, onClickSetDefault: function () { return handleSetDefault(paymentMethod); }, paymentMethodData: paymentMethod, id: "payment-method-".concat(paymentMethod.id) }, paymentMethod.id)); }), (storedPaymentMethods === null || storedPaymentMethods === void 0 ? void 0 : storedPaymentMethods.length) === 0 && (jsxRuntime.jsx(MiniCreditCard, { onClickRemove: function () { }, onClickSetDefault: function () { } }))] })), jsxRuntime.jsx(antd.Collapse, { bordered: false, activeKey: showPaymentMethodForm ? '1' : undefined, ghost: true, collapsible: "disabled", destroyInactivePanel: true, items: [
|
|
19194
|
+
{
|
|
19195
|
+
key: '1',
|
|
19196
|
+
showArrow: false,
|
|
19197
|
+
label: !showPaymentMethodForm ? (jsxRuntime.jsx("div", __assign({ className: "bunny-pt-2" }, { children: jsxRuntime.jsx(antd.Button, __assign({ onClick: handleClickAddPaymentMethod, type: "default", className: "bunny-w-full", id: "addPaymentMethod" }, { children: "Add payment method" })) }))) : null,
|
|
19198
|
+
children: (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 bunny-mt-2" }, { children: [jsxRuntime.jsx(PaymentMethodSelector, { onSelect: setSelectorPaymentMethodPlugin, paymentMethodAllowedPlugins: paymentPlugins || [], value: selectorPaymentMethodPlugin }), selectorPaymentMethodPlugin && (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col" }, { children: jsxRuntime.jsx(PaymentMethodDetails, { onFail: onFail, onSavePaymentMethod: handleSavePaymentMethod, plugin: selectorPaymentMethodPlugin }) })))] }))),
|
|
19199
|
+
},
|
|
19200
|
+
] }), paying && !selectedPaymentPluginIsManualPayment ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultPaymentMethod ? (jsxRuntime.jsx("div", __assign({ className: "bunny-px-4" }, { children: jsxRuntime.jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, plugin: selectedPaymentMethodPlugin, onPaymentHoldSuccess: onPaymentHoldSuccess, paymentHoldOptions: paymentHoldOptions }) }))) : null })) : null] })) : (jsxRuntime.jsx(antd.Button, __assign({ style: { margin: '0 16px' }, loading: isCheckingOutNoPayment, onClick: function () { return checkoutNoPayment(); }, type: "primary" }, { children: isCheckingOutNoPayment ? 'Processing...' : 'Complete Order' }))) }) })) })) })));
|
|
19176
19201
|
};
|
|
19177
19202
|
function StripeWrapper(_a) {
|
|
19178
19203
|
var children = _a.children, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, currencyId = _a.currencyId, accountId = _a.accountId;
|
|
@@ -19250,7 +19275,7 @@ function ActualInvoice() {
|
|
|
19250
19275
|
return (jsxRuntime.jsx("div", __assign({ className: "bunny-invoice-container" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-6 bunny-overflow-hidden ".concat(isMobile ? 'bunny-flex-col bunny-w-full' : '', " ").concat(className) }, { children: [formattedInvoice.isLegacy ? (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-w-full" }, { children: jsxRuntime.jsx(LegacyDocument, { documentUuid: formattedInvoice.uuid, documentType: "invoice" }) }))) : (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, { entityId: entityId, onPaymentSuccess: onSuccess, onFail: onFail, invoice: formattedInvoice }) })))] })) })));
|
|
19251
19276
|
}
|
|
19252
19277
|
|
|
19253
|
-
var MUTATION$
|
|
19278
|
+
var MUTATION$8 = function (id) { return "\n query formattedQuote ($id: ID) {\n formattedQuote (id: $id) {\n quote {\n documentTemplateId\n documents { id filename size date url }\n firstInvoice {\n id\n state\n }\n payableId\n id\n payToAccept\n currentPaymentHold {\n createdAt\n expiresAt\n id\n updatedAt\n paymentMethod {\n accountId\n createdAt\n expirationDate\n failureCode\n id\n isDefault\n lastSuccess\n paymentType\n pluginId\n state\n updatedAt\n metadata {\n description\n expiration\n icon\n identifier\n issuer\n kind\n }\n }\n }\n }\n payableId\n acceptedAt\n acceptedByName\n amount\n amountDue\n amountsByPeriod {\n id\n name\n amount\n }\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 }"; };
|
|
19254
19279
|
var getFormattedQuote = function (_a) {
|
|
19255
19280
|
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
19256
19281
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -19258,7 +19283,7 @@ var getFormattedQuote = function (_a) {
|
|
|
19258
19283
|
return __generator(this, function (_b) {
|
|
19259
19284
|
switch (_b.label) {
|
|
19260
19285
|
case 0: return [4 /*yield*/, gqlRequest({
|
|
19261
|
-
query: MUTATION$
|
|
19286
|
+
query: MUTATION$8(),
|
|
19262
19287
|
token: token,
|
|
19263
19288
|
apiHost: apiHost,
|
|
19264
19289
|
vars: { id: id },
|
|
@@ -19296,9 +19321,9 @@ var usePlugins = function (_a) {
|
|
|
19296
19321
|
return response;
|
|
19297
19322
|
};
|
|
19298
19323
|
var getPlugins = function (_a) {
|
|
19299
|
-
var
|
|
19324
|
+
var token = _a.token, apiHost = _a.apiHost;
|
|
19300
19325
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19301
|
-
var response, plugins,
|
|
19326
|
+
var response, plugins, error;
|
|
19302
19327
|
return __generator(this, function (_b) {
|
|
19303
19328
|
switch (_b.label) {
|
|
19304
19329
|
case 0: return [4 /*yield*/, common.request({
|
|
@@ -19312,12 +19337,7 @@ var getPlugins = function (_a) {
|
|
|
19312
19337
|
return [4 /*yield*/, response.json()];
|
|
19313
19338
|
case 2:
|
|
19314
19339
|
plugins = _b.sent();
|
|
19315
|
-
|
|
19316
|
-
var _a, _b;
|
|
19317
|
-
var result = ((_a = plugin.entities) === null || _a === void 0 ? void 0 : _a.includes(Number(entityId))) || ((_b = plugin.entities) === null || _b === void 0 ? void 0 : _b.length) === 0 || !entityId;
|
|
19318
|
-
return result;
|
|
19319
|
-
});
|
|
19320
|
-
return [2 /*return*/, filteredPlugins];
|
|
19340
|
+
return [2 /*return*/, plugins];
|
|
19321
19341
|
case 3: return [4 /*yield*/, response.json()];
|
|
19322
19342
|
case 4:
|
|
19323
19343
|
error = _b.sent();
|
|
@@ -20169,7 +20189,7 @@ function QuotesWrapper() {
|
|
|
20169
20189
|
return (jsxRuntime.jsx(TransactionsDisplay, { transactions: quotesAsTransactions, onSearchValueChanged: setSearch, search: search }));
|
|
20170
20190
|
}
|
|
20171
20191
|
|
|
20172
|
-
var MUTATION$
|
|
20192
|
+
var MUTATION$7 = function () { return "\nmutation AccountSignup (\n $pluginId: String!,\n $paymentMethodId: String,\n $priceListCode: String!,\n $accountId: ID!,\n $quoteId: ID!,\n) {\n accountSignup(\n pluginId: $pluginId,\n paymentMethodId: $paymentMethodId,\n priceListCode: $priceListCode,\n accountId: $accountId,\n quoteId: $quoteId,\n ) {\n errors\n quote {\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}"; };
|
|
20173
20193
|
var accountSignup = function (_a) {
|
|
20174
20194
|
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;
|
|
20175
20195
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -20187,7 +20207,7 @@ var accountSignup = function (_a) {
|
|
|
20187
20207
|
priceListCode: priceListCode,
|
|
20188
20208
|
};
|
|
20189
20209
|
return [4 /*yield*/, gqlRequest({
|
|
20190
|
-
query: MUTATION$
|
|
20210
|
+
query: MUTATION$7(),
|
|
20191
20211
|
token: token,
|
|
20192
20212
|
vars: vars,
|
|
20193
20213
|
apiHost: apiHost,
|
|
@@ -20203,9 +20223,9 @@ var accountSignup = function (_a) {
|
|
|
20203
20223
|
});
|
|
20204
20224
|
};
|
|
20205
20225
|
|
|
20206
|
-
var MUTATION$
|
|
20226
|
+
var MUTATION$6 = function () { return "\nmutation QuoteAccountSignup (\n $accountName: String!,\n $billingContact: ContactAttributes!,\n $priceListCode: String!,\n $billingDetails: BillingDetailsAttributes\n) {\n quoteAccountSignup(\n priceListCode: $priceListCode,\n accountName: $accountName,\n billingContact: $billingContact,\n billingDetails: $billingDetails\n ) {\n account {\n id\n }\n quote {\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}"; };
|
|
20207
20227
|
var quoteAccountSignup = function (_a) {
|
|
20208
|
-
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact;
|
|
20228
|
+
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact, billingDetails = _a.billingDetails;
|
|
20209
20229
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
20210
20230
|
var vars, response, errors;
|
|
20211
20231
|
var _b;
|
|
@@ -20216,9 +20236,10 @@ var quoteAccountSignup = function (_a) {
|
|
|
20216
20236
|
priceListCode: priceListCode,
|
|
20217
20237
|
accountName: accountName,
|
|
20218
20238
|
billingContact: billingContact,
|
|
20239
|
+
billingDetails: billingDetails,
|
|
20219
20240
|
};
|
|
20220
20241
|
return [4 /*yield*/, gqlRequest({
|
|
20221
|
-
query: MUTATION$
|
|
20242
|
+
query: MUTATION$6(),
|
|
20222
20243
|
token: token,
|
|
20223
20244
|
vars: vars,
|
|
20224
20245
|
apiHost: apiHost,
|
|
@@ -20234,18 +20255,18 @@ var quoteAccountSignup = function (_a) {
|
|
|
20234
20255
|
});
|
|
20235
20256
|
};
|
|
20236
20257
|
|
|
20237
|
-
var MUTATION$
|
|
20238
|
-
var
|
|
20239
|
-
var
|
|
20258
|
+
var MUTATION$5 = "mutation quoteChangeAddCoupon($couponCode: String!, $quoteChangeId: ID!) {\n quoteChangeAddCoupon(couponCode: $couponCode, quoteChangeId: $quoteChangeId) {\n quoteChange {\n id\n charges {\n id\n amount\n couponId\n }\n }\n }\n}";
|
|
20259
|
+
var quoteChangeAddCoupon = function (_a) {
|
|
20260
|
+
var quoteChangeId = _a.quoteChangeId, couponCode = _a.couponCode, token = _a.token, apiHost = _a.apiHost;
|
|
20240
20261
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
20241
20262
|
var vars, response, errors;
|
|
20242
20263
|
var _b;
|
|
20243
20264
|
return __generator(this, function (_c) {
|
|
20244
20265
|
switch (_c.label) {
|
|
20245
20266
|
case 0:
|
|
20246
|
-
vars = {
|
|
20247
|
-
return [4 /*yield*/, gqlRequest({
|
|
20248
|
-
query: MUTATION$
|
|
20267
|
+
vars = { couponCode: couponCode, quoteChangeId: quoteChangeId };
|
|
20268
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
20269
|
+
query: MUTATION$5,
|
|
20249
20270
|
token: token,
|
|
20250
20271
|
vars: vars,
|
|
20251
20272
|
apiHost: apiHost,
|
|
@@ -20261,6 +20282,60 @@ var quoteAddCoupon = function (_a) {
|
|
|
20261
20282
|
});
|
|
20262
20283
|
};
|
|
20263
20284
|
|
|
20285
|
+
var MUTATION$4 = "mutation quoteChangeRemoveCoupon($quoteChangeId: ID!, $couponCode: String!) {\n quoteChangeRemoveCoupon(quoteChangeId: $quoteChangeId, couponCode: $couponCode) {\n errors\n }\n}\n";
|
|
20286
|
+
var quoteChangeRemoveCoupon = function (_a) {
|
|
20287
|
+
var quoteChangeId = _a.quoteChangeId, couponCode = _a.couponCode, token = _a.token, apiHost = _a.apiHost;
|
|
20288
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
20289
|
+
var vars, response, errors;
|
|
20290
|
+
var _b;
|
|
20291
|
+
return __generator(this, function (_c) {
|
|
20292
|
+
switch (_c.label) {
|
|
20293
|
+
case 0:
|
|
20294
|
+
vars = { couponCode: couponCode, quoteChangeId: quoteChangeId };
|
|
20295
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
20296
|
+
query: MUTATION$4,
|
|
20297
|
+
token: token,
|
|
20298
|
+
vars: vars,
|
|
20299
|
+
apiHost: apiHost,
|
|
20300
|
+
})];
|
|
20301
|
+
case 1:
|
|
20302
|
+
response = _c.sent();
|
|
20303
|
+
errors = (_b = response === null || response === void 0 ? void 0 : response.quoteChangeRemoveCoupon) === null || _b === void 0 ? void 0 : _b.errors;
|
|
20304
|
+
if (errors)
|
|
20305
|
+
throw errors;
|
|
20306
|
+
return [2 /*return*/, response.quote];
|
|
20307
|
+
}
|
|
20308
|
+
});
|
|
20309
|
+
});
|
|
20310
|
+
};
|
|
20311
|
+
|
|
20312
|
+
var QUOTE_RECALCULATE_TAXES = "\n mutation QuoteRecalculateTaxes($id: ID!) {\n quoteRecalculateTaxes(id: $id) {\n quote {\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 subtotal\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 coupon {\n couponCode\n }\n quantity\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n }\n }\n errors\n }\n }\n";
|
|
20313
|
+
var quoteRecalculateTaxes = function (_a) {
|
|
20314
|
+
var quoteId = _a.quoteId, apiHost = _a.apiHost, token = _a.token;
|
|
20315
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
20316
|
+
var vars, response, errors;
|
|
20317
|
+
var _b, _c;
|
|
20318
|
+
return __generator(this, function (_d) {
|
|
20319
|
+
switch (_d.label) {
|
|
20320
|
+
case 0:
|
|
20321
|
+
vars = { id: quoteId };
|
|
20322
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
20323
|
+
query: QUOTE_RECALCULATE_TAXES,
|
|
20324
|
+
token: token,
|
|
20325
|
+
vars: vars,
|
|
20326
|
+
apiHost: apiHost,
|
|
20327
|
+
})];
|
|
20328
|
+
case 1:
|
|
20329
|
+
response = _d.sent();
|
|
20330
|
+
errors = (_b = response === null || response === void 0 ? void 0 : response.quoteRecalculateTaxes) === null || _b === void 0 ? void 0 : _b.errors;
|
|
20331
|
+
if (errors)
|
|
20332
|
+
throw errors;
|
|
20333
|
+
return [2 /*return*/, (_c = response.quoteRecalculateTaxes) === null || _c === void 0 ? void 0 : _c.quote];
|
|
20334
|
+
}
|
|
20335
|
+
});
|
|
20336
|
+
});
|
|
20337
|
+
};
|
|
20338
|
+
|
|
20264
20339
|
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}"; };
|
|
20265
20340
|
var getPriceList = function (_a) {
|
|
20266
20341
|
var token = _a.token, code = _a.code, apiHost = _a.apiHost;
|
|
@@ -20282,7 +20357,7 @@ var getPriceList = function (_a) {
|
|
|
20282
20357
|
});
|
|
20283
20358
|
};
|
|
20284
20359
|
|
|
20285
|
-
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 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
|
|
20360
|
+
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 kind\n charges {\n subtotal\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 coupon {\n couponCode\n }\n quantity\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n\n }\n }\n }"); };
|
|
20286
20361
|
var getQuote = function (_a) {
|
|
20287
20362
|
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
20288
20363
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -20324,6 +20399,46 @@ var StyedLink = styled__default["default"].a(templateObject_1$6 || (templateObje
|
|
|
20324
20399
|
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);
|
|
20325
20400
|
var templateObject_1$6, templateObject_2$1;
|
|
20326
20401
|
|
|
20402
|
+
function CouponEditor(_a) {
|
|
20403
|
+
var className = _a.className, onAddCoupon = _a.onAddCoupon, isAddingCoupon = _a.isAddingCoupon;
|
|
20404
|
+
// Local state
|
|
20405
|
+
var _b = react.useState(''), couponCode = _b[0], setCouponCode = _b[1];
|
|
20406
|
+
function handleAddCoupon() {
|
|
20407
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20408
|
+
return __generator(this, function (_a) {
|
|
20409
|
+
onAddCoupon(couponCode);
|
|
20410
|
+
setCouponCode('');
|
|
20411
|
+
return [2 /*return*/];
|
|
20412
|
+
});
|
|
20413
|
+
});
|
|
20414
|
+
}
|
|
20415
|
+
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 ".concat(className) }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-gap-2" }, { children: [jsxRuntime.jsx(antd.Input, { value: couponCode, onChange: function (e) { return setCouponCode(e.target.value); }, placeholder: "Coupon code", disabled: isAddingCoupon }), jsxRuntime.jsx(antd.Button, __assign({ loading: isAddingCoupon, type: "primary", onClick: handleAddCoupon }, { children: "Apply" }))] })) })));
|
|
20416
|
+
}
|
|
20417
|
+
|
|
20418
|
+
var Text$f = antd.Typography.Text;
|
|
20419
|
+
function CheckoutSummary(_a) {
|
|
20420
|
+
var quote = _a.quote, className = _a.className, onAddCoupon = _a.onAddCoupon, onRemoveCoupon = _a.onRemoveCoupon, isRemovingCoupon = _a.isRemovingCoupon, priceListData = _a.priceListData, isAddingCoupon = _a.isAddingCoupon;
|
|
20421
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "".concat(className, " bunny-space-y-4") }, { children: [jsxRuntime.jsxs(Text$f, { 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) {
|
|
20422
|
+
return quoteChange === null || quoteChange === void 0 ? void 0 : quoteChange.charges.map(function (charge) {
|
|
20423
|
+
var _a;
|
|
20424
|
+
var multiplier = charge.kind === 'COUPON' ? -1 : 1;
|
|
20425
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-grid bunny-grid-cols-3 bunny-gap-4 bunny-items-center" }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-col-span-1" }, { children: charge.name })), jsxRuntime.jsx("div", __assign({ className: "bunny-col-span-1 bunny-text-center" }, { children: ((_a = charge.coupon) === null || _a === void 0 ? void 0 : _a.couponCode) ? (jsxRuntime.jsx("div", __assign({ onClick: function () {
|
|
20426
|
+
var _a, _b;
|
|
20427
|
+
if (isRemovingCoupon) {
|
|
20428
|
+
return;
|
|
20429
|
+
}
|
|
20430
|
+
if (!((_a = charge.coupon) === null || _a === void 0 ? void 0 : _a.couponCode)) {
|
|
20431
|
+
throw new Error('Coupon code not found');
|
|
20432
|
+
}
|
|
20433
|
+
onRemoveCoupon((_b = charge.coupon) === null || _b === void 0 ? void 0 : _b.couponCode);
|
|
20434
|
+
}, className: "bunny-text-orange-500 hover:bunny-text-orange-400 bunny-cursor-pointer" }, { children: "Remove" }))) : (jsxRuntime.jsx("div", { children: charge.quantity })) })), jsxRuntime.jsx("div", __assign({ className: "bunny-col-span-1 bunny-text-right" }, { children: common.formatCurrency(multiplier * (charge.subtotal || 0), charge.currencyId) }))] }), charge.id));
|
|
20435
|
+
});
|
|
20436
|
+
}) })), 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.subtotal, 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.currencyId) })] }))] }), jsxRuntime.jsx(CouponEditor, { className: "bunny-w-full", quote: quote, onAddCoupon: onAddCoupon, isAddingCoupon: isAddingCoupon })] })));
|
|
20437
|
+
}
|
|
20438
|
+
var CheckoutSummaryDivider = function () {
|
|
20439
|
+
return (jsxRuntime.jsx("div", __assign({ className: "bunny-my-2" }, { children: jsxRuntime.jsx(antd.Divider, { className: "m-0" }) })));
|
|
20440
|
+
};
|
|
20441
|
+
|
|
20327
20442
|
var Title$1 = antd.Typography.Title;
|
|
20328
20443
|
function PaymentForms(_a) {
|
|
20329
20444
|
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;
|
|
@@ -20333,32 +20448,38 @@ function PaymentForms(_a) {
|
|
|
20333
20448
|
function InitialSignupForm(_a) {
|
|
20334
20449
|
var className = _a.className, onSubmit = _a.onSubmit, submitting = _a.submitting;
|
|
20335
20450
|
var form = antd.Form.useForm()[0];
|
|
20451
|
+
var isMobile = common.useIsMobile();
|
|
20336
20452
|
function handleSubmit() {
|
|
20337
20453
|
form.validateFields({ validateOnly: false }).then(function () {
|
|
20338
20454
|
onSubmit(form.getFieldsValue());
|
|
20339
20455
|
});
|
|
20340
20456
|
}
|
|
20341
|
-
return (jsxRuntime.jsx(antd.Form, __assign({ className: "bunny-flex bunny-flex-col bunny-h-full bunny-w-full ".concat(className), 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: 'First name is required' }] }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "First name" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "lastName", rules: [{ required: true, message: 'Last name is required' }] }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Last name" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "email", rules: [
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
|
|
20457
|
+
return (jsxRuntime.jsx(antd.Form, __assign({ className: "bunny-flex bunny-flex-col bunny-h-full bunny-w-full ".concat(className), form: form, layout: "vertical", autoComplete: "off" }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-space-y-2" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-4" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ name: "firstName", rules: [{ required: true, message: 'First name is required' }], className: "bunny-flex-1" }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "First name" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "lastName", rules: [{ required: true, message: 'Last name is required' }], className: "bunny-flex-1" }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Last name" }) }))] })), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-gap-4" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ name: "email", rules: [
|
|
20458
|
+
{ required: true, message: 'Email is required' },
|
|
20459
|
+
{ type: 'email', message: 'Please enter a valid email' },
|
|
20460
|
+
], className: "bunny-flex-1" }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Email" }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ name: "accountName", rules: [{ required: true, message: 'Company name is required' }], className: "bunny-flex-1" }, { children: jsxRuntime.jsx(antd.Input, { placeholder: "Company name" }) }))] })), jsxRuntime.jsx("div", __assign({ className: "bunny-flex ".concat(isMobile ? 'bunny-flex-row bunny-pb-2' : 'bunny-flex-row', " bunny-gap-4") }, { children: jsxRuntime.jsx("div", __assign({ className: "flex-1 w-1/2" }, { children: jsxRuntime.jsx(antd.Form.Item, __assign({ name: "billingCountry", rules: [{ required: true, message: 'Country is required' }] }, { children: jsxRuntime.jsx(antd.Select, { className: "bunny-w-full", options: common.Lists.COUNTRY_LIST, placeholder: "Select a country", popupMatchSelectWidth: false, showSearch: true, filterOption: function (input, option) {
|
|
20461
|
+
var _a, _b;
|
|
20462
|
+
return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : '').toLowerCase().includes(input.toLowerCase()) ||
|
|
20463
|
+
((_b = option === null || option === void 0 ? void 0 : option.value) !== null && _b !== void 0 ? _b : '').toLowerCase().includes(input.toLowerCase());
|
|
20464
|
+
} }) })) })) })), jsxRuntime.jsx(antd.Form.Item, { children: jsxRuntime.jsx(antd.Button, __assign({ type: "primary", onClick: handleSubmit, loading: submitting, className: "bunny-w-full" }, { children: "Proceed to payment" })) })] })) })));
|
|
20345
20465
|
}
|
|
20346
20466
|
|
|
20347
|
-
var Title = antd.Typography.Title, Text$
|
|
20467
|
+
var Title = antd.Typography.Title, Text$e = antd.Typography.Text;
|
|
20348
20468
|
function PaymentSuccessDisplay(_a) {
|
|
20349
20469
|
var amountPaid = _a.amountPaid, className = _a.className, companyName = _a.companyName, returnUrl = _a.returnUrl, style = _a.style, currencyId = _a.currencyId;
|
|
20350
|
-
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$
|
|
20470
|
+
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$e, __assign({ className: "bunny-text-slate-500 bunny-cursor-pointer bunny-underline", onClick: function () { return (window.location.href = returnUrl); } }, { children: ["Back to ", companyName] })))] })));
|
|
20351
20471
|
}
|
|
20352
20472
|
|
|
20353
|
-
var Text$
|
|
20473
|
+
var Text$d = antd.Typography.Text;
|
|
20354
20474
|
function PriceListDisplay(_a) {
|
|
20355
20475
|
var priceListData = _a.priceListData;
|
|
20356
20476
|
if (!priceListData)
|
|
20357
20477
|
return null;
|
|
20358
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-space-y-8" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [jsxRuntime.jsxs(Text$
|
|
20478
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-space-y-8" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [jsxRuntime.jsxs(Text$d, __assign({ className: "bunny-text-slate-500 bunny-font-bold bunny-text-lg" }, { children: [priceListData.product.name, " ", priceListData.name] })), jsxRuntime.jsxs(Text$d, __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$d, __assign({ style: { fontSize: '16px' }, className: "bunny-text-slate-500" }, { children: [priceListData.trialLengthDays, " day trial"] })), jsxRuntime.jsx(Text$d, __assign({ className: "bunny-text-slate-500", style: { fontSize: '12px' } }, { children: "You will not be charged until the last day of the trial." }))] }))) : null] })));
|
|
20359
20479
|
}
|
|
20360
20480
|
|
|
20361
20481
|
var showErrorNotification = common.useErrorNotification();
|
|
20482
|
+
var showSuccessNotification = common.useSuccessNotification();
|
|
20362
20483
|
function Signup(_a) {
|
|
20363
20484
|
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, couponCode = _a.couponCode, className = _a.className, _b = _a.shadow, shadow = _b === void 0 ? 'shadow-md' : _b, style = _a.style;
|
|
20364
20485
|
// Hooks
|
|
@@ -20370,8 +20491,7 @@ function Signup(_a) {
|
|
|
20370
20491
|
var _d = react.useState(undefined), accountId = _d[0], setAccountId = _d[1];
|
|
20371
20492
|
var _e = react.useState(undefined), portalSessionToken = _e[0], setPortalSessionToken = _e[1];
|
|
20372
20493
|
var token = portalSessionToken || tokenFromContexts;
|
|
20373
|
-
var _f = react.useState(false),
|
|
20374
|
-
var _g = react.useState(false), purchaseSucceeded = _g[0], setPurchaseSucceeded = _g[1];
|
|
20494
|
+
var _f = react.useState(false), purchaseSucceeded = _f[0], setPurchaseSucceeded = _f[1];
|
|
20375
20495
|
var defaultCouponAppliedRef = react.useRef(undefined);
|
|
20376
20496
|
var defaultPaymentMethod = usePaymentMethod({
|
|
20377
20497
|
accountId: accountId,
|
|
@@ -20379,6 +20499,71 @@ function Signup(_a) {
|
|
|
20379
20499
|
apiHost: apiHost,
|
|
20380
20500
|
}).defaultPaymentMethod;
|
|
20381
20501
|
var queryClient = reactQuery.useQueryClient();
|
|
20502
|
+
var recalculateTaxes = reactQuery.useMutation({
|
|
20503
|
+
mutationFn: function () {
|
|
20504
|
+
if (!(quote === null || quote === void 0 ? void 0 : quote.id)) {
|
|
20505
|
+
throw new Error('Quote ID is required');
|
|
20506
|
+
}
|
|
20507
|
+
return quoteRecalculateTaxes({ token: token, apiHost: apiHost, quoteId: quote.id });
|
|
20508
|
+
},
|
|
20509
|
+
onError: function (error) {
|
|
20510
|
+
if (!error[0].message.includes('Ensure that you have a taxation plugin')) {
|
|
20511
|
+
showErrorNotification(error.message);
|
|
20512
|
+
}
|
|
20513
|
+
},
|
|
20514
|
+
onSuccess: function (quote) {
|
|
20515
|
+
queryClient.setQueryData(['quote', initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id], quote);
|
|
20516
|
+
queryClient.invalidateQueries({
|
|
20517
|
+
queryKey: ['quote', initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id],
|
|
20518
|
+
});
|
|
20519
|
+
},
|
|
20520
|
+
}).mutate;
|
|
20521
|
+
var _g = reactQuery.useMutation({
|
|
20522
|
+
mutationFn: function (formData) {
|
|
20523
|
+
return quoteAccountSignup({
|
|
20524
|
+
token: token,
|
|
20525
|
+
apiHost: apiHost,
|
|
20526
|
+
priceListCode: priceListCode,
|
|
20527
|
+
accountName: formData.accountName,
|
|
20528
|
+
billingContact: {
|
|
20529
|
+
firstName: formData.firstName,
|
|
20530
|
+
lastName: formData.lastName,
|
|
20531
|
+
email: formData.email,
|
|
20532
|
+
},
|
|
20533
|
+
billingDetails: {
|
|
20534
|
+
billingCountry: formData.billingCountry,
|
|
20535
|
+
// TODO: add these billing details back for Avalara and AFC taxation plugins.
|
|
20536
|
+
// billingState: formData.billingState,
|
|
20537
|
+
// billingCity: formData.billingCity,
|
|
20538
|
+
// billingZip: formData.billingZip,
|
|
20539
|
+
// billingStreet: formData.billingStreet,
|
|
20540
|
+
// taxNumber: formData.taxNumber,
|
|
20541
|
+
},
|
|
20542
|
+
});
|
|
20543
|
+
},
|
|
20544
|
+
onSuccess: function (data) {
|
|
20545
|
+
setAccountId(data.account.id);
|
|
20546
|
+
setPortalSessionToken(data.portalSessionToken);
|
|
20547
|
+
// We must invalidate the accountPaymentMethodKey query in order to clear payment methods from the provided api token,
|
|
20548
|
+
// to instead use paymentMethods from portalSessionToken.
|
|
20549
|
+
queryClient.invalidateQueries({
|
|
20550
|
+
queryKey: common.QueryKeyFactory.default.accountPaymentMethodKey({
|
|
20551
|
+
accountId: accountId,
|
|
20552
|
+
token: token,
|
|
20553
|
+
}),
|
|
20554
|
+
});
|
|
20555
|
+
setInitialQuote(data.quote);
|
|
20556
|
+
},
|
|
20557
|
+
onError: function (error) {
|
|
20558
|
+
var errorMessage = error.response.errors[0].message;
|
|
20559
|
+
if (errorMessage.includes("Address couldn't be validated")) {
|
|
20560
|
+
showErrorNotification('Please enter a valid billing address');
|
|
20561
|
+
}
|
|
20562
|
+
else {
|
|
20563
|
+
showErrorNotification(errorMessage);
|
|
20564
|
+
}
|
|
20565
|
+
},
|
|
20566
|
+
}), quoteAccountSignupMutate = _g.mutate, isSigningUp = _g.isPending;
|
|
20382
20567
|
// Queries
|
|
20383
20568
|
var _h = reactQuery.useQuery({
|
|
20384
20569
|
queryKey: ['priceList', priceListCode],
|
|
@@ -20397,30 +20582,63 @@ function Signup(_a) {
|
|
|
20397
20582
|
var quote = data || initialQuote;
|
|
20398
20583
|
var _k = reactQuery.useMutation({
|
|
20399
20584
|
mutationFn: function (couponCode) {
|
|
20585
|
+
var _a;
|
|
20400
20586
|
if (!quote) {
|
|
20401
20587
|
throw new Error('Quote is required');
|
|
20402
20588
|
}
|
|
20403
20589
|
if (!token) {
|
|
20404
20590
|
throw new Error('Token is required');
|
|
20405
20591
|
}
|
|
20406
|
-
|
|
20407
|
-
|
|
20592
|
+
if (!((_a = quote.quoteChanges[0]) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
20593
|
+
throw new Error('Quote change ID is required');
|
|
20594
|
+
}
|
|
20595
|
+
return quoteChangeAddCoupon({
|
|
20596
|
+
quoteChangeId: quote.quoteChanges[0].id,
|
|
20408
20597
|
couponCode: couponCode,
|
|
20409
20598
|
apiHost: apiHost,
|
|
20410
20599
|
token: token,
|
|
20411
20600
|
});
|
|
20412
20601
|
},
|
|
20413
20602
|
onSuccess: function () {
|
|
20414
|
-
queryClient.
|
|
20603
|
+
queryClient.invalidateQueries({
|
|
20415
20604
|
queryKey: ['quote', quote === null || quote === void 0 ? void 0 : quote.id],
|
|
20416
20605
|
});
|
|
20417
20606
|
showSuccessNotification('Coupon applied');
|
|
20607
|
+
recalculateTaxes();
|
|
20418
20608
|
},
|
|
20419
20609
|
onError: function (error) {
|
|
20420
20610
|
var _a, _b;
|
|
20421
20611
|
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');
|
|
20422
20612
|
},
|
|
20423
20613
|
}), addCoupon = _k.mutate, isAddingCoupon = _k.isPending;
|
|
20614
|
+
var _l = reactQuery.useMutation({
|
|
20615
|
+
mutationFn: function (couponCode) {
|
|
20616
|
+
var _a;
|
|
20617
|
+
if (!quote) {
|
|
20618
|
+
throw new Error('Quote is required');
|
|
20619
|
+
}
|
|
20620
|
+
if (!((_a = quote.quoteChanges[0]) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
20621
|
+
throw new Error('Quote change ID is required');
|
|
20622
|
+
}
|
|
20623
|
+
return quoteChangeRemoveCoupon({
|
|
20624
|
+
quoteChangeId: quote.quoteChanges[0].id,
|
|
20625
|
+
couponCode: couponCode,
|
|
20626
|
+
apiHost: apiHost,
|
|
20627
|
+
token: token,
|
|
20628
|
+
});
|
|
20629
|
+
},
|
|
20630
|
+
onSuccess: function () {
|
|
20631
|
+
showSuccessNotification('Coupon removed');
|
|
20632
|
+
recalculateTaxes();
|
|
20633
|
+
queryClient.invalidateQueries({
|
|
20634
|
+
queryKey: ['quote', quote === null || quote === void 0 ? void 0 : quote.id],
|
|
20635
|
+
});
|
|
20636
|
+
},
|
|
20637
|
+
onError: function (error) {
|
|
20638
|
+
var _a, _b;
|
|
20639
|
+
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 removing coupon');
|
|
20640
|
+
},
|
|
20641
|
+
}), removeCoupon = _l.mutate, isRemovingCoupon = _l.isPending;
|
|
20424
20642
|
// Handle default coupon application
|
|
20425
20643
|
react.useEffect(function () {
|
|
20426
20644
|
if (couponCode && (quote === null || quote === void 0 ? void 0 : quote.id) && defaultCouponAppliedRef.current !== couponCode) {
|
|
@@ -20430,45 +20648,9 @@ function Signup(_a) {
|
|
|
20430
20648
|
}, [couponCode, quote === null || quote === void 0 ? void 0 : quote.id]);
|
|
20431
20649
|
function handleSubmit(formData) {
|
|
20432
20650
|
return __awaiter(this, void 0, void 0, function () {
|
|
20433
|
-
var data_1, error_1;
|
|
20434
20651
|
return __generator(this, function (_a) {
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
_a.trys.push([0, 2, , 3]);
|
|
20438
|
-
setProceedingToPayment(true);
|
|
20439
|
-
return [4 /*yield*/, quoteAccountSignup({
|
|
20440
|
-
token: token,
|
|
20441
|
-
apiHost: apiHost,
|
|
20442
|
-
priceListCode: priceListCode,
|
|
20443
|
-
accountName: formData.accountName,
|
|
20444
|
-
billingContact: {
|
|
20445
|
-
firstName: formData.firstName,
|
|
20446
|
-
lastName: formData.lastName,
|
|
20447
|
-
email: formData.email,
|
|
20448
|
-
},
|
|
20449
|
-
})];
|
|
20450
|
-
case 1:
|
|
20451
|
-
data_1 = _a.sent();
|
|
20452
|
-
setAccountId(data_1.account.id);
|
|
20453
|
-
setPortalSessionToken(data_1.portalSessionToken);
|
|
20454
|
-
// We must invalidate the accountPaymentMethodKey query in order to clear payment methods from the provided api token,
|
|
20455
|
-
// to instead use paymentMethods from portalSessionToken.
|
|
20456
|
-
queryClient.invalidateQueries({
|
|
20457
|
-
queryKey: common.QueryKeyFactory.default.accountPaymentMethodKey({
|
|
20458
|
-
accountId: accountId,
|
|
20459
|
-
token: token,
|
|
20460
|
-
}),
|
|
20461
|
-
});
|
|
20462
|
-
setProceedingToPayment(false);
|
|
20463
|
-
setInitialQuote(data_1.quote);
|
|
20464
|
-
return [3 /*break*/, 3];
|
|
20465
|
-
case 2:
|
|
20466
|
-
error_1 = _a.sent();
|
|
20467
|
-
setProceedingToPayment(false);
|
|
20468
|
-
showErrorNotification(error_1.response.message);
|
|
20469
|
-
return [3 /*break*/, 3];
|
|
20470
|
-
case 3: return [2 /*return*/];
|
|
20471
|
-
}
|
|
20652
|
+
quoteAccountSignupMutate(formData);
|
|
20653
|
+
return [2 /*return*/];
|
|
20472
20654
|
});
|
|
20473
20655
|
});
|
|
20474
20656
|
}
|
|
@@ -20512,28 +20694,20 @@ function Signup(_a) {
|
|
|
20512
20694
|
});
|
|
20513
20695
|
}
|
|
20514
20696
|
function handlePaymentFail(error) {
|
|
20515
|
-
|
|
20697
|
+
var _a;
|
|
20698
|
+
showErrorNotification((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.message);
|
|
20516
20699
|
}
|
|
20700
|
+
react.useEffect(function () {
|
|
20701
|
+
if (initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id) {
|
|
20702
|
+
recalculateTaxes();
|
|
20703
|
+
}
|
|
20704
|
+
}, [initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id]);
|
|
20517
20705
|
if (purchaseSucceeded) {
|
|
20518
20706
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (quote === null || quote === void 0 ? void 0 : quote.currencyId) !== undefined ? (jsxRuntime.jsx("div", __assign({ className: "bunny-w-screen bunny-flex bunny-items-start bunny-pt-[25vh]" }, { children: 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" })) }));
|
|
20519
20707
|
}
|
|
20520
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex ".concat(isMobile ? 'bunny-flex-col' : 'bunny-flex-row', " bunny-h-screen bunny-w-screen bunny-absolute bunny-top-0 bunny-left-0 ").concat(shadow, " ").concat(className), style: style }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-flex-col ".concat(isMobile ? 'bunny-w-full bunny-h-1/2' : 'bunny-w-1/2 bunny-h-full', " bunny-justify-center") }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-start bunny-justify-between bunny-w-3/5 bunny-h-full bunny-gap-4 bunny-my-24" }, { children: [jsxRuntime.jsx("div", { children: topNavImageUrl.length > 0 && (jsxRuntime.jsx(antd.Image, { width: 24, src: topNavImageUrl, alt: "Logo", preview: false })) }), data ? (jsxRuntime.jsx(CheckoutSummary, { quote: data, className: "bunny-h-full bunny-w-full", onAddCoupon: addCoupon, priceListData: priceListData, isAddingCoupon: isAddingCoupon })) : (jsxRuntime.jsx("div", __assign({ className: "bunny-h-full" }, { children: isLoadingPriceList ? (jsxRuntime.jsx(antd.Skeleton, { active: true })) : (jsxRuntime.jsx(PriceListDisplay, { priceListData: priceListData })) }))), jsxRuntime.jsx(Footer, {})] })) })), jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col ".concat(isMobile ? 'bunny-w-full bunny-h-1/2 bunny-overflow-auto' : 'bunny-w-1/2 bunny-h-full', " bunny-items-center"), style: {
|
|
20708
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex ".concat(isMobile ? 'bunny-flex-col' : 'bunny-flex-row', " bunny-h-screen bunny-w-screen bunny-absolute bunny-top-0 bunny-left-0 ").concat(shadow, " ").concat(className), style: style }, { children: [jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-flex-col ".concat(isMobile ? 'bunny-w-full bunny-h-1/2' : 'bunny-w-1/2 bunny-h-full', " bunny-justify-center") }, { children: jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-start bunny-justify-between bunny-w-3/5 bunny-h-full bunny-gap-4 bunny-my-24" }, { children: [jsxRuntime.jsx("div", { children: topNavImageUrl.length > 0 && (jsxRuntime.jsx(antd.Image, { width: 24, src: topNavImageUrl, alt: "Logo", preview: false })) }), data ? (jsxRuntime.jsx(CheckoutSummary, { quote: data, className: "bunny-h-full bunny-w-full", onAddCoupon: addCoupon, onRemoveCoupon: removeCoupon, isRemovingCoupon: isRemovingCoupon, priceListData: priceListData, isAddingCoupon: isAddingCoupon })) : (jsxRuntime.jsx("div", __assign({ className: "bunny-h-full" }, { children: isLoadingPriceList ? (jsxRuntime.jsx(antd.Skeleton, { active: true })) : (jsxRuntime.jsx(PriceListDisplay, { priceListData: priceListData })) }))), jsxRuntime.jsx(Footer, {})] })) })), jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col ".concat(isMobile ? 'bunny-w-full bunny-h-1/2 bunny-overflow-auto' : 'bunny-w-1/2 bunny-h-full', " bunny-items-center"), style: {
|
|
20521
20709
|
boxShadow: '-5px 0 20px 0 rgba(0, 0, 0, 0.05)',
|
|
20522
|
-
} }, { children: isLoadingPriceList ? (jsxRuntime.jsx(antd.Skeleton, { active: true, className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" })) : (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" }, { children: jsxRuntime.jsx(PaymentForms, { quote:
|
|
20523
|
-
}
|
|
20524
|
-
var Text$d = antd.Typography.Text;
|
|
20525
|
-
var CheckoutSummaryDivider = function () {
|
|
20526
|
-
return (jsxRuntime.jsx("div", __assign({ className: "bunny-my-2" }, { children: jsxRuntime.jsx(antd.Divider, { className: "m-0" }) })));
|
|
20527
|
-
};
|
|
20528
|
-
var showSuccessNotification = common.useSuccessNotification();
|
|
20529
|
-
function CheckoutSummary(_a) {
|
|
20530
|
-
var quote = _a.quote, className = _a.className; _a.onAddCoupon; var priceListData = _a.priceListData; _a.isAddingCoupon;
|
|
20531
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "".concat(className, " bunny-space-y-4") }, { children: [jsxRuntime.jsxs(Text$d, { 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) {
|
|
20532
|
-
return quoteChange === null || quoteChange === void 0 ? void 0 : quoteChange.charges.map(function (charge) {
|
|
20533
|
-
var multiplier = charge.kind === 'COUPON' ? -1 : 1;
|
|
20534
|
-
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));
|
|
20535
|
-
});
|
|
20536
|
-
}) })), 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 ] })));
|
|
20710
|
+
} }, { children: isLoadingPriceList ? (jsxRuntime.jsx(antd.Skeleton, { active: true, className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" })) : (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" }, { children: jsxRuntime.jsx(PaymentForms, { quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: isSigningUp || isLoadingQuote, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction }) }))) }))] })));
|
|
20537
20711
|
}
|
|
20538
20712
|
|
|
20539
20713
|
var useQuoteSubscriptionUpgrade = function () {
|
|
@@ -20622,35 +20796,6 @@ var pageWrapperClassName = function (isMobile) {
|
|
|
20622
20796
|
return "flex flex-col grow pt-4 ".concat(isMobile ? "pb-4 overflow-hidden" : "pb-8", " ").concat("content-container");
|
|
20623
20797
|
};
|
|
20624
20798
|
|
|
20625
|
-
var QUOTE_FIELDS = "quote {\n formattedQuote {\n html\n }\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\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 invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n ownerId\n periodAmount\n poNumber\n requiresApproval\n startDate\n state\n subtotal\n taxAmount\n updatedAt\n uuid\n amountsByPeriod {\n amount\n id\n name\n }\n endDateOptions {\n endDate\n label\n }\n invoiceUntilOptions {\n endDate\n label\n }\n quoteChanges {\n currencyId\n id\n kind\n charges {\n amountsByPeriod {\n amount\n startDate\n }\n amount\n billingPeriod\n billingPeriodAmounts { id amount prorationRate }\n chargeType\n couponId\n createdAt\n currencyId\n discount\n endDate\n feature { id name code isUnit unitName }\n id\n name\n priceListCharge {\n id\n }\n priceList {\n id\n }\n couponId\n price\n priceDecimals\n priceTiers { starts price }\n pricingModel\n prorationRate\n quantity\n quantityMax\n quantityMin\n startDate\n tieredAveragePrice\n updatedAt\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n }\n}";
|
|
20626
|
-
|
|
20627
|
-
var QUOTE_RECALCULATE_TAXES = "\n mutation QuoteRecalculateTaxes($id: ID!) {\n quoteRecalculateTaxes(id: $id) {\n ".concat(QUOTE_FIELDS, "\n errors\n }\n }\n");
|
|
20628
|
-
var quoteRecalculateTaxes = function (_a) {
|
|
20629
|
-
var quoteId = _a.quoteId, apiHost = _a.apiHost, token = _a.token;
|
|
20630
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
20631
|
-
var vars, response, errors;
|
|
20632
|
-
var _b, _c;
|
|
20633
|
-
return __generator(this, function (_d) {
|
|
20634
|
-
switch (_d.label) {
|
|
20635
|
-
case 0:
|
|
20636
|
-
vars = { id: quoteId };
|
|
20637
|
-
return [4 /*yield*/, gqlRequest({
|
|
20638
|
-
query: QUOTE_RECALCULATE_TAXES,
|
|
20639
|
-
token: token,
|
|
20640
|
-
vars: vars,
|
|
20641
|
-
apiHost: apiHost,
|
|
20642
|
-
})];
|
|
20643
|
-
case 1:
|
|
20644
|
-
response = _d.sent();
|
|
20645
|
-
errors = (_b = response === null || response === void 0 ? void 0 : response.quoteRecalculateTaxes) === null || _b === void 0 ? void 0 : _b.errors;
|
|
20646
|
-
if (errors)
|
|
20647
|
-
throw errors;
|
|
20648
|
-
return [2 /*return*/, (_c = response.quoteRecalculateTaxes) === null || _c === void 0 ? void 0 : _c.quote];
|
|
20649
|
-
}
|
|
20650
|
-
});
|
|
20651
|
-
});
|
|
20652
|
-
};
|
|
20653
|
-
|
|
20654
20799
|
var MUTATION$2 = "{\n currentUser {\n taxationRequiredAccountFields\n }\n}";
|
|
20655
20800
|
var getTaxationRequiredAccountFields = function (_a) {
|
|
20656
20801
|
var apiHost = _a.apiHost, token = _a.token;
|
|
@@ -20809,10 +20954,10 @@ var PaymentFormWrapper = function (_a) {
|
|
|
20809
20954
|
var queryKeyFactory = common.QueryKeyFactory.default;
|
|
20810
20955
|
var Checkout = function (_a) {
|
|
20811
20956
|
var _b, _c;
|
|
20812
|
-
var onCancel = _a.onCancel, onSuccess = _a.onSuccess, onFail = _a.onFail, invoice = _a.invoice, open = _a.open, quote = _a.quote, selectedPriceList = _a.selectedPriceList
|
|
20957
|
+
var onCancel = _a.onCancel, onSuccess = _a.onSuccess, onFail = _a.onFail, invoice = _a.invoice, open = _a.open, quote = _a.quote, selectedPriceList = _a.selectedPriceList;
|
|
20813
20958
|
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
20814
20959
|
var isMobile = common.useIsMobile();
|
|
20815
|
-
var
|
|
20960
|
+
var token = useToken();
|
|
20816
20961
|
var hasTaxPlugin = useHasTaxPlugin({
|
|
20817
20962
|
apiHost: apiHost,
|
|
20818
20963
|
token: token,
|
|
@@ -20884,7 +21029,7 @@ var Checkout = function (_a) {
|
|
|
20884
21029
|
zIndex: 1001,
|
|
20885
21030
|
} }, { 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-pt-4 bunny-gap-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) {
|
|
20886
21031
|
onFail(error);
|
|
20887
|
-
}, onSuccess: onSuccess, quote: quote, taxationRequiredAccountFields: taxationRequiredAccountFields, token: token })) : (jsxRuntime.jsx(PaymentForm, {
|
|
21032
|
+
}, onSuccess: onSuccess, quote: quote, taxationRequiredAccountFields: taxationRequiredAccountFields, token: token })) : (jsxRuntime.jsx(PaymentForm, { onFail: function (error) {
|
|
20888
21033
|
onFail(error);
|
|
20889
21034
|
}, onPaymentSuccess: onSuccess }))] })), jsxRuntime.jsx(Footer, {})] })) })));
|
|
20890
21035
|
};
|
|
@@ -21260,7 +21405,7 @@ var PlanPickerCheckoutBar = function (_a) {
|
|
|
21260
21405
|
return (jsxRuntime.jsx(CheckoutBarInput, { disabled: !chargeQuantity, charge: charge, quantity: chargeQuantity !== null && chargeQuantity !== void 0 ? chargeQuantity : 0, selectedPriceList: selectedPriceList, onQuantityChanged: function (quantity) {
|
|
21261
21406
|
onChangeQuantity(charge.id, quantity);
|
|
21262
21407
|
} }, index));
|
|
21263
|
-
}) })), jsxRuntime.jsx(CheckoutBarSummarySection, { onClickCheckout: function () { return setPayModalVisible(true); }, open: payModalVisible, quote: quote, selectedPriceList: selectedPriceList, upgradingSubscription: upgradingSubscription, quotePreviewData: quotePreviewData }), jsxRuntime.jsx(Checkout, {
|
|
21408
|
+
}) })), jsxRuntime.jsx(CheckoutBarSummarySection, { onClickCheckout: function () { return setPayModalVisible(true); }, open: payModalVisible, quote: quote, selectedPriceList: selectedPriceList, upgradingSubscription: upgradingSubscription, quotePreviewData: quotePreviewData }), jsxRuntime.jsx(Checkout, { onCancel: function () { return setPayModalVisible(false); }, onFail: onCheckoutFail, onSuccess: handleCheckoutSuccess, open: payModalVisible, quote: quote, selectedPriceList: selectedPriceList, storedPaymentMethod: defaultPaymentMethod, token: token })] })));
|
|
21264
21409
|
};
|
|
21265
21410
|
|
|
21266
21411
|
// WARNING: There is a preview button on APP that will need to be changed if this query is changed
|
|
@@ -21400,10 +21545,7 @@ var PriceListCardPrice = function (_a) {
|
|
|
21400
21545
|
var Text$c = antd.Typography.Text;
|
|
21401
21546
|
var PriceListCardDescription = function (_a) {
|
|
21402
21547
|
var description = _a.description;
|
|
21403
|
-
|
|
21404
|
-
if (!description)
|
|
21405
|
-
return null;
|
|
21406
|
-
return jsxRuntime.jsx(Text$c, __assign({ className: "bunny-text-center" }, { children: htmlParsedDescription }));
|
|
21548
|
+
return (jsxRuntime.jsx(Text$c, __assign({ className: "bunny-text-center" }, { children: jsxRuntime.jsx(interweave.Markup, { content: description }) })));
|
|
21407
21549
|
};
|
|
21408
21550
|
|
|
21409
21551
|
var BillingPeriodConverter;
|
|
@@ -21930,7 +22072,7 @@ var PlanManager = function (_a) {
|
|
|
21930
22072
|
var queryClient = reactQuery.useQueryClient();
|
|
21931
22073
|
var showSuccessNotification = common.useSuccessNotification();
|
|
21932
22074
|
var showInfoNotification = common.useInfoNotification();
|
|
21933
|
-
|
|
22075
|
+
common.useIsMobile();
|
|
21934
22076
|
var defaultPaymentMethod = usePaymentMethod({
|
|
21935
22077
|
token: token,
|
|
21936
22078
|
apiHost: apiHost,
|
|
@@ -21982,8 +22124,8 @@ var PlanManager = function (_a) {
|
|
|
21982
22124
|
}, []);
|
|
21983
22125
|
function handleSetEditingQuoteData(quoteId, isTrial) {
|
|
21984
22126
|
setEditingQuoteData({
|
|
21985
|
-
id: quoteId || (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.id),
|
|
21986
|
-
isTrial: isTrial || (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial),
|
|
22127
|
+
id: quoteId || (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.id) || '',
|
|
22128
|
+
isTrial: isTrial || (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) || false,
|
|
21987
22129
|
});
|
|
21988
22130
|
}
|
|
21989
22131
|
// Handlers
|
|
@@ -22014,7 +22156,7 @@ var PlanManager = function (_a) {
|
|
|
22014
22156
|
return showInfoNotification('You are in preview mode');
|
|
22015
22157
|
setQuotePreviewData(undefined);
|
|
22016
22158
|
onChangePlanCancel();
|
|
22017
|
-
}, title: "Change plan" }), jsxRuntime.jsx(PlanPicker, {}), jsxRuntime.jsx(Checkout, { onCancel: onCancel, onSuccess: onSuccess, onFail: onFail, open: payModalVisible, quote: quote, token: token,
|
|
22159
|
+
}, title: "Change plan" }), jsxRuntime.jsx(PlanPicker, {}), jsxRuntime.jsx(Checkout, { onCancel: onCancel, onSuccess: onSuccess, onFail: onFail, open: payModalVisible, quote: quote, token: token, storedPaymentMethod: defaultPaymentMethod, selectedPriceList: quotePreviewData === null || quotePreviewData === void 0 ? void 0 : quotePreviewData.priceList }), jsxRuntime.jsx("div", { ref: stickyRef }), jsxRuntime.jsx("div", __assign({ className: "bunny-sticky bunny-bottom-4 bunny-transition-[margin] bunny-duration-300 ".concat(isSticky ? 'bunny-mx-4' : 'bunny-mx-0') }, { children: jsxRuntime.jsx(PlanPickerCheckoutBarWrapper, { editingQuote: editingQuoteData, setEditingQuoteData: handleSetEditingQuoteData, handlePortalErrors: handlePortalErrors, onCheckoutSuccess: function () { return onChangePlanCancel(); } }) }))] })));
|
|
22018
22160
|
};
|
|
22019
22161
|
|
|
22020
22162
|
var useCancelSubscription = function () {
|
|
@@ -23038,7 +23180,7 @@ var Subscriptions = function (_a) {
|
|
|
23038
23180
|
setIsChangingPlan(false);
|
|
23039
23181
|
}, handlePortalErrors: handlePortalErrors }));
|
|
23040
23182
|
}
|
|
23041
|
-
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: setHideExpiredState }))] }))) }) }, { children: !isMobile && (jsxRuntime.jsx(SubscriptionsNavigation, { expiredSwitchVisible: !hideExpiredToggle && expiredSwitchVisible, hideExpired: hideExpired, setHideExpired: setHideExpiredState, 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: setHideExpiredState, 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,
|
|
23183
|
+
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: setHideExpiredState }))] }))) }) }, { children: !isMobile && (jsxRuntime.jsx(SubscriptionsNavigation, { expiredSwitchVisible: !hideExpiredToggle && expiredSwitchVisible, hideExpired: hideExpired, setHideExpired: setHideExpiredState, 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: setHideExpiredState, 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, storedPaymentMethod: defaultPaymentMethod })] })));
|
|
23042
23184
|
};
|
|
23043
23185
|
var PageHeaderWithActions = function (_a) {
|
|
23044
23186
|
var children = _a.children, title = _a.title;
|