@bunnyapp/components 1.0.60-beta.0.1 → 1.0.62-beta.0
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 +478 -154
- package/dist/cjs/src/components/CustomizedAntdComponents/Tag.d.ts +3 -1
- package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +7 -2
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/useApproveHold.d.ts +13 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +6 -1
- package/dist/cjs/src/components/PaymentForm/Stripe/hooks/useApproveHold.d.ts +13 -0
- package/dist/cjs/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -2
- package/dist/cjs/src/components/Quote/AcceptQuoteModal.d.ts +2 -1
- package/dist/cjs/src/components/Quote/PaymentHoldModal.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getQuoteFirstInvoice.d.ts +7 -0
- package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +3 -2
- package/dist/esm/index.js +480 -156
- package/dist/esm/src/components/CustomizedAntdComponents/Tag.d.ts +3 -1
- package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +7 -2
- package/dist/esm/src/components/PaymentForm/DemoPay/hooks/useApproveHold.d.ts +13 -0
- package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +6 -1
- package/dist/esm/src/components/PaymentForm/Stripe/hooks/useApproveHold.d.ts +13 -0
- package/dist/esm/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -2
- package/dist/esm/src/components/Quote/AcceptQuoteModal.d.ts +2 -1
- package/dist/esm/src/components/Quote/PaymentHoldModal.d.ts +7 -0
- package/dist/esm/src/graphql/queries/getQuoteFirstInvoice.d.ts +7 -0
- package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +3 -2
- package/dist/index.d.ts +6 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -73,7 +73,7 @@ function styleInject(css, ref) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
var css_248z = ".ant-popover {\n z-index: 1050;\n}\n.ant-popover-inner-content {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-width: 300px;\n}\n.ant-popover-message-title {\n padding: 0;\n text-align: center;\n font-size: 1rem;\n}\n.ant-popover-buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ant-btn-link:disabled {\n color: #717d94 !important;\n}\n.ant-btn-link:disabled:hover {\n background-color: transparent !important;\n}\n.ant-notification {\n width: min-content;\n}\n.ant-notification-topRight {\n right: 0 !important;\n left: 0 !important;\n margin-left: auto !important;\n margin-right: auto !important;\n}\n.ant-notification-notice-wrapper {\n width: 350px !important;\n overflow: hidden !important;\n}\n.ant-notification-notice {\n padding: 16px !important;\n width: 350px !important;\n display: flex !important;\n box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.08), 0px 1px 18px rgba(0, 0, 0, 0.08), 0px 3px 5px rgba(0, 0, 0, 0.16) !important;\n}\n.ant-notification-notice-description {\n padding: 0 14px 0 0 !important;\n color: #232323 !important;\n font-size: 14px !important;\n word-break: break-all !important;\n overflow-wrap: break-word !important;\n}\n.ant-notification-notice-success {\n background-color: #edfffa !important;\n}\n.ant-notification-notice-error {\n background-color: #fff8f4 !important;\n}\n.ant-notification-notice-error .ant-notification-notice-message {\n color: #ff6e1c !important;\n font-weight: 500;\n}\n.ant-notification-notice-error .ant-notification-notice-icon {\n color: #ff6e1c;\n}\n.ant-notification-notice-success .ant-notification-notice-message {\n color: #00b76a !important;\n font-weight: 500;\n}\n.ant-notification-notice-success .ant-notification-notice-icon {\n color: #00b76a !important;\n}\n.ant-notification-notice-message {\n margin-bottom: 0 !important;\n}\n.ant-notification-notice-close {\n top: 16px !important;\n right: 16px !important;\n}\n.ant-menu-submenu-popup > .ant-menu .ant-menu-item {\n display: flex !important;\n align-items: center !important;\n}\n.ant-menu-submenu::after {\n display: none !important;\n}\n:root {\n --row-background: #ffffff;\n --row-background-alternate: rgba(100, 116, 139, 0.04);\n --row-background-dark: #121212;\n --row-background-alternate-dark: #1e1e1e;\n --bunny-blue-500: #3b82f6;\n --bunny-blue-200: #bfdbfe;\n --bunny-green-600: #059669;\n --bunny-green-200: #a7f3d0;\n --bunny-red-500: #ef4444;\n --bunny-red-200: #fecaca;\n --bunny-orange-500: #f97316;\n --bunny-orange-200: #fed7aa;\n --bunny-yellow-500: #f59e0b;\n --bunny-yellow-200: #fde68a;\n --bunny-purple-500: #8b5cf6;\n --bunny-purple-200: #ddd6fe;\n --bunny-black: #000000;\n}\n.bunny-component-wrapper {\n box-sizing: border-box;\n}\n.bunny-component-wrapper * {\n box-sizing: border-box;\n}\n.hidden {\n display: none;\n}\n.bunny-show-on-hover {\n opacity: 0;\n}\n.bunny-show-on-hover-container:hover .bunny-show-on-hover {\n opacity: 1;\n}\n.has-tooltip:hover .tooltip {\n visibility: visible;\n z-index: 100;\n}\n.pdf-only {\n display: none !important;\n}\n.notes p {\n margin: 0;\n padding: 0;\n padding-bottom: 0.25rem;\n}\n.bunny-icon-path {\n transition: fill 0.3s;\n}\n.bunny-shadow-padding-x {\n padding-right: 1rem;\n padding-left: 1rem;\n}\n.bunny-shadow-padding-xb {\n padding-right: 1rem;\n padding-left: 1rem;\n padding-bottom: 0.5rem;\n}\n.content-container {\n width: 100%;\n margin: 0 auto;\n}\n@media (min-width: 1220px) {\n .content-container {\n width: 1220px !important;\n margin: 0 auto;\n }\n}\n@media (min-width: 768px) {\n .bunny-shadow-padding-x {\n padding-right: 2rem;\n padding-left: 2rem;\n }\n .bunny-shadow-padding-xb {\n padding-right: 2rem;\n padding-left: 2rem;\n padding-bottom: 0.5rem;\n }\n .sm\\:flex {\n display: flex !important;\n }\n .sm\\:hidden {\n display: none !important;\n }\n}\n.bunny-shadow,\n.bunny-shadow-md {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.bunny-fixed {\n position: fixed;\n}\n.bunny-absolute {\n position: absolute;\n}\n.bunny-relative {\n position: relative;\n}\n.bunny-sticky {\n position: sticky;\n}\n.bunny-bottom-0 {\n bottom: 0px;\n}\n.bunny-bottom-4 {\n bottom: 1rem;\n}\n.bunny-left-0 {\n left: 0px;\n}\n.bunny-right-0 {\n right: 0px;\n}\n.bunny-top-0 {\n top: 0px;\n}\n.bunny-col-span-full {\n grid-column: 1 / -1;\n}\n.bunny-m-0 {\n margin: 0px;\n}\n.bunny-mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.bunny-mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.bunny-my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.bunny-my-24 {\n margin-top: 6rem;\n margin-bottom: 6rem;\n}\n.bunny-my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.bunny-mb-2 {\n margin-bottom: 0.5rem;\n}\n.bunny-mb-4 {\n margin-bottom: 1rem;\n}\n.bunny-mb-8 {\n margin-bottom: 2rem;\n}\n.bunny-mt-2 {\n margin-top: 0.5rem;\n}\n.bunny-mt-24 {\n margin-top: 6rem;\n}\n.bunny-mt-4 {\n margin-top: 1rem;\n}\n.bunny-flex {\n display: flex;\n}\n.bunny-grid {\n display: grid;\n}\n.bunny-contents {\n display: contents;\n}\n.bunny-h-1\\/2 {\n height: 50%;\n}\n.bunny-h-5 {\n height: 1.25rem;\n}\n.bunny-h-8 {\n height: 2rem;\n}\n.bunny-h-full {\n height: 100%;\n}\n.bunny-h-screen {\n height: 100vh;\n}\n.bunny-w-1\\/2 {\n width: 50%;\n}\n.bunny-w-3\\/5 {\n width: 60%;\n}\n.bunny-w-full {\n width: 100%;\n}\n.bunny-w-screen {\n width: 100vw;\n}\n.bunny-flex-1 {\n flex: 1 1 0%;\n}\n.bunny-shrink {\n flex-shrink: 1;\n}\n.bunny-shrink-0 {\n flex-shrink: 0;\n}\n.bunny-grow {\n flex-grow: 1;\n}\n.bunny-cursor-pointer {\n cursor: pointer;\n}\n.bunny-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.bunny-flex-row {\n flex-direction: row;\n}\n.bunny-flex-col {\n flex-direction: column;\n}\n.bunny-items-start {\n align-items: flex-start;\n}\n.bunny-items-end {\n align-items: flex-end;\n}\n.bunny-items-center {\n align-items: center;\n}\n.bunny-justify-end {\n justify-content: flex-end;\n}\n.bunny-justify-center {\n justify-content: center;\n}\n.bunny-justify-between {\n justify-content: space-between;\n}\n.bunny-gap-0 {\n gap: 0px;\n}\n.bunny-gap-1 {\n gap: 0.25rem;\n}\n.bunny-gap-2 {\n gap: 0.5rem;\n}\n.bunny-gap-3 {\n gap: 0.75rem;\n}\n.bunny-gap-4 {\n gap: 1rem;\n}\n.bunny-gap-6 {\n gap: 1.5rem;\n}\n.bunny-gap-8 {\n gap: 2rem;\n}\n.bunny-space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.bunny-overflow-auto {\n overflow: auto;\n}\n.bunny-overflow-hidden {\n overflow: hidden;\n}\n.bunny-overflow-visible {\n overflow: visible;\n}\n.bunny-whitespace-nowrap {\n white-space: nowrap;\n}\n.bunny-rounded {\n border-radius: 0.25rem;\n}\n.bunny-rounded-full {\n border-radius: 9999px;\n}\n.bunny-rounded-lg {\n border-radius: 0.5rem;\n}\n.bunny-rounded-md {\n border-radius: 0.375rem;\n}\n.bunny-border {\n border-width: 1px;\n}\n.bunny-border-2 {\n border-width: 2px;\n}\n.bunny-border-solid {\n border-style: solid;\n}\n.bunny-border-none {\n border-style: none;\n}\n.bunny-border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.bunny-bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bunny-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bunny-p-0 {\n padding: 0px;\n}\n.bunny-p-1 {\n padding: 0.25rem;\n}\n.bunny-p-2 {\n padding: 0.5rem;\n}\n.bunny-p-4 {\n padding: 1rem;\n}\n.bunny-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.bunny-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.bunny-px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.bunny-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.bunny-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.bunny-py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.bunny-pb-2 {\n padding-bottom: 0.5rem;\n}\n.bunny-pb-4 {\n padding-bottom: 1rem;\n}\n.bunny-pb-6 {\n padding-bottom: 1.5rem;\n}\n.bunny-pb-8 {\n padding-bottom: 2rem;\n}\n.bunny-pl-0 {\n padding-left: 0px;\n}\n.bunny-pl-4 {\n padding-left: 1rem;\n}\n.bunny-pr-4 {\n padding-right: 1rem;\n}\n.bunny-pt-12 {\n padding-top: 3rem;\n}\n.bunny-pt-2 {\n padding-top: 0.5rem;\n}\n.bunny-pt-4 {\n padding-top: 1rem;\n}\n.bunny-pt-5 {\n padding-top: 1.25rem;\n}\n.bunny-pt-6 {\n padding-top: 1.5rem;\n}\n.bunny-pt-\\[25vh\\] {\n padding-top: 25vh;\n}\n.bunny-text-left {\n text-align: left;\n}\n.bunny-text-center {\n text-align: center;\n}\n.bunny-text-right {\n text-align: right;\n}\n.bunny-text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.bunny-text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.bunny-text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.bunny-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.bunny-text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.bunny-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.bunny-font-bold {\n font-weight: 700;\n}\n.bunny-font-medium {\n font-weight: 500;\n}\n.bunny-font-normal {\n font-weight: 400;\n}\n.bunny-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.bunny-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.bunny-underline {\n text-decoration-line: underline;\n}\n.bunny-shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.bunny-duration-300 {\n transition-duration: 300ms;\n}\n.rotate-45,\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n}\n.shadow,\n.shadow-lg,\n.shadow-md,\n.shadow-none,\n.shadow-sm,\n.shadow-xl {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.visible {\n visibility: visible;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.sticky {\n position: sticky;\n}\n.-top-0\\.5 {\n top: -0.125rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-4 {\n bottom: 1rem;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.col-span-3 {\n grid-column: span 3 / span 3;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-0 {\n margin: 0px;\n}\n.mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.mb-8 {\n margin-bottom: 2rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-8 {\n margin-right: 2rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-6 {\n margin-top: 1.5rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.flex {\n display: flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-full {\n height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-1\\/3 {\n width: 33.333333%;\n}\n.w-12 {\n width: 3rem;\n}\n.w-2\\/3 {\n width: 66.666667%;\n}\n.w-4 {\n width: 1rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-32 {\n max-width: 8rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.shrink {\n flex-shrink: 1;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.border-collapse {\n border-collapse: collapse;\n}\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-0 {\n gap: 0px;\n}\n.gap-1 {\n gap: 0.25rem;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.gap-8 {\n gap: 2rem;\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-visible {\n overflow: visible;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-sm {\n border-radius: 0.125rem;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-none {\n border-style: none;\n}\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));\n}\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));\n}\n.border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.border-slate-300 {\n --tw-border-opacity: 1;\n border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));\n}\n.border-slate-700 {\n --tw-border-opacity: 1;\n border-color: rgb(51 65 85 / var(--tw-border-opacity, 1));\n}\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\n.bg-emerald-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));\n}\n.bg-green-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1));\n}\n.bg-orange-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 215 170 / var(--tw-bg-opacity, 1));\n}\n.bg-red-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\n.bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-8 {\n padding: 2rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n.pb-8 {\n padding-bottom: 2rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-4 {\n padding-left: 1rem;\n}\n.pt-1 {\n padding-top: 0.25rem;\n}\n.pt-12 {\n padding-top: 3rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.pt-5 {\n padding-top: 1.25rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.pt-8 {\n padding-top: 2rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-right {\n text-align: right;\n}\n.align-middle {\n vertical-align: middle;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.capitalize {\n text-transform: capitalize;\n}\n.text-emerald-600 {\n --tw-text-opacity: 1;\n color: rgb(5 150 105 / var(--tw-text-opacity, 1));\n}\n.text-emerald-700 {\n --tw-text-opacity: 1;\n color: rgb(4 120 87 / var(--tw-text-opacity, 1));\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity, 1));\n}\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.text-yellow-500 {\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity, 1));\n}\n.underline {\n text-decoration-line: underline;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-300 {\n transition-duration: 300ms;\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n@media (min-width: 768px) {\n .sm\\:flex {\n display: flex;\n }\n .sm\\:hidden {\n display: none;\n }\n}\n.bunny-invoice-container {\n padding: 0;\n box-sizing: border-box !important;\n line-height: 1.15;\n}\n@media only screen and (max-width: 768px) {\n select,\n textarea,\n input[type='text'],\n input[type='password'],\n input[type='datetime'],\n input[type='datetime-local'],\n input[type='date'],\n input[type='month'],\n input[type='time'],\n input[type='week'],\n input[type='number'],\n input[type='email'],\n input[type='url'],\n input[type='search'],\n input[type='tel'],\n input[type='color'] {\n font-size: 16px !important;\n }\n}\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
|
|
76
|
+
var css_248z = ".ant-popover {\n z-index: 1050;\n}\n.ant-popover-inner-content {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-width: 300px;\n}\n.ant-popover-message-title {\n padding: 0;\n text-align: center;\n font-size: 1rem;\n}\n.ant-popover-buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ant-btn-link:disabled {\n color: #717d94 !important;\n}\n.ant-btn-link:disabled:hover {\n background-color: transparent !important;\n}\n.ant-notification {\n width: min-content;\n}\n.ant-notification-topRight {\n right: 0 !important;\n left: 0 !important;\n margin-left: auto !important;\n margin-right: auto !important;\n}\n.ant-notification-notice-wrapper {\n width: 350px !important;\n overflow: hidden !important;\n}\n.ant-notification-notice {\n padding: 16px !important;\n width: 350px !important;\n display: flex !important;\n box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.08), 0px 1px 18px rgba(0, 0, 0, 0.08), 0px 3px 5px rgba(0, 0, 0, 0.16) !important;\n}\n.ant-notification-notice-description {\n padding: 0 14px 0 0 !important;\n color: #232323 !important;\n font-size: 14px !important;\n word-break: break-all !important;\n overflow-wrap: break-word !important;\n}\n.ant-notification-notice-success {\n background-color: #edfffa !important;\n}\n.ant-notification-notice-error {\n background-color: #fff8f4 !important;\n}\n.ant-notification-notice-error .ant-notification-notice-message {\n color: #ff6e1c !important;\n font-weight: 500;\n}\n.ant-notification-notice-error .ant-notification-notice-icon {\n color: #ff6e1c;\n}\n.ant-notification-notice-success .ant-notification-notice-message {\n color: #00b76a !important;\n font-weight: 500;\n}\n.ant-notification-notice-success .ant-notification-notice-icon {\n color: #00b76a !important;\n}\n.ant-notification-notice-message {\n margin-bottom: 0 !important;\n}\n.ant-notification-notice-close {\n top: 16px !important;\n right: 16px !important;\n}\n.ant-menu-submenu-popup > .ant-menu .ant-menu-item {\n display: flex !important;\n align-items: center !important;\n}\n.ant-menu-submenu::after {\n display: none !important;\n}\n:root {\n --row-background: #ffffff;\n --row-background-alternate: rgba(100, 116, 139, 0.04);\n --row-background-dark: #121212;\n --row-background-alternate-dark: #1e1e1e;\n --bunny-blue-500: #3b82f6;\n --bunny-blue-200: #bfdbfe;\n --bunny-green-600: #059669;\n --bunny-green-200: #a7f3d0;\n --bunny-red-500: #ef4444;\n --bunny-red-200: #fecaca;\n --bunny-orange-500: #f97316;\n --bunny-orange-200: #fed7aa;\n --bunny-yellow-500: #f59e0b;\n --bunny-yellow-200: #fde68a;\n --bunny-purple-500: #8b5cf6;\n --bunny-purple-200: #ddd6fe;\n --bunny-black: #000000;\n}\n.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";
|
|
77
77
|
styleInject(css_248z);
|
|
78
78
|
|
|
79
79
|
/******************************************************************************
|
|
@@ -171,7 +171,7 @@ var BrandContext = react.createContext({
|
|
|
171
171
|
});
|
|
172
172
|
|
|
173
173
|
// This will be replaced at build time by rollup-plugin-replace
|
|
174
|
-
var PACKAGE_VERSION = '1.0.
|
|
174
|
+
var PACKAGE_VERSION = '1.0.62-beta.0';
|
|
175
175
|
var createRequestHeaders = function (token) {
|
|
176
176
|
var _a;
|
|
177
177
|
var bearerToken = token ? "Bearer ".concat(token) : null;
|
|
@@ -566,7 +566,7 @@ var usePaymentPlugins = function (_a) {
|
|
|
566
566
|
};
|
|
567
567
|
|
|
568
568
|
var getQuoteAmountDue = function (quote) {
|
|
569
|
-
return quote.amountDue;
|
|
569
|
+
return quote.amountDue || quote.amount;
|
|
570
570
|
};
|
|
571
571
|
|
|
572
572
|
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";
|
|
@@ -651,6 +651,212 @@ function usePay$1(_a) {
|
|
|
651
651
|
return { pay: pay };
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
var createPaymentMethod = function (_a) {
|
|
655
|
+
var paymentMethodId = _a.paymentMethodId, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId;
|
|
656
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
657
|
+
var response;
|
|
658
|
+
return __generator(this, function (_b) {
|
|
659
|
+
switch (_b.label) {
|
|
660
|
+
case 0: return [4 /*yield*/, common.invokePlugin({
|
|
661
|
+
plugin: plugin,
|
|
662
|
+
method: 'store_payment_method',
|
|
663
|
+
payload: {
|
|
664
|
+
payment_method_id: paymentMethodId,
|
|
665
|
+
account_id: accountId,
|
|
666
|
+
},
|
|
667
|
+
token: token,
|
|
668
|
+
apiHost: apiHost,
|
|
669
|
+
})];
|
|
670
|
+
case 1:
|
|
671
|
+
response = _b.sent();
|
|
672
|
+
if (response.status !== 'success')
|
|
673
|
+
throw new Error(response.message || 'Unknown error');
|
|
674
|
+
return [2 /*return*/, response];
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
var createSetupIntent = function (plugin, apiHost, token, accountId) {
|
|
680
|
+
return common.invokePlugin({
|
|
681
|
+
plugin: plugin,
|
|
682
|
+
method: 'create_setup_intent',
|
|
683
|
+
token: token,
|
|
684
|
+
apiHost: apiHost,
|
|
685
|
+
payload: {
|
|
686
|
+
account_id: accountId,
|
|
687
|
+
},
|
|
688
|
+
});
|
|
689
|
+
};
|
|
690
|
+
var createPaymentHold = function (_a) {
|
|
691
|
+
var quote = _a.quote, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, paymentMethodId = _a.paymentMethodId;
|
|
692
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
693
|
+
var payload, response;
|
|
694
|
+
return __generator(this, function (_b) {
|
|
695
|
+
switch (_b.label) {
|
|
696
|
+
case 0:
|
|
697
|
+
payload = {
|
|
698
|
+
quote_id: quote.id,
|
|
699
|
+
amount: quote.amount,
|
|
700
|
+
payment_method_id: paymentMethodId,
|
|
701
|
+
};
|
|
702
|
+
return [4 /*yield*/, common.invokePlugin({
|
|
703
|
+
plugin: plugin,
|
|
704
|
+
method: 'create_payment_hold',
|
|
705
|
+
payload: payload,
|
|
706
|
+
token: token,
|
|
707
|
+
apiHost: apiHost,
|
|
708
|
+
})];
|
|
709
|
+
case 1:
|
|
710
|
+
response = _b.sent();
|
|
711
|
+
if (response.status !== 'success')
|
|
712
|
+
throw new Error(response.message || 'Unknown error');
|
|
713
|
+
return [2 /*return*/, response];
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
var fetchStripeKey = function (plugin, apiHost, token, accountId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
719
|
+
var response;
|
|
720
|
+
return __generator(this, function (_a) {
|
|
721
|
+
switch (_a.label) {
|
|
722
|
+
case 0: return [4 /*yield*/, common.invokePlugin({
|
|
723
|
+
plugin: plugin,
|
|
724
|
+
method: 'retrieve_config',
|
|
725
|
+
token: token,
|
|
726
|
+
apiHost: apiHost,
|
|
727
|
+
payload: {
|
|
728
|
+
account_id: accountId,
|
|
729
|
+
},
|
|
730
|
+
})];
|
|
731
|
+
case 1:
|
|
732
|
+
response = _a.sent();
|
|
733
|
+
return [2 /*return*/, response];
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}); };
|
|
737
|
+
index_js.loadStripe.setLoadParameters({ advancedFraudSignals: false });
|
|
738
|
+
var useStripePlugin = function (plugin, apiHost, currencyId, token, accountId) {
|
|
739
|
+
var _a = react.useState(null), stripe = _a[0], setStripe = _a[1];
|
|
740
|
+
var showErrorNotification = common.useErrorNotification();
|
|
741
|
+
var options = {
|
|
742
|
+
mode: 'setup',
|
|
743
|
+
currency: currencyId,
|
|
744
|
+
setupFutureUsage: 'off_session',
|
|
745
|
+
};
|
|
746
|
+
react.useEffect(function () {
|
|
747
|
+
var _a, _b;
|
|
748
|
+
if (!plugin)
|
|
749
|
+
return;
|
|
750
|
+
if (((_b = (_a = plugin.components) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b[0].name) !== 'StripePayment')
|
|
751
|
+
return;
|
|
752
|
+
fetchStripeKey(plugin, apiHost || '', token, accountId)
|
|
753
|
+
.then(function (_a) {
|
|
754
|
+
var payload = _a.payload;
|
|
755
|
+
return index_js.loadStripe(payload.publishable_key).then(setStripe);
|
|
756
|
+
})
|
|
757
|
+
.catch(function (error) {
|
|
758
|
+
console.error('Caught Error in fetching stripe key: ', error);
|
|
759
|
+
showErrorNotification(error.message, 'Unexpected Error fetching key');
|
|
760
|
+
});
|
|
761
|
+
// eslint-disable-next-line
|
|
762
|
+
}, [plugin, token]);
|
|
763
|
+
return { stripe: stripe, options: options };
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
function useApproveHold$1(_a) {
|
|
767
|
+
var _this = this;
|
|
768
|
+
var onApproveHoldSuccess = _a.onApproveHoldSuccess, onApproveHoldError = _a.onApproveHoldError;
|
|
769
|
+
// Hooks
|
|
770
|
+
var _b = react.useState(false), isSaving = _b[0], setIsSaving = _b[1];
|
|
771
|
+
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
772
|
+
var token = useToken();
|
|
773
|
+
var approveHold = function (_a) {
|
|
774
|
+
var plugin = _a.plugin, quote = _a.quote, paymentMethodId = _a.paymentMethodId;
|
|
775
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
776
|
+
var response, error_1;
|
|
777
|
+
return __generator(this, function (_b) {
|
|
778
|
+
switch (_b.label) {
|
|
779
|
+
case 0:
|
|
780
|
+
_b.trys.push([0, 2, 3, 4]);
|
|
781
|
+
if (!token)
|
|
782
|
+
throw new Error("Token couldn't be retrieved");
|
|
783
|
+
setIsSaving(true);
|
|
784
|
+
return [4 /*yield*/, createPaymentHold({
|
|
785
|
+
quote: quote,
|
|
786
|
+
plugin: plugin,
|
|
787
|
+
token: token,
|
|
788
|
+
apiHost: apiHost,
|
|
789
|
+
paymentMethodId: paymentMethodId,
|
|
790
|
+
})];
|
|
791
|
+
case 1:
|
|
792
|
+
response = _b.sent();
|
|
793
|
+
if (response.status !== 'success')
|
|
794
|
+
throw new Error(response === null || response === void 0 ? void 0 : response.message);
|
|
795
|
+
onApproveHoldSuccess === null || onApproveHoldSuccess === void 0 ? void 0 : onApproveHoldSuccess(response);
|
|
796
|
+
return [3 /*break*/, 4];
|
|
797
|
+
case 2:
|
|
798
|
+
error_1 = _b.sent();
|
|
799
|
+
console.error(error_1);
|
|
800
|
+
onApproveHoldError === null || onApproveHoldError === void 0 ? void 0 : onApproveHoldError(error_1);
|
|
801
|
+
return [3 /*break*/, 4];
|
|
802
|
+
case 3:
|
|
803
|
+
setIsSaving(false);
|
|
804
|
+
return [7 /*endfinally*/];
|
|
805
|
+
case 4: return [2 /*return*/];
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
});
|
|
809
|
+
};
|
|
810
|
+
return { approveHold: approveHold, isSaving: isSaving };
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
function useApproveHold(_a) {
|
|
814
|
+
var _this = this;
|
|
815
|
+
var onApproveHoldSuccess = _a.onApproveHoldSuccess, onApproveHoldError = _a.onApproveHoldError;
|
|
816
|
+
// Hooks
|
|
817
|
+
var _b = react.useState(false), isSaving = _b[0], setIsSaving = _b[1];
|
|
818
|
+
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
819
|
+
var token = useToken();
|
|
820
|
+
var approveHold = function (_a) {
|
|
821
|
+
var plugin = _a.plugin, quote = _a.quote, paymentMethodId = _a.paymentMethodId;
|
|
822
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
823
|
+
var response, error_1;
|
|
824
|
+
return __generator(this, function (_b) {
|
|
825
|
+
switch (_b.label) {
|
|
826
|
+
case 0:
|
|
827
|
+
_b.trys.push([0, 2, 3, 4]);
|
|
828
|
+
if (!token)
|
|
829
|
+
throw new Error("Token couldn't be retrieved");
|
|
830
|
+
setIsSaving(true);
|
|
831
|
+
return [4 /*yield*/, createPaymentHold({
|
|
832
|
+
quote: quote,
|
|
833
|
+
plugin: plugin,
|
|
834
|
+
token: token,
|
|
835
|
+
apiHost: apiHost,
|
|
836
|
+
paymentMethodId: paymentMethodId,
|
|
837
|
+
})];
|
|
838
|
+
case 1:
|
|
839
|
+
response = _b.sent();
|
|
840
|
+
if (response.status !== 'success')
|
|
841
|
+
throw new Error(response === null || response === void 0 ? void 0 : response.message);
|
|
842
|
+
onApproveHoldSuccess === null || onApproveHoldSuccess === void 0 ? void 0 : onApproveHoldSuccess(response);
|
|
843
|
+
return [3 /*break*/, 4];
|
|
844
|
+
case 2:
|
|
845
|
+
error_1 = _b.sent();
|
|
846
|
+
console.error(error_1);
|
|
847
|
+
onApproveHoldError === null || onApproveHoldError === void 0 ? void 0 : onApproveHoldError(error_1);
|
|
848
|
+
return [3 /*break*/, 4];
|
|
849
|
+
case 3:
|
|
850
|
+
setIsSaving(false);
|
|
851
|
+
return [7 /*endfinally*/];
|
|
852
|
+
case 4: return [2 /*return*/];
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
});
|
|
856
|
+
};
|
|
857
|
+
return { approveHold: approveHold, isSaving: isSaving };
|
|
858
|
+
}
|
|
859
|
+
|
|
654
860
|
function usePay(_a) {
|
|
655
861
|
var _this = this;
|
|
656
862
|
var onPaymentSuccess = _a.onPaymentSuccess, onPaymentError = _a.onPaymentError, quote = _a.quote, invoice = _a.invoice, storedPaymentMethod = _a.storedPaymentMethod, plugin = _a.plugin;
|
|
@@ -694,8 +900,9 @@ function usePay(_a) {
|
|
|
694
900
|
}
|
|
695
901
|
|
|
696
902
|
var handleAllErrorFormats = common.useAllErrorFormats();
|
|
903
|
+
var showErrorNotification$2 = common.useErrorNotification();
|
|
697
904
|
var ActualCheckoutFooter = function (_a) {
|
|
698
|
-
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess
|
|
905
|
+
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, noPadding = _a.noPadding, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
|
|
699
906
|
var isMobile = common.useIsMobile();
|
|
700
907
|
var _b = react.useState(false), isPaying = _b[0], setIsPaying = _b[1];
|
|
701
908
|
var defaultPaymentMethod = react.useContext(PaymentContext).defaultPaymentMethod;
|
|
@@ -724,6 +931,70 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
724
931
|
storedPaymentMethod: defaultPaymentMethod,
|
|
725
932
|
plugin: plugin,
|
|
726
933
|
}).pay;
|
|
934
|
+
// Approve hold hooks
|
|
935
|
+
var approveHoldStripe = useApproveHold$1({
|
|
936
|
+
onApproveHoldSuccess: function (response) {
|
|
937
|
+
onPaymentHoldSuccess === null || onPaymentHoldSuccess === void 0 ? void 0 : onPaymentHoldSuccess(response);
|
|
938
|
+
},
|
|
939
|
+
onApproveHoldError: function (error) {
|
|
940
|
+
setIsPaying(false);
|
|
941
|
+
handleAllErrorFormats(error);
|
|
942
|
+
},
|
|
943
|
+
}).approveHold;
|
|
944
|
+
var approveHoldDemoPay = useApproveHold({
|
|
945
|
+
onApproveHoldSuccess: function (response) {
|
|
946
|
+
onPaymentHoldSuccess === null || onPaymentHoldSuccess === void 0 ? void 0 : onPaymentHoldSuccess(response);
|
|
947
|
+
},
|
|
948
|
+
onApproveHoldError: function (error) {
|
|
949
|
+
setIsPaying(false);
|
|
950
|
+
handleAllErrorFormats(error);
|
|
951
|
+
},
|
|
952
|
+
}).approveHold;
|
|
953
|
+
var handleApproveHold = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
954
|
+
var _a;
|
|
955
|
+
var _b, _c, _d, _e;
|
|
956
|
+
return __generator(this, function (_f) {
|
|
957
|
+
switch (_f.label) {
|
|
958
|
+
case 0:
|
|
959
|
+
if (!plugin)
|
|
960
|
+
return [2 /*return*/, console.error('plugin is undefined')];
|
|
961
|
+
if (!quote)
|
|
962
|
+
return [2 /*return*/, console.error('quote is undefined')];
|
|
963
|
+
if (!(defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.id))
|
|
964
|
+
return [2 /*return*/, console.error('defaultPaymentMethod is undefined')];
|
|
965
|
+
_a = (_c = (_b = plugin.components) === null || _b === void 0 ? void 0 : _b.frontend) === null || _c === void 0 ? void 0 : _c[0].name;
|
|
966
|
+
switch (_a) {
|
|
967
|
+
case 'StripePayment': return [3 /*break*/, 1];
|
|
968
|
+
case 'DemoPayPayment': return [3 /*break*/, 3];
|
|
969
|
+
}
|
|
970
|
+
return [3 /*break*/, 5];
|
|
971
|
+
case 1:
|
|
972
|
+
setIsPaying(true);
|
|
973
|
+
return [4 /*yield*/, approveHoldStripe({
|
|
974
|
+
plugin: plugin,
|
|
975
|
+
quote: quote,
|
|
976
|
+
paymentMethodId: defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.id,
|
|
977
|
+
})];
|
|
978
|
+
case 2:
|
|
979
|
+
_f.sent();
|
|
980
|
+
return [3 /*break*/, 6];
|
|
981
|
+
case 3:
|
|
982
|
+
setIsPaying(true);
|
|
983
|
+
return [4 /*yield*/, approveHoldDemoPay({
|
|
984
|
+
plugin: plugin,
|
|
985
|
+
quote: quote,
|
|
986
|
+
paymentMethodId: defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.id,
|
|
987
|
+
})];
|
|
988
|
+
case 4:
|
|
989
|
+
_f.sent();
|
|
990
|
+
return [3 /*break*/, 6];
|
|
991
|
+
case 5:
|
|
992
|
+
showErrorNotification$2("Payment holds are not supported by ".concat((_e = (_d = plugin.components) === null || _d === void 0 ? void 0 : _d.frontend) === null || _e === void 0 ? void 0 : _e[0].name));
|
|
993
|
+
return [3 /*break*/, 6];
|
|
994
|
+
case 6: return [2 /*return*/];
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
}); };
|
|
727
998
|
var handlePaymentSubmit = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
728
999
|
var _a;
|
|
729
1000
|
var _b, _c;
|
|
@@ -752,16 +1023,21 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
752
1023
|
}
|
|
753
1024
|
});
|
|
754
1025
|
}); };
|
|
1026
|
+
if (paymentHoldOptions === null || paymentHoldOptions === void 0 ? void 0 : paymentHoldOptions.payToAccept) {
|
|
1027
|
+
return (jsxRuntime.jsx("div", __assign({ className: "flex justify-end gap-2 ".concat(noPadding ? '' : '') }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "w-full", disabled: isPaying, onClick: function () {
|
|
1028
|
+
handleApproveHold();
|
|
1029
|
+
}, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Approving hold for' : 'Approve hold for', " ").concat(amountDue && currencyId ? common.formatCurrency(amountDue, currencyId) : '') })) })));
|
|
1030
|
+
}
|
|
755
1031
|
return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-justify-end bunny-gap-2" }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
|
|
756
1032
|
setIsPaying(true);
|
|
757
1033
|
handlePaymentSubmit();
|
|
758
1034
|
}, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Paying' : 'Pay', " ").concat(amountDue && currencyId ? common.formatCurrency(amountDue, currencyId) : '') })) })));
|
|
759
1035
|
};
|
|
760
1036
|
var CheckoutFooter = function (_a) {
|
|
761
|
-
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, noPadding = _a.noPadding, plugin = _a.plugin;
|
|
1037
|
+
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, noPadding = _a.noPadding, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
|
|
762
1038
|
if (!plugin)
|
|
763
1039
|
return null;
|
|
764
|
-
return (jsxRuntime.jsx(ActualCheckoutFooter, { plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, noPadding: noPadding }));
|
|
1040
|
+
return (jsxRuntime.jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess, noPadding: noPadding }));
|
|
765
1041
|
};
|
|
766
1042
|
|
|
767
1043
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -18008,31 +18284,31 @@ var Card = function (_a) {
|
|
|
18008
18284
|
};
|
|
18009
18285
|
|
|
18010
18286
|
var tagStyleMap = {
|
|
18011
|
-
blue: { color:
|
|
18287
|
+
blue: { color: 'var(--bunny-blue-500)', background: 'var(--bunny-blue-200)' },
|
|
18012
18288
|
green: {
|
|
18013
|
-
color:
|
|
18014
|
-
background:
|
|
18289
|
+
color: 'var(--bunny-green-600)',
|
|
18290
|
+
background: 'var(--bunny-green-200)',
|
|
18015
18291
|
},
|
|
18016
|
-
red: { color:
|
|
18292
|
+
red: { color: 'var(--bunny-red-500)', background: 'var(--bunny-red-200)' },
|
|
18017
18293
|
orange: {
|
|
18018
|
-
color:
|
|
18019
|
-
background:
|
|
18294
|
+
color: 'var(--bunny-orange-500)',
|
|
18295
|
+
background: 'var(--bunny-orange-200)',
|
|
18020
18296
|
},
|
|
18021
18297
|
yellow: {
|
|
18022
|
-
color:
|
|
18023
|
-
background:
|
|
18298
|
+
color: 'var(--bunny-yellow-500)',
|
|
18299
|
+
background: 'var(--bunny-yellow-200)',
|
|
18024
18300
|
},
|
|
18025
18301
|
purple: {
|
|
18026
|
-
color:
|
|
18027
|
-
background:
|
|
18302
|
+
color: 'var(--bunny-purple-500)',
|
|
18303
|
+
background: 'var(--bunny-purple-200)',
|
|
18028
18304
|
},
|
|
18029
|
-
black: { color:
|
|
18305
|
+
black: { color: 'white', background: 'var(--bunny-black)' },
|
|
18030
18306
|
};
|
|
18031
18307
|
// This component provides custom styling for antd Tag components without using antd overwrites.
|
|
18032
18308
|
// Please use this component instead of the antd Tag component directly to maintain consistent styling.
|
|
18033
18309
|
var CustomizedTag = function (_a) {
|
|
18034
|
-
var children = _a.children, color = _a.color, className = _a.className;
|
|
18035
|
-
return (jsxRuntime.jsx(antd.Tag, __assign({ color: color, style: color ? tagStyleMap[color] : undefined, className: "bunny-m-0 bunny-font-medium bunny-rounded-full bunny-border-none bunny-whitespace-nowrap ".concat(className) }, { children: children })));
|
|
18310
|
+
var children = _a.children, color = _a.color, className = _a.className, style = _a.style;
|
|
18311
|
+
return (jsxRuntime.jsx(antd.Tag, __assign({ color: color, style: __assign(__assign({}, (color ? tagStyleMap[color] : undefined)), style), className: "bunny-m-0 bunny-font-medium bunny-rounded-full bunny-border-none bunny-whitespace-nowrap ".concat(className) }, { children: children })));
|
|
18036
18312
|
};
|
|
18037
18313
|
|
|
18038
18314
|
var Amex = function (_a) {
|
|
@@ -18480,90 +18756,6 @@ var StyledInputs = defaultStyled.div(templateObject_1$a || (templateObject_1$a =
|
|
|
18480
18756
|
});
|
|
18481
18757
|
var templateObject_1$a;
|
|
18482
18758
|
|
|
18483
|
-
var createPaymentMethod = function (_a) {
|
|
18484
|
-
var paymentMethodId = _a.paymentMethodId, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId;
|
|
18485
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
18486
|
-
var response;
|
|
18487
|
-
return __generator(this, function (_b) {
|
|
18488
|
-
switch (_b.label) {
|
|
18489
|
-
case 0: return [4 /*yield*/, common.invokePlugin({
|
|
18490
|
-
plugin: plugin,
|
|
18491
|
-
method: "store_payment_method",
|
|
18492
|
-
payload: {
|
|
18493
|
-
payment_method_id: paymentMethodId,
|
|
18494
|
-
account_id: accountId,
|
|
18495
|
-
},
|
|
18496
|
-
token: token,
|
|
18497
|
-
apiHost: apiHost,
|
|
18498
|
-
})];
|
|
18499
|
-
case 1:
|
|
18500
|
-
response = _b.sent();
|
|
18501
|
-
if (response.status !== "success")
|
|
18502
|
-
throw new Error(response.message || "Unknown error");
|
|
18503
|
-
return [2 /*return*/, response];
|
|
18504
|
-
}
|
|
18505
|
-
});
|
|
18506
|
-
});
|
|
18507
|
-
};
|
|
18508
|
-
var createSetupIntent = function (plugin, apiHost, token, accountId) {
|
|
18509
|
-
return common.invokePlugin({
|
|
18510
|
-
plugin: plugin,
|
|
18511
|
-
method: "create_setup_intent",
|
|
18512
|
-
token: token,
|
|
18513
|
-
apiHost: apiHost,
|
|
18514
|
-
payload: {
|
|
18515
|
-
account_id: accountId,
|
|
18516
|
-
},
|
|
18517
|
-
});
|
|
18518
|
-
};
|
|
18519
|
-
var fetchStripeKey = function (plugin, apiHost, token, accountId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18520
|
-
var response;
|
|
18521
|
-
return __generator(this, function (_a) {
|
|
18522
|
-
switch (_a.label) {
|
|
18523
|
-
case 0: return [4 /*yield*/, common.invokePlugin({
|
|
18524
|
-
plugin: plugin,
|
|
18525
|
-
method: "retrieve_config",
|
|
18526
|
-
token: token,
|
|
18527
|
-
apiHost: apiHost,
|
|
18528
|
-
payload: {
|
|
18529
|
-
account_id: accountId,
|
|
18530
|
-
},
|
|
18531
|
-
})];
|
|
18532
|
-
case 1:
|
|
18533
|
-
response = _a.sent();
|
|
18534
|
-
return [2 /*return*/, response];
|
|
18535
|
-
}
|
|
18536
|
-
});
|
|
18537
|
-
}); };
|
|
18538
|
-
index_js.loadStripe.setLoadParameters({ advancedFraudSignals: false });
|
|
18539
|
-
var useStripePlugin = function (plugin, apiHost, currencyId, token, accountId) {
|
|
18540
|
-
var _a = react.useState(null), stripe = _a[0], setStripe = _a[1];
|
|
18541
|
-
var showErrorNotification = common.useErrorNotification();
|
|
18542
|
-
var options = {
|
|
18543
|
-
mode: "setup",
|
|
18544
|
-
currency: currencyId,
|
|
18545
|
-
setupFutureUsage: "off_session",
|
|
18546
|
-
};
|
|
18547
|
-
react.useEffect(function () {
|
|
18548
|
-
var _a, _b;
|
|
18549
|
-
if (!plugin)
|
|
18550
|
-
return;
|
|
18551
|
-
if (((_b = (_a = plugin.components) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b[0].name) !== "StripePayment")
|
|
18552
|
-
return;
|
|
18553
|
-
fetchStripeKey(plugin, apiHost || "", token, accountId)
|
|
18554
|
-
.then(function (_a) {
|
|
18555
|
-
var payload = _a.payload;
|
|
18556
|
-
return index_js.loadStripe(payload.publishable_key).then(setStripe);
|
|
18557
|
-
})
|
|
18558
|
-
.catch(function (error) {
|
|
18559
|
-
console.error("Caught Error in fetching stripe key: ", error);
|
|
18560
|
-
showErrorNotification(error.message, "Unexpected Error fetching key");
|
|
18561
|
-
});
|
|
18562
|
-
// eslint-disable-next-line
|
|
18563
|
-
}, [plugin, token]);
|
|
18564
|
-
return { stripe: stripe, options: options };
|
|
18565
|
-
};
|
|
18566
|
-
|
|
18567
18759
|
function useSave(_a) {
|
|
18568
18760
|
var _this = this;
|
|
18569
18761
|
var onSaveSuccess = _a.onSaveSuccess, onSaveError = _a.onSaveError;
|
|
@@ -18840,7 +19032,7 @@ var Panel = antd.Collapse.Panel;
|
|
|
18840
19032
|
var showErrorNotification$1 = common.useErrorNotification();
|
|
18841
19033
|
var PaymentForm = function (_a) {
|
|
18842
19034
|
var _b;
|
|
18843
|
-
var invoice = _a.invoice, onFail = _a.onFail, onPaymentSuccess = _a.onPaymentSuccess, quote = _a.quote, accountId = _a.accountId, onSavePaymentMethod = _a.onSavePaymentMethod, onRemovePaymentMethod = _a.onRemovePaymentMethod, onSetDefaultPaymentMethod = _a.onSetDefaultPaymentMethod, overrideToken = _a.overrideToken, customCheckoutFunction = _a.customCheckoutFunction, currencyIdFromProps = _a.currencyId;
|
|
19035
|
+
var invoice = _a.invoice, onFail = _a.onFail, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, quote = _a.quote, accountId = _a.accountId, onSavePaymentMethod = _a.onSavePaymentMethod, onRemovePaymentMethod = _a.onRemovePaymentMethod, onSetDefaultPaymentMethod = _a.onSetDefaultPaymentMethod, overrideToken = _a.overrideToken, customCheckoutFunction = _a.customCheckoutFunction, currencyIdFromProps = _a.currencyId, paymentHoldOptions = _a.paymentHoldOptions;
|
|
18844
19036
|
// Local state
|
|
18845
19037
|
var _c = react.useState(false), showPaymentMethodForm = _c[0], setShowPaymentMethodForm = _c[1];
|
|
18846
19038
|
// Simple hooks
|
|
@@ -18919,7 +19111,7 @@ var PaymentForm = function (_a) {
|
|
|
18919
19111
|
storedPaymentMethods: storedPaymentMethods,
|
|
18920
19112
|
defaultPaymentMethod: defaultPaymentMethod,
|
|
18921
19113
|
customCheckoutFunction: customCheckoutFunction,
|
|
18922
|
-
} }, { 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, __assign({ bordered: false, activeKey: showPaymentMethodForm ? '1' : undefined, ghost: true, collapsible: "disabled", destroyInactivePanel: true }, { children: jsxRuntime.jsx(Panel, __assign({ header: jsxRuntime.jsx(jsxRuntime.Fragment, { children: !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 }), showArrow: false }, { 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 }) })))] })) }), "1") })), 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 }) }))) : null })) : null] }) })) })) })));
|
|
19114
|
+
} }, { 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, __assign({ bordered: false, activeKey: showPaymentMethodForm ? '1' : undefined, ghost: true, collapsible: "disabled", destroyInactivePanel: true }, { children: jsxRuntime.jsx(Panel, __assign({ header: jsxRuntime.jsx(jsxRuntime.Fragment, { children: !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 }), showArrow: false }, { 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 }) })))] })) }), "1") })), paying && !selectedPaymentPluginIsManualPayment ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultPaymentMethod && selectedPaymentMethodPlugin ? (jsxRuntime.jsx("div", __assign({ className: "bunny-px-4" }, { children: jsxRuntime.jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess, plugin: selectedPaymentMethodPlugin, paymentHoldOptions: paymentHoldOptions }) }))) : null })) : null] }) })) })) })));
|
|
18923
19115
|
};
|
|
18924
19116
|
function StripeWrapper(_a) {
|
|
18925
19117
|
var children = _a.children, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, currencyId = _a.currencyId, accountId = _a.accountId;
|
|
@@ -18987,7 +19179,7 @@ function ActualInvoice() {
|
|
|
18987
19179
|
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, { onPaymentSuccess: onSuccess, onFail: onFail, invoice: formattedInvoice }) })))] })) })));
|
|
18988
19180
|
}
|
|
18989
19181
|
|
|
18990
|
-
var MUTATION$7 = function (id) { return "\n query formattedQuote ($id: ID) {\n formattedQuote (id: $id) {\n payableId\n acceptedAt\n acceptedByName\n amount\n amountDue\n amountsByPeriod {\n id\n name\n amount\n }\n object { documents { id filename size date url } }\n billingCity\n billingCountry\n billingState\n billingStreet\n billingZip\n contactName\n currency\n customerBillingCity\n customerBillingCountry\n customerBillingState\n customerBillingStreet\n customerBillingZip\n customerName\n discount\n discountValue\n duration\n endDate\n expiresAt\n html\n formattedLines {\n amount\n amountsByPeriod {\n quantity\n id\n name\n startDate\n endDate\n amount\n amountsByTier {\n id\n tier {\n starts\n ends\n price\n }\n quantity\n amount\n }\n prorationRate\n }\n billingPeriodEnd\n billingPeriodStart\n chargeType\n discount\n frequency\n isRamp\n periods\n planName\n position\n price\n priceDecimals\n priceListChargeId\n priceListChargeName\n priceListId\n priceListName\n priceTiers {\n price\n starts\n }\n pricingModel\n productName\n prorationRate\n quantity\n showProductNameOnLineItem\n taxCode\n trialEndDate\n trialStartDate\n unitOfMeasure\n vatCode\n }\n netPaymentDays\n notes\n number\n poNumberRequired\n salesContactEmail\n sharedAt\n startDate\n state\n subtotal\n taxAmount\n taxNumberLabel\n taxNumberRequired\n vendorName\n }\n }"; };
|
|
19182
|
+
var MUTATION$7 = function (id) { return "\n query formattedQuote ($id: ID) {\n formattedQuote (id: $id) {\n object {\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 object { documents { id filename size date url } }\n billingCity\n billingCountry\n billingState\n billingStreet\n billingZip\n contactName\n currency\n customerBillingCity\n customerBillingCountry\n customerBillingState\n customerBillingStreet\n customerBillingZip\n customerName\n discount\n discountValue\n duration\n endDate\n expiresAt\n html\n formattedLines {\n amount\n amountsByPeriod {\n quantity\n id\n name\n startDate\n endDate\n amount\n amountsByTier {\n id\n tier {\n starts\n ends\n price\n }\n quantity\n amount\n }\n prorationRate\n }\n billingPeriodEnd\n billingPeriodStart\n chargeType\n discount\n frequency\n isRamp\n periods\n planName\n position\n price\n priceDecimals\n priceListChargeId\n priceListChargeName\n priceListId\n priceListName\n priceTiers {\n price\n starts\n }\n pricingModel\n productName\n prorationRate\n quantity\n showProductNameOnLineItem\n taxCode\n trialEndDate\n trialStartDate\n unitOfMeasure\n vatCode\n }\n netPaymentDays\n notes\n number\n poNumberRequired\n salesContactEmail\n sharedAt\n startDate\n state\n subtotal\n taxAmount\n taxNumberLabel\n taxNumberRequired\n vendorName\n }\n }"; };
|
|
18991
19183
|
var getFormattedQuote = function (_a) {
|
|
18992
19184
|
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
18993
19185
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -19019,12 +19211,13 @@ var usePlugins = function (_a) {
|
|
|
19019
19211
|
var plugins;
|
|
19020
19212
|
return __generator(this, function (_a) {
|
|
19021
19213
|
switch (_a.label) {
|
|
19022
|
-
case 0: return [4 /*yield*/,
|
|
19214
|
+
case 0: return [4 /*yield*/, getPlugins({
|
|
19023
19215
|
token: token,
|
|
19024
19216
|
apiHost: apiHost,
|
|
19025
19217
|
})];
|
|
19026
19218
|
case 1:
|
|
19027
19219
|
plugins = _a.sent();
|
|
19220
|
+
console.log("plugins in usePlugins: ", plugins);
|
|
19028
19221
|
return [2 /*return*/, plugins];
|
|
19029
19222
|
}
|
|
19030
19223
|
});
|
|
@@ -19032,6 +19225,39 @@ var usePlugins = function (_a) {
|
|
|
19032
19225
|
});
|
|
19033
19226
|
return response;
|
|
19034
19227
|
};
|
|
19228
|
+
var getPlugins = function (_a) {
|
|
19229
|
+
var entityId = _a.entityId, token = _a.token, apiHost = _a.apiHost;
|
|
19230
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
19231
|
+
var response, plugins, filteredPlugins, error;
|
|
19232
|
+
return __generator(this, function (_b) {
|
|
19233
|
+
switch (_b.label) {
|
|
19234
|
+
case 0: return [4 /*yield*/, common.request({
|
|
19235
|
+
endpoint: "/plugins",
|
|
19236
|
+
token: token,
|
|
19237
|
+
apiHost: apiHost,
|
|
19238
|
+
})];
|
|
19239
|
+
case 1:
|
|
19240
|
+
response = _b.sent();
|
|
19241
|
+
if (!response.ok) return [3 /*break*/, 3];
|
|
19242
|
+
return [4 /*yield*/, response.json()];
|
|
19243
|
+
case 2:
|
|
19244
|
+
plugins = _b.sent();
|
|
19245
|
+
filteredPlugins = plugins.filter(function (plugin) {
|
|
19246
|
+
var _a, _b;
|
|
19247
|
+
var result = ((_a = plugin.entities) === null || _a === void 0 ? void 0 : _a.includes(Number(entityId))) ||
|
|
19248
|
+
((_b = plugin.entities) === null || _b === void 0 ? void 0 : _b.length) === 0 ||
|
|
19249
|
+
!entityId;
|
|
19250
|
+
return result;
|
|
19251
|
+
});
|
|
19252
|
+
return [2 /*return*/, filteredPlugins];
|
|
19253
|
+
case 3: return [4 /*yield*/, response.json()];
|
|
19254
|
+
case 4:
|
|
19255
|
+
error = _b.sent();
|
|
19256
|
+
throw error;
|
|
19257
|
+
}
|
|
19258
|
+
});
|
|
19259
|
+
});
|
|
19260
|
+
};
|
|
19035
19261
|
|
|
19036
19262
|
var filterSigningPlugins = function (plugins) {
|
|
19037
19263
|
return plugins === null || plugins === void 0 ? void 0 : plugins.filter(function (plugin) {
|
|
@@ -19046,15 +19272,41 @@ var useSigningPlugins = function (_a) {
|
|
|
19046
19272
|
return filterSigningPlugins(plugins.data);
|
|
19047
19273
|
};
|
|
19048
19274
|
|
|
19275
|
+
var QUOTE_ACCEPT = "\n mutation quoteAccept($name: String!, $title: String!, $poNumber: String, $taxNumber: String, $quoteId: ID) {\n quoteAccept(name: $name, title: $title, poNumber: $poNumber, taxNumber: $taxNumber, quoteId: $quoteId) {\n errors\n }\n }\n";
|
|
19276
|
+
var quoteAccept = function (_a) {
|
|
19277
|
+
var quoteId = _a.quoteId, apiHost = _a.apiHost, token = _a.token, changedFormItems = _a.changedFormItems;
|
|
19278
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
19279
|
+
var vars, response, errors;
|
|
19280
|
+
var _b, _c;
|
|
19281
|
+
return __generator(this, function (_d) {
|
|
19282
|
+
switch (_d.label) {
|
|
19283
|
+
case 0:
|
|
19284
|
+
vars = __assign(__assign({}, changedFormItems), { quoteId: quoteId });
|
|
19285
|
+
return [4 /*yield*/, common.gqlRequest({
|
|
19286
|
+
query: QUOTE_ACCEPT,
|
|
19287
|
+
token: token,
|
|
19288
|
+
vars: vars,
|
|
19289
|
+
apiHost: apiHost,
|
|
19290
|
+
})];
|
|
19291
|
+
case 1:
|
|
19292
|
+
response = _d.sent();
|
|
19293
|
+
errors = (_b = response === null || response === void 0 ? void 0 : response.quoteAccept) === null || _b === void 0 ? void 0 : _b.errors;
|
|
19294
|
+
if (errors)
|
|
19295
|
+
throw errors;
|
|
19296
|
+
return [2 /*return*/, (_c = response.quoteAccept) === null || _c === void 0 ? void 0 : _c.quote];
|
|
19297
|
+
}
|
|
19298
|
+
});
|
|
19299
|
+
});
|
|
19300
|
+
};
|
|
19301
|
+
// export default quoteAccept;
|
|
19049
19302
|
var useSendAcceptQuote = function (_a) {
|
|
19050
|
-
|
|
19303
|
+
_a.onTokenExpired; var quoteId = _a.quoteId, apiHost = _a.apiHost, token = _a.token;
|
|
19051
19304
|
// Hooks
|
|
19052
19305
|
var graphQLMutation = common.useGraphQLmutation(function () {
|
|
19053
19306
|
console.log("navigate in useGraphQLmutation in useSendAcceptQuote is not yet implemented");
|
|
19054
19307
|
}, apiHost || "", function () {
|
|
19055
19308
|
console.log("onError in useGraphQLmutation in useSendAcceptQuote is not yet implemented");
|
|
19056
19309
|
});
|
|
19057
|
-
var handleAllErrorFormats = common.useAllErrorFormats(onTokenExpired);
|
|
19058
19310
|
var signingPlugins = useSigningPlugins({ apiHost: apiHost, token: token });
|
|
19059
19311
|
var queryClient = reactQuery.useQueryClient();
|
|
19060
19312
|
// Local state
|
|
@@ -19104,12 +19356,6 @@ var useSendAcceptQuote = function (_a) {
|
|
|
19104
19356
|
token: token,
|
|
19105
19357
|
}),
|
|
19106
19358
|
});
|
|
19107
|
-
queryClient.refetchQueries({
|
|
19108
|
-
queryKey: common.QueryKeyFactory.default.createQuoteKey({
|
|
19109
|
-
id: quoteId,
|
|
19110
|
-
token: token,
|
|
19111
|
-
}),
|
|
19112
|
-
});
|
|
19113
19359
|
});
|
|
19114
19360
|
// Open the DropboxSign modal
|
|
19115
19361
|
client.open(url, {
|
|
@@ -19120,29 +19366,27 @@ var useSendAcceptQuote = function (_a) {
|
|
|
19120
19366
|
}
|
|
19121
19367
|
});
|
|
19122
19368
|
}); };
|
|
19123
|
-
var
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
else {
|
|
19130
|
-
setAcceptBoxVisible(false);
|
|
19131
|
-
queryClient.invalidateQueries({
|
|
19132
|
-
queryKey: common.QueryKeyFactory.default.createQuoteKey({
|
|
19133
|
-
id: quoteId,
|
|
19134
|
-
token: token,
|
|
19135
|
-
}),
|
|
19136
|
-
});
|
|
19137
|
-
queryClient.invalidateQueries({
|
|
19138
|
-
queryKey: common.QueryKeyFactory.default.createQuoteKey({
|
|
19139
|
-
id: quoteId,
|
|
19369
|
+
var _e = reactQuery.useMutation({
|
|
19370
|
+
mutationFn: function (changedFormItems) { return __awaiter(void 0, void 0, void 0, function () {
|
|
19371
|
+
return __generator(this, function (_a) {
|
|
19372
|
+
return [2 /*return*/, quoteAccept({
|
|
19373
|
+
quoteId: quoteId,
|
|
19374
|
+
apiHost: apiHost,
|
|
19140
19375
|
token: token,
|
|
19141
|
-
|
|
19142
|
-
|
|
19143
|
-
}
|
|
19144
|
-
}
|
|
19145
|
-
|
|
19376
|
+
changedFormItems: changedFormItems,
|
|
19377
|
+
})];
|
|
19378
|
+
});
|
|
19379
|
+
}); },
|
|
19380
|
+
onSuccess: function () {
|
|
19381
|
+
setAcceptBoxVisible(false);
|
|
19382
|
+
queryClient.invalidateQueries({
|
|
19383
|
+
queryKey: common.QueryKeyFactory.default.createQuoteKey({
|
|
19384
|
+
id: quoteId,
|
|
19385
|
+
token: token,
|
|
19386
|
+
}),
|
|
19387
|
+
});
|
|
19388
|
+
},
|
|
19389
|
+
}), sendAcceptMutation = _e.mutate, isSendAcceptPending = _e.isPending;
|
|
19146
19390
|
var startAcceptance = function () {
|
|
19147
19391
|
setIsAccepting(true);
|
|
19148
19392
|
if (signingPlugins === null || signingPlugins === void 0 ? void 0 : signingPlugins.length) {
|
|
@@ -19155,12 +19399,13 @@ var useSendAcceptQuote = function (_a) {
|
|
|
19155
19399
|
return {
|
|
19156
19400
|
acceptBoxVisible: acceptBoxVisible,
|
|
19157
19401
|
isAccepting: isAccepting,
|
|
19158
|
-
sendAccept:
|
|
19402
|
+
sendAccept: sendAcceptMutation,
|
|
19159
19403
|
setAcceptBoxVisible: setAcceptBoxVisible,
|
|
19160
19404
|
setIsAccepting: setIsAccepting,
|
|
19161
19405
|
startAcceptance: startAcceptance,
|
|
19162
19406
|
pandadocPollingModalVisible: pandadocPollingModalVisible,
|
|
19163
19407
|
setPandadocPollingModalVisible: setPandadocPollingModalVisible,
|
|
19408
|
+
isSendAcceptPending: isSendAcceptPending,
|
|
19164
19409
|
};
|
|
19165
19410
|
};
|
|
19166
19411
|
|
|
@@ -19243,7 +19488,7 @@ var useFocusFirstInput = function (_a) {
|
|
|
19243
19488
|
};
|
|
19244
19489
|
|
|
19245
19490
|
var AcceptQuoteModal = function (_a) {
|
|
19246
|
-
var acceptBoxVisible = _a.acceptBoxVisible, formattedQuote = _a.formattedQuote, sendAccept = _a.sendAccept, setAcceptBoxVisible = _a.setAcceptBoxVisible, setIsAccepting = _a.setIsAccepting;
|
|
19491
|
+
var acceptBoxVisible = _a.acceptBoxVisible, formattedQuote = _a.formattedQuote, sendAccept = _a.sendAccept, setAcceptBoxVisible = _a.setAcceptBoxVisible, setIsAccepting = _a.setIsAccepting, isSendAcceptPending = _a.isSendAcceptPending;
|
|
19247
19492
|
// Refs
|
|
19248
19493
|
var firstInputRef = react.useRef(null);
|
|
19249
19494
|
// Hooks
|
|
@@ -19254,7 +19499,10 @@ var AcceptQuoteModal = function (_a) {
|
|
|
19254
19499
|
var createRules = function (required, title) {
|
|
19255
19500
|
return required ? [{ required: true, message: "".concat(title, " is required") }] : [];
|
|
19256
19501
|
};
|
|
19257
|
-
return (jsxRuntime.jsx(StyledModal$1, __assign({ centered: true, okText: "Accept",
|
|
19502
|
+
return (jsxRuntime.jsx(StyledModal$1, __assign({ centered: true, okText: isSendAcceptPending ? "Accepting..." : "Accept", okButtonProps: {
|
|
19503
|
+
loading: isSendAcceptPending,
|
|
19504
|
+
disabled: isSendAcceptPending,
|
|
19505
|
+
}, onCancel: function () {
|
|
19258
19506
|
setAcceptBoxVisible(false);
|
|
19259
19507
|
setIsAccepting(false);
|
|
19260
19508
|
}, onOk: function () {
|
|
@@ -19267,6 +19515,37 @@ var AcceptQuoteModal = function (_a) {
|
|
|
19267
19515
|
}, open: acceptBoxVisible, title: "Accept quote", width: 400 }, { children: jsxRuntime.jsxs(antd.Form, __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2", form: form, layout: "vertical" }, { children: [jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Your name", name: "name", rules: createRules(true, "Your name") }, { children: jsxRuntime.jsx(antd.Input, { autoFocus: true, ref: firstInputRef }) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Your job title", name: "title", rules: createRules(true, "Your job title") }, { children: jsxRuntime.jsx(antd.Input, {}) })), jsxRuntime.jsx(antd.Form.Item, __assign({ label: "Purchase order number", name: "poNumber", rules: createRules(poNumberRequired, "Purchase order number") }, { children: jsxRuntime.jsx(antd.Input, {}) })), taxNumberRequired && (jsxRuntime.jsx(antd.Form.Item, __assign({ name: "taxNumber", label: taxNumberLabel, rules: createRules(taxNumberRequired, taxNumberLabel) }, { children: jsxRuntime.jsx(antd.Input, {}) })))] })) })));
|
|
19268
19516
|
};
|
|
19269
19517
|
|
|
19518
|
+
var Title$2 = antd.Typography.Title;
|
|
19519
|
+
var showSuccessNotification$1 = common.useSuccessNotification();
|
|
19520
|
+
var PaymentHoldModal = function (_a) {
|
|
19521
|
+
var visible = _a.visible, setVisible = _a.setVisible, quote = _a.quote;
|
|
19522
|
+
var queryClient = reactQuery.useQueryClient();
|
|
19523
|
+
var token = useToken();
|
|
19524
|
+
return (jsxRuntime.jsxs(StyledModal$1, __assign({ centered: true, onCancel: function () {
|
|
19525
|
+
setVisible(false);
|
|
19526
|
+
}, footer: null, open: visible, width: 600 }, { children: [jsxRuntime.jsx(Title$2, __assign({ className: "mt-4 pb-4 mx-4", level: 5 }, { children: "Pay to accept" })), jsxRuntime.jsx("div", __assign({ className: "mb-4" }, { children: jsxRuntime.jsx(PaymentForm, { quote: {
|
|
19527
|
+
amount: quote.amount,
|
|
19528
|
+
currencyId: quote.currency,
|
|
19529
|
+
id: quote.object.id,
|
|
19530
|
+
}, paymentHoldOptions: {
|
|
19531
|
+
payToAccept: true,
|
|
19532
|
+
amountToHold: quote.amount,
|
|
19533
|
+
}, onFail: function () {
|
|
19534
|
+
setVisible(false);
|
|
19535
|
+
}, onPaymentSuccess: function () {
|
|
19536
|
+
setVisible(false);
|
|
19537
|
+
}, onPaymentHoldSuccess: function () {
|
|
19538
|
+
setVisible(false);
|
|
19539
|
+
showSuccessNotification$1("Approved payment hold for ".concat(common.formatCurrency(quote.amount, quote.currency)));
|
|
19540
|
+
queryClient.invalidateQueries({
|
|
19541
|
+
queryKey: common.QueryKeyFactory.default.createQuoteKey({
|
|
19542
|
+
id: quote.id,
|
|
19543
|
+
token: token,
|
|
19544
|
+
}),
|
|
19545
|
+
});
|
|
19546
|
+
} }) }))] })));
|
|
19547
|
+
};
|
|
19548
|
+
|
|
19270
19549
|
var Text$o = antd.Typography.Text;
|
|
19271
19550
|
defaultStyled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n span {\n width: 100%;\n }\n"], ["\n span {\n width: 100%;\n }\n"])));
|
|
19272
19551
|
function Quote(_a) {
|
|
@@ -19282,16 +19561,29 @@ function Quote(_a) {
|
|
|
19282
19561
|
onQuoteLoaded: onQuoteLoaded,
|
|
19283
19562
|
} }, { children: jsxRuntime.jsx(ActualQuote, {}) })));
|
|
19284
19563
|
}
|
|
19564
|
+
// TODO: dissolve this hook
|
|
19565
|
+
var useQuotePaymentHold = function (formattedQuote) {
|
|
19566
|
+
var _a = react.useState(false), paymentHoldModalVisible = _a[0], setPaymentHoldModalVisible = _a[1];
|
|
19567
|
+
var shouldDoPaymentHold = (formattedQuote === null || formattedQuote === void 0 ? void 0 : formattedQuote.object.payToAccept) == true;
|
|
19568
|
+
var currentPaymentHold = formattedQuote === null || formattedQuote === void 0 ? void 0 : formattedQuote.object.currentPaymentHold;
|
|
19569
|
+
return {
|
|
19570
|
+
paymentHold: currentPaymentHold,
|
|
19571
|
+
paymentHoldModalVisible: paymentHoldModalVisible,
|
|
19572
|
+
setPaymentHoldModalVisible: setPaymentHoldModalVisible,
|
|
19573
|
+
shouldDoPaymentHold: shouldDoPaymentHold,
|
|
19574
|
+
paymentHoldCompleted: currentPaymentHold ? true : false,
|
|
19575
|
+
};
|
|
19576
|
+
};
|
|
19285
19577
|
function ActualQuote() {
|
|
19286
19578
|
var _this = this;
|
|
19287
|
-
var _a, _b;
|
|
19579
|
+
var _a, _b, _c;
|
|
19288
19580
|
// Context
|
|
19289
|
-
var
|
|
19581
|
+
var _d = react.useContext(BunnyContext), apiHost = _d.apiHost, onTokenExpired = _d.onTokenExpired;
|
|
19290
19582
|
var token = useToken();
|
|
19291
|
-
|
|
19292
|
-
var
|
|
19583
|
+
react.useContext(BrandContext);
|
|
19584
|
+
var _e = react.useContext(InvoiceQuoteContext), className = _e.className, id = _e.id, hideDownloadButton = _e.hideDownloadButton, onQuoteLoaded = _e.onQuoteLoaded;
|
|
19293
19585
|
// Queries
|
|
19294
|
-
var
|
|
19586
|
+
var _f = reactQuery.useQuery({
|
|
19295
19587
|
queryKey: common.QueryKeyFactory.default.createQuoteKey({ id: id, token: token }),
|
|
19296
19588
|
queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
19297
19589
|
var error_1;
|
|
@@ -19310,17 +19602,15 @@ function ActualQuote() {
|
|
|
19310
19602
|
});
|
|
19311
19603
|
}); },
|
|
19312
19604
|
placeholderData: reactQuery.keepPreviousData,
|
|
19313
|
-
}), data =
|
|
19605
|
+
}), data = _f.data, isLoading = _f.isLoading;
|
|
19314
19606
|
var formattedQuote = data;
|
|
19315
19607
|
// Hooks
|
|
19316
|
-
var
|
|
19317
|
-
var isExpired = useIsExpired(formattedQuote === null || formattedQuote === void 0 ? void 0 : formattedQuote.expiresAt);
|
|
19318
|
-
var _f = useSendAcceptQuote({
|
|
19608
|
+
var _g = useSendAcceptQuote({
|
|
19319
19609
|
token: token,
|
|
19320
19610
|
onTokenExpired: onTokenExpired,
|
|
19321
19611
|
apiHost: apiHost,
|
|
19322
19612
|
quoteId: id,
|
|
19323
|
-
}), acceptBoxVisible =
|
|
19613
|
+
}), acceptBoxVisible = _g.acceptBoxVisible, isAccepting = _g.isAccepting, sendAccept = _g.sendAccept, setAcceptBoxVisible = _g.setAcceptBoxVisible, setIsAccepting = _g.setIsAccepting, startAcceptance = _g.startAcceptance, pandadocPollingModalVisible = _g.pandadocPollingModalVisible, setPandadocPollingModalVisible = _g.setPandadocPollingModalVisible, isSendAcceptPending = _g.isSendAcceptPending;
|
|
19324
19614
|
useSigningComplete({ data: formattedQuote, token: token });
|
|
19325
19615
|
var isMobile = common.useIsMobile();
|
|
19326
19616
|
var showErrorNotification = common.useErrorNotification();
|
|
@@ -19329,16 +19619,50 @@ function ActualQuote() {
|
|
|
19329
19619
|
onQuoteLoaded === null || onQuoteLoaded === void 0 ? void 0 : onQuoteLoaded(formattedQuote);
|
|
19330
19620
|
}
|
|
19331
19621
|
}, [formattedQuote]);
|
|
19622
|
+
// Payment hold stuff here
|
|
19623
|
+
var _h = useQuotePaymentHold(formattedQuote), paymentHoldModalVisible = _h.paymentHoldModalVisible, setPaymentHoldModalVisible = _h.setPaymentHoldModalVisible, shouldDoPaymentHold = _h.shouldDoPaymentHold, paymentHoldCompleted = _h.paymentHoldCompleted, paymentHold = _h.paymentHold;
|
|
19624
|
+
var handleClickAccept = function () {
|
|
19625
|
+
if (shouldDoPaymentHold && !paymentHoldCompleted) {
|
|
19626
|
+
setPaymentHoldModalVisible(true);
|
|
19627
|
+
}
|
|
19628
|
+
else {
|
|
19629
|
+
startAcceptance();
|
|
19630
|
+
}
|
|
19631
|
+
};
|
|
19332
19632
|
if (!formattedQuote || isLoading) {
|
|
19333
19633
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
19334
19634
|
}
|
|
19335
19635
|
// Derived state
|
|
19336
19636
|
var isAccepted = formattedQuote.state === 'ACCEPTED';
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19637
|
+
var firstInvoice = (_a = formattedQuote.object) === null || _a === void 0 ? void 0 : _a.firstInvoice;
|
|
19638
|
+
if ((firstInvoice === null || firstInvoice === void 0 ? void 0 : firstInvoice.state) === 'PAID' && paymentHoldCompleted) {
|
|
19639
|
+
return jsxRuntime.jsx(Invoice, { id: firstInvoice.id });
|
|
19640
|
+
}
|
|
19641
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 ".concat(isMobile ? 'bunny-w-full bunny-overflow-hidden' : '', " ").concat(className) }, { children: [jsxRuntime.jsx(QuoteButtons, { isAccepted: isAccepted, formattedQuote: formattedQuote, isMobile: isMobile, hideDownloadButton: hideDownloadButton, id: id, isAccepting: isAccepting, handleClickAccept: handleClickAccept, setPaymentHoldModalVisible: setPaymentHoldModalVisible, shouldDoPaymentHold: shouldDoPaymentHold, paymentHoldCompleted: paymentHoldCompleted, paymentHold: paymentHold }), jsxRuntime.jsx(InvoiceQuoteView, __assign({ html: formattedQuote.html }, { children: ((_c = (_b = formattedQuote.object) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: formattedQuote.object.documents.map(function (doc, index) {
|
|
19340
19642
|
return (jsxRuntime.jsx(antd.Button, __assign({ download: doc.filename, href: doc.url, type: "link" }, { children: doc.filename }), index));
|
|
19341
|
-
}) }))) : null }))] })), jsxRuntime.jsx(AcceptQuoteModal, { acceptBoxVisible: acceptBoxVisible, formattedQuote: formattedQuote, setAcceptBoxVisible: setAcceptBoxVisible, setIsAccepting: setIsAccepting, sendAccept: sendAccept }), jsxRuntime.jsx(PandadocPollingModal, { isVisible: pandadocPollingModalVisible, setVisible: setPandadocPollingModalVisible, id: id })] }));
|
|
19643
|
+
}) }))) : null }))] })), jsxRuntime.jsx(AcceptQuoteModal, { acceptBoxVisible: acceptBoxVisible, formattedQuote: formattedQuote, setAcceptBoxVisible: setAcceptBoxVisible, setIsAccepting: setIsAccepting, sendAccept: sendAccept, isSendAcceptPending: isSendAcceptPending }), jsxRuntime.jsx(PaymentHoldModal, { visible: paymentHoldModalVisible, setVisible: setPaymentHoldModalVisible, quote: formattedQuote }), jsxRuntime.jsx(PandadocPollingModal, { isVisible: pandadocPollingModalVisible, setVisible: setPandadocPollingModalVisible, id: id })] }));
|
|
19644
|
+
}
|
|
19645
|
+
// TODO: clean up the logic here. Its quite confusing
|
|
19646
|
+
function QuoteButtons(_a) {
|
|
19647
|
+
var isAccepted = _a.isAccepted, formattedQuote = _a.formattedQuote, isMobile = _a.isMobile, hideDownloadButton = _a.hideDownloadButton, id = _a.id, isAccepting = _a.isAccepting, handleClickAccept = _a.handleClickAccept, setPaymentHoldModalVisible = _a.setPaymentHoldModalVisible, shouldDoPaymentHold = _a.shouldDoPaymentHold, paymentHoldCompleted = _a.paymentHoldCompleted, paymentHold = _a.paymentHold;
|
|
19648
|
+
var apiHost = react.useContext(BunnyContext).apiHost;
|
|
19649
|
+
var token = useToken();
|
|
19650
|
+
var entityBranding = react.useContext(BrandContext);
|
|
19651
|
+
var downloadFile = useDownloadFile(id);
|
|
19652
|
+
var isExpired = useIsExpired(formattedQuote === null || formattedQuote === void 0 ? void 0 : formattedQuote.expiresAt);
|
|
19653
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex flex-row justify-end items-center gap-4", id: "acceptance", style: {
|
|
19654
|
+
color: entityBranding.secondaryColor,
|
|
19655
|
+
} }, { children: [isAccepted && formattedQuote.acceptedAt ? (jsxRuntime.jsx(Text$o, { children: "Quote was accepted by ".concat(formattedQuote.acceptedByName, " on ").concat(common.formatDate(formattedQuote.acceptedAt)) })) : null, (!isMobile || !isAccepted) && (jsxRuntime.jsxs("div", __assign({ className: isMobile ? 'flex w-full justify-end gap-2' : 'flex items-center justify-end gap-2' }, { children: [paymentHold ? (jsxRuntime.jsx(PaymentHoldDisplay, { paymentHold: paymentHold, currency: formattedQuote.currency, amount: formattedQuote.amount })) : null, !isMobile && !hideDownloadButton ? (jsxRuntime.jsx(antd.Button, __assign({ icon: jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: function () { return downloadFile(apiHost + '/api/pdf/quote', token); } }, { children: "Download" }))) : null, shouldDoPaymentHold && !paymentHoldCompleted ? (jsxRuntime.jsx(antd.Button, __assign({ disabled: isExpired, onClick: function () { return setPaymentHoldModalVisible(true); }, type: "primary" }, { children: "Pay to accept" }))) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isAccepted ? (jsxRuntime.jsx(antd.Button, __assign({ disabled: isExpired || isAccepting, onClick: handleClickAccept, type: "primary" }, { children: isExpired ? 'Quote is expired' : 'Accept quote' }))) : null }))] })))] })));
|
|
19656
|
+
}
|
|
19657
|
+
function PaymentHoldDisplay(_a) {
|
|
19658
|
+
var _b, _c, _d, _e;
|
|
19659
|
+
var paymentHold = _a.paymentHold, currency = _a.currency, amount = _a.amount;
|
|
19660
|
+
var paymentMethod = ((_c = (_b = paymentHold.paymentMethod) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.identifier)
|
|
19661
|
+
? (_e = (_d = paymentHold.paymentMethod) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.identifier
|
|
19662
|
+
: 'N/A';
|
|
19663
|
+
var formattedAmount = currency ? common.formatCurrency(amount, currency) : 'N/A';
|
|
19664
|
+
var expirationDate = paymentHold.expiresAt ? common.formatDate(paymentHold.expiresAt) : 'N/A';
|
|
19665
|
+
return (jsxRuntime.jsx(antd.Tooltip, __assign({ title: "".concat(formattedAmount, " will be charged to ").concat(paymentMethod, " once the quote is accepted. Hold will be released on ").concat(expirationDate, " if not accepted.") }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(CustomizedTag, __assign({ color: 'orange', className: "rounded-md", style: { padding: 6 } }, { children: ["Hold of ", formattedAmount, " on ****", paymentMethod] })) }) })));
|
|
19342
19666
|
}
|
|
19343
19667
|
var templateObject_1$7;
|
|
19344
19668
|
|