@bunnyapp/components 1.0.73 → 1.0.76-beta.10
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 +628 -351
- package/dist/cjs/src/components/Invoice/Invoice.stories.d.ts +2 -2
- package/dist/cjs/src/components/Invoice/index.d.ts +1 -2
- package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +3 -4
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +2 -2
- package/dist/cjs/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
- package/dist/cjs/src/components/QuotePreviewProvider.d.ts +17 -0
- package/dist/cjs/src/components/Quotes/Quotes.d.ts +6 -6
- package/dist/cjs/src/components/Quotes/Quotes.stories.d.ts +2 -2
- package/dist/cjs/src/components/Signup/PaymentForms.d.ts +9 -1
- package/dist/cjs/src/components/Signup/Signup.d.ts +11 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +4 -2
- package/dist/cjs/src/components/Transactions/Transactions.d.ts +5 -5
- package/dist/cjs/src/components/Transactions/TransactionsListContext.d.ts +8 -8
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
- package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +3 -3
- package/dist/cjs/src/components/icons/Bancontact.d.ts +4 -0
- package/dist/cjs/src/components/icons/Sepa.d.ts +4 -0
- package/dist/cjs/src/components/icons/iDeal.d.ts +4 -0
- package/dist/cjs/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
- package/dist/cjs/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getTransactions.d.ts +2 -2
- package/dist/cjs/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
- package/dist/cjs/src/utils/featureAddonUtils.d.ts +3 -0
- package/dist/esm/index.js +632 -355
- package/dist/esm/src/components/Invoice/Invoice.stories.d.ts +2 -2
- package/dist/esm/src/components/Invoice/index.d.ts +1 -2
- package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +3 -4
- package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +2 -2
- package/dist/esm/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
- package/dist/esm/src/components/QuotePreviewProvider.d.ts +17 -0
- package/dist/esm/src/components/Quotes/Quotes.d.ts +6 -6
- package/dist/esm/src/components/Quotes/Quotes.stories.d.ts +2 -2
- package/dist/esm/src/components/Signup/PaymentForms.d.ts +9 -1
- package/dist/esm/src/components/Signup/Signup.d.ts +11 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +4 -2
- package/dist/esm/src/components/Transactions/Transactions.d.ts +5 -5
- package/dist/esm/src/components/Transactions/TransactionsListContext.d.ts +8 -8
- package/dist/esm/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
- package/dist/esm/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
- package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +3 -3
- package/dist/esm/src/components/icons/Bancontact.d.ts +4 -0
- package/dist/esm/src/components/icons/Sepa.d.ts +4 -0
- package/dist/esm/src/components/icons/iDeal.d.ts +4 -0
- package/dist/esm/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
- package/dist/esm/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
- package/dist/esm/src/graphql/queries/getTransactions.d.ts +2 -2
- package/dist/esm/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
- package/dist/esm/src/utils/featureAddonUtils.d.ts +3 -0
- package/dist/index.d.ts +21 -12
- package/package.json +3 -4
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext,
|
|
2
|
+
import { createContext, useContext, useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
3
3
|
import { Markup } from 'interweave';
|
|
4
|
-
import { ConfigProvider, Spin, Button, Tag, Typography, Dropdown, Input, Checkbox, Skeleton, Collapse,
|
|
5
|
-
import { DownloadOutlined, CreditCardOutlined, EllipsisOutlined, BankOutlined, SearchOutlined, CheckCircleFilled, CloseOutlined, ArrowLeftOutlined } from '@ant-design/icons';
|
|
4
|
+
import { ConfigProvider, Spin, Button, Tag, Typography, Dropdown, Input, Modal, Checkbox, Skeleton, Collapse, Form, Tooltip, Drawer, Card as Card$1, Divider, Select, Image, Radio, Space, Switch, Popconfirm, Table } from 'antd';
|
|
5
|
+
import { DownloadOutlined, CreditCardOutlined, EllipsisOutlined, BankOutlined, SearchOutlined, CheckCircleFilled, CloseOutlined, ArrowLeftOutlined, InfoCircleOutlined } from '@ant-design/icons';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
import { DEFAULT_ACCENT_COLOR, DEFAULT_BRAND_COLOR, DEFAULT_SECONDARY_COLOR, DEFAULT_TOP_NAV_IMAGE_URL, gqlRequest as gqlRequest$1, createClientDevHeaders, X_BUNNY_COMPONENTS_VERSION_HEADER_NAME, QueryKeyFactory, useIsMobile, isColorTooDark, INPUT_BORDER_COLOR, SLATE_50, SLATE_400, SLATE_200, useErrorNotification, invokePlugin, useAllErrorFormats, formatCurrency, GRAY_500, GRAY_200, useSuccessNotification, getFormattedInvoice, PAYABLE_INVOICE_STATES, BreakpointNumbers,
|
|
7
|
+
import { DEFAULT_ACCENT_COLOR, DEFAULT_BRAND_COLOR, DEFAULT_SECONDARY_COLOR, DEFAULT_TOP_NAV_IMAGE_URL, gqlRequest as gqlRequest$1, createClientDevHeaders, X_BUNNY_COMPONENTS_VERSION_HEADER_NAME, QueryKeyFactory, useIsMobile, isColorTooDark, INPUT_BORDER_COLOR, SLATE_50, SLATE_400, SLATE_200, request as request$1, useErrorNotification, invokePlugin, useAllErrorFormats, formatCurrency, GRAY_500, GRAY_200, useSuccessNotification, getFormattedInvoice, PAYABLE_INVOICE_STATES, BreakpointNumbers, useGraphQLmutation, useInfoNotification, formatDate, TransactionState, SLATE_600, WHITE, TransactionKind, SLATE_500, PRIMARY_COLOR, Lists, sortSubscriptionCharges, getAccount, StringUtils, BillingPeriod, ChargeType, SubscriptionState as SubscriptionState$2, PERIOD_LABELS, PricingStyle, PricingModel, SLATE_100, MODAL_MAX_HEIGHT, DataInterval, QuoteChangeKind, TAG_COLORS } from '@bunnyapp/common';
|
|
8
8
|
import { QueryClient, QueryClientProvider, useQuery, useQueryClient, useMutation, keepPreviousData } from '@tanstack/react-query';
|
|
9
9
|
import theme from 'antd/lib/theme/index.js';
|
|
10
10
|
import { RecoilRoot } from 'recoil';
|
|
@@ -45,7 +45,7 @@ function styleInject(css, ref) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
var css_248z = ":root {\n --row-background: #ffffff;\n --row-background-alternate: rgba(100, 116, 139, 0.04);\n --row-background-dark: #121212;\n --row-background-alternate-dark: #1e1e1e;\n --bunny-blue-500: #3b82f6;\n --bunny-blue-200: #bfdbfe;\n --bunny-green-600: #059669;\n --bunny-green-200: #a7f3d0;\n --bunny-red-500: #ef4444;\n --bunny-red-200: #fecaca;\n --bunny-orange-500: #f97316;\n --bunny-orange-200: #fed7aa;\n --bunny-yellow-500: #f59e0b;\n --bunny-yellow-200: #fde68a;\n --bunny-purple-500: #8b5cf6;\n --bunny-purple-200: #ddd6fe;\n --bunny-black: #000000;\n}\n.bunny-component-wrapper {\n box-sizing: border-box;\n}\n.bunny-component-wrapper * {\n box-sizing: border-box;\n}\n.hidden {\n display: none;\n}\n.bunny-show-on-hover {\n opacity: 0;\n}\n.bunny-show-on-hover-container:hover .bunny-show-on-hover {\n opacity: 1;\n}\n.has-tooltip:hover .tooltip {\n visibility: visible;\n z-index: 100;\n}\n.pdf-only {\n display: none !important;\n}\n.notes p {\n margin: 0;\n padding: 0;\n padding-bottom: 0.25rem;\n}\n.bunny-icon-path {\n transition: fill 0.3s;\n}\n.bunny-shadow-padding-x {\n padding-right: 1rem;\n padding-left: 1rem;\n}\n.bunny-shadow-padding-xb {\n padding-right: 1rem;\n padding-left: 1rem;\n padding-bottom: 0.5rem;\n}\n.content-container {\n width: 100%;\n margin: 0 auto;\n}\n@media (min-width: 1220px) {\n .content-container {\n width: 1220px !important;\n margin: 0 auto;\n }\n}\n@media (min-width: 768px) {\n .bunny-shadow-padding-x {\n padding-right: 2rem;\n padding-left: 2rem;\n }\n .bunny-shadow-padding-xb {\n padding-right: 2rem;\n padding-left: 2rem;\n padding-bottom: 0.5rem;\n }\n .sm\\:flex {\n display: flex !important;\n }\n .sm\\:hidden {\n display: none !important;\n }\n}\n.bunny-shadow,\n.bunny-shadow-md {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.bunny-fixed {\n position: fixed;\n}\n.bunny-absolute {\n position: absolute;\n}\n.bunny-relative {\n position: relative;\n}\n.bunny-sticky {\n position: sticky;\n}\n.bunny-bottom-0 {\n bottom: 0px;\n}\n.bunny-bottom-4 {\n bottom: 1rem;\n}\n.bunny-left-0 {\n left: 0px;\n}\n.bunny-right-0 {\n right: 0px;\n}\n.bunny-top-0 {\n top: 0px;\n}\n.bunny-col-span-1 {\n grid-column: span 1 / span 1;\n}\n.bunny-col-span-full {\n grid-column: 1 / -1;\n}\n.bunny-m-0 {\n margin: 0px;\n}\n.bunny-mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.bunny-mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.bunny-my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.bunny-my-24 {\n margin-top: 6rem;\n margin-bottom: 6rem;\n}\n.bunny-my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.bunny-mb-2 {\n margin-bottom: 0.5rem;\n}\n.bunny-mb-4 {\n margin-bottom: 1rem;\n}\n.bunny-mb-8 {\n margin-bottom: 2rem;\n}\n.bunny-mt-2 {\n margin-top: 0.5rem;\n}\n.bunny-mt-24 {\n margin-top: 6rem;\n}\n.bunny-mt-4 {\n margin-top: 1rem;\n}\n.bunny-flex {\n display: flex;\n}\n.bunny-grid {\n display: grid;\n}\n.bunny-contents {\n display: contents;\n}\n.bunny-h-1\\/2 {\n height: 50%;\n}\n.bunny-h-5 {\n height: 1.25rem;\n}\n.bunny-h-8 {\n height: 2rem;\n}\n.bunny-h-full {\n height: 100%;\n}\n.bunny-h-screen {\n height: 100vh;\n}\n.bunny-min-h-0 {\n min-height: 0px;\n}\n.bunny-w-1\\/2 {\n width: 50%;\n}\n.bunny-w-3\\/5 {\n width: 60%;\n}\n.bunny-w-full {\n width: 100%;\n}\n.bunny-w-screen {\n width: 100vw;\n}\n.bunny-flex-1 {\n flex: 1 1 0%;\n}\n.bunny-shrink {\n flex-shrink: 1;\n}\n.bunny-shrink-0 {\n flex-shrink: 0;\n}\n.bunny-grow {\n flex-grow: 1;\n}\n.bunny-cursor-pointer {\n cursor: pointer;\n}\n.bunny-grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.bunny-flex-row {\n flex-direction: row;\n}\n.bunny-flex-col {\n flex-direction: column;\n}\n.bunny-items-start {\n align-items: flex-start;\n}\n.bunny-items-end {\n align-items: flex-end;\n}\n.bunny-items-center {\n align-items: center;\n}\n.bunny-justify-end {\n justify-content: flex-end;\n}\n.bunny-justify-center {\n justify-content: center;\n}\n.bunny-justify-between {\n justify-content: space-between;\n}\n.bunny-gap-0 {\n gap: 0px;\n}\n.bunny-gap-1 {\n gap: 0.25rem;\n}\n.bunny-gap-2 {\n gap: 0.5rem;\n}\n.bunny-gap-3 {\n gap: 0.75rem;\n}\n.bunny-gap-4 {\n gap: 1rem;\n}\n.bunny-gap-6 {\n gap: 1.5rem;\n}\n.bunny-gap-8 {\n gap: 2rem;\n}\n.bunny-space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.bunny-space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.bunny-overflow-auto {\n overflow: auto;\n}\n.bunny-overflow-hidden {\n overflow: hidden;\n}\n.bunny-overflow-visible {\n overflow: visible;\n}\n.bunny-whitespace-nowrap {\n white-space: nowrap;\n}\n.bunny-rounded {\n border-radius: 0.25rem;\n}\n.bunny-rounded-full {\n border-radius: 9999px;\n}\n.bunny-rounded-lg {\n border-radius: 0.5rem;\n}\n.bunny-rounded-md {\n border-radius: 0.375rem;\n}\n.bunny-border {\n border-width: 1px;\n}\n.bunny-border-2 {\n border-width: 2px;\n}\n.bunny-border-solid {\n border-style: solid;\n}\n.bunny-border-none {\n border-style: none;\n}\n.bunny-border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.bunny-bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bunny-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bunny-p-0 {\n padding: 0px;\n}\n.bunny-p-1 {\n padding: 0.25rem;\n}\n.bunny-p-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-pl-0 {\n padding-left: 0px;\n}\n.bunny-pl-12 {\n padding-left: 3rem;\n}\n.bunny-pl-4 {\n padding-left: 1rem;\n}\n.bunny-pr-4 {\n padding-right: 1rem;\n}\n.bunny-pt-1 {\n padding-top: 0.25rem;\n}\n.bunny-pt-12 {\n padding-top: 3rem;\n}\n.bunny-pt-2 {\n padding-top: 0.5rem;\n}\n.bunny-pt-4 {\n padding-top: 1rem;\n}\n.bunny-pt-5 {\n padding-top: 1.25rem;\n}\n.bunny-pt-6 {\n padding-top: 1.5rem;\n}\n.bunny-pt-\\[25vh\\] {\n padding-top: 25vh;\n}\n.bunny-text-left {\n text-align: left;\n}\n.bunny-text-center {\n text-align: center;\n}\n.bunny-text-right {\n text-align: right;\n}\n.bunny-text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.bunny-text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.bunny-text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.bunny-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.bunny-text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.bunny-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.bunny-font-bold {\n font-weight: 700;\n}\n.bunny-font-medium {\n font-weight: 500;\n}\n.bunny-font-normal {\n font-weight: 400;\n}\n.bunny-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.bunny-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.bunny-underline {\n text-decoration-line: underline;\n}\n.bunny-shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.bunny-duration-300 {\n transition-duration: 300ms;\n}\n.rotate-45,\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n}\n.shadow,\n.shadow-lg,\n.shadow-md,\n.shadow-none,\n.shadow-sm,\n.shadow-xl {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.visible {\n visibility: visible;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.sticky {\n position: sticky;\n}\n.-top-0\\.5 {\n top: -0.125rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-4 {\n bottom: 1rem;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.col-span-3 {\n grid-column: span 3 / span 3;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-0 {\n margin: 0px;\n}\n.mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.mb-8 {\n margin-bottom: 2rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-8 {\n margin-right: 2rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-6 {\n margin-top: 1.5rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.flex {\n display: flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-full {\n height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-1\\/3 {\n width: 33.333333%;\n}\n.w-12 {\n width: 3rem;\n}\n.w-2\\/3 {\n width: 66.666667%;\n}\n.w-4 {\n width: 1rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-32 {\n max-width: 8rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.shrink {\n flex-shrink: 1;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.border-collapse {\n border-collapse: collapse;\n}\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-0 {\n gap: 0px;\n}\n.gap-1 {\n gap: 0.25rem;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.gap-8 {\n gap: 2rem;\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-visible {\n overflow: visible;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-sm {\n border-radius: 0.125rem;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-none {\n border-style: none;\n}\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));\n}\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));\n}\n.border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.border-slate-300 {\n --tw-border-opacity: 1;\n border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));\n}\n.border-slate-700 {\n --tw-border-opacity: 1;\n border-color: rgb(51 65 85 / var(--tw-border-opacity, 1));\n}\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\n.bg-emerald-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));\n}\n.bg-green-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1));\n}\n.bg-orange-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 215 170 / var(--tw-bg-opacity, 1));\n}\n.bg-red-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\n.bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-8 {\n padding: 2rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n.pb-8 {\n padding-bottom: 2rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-4 {\n padding-left: 1rem;\n}\n.pt-1 {\n padding-top: 0.25rem;\n}\n.pt-12 {\n padding-top: 3rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.pt-5 {\n padding-top: 1.25rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.pt-8 {\n padding-top: 2rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-right {\n text-align: right;\n}\n.align-middle {\n vertical-align: middle;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.capitalize {\n text-transform: capitalize;\n}\n.text-emerald-600 {\n --tw-text-opacity: 1;\n color: rgb(5 150 105 / var(--tw-text-opacity, 1));\n}\n.text-emerald-700 {\n --tw-text-opacity: 1;\n color: rgb(4 120 87 / var(--tw-text-opacity, 1));\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity, 1));\n}\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.text-yellow-500 {\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity, 1));\n}\n.underline {\n text-decoration-line: underline;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-300 {\n transition-duration: 300ms;\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n@media (min-width: 768px) {\n .sm\\:flex {\n display: flex;\n }\n .sm\\:hidden {\n display: none;\n }\n}\n.hover\\:bunny-text-orange-400:hover {\n --tw-text-opacity: 1;\n color: rgb(251 146 60 / var(--tw-text-opacity, 1));\n}\n.bunny-components .ant-upload-select-picture-card {\n margin: 0 !important;\n}\n.bunny-components .ant-upload {\n border-radius: 0.5rem !important;\n}\n.bunny-components .ant-checkbox-inner {\n border-color: #cccccc;\n}\n.bunny-components .ant-row {\n margin-bottom: 0px;\n}\n.bunny-components .ant-select-disabled .ant-select-selector .ant-select-selection-item {\n color: rgba(0, 0, 0, 0.25) !important;\n}\n.bunny-components .ant-input-number,\n.bunny-components .ant-input,\n.bunny-components .ant-picker,\n.bunny-components .ant-input-affix-wrapper,\n.bunny-components .ant-select-selector {\n font-size: 0.875rem !important;\n transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n color: #232323 !important;\n}\n.bunny-components .ant-input-affix-wrapper {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n.bunny-components .ant-input-group-addon,\n.bunny-components .ant-input-number-group-addon {\n color: #475569 !important;\n}\n.bunny-components .ant-input-number-group-wrapper,\n.bunny-components .ant-input-number-affix-wrapper {\n width: 100%;\n}\n.bunny-components .ant-input-affix-wrapper input {\n border: none !important;\n}\n.bunny-components .ant-form-item {\n margin-bottom: 0;\n}\n.bunny-components .ant-form-item-label {\n text-transform: none !important;\n font-size: 0.75rem;\n padding-bottom: 2px !important;\n}\n.bunny-components .ant-form-item-label > label {\n width: 100%;\n color: #4b5563 !important;\n}\n.bunny-components .form .ant-form-item-label label {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n box-sizing: border-box;\n}\n.bunny-components .ant-form-item-explain,\n.bunny-components .ant-form-item-explain-error {\n font-size: 11px;\n min-height: 11px;\n line-height: 11px;\n padding-top: 2px;\n}\n.bunny-components .ant-timeline-item-content {\n font-size: smaller;\n}\n.bunny-components .ant-tree {\n font-size: 0.875rem;\n}\n.bunny-components .ant-tree-treenode {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-tree-draggable-icon {\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-tree-node-content-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-tree-switcher {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-page-header {\n padding-left: 0;\n padding-right: 0;\n padding-top: 0;\n}\n.bunny-components .ant-tag {\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 14px;\n font-weight: 500;\n white-space: nowrap;\n padding-inline-start: 0.625rem;\n padding-inline-end: 0.625rem;\n margin: 0;\n}\n.bunny-components .ant-tag-blue {\n color: #3b82f6 !important;\n background: #bfdbfe !important;\n}\n.bunny-components .ant-tag-green {\n color: #059669 !important;\n background: #a7f3d0 !important;\n}\n.bunny-components .ant-tag-red {\n color: #ef4444 !important;\n background: #fecaca !important;\n}\n.bunny-components .ant-tag-orange {\n color: #f97316 !important;\n background: #fed7aa !important;\n}\n.bunny-components .ant-tag-yellow {\n color: #f59e0b !important;\n background: #fde68a !important;\n}\n.bunny-components .ant-tag-purple {\n color: #8b5cf6 !important;\n background: #ddd6fe !important;\n}\n.bunny-components .ant-tag-gray {\n color: #6b7280 !important;\n background: #e5e7eb !important;\n}\n.bunny-components .ant-tag-black {\n color: white !important;\n background: black !important;\n}\n.bunny-components .ant-picker {\n width: 100%;\n}\n.bunny-components .ant-input,\n.bunny-components .ant-select,\n.bunny-components .ant-picker {\n height: 32px !important;\n}\n.bunny-components .ant-slider-dot {\n border: 2px solid #f0f0f0;\n}\n.bunny-components .ant-slider-dot-active {\n border-color: #ff5833;\n}\n.bunny-components .ant-slider-mark :last-child {\n transform: translateX(-75%) !important;\n}\n.bunny-components .ant-drawer-content {\n background: #f3f3f9ff;\n}\n.bunny-components .ant-drawer-body,\n.bunny-components .ant-layout {\n background: #f8fafc;\n}\n.bunny-components .vista-link {\n color: #1890ff;\n}\n.bunny-components .vista-link:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n.bunny-components .ant-popover-inner-content {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-width: 300px;\n}\n.bunny-components .ant-popconfirm-message-text {\n width: 100% !important;\n}\n.bunny-components .ant-popconfirm-title {\n padding: 0;\n text-align: center;\n font-size: 0.875rem !important;\n width: 100% !important;\n}\n.bunny-components .ant-popconfirm-buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n.bunny-components .ant-popconfirm-buttons button {\n margin-inline-start: 0 !important;\n}\n.bunny-components .ant-pagination-item {\n display: flex !important;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-btn-primary:disabled {\n background: #eef0f2 !important;\n color: rgba(0, 0, 0, 0.25) !important;\n border: none;\n}\n.bunny-components .ant-btn {\n box-shadow: none;\n text-shadow: none;\n outline: none !important;\n line-height: 1;\n font-weight: normal;\n}\n.bunny-components .ant-btn-default .ant-btn-icon {\n color: #94a3b8;\n transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n.bunny-components .ant-btn-default:hover .ant-btn-icon {\n color: #ff7f5c;\n}\n.bunny-components .ant-btn-default:disabled {\n border-color: rgba(113, 125, 148, 0.2) !important;\n}\n.bunny-components .ant-btn-primary:disabled {\n background-color: rgba(113, 125, 148, 0.1) !important;\n border-color: rgba(113, 125, 148, 0.1) !important;\n}\n.bunny-components .ant-btn-primary:hover:disabled,\n.bunny-components .ant-btn-primary:disabled {\n background-clip: padding-box;\n}\n.bunny-components .ant-select-selection-item-content {\n display: flex !important;\n align-items: center;\n}\n.bunny-components .ant-select-item {\n font-size: 0.875rem;\n}\n.bunny-components .ant-select-item-option-content {\n display: flex;\n align-items: center;\n white-space: nowrap !important;\n overflow: visible !important;\n text-overflow: default !important;\n font-size: 0.875rem;\n}\n.bunny-components .ant-select-arrow .anticon:not(.ant-select-suffix) {\n pointer-events: none;\n}\n.bunny-components .select-dropdown-blue-gray .ant-select-item-option {\n background-color: #fff !important;\n}\n.bunny-components .select-dropdown-blue-gray .ant-select-item-option-active {\n color: #ff5833;\n}\n.bunny-components .ant-dropdown-menu-items {\n padding-left: 0 !important;\n}\n.bunny-components .ant-dropdown-menu-item-active {\n background-color: transparent !important;\n}\n.bunny-components .ant-input-affix-wrapper.searchfield {\n background: white !important;\n}\n.bunny-components .ant-input-affix-wrapper.searchfield input {\n background: white !important;\n}\n.bunny-components .ant-input-affix-wrapper-focused {\n background: white !important;\n}\n.bunny-components .panel .ant-input-affix-wrapper.searchfield {\n background: #f8f8f8 !important;\n}\n.bunny-components .panel .ant-input-affix-wrapper.searchfield input {\n background: #f8f8f8 !important;\n}\n.bunny-components .ant-input-steps-hidden .ant-input-number-handler-wrap {\n display: none;\n}\n.bunny-components .ant-layout-header {\n height: 48px;\n}\n.bunny-components .ant-layout-sider-children {\n width: inherit;\n position: fixed;\n}\n.bunny-components .ant-menu-item-group-list {\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n gap: 4px !important;\n}\n.bunny-components .group {\n display: flex;\n flex-direction: row;\n flex-flow: row wrap;\n box-sizing: border-box;\n}\n.bunny-components .select-datepicker {\n animation-duration: 0.35s !important;\n}\n.bunny-components .header-datepicker {\n top: 96px !important;\n animation-duration: 0s !important;\n}\n.bunny-components .ant-picker-header {\n border-bottom: none !important;\n}\n.bunny-components .ant-picker-content thead tr th {\n font-weight: 500;\n}\n.bunny-components .ant-picker-panel-container {\n border-radius: 0.375rem;\n}\n.bunny-components .ant-picker-cell-selected .custom-date-display {\n color: #ffffff;\n background-color: #ff5833;\n}\n.bunny-components .ant-picker-cell-today .custom-date-display {\n border: 1px solid #ff5833;\n}\n.bunny-components .ant-select:hover,\n.bunny-components * .cardElement:hover {\n border-color: #ff5833;\n}\n.bunny-components .ant-input-number {\n width: 100%;\n}\n.bunny-components .ant-input-number-focused {\n border-color: #ff5833 !important;\n background-color: #ffffff !important;\n}\n.bunny-components .ant-input-affix-wrapper-focused,\n.bunny-components .ant-input-number-focused,\n.bunny-components .ant-picker,\n.bunny-components .ant-input,\n.bunny-components .ant-select-focused .ant-select-selector,\n.bunny-components .ant-select-selector:focus,\n.bunny-components .ant-select-selector:active,\n.bunny-components .ant-select-open .ant-select-selector {\n box-shadow: none !important;\n}\n.bunny-components .ant-select-item-option-selected .ant-select-item-option-state {\n display: none !important;\n}\n.bunny-components .ant-form * input[type='text'].ant-input:not(:disabled),\n.bunny-components .ant-select-selection-item:not(:disabled) {\n color: #232323;\n}\n.bunny-components .ant-tabs-ink-bar {\n display: none !important;\n}\n.bunny-components .ant-tabs-tab.ant-tabs-tab-active {\n border-bottom: 2px solid #ff5833 !important;\n}\n.bunny-components .ant-tabs-tab {\n border-bottom: 2px solid transparent !important;\n padding-bottom: 14px !important;\n}\n.bunny-components .ant-upload-wrapper {\n display: flex;\n}\n.bunny-components .ant-form-item-label > label::after {\n display: none !important;\n}\n.bunny-components .ant-menu-item {\n display: flex !important;\n align-items: center !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 border-radius: 8px !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 font-size: 14px !important;\n overflow-wrap: break-word;\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: #ff5833 !important;\n font-weight: 500 !important;\n}\n.ant-notification-notice-error .ant-notification-notice-icon {\n color: #ff5833;\n}\n.ant-notification-notice-success .ant-notification-notice-message {\n color: #00b76a !important;\n font-weight: 500 !important;\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.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";
|
|
48
|
+
var css_248z = ":root {\n --row-background: #ffffff;\n --row-background-alternate: rgba(100, 116, 139, 0.04);\n --row-background-dark: #121212;\n --row-background-alternate-dark: #1e1e1e;\n --bunny-blue-500: #3b82f6;\n --bunny-blue-200: #bfdbfe;\n --bunny-green-600: #059669;\n --bunny-green-200: #a7f3d0;\n --bunny-red-500: #ef4444;\n --bunny-red-200: #fecaca;\n --bunny-orange-500: #f97316;\n --bunny-orange-200: #fed7aa;\n --bunny-yellow-500: #f59e0b;\n --bunny-yellow-200: #fde68a;\n --bunny-purple-500: #8b5cf6;\n --bunny-purple-200: #ddd6fe;\n --bunny-black: #000000;\n}\n.bunny-component-wrapper {\n box-sizing: border-box;\n}\n.bunny-component-wrapper * {\n box-sizing: border-box;\n}\n.hidden {\n display: none;\n}\n.bunny-show-on-hover {\n opacity: 0;\n}\n.bunny-show-on-hover-container:hover .bunny-show-on-hover {\n opacity: 1;\n}\n.has-tooltip:hover .tooltip {\n visibility: visible;\n z-index: 100;\n}\n.pdf-only {\n display: none !important;\n}\n.notes p {\n margin: 0;\n padding: 0;\n padding-bottom: 0.25rem;\n}\n.bunny-icon-path {\n transition: fill 0.3s;\n}\n.bunny-shadow-padding-x {\n padding-right: 1rem;\n padding-left: 1rem;\n}\n.bunny-shadow-padding-xb {\n padding-right: 1rem;\n padding-left: 1rem;\n padding-bottom: 0.5rem;\n}\n.content-container {\n width: 100%;\n margin: 0 auto;\n}\n@media (min-width: 1220px) {\n .content-container {\n width: 1220px !important;\n margin: 0 auto;\n }\n}\n@media (min-width: 768px) {\n .bunny-shadow-padding-x {\n padding-right: 2rem;\n padding-left: 2rem;\n }\n .bunny-shadow-padding-xb {\n padding-right: 2rem;\n padding-left: 2rem;\n padding-bottom: 0.5rem;\n }\n .sm\\:flex {\n display: flex !important;\n }\n .sm\\:hidden {\n display: none !important;\n }\n}\n.bunny-shadow,\n.bunny-shadow-md {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.bunny-fixed {\n position: fixed;\n}\n.bunny-absolute {\n position: absolute;\n}\n.bunny-relative {\n position: relative;\n}\n.bunny-sticky {\n position: sticky;\n}\n.bunny-bottom-0 {\n bottom: 0px;\n}\n.bunny-bottom-4 {\n bottom: 1rem;\n}\n.bunny-left-0 {\n left: 0px;\n}\n.bunny-right-0 {\n right: 0px;\n}\n.bunny-top-0 {\n top: 0px;\n}\n.bunny-col-span-1 {\n grid-column: span 1 / span 1;\n}\n.bunny-col-span-full {\n grid-column: 1 / -1;\n}\n.bunny-m-0 {\n margin: 0px;\n}\n.bunny-mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.bunny-mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.bunny-my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.bunny-my-24 {\n margin-top: 6rem;\n margin-bottom: 6rem;\n}\n.bunny-my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.bunny-mb-2 {\n margin-bottom: 0.5rem;\n}\n.bunny-mb-4 {\n margin-bottom: 1rem;\n}\n.bunny-mb-8 {\n margin-bottom: 2rem;\n}\n.bunny-mt-2 {\n margin-top: 0.5rem;\n}\n.bunny-mt-24 {\n margin-top: 6rem;\n}\n.bunny-mt-4 {\n margin-top: 1rem;\n}\n.bunny-flex {\n display: flex;\n}\n.bunny-grid {\n display: grid;\n}\n.bunny-contents {\n display: contents;\n}\n.bunny-h-1\\/2 {\n height: 50%;\n}\n.bunny-h-5 {\n height: 1.25rem;\n}\n.bunny-h-8 {\n height: 2rem;\n}\n.bunny-h-full {\n height: 100%;\n}\n.bunny-h-screen {\n height: 100vh;\n}\n.bunny-max-h-\\[calc\\(100vh-10rem\\)\\] {\n max-height: calc(100vh - 10rem);\n}\n.bunny-min-h-0 {\n min-height: 0px;\n}\n.bunny-w-1\\/2 {\n width: 50%;\n}\n.bunny-w-3\\/5 {\n width: 60%;\n}\n.bunny-w-full {\n width: 100%;\n}\n.bunny-w-screen {\n width: 100vw;\n}\n.bunny-flex-1 {\n flex: 1 1 0%;\n}\n.bunny-shrink {\n flex-shrink: 1;\n}\n.bunny-shrink-0 {\n flex-shrink: 0;\n}\n.bunny-grow {\n flex-grow: 1;\n}\n.bunny-cursor-pointer {\n cursor: pointer;\n}\n.bunny-grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.bunny-flex-row {\n flex-direction: row;\n}\n.bunny-flex-col {\n flex-direction: column;\n}\n.bunny-flex-wrap {\n flex-wrap: wrap;\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-overflow-y-auto {\n overflow-y: auto;\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-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-pl-0 {\n padding-left: 0px;\n}\n.bunny-pl-12 {\n padding-left: 3rem;\n}\n.bunny-pl-4 {\n padding-left: 1rem;\n}\n.bunny-pr-4 {\n padding-right: 1rem;\n}\n.bunny-pt-1 {\n padding-top: 0.25rem;\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-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n.bunny-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.bunny-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.bunny-text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.bunny-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.bunny-underline {\n text-decoration-line: underline;\n}\n.bunny-shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.bunny-transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.bunny-duration-300 {\n transition-duration: 300ms;\n}\n.rotate-45,\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n}\n.shadow,\n.shadow-lg,\n.shadow-md,\n.shadow-none,\n.shadow-sm,\n.shadow-xl {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.visible {\n visibility: visible;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.sticky {\n position: sticky;\n}\n.-top-0\\.5 {\n top: -0.125rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-4 {\n bottom: 1rem;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.col-span-3 {\n grid-column: span 3 / span 3;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-0 {\n margin: 0px;\n}\n.mx-0 {\n margin-left: 0px;\n margin-right: 0px;\n}\n.mx-4 {\n margin-left: 1rem;\n margin-right: 1rem;\n}\n.my-12 {\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.mb-8 {\n margin-bottom: 2rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-8 {\n margin-right: 2rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-6 {\n margin-top: 1.5rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.flex {\n display: flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-full {\n height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-1\\/3 {\n width: 33.333333%;\n}\n.w-12 {\n width: 3rem;\n}\n.w-2\\/3 {\n width: 66.666667%;\n}\n.w-4 {\n width: 1rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-32 {\n max-width: 8rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.shrink {\n flex-shrink: 1;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.border-collapse {\n border-collapse: collapse;\n}\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-0 {\n gap: 0px;\n}\n.gap-1 {\n gap: 0.25rem;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.gap-8 {\n gap: 2rem;\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-visible {\n overflow: visible;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-sm {\n border-radius: 0.125rem;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-none {\n border-style: none;\n}\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));\n}\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));\n}\n.border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));\n}\n.border-slate-300 {\n --tw-border-opacity: 1;\n border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));\n}\n.border-slate-700 {\n --tw-border-opacity: 1;\n border-color: rgb(51 65 85 / var(--tw-border-opacity, 1));\n}\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));\n}\n.bg-emerald-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));\n}\n.bg-green-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1));\n}\n.bg-orange-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 215 170 / var(--tw-bg-opacity, 1));\n}\n.bg-red-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));\n}\n.bg-slate-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity, 1));\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-8 {\n padding: 2rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n.pb-8 {\n padding-bottom: 2rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-4 {\n padding-left: 1rem;\n}\n.pt-1 {\n padding-top: 0.25rem;\n}\n.pt-12 {\n padding-top: 3rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.pt-5 {\n padding-top: 1.25rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.pt-8 {\n padding-top: 2rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-right {\n text-align: right;\n}\n.align-middle {\n vertical-align: middle;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.capitalize {\n text-transform: capitalize;\n}\n.text-emerald-600 {\n --tw-text-opacity: 1;\n color: rgb(5 150 105 / var(--tw-text-opacity, 1));\n}\n.text-emerald-700 {\n --tw-text-opacity: 1;\n color: rgb(4 120 87 / var(--tw-text-opacity, 1));\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1));\n}\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity, 1));\n}\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity, 1));\n}\n.text-orange-600 {\n --tw-text-opacity: 1;\n color: rgb(234 88 12 / var(--tw-text-opacity, 1));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity, 1));\n}\n.text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity, 1));\n}\n.text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity, 1));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.text-yellow-500 {\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity, 1));\n}\n.underline {\n text-decoration-line: underline;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-\\[margin\\] {\n transition-property: margin;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-300 {\n transition-duration: 300ms;\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-slate-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));\n}\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n@media (min-width: 768px) {\n .sm\\:flex {\n display: flex;\n }\n .sm\\:hidden {\n display: none;\n }\n}\n.hover\\:bunny-text-orange-400:hover {\n --tw-text-opacity: 1;\n color: rgb(251 146 60 / var(--tw-text-opacity, 1));\n}\n.bunny-components .ant-upload-select-picture-card {\n margin: 0 !important;\n}\n.bunny-components .ant-upload {\n border-radius: 0.5rem !important;\n}\n.bunny-components .ant-checkbox-inner {\n border-color: #cccccc;\n}\n.bunny-components .ant-row {\n margin-bottom: 0px;\n}\n.bunny-components .ant-select-disabled .ant-select-selector .ant-select-selection-item {\n color: rgba(0, 0, 0, 0.25) !important;\n}\n.bunny-components .ant-input-number,\n.bunny-components .ant-input,\n.bunny-components .ant-picker,\n.bunny-components .ant-input-affix-wrapper,\n.bunny-components .ant-select-selector {\n font-size: 0.875rem !important;\n transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n color: #232323 !important;\n}\n.bunny-components .ant-input-affix-wrapper {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n.bunny-components .ant-input-group-addon,\n.bunny-components .ant-input-number-group-addon {\n color: #475569 !important;\n}\n.bunny-components .ant-input-number-group-wrapper,\n.bunny-components .ant-input-number-affix-wrapper {\n width: 100%;\n}\n.bunny-components .ant-input-affix-wrapper input {\n border: none !important;\n}\n.bunny-components .ant-form-item {\n margin-bottom: 0;\n}\n.bunny-components .ant-form-item-label {\n text-transform: none !important;\n font-size: 0.75rem;\n padding-bottom: 2px !important;\n}\n.bunny-components .ant-form-item-label > label {\n width: 100%;\n color: #4b5563 !important;\n}\n.bunny-components .form .ant-form-item-label label {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n box-sizing: border-box;\n}\n.bunny-components .ant-form-item-explain,\n.bunny-components .ant-form-item-explain-error {\n font-size: 11px;\n min-height: 11px;\n line-height: 11px;\n padding-top: 2px;\n}\n.bunny-components .ant-timeline-item-content {\n font-size: smaller;\n}\n.bunny-components .ant-tree {\n font-size: 0.875rem;\n}\n.bunny-components .ant-tree-treenode {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-tree-draggable-icon {\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-tree-node-content-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-tree-switcher {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-page-header {\n padding-left: 0;\n padding-right: 0;\n padding-top: 0;\n}\n.bunny-components .ant-tag {\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 14px;\n font-weight: 500;\n white-space: nowrap;\n padding-inline-start: 0.625rem;\n padding-inline-end: 0.625rem;\n margin: 0;\n}\n.bunny-components .ant-tag-blue {\n color: #3b82f6 !important;\n background: #bfdbfe !important;\n}\n.bunny-components .ant-tag-green {\n color: #059669 !important;\n background: #a7f3d0 !important;\n}\n.bunny-components .ant-tag-red {\n color: #ef4444 !important;\n background: #fecaca !important;\n}\n.bunny-components .ant-tag-orange {\n color: #f97316 !important;\n background: #fed7aa !important;\n}\n.bunny-components .ant-tag-yellow {\n color: #f59e0b !important;\n background: #fde68a !important;\n}\n.bunny-components .ant-tag-purple {\n color: #8b5cf6 !important;\n background: #ddd6fe !important;\n}\n.bunny-components .ant-tag-gray {\n color: #6b7280 !important;\n background: #e5e7eb !important;\n}\n.bunny-components .ant-tag-black {\n color: white !important;\n background: black !important;\n}\n.bunny-components .ant-picker {\n width: 100%;\n}\n.bunny-components .ant-input,\n.bunny-components .ant-select,\n.bunny-components .ant-picker {\n height: 32px !important;\n}\n.bunny-components .ant-slider-dot {\n border: 2px solid #f0f0f0;\n}\n.bunny-components .ant-slider-dot-active {\n border-color: #ff5833;\n}\n.bunny-components .ant-slider-mark :last-child {\n transform: translateX(-75%) !important;\n}\n.bunny-components .ant-drawer-content {\n background: #f3f3f9ff;\n}\n.bunny-components .ant-drawer-body,\n.bunny-components .ant-layout {\n background: #f8fafc;\n}\n.bunny-components .vista-link {\n color: #1890ff;\n}\n.bunny-components .vista-link:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n.bunny-components .ant-popover-inner-content {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n max-width: 300px;\n}\n.bunny-components .ant-popconfirm-message-text {\n width: 100% !important;\n}\n.bunny-components .ant-popconfirm-title {\n padding: 0;\n text-align: center;\n font-size: 0.875rem !important;\n width: 100% !important;\n}\n.bunny-components .ant-popconfirm-buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n.bunny-components .ant-popconfirm-buttons button {\n margin-inline-start: 0 !important;\n}\n.bunny-components .ant-pagination-item {\n display: flex !important;\n align-items: center;\n justify-content: center;\n}\n.bunny-components .ant-btn-primary:disabled {\n background: #eef0f2 !important;\n color: rgba(0, 0, 0, 0.25) !important;\n border: none;\n}\n.bunny-components .ant-btn {\n box-shadow: none;\n text-shadow: none;\n outline: none !important;\n line-height: 1;\n font-weight: normal;\n}\n.bunny-components .ant-btn-default .ant-btn-icon {\n color: #94a3b8;\n transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n.bunny-components .ant-btn-default:hover .ant-btn-icon {\n color: #ff7f5c;\n}\n.bunny-components .ant-btn-default:disabled {\n border-color: rgba(113, 125, 148, 0.2) !important;\n}\n.bunny-components .ant-btn-primary:disabled {\n background-color: rgba(113, 125, 148, 0.1) !important;\n border-color: rgba(113, 125, 148, 0.1) !important;\n}\n.bunny-components .ant-btn-primary:hover:disabled,\n.bunny-components .ant-btn-primary:disabled {\n background-clip: padding-box;\n}\n.bunny-components .ant-select-selection-item-content {\n display: flex !important;\n align-items: center;\n}\n.bunny-components .ant-select-item {\n font-size: 0.875rem;\n}\n.bunny-components .ant-select-item-option-content {\n display: flex;\n align-items: center;\n white-space: nowrap !important;\n overflow: visible !important;\n text-overflow: default !important;\n font-size: 0.875rem;\n}\n.bunny-components .ant-select-arrow .anticon:not(.ant-select-suffix) {\n pointer-events: none;\n}\n.bunny-components .select-dropdown-blue-gray .ant-select-item-option {\n background-color: #fff !important;\n}\n.bunny-components .select-dropdown-blue-gray .ant-select-item-option-active {\n color: #ff5833;\n}\n.bunny-components .ant-dropdown-menu-items {\n padding-left: 0 !important;\n}\n.bunny-components .ant-dropdown-menu-item-active {\n background-color: transparent !important;\n}\n.bunny-components .ant-input-affix-wrapper.searchfield {\n background: white !important;\n}\n.bunny-components .ant-input-affix-wrapper.searchfield input {\n background: white !important;\n}\n.bunny-components .ant-input-affix-wrapper-focused {\n background: white !important;\n}\n.bunny-components .panel .ant-input-affix-wrapper.searchfield {\n background: #f8f8f8 !important;\n}\n.bunny-components .panel .ant-input-affix-wrapper.searchfield input {\n background: #f8f8f8 !important;\n}\n.bunny-components .ant-input-steps-hidden .ant-input-number-handler-wrap {\n display: none;\n}\n.bunny-components .ant-layout-header {\n height: 48px;\n}\n.bunny-components .ant-layout-sider-children {\n width: inherit;\n position: fixed;\n}\n.bunny-components .ant-menu-item-group-list {\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n gap: 4px !important;\n}\n.bunny-components .group {\n display: flex;\n flex-direction: row;\n flex-flow: row wrap;\n box-sizing: border-box;\n}\n.bunny-components .select-datepicker {\n animation-duration: 0.35s !important;\n}\n.bunny-components .header-datepicker {\n top: 96px !important;\n animation-duration: 0s !important;\n}\n.bunny-components .ant-picker-header {\n border-bottom: none !important;\n}\n.bunny-components .ant-picker-content thead tr th {\n font-weight: 500;\n}\n.bunny-components .ant-picker-panel-container {\n border-radius: 0.375rem;\n}\n.bunny-components .ant-picker-cell-selected .custom-date-display {\n color: #ffffff;\n background-color: #ff5833;\n}\n.bunny-components .ant-picker-cell-today .custom-date-display {\n border: 1px solid #ff5833;\n}\n.bunny-components .ant-select:hover,\n.bunny-components * .cardElement:hover {\n border-color: #ff5833;\n}\n.bunny-components .ant-input-number {\n width: 100%;\n}\n.bunny-components .ant-input-number-focused {\n border-color: #ff5833 !important;\n background-color: #ffffff !important;\n}\n.bunny-components .ant-input-affix-wrapper-focused,\n.bunny-components .ant-input-number-focused,\n.bunny-components .ant-picker,\n.bunny-components .ant-input,\n.bunny-components .ant-select-focused .ant-select-selector,\n.bunny-components .ant-select-selector:focus,\n.bunny-components .ant-select-selector:active,\n.bunny-components .ant-select-open .ant-select-selector {\n box-shadow: none !important;\n}\n.bunny-components .ant-select-item-option-selected .ant-select-item-option-state {\n display: none !important;\n}\n.bunny-components .ant-form * input[type='text'].ant-input:not(:disabled),\n.bunny-components .ant-select-selection-item:not(:disabled) {\n color: #232323;\n}\n.bunny-components .ant-tabs-ink-bar {\n display: none !important;\n}\n.bunny-components .ant-tabs-tab.ant-tabs-tab-active {\n border-bottom: 2px solid #ff5833 !important;\n}\n.bunny-components .ant-tabs-tab {\n border-bottom: 2px solid transparent !important;\n padding-bottom: 14px !important;\n}\n.bunny-components .ant-upload-wrapper {\n display: flex;\n}\n.bunny-components .ant-form-item-label > label::after {\n display: none !important;\n}\n.bunny-components .ant-menu-item {\n display: flex !important;\n align-items: center !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 border-radius: 8px !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 font-size: 14px !important;\n overflow-wrap: break-word;\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: #ff5833 !important;\n font-weight: 500 !important;\n}\n.ant-notification-notice-error .ant-notification-notice-icon {\n color: #ff5833;\n}\n.ant-notification-notice-success .ant-notification-notice-message {\n color: #00b76a !important;\n font-weight: 500 !important;\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.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";
|
|
49
49
|
styleInject(css_248z);
|
|
50
50
|
|
|
51
51
|
/******************************************************************************
|
|
@@ -143,7 +143,7 @@ var BrandContext = createContext({
|
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
// This will be replaced at build time by rollup-plugin-replace
|
|
146
|
-
var PACKAGE_VERSION = '1.0.
|
|
146
|
+
var PACKAGE_VERSION = '1.0.76-beta.10';
|
|
147
147
|
var createRequestHeaders = function (token) {
|
|
148
148
|
var headers = createClientDevHeaders(token);
|
|
149
149
|
// Add the components version header
|
|
@@ -223,15 +223,6 @@ var extraQueryClient = new QueryClient();
|
|
|
223
223
|
function BunnyProvider(_a) {
|
|
224
224
|
var children = _a.children, _b = _a.darkMode, darkMode = _b === void 0 ? false : _b, queryClient = _a.queryClient, apiHost = _a.apiHost, token = _a.token, onTokenExpired = _a.onTokenExpired, configProviderProps = _a.configProviderProps;
|
|
225
225
|
var graphQLClient = createGraphQLClient(apiHost || '', token);
|
|
226
|
-
useEffect(function () {
|
|
227
|
-
var script = document.createElement('script');
|
|
228
|
-
script.src = 'https://js.finix.com/v/1/0/6/finix.js';
|
|
229
|
-
script.async = false;
|
|
230
|
-
document.getElementsByTagName('head')[0].appendChild(script);
|
|
231
|
-
return function () {
|
|
232
|
-
document.getElementsByTagName('head')[0].removeChild(script);
|
|
233
|
-
};
|
|
234
|
-
}, []);
|
|
235
226
|
return (jsx(BunnyContext.Provider, __assign({ value: {
|
|
236
227
|
darkMode: darkMode,
|
|
237
228
|
graphQLClient: graphQLClient,
|
|
@@ -378,7 +369,7 @@ var CustomZoomLayout = function () {
|
|
|
378
369
|
// Set default zoom to 100% once the document is loaded
|
|
379
370
|
useEffect(function () {
|
|
380
371
|
if (currentZoom < 1 && Date.now() - mountTimeRef.current < 3000) {
|
|
381
|
-
setZoomLevel(
|
|
372
|
+
setZoomLevel(125);
|
|
382
373
|
}
|
|
383
374
|
}, [currentZoom, setZoomLevel]);
|
|
384
375
|
return jsx(Fragment, {});
|
|
@@ -387,23 +378,28 @@ var DocumentTemplatePreview = function (_a) {
|
|
|
387
378
|
var targetUrl = _a.targetUrl;
|
|
388
379
|
var _b = useState(null), pdfUrl = _b[0], setPdfUrl = _b[1];
|
|
389
380
|
var queryClient = useQueryClient();
|
|
381
|
+
var _c = useContext(BunnyContext), apiHost = _c.apiHost, token = _c.token;
|
|
390
382
|
var queryKey = useMemo(function () { return ['documentTemplatePreview', targetUrl]; }, [targetUrl]);
|
|
391
383
|
// Clear previous data when component mounts or id changes
|
|
392
384
|
useEffect(function () {
|
|
393
385
|
// Remove any existing data for this query
|
|
394
386
|
queryClient.removeQueries({ queryKey: queryKey });
|
|
395
387
|
}, [queryClient, queryKey]);
|
|
396
|
-
var
|
|
388
|
+
var _d = useQuery({
|
|
397
389
|
queryKey: queryKey,
|
|
398
390
|
queryFn: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
399
391
|
var response, blob;
|
|
400
392
|
return __generator(this, function (_a) {
|
|
401
393
|
switch (_a.label) {
|
|
402
|
-
case 0: return [4 /*yield*/,
|
|
394
|
+
case 0: return [4 /*yield*/, request$1({
|
|
395
|
+
endpoint: targetUrl,
|
|
396
|
+
apiHost: apiHost,
|
|
397
|
+
token: token,
|
|
398
|
+
})];
|
|
403
399
|
case 1:
|
|
404
400
|
response = _a.sent();
|
|
405
401
|
if (!response.ok) {
|
|
406
|
-
throw new Error(
|
|
402
|
+
throw new Error("Failed to fetch PDF");
|
|
407
403
|
}
|
|
408
404
|
return [4 /*yield*/, response.blob()];
|
|
409
405
|
case 2:
|
|
@@ -413,7 +409,7 @@ var DocumentTemplatePreview = function (_a) {
|
|
|
413
409
|
});
|
|
414
410
|
}); },
|
|
415
411
|
enabled: !!targetUrl,
|
|
416
|
-
}), data =
|
|
412
|
+
}), data = _d.data, isLoading = _d.isLoading;
|
|
417
413
|
useEffect(function () {
|
|
418
414
|
if (data) {
|
|
419
415
|
var url_1 = URL.createObjectURL(data);
|
|
@@ -934,7 +930,7 @@ function usePay(_a) {
|
|
|
934
930
|
var handleAllErrorFormats = useAllErrorFormats();
|
|
935
931
|
var showErrorNotification$3 = useErrorNotification();
|
|
936
932
|
var ActualCheckoutFooter = function (_a) {
|
|
937
|
-
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess,
|
|
933
|
+
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
|
|
938
934
|
var isMobile = useIsMobile();
|
|
939
935
|
var _b = useState(false), isPaying = _b[0], setIsPaying = _b[1];
|
|
940
936
|
var defaultPaymentMethod = useContext(PaymentContext).defaultPaymentMethod;
|
|
@@ -1056,20 +1052,20 @@ var ActualCheckoutFooter = function (_a) {
|
|
|
1056
1052
|
});
|
|
1057
1053
|
}); };
|
|
1058
1054
|
if (paymentHoldOptions === null || paymentHoldOptions === void 0 ? void 0 : paymentHoldOptions.payToAccept) {
|
|
1059
|
-
return (jsx(
|
|
1060
|
-
|
|
1061
|
-
|
|
1055
|
+
return (jsx(Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
|
|
1056
|
+
handleApproveHold();
|
|
1057
|
+
}, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Approving hold for' : 'Approve hold for', " ").concat(amountDue && currencyId ? formatCurrency(amountDue, currencyId) : '') })));
|
|
1062
1058
|
}
|
|
1063
|
-
return (jsx(
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1059
|
+
return (jsx(Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
|
|
1060
|
+
setIsPaying(true);
|
|
1061
|
+
handlePaymentSubmit();
|
|
1062
|
+
}, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Paying' : 'Pay', " ").concat(amountDue && currencyId ? formatCurrency(amountDue, currencyId) : '') })));
|
|
1067
1063
|
};
|
|
1068
1064
|
var CheckoutFooter = function (_a) {
|
|
1069
|
-
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess,
|
|
1065
|
+
var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
|
|
1070
1066
|
if (!plugin)
|
|
1071
1067
|
return null;
|
|
1072
|
-
return (jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess
|
|
1068
|
+
return (jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess }));
|
|
1073
1069
|
};
|
|
1074
1070
|
|
|
1075
1071
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -18391,6 +18387,21 @@ var Visa = function (_a) {
|
|
|
18391
18387
|
return (jsxs("svg", __assign({ className: className, width: "70", height: "48", viewBox: "0 0 70 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M21.2505 32.5165H17.0099L13.8299 20.3847C13.679 19.8267 13.3585 19.3333 12.8871 19.1008C11.7106 18.5165 10.4142 18.0514 9 17.8169V17.3498H15.8313C16.7742 17.3498 17.4813 18.0514 17.5991 18.8663L19.2491 27.6173L23.4877 17.3498H27.6104L21.2505 32.5165ZM29.9675 32.5165H25.9626L29.2604 17.3498H33.2653L29.9675 32.5165ZM38.4467 21.5514C38.5646 20.7346 39.2717 20.2675 40.0967 20.2675C41.3931 20.1502 42.8052 20.3848 43.9838 20.9671L44.6909 17.7016C43.5123 17.2345 42.216 17 41.0395 17C37.1524 17 34.3239 19.1008 34.3239 22.0165C34.3239 24.2346 36.3274 25.3992 37.7417 26.1008C39.2717 26.8004 39.861 27.2675 39.7431 27.9671C39.7431 29.0165 38.5646 29.4836 37.3881 29.4836C35.9739 29.4836 34.5596 29.1338 33.2653 28.5494L32.5582 31.8169C33.9724 32.3992 35.5025 32.6338 36.9167 32.6338C41.2752 32.749 43.9838 30.6502 43.9838 27.5C43.9838 23.5329 38.4467 23.3004 38.4467 21.5514ZM58 32.5165L54.82 17.3498H51.4044C50.6972 17.3498 49.9901 17.8169 49.7544 18.5165L43.8659 32.5165H47.9887L48.8116 30.3004H53.8772L54.3486 32.5165H58ZM51.9936 21.4342L53.1701 27.1502H49.8723L51.9936 21.4342Z", fill: "#172B85" })] })));
|
|
18392
18388
|
};
|
|
18393
18389
|
|
|
18390
|
+
var Sepa = function (_a) {
|
|
18391
|
+
var className = _a.className;
|
|
18392
|
+
return (jsxs("svg", __assign({ className: className, width: "70", height: "48", viewBox: "0 0 70 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "#10298E", stroke: "#D9D9D9" }), jsx("path", { d: "M12.7744 16.084C14.4396 16.084 15.6264 16.1801 16.334 16.3701C18.0609 16.8349 18.9248 18.137 18.9248 20.2764C18.9248 20.4518 18.9113 20.714 18.8857 21.0645H14.918C14.918 20.4123 14.8407 19.9748 14.6885 19.752C14.4524 19.4222 13.801 19.2569 12.7344 19.2568C11.6983 19.2568 11.0109 19.3519 10.6758 19.542C10.3409 19.7327 10.1729 20.1477 10.1729 20.7861C10.1729 21.3638 10.3217 21.7443 10.6191 21.9268C10.8324 22.0562 11.1145 22.1325 11.4658 22.1553L12.2656 22.2119C13.9806 22.3259 15.0521 22.4065 15.4795 22.4521C16.8358 22.5891 17.8195 22.9497 18.4297 23.5352C18.9098 23.992 19.1958 24.5898 19.2871 25.3271C19.3405 25.7681 19.3672 26.267 19.3672 26.8213C19.3672 28.0993 19.2457 29.0356 19.002 29.6289C18.5601 30.7174 17.5669 31.4046 16.0225 31.6934C15.3754 31.8154 14.3858 31.8769 13.0547 31.877C10.8322 31.877 9.28274 31.7449 8.4082 31.4785C7.33499 31.1522 6.6276 30.4905 6.28516 29.4951C6.09445 28.941 6.00001 28.0182 6 26.7266H9.96875C9.96875 26.8706 9.96875 26.9808 9.96875 27.0566C9.96876 27.746 10.1668 28.1893 10.5615 28.3867C10.8351 28.5229 11.1654 28.594 11.5537 28.6025H13.0127C13.7572 28.6025 14.2325 28.5649 14.4375 28.4883C14.8023 28.3446 15.0418 28.1131 15.1562 27.793C15.217 27.596 15.247 27.3411 15.2471 27.0293C15.2471 26.3303 14.992 25.9045 14.4834 25.752C14.2928 25.6917 13.4079 25.6075 11.8291 25.501C10.5609 25.4103 9.67998 25.3228 9.18652 25.2383C7.88722 24.9948 7.02094 24.4944 6.58887 23.7344C6.20918 23.0886 6.01956 22.1116 6.01953 20.8047C6.01953 19.8092 6.12198 19.0105 6.32715 18.4102C6.53252 17.8097 6.86368 17.3538 7.32031 17.042C7.98917 16.5635 8.84498 16.2823 9.88672 16.1982C10.7538 16.1225 11.7164 16.084 12.7744 16.084ZM44.2861 16C45.3761 16 46.2079 16.0894 46.7793 16.2676C48.0865 16.6779 48.9639 17.5176 49.4131 18.7871C49.645 19.4533 49.7607 20.4565 49.7607 21.7959C49.7607 23.4063 49.6323 24.564 49.3779 25.2686C48.8682 26.6618 47.8187 27.4648 46.2344 27.6729C46.048 27.7041 45.2548 27.7316 43.8555 27.7539L43.1475 27.7773H40.6045V31.877H36.3389V16H44.2861ZM64 31.877H59.6787L58.8652 29.1328H53.1621L52.3955 31.877H47.9824L52.7441 16H59.1787L64 31.877ZM54.0801 26.04H58.0186L56.0195 19.1572L54.0801 26.04ZM40.6035 24.0947H43.2627C44.1059 24.0643 44.6191 23.9992 44.8037 23.8975C45.0556 23.7585 45.2244 23.4803 45.3086 23.0635C45.3624 22.7859 45.3896 22.3732 45.3896 21.8252C45.3896 21.1539 45.336 20.6561 45.2285 20.3311C45.0751 19.8759 44.7078 19.5988 44.126 19.498C44.011 19.4828 43.7353 19.4746 43.2988 19.4746H40.6035V24.0947Z", fill: "white" }), jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M30.45 18.2337C32.2095 18.2337 33.7797 19.0456 34.8119 20.3173L35.7314 18.3424C34.2933 16.9808 32.336 16.1413 30.1772 16.1413C26.8159 16.1413 23.9406 18.1748 22.7605 21.0533H20.9674L19.9087 23.3269H22.2154C22.1981 23.5378 22.1869 23.7489 22.1869 23.9643C22.1869 24.2249 22.2004 24.4824 22.2262 24.7369H21.0669L20.0083 27.0113H22.8155C24.0293 29.8169 26.8686 31.7866 30.1772 31.7866C31.8445 31.7866 33.3917 31.2862 34.6727 30.4314V27.644C33.6411 28.8205 32.1322 29.564 30.45 29.564C28.4837 29.564 26.754 28.5484 25.7468 27.0113H31.6253L32.6838 24.7369H24.8819C24.8417 24.4632 24.8202 24.1835 24.8202 23.8986C24.8202 23.706 24.8302 23.5153 24.8486 23.3269H33.3399L34.3985 21.0533H25.583C26.5579 19.3679 28.3721 18.2337 30.45 18.2337", fill: "#FFBE00" })] })));
|
|
18393
|
+
};
|
|
18394
|
+
|
|
18395
|
+
var IDeal = function (_a) {
|
|
18396
|
+
var className = _a.className;
|
|
18397
|
+
return (jsxs("svg", __assign({ className: className, width: "70", height: "48", viewBox: "0 0 70 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.0266 9.91185H35.684C47.003 9.91185 51.3527 16.0977 51.3527 23.9167C51.3527 33.2698 45.273 37.9711 35.684 37.9711H19.0266V9.91185ZM20.6082 11.5944V36.3875H35.6838C44.7786 36.3875 49.7215 32.1316 49.7215 23.9662C49.7215 15.5534 44.3832 11.5944 35.6838 11.5944H20.6082ZM25.0568 24.4115C26.722 24.4115 28.072 23.06 28.072 21.3928C28.072 19.7256 26.722 18.3741 25.0568 18.3741C23.3916 18.3741 22.0417 19.7256 22.0417 21.3928C22.0417 23.06 23.3916 24.4115 25.0568 24.4115ZM22.635 25.6982H27.479V34.309H22.635V25.6982Z", fill: "black" }), jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M44.2351 18.6216H45.6191V22.7785H47.6456C47.1019 15.207 41.1211 13.5244 35.684 13.5244H29.9009V18.6216H30.7412C32.3229 18.6216 33.262 19.6608 33.262 21.3929C33.262 23.1249 32.3229 24.1641 30.7906 24.1641H29.9009V34.309H35.684C44.5317 34.309 47.5468 30.2016 47.6951 24.1641H44.2351V18.6216ZM37.5623 22.7785V24.1641H34.1023V18.6216H37.4634V20.0072H35.4863V20.6505H37.3646V22.0362H35.5357V22.7785H37.5623ZM39.8358 18.6216H41.813L43.4935 24.1641H42.0601L41.7635 23.1249H39.9347L39.6381 24.1641H38.1553L39.8358 18.6216ZM40.3456 21.6898H40.3302V21.7393L40.3456 21.6898ZM40.3456 21.6898H41.3188L40.8739 20.1557H40.8245L40.3456 21.6898ZM29.9009 22.7785V20.0072H30.7412C31.2849 20.0072 31.878 20.1557 31.878 21.3929C31.878 22.63 31.3343 22.7785 30.7412 22.7785H29.9009Z", fill: "#D50072" })] })));
|
|
18398
|
+
};
|
|
18399
|
+
|
|
18400
|
+
var Bancontact = function (_a) {
|
|
18401
|
+
var className = _a.className;
|
|
18402
|
+
return (jsxs("svg", __assign({ className: className, width: "70", height: "48", viewBox: "0 0 70 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.2243 35.1715C18.2243 34.882 18.156 34.6314 18.0199 34.4199C17.8835 34.2083 17.7043 34.0468 17.4819 33.9355C17.7043 33.8242 17.8766 33.6597 17.9991 33.4426C18.1214 33.2255 18.1825 32.9806 18.1825 32.7078V32.5575C18.1825 32.2233 18.1186 31.9451 17.9908 31.7223C17.8628 31.4996 17.6833 31.3213 17.4526 31.1878C17.2219 31.0541 16.9451 30.9582 16.6227 30.8995C16.3 30.8411 15.9414 30.812 15.5465 30.812C15.4131 30.812 15.274 30.8147 15.1296 30.8203C14.9848 30.8258 14.8445 30.8328 14.7083 30.8411C14.572 30.8494 14.4468 30.8593 14.3329 30.8704C14.2188 30.8817 14.1256 30.8928 14.0534 30.9037C13.8921 30.9318 13.7781 30.9817 13.7114 31.0541C13.6448 31.1266 13.6113 31.2575 13.6113 31.4467V36.5245C13.6113 36.7139 13.646 36.8447 13.7156 36.917C13.7851 36.9895 13.9032 37.0394 14.0702 37.0673C14.1535 37.084 14.2536 37.0979 14.3704 37.1091C14.4871 37.1202 14.6136 37.1299 14.7499 37.1383C14.8862 37.1466 15.0265 37.1535 15.1711 37.1593C15.3158 37.1646 15.4575 37.1676 15.5966 37.1676C15.9581 37.1676 16.2986 37.1397 16.6185 37.084C16.9381 37.0285 17.2161 36.9295 17.4526 36.7874C17.689 36.6456 17.8766 36.4534 18.0157 36.2113C18.1546 35.969 18.2243 35.6642 18.2243 35.2967V35.1715ZM16.8063 32.7746C16.8063 32.8637 16.7924 32.9487 16.7645 33.0293C16.7366 33.11 16.6909 33.1795 16.627 33.2383C16.5629 33.2966 16.4768 33.3439 16.3684 33.38C16.2599 33.4162 16.1222 33.4343 15.9554 33.4343H15.0213V31.9895C15.049 31.9895 15.0921 31.9883 15.1505 31.9853C15.2089 31.9825 15.27 31.9812 15.3339 31.9812H15.6551C16.0833 31.9812 16.3822 32.0354 16.5518 32.144C16.7214 32.2526 16.8063 32.421 16.8063 32.6492V32.7746ZM16.5935 35.8062C16.7576 35.6782 16.8397 35.4971 16.8397 35.2634V35.1714C16.8397 34.971 16.7756 34.797 16.6478 34.6494C16.5198 34.502 16.289 34.4282 15.9554 34.4282H15.0213V35.9898H15.1671C15.231 35.9898 15.2977 35.9916 15.3673 35.9942C15.4368 35.9969 15.5035 35.9985 15.5676 35.9985H15.7051C16.1333 35.9985 16.4295 35.9343 16.5935 35.8062ZM22.7955 33.9438C22.7955 33.6377 22.7496 33.3772 22.6578 33.1629C22.5662 32.9487 22.4368 32.7732 22.27 32.6367C22.1032 32.5004 21.8988 32.4003 21.6568 32.3362C21.415 32.2722 21.1439 32.2401 20.8436 32.2401C20.5654 32.2401 20.2943 32.2597 20.0303 32.2987C19.766 32.3375 19.556 32.3766 19.4005 32.4154C19.2948 32.4435 19.242 32.5046 19.242 32.5991V33.2756C19.242 33.3314 19.2559 33.3705 19.2837 33.3925C19.3115 33.4149 19.3475 33.4261 19.3922 33.4261H19.4337C19.5006 33.4204 19.5839 33.4135 19.684 33.4051C19.7842 33.3968 19.8968 33.3901 20.022 33.3842C20.1471 33.3788 20.2777 33.3746 20.414 33.3717C20.5501 33.3689 20.6851 33.3675 20.8186 33.3675C21.0131 33.3675 21.1661 33.4038 21.2773 33.4761C21.3885 33.5486 21.4441 33.7045 21.4441 33.9438V34.2445H20.9937C20.2763 34.2445 19.7549 34.3572 19.4296 34.5827C19.1043 34.8081 18.9416 35.1659 18.9416 35.6558V35.7313C18.9416 36.0039 18.982 36.2321 19.0625 36.4158C19.1431 36.5996 19.2503 36.7472 19.3837 36.8587C19.5172 36.9699 19.6686 37.0493 19.8384 37.0964C20.008 37.1438 20.1846 37.1676 20.3681 37.1676C20.6184 37.1676 20.8339 37.1341 21.0145 37.0673C21.1952 37.0005 21.3662 36.9086 21.5276 36.7917V36.9253C21.5276 36.9699 21.5442 37.0089 21.5776 37.0422C21.6111 37.0756 21.6499 37.0923 21.6944 37.0923H22.6287C22.6731 37.0923 22.712 37.0756 22.7455 37.0422C22.7789 37.0089 22.7955 36.9699 22.7955 36.9253V33.9438ZM21.1481 36.0942C21.2619 36.0581 21.3691 36.015 21.4692 35.9648V35.0462H20.9937C20.8491 35.0462 20.7296 35.0587 20.635 35.0837C20.5404 35.1088 20.4653 35.1465 20.4098 35.1966C20.3542 35.2465 20.3152 35.3107 20.2931 35.3886C20.2707 35.4666 20.2596 35.5556 20.2596 35.6558V35.7312C20.2596 35.9092 20.3026 36.0233 20.3889 36.0734C20.4751 36.1235 20.6071 36.1485 20.7852 36.1485C20.913 36.1485 21.0339 36.1306 21.1481 36.0942ZM27.9007 36.917V34.1358C27.9007 33.8744 27.8799 33.6278 27.8381 33.3968C27.7964 33.166 27.7214 32.9653 27.6129 32.7954C27.5045 32.6256 27.3543 32.4905 27.1624 32.3904C26.9707 32.2902 26.7245 32.2401 26.4242 32.2401C26.1572 32.2401 25.9208 32.2723 25.7152 32.3369C25.5094 32.4014 25.2925 32.515 25.0646 32.6776V32.4752C25.0646 32.4305 25.0478 32.3911 25.0145 32.3575C24.9811 32.3238 24.9421 32.3068 24.8976 32.3068H23.9634C23.9187 32.3068 23.8799 32.3235 23.8467 32.357C23.8133 32.3904 23.7966 32.4295 23.7966 32.4739V36.917C23.7966 36.9615 23.8145 37.0019 23.8508 37.038C23.8869 37.0743 23.9272 37.0923 23.9717 37.0923H24.9811C25.0256 37.0923 25.0646 37.0743 25.0978 37.0382C25.1313 37.0021 25.1479 36.9619 25.1479 36.9173V33.6341C25.2925 33.5564 25.4287 33.4925 25.5567 33.4426C25.6845 33.3925 25.8096 33.3675 25.932 33.3675C26.0599 33.3675 26.1642 33.38 26.2449 33.4051C26.3254 33.4301 26.388 33.4731 26.4325 33.5345C26.477 33.5954 26.5076 33.6759 26.5243 33.7757C26.5409 33.8758 26.5494 33.9981 26.5494 34.1425V36.9173C26.5494 36.9619 26.566 37.0021 26.5994 37.0382C26.6327 37.0743 26.6715 37.0923 26.7162 37.0923H27.7255C27.7699 37.0923 27.8102 37.0743 27.8464 37.038C27.8826 37.0019 27.9007 36.9615 27.9007 36.917ZM32.0047 36.1071V36.8502C32.0047 36.9114 31.9907 36.9546 31.963 36.9796C31.9351 37.0047 31.8906 37.0255 31.8294 37.0422C31.7127 37.0701 31.5611 37.0978 31.3749 37.1259C31.1885 37.1535 30.9703 37.1676 30.72 37.1676C30.1305 37.1676 29.6592 36.9867 29.3062 36.6246C28.953 36.2628 28.7765 35.7394 28.7765 35.0546V34.3531C28.7765 33.6682 28.953 33.1448 29.3062 32.7831C29.6592 32.421 30.1305 32.2401 30.72 32.2401C30.9703 32.2401 31.1885 32.254 31.3749 32.2817C31.5611 32.3098 31.7127 32.3375 31.8294 32.3653C31.8906 32.3819 31.9351 32.4029 31.963 32.4279C31.9907 32.453 32.0047 32.4962 32.0047 32.5574V33.3007C32.0047 33.3453 31.9893 33.38 31.9588 33.4051C31.9281 33.4301 31.8906 33.4426 31.8462 33.4426H31.8294C31.6737 33.4261 31.5251 33.4121 31.3832 33.401C31.2413 33.3901 31.0508 33.3842 30.8118 33.3842C30.7172 33.3842 30.6283 33.3996 30.5448 33.4301C30.4613 33.4608 30.3891 33.5137 30.328 33.5888C30.2666 33.6641 30.2181 33.7641 30.1819 33.8895C30.1457 34.0147 30.1277 34.1692 30.1277 34.3531V35.0546C30.1277 35.2382 30.1457 35.3927 30.1819 35.5181C30.2181 35.6433 30.2666 35.7436 30.328 35.8187C30.3891 35.8939 30.4613 35.9468 30.5448 35.9774C30.6283 36.008 30.7172 36.0233 30.8118 36.0233C31.0508 36.0233 31.2413 36.0178 31.3832 36.0067C31.5251 35.9956 31.6737 35.9815 31.8294 35.9649H31.8462C31.8906 35.9649 31.9281 35.9774 31.9588 36.0025C31.9893 36.0276 32.0047 36.0623 32.0047 36.1071ZM36.6346 34.4115C36.6346 34.0773 36.5885 33.7768 36.4966 33.5095C36.4046 33.2423 36.2709 33.0155 36.0954 32.8289C35.9199 32.6424 35.7025 32.4976 35.4436 32.3946C35.1844 32.2918 34.8848 32.2401 34.5449 32.2401C34.2051 32.2401 33.9056 32.2918 33.6465 32.3946C33.3873 32.4976 33.1685 32.6424 32.9903 32.8289C32.8119 33.0155 32.6768 33.2423 32.585 33.5095C32.4928 33.7768 32.4469 34.0773 32.4469 34.4115V34.9961C32.4469 35.3301 32.4928 35.6309 32.585 35.8981C32.6768 36.1653 32.8119 36.3922 32.9903 36.5788C33.1685 36.7654 33.3873 36.91 33.6465 37.013C33.9056 37.1159 34.2051 37.1676 34.5449 37.1676C34.8848 37.1676 35.1844 37.1159 35.4436 37.013C35.7025 36.91 35.9199 36.7654 36.0954 36.5788C36.2709 36.3922 36.4046 36.1653 36.4966 35.8981C36.5885 35.6309 36.6346 35.3301 36.6346 34.9961V34.4115ZM34.5449 36.0233C35.037 36.0233 35.2832 35.6809 35.2832 34.9961V34.4115C35.2832 33.7322 35.037 33.3925 34.5449 33.3925C34.3016 33.3925 34.1164 33.4774 33.9893 33.6472C33.8619 33.8172 33.7984 34.0719 33.7984 34.4115V34.9961C33.7984 35.3357 33.8619 35.5918 33.9893 35.7644C34.1164 35.9371 34.3016 36.0233 34.5449 36.0233ZM41.5976 36.917V34.1358C41.5976 33.8744 41.5765 33.6278 41.5351 33.3968C41.4933 33.166 41.4181 32.9653 41.3095 32.7954C41.2011 32.6256 41.0511 32.4905 40.8593 32.3904C40.6674 32.2902 40.4213 32.2401 40.1211 32.2401C39.8542 32.2401 39.6177 32.2723 39.4119 32.3369C39.2062 32.4014 38.9893 32.515 38.7613 32.6776V32.4752C38.7613 32.4305 38.7447 32.3911 38.7111 32.3575C38.678 32.3238 38.6389 32.3068 38.5945 32.3068H37.6602C37.6157 32.3068 37.5769 32.3235 37.5434 32.357C37.5102 32.3904 37.4934 32.4295 37.4934 32.4739V36.917C37.4934 36.9615 37.5114 37.0019 37.5476 37.038C37.5838 37.0743 37.624 37.0923 37.6687 37.0923H38.678C38.7224 37.0923 38.7613 37.0743 38.7948 37.0382C38.828 37.0021 38.8448 36.9619 38.8448 36.9173V33.6341C38.9893 33.5564 39.1256 33.4925 39.2534 33.4426C39.3815 33.3925 39.5065 33.3675 39.629 33.3675C39.7568 33.3675 39.8611 33.38 39.9416 33.4051C40.0222 33.4301 40.0849 33.4731 40.1294 33.5345C40.1739 33.5954 40.2044 33.6759 40.2212 33.7757C40.2378 33.8758 40.2462 33.9981 40.2462 34.1425V36.9173C40.2462 36.9619 40.2628 37.0021 40.2962 37.0382C40.3296 37.0743 40.3684 37.0923 40.413 37.0923H41.4223C41.4668 37.0923 41.5072 37.0743 41.5434 37.038C41.5794 37.0019 41.5976 36.9615 41.5976 36.917ZM45.2348 36.2893V36.9357C45.2348 37.0295 45.182 37.0848 45.0763 37.1011C44.9483 37.1233 44.8371 37.1398 44.7427 37.1509C44.6481 37.162 44.5395 37.1675 44.4174 37.1675C44.1905 37.1675 43.9901 37.1493 43.816 37.1133C43.6419 37.077 43.4966 37.0061 43.3805 36.9003C43.2646 36.7945 43.1761 36.6483 43.1153 36.4617C43.0547 36.2753 43.0242 36.0347 43.0242 35.7394V33.3175L42.357 33.2088C42.3123 33.1977 42.2721 33.1769 42.2359 33.1462C42.1997 33.1157 42.1817 33.0781 42.1817 33.0335V32.4822C42.1817 32.4378 42.1997 32.3974 42.2359 32.3611C42.2721 32.325 42.3123 32.3068 42.357 32.3068H43.0242V31.622C43.0242 31.5774 43.0409 31.5414 43.0739 31.5134C43.1068 31.4857 43.1458 31.4663 43.1902 31.455L44.2016 31.2798H44.2263C44.2705 31.2798 44.3065 31.2921 44.3343 31.3171C44.3618 31.3423 44.3757 31.3771 44.3757 31.4215V32.3068H45.0597C45.104 32.3068 45.143 32.3237 45.1764 32.3573C45.2099 32.3909 45.2265 32.4305 45.2265 32.4752V33.1573C45.2265 33.2024 45.2099 33.2416 45.1764 33.2752C45.143 33.3089 45.104 33.3257 45.0597 33.3257H44.3757V35.7561C44.3757 35.9231 44.3895 36.0304 44.4174 36.0776C44.4451 36.1249 44.5229 36.1485 44.6507 36.1485H45.0597C45.1764 36.1485 45.2348 36.1955 45.2348 36.2893ZM49.6891 33.9438C49.6891 33.6377 49.6433 33.3772 49.5514 33.1629C49.4597 32.9487 49.3305 32.7732 49.1637 32.6367C48.9969 32.5004 48.7925 32.4003 48.5505 32.3362C48.3087 32.2722 48.0376 32.2401 47.7373 32.2401C47.4589 32.2401 47.188 32.2597 46.924 32.2987C46.6597 32.3375 46.4497 32.3766 46.2942 32.4154C46.1882 32.4435 46.1357 32.5046 46.1357 32.5991V33.2756C46.1357 33.3314 46.1494 33.3705 46.1773 33.3925C46.2052 33.4149 46.2412 33.4261 46.2857 33.4261H46.3274C46.3943 33.4204 46.4776 33.4135 46.5777 33.4051C46.6779 33.3968 46.7905 33.3901 46.9155 33.3842C47.0408 33.3788 47.1714 33.3746 47.3077 33.3717C47.4438 33.3689 47.5788 33.3675 47.7121 33.3675C47.9068 33.3675 48.0598 33.4038 48.171 33.4761C48.2822 33.5486 48.3378 33.7045 48.3378 33.9438V34.2445H47.8874C47.1698 34.2445 46.6486 34.3572 46.3233 34.5827C45.998 34.8081 45.8353 35.1659 45.8353 35.6558V35.7313C45.8353 36.0039 45.8755 36.2321 45.9562 36.4158C46.0366 36.5996 46.144 36.7472 46.2774 36.8587C46.4109 36.9699 46.5623 37.0493 46.7321 37.0964C46.9017 37.1438 47.0782 37.1676 47.2618 37.1676C47.5121 37.1676 47.7274 37.1341 47.9082 37.0673C48.0889 37.0005 48.2597 36.9086 48.4213 36.7917V36.9253C48.4213 36.9699 48.4379 37.0089 48.4713 37.0422C48.5046 37.0756 48.5436 37.0923 48.5881 37.0923H49.5224C49.5668 37.0923 49.6057 37.0756 49.6392 37.0422C49.6724 37.0089 49.6891 36.9699 49.6891 36.9253V33.9438ZM48.0418 36.0942C48.1556 36.0581 48.2628 36.015 48.3629 35.9648V35.0462H47.8874C47.7428 35.0462 47.6233 35.0587 47.5287 35.0837C47.4341 35.1088 47.359 35.1465 47.3035 35.1966C47.2477 35.2465 47.2088 35.3107 47.1868 35.3886C47.1644 35.4666 47.1533 35.5556 47.1533 35.6558V35.7312C47.1533 35.9092 47.1963 36.0233 47.2826 36.0734C47.3688 36.1235 47.5008 36.1485 47.6789 36.1485C47.8067 36.1485 47.9274 36.1306 48.0418 36.0942ZM53.7933 36.8502V36.1071C53.7933 36.0623 53.7779 36.0276 53.7474 36.0025C53.7167 35.9774 53.6793 35.9649 53.6348 35.9649H53.6181C53.4624 35.9815 53.3136 35.9956 53.1718 36.0067C53.0301 36.0178 52.8395 36.0233 52.6005 36.0233C52.5057 36.0233 52.4167 36.008 52.3336 35.9774C52.2501 35.9468 52.1777 35.8939 52.1165 35.8187C52.0554 35.7436 52.0067 35.6433 51.9707 35.5181C51.9343 35.3927 51.9165 35.2382 51.9165 35.0546V34.3531C51.9165 34.1692 51.9343 34.0147 51.9707 33.8895C52.0067 33.7641 52.0554 33.6641 52.1165 33.5888C52.1777 33.5137 52.2501 33.4608 52.3336 33.4301C52.4167 33.3996 52.5057 33.3842 52.6005 33.3842C52.8395 33.3842 53.0301 33.3901 53.1718 33.401C53.3136 33.4121 53.4624 33.4261 53.6181 33.4426H53.6348C53.6793 33.4426 53.7167 33.4301 53.7474 33.4051C53.7779 33.38 53.7933 33.3453 53.7933 33.3007V32.5574C53.7933 32.4962 53.7794 32.453 53.7515 32.4279C53.7235 32.4029 53.6793 32.3819 53.6181 32.3653C53.5014 32.3375 53.3497 32.3098 53.1635 32.2817C52.9771 32.254 52.759 32.2401 52.5087 32.2401C51.9189 32.2401 51.4479 32.421 51.0947 32.7831C50.7415 33.1448 50.565 33.6682 50.565 34.3531V35.0546C50.565 35.7394 50.7415 36.2628 51.0947 36.6246C51.4479 36.9867 51.9189 37.1676 52.5087 37.1676C52.759 37.1676 52.9771 37.1535 53.1635 37.1259C53.3497 37.0978 53.5014 37.0701 53.6181 37.0422C53.6793 37.0255 53.7235 37.0047 53.7515 36.9796C53.7794 36.9546 53.7933 36.9114 53.7933 36.8502ZM57.3884 36.2893V36.9357C57.3884 37.0295 57.3354 37.0848 57.2299 37.1011C57.1019 37.1233 56.9907 37.1398 56.8963 37.1509C56.8016 37.162 56.6931 37.1675 56.571 37.1675C56.3441 37.1675 56.1437 37.1493 55.9696 37.1133C55.7954 37.077 55.6502 37.0061 55.5343 36.9003C55.4183 36.7945 55.3298 36.6483 55.269 36.4617C55.2083 36.2753 55.1778 36.0347 55.1778 35.7394V33.3175L54.5106 33.2088C54.4659 33.1977 54.4257 33.1769 54.3895 33.1462C54.3533 33.1157 54.3353 33.0781 54.3353 33.0335V32.4822C54.3353 32.4378 54.3533 32.3974 54.3895 32.3611C54.4257 32.325 54.4659 32.3068 54.5106 32.3068H55.1778V31.622C55.1778 31.5774 55.1945 31.5414 55.2276 31.5134C55.2605 31.4857 55.2993 31.4663 55.3436 31.455L56.355 31.2798H56.38C56.4241 31.2798 56.4602 31.2921 56.4875 31.3171C56.5154 31.3423 56.5293 31.3771 56.5293 31.4215V32.3068H57.2133C57.2577 32.3068 57.2966 32.3237 57.3301 32.3573C57.3633 32.3909 57.3801 32.4305 57.3801 32.4752V33.1573C57.3801 33.2024 57.3633 33.2416 57.3301 33.2752C57.2966 33.3089 57.2577 33.3257 57.2133 33.3257H56.5293V35.7561C56.5293 35.9231 56.5431 36.0304 56.571 36.0776C56.5987 36.1249 56.6765 36.1485 56.8045 36.1485H57.2133C57.3301 36.1485 57.3884 36.1955 57.3884 36.2893Z", fill: "#005697" }), jsx("path", { d: "M52.6187 14.7398H39.0664L37.6881 16.2935L33.2155 21.3349V21.3351L31.8372 22.8886H18.464L19.821 21.3153L20.4633 20.5706L21.8202 18.9973H15.6582C14.5325 18.9973 13.6113 19.943 13.6113 21.0987V25.5326C13.6113 26.6885 14.5325 27.6342 15.6582 27.6342H39.2492C40.3749 27.6342 41.9127 26.9318 42.6665 26.0733L46.235 22.0097L52.6187 14.7398Z", fill: "#005697" }), jsx("path", { d: "M55.3418 10C56.4676 10 57.3887 10.9457 57.3887 12.1015V16.5353C57.3887 17.691 56.4676 18.6368 55.3418 18.6368H49.1999L50.5697 17.0753H50.5699L51.2491 16.3012L52.6189 14.7398H39.0667L31.8375 22.8945H18.3813L28.0314 11.9701L28.3966 11.5566C29.153 10.7005 30.6929 10 31.8186 10H55.3418V10Z", fill: "#FBD500" })] })));
|
|
18403
|
+
};
|
|
18404
|
+
|
|
18394
18405
|
var Text$q = Typography.Text;
|
|
18395
18406
|
var MiniCreditCard = function (_a) {
|
|
18396
18407
|
var className = _a.className, buttons = _a.buttons, _b = _a.hideDropdownMenu, hideDropdownMenu = _b === void 0 ? false : _b, _c = _a.hideDefaultTag, hideDefaultTag = _c === void 0 ? false : _c, onClickRemove = _a.onClickRemove, paymentMethodData = _a.paymentMethodData, onClickSetDefault = _a.onClickSetDefault, id = _a.id;
|
|
@@ -18418,7 +18429,7 @@ var Identifier = function (_a) {
|
|
|
18418
18429
|
var Issuer = function (_a) {
|
|
18419
18430
|
var _b;
|
|
18420
18431
|
var paymentMethodData = _a.paymentMethodData;
|
|
18421
|
-
var list = ['visa', 'link', 'jcb', 'discover'];
|
|
18432
|
+
var list = ['visa', 'link', 'jcb', 'discover', 'sepa'];
|
|
18422
18433
|
var issuer = (_b = paymentMethodData === null || paymentMethodData === void 0 ? void 0 : paymentMethodData.metadata) === null || _b === void 0 ? void 0 : _b.issuer;
|
|
18423
18434
|
if (issuer.length == 0 || list.includes(issuer.toLowerCase()))
|
|
18424
18435
|
return null;
|
|
@@ -18478,6 +18489,12 @@ var CardImage = function (_a) {
|
|
|
18478
18489
|
case 'china_union_pay':
|
|
18479
18490
|
case 'china_unionpay':
|
|
18480
18491
|
return jsx(ChinaUnionPay, { className: className });
|
|
18492
|
+
case 'sepa':
|
|
18493
|
+
return jsx(Sepa, { className: className });
|
|
18494
|
+
case 'ideal':
|
|
18495
|
+
return jsx(IDeal, { className: className });
|
|
18496
|
+
case 'bancontact':
|
|
18497
|
+
return jsx(Bancontact, { className: className });
|
|
18481
18498
|
default:
|
|
18482
18499
|
return jsx(CreditCard, { className: className });
|
|
18483
18500
|
}
|
|
@@ -18734,7 +18751,7 @@ var DemoPayForm = function (_a) {
|
|
|
18734
18751
|
cvc: '',
|
|
18735
18752
|
}), cardDetails = _d[0], setCardDetails = _d[1];
|
|
18736
18753
|
var onSave = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
18737
|
-
var error_1
|
|
18754
|
+
var error_1;
|
|
18738
18755
|
return __generator(this, function (_a) {
|
|
18739
18756
|
switch (_a.label) {
|
|
18740
18757
|
case 0:
|
|
@@ -18750,12 +18767,7 @@ var DemoPayForm = function (_a) {
|
|
|
18750
18767
|
return [3 /*break*/, 3];
|
|
18751
18768
|
case 2:
|
|
18752
18769
|
error_1 = _a.sent();
|
|
18753
|
-
|
|
18754
|
-
response: {
|
|
18755
|
-
message: error_1.message,
|
|
18756
|
-
},
|
|
18757
|
-
};
|
|
18758
|
-
onFail(errorResponse);
|
|
18770
|
+
onFail(error_1);
|
|
18759
18771
|
return [3 /*break*/, 3];
|
|
18760
18772
|
case 3: return [2 /*return*/];
|
|
18761
18773
|
}
|
|
@@ -18881,11 +18893,13 @@ function useSave(_a) {
|
|
|
18881
18893
|
|
|
18882
18894
|
var PaymentMethodForm = function (_a) {
|
|
18883
18895
|
var plugin = _a.plugin, onFail = _a.onFail, onSavePaymentMethod = _a.onSavePaymentMethod;
|
|
18896
|
+
var _b = useState(false), isIdealWarningOpen = _b[0], setIsIdealWarningOpen = _b[1];
|
|
18897
|
+
var idealWarningHasShown = useRef(false);
|
|
18884
18898
|
// Hooks
|
|
18885
|
-
var
|
|
18899
|
+
var _c = useSave({
|
|
18886
18900
|
onSaveSuccess: onSavePaymentMethod,
|
|
18887
18901
|
onSaveError: onFail,
|
|
18888
|
-
}), save =
|
|
18902
|
+
}), save = _c.save, isSaving = _c.isSaving;
|
|
18889
18903
|
// Handlers
|
|
18890
18904
|
var onSubmit = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
18891
18905
|
var error_1;
|
|
@@ -18905,10 +18919,20 @@ var PaymentMethodForm = function (_a) {
|
|
|
18905
18919
|
}
|
|
18906
18920
|
});
|
|
18907
18921
|
}); };
|
|
18922
|
+
var onChange = function (event) {
|
|
18923
|
+
if (event.value.type === 'ideal' && !idealWarningHasShown.current) {
|
|
18924
|
+
idealWarningHasShown.current = true;
|
|
18925
|
+
setIsIdealWarningOpen(true);
|
|
18926
|
+
}
|
|
18927
|
+
};
|
|
18908
18928
|
return (jsxs("form", { children: [jsx(PaymentElement, { options: {
|
|
18909
18929
|
layout: { type: 'accordion' },
|
|
18910
|
-
} }), jsx(SavePaymentMethodFooter, { isSaving: isSaving, onSave: onSubmit })] }));
|
|
18930
|
+
}, onChange: onChange }), jsx(SavePaymentMethodFooter, { isSaving: isSaving, onSave: onSubmit }), jsx(IdealWarningModal, { isOpen: isIdealWarningOpen, onClose: function () { return setIsIdealWarningOpen(false); } })] }));
|
|
18911
18931
|
};
|
|
18932
|
+
function IdealWarningModal(_a) {
|
|
18933
|
+
var isOpen = _a.isOpen, onClose = _a.onClose;
|
|
18934
|
+
return (jsx(Modal, __assign({ open: isOpen, onCancel: onClose, footer: jsx(Button, __assign({ type: "primary", onClick: onClose }, { children: "Ok" })) }, { children: jsx("div", __assign({ className: "bunny-p-4" }, { children: "iDEAL will charge a 1 cent fee when storing this payment method. You will be refunded later." })) })));
|
|
18935
|
+
}
|
|
18912
18936
|
|
|
18913
18937
|
// This is just a wrapper to fetch the stripe object and pass it to the form
|
|
18914
18938
|
var StripeForm = function (_a) {
|
|
@@ -18925,7 +18949,8 @@ var PaymentMethodDetails = function (_a) {
|
|
|
18925
18949
|
case 'DemoPayPayment':
|
|
18926
18950
|
return (jsx(DemoPayForm, { onFail: onFail, onSavePaymentMethod: onSavePaymentMethod, plugin: plugin }));
|
|
18927
18951
|
default:
|
|
18928
|
-
|
|
18952
|
+
console.warn('Can not find form for plugin', plugin);
|
|
18953
|
+
return jsx(Fragment, {});
|
|
18929
18954
|
}
|
|
18930
18955
|
};
|
|
18931
18956
|
|
|
@@ -19089,7 +19114,7 @@ var PaymentForm = function (_a) {
|
|
|
19089
19114
|
}, [paymentPlugins, defaultPaymentMethod]);
|
|
19090
19115
|
// Derived state
|
|
19091
19116
|
var defaultPaymentMethodPlugin = paymentPlugins === null || paymentPlugins === void 0 ? void 0 : paymentPlugins.find(function (plugin) { var _a, _b, _c; return ((_a = plugin.id) === null || _a === void 0 ? void 0 : _a.toString()) === ((_c = (_b = defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.plugin) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.toString()); });
|
|
19092
|
-
var paying =
|
|
19117
|
+
var paying = Boolean(quote || invoice);
|
|
19093
19118
|
var currencyId = (_b = ((quote === null || quote === void 0 ? void 0 : quote.currencyId) ||
|
|
19094
19119
|
(invoice === null || invoice === void 0 ? void 0 : invoice.currencyId) ||
|
|
19095
19120
|
currencyIdFromProps)) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
@@ -19181,7 +19206,7 @@ var PaymentForm = function (_a) {
|
|
|
19181
19206
|
label: !showPaymentMethodForm ? (jsx("div", __assign({ className: "bunny-pt-2" }, { children: jsx(Button, __assign({ onClick: handleClickAddPaymentMethod, type: "default", className: "bunny-w-full", id: "addPaymentMethod" }, { children: "Add payment method" })) }))) : null,
|
|
19182
19207
|
children: (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 bunny-mt-2" }, { children: [jsx(PaymentMethodSelector, { onSelect: setSelectorPaymentMethodPlugin, paymentMethodAllowedPlugins: paymentPlugins || [], value: selectorPaymentMethodPlugin }), selectorPaymentMethodPlugin && (jsx("div", __assign({ className: "bunny-flex bunny-flex-col" }, { children: jsx(PaymentMethodDetails, { onFail: onFail, onSavePaymentMethod: handleSavePaymentMethod, plugin: selectorPaymentMethodPlugin }) })))] }))),
|
|
19183
19208
|
},
|
|
19184
|
-
] }), paying
|
|
19209
|
+
] }), paying && defaultPaymentMethod && (jsx("div", __assign({ className: "bunny-px-4" }, { children: jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, plugin: selectedPaymentMethodPlugin, onPaymentHoldSuccess: onPaymentHoldSuccess, paymentHoldOptions: paymentHoldOptions }) })))] })) : (jsx(Button, __assign({ style: { margin: '0 16px' }, loading: isCheckingOutNoPayment, onClick: function () { return checkoutNoPayment(); }, type: "primary" }, { children: isCheckingOutNoPayment ? 'Processing...' : 'Complete Order' }))) }) })) })) })));
|
|
19185
19210
|
};
|
|
19186
19211
|
function StripeWrapper(_a) {
|
|
19187
19212
|
var children = _a.children, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, currencyId = _a.currencyId, accountId = _a.accountId;
|
|
@@ -19687,9 +19712,7 @@ function ActualQuote() {
|
|
|
19687
19712
|
if ((firstInvoice === null || firstInvoice === void 0 ? void 0 : firstInvoice.state) === 'PAID' && paymentHoldCompleted) {
|
|
19688
19713
|
return jsx(Invoice, { id: firstInvoice.id });
|
|
19689
19714
|
}
|
|
19690
|
-
return (jsxs(Fragment, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-grow ".concat(isMobile ? 'bunny-w-full bunny-overflow-hidden' : '', " ").concat(className) }, { children: [jsx(QuoteButtons, { isAccepted: isAccepted, formattedQuote: formattedQuote, isMobile: isMobile, hideDownloadButton: hideDownloadButton, id: id, isAccepting: isAccepting, handleClickAccept: handleClickAccept, setPaymentHoldModalVisible: setPaymentHoldModalVisible, shouldDoPaymentHold: shouldDoPaymentHold, paymentHoldCompleted: paymentHoldCompleted, paymentHold: paymentHold }), jsx(InvoiceQuoteView, __assign({ html: formattedQuote.html, targetUrl: ((_b = formattedQuote === null || formattedQuote === void 0 ? void 0 : formattedQuote.quote) === null || _b === void 0 ? void 0 : _b.documentTemplateId)
|
|
19691
|
-
? "".concat(apiHost, "/api/pdf/quote/").concat(formattedQuote.quote.id)
|
|
19692
|
-
: undefined }, { children: ((_d = (_c = formattedQuote.quote) === null || _c === void 0 ? void 0 : _c.documents) === null || _d === void 0 ? void 0 : _d.length) > 0 ? (jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: formattedQuote.quote.documents.map(function (doc, index) {
|
|
19715
|
+
return (jsxs(Fragment, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-grow ".concat(isMobile ? 'bunny-w-full bunny-overflow-hidden' : '', " ").concat(className) }, { children: [jsx(QuoteButtons, { isAccepted: isAccepted, formattedQuote: formattedQuote, isMobile: isMobile, hideDownloadButton: hideDownloadButton, id: id, isAccepting: isAccepting, handleClickAccept: handleClickAccept, setPaymentHoldModalVisible: setPaymentHoldModalVisible, shouldDoPaymentHold: shouldDoPaymentHold, paymentHoldCompleted: paymentHoldCompleted, paymentHold: paymentHold }), jsx(InvoiceQuoteView, __assign({ html: formattedQuote.html, targetUrl: ((_b = formattedQuote === null || formattedQuote === void 0 ? void 0 : formattedQuote.quote) === null || _b === void 0 ? void 0 : _b.documentTemplateId) ? "/pdf/quote" : undefined }, { children: ((_d = (_c = formattedQuote.quote) === null || _c === void 0 ? void 0 : _c.documents) === null || _d === void 0 ? void 0 : _d.length) > 0 ? (jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: formattedQuote.quote.documents.map(function (doc, index) {
|
|
19693
19716
|
return (jsx(Button, __assign({ download: doc.filename, href: doc.url, type: "link" }, { children: doc.filename }), index));
|
|
19694
19717
|
}) }))) : null }))] })), jsx(AcceptQuoteModal, { acceptBoxVisible: acceptBoxVisible, formattedQuote: formattedQuote, setAcceptBoxVisible: setAcceptBoxVisible, setIsAccepting: setIsAccepting, sendAccept: sendAccept, isSendAcceptPending: isSendAcceptPending }), jsx(PaymentHoldModal, { visible: paymentHoldModalVisible, setVisible: setPaymentHoldModalVisible, quote: formattedQuote }), jsx(PandadocPollingModal, { isVisible: pandadocPollingModalVisible, setVisible: setPandadocPollingModalVisible, id: id })] }));
|
|
19695
19718
|
}
|
|
@@ -19776,31 +19799,31 @@ var StateTag = function (_a) {
|
|
|
19776
19799
|
if (transactionStateRenderer) {
|
|
19777
19800
|
return jsx(Fragment, { children: transactionStateRenderer(state) });
|
|
19778
19801
|
}
|
|
19779
|
-
return
|
|
19802
|
+
return jsx(CustomizedTag, __assign({ color: getColor(state) }, { children: lodashExports.capitalize(lodashExports.startCase(state)) }));
|
|
19780
19803
|
};
|
|
19781
19804
|
var getColor = function (state) {
|
|
19782
19805
|
switch (state) {
|
|
19783
|
-
case
|
|
19784
|
-
return
|
|
19785
|
-
case
|
|
19786
|
-
return
|
|
19787
|
-
case
|
|
19788
|
-
return
|
|
19789
|
-
case
|
|
19790
|
-
return
|
|
19791
|
-
case
|
|
19792
|
-
case
|
|
19793
|
-
case
|
|
19794
|
-
return
|
|
19795
|
-
case
|
|
19796
|
-
case
|
|
19797
|
-
return
|
|
19798
|
-
case
|
|
19799
|
-
return
|
|
19800
|
-
case
|
|
19801
|
-
return
|
|
19806
|
+
case TransactionState.not_due:
|
|
19807
|
+
return 'yellow';
|
|
19808
|
+
case TransactionState.voided:
|
|
19809
|
+
return 'black';
|
|
19810
|
+
case TransactionState.ready:
|
|
19811
|
+
return 'orange';
|
|
19812
|
+
case TransactionState.preparing:
|
|
19813
|
+
return 'purple';
|
|
19814
|
+
case TransactionState.unapplied:
|
|
19815
|
+
case TransactionState.partially_applied:
|
|
19816
|
+
case TransactionState.applied:
|
|
19817
|
+
return 'blue';
|
|
19818
|
+
case TransactionState.due:
|
|
19819
|
+
case TransactionState.unpaid:
|
|
19820
|
+
return 'orange';
|
|
19821
|
+
case TransactionState.failed:
|
|
19822
|
+
return 'red';
|
|
19823
|
+
case TransactionState.paid:
|
|
19824
|
+
return 'green';
|
|
19802
19825
|
default:
|
|
19803
|
-
return
|
|
19826
|
+
return 'blue';
|
|
19804
19827
|
}
|
|
19805
19828
|
};
|
|
19806
19829
|
|
|
@@ -19821,7 +19844,7 @@ var TransactionDownload = function (_a) {
|
|
|
19821
19844
|
var downloadTransactionLink = useContext(TransactionsListContext).downloadTransactionLink;
|
|
19822
19845
|
var downloadFile = useDownloadFile();
|
|
19823
19846
|
var isMobile = useIsMobile();
|
|
19824
|
-
var isClickable = transaction.kind ===
|
|
19847
|
+
var isClickable = transaction.kind === 'INVOICE' || downloadTransactionLink !== undefined;
|
|
19825
19848
|
var downloadLink = downloadTransactionLink
|
|
19826
19849
|
? downloadTransactionLink(transaction.transactionableId)
|
|
19827
19850
|
: "".concat(apiHost, "/api/pdf/invoice/").concat(transaction.transactionableId);
|
|
@@ -19830,7 +19853,7 @@ var TransactionDownload = function (_a) {
|
|
|
19830
19853
|
return (jsx("div", __assign({ onClick: function (e) {
|
|
19831
19854
|
e.stopPropagation();
|
|
19832
19855
|
downloadFile(downloadLink, token);
|
|
19833
|
-
} }, { children: jsx(ArrowDownToLine, { className: "".concat(isMobile ?
|
|
19856
|
+
} }, { children: jsx(ArrowDownToLine, { className: "".concat(isMobile ? '' : 'bunny-show-on-hover'), color: darkMode ? WHITE : SLATE_600 }) })));
|
|
19834
19857
|
};
|
|
19835
19858
|
|
|
19836
19859
|
var TransactionGridCell = defaultStyled.div.withConfig({
|
|
@@ -19852,29 +19875,25 @@ var TransactionsEmptyState = function () {
|
|
|
19852
19875
|
|
|
19853
19876
|
var Text$k = Typography.Text;
|
|
19854
19877
|
var isInvoice = function (transaction) {
|
|
19855
|
-
return transaction.kind ===
|
|
19856
|
-
};
|
|
19857
|
-
var isQuote = function (transaction) {
|
|
19858
|
-
return transaction.kind === "QUOTE";
|
|
19878
|
+
return transaction.kind === 'INVOICE';
|
|
19859
19879
|
};
|
|
19860
19880
|
var TransactionRowTitle = function (_a) {
|
|
19861
19881
|
var transaction = _a.transaction;
|
|
19862
|
-
if (!isInvoice(transaction)
|
|
19882
|
+
if (!isInvoice(transaction)) {
|
|
19863
19883
|
return jsx(Fragment, {});
|
|
19864
19884
|
}
|
|
19865
|
-
return (jsx(Text$k, __assign({ className: "bunny-text-slate-400", style: { fontSize:
|
|
19885
|
+
return (jsx(Text$k, __assign({ className: "bunny-text-slate-400", style: { fontSize: '11px' } }, { children: transaction.transactionable.number })));
|
|
19866
19886
|
};
|
|
19867
19887
|
|
|
19868
19888
|
function transactionDateToDisplay(transaction, transactionDateType) {
|
|
19869
|
-
|
|
19870
|
-
if (transaction.kind === "PAYMENT") {
|
|
19889
|
+
if (transaction.kind === TransactionKind.PAYMENT) {
|
|
19871
19890
|
return transaction.createdAt;
|
|
19872
19891
|
}
|
|
19873
|
-
else if (transaction.kind !==
|
|
19874
|
-
return
|
|
19892
|
+
else if (transaction.kind !== TransactionKind.REFUND && transactionDateType === 'dueAt') {
|
|
19893
|
+
return transaction.transactionable.dueAt || '';
|
|
19875
19894
|
}
|
|
19876
|
-
else if (transactionDateType ===
|
|
19877
|
-
return
|
|
19895
|
+
else if (transactionDateType === 'issuedAt') {
|
|
19896
|
+
return transaction.transactionable.issuedAt || '';
|
|
19878
19897
|
}
|
|
19879
19898
|
else {
|
|
19880
19899
|
return transaction.createdAt;
|
|
@@ -19888,29 +19907,29 @@ var TransactionsListDesktop = function (_a) {
|
|
|
19888
19907
|
var _c = useContext(BunnyContext), apiHost = _c.apiHost, darkMode = _c.darkMode;
|
|
19889
19908
|
var token = useToken();
|
|
19890
19909
|
// Columns to show
|
|
19891
|
-
var showDate = columns.includes(
|
|
19892
|
-
var showTitle = columns.includes(
|
|
19893
|
-
var showAccountName = columns.includes(
|
|
19894
|
-
var showDownload = columns.includes(
|
|
19895
|
-
var showAmount = columns.includes(
|
|
19896
|
-
var showState = columns.includes(
|
|
19910
|
+
var showDate = columns.includes('date');
|
|
19911
|
+
var showTitle = columns.includes('title');
|
|
19912
|
+
var showAccountName = columns.includes('accountName');
|
|
19913
|
+
var showDownload = columns.includes('download');
|
|
19914
|
+
var showAmount = columns.includes('amount');
|
|
19915
|
+
var showState = columns.includes('state');
|
|
19897
19916
|
if ((transactions === null || transactions === void 0 ? void 0 : transactions.length) === 0)
|
|
19898
19917
|
return jsx(TransactionsEmptyState, {});
|
|
19899
19918
|
return (jsx(Fragment, { children: transactions === null || transactions === void 0 ? void 0 : transactions.map(function (transaction, index) {
|
|
19900
19919
|
var _a, _b;
|
|
19901
19920
|
var isClickable = onTransactionClick !== undefined;
|
|
19902
|
-
return (jsxs("div", __assign({ className: "bunny-contents ".concat(isClickable &&
|
|
19921
|
+
return (jsxs("div", __assign({ className: "bunny-contents ".concat(isClickable && 'cursor-pointer', " bunny-show-on-hover-container"), onClick: function () {
|
|
19903
19922
|
onTransactionClick === null || onTransactionClick === void 0 ? void 0 : onTransactionClick(transaction);
|
|
19904
19923
|
}, style: {
|
|
19905
19924
|
backgroundColor: index % 2 === 0
|
|
19906
|
-
? "var(--row-background".concat(darkMode ?
|
|
19907
|
-
: "var(--row-background-alternate".concat(darkMode ?
|
|
19925
|
+
? "var(--row-background".concat(darkMode ? '-dark' : '', ")")
|
|
19926
|
+
: "var(--row-background-alternate".concat(darkMode ? '-dark' : '', ")"),
|
|
19908
19927
|
} }, { children: [!showDate &&
|
|
19909
19928
|
!showTitle &&
|
|
19910
19929
|
!showState &&
|
|
19911
19930
|
!showAmount &&
|
|
19912
19931
|
!showDownload &&
|
|
19913
|
-
!showAccountName && (jsx(TransactionGridCell, { children: jsx(Text$j, { children: "No columns selected" }) })), showDate && (jsx(TransactionGridCell, __assign({ right: false }, { children: jsx(TransactionDate, { date: transactionDateToDisplay(transaction, transactionDateType) }) }))), showTitle && (jsx(Fragment, { children: jsxs(TransactionGridCell, __assign({ right: false, className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [jsx(Text$j, { children: lodashExports.capitalize(transaction.kind.toLowerCase()) }), jsx(TransactionRowTitle, { transaction: transaction })] })) })), showAccountName && (jsx(TransactionGridCell, __assign({ right: false }, { children: jsx(Text$j, { children: (_a = transaction.account) === null || _a === void 0 ? void 0 : _a.name }) }))), !showDate && !showTitle && !showAccountName &&
|
|
19932
|
+
!showAccountName && (jsx(TransactionGridCell, { children: jsx(Text$j, { children: "No columns selected" }) })), showDate && (jsx(TransactionGridCell, __assign({ right: false }, { children: jsx(TransactionDate, { date: transactionDateToDisplay(transaction, transactionDateType) }) }))), showTitle && (jsx(Fragment, { children: jsxs(TransactionGridCell, __assign({ right: false, className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [jsx(Text$j, { children: lodashExports.capitalize(transaction.kind.toLowerCase()) }), jsx(TransactionRowTitle, { transaction: transaction })] })) })), showAccountName && (jsx(TransactionGridCell, __assign({ right: false }, { children: jsx(Text$j, { children: (_a = transaction.account) === null || _a === void 0 ? void 0 : _a.name }) }))), !showDate && !showTitle && !showAccountName && jsx(TransactionGridCell, { right: false }), showDownload && (jsx(TransactionGridCell, { children: jsx(TransactionDownload, { transaction: transaction, token: token, apiHost: apiHost }) })), showState ? (jsx(TransactionGridCell, __assign({ right: true }, { children: jsx(StateTag, { state: transaction.state }) }))) : null, showAmount && (jsx(TransactionGridCell, __assign({ right: true }, { children: jsx(Text$j, { children: formatCurrency(((_b = transaction === null || transaction === void 0 ? void 0 : transaction.transactionable) === null || _b === void 0 ? void 0 : _b.amount) || transaction.amount, transaction.currencyId) }) })))] }), index));
|
|
19914
19933
|
}) }));
|
|
19915
19934
|
};
|
|
19916
19935
|
|
|
@@ -19920,25 +19939,24 @@ var TransactionsListMobile = function (_a) {
|
|
|
19920
19939
|
var _b = useContext(TransactionsListContext), columns = _b.columns, transactionDateType = _b.transactionDateType;
|
|
19921
19940
|
var _c = useContext(BunnyContext), apiHost = _c.apiHost, darkMode = _c.darkMode;
|
|
19922
19941
|
var token = useToken();
|
|
19923
|
-
var showAmount = columns.includes(
|
|
19924
|
-
var showDate = columns.includes(
|
|
19925
|
-
var showTitle = columns.includes(
|
|
19926
|
-
var showAccountName = columns.includes(
|
|
19927
|
-
var showDownload = columns.includes(
|
|
19928
|
-
var showState = columns.includes(
|
|
19942
|
+
var showAmount = columns.includes('amount');
|
|
19943
|
+
var showDate = columns.includes('date');
|
|
19944
|
+
var showTitle = columns.includes('title');
|
|
19945
|
+
var showAccountName = columns.includes('accountName');
|
|
19946
|
+
var showDownload = columns.includes('download');
|
|
19947
|
+
var showState = columns.includes('state');
|
|
19929
19948
|
if ((transactions === null || transactions === void 0 ? void 0 : transactions.length) === 0)
|
|
19930
19949
|
return jsx(TransactionsEmptyState, {});
|
|
19931
19950
|
return (jsx(Fragment, { children: transactions === null || transactions === void 0 ? void 0 : transactions.map(function (transaction, index) {
|
|
19932
19951
|
var _a;
|
|
19933
|
-
var isClickable = transaction.kind ===
|
|
19934
|
-
return (jsxs("div", __assign({ className: "bunny-contents ".concat(isClickable &&
|
|
19952
|
+
var isClickable = transaction.kind === 'INVOICE';
|
|
19953
|
+
return (jsxs("div", __assign({ className: "bunny-contents ".concat(isClickable && 'cursor-pointer', " bunny-show-on-hover-container"), onClick: function () {
|
|
19935
19954
|
onTransactionClick(transaction);
|
|
19936
19955
|
}, style: {
|
|
19937
19956
|
backgroundColor: index % 2 === 0
|
|
19938
|
-
? "var(--row-background".concat(darkMode ?
|
|
19939
|
-
: "var(--row-background-alternate".concat(darkMode ?
|
|
19940
|
-
} }, { children: [jsx(TransactionGridCell, { children: jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [(showTitle || showState) && (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showTitle && (jsxs(Fragment, { children: [jsx(Text$i, { children: lodashExports.capitalize(transaction.kind.toLowerCase()) }), jsx(TransactionRowTitle, { transaction: transaction })] })), showState && jsx(StateTag, { state: transaction.state })] }))), jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showAccountName && jsx(Text$i, { children: (_a = transaction.account) === null || _a === void 0 ? void 0 : _a.name }), showAccountName && showDate && jsx(Text$i, { children: "\u00B7" }), showDate && (jsx(TransactionDate, { date: transactionDateToDisplay(transaction, transactionDateType) })), showDate && showAmount && jsx(Text$i, { children: "\u00B7" }), showAmount && (jsx(Text$i, { children: formatCurrency(transaction.transactionable.amount ||
|
|
19941
|
-
transaction.amount, transaction.currencyId) }))] }))] })) }), showDownload && (jsx(TransactionGridCell, __assign({ right: true }, { children: jsx(TransactionDownload, { transaction: transaction, token: token, apiHost: apiHost }) })))] }), index));
|
|
19957
|
+
? "var(--row-background".concat(darkMode ? '-dark' : '', ")")
|
|
19958
|
+
: "var(--row-background-alternate".concat(darkMode ? '-dark' : '', ")"),
|
|
19959
|
+
} }, { children: [jsx(TransactionGridCell, { children: jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [(showTitle || showState) && (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showTitle && (jsxs(Fragment, { children: [jsx(Text$i, { children: lodashExports.capitalize(transaction.kind.toLowerCase()) }), jsx(TransactionRowTitle, { transaction: transaction })] })), showState && jsx(StateTag, { state: transaction.state })] }))), jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [showAccountName && jsx(Text$i, { children: (_a = transaction.account) === null || _a === void 0 ? void 0 : _a.name }), showAccountName && showDate && jsx(Text$i, { children: "\u00B7" }), showDate && (jsx(TransactionDate, { date: transactionDateToDisplay(transaction, transactionDateType) })), showDate && showAmount && jsx(Text$i, { children: "\u00B7" }), showAmount && (jsx(Text$i, { children: formatCurrency(transaction.transactionable.amount || transaction.amount, transaction.currencyId) }))] }))] })) }), showDownload && (jsx(TransactionGridCell, __assign({ right: true }, { children: jsx(TransactionDownload, { transaction: transaction, token: token, apiHost: apiHost }) })))] }), index));
|
|
19942
19960
|
}) }));
|
|
19943
19961
|
};
|
|
19944
19962
|
|
|
@@ -20068,9 +20086,9 @@ function TransactionsDisplay(_a) {
|
|
|
20068
20086
|
}
|
|
20069
20087
|
|
|
20070
20088
|
function Quotes(_a) {
|
|
20071
|
-
var className = _a.className, _b = _a.columns, columns = _b === void 0 ? [
|
|
20089
|
+
var className = _a.className, _b = _a.columns, columns = _b === void 0 ? ['date', 'title', 'amount', 'download', 'state'] : _b, filter = _a.filter, filterQuotes = _a.filterQuotes, _c = _a.sort, sort = _c === void 0 ? function (a, b) {
|
|
20072
20090
|
return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();
|
|
20073
|
-
} : _c, _d = _a.noQuotesMessage, noQuotesMessage = _d === void 0 ?
|
|
20091
|
+
} : _c, _d = _a.noQuotesMessage, noQuotesMessage = _d === void 0 ? 'There are no quotes' : _d, onQuoteClick = _a.onQuoteClick, quoteComponent = _a.quoteComponent, searchBarClassName = _a.searchBarClassName, _e = _a.shadow, shadow = _e === void 0 ? 'shadow-md' : _e, _f = _a.showSearchBar, showSearchBar = _f === void 0 ? true : _f, _g = _a.showTitle, showTitle = _g === void 0 ? true : _g, _h = _a.title, title = _h === void 0 ? 'Past quotes' : _h, style = _a.style, _j = _a.suppressQuoteDisplay, suppressQuoteDisplay = _j === void 0 ? false : _j, _k = _a.useModal, useModal = _k === void 0 ? false : _k;
|
|
20074
20092
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
20075
20093
|
var _l = useState(null), component = _l[0], setComponent = _l[1];
|
|
20076
20094
|
var contextValues = {
|
|
@@ -20096,27 +20114,27 @@ function Quotes(_a) {
|
|
|
20096
20114
|
filterTransactions: filterQuotes,
|
|
20097
20115
|
sortTransactions: sort,
|
|
20098
20116
|
downloadTransactionLink: function (id) { return "".concat(apiHost, "/api/pdf/quote/").concat(id); },
|
|
20099
|
-
transactionDateType:
|
|
20117
|
+
transactionDateType: 'createdAt', // Required for the transactions list, but doesn't affect quotes
|
|
20100
20118
|
};
|
|
20101
20119
|
function quoteStateRenderer(state) {
|
|
20102
20120
|
var getColor = function (state) {
|
|
20103
20121
|
switch (state) {
|
|
20104
|
-
case
|
|
20105
|
-
return
|
|
20106
|
-
case
|
|
20107
|
-
return
|
|
20108
|
-
case
|
|
20109
|
-
return
|
|
20110
|
-
case
|
|
20111
|
-
return
|
|
20112
|
-
case
|
|
20113
|
-
case
|
|
20114
|
-
case
|
|
20122
|
+
case 'ACCEPTED':
|
|
20123
|
+
return 'green';
|
|
20124
|
+
case 'IN_APPROVAL':
|
|
20125
|
+
return 'orange';
|
|
20126
|
+
case 'APPROVED':
|
|
20127
|
+
return 'green';
|
|
20128
|
+
case 'REJECTED':
|
|
20129
|
+
return 'red';
|
|
20130
|
+
case 'DRAFT':
|
|
20131
|
+
case 'SHARED':
|
|
20132
|
+
case 'VIEWED':
|
|
20115
20133
|
default:
|
|
20116
|
-
return
|
|
20134
|
+
return 'blue';
|
|
20117
20135
|
}
|
|
20118
20136
|
};
|
|
20119
|
-
return
|
|
20137
|
+
return jsx(CustomizedTag, __assign({ color: getColor(state) }, { children: lodashExports.capitalize(lodashExports.startCase(state)) }));
|
|
20120
20138
|
}
|
|
20121
20139
|
function handleQuoteClick(quote) {
|
|
20122
20140
|
onQuoteClick === null || onQuoteClick === void 0 ? void 0 : onQuoteClick(quote);
|
|
@@ -20134,11 +20152,11 @@ function QuotesWrapper() {
|
|
|
20134
20152
|
var token = useToken();
|
|
20135
20153
|
var filterFromContext = useContext(TransactionsListContext).filter;
|
|
20136
20154
|
// Local state
|
|
20137
|
-
var _a = useState(
|
|
20138
|
-
var filter = filterFromContext || (search ? "filter: \"quote.id is ".concat(search, "\"") :
|
|
20155
|
+
var _a = useState(''), search = _a[0], setSearch = _a[1];
|
|
20156
|
+
var filter = filterFromContext || (search ? "filter: \"quote.id is ".concat(search, "\"") : '');
|
|
20139
20157
|
// Queries
|
|
20140
20158
|
var data = useQuery({
|
|
20141
|
-
queryKey: [
|
|
20159
|
+
queryKey: ['quotes', token, filter],
|
|
20142
20160
|
queryFn: function () { return getQuotes({ token: token, apiHost: apiHost, filter: filter }); },
|
|
20143
20161
|
placeholderData: keepPreviousData,
|
|
20144
20162
|
}).data;
|
|
@@ -20146,7 +20164,7 @@ function QuotesWrapper() {
|
|
|
20146
20164
|
return null;
|
|
20147
20165
|
// filter out quotes in draft state, they are not viewable
|
|
20148
20166
|
var quotes = data.nodes.filter(function (quote) {
|
|
20149
|
-
return quote.state !==
|
|
20167
|
+
return quote.state !== 'DRAFT';
|
|
20150
20168
|
});
|
|
20151
20169
|
var quotesAsTransactions = quotes.map(function (quote) {
|
|
20152
20170
|
var _a, _b;
|
|
@@ -20154,7 +20172,7 @@ function QuotesWrapper() {
|
|
|
20154
20172
|
transactionableId: quote.id,
|
|
20155
20173
|
state: quote.state,
|
|
20156
20174
|
amount: quote.amount || quote.amountDue,
|
|
20157
|
-
kind:
|
|
20175
|
+
kind: 'QUOTE',
|
|
20158
20176
|
currencyId: quote.currencyId,
|
|
20159
20177
|
transactionable: {
|
|
20160
20178
|
number: quote.number,
|
|
@@ -20283,7 +20301,7 @@ var getPriceList = function (_a) {
|
|
|
20283
20301
|
});
|
|
20284
20302
|
};
|
|
20285
20303
|
|
|
20286
|
-
var QUOTE_QUERY = function (id) { return "\n query quote {\n quote ".concat(id ? "(id: ".concat(id, ")") : '', " {\n accountId\n amount\n amountDue\n smallUnitAmountDue\n currencyId\n formattedQuote {\n html\n }\n id\n payableId\n periodAmount\n subtotal\n taxAmount\n amountsByPeriod {\n amount\n startDate\n }\n quoteChanges {\n currencyId\n id\n kind\n charges {\n subtotal\n amountsByPeriod {\n amount\n startDate\n }\n amount\n billingPeriod\n currencyId\n feature {\n unitName\n }\n id\n name\n priceListCharge {\n id\n }\n priceList {\n id\n }\n coupon {\n couponCode\n }\n quantity\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n\n }\n }\n }"); };
|
|
20304
|
+
var QUOTE_QUERY = function (id) { return "\n query quote {\n quote ".concat(id ? "(id: ".concat(id, ")") : '', " {\n accountId\n amount\n amountDue\n smallUnitAmountDue\n currencyId\n formattedQuote {\n html\n }\n id\n payableId\n periodAmount\n subtotal\n taxAmount\n startDate\n amountsByPeriod {\n amount\n startDate\n }\n quoteChanges {\n currencyId\n id\n kind\n charges {\n subtotal\n amountsByPeriod {\n amount\n startDate\n }\n amount\n billingPeriod\n currencyId\n feature {\n unitName\n }\n id\n name\n priceListCharge {\n id\n }\n priceList {\n id\n }\n coupon {\n couponCode\n }\n quantity\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n\n }\n }\n }"); };
|
|
20287
20305
|
var getQuote = function (_a) {
|
|
20288
20306
|
var id = _a.id, token = _a.token, apiHost = _a.apiHost;
|
|
20289
20307
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -20498,12 +20516,12 @@ var CheckoutSummaryDivider = function () {
|
|
|
20498
20516
|
|
|
20499
20517
|
var Title$1 = Typography.Title;
|
|
20500
20518
|
function PaymentForms(_a) {
|
|
20501
|
-
var quote = _a.quote, handlePaymentSuccess = _a.handlePaymentSuccess, handlePaymentFail = _a.handlePaymentFail, handleSubmit = _a.handleSubmit, proceedingToPayment = _a.proceedingToPayment, accountId = _a.accountId, overrideToken = _a.overrideToken, customCheckoutFunction = _a.customCheckoutFunction;
|
|
20519
|
+
var quote = _a.quote, handlePaymentSuccess = _a.handlePaymentSuccess, handlePaymentFail = _a.handlePaymentFail, handleSubmit = _a.handleSubmit, proceedingToPayment = _a.proceedingToPayment, accountId = _a.accountId, overrideToken = _a.overrideToken, customCheckoutFunction = _a.customCheckoutFunction, defaultValues = _a.defaultValues;
|
|
20502
20520
|
var entityId = useCurrentUserData().entityId;
|
|
20503
|
-
return (jsx(Fragment, { children: quote ? (jsx(Fragment, { children: overrideToken ? (jsxs(Fragment, { children: [jsx(Title$1, __assign({ className: "bunny-px-4 bunny-m-0", level: 2 }, { children: "Payment" })), jsx(PaymentForm, { entityId: entityId, onFail: handlePaymentFail, onPaymentSuccess: handlePaymentSuccess, accountId: accountId, quote: quote, overrideToken: overrideToken, customCheckoutFunction: customCheckoutFunction })] })) : null })) : (jsxs(Fragment, { children: [jsx(Title$1, __assign({ className: "bunny-px-4 bunny-m-0", level: 2 }, { children: "Signup" })), jsx(InitialSignupForm, { className: "bunny-px-4", onSubmit: handleSubmit, submitting: proceedingToPayment })] })) }));
|
|
20521
|
+
return (jsx(Fragment, { children: quote ? (jsx(Fragment, { children: overrideToken ? (jsxs(Fragment, { children: [jsx(Title$1, __assign({ className: "bunny-px-4 bunny-m-0", level: 2 }, { children: "Payment" })), jsx("div", __assign({ className: "bunny-overflow-y-auto bunny-max-h-[calc(100vh-10rem)]" }, { children: jsx(PaymentForm, { entityId: entityId, onFail: handlePaymentFail, onPaymentSuccess: handlePaymentSuccess, accountId: accountId, quote: quote, overrideToken: overrideToken, customCheckoutFunction: customCheckoutFunction }) }))] })) : null })) : (jsxs(Fragment, { children: [jsx(Title$1, __assign({ className: "bunny-px-4 bunny-m-0", level: 2 }, { children: "Signup" })), jsx(InitialSignupForm, { className: "bunny-px-4", onSubmit: handleSubmit, submitting: proceedingToPayment, defaultValues: defaultValues })] })) }));
|
|
20504
20522
|
}
|
|
20505
20523
|
function InitialSignupForm(_a) {
|
|
20506
|
-
var className = _a.className, onSubmit = _a.onSubmit, submitting = _a.submitting;
|
|
20524
|
+
var className = _a.className, onSubmit = _a.onSubmit, submitting = _a.submitting, defaultValues = _a.defaultValues;
|
|
20507
20525
|
var form = Form.useForm()[0];
|
|
20508
20526
|
var isMobile = useIsMobile();
|
|
20509
20527
|
function handleSubmit() {
|
|
@@ -20511,6 +20529,22 @@ function InitialSignupForm(_a) {
|
|
|
20511
20529
|
onSubmit(form.getFieldsValue());
|
|
20512
20530
|
});
|
|
20513
20531
|
}
|
|
20532
|
+
useEffect(function () {
|
|
20533
|
+
if (defaultValues) {
|
|
20534
|
+
// Set all non empty default values
|
|
20535
|
+
form.setFieldsValue(Object.fromEntries(Object.entries(__assign(__assign({}, defaultValues), { billingCountry: undefined })).filter(function (_a) {
|
|
20536
|
+
var v = _a[0]; _a[1];
|
|
20537
|
+
return v;
|
|
20538
|
+
})));
|
|
20539
|
+
// Set billing country if it's in the country list
|
|
20540
|
+
if (defaultValues.billingCountry &&
|
|
20541
|
+
Lists.COUNTRY_LIST.find(function (c) { return c.value === defaultValues.billingCountry; })) {
|
|
20542
|
+
form.setFieldsValue({
|
|
20543
|
+
billingCountry: defaultValues.billingCountry,
|
|
20544
|
+
});
|
|
20545
|
+
}
|
|
20546
|
+
}
|
|
20547
|
+
}, [defaultValues]);
|
|
20514
20548
|
return (jsx(Form, __assign({ className: "bunny-flex bunny-flex-col bunny-h-full bunny-w-full ".concat(className), form: form, layout: "vertical", autoComplete: "off" }, { children: jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-space-y-2" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-gap-4" }, { children: [jsx(Form.Item, __assign({ name: "firstName", rules: [{ required: true, message: 'First name is required' }], className: "bunny-flex-1" }, { children: jsx(Input, { placeholder: "First name" }) })), jsx(Form.Item, __assign({ name: "lastName", rules: [{ required: true, message: 'Last name is required' }], className: "bunny-flex-1" }, { children: jsx(Input, { placeholder: "Last name" }) }))] })), jsxs("div", __assign({ className: "bunny-flex bunny-gap-4" }, { children: [jsx(Form.Item, __assign({ name: "email", rules: [
|
|
20515
20549
|
{ required: true, message: 'Email is required' },
|
|
20516
20550
|
{ type: 'email', message: 'Please enter a valid email' },
|
|
@@ -20539,7 +20573,7 @@ var showErrorNotification = useErrorNotification();
|
|
|
20539
20573
|
var showSuccessNotification$1 = useSuccessNotification();
|
|
20540
20574
|
function Signup(_a) {
|
|
20541
20575
|
var _b, _c, _d;
|
|
20542
|
-
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, couponCode = _a.couponCode, className = _a.className, _e = _a.shadow, shadow = _e === void 0 ? 'shadow-md' : _e, style = _a.style;
|
|
20576
|
+
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, couponCode = _a.couponCode, className = _a.className, _e = _a.shadow, shadow = _e === void 0 ? 'shadow-md' : _e, style = _a.style, defaultFirstName = _a.defaultFirstName, defaultLastName = _a.defaultLastName, defaultEmail = _a.defaultEmail, defaultCompanyName = _a.defaultCompanyName, defaultBillingCountry = _a.defaultBillingCountry;
|
|
20543
20577
|
// Hooks
|
|
20544
20578
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
20545
20579
|
var tokenFromContexts = useToken();
|
|
@@ -20639,16 +20673,18 @@ function Signup(_a) {
|
|
|
20639
20673
|
enabled: !!(initialQuote === null || initialQuote === void 0 ? void 0 : initialQuote.id),
|
|
20640
20674
|
}), data = _o.data, isLoadingQuote = _o.isLoading;
|
|
20641
20675
|
var quote = data || initialQuote;
|
|
20676
|
+
var quoteChangeId = (_d = (_b = quote === null || quote === void 0 ? void 0 : quote.quoteChanges) === null || _b === void 0 ? void 0 : _b[((_c = quote === null || quote === void 0 ? void 0 : quote.quoteChanges) === null || _c === void 0 ? void 0 : _c.length) - 1]) === null || _d === void 0 ? void 0 : _d.id;
|
|
20642
20677
|
var _p = useUpdateCoupons({
|
|
20643
20678
|
apiHost: apiHost,
|
|
20644
20679
|
token: token,
|
|
20645
|
-
quoteChangeId:
|
|
20680
|
+
quoteChangeId: quoteChangeId,
|
|
20646
20681
|
onCouponAdded: function () {
|
|
20647
20682
|
queryClient.invalidateQueries({
|
|
20648
20683
|
queryKey: ['quote', quote === null || quote === void 0 ? void 0 : quote.id],
|
|
20649
20684
|
});
|
|
20650
20685
|
showSuccessNotification$1('Coupon applied');
|
|
20651
20686
|
recalculateTaxes();
|
|
20687
|
+
setCouponEditorCouponCode('');
|
|
20652
20688
|
},
|
|
20653
20689
|
onCouponRemoved: function () {
|
|
20654
20690
|
queryClient.invalidateQueries({
|
|
@@ -20660,11 +20696,11 @@ function Signup(_a) {
|
|
|
20660
20696
|
}), addCoupon = _p.addCoupon, removeCoupon = _p.removeCoupon, isAddingCoupon = _p.isAddingCoupon, isRemovingCoupon = _p.isRemovingCoupon, activeCouponsExist = _p.activeCouponsExist;
|
|
20661
20697
|
// Handle default coupon application
|
|
20662
20698
|
useEffect(function () {
|
|
20663
|
-
if (couponCode &&
|
|
20699
|
+
if (couponCode && quoteChangeId && defaultCouponAppliedRef.current !== couponCode) {
|
|
20664
20700
|
addCoupon(couponCode);
|
|
20665
20701
|
defaultCouponAppliedRef.current = couponCode;
|
|
20666
20702
|
}
|
|
20667
|
-
}, [couponCode,
|
|
20703
|
+
}, [couponCode, quoteChangeId]);
|
|
20668
20704
|
function handleSubmit(formData) {
|
|
20669
20705
|
return __awaiter(this, void 0, void 0, function () {
|
|
20670
20706
|
return __generator(this, function (_a) {
|
|
@@ -20726,7 +20762,13 @@ function Signup(_a) {
|
|
|
20726
20762
|
}
|
|
20727
20763
|
return (jsxs("div", __assign({ className: "bunny-flex ".concat(isMobile ? 'bunny-flex-col' : 'bunny-flex-row', " bunny-h-screen bunny-w-screen bunny-absolute bunny-top-0 bunny-left-0 ").concat(shadow, " ").concat(className), style: style }, { children: [jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-flex-col ".concat(isMobile ? 'bunny-w-full bunny-h-1/2' : 'bunny-w-1/2 bunny-h-full', " bunny-justify-center") }, { children: jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-start bunny-justify-between bunny-w-3/5 bunny-h-full bunny-gap-4 bunny-my-24" }, { children: [jsx("div", { children: topNavImageUrl.length > 0 && (jsx(Image, { width: 24, src: topNavImageUrl, alt: "Logo", preview: false })) }), data ? (jsx(CheckoutSummary, { quote: data, className: "bunny-h-full bunny-w-full", onAddCoupon: addCoupon, onRemoveCoupon: removeCoupon, isRemovingCoupon: isRemovingCoupon, priceListData: priceListData, isAddingCoupon: isAddingCoupon, couponCode: couponEditorCouponCode, setCouponCode: setCouponEditorCouponCode, activeCouponsExist: activeCouponsExist })) : (jsx("div", __assign({ className: "bunny-h-full" }, { children: isLoadingPriceList ? (jsx(Skeleton, { active: true })) : (jsx(PriceListDisplay, { priceListData: priceListData })) }))), jsx(Footer, {})] })) })), jsx("div", __assign({ className: "bunny-flex bunny-flex-col ".concat(isMobile ? 'bunny-w-full bunny-h-1/2 bunny-overflow-auto' : 'bunny-w-1/2 bunny-h-full', " bunny-items-center"), style: {
|
|
20728
20764
|
boxShadow: '-5px 0 20px 0 rgba(0, 0, 0, 0.05)',
|
|
20729
|
-
} }, { children: isLoadingPriceList ? (jsx(Skeleton, { active: true, className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" })) : (jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" }, { children: jsx(PaymentForms, { quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: isSigningUp || isLoadingQuote, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction
|
|
20765
|
+
} }, { children: isLoadingPriceList ? (jsx(Skeleton, { active: true, className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" })) : (jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-w-3/5 bunny-mt-24" }, { children: jsx(PaymentForms, { quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: isSigningUp || isLoadingQuote, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction, defaultValues: {
|
|
20766
|
+
firstName: defaultFirstName,
|
|
20767
|
+
lastName: defaultLastName,
|
|
20768
|
+
email: defaultEmail,
|
|
20769
|
+
accountName: defaultCompanyName,
|
|
20770
|
+
billingCountry: defaultBillingCountry,
|
|
20771
|
+
} }) }))) }))] })));
|
|
20730
20772
|
}
|
|
20731
20773
|
|
|
20732
20774
|
var useQuoteSubscriptionUpgrade = function () {
|
|
@@ -20788,7 +20830,7 @@ var useQuoteDelete = function () {
|
|
|
20788
20830
|
}); };
|
|
20789
20831
|
};
|
|
20790
20832
|
|
|
20791
|
-
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isAmendment\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
20833
|
+
var SUBSCRIPTIONS_QUERY = "\nquery subscriptions {\n subscriptions {\n nodes {\n cancellationDate\n currencyId\n endDate\n evergreen\n id\n period\n plan { id name selfServiceBuy selfServiceCancel selfServiceRenew }\n priceList { id periodMonths }\n product { id name showProductNameOnLineItem }\n startDate\n state\n trialEndDate\n trialPeriod\n trialStartDate\n daysLeftInTrial\n charges {\n priceListCharge {\n priceListChargeTiers {\n price\n starts\n }\n featureAddon\n id\n }\n amount\n billingPeriod\n chargeType\n discount\n discountedPrice\n endDate\n expired\n feature { name }\n id\n isAmendment\n isRamp\n kind\n name\n periodPrice\n price\n priceDecimals\n priceListChargeId\n priceTiers { starts price }\n pricingModel\n quantity\n selfServiceQuantity\n startDate\n trial\n }\n }\n }\n }";
|
|
20792
20834
|
var getSubscriptions = function (_a) {
|
|
20793
20835
|
var apiHost = _a.apiHost, isInPreviewMode = _a.isInPreviewMode, token = _a.token;
|
|
20794
20836
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -21063,7 +21105,6 @@ var Checkout = function (_a) {
|
|
|
21063
21105
|
priceListId: selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id,
|
|
21064
21106
|
token: token,
|
|
21065
21107
|
});
|
|
21066
|
-
console.log('recalculateTaxes - updatedQuote', updatedQuote);
|
|
21067
21108
|
queryClient.setQueryData(quoteKey, updatedQuote);
|
|
21068
21109
|
queryClient.setQueryData(calculatedPricesKey, updatedQuote);
|
|
21069
21110
|
}
|
|
@@ -21111,6 +21152,20 @@ var Checkout = function (_a) {
|
|
|
21111
21152
|
}, onPaymentSuccess: onSuccess }))] })), jsx(Footer, { className: "bunny-pl-12" })] })) })));
|
|
21112
21153
|
};
|
|
21113
21154
|
|
|
21155
|
+
var QuotePreviewContext = createContext({});
|
|
21156
|
+
function QuotePreviewProvider(_a) {
|
|
21157
|
+
var children = _a.children;
|
|
21158
|
+
var _b = useState(), quotePreviewData = _b[0], setQuotePreviewData = _b[1];
|
|
21159
|
+
function handleSetEditingQuote(editingQuoteId) {
|
|
21160
|
+
setQuotePreviewData(__assign(__assign({}, quotePreviewData), { editingQuoteId: editingQuoteId }));
|
|
21161
|
+
}
|
|
21162
|
+
return (jsx(QuotePreviewContext.Provider, __assign({ value: {
|
|
21163
|
+
quotePreviewData: quotePreviewData,
|
|
21164
|
+
setQuotePreviewData: setQuotePreviewData,
|
|
21165
|
+
handleSetEditingQuote: handleSetEditingQuote,
|
|
21166
|
+
} }, { children: children })));
|
|
21167
|
+
}
|
|
21168
|
+
|
|
21114
21169
|
var PageTitle = function (_a) {
|
|
21115
21170
|
var onGoBack = _a.onGoBack, title = _a.title;
|
|
21116
21171
|
var isMobile = useIsMobile();
|
|
@@ -21221,8 +21276,8 @@ var billingPeriodConverter = function (period) {
|
|
|
21221
21276
|
var removeHTMLTagsRegex = /<br>(?=(?:\s*<[^>]*>)*$)|(<br>)|<[^>]*>/gi;
|
|
21222
21277
|
// Description is a string that can contain HTML tags. We want to remove all HTML tags except <br> tags.
|
|
21223
21278
|
var createPlanDescription = function (priceList) {
|
|
21224
|
-
return (priceList.plan.description ||
|
|
21225
|
-
return y ?
|
|
21279
|
+
return (priceList.plan.description || '').replace(removeHTMLTagsRegex, function (x, y) {
|
|
21280
|
+
return y ? ' & ' : '';
|
|
21226
21281
|
});
|
|
21227
21282
|
};
|
|
21228
21283
|
var getActivePlanPriceData = function (priceList, selectedPriceList) {
|
|
@@ -21263,8 +21318,7 @@ var getActivePlanPriceData = function (priceList, selectedPriceList) {
|
|
|
21263
21318
|
};
|
|
21264
21319
|
};
|
|
21265
21320
|
var isPriceListDisabled = function (_a) {
|
|
21266
|
-
var priceList = _a.priceList, subscriptions = _a.subscriptions, upgradingSubscription = _a.upgradingSubscription;
|
|
21267
|
-
var disableOnClick = false;
|
|
21321
|
+
var priceList = _a.priceList, subscriptions = _a.subscriptions, upgradingSubscription = _a.upgradingSubscription, canPurchaseFeatureAddons = _a.canPurchaseFeatureAddons;
|
|
21268
21322
|
// Plan already has a subscription
|
|
21269
21323
|
var subscriptionPlan = subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.find(function (subscription) {
|
|
21270
21324
|
var _a, _b;
|
|
@@ -21272,13 +21326,15 @@ var isPriceListDisabled = function (_a) {
|
|
|
21272
21326
|
((_a = subscription.state) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== SubscriptionState$2.CANCELED &&
|
|
21273
21327
|
((_b = subscription.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== SubscriptionState$2.EXPIRED;
|
|
21274
21328
|
});
|
|
21275
|
-
var isPriceListCurrentSubscription = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList.id) === priceList.id;
|
|
21276
21329
|
// Is this plan the one that the user is upgrading from
|
|
21277
21330
|
var isUpgradingPlan = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.plan.id) === priceList.plan.id;
|
|
21278
|
-
if (
|
|
21279
|
-
|
|
21331
|
+
if (subscriptionPlan && !isUpgradingPlan) {
|
|
21332
|
+
return true;
|
|
21280
21333
|
}
|
|
21281
|
-
|
|
21334
|
+
if (isUpgradingPlan && !canPurchaseFeatureAddons) {
|
|
21335
|
+
return true;
|
|
21336
|
+
}
|
|
21337
|
+
return false;
|
|
21282
21338
|
};
|
|
21283
21339
|
|
|
21284
21340
|
var CheckoutButton = function (_a) {
|
|
@@ -21301,9 +21357,10 @@ var CheckoutPrice = function (_a) {
|
|
|
21301
21357
|
|
|
21302
21358
|
var CheckoutBarSummarySection = function (_a) {
|
|
21303
21359
|
var _b;
|
|
21304
|
-
var open = _a.open, quote = _a.quote, selectedPriceList = _a.selectedPriceList, onClickCheckout = _a.onClickCheckout, upgradingSubscription = _a.upgradingSubscription
|
|
21360
|
+
var open = _a.open, quote = _a.quote, selectedPriceList = _a.selectedPriceList, onClickCheckout = _a.onClickCheckout, upgradingSubscription = _a.upgradingSubscription;
|
|
21305
21361
|
// Context
|
|
21306
21362
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
21363
|
+
var quotePreviewData = useContext(QuotePreviewContext).quotePreviewData;
|
|
21307
21364
|
// Hooks
|
|
21308
21365
|
var token = useToken();
|
|
21309
21366
|
var paymentPlugins = usePaymentPlugins({
|
|
@@ -21319,12 +21376,14 @@ var CheckoutBarSummarySection = function (_a) {
|
|
|
21319
21376
|
token: token,
|
|
21320
21377
|
}),
|
|
21321
21378
|
});
|
|
21322
|
-
var
|
|
21379
|
+
var isUpgradingCurrentSubscription = selectedPriceList.id === (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList.id);
|
|
21380
|
+
var disableCheckoutButton = Boolean(!(quotePreviewData === null || quotePreviewData === void 0 ? void 0 : quotePreviewData.quantity) ||
|
|
21323
21381
|
!selectedPriceList ||
|
|
21324
21382
|
// quantityLocal !== quotePreviewData.quantity ||
|
|
21325
21383
|
isFetching ||
|
|
21326
|
-
|
|
21384
|
+
isUpgradingCurrentSubscription ||
|
|
21327
21385
|
open);
|
|
21386
|
+
var checkoutButtonDisabled = (quote === null || quote === void 0 ? void 0 : quote.amountDue) && (quote === null || quote === void 0 ? void 0 : quote.amountDue) > 0 ? false : disableCheckoutButton;
|
|
21328
21387
|
var activeCharge = (_b = getActivePlanPriceData(selectedPriceList, selectedPriceList)) === null || _b === void 0 ? void 0 : _b.activeCharge;
|
|
21329
21388
|
var isUsage = (activeCharge === null || activeCharge === void 0 ? void 0 : activeCharge.chargeType) === ChargeType.USAGE;
|
|
21330
21389
|
var hasPaymentMethodsOrIsFree = Boolean(paymentPlugins === null || paymentPlugins === void 0 ? void 0 : paymentPlugins.length) || Boolean(quote && getQuoteAmountDue(quote) === 0);
|
|
@@ -21334,7 +21393,7 @@ var CheckoutBarSummarySection = function (_a) {
|
|
|
21334
21393
|
var PlanPickerCheckoutBarWrapper = function (_a) {
|
|
21335
21394
|
var editingQuote = _a.editingQuote, setEditingQuoteData = _a.setEditingQuoteData, handlePortalErrors = _a.handlePortalErrors, onCheckoutSuccess = _a.onCheckoutSuccess;
|
|
21336
21395
|
// Context
|
|
21337
|
-
var quotePreviewData = useContext(
|
|
21396
|
+
var quotePreviewData = useContext(QuotePreviewContext).quotePreviewData;
|
|
21338
21397
|
var selectedPriceList = quotePreviewData === null || quotePreviewData === void 0 ? void 0 : quotePreviewData.priceList;
|
|
21339
21398
|
if (!selectedPriceList)
|
|
21340
21399
|
return null;
|
|
@@ -21344,10 +21403,11 @@ var PlanPickerCheckoutBar = function (_a) {
|
|
|
21344
21403
|
var editingQuote = _a.editingQuote, setEditingQuoteData = _a.setEditingQuoteData, selectedPriceList = _a.selectedPriceList, handlePortalErrors = _a.handlePortalErrors, onCheckoutSuccess = _a.onCheckoutSuccess;
|
|
21345
21404
|
// Context
|
|
21346
21405
|
var token = useToken();
|
|
21347
|
-
var _b = useContext(SubscriptionsContext),
|
|
21406
|
+
var _b = useContext(SubscriptionsContext), upgradingSubscription = _b.upgradingSubscription, shadow = _b.shadow;
|
|
21407
|
+
var _c = useContext(QuotePreviewContext), quotePreviewData = _c.quotePreviewData, handleSetEditingQuote = _c.handleSetEditingQuote;
|
|
21348
21408
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
21349
21409
|
// Local state
|
|
21350
|
-
var
|
|
21410
|
+
var _d = useState(false), payModalVisible = _d[0], setPayModalVisible = _d[1];
|
|
21351
21411
|
// Hooks
|
|
21352
21412
|
var showSuccessNotification = useSuccessNotification();
|
|
21353
21413
|
var queryClient = useQueryClient();
|
|
@@ -21356,17 +21416,31 @@ var PlanPickerCheckoutBar = function (_a) {
|
|
|
21356
21416
|
token: token,
|
|
21357
21417
|
apiHost: apiHost,
|
|
21358
21418
|
}).defaultPaymentMethod;
|
|
21359
|
-
var
|
|
21419
|
+
var createSubscriptionUpgradeQuote = useQuoteSubscriptionUpgrade();
|
|
21420
|
+
var createSubscriptionUpdateQuote = useCreateSubscriptionQuote();
|
|
21360
21421
|
// Mutations
|
|
21361
21422
|
var createQuote = useMutation({
|
|
21362
21423
|
mutationFn: function (_a) {
|
|
21363
21424
|
var subscriptionId = _a.subscriptionId, priceListId = _a.priceListId;
|
|
21364
|
-
return
|
|
21425
|
+
return createSubscriptionUpgradeQuote(subscriptionId, priceListId, apiHost, token);
|
|
21365
21426
|
},
|
|
21366
21427
|
onSuccess: function (subscriptionUpdateData) {
|
|
21367
21428
|
var _a;
|
|
21368
21429
|
var quote = (_a = subscriptionUpdateData === null || subscriptionUpdateData === void 0 ? void 0 : subscriptionUpdateData.quoteSubscriptionUpgrade) === null || _a === void 0 ? void 0 : _a.quote;
|
|
21369
21430
|
setEditingQuoteData === null || setEditingQuoteData === void 0 ? void 0 : setEditingQuoteData(quote.id);
|
|
21431
|
+
handleSetEditingQuote(quote.id);
|
|
21432
|
+
},
|
|
21433
|
+
});
|
|
21434
|
+
var createEmptyQuote = useMutation({
|
|
21435
|
+
mutationFn: function (_a) {
|
|
21436
|
+
var subscriptionId = _a.subscriptionId;
|
|
21437
|
+
return createSubscriptionUpdateQuote([subscriptionId], apiHost, token);
|
|
21438
|
+
},
|
|
21439
|
+
onSuccess: function (subscriptionUpdateData) {
|
|
21440
|
+
var _a;
|
|
21441
|
+
var quote = (_a = subscriptionUpdateData === null || subscriptionUpdateData === void 0 ? void 0 : subscriptionUpdateData.quoteSubscriptionUpdate) === null || _a === void 0 ? void 0 : _a.quote;
|
|
21442
|
+
setEditingQuoteData === null || setEditingQuoteData === void 0 ? void 0 : setEditingQuoteData(quote.id);
|
|
21443
|
+
handleSetEditingQuote(quote.id);
|
|
21370
21444
|
},
|
|
21371
21445
|
});
|
|
21372
21446
|
var updateCharge = useMutation({
|
|
@@ -21414,10 +21488,18 @@ var PlanPickerCheckoutBar = function (_a) {
|
|
|
21414
21488
|
console.error('upgradingSubscription is undefined');
|
|
21415
21489
|
return;
|
|
21416
21490
|
}
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21491
|
+
var upgradingCurrentSubscription = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList.id) === (selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id);
|
|
21492
|
+
if (upgradingCurrentSubscription) {
|
|
21493
|
+
createEmptyQuote.mutate({
|
|
21494
|
+
subscriptionId: upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.id,
|
|
21495
|
+
});
|
|
21496
|
+
}
|
|
21497
|
+
else {
|
|
21498
|
+
createQuote.mutate({
|
|
21499
|
+
subscriptionId: upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.id,
|
|
21500
|
+
priceListId: selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id,
|
|
21501
|
+
});
|
|
21502
|
+
}
|
|
21421
21503
|
}, [selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id, upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.id]);
|
|
21422
21504
|
// Reset query key on unmount
|
|
21423
21505
|
useEffect(function () {
|
|
@@ -21482,11 +21564,11 @@ var PlanPickerCheckoutBar = function (_a) {
|
|
|
21482
21564
|
return (jsx(CheckoutBarInput, { disabled: !chargeQuantity, charge: charge, quantity: chargeQuantity !== null && chargeQuantity !== void 0 ? chargeQuantity : 0, selectedPriceList: selectedPriceList, onQuantityChanged: function (quantity) {
|
|
21483
21565
|
onChangeQuantity(charge.id, quantity);
|
|
21484
21566
|
} }, index));
|
|
21485
|
-
}) })), jsx(CheckoutBarSummarySection, { onClickCheckout: function () { return setPayModalVisible(true); }, open: payModalVisible, quote: quote, selectedPriceList: selectedPriceList, upgradingSubscription: upgradingSubscription
|
|
21567
|
+
}) })), jsx(CheckoutBarSummarySection, { onClickCheckout: function () { return setPayModalVisible(true); }, open: payModalVisible, quote: quote, selectedPriceList: selectedPriceList, upgradingSubscription: upgradingSubscription }), jsx(Checkout, { onCancel: function () { return setPayModalVisible(false); }, onFail: onCheckoutFail, onSuccess: handleCheckoutSuccess, open: payModalVisible, quote: quote, selectedPriceList: selectedPriceList, storedPaymentMethod: defaultPaymentMethod, token: token })] })));
|
|
21486
21568
|
};
|
|
21487
21569
|
|
|
21488
21570
|
// WARNING: There is a preview button on APP that will need to be changed if this query is changed
|
|
21489
|
-
var PRICE_LIST_CHANGE_OPTIONS_QUERY = "\n query priceListChangeOptions($subscriptionId: ID, $productId: ID) {\n priceListChangeOptions(subscriptionId: $subscriptionId, productId: $productId) {\n products {\n everythingInPlus\n id\n name\n plansToDisplay\n features(sort: \"position asc\") {\n description\n id\n isVisible\n kind\n name\n position\n }\n }\n priceLists {\n showPriceAsMonthly\n basePrice\n currencyId\n id\n monthlyBasePrice\n periodMonths\n plan {\n code\n contactUsLabel\n contactUsUrl\n description\n id\n name\n position\n pricingDescription\n pricingStyle\n planFeatures {\n featureId\n value\n feature {\n name\n }\n }\n }\n product {\n id\n }\n charges {\n basePrice\n billingPeriod\n chargeType\n id\n name\n priceDecimals\n pricingModel\n quantityMax\n quantityMin\n selfServiceQuantity\n feature {\n name\n unitName\n }\n }\n }\n }\n }";
|
|
21571
|
+
var PRICE_LIST_CHANGE_OPTIONS_QUERY = "\n query priceListChangeOptions($subscriptionId: ID, $productId: ID) {\n priceListChangeOptions(subscriptionId: $subscriptionId, productId: $productId) {\n products {\n everythingInPlus\n id\n name\n plansToDisplay\n features(sort: \"position asc\") {\n description\n id\n isVisible\n kind\n name\n position\n }\n }\n priceLists {\n showPriceAsMonthly\n basePrice\n currencyId\n id\n monthlyBasePrice\n periodMonths\n plan {\n code\n contactUsLabel\n contactUsUrl\n description\n id\n name\n position\n pricingDescription\n pricingStyle\n planFeatures {\n featureId\n value\n feature {\n name\n }\n }\n }\n product {\n id\n }\n charges {\n featureAddon\n basePrice\n billingPeriod\n chargeType\n id\n name\n priceDecimals\n pricingModel\n quantityMax\n quantityMin\n selfServiceQuantity\n priceList {\n id\n }\n feature {\n name\n unitName\n }\n }\n }\n }\n }";
|
|
21490
21572
|
var getPriceListChangeOptions = function (_a) {
|
|
21491
21573
|
var apiHost = _a.apiHost, isInPreviewMode = _a.isInPreviewMode, productId = _a.productId, token = _a.token, upgradingSubscription = _a.upgradingSubscription;
|
|
21492
21574
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -21551,6 +21633,21 @@ var calculateNewQuantity = function (priceList, currentQuantity) {
|
|
|
21551
21633
|
}
|
|
21552
21634
|
};
|
|
21553
21635
|
|
|
21636
|
+
function isAddonPurchased(featureAddon, currentSubscription) {
|
|
21637
|
+
var purchasedFeatureAddons = currentSubscription === null || currentSubscription === void 0 ? void 0 : currentSubscription.charges.filter(function (charge) { var _a; return (_a = charge.priceListCharge) === null || _a === void 0 ? void 0 : _a.featureAddon; });
|
|
21638
|
+
if (!purchasedFeatureAddons)
|
|
21639
|
+
return false;
|
|
21640
|
+
return purchasedFeatureAddons.some(function (addon) { var _a; return ((_a = addon.priceListCharge) === null || _a === void 0 ? void 0 : _a.id) === featureAddon.id; });
|
|
21641
|
+
}
|
|
21642
|
+
function priceListHasUnpurchasedFeatureAddons(priceList, currentSubscription) {
|
|
21643
|
+
var featureAddons = priceList.charges.filter(function (charge) { return charge.featureAddon; });
|
|
21644
|
+
var purchasedFeatureAddons = currentSubscription === null || currentSubscription === void 0 ? void 0 : currentSubscription.charges.filter(function (charge) { var _a; return (_a = charge.priceListCharge) === null || _a === void 0 ? void 0 : _a.featureAddon; });
|
|
21645
|
+
var unpurchasedFeatureAddons = featureAddons.filter(function (charge) {
|
|
21646
|
+
return !(purchasedFeatureAddons === null || purchasedFeatureAddons === void 0 ? void 0 : purchasedFeatureAddons.some(function (purchasedCharge) { var _a; return ((_a = purchasedCharge.priceListCharge) === null || _a === void 0 ? void 0 : _a.id) === charge.id; }));
|
|
21647
|
+
});
|
|
21648
|
+
return unpurchasedFeatureAddons.length > 0;
|
|
21649
|
+
}
|
|
21650
|
+
|
|
21554
21651
|
var BillingPeriodSelector = function (_a) {
|
|
21555
21652
|
var availableBillingPeriods = _a.availableBillingPeriods, onChangeBillingPeriod = _a.onChangeBillingPeriod, products = _a.products, selectedBillingPeriod = _a.selectedBillingPeriod, selectedProduct = _a.selectedProduct, onChangeProduct = _a.onChangeProduct;
|
|
21556
21653
|
var _b = useContext(BrandContext), secondaryColor = _b.secondaryColor, brandColor = _b.brandColor;
|
|
@@ -21578,12 +21675,75 @@ var StyledRadioGroup = styled.div(templateObject_2 || (templateObject_2 = __make
|
|
|
21578
21675
|
});
|
|
21579
21676
|
var templateObject_1$4, templateObject_2;
|
|
21580
21677
|
|
|
21581
|
-
var
|
|
21582
|
-
var
|
|
21583
|
-
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
|
|
21678
|
+
var NextPriceListButton = function (_a) {
|
|
21679
|
+
var availablePriceLists = _a.availablePriceLists, priceListStart = _a.priceListStart, setPriceListStart = _a.setPriceListStart, numberOfPlansToDisplay = _a.numberOfPlansToDisplay;
|
|
21680
|
+
return (jsxs("div", __assign({ className: "bunny-absolute bunny-flex bunny-gap-1", style: { top: '12px', right: '8px' } }, { children: [priceListStart > 0 && (jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-center bunny-rounded-full bunny-shadow bunny-p-1 bunny-cursor-pointer", onClick: function () {
|
|
21681
|
+
setPriceListStart(function (prev) {
|
|
21682
|
+
var newValue = prev - 1;
|
|
21683
|
+
if (newValue < 0) {
|
|
21684
|
+
return prev;
|
|
21685
|
+
}
|
|
21686
|
+
return newValue;
|
|
21687
|
+
});
|
|
21688
|
+
}, style: { width: '22px', height: '22px' } }, { children: jsx(FontAwesomeIcon, { icon: faChevronLeft }) }))), priceListStart < availablePriceLists.length - numberOfPlansToDisplay && (jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-center bunny-rounded-full bunny-shadow bunny-p-1 bunny-cursor-pointer", onClick: function () {
|
|
21689
|
+
return setPriceListStart(function (prev) {
|
|
21690
|
+
var newValue = prev + 1;
|
|
21691
|
+
if (newValue >= availablePriceLists.length) {
|
|
21692
|
+
return prev;
|
|
21693
|
+
}
|
|
21694
|
+
return newValue;
|
|
21695
|
+
});
|
|
21696
|
+
}, style: { width: '22px', height: '22px' } }, { children: jsx(FontAwesomeIcon, { icon: faChevronRight }) })))] })));
|
|
21697
|
+
};
|
|
21698
|
+
|
|
21699
|
+
var getAvailablePlansAndPriceLists = function (_a) {
|
|
21700
|
+
var availablePriceLists = _a.availablePriceLists, priceListChangeOptions = _a.priceListChangeOptions, priceListStart = _a.priceListStart, plansToDisplay = _a.plansToDisplay;
|
|
21701
|
+
var displayPriceLists = availablePriceLists.slice(priceListStart, priceListStart + plansToDisplay);
|
|
21702
|
+
var availablePriceListsArray = displayPriceLists === null || displayPriceLists === void 0 ? void 0 : displayPriceLists.map(function (displayPriceList) {
|
|
21703
|
+
var _a;
|
|
21704
|
+
var foundPriceList = (_a = priceListChangeOptions === null || priceListChangeOptions === void 0 ? void 0 : priceListChangeOptions.priceLists) === null || _a === void 0 ? void 0 : _a.find(function (priceList) { return priceList.plan.id === displayPriceList.plan.id; });
|
|
21705
|
+
return foundPriceList;
|
|
21706
|
+
});
|
|
21707
|
+
return {
|
|
21708
|
+
availablePriceListsArray: availablePriceListsArray,
|
|
21709
|
+
displayPriceLists: displayPriceLists,
|
|
21710
|
+
};
|
|
21711
|
+
};
|
|
21712
|
+
var everythingInPlusString = function (_a) {
|
|
21713
|
+
var priceList = _a.priceList;
|
|
21714
|
+
return "Everything in ".concat(priceList.plan.name, ", plus");
|
|
21715
|
+
};
|
|
21716
|
+
|
|
21717
|
+
var PriceListCardButton = function (_a) {
|
|
21718
|
+
var disableOnClick = _a.disableOnClick, isPriceListCurrentSubscription = _a.isPriceListCurrentSubscription, isSelected = _a.isSelected, priceList = _a.priceList, subscriptionPlan = _a.subscriptionPlan;
|
|
21719
|
+
// Context
|
|
21720
|
+
var upgradingSubscription = useContext(SubscriptionsContext).upgradingSubscription;
|
|
21721
|
+
var showBuyAddonsButton = isPriceListCurrentSubscription &&
|
|
21722
|
+
subscriptionPlan &&
|
|
21723
|
+
priceListHasUnpurchasedFeatureAddons(priceList, upgradingSubscription);
|
|
21724
|
+
var isPriceListNonSubscribedCurrentPlan = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.plan.id) === priceList.plan.id && !isPriceListCurrentSubscription;
|
|
21725
|
+
var createButtonText = function () {
|
|
21726
|
+
if (isPriceListCurrentSubscription)
|
|
21727
|
+
return 'Current';
|
|
21728
|
+
if (isSelected)
|
|
21729
|
+
return 'Selected';
|
|
21730
|
+
if (subscriptionPlan && !isPriceListNonSubscribedCurrentPlan)
|
|
21731
|
+
return 'Subscribed';
|
|
21732
|
+
if (priceList.plan.pricingStyle === PricingStyle.CONTACT_US)
|
|
21733
|
+
return priceList.plan.contactUsLabel;
|
|
21734
|
+
return 'Select';
|
|
21735
|
+
};
|
|
21736
|
+
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-grow bunny-w-full bunny-justify-end bunny-gap-3" }, { children: [showBuyAddonsButton && (jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-w-full" }, { children: jsx(Button, __assign({ className: "bunny-w-full", disabled: disableOnClick, style: {
|
|
21737
|
+
maxWidth: '240px',
|
|
21738
|
+
}, type: isSelected ? 'primary' : 'default' }, { children: "Buy addons" })) }))), jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-w-full" }, { children: jsx(Button, __assign({ className: "bunny-w-full", disabled: disableOnClick || showBuyAddonsButton, style: {
|
|
21739
|
+
maxWidth: '240px',
|
|
21740
|
+
}, type: isSelected ? 'primary' : 'default' }, { children: createButtonText() })) }))] })));
|
|
21741
|
+
};
|
|
21742
|
+
|
|
21743
|
+
var Text$c = Typography.Text;
|
|
21744
|
+
var PriceListCardDescription = function (_a) {
|
|
21745
|
+
var description = _a.description;
|
|
21746
|
+
return (jsx(Text$c, __assign({ className: "bunny-text-center" }, { children: jsx(Markup, { content: description }) })));
|
|
21587
21747
|
};
|
|
21588
21748
|
|
|
21589
21749
|
var getPrice = function (priceList) {
|
|
@@ -21615,12 +21775,6 @@ var PriceListCardPrice = function (_a) {
|
|
|
21615
21775
|
: 'Free' })));
|
|
21616
21776
|
};
|
|
21617
21777
|
|
|
21618
|
-
var Text$c = Typography.Text;
|
|
21619
|
-
var PriceListCardDescription = function (_a) {
|
|
21620
|
-
var description = _a.description;
|
|
21621
|
-
return (jsx(Text$c, __assign({ className: "bunny-text-center" }, { children: jsx(Markup, { content: description }) })));
|
|
21622
|
-
};
|
|
21623
|
-
|
|
21624
21778
|
var BillingPeriodConverter;
|
|
21625
21779
|
(function (BillingPeriodConverter) {
|
|
21626
21780
|
BillingPeriodConverter["ONCE"] = "once";
|
|
@@ -21643,52 +21797,24 @@ var PriceListCardPriceDescription = function (_a) {
|
|
|
21643
21797
|
return null;
|
|
21644
21798
|
return (jsxs(Fragment, { children: [jsx(Text$b, __assign({ className: "bunny-text-center bunny-text-gray-900", style: {
|
|
21645
21799
|
fontSize: isMobile ? '13px' : '12px',
|
|
21646
|
-
} }, { children: priceList.plan.pricingDescription && !isEmptyHtml(priceList.plan.pricingDescription) ? (jsx(Markup, { content: priceList.plan.pricingDescription })) : (
|
|
21647
|
-
?
|
|
21648
|
-
:
|
|
21649
|
-
|
|
21650
|
-
:
|
|
21651
|
-
};
|
|
21652
|
-
|
|
21653
|
-
var CheckIcon = function (_a) {
|
|
21654
|
-
var backgroundColor = _a.backgroundColor, size = _a.size;
|
|
21655
|
-
return (jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-center bunny-rounded-full bunny-shrink-0", style: { width: size, height: size, backgroundColor: backgroundColor } }, { children: jsx("svg", __assign({ width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M1.5 2.99992L3.16667 4.66659L6.5 1.33325", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })) })));
|
|
21656
|
-
};
|
|
21657
|
-
|
|
21658
|
-
var PriceListCardButton = function (_a) {
|
|
21659
|
-
var disableOnClick = _a.disableOnClick, isPriceListCurrentSubscription = _a.isPriceListCurrentSubscription, isSelected = _a.isSelected, priceList = _a.priceList, subscriptionPlan = _a.subscriptionPlan;
|
|
21660
|
-
// Context
|
|
21661
|
-
var upgradingSubscription = useContext(SubscriptionsContext).upgradingSubscription;
|
|
21662
|
-
var isPriceListNonSubscribedCurrentPlan = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.plan.id) === priceList.plan.id && !isPriceListCurrentSubscription;
|
|
21663
|
-
var createButtonText = function () {
|
|
21664
|
-
if (isPriceListCurrentSubscription)
|
|
21665
|
-
return 'Current';
|
|
21666
|
-
if (isSelected)
|
|
21667
|
-
return 'Selected';
|
|
21668
|
-
if (subscriptionPlan && !isPriceListNonSubscribedCurrentPlan)
|
|
21669
|
-
return 'Subscribed';
|
|
21670
|
-
if (priceList.plan.pricingStyle === PricingStyle.CONTACT_US)
|
|
21671
|
-
return priceList.plan.contactUsLabel;
|
|
21672
|
-
return 'Select';
|
|
21673
|
-
};
|
|
21674
|
-
return (jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-grow bunny-w-full bunny-justify-end" }, { children: jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-w-full" }, { children: jsx(Button, __assign({ className: "bunny-w-full", disabled: disableOnClick, style: {
|
|
21675
|
-
maxWidth: '240px',
|
|
21676
|
-
}, type: isSelected ? 'primary' : 'default' }, { children: createButtonText() })) })) })));
|
|
21800
|
+
} }, { children: priceList.plan.pricingDescription && !isEmptyHtml(priceList.plan.pricingDescription) ? (jsx(Markup, { content: priceList.plan.pricingDescription })) : (PriceDescriptionString({
|
|
21801
|
+
unitName: feature === null || feature === void 0 ? void 0 : feature.unitName,
|
|
21802
|
+
showPriceAsMonthly: priceList.showPriceAsMonthly,
|
|
21803
|
+
periodMonths: priceList.periodMonths,
|
|
21804
|
+
doesPlanHaveFlatFeeCharges: doesPlanHaveFlatFeeCharges,
|
|
21805
|
+
})) })), priceList.periodMonths > 1 && (jsxs(Text$b, __assign({ className: "bunny-text-center bunny-text-gray-900", style: { fontSize: isMobile ? '12px' : '11px' } }, { children: ["billed ", BillingPeriodConverter$1[periodMonthsConverter(priceList.periodMonths)]] })))] }));
|
|
21677
21806
|
};
|
|
21807
|
+
function PriceDescriptionString(_a) {
|
|
21808
|
+
var unitName = _a.unitName, showPriceAsMonthly = _a.showPriceAsMonthly, periodMonths = _a.periodMonths, doesPlanHaveFlatFeeCharges = _a.doesPlanHaveFlatFeeCharges;
|
|
21809
|
+
return "per ".concat(unitName && !doesPlanHaveFlatFeeCharges ? "".concat(unitName.toLowerCase(), " / ") : '').concat(showPriceAsMonthly ? 'month' : PERIOD_LABELS[periodMonthsConverter(periodMonths)]);
|
|
21810
|
+
}
|
|
21678
21811
|
|
|
21679
|
-
var
|
|
21680
|
-
var
|
|
21681
|
-
var
|
|
21682
|
-
return (jsxs("div", __assign({ className: "bunny-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
}, style: {
|
|
21686
|
-
minWidth: '220px',
|
|
21687
|
-
borderColor: isSelected ? brandColor : SLATE_200,
|
|
21688
|
-
} }, { children: [isSelected && (jsx("div", __assign({ className: "bunny-absolute", style: {
|
|
21689
|
-
top: '10px',
|
|
21690
|
-
right: '10px',
|
|
21691
|
-
} }, { children: jsx(CheckIcon, { backgroundColor: brandColor, size: "20px" }) }))), jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-grow bunny-gap-2" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsx(PriceListCardTitle, { isPriceListCurrentSubscription: isPriceListCurrentSubscription, priceList: priceList, trialRemainingDays: trialRemainingDays }), jsx(PriceListCardDescription, { description: description })] })), jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsx(PriceListCardPrice, { priceList: priceList }), jsx(PriceListCardPriceDescription, { feature: feature, priceList: priceList })] })), jsx(PriceListCardButton, { disableOnClick: disableOnClick, isPriceListCurrentSubscription: isPriceListCurrentSubscription, isSelected: isSelected, priceList: priceList, subscriptionPlan: subscriptionPlan })] }))] })));
|
|
21812
|
+
var PriceListCardTitle = function (_a) {
|
|
21813
|
+
var priceList = _a.priceList, isPriceListCurrentSubscription = _a.isPriceListCurrentSubscription, trialRemainingDays = _a.trialRemainingDays;
|
|
21814
|
+
var isMobile = useIsMobile();
|
|
21815
|
+
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-4" }, { children: [Boolean(trialRemainingDays) && (jsx("div", __assign({ className: "bunny-font-medium bunny-text-secondary", style: { height: "1rem" } }, { children: isPriceListCurrentSubscription
|
|
21816
|
+
? "Trial ends in ".concat(trialRemainingDays, " day").concat(trialRemainingDays === 1 ? "" : "s")
|
|
21817
|
+
: " " }))), jsx("div", __assign({ className: "bunny-font-medium bunny-text-center ".concat(isMobile ? "bunny-text-slate-500" : "bunny-text-orange-600"), style: { fontSize: "20px" } }, { children: priceList.plan.name }))] })));
|
|
21692
21818
|
};
|
|
21693
21819
|
|
|
21694
21820
|
var PLAN_GRID_PADDING = 4;
|
|
@@ -21715,6 +21841,26 @@ var PriceListCardDesktop = function (_a) {
|
|
|
21715
21841
|
} }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-3" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsx(PriceListCardTitle, { isPriceListCurrentSubscription: isPriceListCurrentSubscription, priceList: priceList, trialRemainingDays: trialRemainingDays }), jsx(PriceListCardDescription, { description: description })] })), jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsx(PriceListCardPrice, { priceList: priceList }), jsx(PriceListCardPriceDescription, { feature: feature, priceList: priceList })] }))] })), jsx(PriceListCardButton, { disableOnClick: disableOnClick, isPriceListCurrentSubscription: isPriceListCurrentSubscription, isSelected: isSelected, priceList: priceList, subscriptionPlan: subscriptionPlan })] })) }));
|
|
21716
21842
|
};
|
|
21717
21843
|
|
|
21844
|
+
var CheckIcon = function (_a) {
|
|
21845
|
+
var backgroundColor = _a.backgroundColor, size = _a.size;
|
|
21846
|
+
return (jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-center bunny-rounded-full bunny-shrink-0", style: { width: size, height: size, backgroundColor: backgroundColor } }, { children: jsx("svg", __assign({ width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M1.5 2.99992L3.16667 4.66659L6.5 1.33325", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })) })));
|
|
21847
|
+
};
|
|
21848
|
+
|
|
21849
|
+
var PriceListCardMobile = function (_a) {
|
|
21850
|
+
var description = _a.description, disableOnClick = _a.disableOnClick, feature = _a.feature, isPriceListCurrentSubscription = _a.isPriceListCurrentSubscription, isSelected = _a.isSelected, onClick = _a.onClick, priceList = _a.priceList, subscriptionPlan = _a.subscriptionPlan, trialRemainingDays = _a.trialRemainingDays;
|
|
21851
|
+
var brandColor = useContext(BrandContext).brandColor;
|
|
21852
|
+
return (jsxs("div", __assign({ className: "bunny-relative bunny-flex bunny-flex-col bunny-border-2 bunny-border-solid bunny-rounded-lg bunny-p-4", onClick: function () {
|
|
21853
|
+
if (!disableOnClick)
|
|
21854
|
+
onClick(priceList);
|
|
21855
|
+
}, style: {
|
|
21856
|
+
minWidth: '220px',
|
|
21857
|
+
borderColor: isSelected ? brandColor : SLATE_200,
|
|
21858
|
+
} }, { children: [isSelected && (jsx("div", __assign({ className: "bunny-absolute", style: {
|
|
21859
|
+
top: '10px',
|
|
21860
|
+
right: '10px',
|
|
21861
|
+
} }, { children: jsx(CheckIcon, { backgroundColor: brandColor, size: "20px" }) }))), jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-grow bunny-gap-2" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsx(PriceListCardTitle, { isPriceListCurrentSubscription: isPriceListCurrentSubscription, priceList: priceList, trialRemainingDays: trialRemainingDays }), jsx(PriceListCardDescription, { description: description })] })), jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-center bunny-gap-2" }, { children: [jsx(PriceListCardPrice, { priceList: priceList }), jsx(PriceListCardPriceDescription, { feature: feature, priceList: priceList })] })), jsx(PriceListCardButton, { disableOnClick: disableOnClick, isPriceListCurrentSubscription: isPriceListCurrentSubscription, isSelected: isSelected, priceList: priceList, subscriptionPlan: subscriptionPlan })] }))] })));
|
|
21862
|
+
};
|
|
21863
|
+
|
|
21718
21864
|
var PriceListCard = function (_a) {
|
|
21719
21865
|
var _b;
|
|
21720
21866
|
var isSelected = _a.isSelected, onClick = _a.onClick, priceList = _a.priceList, subscriptions = _a.subscriptions, trialRemainingDays = _a.trialRemainingDays;
|
|
@@ -21727,10 +21873,12 @@ var PriceListCard = function (_a) {
|
|
|
21727
21873
|
var activeCharge = (_b = getActivePlanPriceData(priceList, priceList)) === null || _b === void 0 ? void 0 : _b.activeCharge;
|
|
21728
21874
|
// Is the price list the current price list for the upgradingSubscription
|
|
21729
21875
|
var isPriceListCurrentSubscription = (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList.id) === priceList.id;
|
|
21876
|
+
var canPurchaseFeatureAddons = priceListHasUnpurchasedFeatureAddons(priceList, upgradingSubscription);
|
|
21730
21877
|
var disableOnClick = isPriceListDisabled({
|
|
21731
21878
|
priceList: priceList,
|
|
21732
21879
|
subscriptions: subscriptions,
|
|
21733
21880
|
upgradingSubscription: upgradingSubscription,
|
|
21881
|
+
canPurchaseFeatureAddons: canPurchaseFeatureAddons,
|
|
21734
21882
|
});
|
|
21735
21883
|
var subscriptionPlan = subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.find(function (subscription) {
|
|
21736
21884
|
var _a, _b;
|
|
@@ -21745,67 +21893,196 @@ var PriceListCard = function (_a) {
|
|
|
21745
21893
|
return isMobile ? (jsx(PriceListCardMobile, { description: description, disableOnClick: disableOnClick, feature: feature, isPriceListCurrentSubscription: isPriceListCurrentSubscription, isSelected: isSelected, onClick: onClick, priceList: priceList, trialRemainingDays: trialRemainingDays, subscriptionPlan: subscriptionPlan })) : (jsx(PriceListCardDesktop, { description: description, disableOnClick: disableOnClick, feature: feature, isPriceListCurrentSubscription: isPriceListCurrentSubscription, isSelected: isSelected, onClick: onClick, priceList: priceList, trialRemainingDays: trialRemainingDays, subscriptionPlan: subscriptionPlan }));
|
|
21746
21894
|
};
|
|
21747
21895
|
|
|
21748
|
-
var
|
|
21749
|
-
var
|
|
21750
|
-
var
|
|
21751
|
-
|
|
21752
|
-
|
|
21753
|
-
|
|
21754
|
-
|
|
21896
|
+
var QUOTE_CHARGE_CREATE$1 = "\nmutation QuoteChargeCreate ($quoteChangeId: ID!, $startDate: ISO8601Date!, $endDate: ISO8601Date, $priceListChargeId: ID, $subscriptionChargeId: ID, $price: Float, $quantity: Int) {\n quoteChargeCreate(\n endDate: $endDate\n price: $price\n priceListChargeId: $priceListChargeId\n quantity: $quantity\n quoteChangeId: $quoteChangeId\n startDate: $startDate\n subscriptionChargeId: $subscriptionChargeId\n ) {\n quoteCharge {\n quoteChange {\n id\n quoteId\n }\n id\n }\n }\n}\n\n";
|
|
21897
|
+
var quoteChargeCreate = function (_a) {
|
|
21898
|
+
var
|
|
21899
|
+
// endDate,
|
|
21900
|
+
price = _a.price, priceListChargeId = _a.priceListChargeId, quantity = _a.quantity, quoteChangeId = _a.quoteChangeId, startDate = _a.startDate, subscriptionChargeId = _a.subscriptionChargeId, token = _a.token, apiHost = _a.apiHost;
|
|
21901
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
21902
|
+
var response;
|
|
21903
|
+
return __generator(this, function (_b) {
|
|
21904
|
+
switch (_b.label) {
|
|
21905
|
+
case 0: return [4 /*yield*/, gqlRequest({
|
|
21906
|
+
query: QUOTE_CHARGE_CREATE$1,
|
|
21907
|
+
vars: {
|
|
21908
|
+
// endDate,
|
|
21909
|
+
price: price,
|
|
21910
|
+
priceListChargeId: priceListChargeId,
|
|
21911
|
+
quantity: quantity,
|
|
21912
|
+
quoteChangeId: quoteChangeId,
|
|
21913
|
+
startDate: startDate,
|
|
21914
|
+
subscriptionChargeId: subscriptionChargeId,
|
|
21915
|
+
},
|
|
21916
|
+
apiHost: apiHost,
|
|
21917
|
+
token: token,
|
|
21918
|
+
})];
|
|
21919
|
+
case 1:
|
|
21920
|
+
response = _b.sent();
|
|
21921
|
+
if (response.errors) {
|
|
21922
|
+
throw new Error(response.errors[0].message);
|
|
21923
|
+
}
|
|
21924
|
+
return [2 /*return*/, response.quoteChargeCreate.quoteCharge];
|
|
21925
|
+
}
|
|
21926
|
+
});
|
|
21927
|
+
});
|
|
21755
21928
|
};
|
|
21756
21929
|
|
|
21757
|
-
var
|
|
21758
|
-
|
|
21759
|
-
var
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21930
|
+
var QUOTE_CHARGE_CREATE = "\nmutation QuoteChargeDelete ($quoteChargeId: ID!) {\n quoteChargeDelete(\n quoteChargeId: $quoteChargeId\n ) {\n errors\n quoteCharge {\n quoteChange {\n id\n quoteId\n }\n }\n }\n}\n\n";
|
|
21931
|
+
var quoteChargeDelete = function (_a) {
|
|
21932
|
+
var quoteChargeId = _a.quoteChargeId, token = _a.token, apiHost = _a.apiHost;
|
|
21933
|
+
return gqlRequest({
|
|
21934
|
+
query: QUOTE_CHARGE_CREATE,
|
|
21935
|
+
vars: {
|
|
21936
|
+
quoteChargeId: quoteChargeId,
|
|
21937
|
+
},
|
|
21938
|
+
apiHost: apiHost,
|
|
21939
|
+
token: token,
|
|
21764
21940
|
});
|
|
21941
|
+
};
|
|
21942
|
+
|
|
21943
|
+
var useQuoteUpdateFeatureAddon = function (quoteId, featureAddon) {
|
|
21944
|
+
var apiHost = useContext(BunnyContext).apiHost;
|
|
21945
|
+
var token = useToken();
|
|
21946
|
+
var queryClient = useQueryClient();
|
|
21947
|
+
var addedQuoteChargeId = useRef();
|
|
21948
|
+
var editingQuote = useQuery({
|
|
21949
|
+
queryKey: QueryKeyFactory.default.createObjectKey({
|
|
21950
|
+
objectName: 'editingQuote',
|
|
21951
|
+
id: quoteId,
|
|
21952
|
+
}),
|
|
21953
|
+
queryFn: function () { return (quoteId ? getQuote({ id: quoteId, token: token, apiHost: apiHost }) : undefined); },
|
|
21954
|
+
enabled: Boolean(quoteId),
|
|
21955
|
+
}).data;
|
|
21956
|
+
function handleAddFeatureAddon() {
|
|
21957
|
+
quoteChargeCreateMutation();
|
|
21958
|
+
}
|
|
21959
|
+
function handleRemoveFeatureAddon() {
|
|
21960
|
+
if (!addedQuoteChargeId.current)
|
|
21961
|
+
return;
|
|
21962
|
+
quoteChargeDeleteMutation({ quoteChargeId: addedQuoteChargeId.current });
|
|
21963
|
+
}
|
|
21964
|
+
var _a = useMutation({
|
|
21965
|
+
mutationFn: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
21966
|
+
var quoteCharge;
|
|
21967
|
+
return __generator(this, function (_a) {
|
|
21968
|
+
switch (_a.label) {
|
|
21969
|
+
case 0:
|
|
21970
|
+
if (!token)
|
|
21971
|
+
throw new Error('Token is required');
|
|
21972
|
+
if (!editingQuote)
|
|
21973
|
+
throw new Error('Editing quote is required');
|
|
21974
|
+
return [4 /*yield*/, quoteChargeCreate({
|
|
21975
|
+
quoteChangeId: editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.quoteChanges[editingQuote.quoteChanges.length - 1].id,
|
|
21976
|
+
priceListChargeId: featureAddon.id,
|
|
21977
|
+
startDate: editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.startDate,
|
|
21978
|
+
apiHost: apiHost,
|
|
21979
|
+
token: token,
|
|
21980
|
+
})];
|
|
21981
|
+
case 1:
|
|
21982
|
+
quoteCharge = _a.sent();
|
|
21983
|
+
return [2 /*return*/, { quoteCharge: quoteCharge }];
|
|
21984
|
+
}
|
|
21985
|
+
});
|
|
21986
|
+
}); },
|
|
21987
|
+
onSuccess: function (_a) {
|
|
21988
|
+
var quoteCharge = _a.quoteCharge;
|
|
21989
|
+
addedQuoteChargeId.current = quoteCharge.id;
|
|
21990
|
+
queryClient.invalidateQueries({
|
|
21991
|
+
queryKey: QueryKeyFactory.default.createObjectKey({
|
|
21992
|
+
objectName: 'editingQuote',
|
|
21993
|
+
}),
|
|
21994
|
+
});
|
|
21995
|
+
},
|
|
21996
|
+
}), quoteChargeCreateMutation = _a.mutate, isCreatingFeatureAddon = _a.isPending;
|
|
21997
|
+
var _b = useMutation({
|
|
21998
|
+
mutationFn: function (_a) {
|
|
21999
|
+
var quoteChargeId = _a.quoteChargeId;
|
|
22000
|
+
return quoteChargeDelete({ quoteChargeId: quoteChargeId, token: token, apiHost: apiHost });
|
|
22001
|
+
},
|
|
22002
|
+
onSuccess: function () {
|
|
22003
|
+
addedQuoteChargeId.current = undefined;
|
|
22004
|
+
queryClient.invalidateQueries({
|
|
22005
|
+
queryKey: QueryKeyFactory.default.createObjectKey({
|
|
22006
|
+
objectName: 'editingQuote',
|
|
22007
|
+
}),
|
|
22008
|
+
});
|
|
22009
|
+
},
|
|
22010
|
+
}), quoteChargeDeleteMutation = _b.mutate, isDeletingFeatureAddon = _b.isPending;
|
|
22011
|
+
useEffect(function () {
|
|
22012
|
+
// If the quoteId changes, then its because we changed pricelists, so we need to reset the addedQuoteChargeId
|
|
22013
|
+
// so that isChecked becomes false
|
|
22014
|
+
addedQuoteChargeId.current = undefined;
|
|
22015
|
+
}, [quoteId]);
|
|
21765
22016
|
return {
|
|
21766
|
-
|
|
21767
|
-
|
|
22017
|
+
handleAddFeatureAddon: handleAddFeatureAddon,
|
|
22018
|
+
handleRemoveFeatureAddon: handleRemoveFeatureAddon,
|
|
22019
|
+
isPending: isCreatingFeatureAddon || isDeletingFeatureAddon,
|
|
22020
|
+
isChecked: isDeletingFeatureAddon
|
|
22021
|
+
? false
|
|
22022
|
+
: Boolean(addedQuoteChargeId.current || isCreatingFeatureAddon),
|
|
22023
|
+
editingQuoteLoaded: editingQuote !== undefined,
|
|
21768
22024
|
};
|
|
21769
22025
|
};
|
|
21770
|
-
var everythingInPlusString = function (_a) {
|
|
21771
|
-
var priceList = _a.priceList;
|
|
21772
|
-
return "Everything in ".concat(priceList.plan.name, ", plus");
|
|
21773
|
-
};
|
|
21774
22026
|
|
|
21775
|
-
var
|
|
21776
|
-
var
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
var
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
22027
|
+
var shouldColorRow = function (_a) {
|
|
22028
|
+
var isFeatureGroup = _a.isFeatureGroup, rowIndex = _a.rowIndex;
|
|
22029
|
+
return !isFeatureGroup && rowIndex % 2 === 1;
|
|
22030
|
+
};
|
|
22031
|
+
var FeatureGridCell = function (_a) {
|
|
22032
|
+
var children = _a.children, isFeatureGroup = _a.isFeatureGroup, noBorder = _a.noBorder, rowIndex = _a.rowIndex;
|
|
22033
|
+
return (jsx("div", __assign({ className: "bunny-px-".concat(PLAN_GRID_PADDING, " bunny-py-2"), style: __assign(__assign({}, (noBorder ? {} : { borderLeft: "1px solid ".concat(SLATE_200) })), (shouldColorRow({
|
|
22034
|
+
isFeatureGroup: isFeatureGroup,
|
|
22035
|
+
rowIndex: rowIndex,
|
|
22036
|
+
})
|
|
22037
|
+
? { backgroundColor: SLATE_100 }
|
|
22038
|
+
: {})) }, { children: children })));
|
|
21787
22039
|
};
|
|
21788
22040
|
|
|
21789
|
-
var
|
|
21790
|
-
var
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
}, style: { width: '22px', height: '22px' } }, { children: jsx(FontAwesomeIcon, { icon: faChevronLeft }) }))), priceListStart < availablePriceLists.length - numberOfPlansToDisplay && (jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-center bunny-rounded-full bunny-shadow bunny-p-1 bunny-cursor-pointer", onClick: function () {
|
|
21800
|
-
return setPriceListStart(function (prev) {
|
|
21801
|
-
var newValue = prev + 1;
|
|
21802
|
-
if (newValue >= availablePriceLists.length) {
|
|
21803
|
-
return prev;
|
|
21804
|
-
}
|
|
21805
|
-
return newValue;
|
|
21806
|
-
});
|
|
21807
|
-
}, style: { width: '22px', height: '22px' } }, { children: jsx(FontAwesomeIcon, { icon: faChevronRight }) })))] })));
|
|
22041
|
+
var PlanFeatureAddons = function (_a) {
|
|
22042
|
+
var displayPriceLists = _a.displayPriceLists, plansToDisplay = _a.plansToDisplay;
|
|
22043
|
+
var uniquePlanFeatures = filterUniqueFeatures({ availablePriceLists: displayPriceLists });
|
|
22044
|
+
return (jsxs(Fragment, { children: [jsx(FeatureGridCell, { isFeatureGroup: true, noBorder: true, rowIndex: 0 }), __spreadArray([], Array(plansToDisplay), true).map(function (_, planIndex) {
|
|
22045
|
+
var priceList = uniquePlanFeatures[planIndex];
|
|
22046
|
+
var prevPriceList = displayPriceLists[planIndex - 1];
|
|
22047
|
+
if (!priceList)
|
|
22048
|
+
return (jsx("div", { style: prevPriceList ? { borderLeft: "1px solid ".concat(SLATE_200) } : {} }, planIndex));
|
|
22049
|
+
return (jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-p-4", style: { borderLeft: "1px solid ".concat(SLATE_200) } }, { children: jsx(FeatureAddonsList, { priceList: priceList }) }), planIndex));
|
|
22050
|
+
})] }));
|
|
21808
22051
|
};
|
|
22052
|
+
function FeatureAddonsList(_a) {
|
|
22053
|
+
var _b;
|
|
22054
|
+
var priceList = _a.priceList;
|
|
22055
|
+
var featureAddons = (_b = priceList === null || priceList === void 0 ? void 0 : priceList.charges) === null || _b === void 0 ? void 0 : _b.filter(function (charge) { return charge.featureAddon === true; });
|
|
22056
|
+
return (jsx(Fragment, { children: featureAddons === null || featureAddons === void 0 ? void 0 : featureAddons.map(function (featureAddon, featureAddonIndex) {
|
|
22057
|
+
return (jsx(FeatureAddonRow, { featureAddon: featureAddon, priceList: priceList }, featureAddonIndex));
|
|
22058
|
+
}) }));
|
|
22059
|
+
}
|
|
22060
|
+
function FeatureAddonRow(_a) {
|
|
22061
|
+
var _b, _c;
|
|
22062
|
+
var featureAddon = _a.featureAddon, priceList = _a.priceList;
|
|
22063
|
+
var quotePreviewData = useContext(QuotePreviewContext).quotePreviewData;
|
|
22064
|
+
var upgradingSubscription = useContext(SubscriptionsContext).upgradingSubscription;
|
|
22065
|
+
var _d = useQuoteUpdateFeatureAddon(quotePreviewData === null || quotePreviewData === void 0 ? void 0 : quotePreviewData.editingQuoteId, featureAddon), handleAddFeatureAddon = _d.handleAddFeatureAddon, handleRemoveFeatureAddon = _d.handleRemoveFeatureAddon, isPending = _d.isPending, isChecked = _d.isChecked, editingQuoteLoaded = _d.editingQuoteLoaded;
|
|
22066
|
+
var brandColor = useContext(BrandContext).brandColor;
|
|
22067
|
+
var isPriceListSelected = ((_b = quotePreviewData === null || quotePreviewData === void 0 ? void 0 : quotePreviewData.priceList) === null || _b === void 0 ? void 0 : _b.id) === priceList.id;
|
|
22068
|
+
var isPurchased = isAddonPurchased(featureAddon, upgradingSubscription);
|
|
22069
|
+
var isDisabled = !isPriceListSelected || isPurchased;
|
|
22070
|
+
var checked = isChecked || isPurchased;
|
|
22071
|
+
var tooltipContent = (jsxs(Fragment, { children: [jsx("div", { children: formatCurrency(featureAddon.basePrice, priceList.currencyId) }), featureAddon.chargeType === ChargeType.RECURRING && (jsx("div", { children: PriceDescriptionString({
|
|
22072
|
+
unitName: (_c = featureAddon.feature) === null || _c === void 0 ? void 0 : _c.unitName,
|
|
22073
|
+
showPriceAsMonthly: priceList.showPriceAsMonthly,
|
|
22074
|
+
periodMonths: priceList.periodMonths,
|
|
22075
|
+
doesPlanHaveFlatFeeCharges: false,
|
|
22076
|
+
}) }))] }));
|
|
22077
|
+
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-flex-wrap bunny-items-center bunny-justify-between bunny-gap-1" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-row bunny-items-center bunny-gap-1" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-gap-1 bunny-text-gray-600", style: { fontSize: '13px' } }, { children: [checked ? (jsx(CheckIcon, { backgroundColor: brandColor, size: "15px" })) : (jsx(CheckIcon, { backgroundColor: SLATE_200, size: "15px" })), featureAddon.name] })), jsx(Tooltip, __assign({ title: tooltipContent }, { children: jsx(InfoCircleOutlined, { className: "bunny-text-gray-500", size: 15 }) }))] })), jsx(Switch, { size: "small", loading: isPending, disabled: isDisabled || !editingQuoteLoaded, checked: checked, onChange: function (checked) {
|
|
22078
|
+
if (checked) {
|
|
22079
|
+
handleAddFeatureAddon();
|
|
22080
|
+
}
|
|
22081
|
+
else {
|
|
22082
|
+
handleRemoveFeatureAddon();
|
|
22083
|
+
}
|
|
22084
|
+
} })] })));
|
|
22085
|
+
}
|
|
21809
22086
|
|
|
21810
22087
|
var filterUniqueFeatures = function (_a) {
|
|
21811
22088
|
// Remove any features that in previous plans if everythingInPlus is true
|
|
@@ -21827,41 +22104,27 @@ var filterUniqueFeatures = function (_a) {
|
|
|
21827
22104
|
return updatedPriceLists;
|
|
21828
22105
|
};
|
|
21829
22106
|
var EverythingPlanFeatures = function (_a) {
|
|
21830
|
-
var
|
|
22107
|
+
var displayPriceLists = _a.displayPriceLists, selectedProduct = _a.selectedProduct, plansToDisplay = _a.plansToDisplay;
|
|
21831
22108
|
var brandColor = useContext(BrandContext).brandColor;
|
|
21832
|
-
var uniquePlanFeatures = filterUniqueFeatures({ availablePriceLists:
|
|
22109
|
+
var uniquePlanFeatures = filterUniqueFeatures({ availablePriceLists: displayPriceLists });
|
|
21833
22110
|
return (jsx(Fragment, { children: __spreadArray([], Array(plansToDisplay), true).map(function (_, planIndex) {
|
|
21834
22111
|
var priceList = uniquePlanFeatures[planIndex];
|
|
21835
|
-
var prevPriceList =
|
|
22112
|
+
var prevPriceList = displayPriceLists[planIndex - 1];
|
|
21836
22113
|
if (!priceList)
|
|
21837
22114
|
return (jsx("div", { style: prevPriceList ? { borderLeft: "1px solid ".concat(SLATE_200) } : {} }, planIndex));
|
|
21838
22115
|
if (!priceList.plan.planFeatures)
|
|
21839
|
-
return
|
|
21840
|
-
return (
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
22116
|
+
return (jsxs("div", { children: [jsx(FeatureAddonsList, { priceList: priceList }), ";"] }, planIndex));
|
|
22117
|
+
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-p-4", style: { borderLeft: "1px solid ".concat(SLATE_200) } }, { children: [priceList.plan.planFeatures.map(function (planFeature, planFeatureIndex) {
|
|
22118
|
+
var everythingInPlus = selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus;
|
|
22119
|
+
return (jsxs("div", __assign({ className: "bunny-contents" }, { children: [prevPriceList && everythingInPlus && planIndex > 0 && planFeatureIndex === 0 && (jsx("div", __assign({ className: "bunny-font-medium", style: { fontSize: '13px' } }, { children: everythingInPlusString({ priceList: prevPriceList }) }))), jsxs("div", __assign({ className: "bunny-flex bunny-gap-1 bunny-text-gray-600", style: { fontSize: '13px' } }, { children: [jsx(CheckIcon, { backgroundColor: brandColor, size: "15px" }), planFeature.feature.name] }))] }), planFeatureIndex));
|
|
22120
|
+
}), jsx(FeatureAddonsList, { priceList: priceList })] }), planIndex));
|
|
21844
22121
|
}) }));
|
|
21845
22122
|
};
|
|
21846
22123
|
|
|
21847
|
-
var
|
|
21848
|
-
var isFeatureGroup = _a.isFeatureGroup, rowIndex = _a.rowIndex;
|
|
21849
|
-
return !isFeatureGroup && rowIndex % 2 === 1;
|
|
21850
|
-
};
|
|
21851
|
-
var FeatureGridCell = function (_a) {
|
|
21852
|
-
var children = _a.children, isFeatureGroup = _a.isFeatureGroup, noBorder = _a.noBorder, rowIndex = _a.rowIndex;
|
|
21853
|
-
return (jsx("div", __assign({ className: "bunny-px-".concat(PLAN_GRID_PADDING, " bunny-py-2"), style: __assign(__assign({}, (noBorder ? {} : { borderLeft: "1px solid ".concat(SLATE_200) })), (shouldColorRow({
|
|
21854
|
-
isFeatureGroup: isFeatureGroup,
|
|
21855
|
-
rowIndex: rowIndex,
|
|
21856
|
-
})
|
|
21857
|
-
? { backgroundColor: SLATE_100 }
|
|
21858
|
-
: {})) }, { children: children })));
|
|
21859
|
-
};
|
|
21860
|
-
|
|
21861
|
-
var Text$9 = Typography.Text;
|
|
22124
|
+
var Text$a = Typography.Text;
|
|
21862
22125
|
var PlanFeatures = function (_a) {
|
|
21863
22126
|
var _b;
|
|
21864
|
-
var
|
|
22127
|
+
var displayPriceLists = _a.displayPriceLists, selectedProduct = _a.selectedProduct, plansToDisplay = _a.plansToDisplay;
|
|
21865
22128
|
var featureGroupCounter = useRef(0);
|
|
21866
22129
|
var visibleFeatureCounter = useRef(1);
|
|
21867
22130
|
var brandColor = useContext(BrandContext).brandColor;
|
|
@@ -21888,8 +22151,9 @@ var PlanFeatures = function (_a) {
|
|
|
21888
22151
|
visibleFeatureCounter.current = visibleFeatureCounter.current + 1;
|
|
21889
22152
|
return (jsxs("div", __assign({ className: "bunny-contents" }, { children: [jsx(FeatureGridCell, __assign({ isFeatureGroup: isFeatureGroup, noBorder: true, rowIndex: rowIndex }, { children: jsx(FeatureTitle, { isFeatureGroup: isFeatureGroup, feature: feature }) })), __spreadArray([], Array(plansToDisplay), true).map(function (_, columnIndex) {
|
|
21890
22153
|
var _a;
|
|
21891
|
-
var
|
|
21892
|
-
var
|
|
22154
|
+
var priceList = displayPriceLists[columnIndex];
|
|
22155
|
+
var plan = priceList.plan;
|
|
22156
|
+
var doesHavePrevPlan = displayPriceLists[columnIndex - 1];
|
|
21893
22157
|
columnIndex = columnIndex + 1;
|
|
21894
22158
|
// Check if the plan has the feature
|
|
21895
22159
|
var planFeature = (_a = plan === null || plan === void 0 ? void 0 : plan.planFeatures) === null || _a === void 0 ? void 0 : _a.find(function (f) { return f.featureId === (feature === null || feature === void 0 ? void 0 : feature.id); });
|
|
@@ -21897,14 +22161,14 @@ var PlanFeatures = function (_a) {
|
|
|
21897
22161
|
return (jsx(FeatureGridCell, { rowIndex: rowIndex, noBorder: !Boolean(doesHavePrevPlan) }, columnIndex));
|
|
21898
22162
|
if (isFeatureGroup)
|
|
21899
22163
|
return jsx(FeatureGridCell, { isFeatureGroup: true, rowIndex: rowIndex }, columnIndex);
|
|
21900
|
-
return (jsx(FeatureGridCell, __assign({ rowIndex: rowIndex }, { children: jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-text-center" }, { children: planFeature ? ((planFeature === null || planFeature === void 0 ? void 0 : planFeature.value) ? (planFeature.value) : (jsx(CheckIcon, { backgroundColor: brandColor, size: "15px" }))) : (jsx(Text$
|
|
22164
|
+
return (jsx(FeatureGridCell, __assign({ rowIndex: rowIndex }, { children: jsx("div", __assign({ className: "bunny-flex bunny-justify-center bunny-text-center" }, { children: planFeature ? ((planFeature === null || planFeature === void 0 ? void 0 : planFeature.value) ? (planFeature.value) : (jsx(CheckIcon, { backgroundColor: brandColor, size: "15px" }))) : (jsx(Text$a, __assign({ className: "bunny-text-gray" }, { children: "-" }))) })) }), columnIndex));
|
|
21901
22165
|
})] }), rowIndex));
|
|
21902
22166
|
}) }));
|
|
21903
22167
|
};
|
|
21904
22168
|
var FeatureTitle = function (_a) {
|
|
21905
22169
|
var _b;
|
|
21906
22170
|
var isFeatureGroup = _a.isFeatureGroup, feature = _a.feature;
|
|
21907
|
-
return (jsx(Text$
|
|
22171
|
+
return (jsx(Text$a, __assign({ className: " ".concat(isFeatureGroup ? 'bunny-text-slate-500 bunny-font-medium bunny-pt-4' : ''), style: __assign({}, (isFeatureGroup ? { fontSize: '11px' } : {})) }, { children: isFeatureGroup ? (_b = feature === null || feature === void 0 ? void 0 : feature.name) === null || _b === void 0 ? void 0 : _b.toUpperCase() : feature === null || feature === void 0 ? void 0 : feature.name })));
|
|
21908
22172
|
};
|
|
21909
22173
|
|
|
21910
22174
|
var PriceListGridDesktop = function (_a) {
|
|
@@ -21916,7 +22180,7 @@ var PriceListGridDesktop = function (_a) {
|
|
|
21916
22180
|
priceListStart: priceListStart,
|
|
21917
22181
|
plansToDisplay: (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.plansToDisplay) || 3,
|
|
21918
22182
|
});
|
|
21919
|
-
}, [availablePriceLists, priceListChangeOptions, priceListStart])
|
|
22183
|
+
}, [availablePriceLists, priceListChangeOptions, priceListStart]); _b.availablePriceListsArray; var displayPriceLists = _b.displayPriceLists;
|
|
21920
22184
|
var everythingInPlus = selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus;
|
|
21921
22185
|
var plansToDisplay = Math.min((selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.plansToDisplay) || 3, availablePriceLists.length);
|
|
21922
22186
|
return (jsxs("div", __assign({ className: "bunny-relative bunny-flex bunny-flex-col bunny-rounded-md bunny-shadow bunny-overflow-hidden bunny-bg-white" }, { children: [jsx(NextPriceListButton, { availablePriceLists: availablePriceLists, numberOfPlansToDisplay: plansToDisplay, priceListStart: priceListStart, setPriceListStart: setPriceListStart }), jsxs("div", __assign({ className: "bunny-grid bunny-w-full", style: {
|
|
@@ -21927,9 +22191,32 @@ var PriceListGridDesktop = function (_a) {
|
|
|
21927
22191
|
var priceList = displayPriceLists[index];
|
|
21928
22192
|
var doesPrevPriceListExist = displayPriceLists[index - 1];
|
|
21929
22193
|
if (!priceList)
|
|
21930
|
-
return
|
|
22194
|
+
return jsx(PlanPickerGridCell, { noBorder: !Boolean(doesPrevPriceListExist) }, index);
|
|
21931
22195
|
return (jsx(PriceListCard, { isSelected: priceList.plan.id === (selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.plan.id), onClick: onChangePriceList, priceList: priceList, subscriptions: subscriptions, trialRemainingDays: trialRemainingDays }, index));
|
|
21932
|
-
}), (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus) ? (jsx(EverythingPlanFeatures, {
|
|
22196
|
+
}), (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus) ? (jsx(EverythingPlanFeatures, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay, selectedProduct: selectedProduct })) : (jsxs(Fragment, { children: [jsx(PlanFeatures, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay, selectedProduct: selectedProduct }), jsx(PlanFeatureAddons, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay })] }))] }))] })));
|
|
22197
|
+
};
|
|
22198
|
+
|
|
22199
|
+
var Text$9 = Typography.Text;
|
|
22200
|
+
var PriceListCardFeature = function (_a) {
|
|
22201
|
+
var index = _a.index, planFeature = _a.planFeature;
|
|
22202
|
+
var brandColor = useContext(BrandContext).brandColor;
|
|
22203
|
+
if (planFeature.feature.kind === "GROUP")
|
|
22204
|
+
return jsx(Text$9, __assign({ className: "bunny-font-medium bunny-base-text" }, { children: planFeature.name }));
|
|
22205
|
+
return (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-2" }, { children: [jsx(CheckIcon, { backgroundColor: brandColor, size: "15px" }), jsx(Text$9, __assign({ className: "bunny-text-gray-600" }, { children: planFeature.feature.name }))] }), index));
|
|
22206
|
+
};
|
|
22207
|
+
|
|
22208
|
+
var PriceListGridMobile = function (_a) {
|
|
22209
|
+
var _b, _c, _d, _e;
|
|
22210
|
+
var availablePriceLists = _a.availablePriceLists, onChangePriceList = _a.onChangePriceList, priceListChangeOptions = _a.priceListChangeOptions, selectedPriceList = _a.selectedPriceList, selectedProduct = _a.selectedProduct, subscriptions = _a.subscriptions, trialRemainingDays = _a.trialRemainingDays;
|
|
22211
|
+
var everythingInPlus = selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus;
|
|
22212
|
+
var prevPriceListIndex = availablePriceLists.findIndex(function (priceList) { return priceList.id === (selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id); });
|
|
22213
|
+
var prevPriceListId = (_b = availablePriceLists[prevPriceListIndex - 1]) === null || _b === void 0 ? void 0 : _b.id;
|
|
22214
|
+
var prevPriceList = (_c = priceListChangeOptions === null || priceListChangeOptions === void 0 ? void 0 : priceListChangeOptions.priceLists) === null || _c === void 0 ? void 0 : _c.find(function (priceList) { return priceList.id === prevPriceListId; });
|
|
22215
|
+
return (jsxs(Fragment, { children: [jsx("div", __assign({ className: "bunny-flex bunny-gap-4 bunny-overflow-auto bunny-shadow-padding-xb", style: { flexShrink: 0 } }, { children: availablePriceLists.map(function (priceList, index) {
|
|
22216
|
+
return (jsx(PriceListCard, { isSelected: priceList.id === (selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id), onClick: onChangePriceList, priceList: priceList, subscriptions: subscriptions, trialRemainingDays: trialRemainingDays }, index));
|
|
22217
|
+
}) })), jsx("div", __assign({ className: "bunny-text-slate-500 bunny-pt-5 bunny-pb-4 bunny-shadow-padding-x" }, { children: everythingInPlus && prevPriceList
|
|
22218
|
+
? everythingInPlusString({ priceList: prevPriceList })
|
|
22219
|
+
: "Features" })), jsx("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4 bunny-overflow-auto bunny-shadow-padding-x" }, { children: (_e = (_d = selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.plan) === null || _d === void 0 ? void 0 : _d.planFeatures) === null || _e === void 0 ? void 0 : _e.map(function (planFeature, index) { return (jsx(PriceListCardFeature, { planFeature: planFeature, index: index }, index)); }) }))] }));
|
|
21933
22220
|
};
|
|
21934
22221
|
|
|
21935
22222
|
var PriceListGrid = function (_a) {
|
|
@@ -21939,7 +22226,7 @@ var PriceListGrid = function (_a) {
|
|
|
21939
22226
|
var isMobile = useIsMobile();
|
|
21940
22227
|
// Derived state
|
|
21941
22228
|
var currentPriceList = (_b = priceListChangeOptions === null || priceListChangeOptions === void 0 ? void 0 : priceListChangeOptions.priceLists) === null || _b === void 0 ? void 0 : _b.find(function (priceList) { var _a; return priceList.id === ((_a = upgradingSubscriptionState === null || upgradingSubscriptionState === void 0 ? void 0 : upgradingSubscriptionState.plan) === null || _a === void 0 ? void 0 : _a.id); });
|
|
21942
|
-
var trialRemainingDays = dayjs((_c = currentPriceList === null || currentPriceList === void 0 ? void 0 : currentPriceList.plan) === null || _c === void 0 ? void 0 : _c.trialEndDate).diff(dayjs(),
|
|
22229
|
+
var trialRemainingDays = dayjs((_c = currentPriceList === null || currentPriceList === void 0 ? void 0 : currentPriceList.plan) === null || _c === void 0 ? void 0 : _c.trialEndDate).diff(dayjs(), 'days');
|
|
21943
22230
|
return isMobile ? (jsx(PriceListGridMobile, { availablePriceLists: availablePriceLists, onChangePriceList: onChangePriceList, priceListChangeOptions: priceListChangeOptions, selectedPriceList: selectedPriceList, selectedProduct: selectedProduct, subscriptions: subscriptions, trialRemainingDays: trialRemainingDays })) : (jsx(PriceListGridDesktop, { availablePriceLists: availablePriceLists, onChangePriceList: onChangePriceList, priceListChangeOptions: priceListChangeOptions, priceListStart: priceListStart, selectedPriceList: selectedPriceList, selectedProduct: selectedProduct, setPriceListStart: setPriceListStart, subscriptions: subscriptions, trialRemainingDays: trialRemainingDays }));
|
|
21944
22231
|
};
|
|
21945
22232
|
|
|
@@ -21947,9 +22234,11 @@ var createAvailableBillingPeriods = function (priceLists, selectedProduct) {
|
|
|
21947
22234
|
return priceLists === null || priceLists === void 0 ? void 0 : priceLists.filter(function (priceList) { return priceList.product.id === (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id); }).map(function (priceList) { return priceList.periodMonths; }).sort(function (a, b) { return a - b; }).filter(function (currentValue, index, array) { return index === array.indexOf(currentValue); });
|
|
21948
22235
|
};
|
|
21949
22236
|
var PriceListSelector = function (_a) {
|
|
21950
|
-
var arePlanChangeOptionsLoading = _a.arePlanChangeOptionsLoading, areSubscriptionsLoading = _a.areSubscriptionsLoading, onChangePriceList = _a.onChangePriceList, priceListChangeOptions = _a.priceListChangeOptions, selectedPriceList = _a.selectedPriceList, subscriptions = _a.subscriptions
|
|
22237
|
+
var arePlanChangeOptionsLoading = _a.arePlanChangeOptionsLoading, areSubscriptionsLoading = _a.areSubscriptionsLoading, onChangePriceList = _a.onChangePriceList, priceListChangeOptions = _a.priceListChangeOptions, selectedPriceList = _a.selectedPriceList, subscriptions = _a.subscriptions;
|
|
21951
22238
|
// Context
|
|
21952
|
-
var
|
|
22239
|
+
var isInPreviewMode = useContext(SubscriptionsContext).isInPreviewMode;
|
|
22240
|
+
var _b = useContext(QuotePreviewContext), quotePreviewData = _b.quotePreviewData, setQuotePreviewData = _b.setQuotePreviewData;
|
|
22241
|
+
var upgradingSubscription = useContext(SubscriptionsContext).upgradingSubscription;
|
|
21953
22242
|
// Local state
|
|
21954
22243
|
var _c = useState(), selectedProduct = _c[0], setSelectedProduct = _c[1];
|
|
21955
22244
|
var _d = useState(), selectedBillingPeriod = _d[0], setSelectedBillingPeriod = _d[1];
|
|
@@ -21979,6 +22268,7 @@ var PriceListSelector = function (_a) {
|
|
|
21979
22268
|
priceList: priceList,
|
|
21980
22269
|
subscriptions: subscriptions,
|
|
21981
22270
|
upgradingSubscription: upgradingSubscription,
|
|
22271
|
+
canPurchaseFeatureAddons: priceListHasUnpurchasedFeatureAddons(quotePreviewData === null || quotePreviewData === void 0 ? void 0 : quotePreviewData.priceList, upgradingSubscription),
|
|
21982
22272
|
});
|
|
21983
22273
|
});
|
|
21984
22274
|
var isPriceListCurrentSubscription = newSelectedPriceList && (upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList.id) === newSelectedPriceList.id;
|
|
@@ -22047,6 +22337,7 @@ var PriceListSelector = function (_a) {
|
|
|
22047
22337
|
priceList: initialPriceList,
|
|
22048
22338
|
subscriptions: subscriptions,
|
|
22049
22339
|
upgradingSubscription: upgradingSubscription,
|
|
22340
|
+
canPurchaseFeatureAddons: priceListHasUnpurchasedFeatureAddons(initialPriceList, upgradingSubscription),
|
|
22050
22341
|
})) {
|
|
22051
22342
|
setQuotePreviewData({
|
|
22052
22343
|
priceList: initialPriceList,
|
|
@@ -22073,18 +22364,19 @@ var PlanPicker = function () {
|
|
|
22073
22364
|
// Context
|
|
22074
22365
|
var token = useToken();
|
|
22075
22366
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
22076
|
-
var _b = useContext(SubscriptionsContext), isInPreviewMode = _b.isInPreviewMode, productId = _b.productId,
|
|
22367
|
+
var _b = useContext(SubscriptionsContext), isInPreviewMode = _b.isInPreviewMode, productId = _b.productId, upgradingSubscription = _b.upgradingSubscription;
|
|
22368
|
+
var _c = useContext(QuotePreviewContext), quotePreviewData = _c.quotePreviewData, setQuotePreviewData = _c.setQuotePreviewData;
|
|
22077
22369
|
// Hooks
|
|
22078
22370
|
var showInfoNotification = useInfoNotification();
|
|
22079
22371
|
// Queries
|
|
22080
|
-
var
|
|
22372
|
+
var _d = useQuery({
|
|
22081
22373
|
queryKey: QueryKeyFactory.default.createTableKey({
|
|
22082
22374
|
pluralType: 'subscriptions',
|
|
22083
22375
|
token: token,
|
|
22084
22376
|
}),
|
|
22085
22377
|
queryFn: function () { return getSubscriptions({ isInPreviewMode: isInPreviewMode, token: token, apiHost: apiHost }); },
|
|
22086
|
-
}), subscriptions =
|
|
22087
|
-
var
|
|
22378
|
+
}), subscriptions = _d.data, areSubscriptionsLoading = _d.isLoading;
|
|
22379
|
+
var _e = useQuery({
|
|
22088
22380
|
queryKey: QueryKeyFactory.default.planChangeOptionsKey({
|
|
22089
22381
|
subscriptionId: upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.id,
|
|
22090
22382
|
token: token,
|
|
@@ -22099,7 +22391,7 @@ var PlanPicker = function () {
|
|
|
22099
22391
|
});
|
|
22100
22392
|
},
|
|
22101
22393
|
enabled: !areSubscriptionsLoading,
|
|
22102
|
-
}), priceListChangeOptions =
|
|
22394
|
+
}), priceListChangeOptions = _e.data, arePlanChangeOptionsLoading = _e.isLoading;
|
|
22103
22395
|
// Handlers
|
|
22104
22396
|
var onChangePriceList = useCallback(function (selectedPriceList) {
|
|
22105
22397
|
if (isInPreviewMode)
|
|
@@ -22133,11 +22425,12 @@ var PlanManager = function (_a) {
|
|
|
22133
22425
|
// Context
|
|
22134
22426
|
var token = useToken();
|
|
22135
22427
|
var apiHost = useContext(BunnyContext).apiHost;
|
|
22136
|
-
var _b = useContext(SubscriptionsContext), isInPreviewMode = _b.isInPreviewMode, upgradingSubscription = _b.upgradingSubscription, setUpgradingSubscription = _b.setUpgradingSubscription, subscriptionUpgradeId = _b.subscriptionUpgradeId,
|
|
22428
|
+
var _b = useContext(SubscriptionsContext), isInPreviewMode = _b.isInPreviewMode, upgradingSubscription = _b.upgradingSubscription, setUpgradingSubscription = _b.setUpgradingSubscription, subscriptionUpgradeId = _b.subscriptionUpgradeId, className = _b.className;
|
|
22429
|
+
var _c = useContext(QuotePreviewContext), quotePreviewData = _c.quotePreviewData, setQuotePreviewData = _c.setQuotePreviewData;
|
|
22137
22430
|
// Local state
|
|
22138
|
-
var
|
|
22139
|
-
var
|
|
22140
|
-
var
|
|
22431
|
+
var _d = useState(), editingQuoteData = _d[0], setEditingQuoteData = _d[1];
|
|
22432
|
+
var _e = useState(false), payModalVisible = _e[0], setPayModalVisible = _e[1];
|
|
22433
|
+
var _f = useState(false), isSticky = _f[0], setIsSticky = _f[1];
|
|
22141
22434
|
var stickyRef = useRef(null);
|
|
22142
22435
|
// Hooks
|
|
22143
22436
|
var queryClient = useQueryClient();
|
|
@@ -22148,14 +22441,14 @@ var PlanManager = function (_a) {
|
|
|
22148
22441
|
apiHost: apiHost,
|
|
22149
22442
|
}).defaultPaymentMethod;
|
|
22150
22443
|
// Queries
|
|
22151
|
-
var
|
|
22444
|
+
var _g = useQuery({
|
|
22152
22445
|
queryKey: QueryKeyFactory.default.createTableKey({
|
|
22153
22446
|
pluralType: 'subscriptions',
|
|
22154
22447
|
token: token,
|
|
22155
22448
|
}),
|
|
22156
22449
|
queryFn: function () { return getSubscriptions({ isInPreviewMode: isInPreviewMode, token: token, apiHost: apiHost }); },
|
|
22157
22450
|
enabled: false,
|
|
22158
|
-
}), subscriptions =
|
|
22451
|
+
}), subscriptions = _g.data, subscriptionsAreLoading = _g.isLoading;
|
|
22159
22452
|
var quote = useQuery({
|
|
22160
22453
|
queryKey: QueryKeyFactory.default.createObjectKey({
|
|
22161
22454
|
id: editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.id,
|
|
@@ -22417,11 +22710,12 @@ var isSubscriptionNotActive = function (subscription) {
|
|
|
22417
22710
|
return ((_a = subscription.state) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === SubscriptionState$2.EXPIRED ||
|
|
22418
22711
|
((_b = subscription.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === SubscriptionState$2.CANCELED;
|
|
22419
22712
|
};
|
|
22420
|
-
var
|
|
22713
|
+
var isSubscriptionActiveOrPending = function (subscription) {
|
|
22421
22714
|
var _a, _b;
|
|
22422
22715
|
return ((_a = subscription.state) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === SubscriptionState$2.ACTIVE ||
|
|
22423
22716
|
((_b = subscription.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === SubscriptionState$2.PENDING;
|
|
22424
22717
|
};
|
|
22718
|
+
var isSubscriptionTrial = function (subscription) { var _a; return ((_a = subscription.state) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === SubscriptionState$2.TRIAL; };
|
|
22425
22719
|
// Helper function to check if charge is a discount
|
|
22426
22720
|
var isDiscount = function (kind) {
|
|
22427
22721
|
return kind === QuoteChangeKind.DISCOUNT || kind === QuoteChangeKind.FREE_PERIOD_DISCOUNT;
|
|
@@ -22430,7 +22724,11 @@ var hasPriceTiers = function (charge) {
|
|
|
22430
22724
|
var _a;
|
|
22431
22725
|
return Boolean((_a = charge === null || charge === void 0 ? void 0 : charge.priceTiers) === null || _a === void 0 ? void 0 : _a.length);
|
|
22432
22726
|
};
|
|
22433
|
-
var
|
|
22727
|
+
var hasMultiplePriceTiers = function (charge) {
|
|
22728
|
+
var _a;
|
|
22729
|
+
return ((_a = charge === null || charge === void 0 ? void 0 : charge.priceTiers) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
22730
|
+
};
|
|
22731
|
+
var getApplicablePriceTier = function (charge, currencyId, priceDecimals) {
|
|
22434
22732
|
var _a;
|
|
22435
22733
|
if (!((_a = charge.priceTiers) === null || _a === void 0 ? void 0 : _a.length))
|
|
22436
22734
|
return '';
|
|
@@ -22463,18 +22761,21 @@ var getApplicablePriceTier = function (charge, currencyId) {
|
|
|
22463
22761
|
var starts = selectedTier.starts;
|
|
22464
22762
|
var nextTier = charge.priceTiers[tierIndex + 1];
|
|
22465
22763
|
var ends = nextTier ? nextTier.starts - 1 : '∞';
|
|
22466
|
-
return
|
|
22764
|
+
return hasMultiplePriceTiers(charge)
|
|
22765
|
+
? "".concat(starts, "-").concat(ends, ": ").concat(formatCurrency(selectedTier.price, currencyId, priceDecimals))
|
|
22766
|
+
: "".concat(formatCurrency(selectedTier.price, currencyId, priceDecimals));
|
|
22467
22767
|
};
|
|
22468
22768
|
|
|
22469
22769
|
var SubscriptionCardActions = function (_a) {
|
|
22470
|
-
var _b
|
|
22770
|
+
var _b;
|
|
22471
22771
|
var onChangePlanClick = _a.onChangePlanClick, onCancelSubscriptionClick = _a.onCancelSubscriptionClick, priceListChangeOptions = _a.priceListChangeOptions, subscription = _a.subscription;
|
|
22472
22772
|
// Derived state
|
|
22473
|
-
var
|
|
22773
|
+
var isSelfServiceCancelable = subscription.plan.selfServiceCancel;
|
|
22474
22774
|
var productPlans = (_b = priceListChangeOptions === null || priceListChangeOptions === void 0 ? void 0 : priceListChangeOptions.priceLists) === null || _b === void 0 ? void 0 : _b.filter(function (priceList) { return priceList.product.id === subscription.product.id; });
|
|
22475
|
-
var
|
|
22476
|
-
|
|
22477
|
-
|
|
22775
|
+
var arePlansAvailable = ((productPlans === null || productPlans === void 0 ? void 0 : productPlans.length) || 0) > 0;
|
|
22776
|
+
var isInTrial = isSubscriptionTrial(subscription);
|
|
22777
|
+
var isActiveOrPending = isSubscriptionActiveOrPending(subscription);
|
|
22778
|
+
return (jsxs(Fragment, { children: [isSelfServiceCancelable && (isInTrial || isActiveOrPending) && (jsx(Popconfirm, __assign({ icon: null, onConfirm: function () { return onCancelSubscriptionClick === null || onCancelSubscriptionClick === void 0 ? void 0 : onCancelSubscriptionClick(subscription); }, title: "Cancel subscription" }, { children: jsx(Button, __assign({ className: "bunny-p-0", type: "link" }, { children: "Cancel subscription" })) }))), arePlansAvailable && (isInTrial || isActiveOrPending) && (jsx(Button, __assign({ onClick: function () { return onChangePlanClick(subscription); }, type: "primary" }, { children: isInTrial ? 'Upgrade' : 'Change plan' })))] }));
|
|
22478
22779
|
};
|
|
22479
22780
|
|
|
22480
22781
|
var Text$7 = Typography.Text;
|
|
@@ -22502,11 +22803,11 @@ var SubscriptionCardHeader = function (_a) {
|
|
|
22502
22803
|
var subscriptionProductNameStyle = useContext(SubscriptionsContext).subscriptionProductNameStyle;
|
|
22503
22804
|
var isMobile = useIsMobile();
|
|
22504
22805
|
// Derived state
|
|
22505
|
-
var trialDaysLeft =
|
|
22806
|
+
var trialDaysLeft = subscription === null || subscription === void 0 ? void 0 : subscription.daysLeftInTrial;
|
|
22506
22807
|
var isTrial = ((_b = subscription.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === SubscriptionState$2.TRIAL;
|
|
22507
22808
|
return (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between", style: {
|
|
22508
|
-
backgroundColor: darkMode ?
|
|
22509
|
-
} }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [((_c = subscription === null || subscription === void 0 ? void 0 : subscription.product) === null || _c === void 0 ? void 0 : _c.name) && (jsx(Text$7, __assign({ style: __assign({ fontSize:
|
|
22809
|
+
backgroundColor: darkMode ? 'var(--row-background-dark)' : '',
|
|
22810
|
+
} }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [((_c = subscription === null || subscription === void 0 ? void 0 : subscription.product) === null || _c === void 0 ? void 0 : _c.name) && (jsx(Text$7, __assign({ style: __assign({ fontSize: '11px', fontWeight: 500, color: brandColor }, subscriptionProductNameStyle) }, { children: (_d = subscription.product.name) === null || _d === void 0 ? void 0 : _d.toUpperCase() }))), jsxs("div", __assign({ className: "bunny-flex bunny-grow bunny-items-center bunny-gap-2" }, { children: [((_e = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _e === void 0 ? void 0 : _e.name) && (jsx(Text$7, __assign({ className: "bunny-text-lg" }, { children: subscription.plan.name }))), jsxs(CustomizedTag, __assign({ color: TAG_COLORS[(_f = subscription.state) === null || _f === void 0 ? void 0 : _f.toUpperCase()] }, { children: [lodashExports.capitalize(subscription.state.toLowerCase()), isTrial ? " (".concat(trialDaysLeft || 'N/A', " days left)") : ''] }))] }))] })), jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-6" }, { children: [jsx(Text$7, __assign({ className: "bunny-grow bunny-text-xs" }, { children: getSubscriptionStatusText(subscription) })), !isMobile && priceListChangeOptions && onChangePlanClick && onCancelSubscriptionClick && (jsx(SubscriptionCardActions, { onChangePlanClick: onChangePlanClick, onCancelSubscriptionClick: onCancelSubscriptionClick, priceListChangeOptions: priceListChangeOptions, subscription: subscription }))] }))] })));
|
|
22510
22811
|
};
|
|
22511
22812
|
|
|
22512
22813
|
var SubscriptionChargeTotal = function (_a) {
|
|
@@ -22580,7 +22881,7 @@ var SubscriptionChargeUnitPrice = function (_a) {
|
|
|
22580
22881
|
? '-'
|
|
22581
22882
|
: formatCurrency(charge.discountedPrice, currencyId, charge.priceDecimals);
|
|
22582
22883
|
var isChargeDiscount = isDiscount(charge.kind);
|
|
22583
|
-
return (jsx(Fragment, { children: hasPriceTiers(charge) ? (jsx(TieredDisplayDropdown, { charge: charge, currencyId: currencyId, truncatedText: "".concat(charge.kind === QuoteChangeKind.PRICE_UPDATE ? 'new ' : '').concat(getApplicablePriceTier(charge, currencyId)) })) : isChargeDiscount ? ("-".concat(price)) : (price) }));
|
|
22884
|
+
return (jsx(Fragment, { children: hasPriceTiers(charge) ? (jsx(TieredDisplayDropdown, { charge: charge, currencyId: currencyId, truncatedText: "".concat(charge.kind === QuoteChangeKind.PRICE_UPDATE ? 'new ' : '').concat(getApplicablePriceTier(charge, currencyId, charge.priceDecimals)) })) : isChargeDiscount ? ("-".concat(price)) : (price) }));
|
|
22584
22885
|
};
|
|
22585
22886
|
|
|
22586
22887
|
var Text$6 = Typography.Text;
|
|
@@ -22767,27 +23068,6 @@ var DrawerHeader = function (_a) {
|
|
|
22767
23068
|
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-4" }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-gap-2" }, { children: [jsx(Text$3, __assign({ className: "bunny-text-xl", style: { fontWeight: 400 } }, { children: title })), onClose ? (jsx("button", __assign({ id: "closePayment", onClick: onClose, className: closeButtonClassName }, { children: jsx(CloseOutlined, {}) }))) : null] })), description && jsx("div", __assign({ className: "bunny-text-xs" }, { children: description }))] })));
|
|
22768
23069
|
};
|
|
22769
23070
|
|
|
22770
|
-
var QUOTE_CHARGE_CREATE = "\nmutation QuoteChargeCreate ($quoteChangeId: ID!, $startDate: ISO8601Date!, $endDate: ISO8601Date, $priceListChargeId: ID, $subscriptionChargeId: ID, $price: Float, $quantity: Int) {\n quoteChargeCreate(\n endDate: $endDate\n price: $price\n priceListChargeId: $priceListChargeId\n quantity: $quantity\n quoteChangeId: $quoteChangeId\n startDate: $startDate\n subscriptionChargeId: $subscriptionChargeId\n ) {\n quoteCharge {\n quoteChange {\n id\n quoteId\n }\n }\n }\n}\n\n";
|
|
22771
|
-
var quoteChargeCreate = function (_a) {
|
|
22772
|
-
var
|
|
22773
|
-
// endDate,
|
|
22774
|
-
price = _a.price, priceListChargeId = _a.priceListChargeId, quantity = _a.quantity, quoteChangeId = _a.quoteChangeId, startDate = _a.startDate, subscriptionChargeId = _a.subscriptionChargeId, token = _a.token, apiHost = _a.apiHost;
|
|
22775
|
-
return gqlRequest({
|
|
22776
|
-
query: QUOTE_CHARGE_CREATE,
|
|
22777
|
-
vars: {
|
|
22778
|
-
// endDate,
|
|
22779
|
-
price: price,
|
|
22780
|
-
priceListChargeId: priceListChargeId,
|
|
22781
|
-
quantity: quantity,
|
|
22782
|
-
quoteChangeId: quoteChangeId,
|
|
22783
|
-
startDate: startDate,
|
|
22784
|
-
subscriptionChargeId: subscriptionChargeId,
|
|
22785
|
-
},
|
|
22786
|
-
apiHost: apiHost,
|
|
22787
|
-
token: token,
|
|
22788
|
-
});
|
|
22789
|
-
};
|
|
22790
|
-
|
|
22791
23071
|
var formatDateForApi = function (date) {
|
|
22792
23072
|
if (typeof date === 'string')
|
|
22793
23073
|
date = dayjs(date);
|
|
@@ -22818,17 +23098,17 @@ var QuantityInput = function (_a) {
|
|
|
22818
23098
|
var createCharge = useMutation({
|
|
22819
23099
|
mutationFn: quoteChargeCreate,
|
|
22820
23100
|
onSuccess: function (response) {
|
|
22821
|
-
var _a, _b, _c, _d
|
|
23101
|
+
var _a, _b, _c, _d;
|
|
22822
23102
|
if (!(editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.id)) {
|
|
22823
23103
|
var isTrial = ((_b = (_a = editedSubscription === null || editedSubscription === void 0 ? void 0 : editedSubscription.subscription) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === SubscriptionState$2.TRIAL;
|
|
22824
23104
|
setEditingQuoteData({
|
|
22825
|
-
id: (
|
|
23105
|
+
id: (_c = response.quoteChange) === null || _c === void 0 ? void 0 : _c.quoteId,
|
|
22826
23106
|
isTrial: isTrial,
|
|
22827
23107
|
});
|
|
22828
23108
|
}
|
|
22829
23109
|
queryClient.invalidateQueries({
|
|
22830
23110
|
queryKey: QueryKeyFactory.default.createObjectKey({
|
|
22831
|
-
id: (
|
|
23111
|
+
id: (_d = response.quoteChange) === null || _d === void 0 ? void 0 : _d.quoteId,
|
|
22832
23112
|
objectName: 'editingQuote',
|
|
22833
23113
|
token: token,
|
|
22834
23114
|
}),
|
|
@@ -22993,12 +23273,12 @@ var QuoteChangeSummarySection = function (_a) {
|
|
|
22993
23273
|
mutationFn: function (quoteId) { return checkout({ quoteId: quoteId, token: token, apiHost: apiHost }); },
|
|
22994
23274
|
onSuccess: function () {
|
|
22995
23275
|
setEditingQuoteData(undefined);
|
|
22996
|
-
showSuccessNotification(
|
|
23276
|
+
showSuccessNotification('Subscription updated successfully');
|
|
22997
23277
|
},
|
|
22998
23278
|
});
|
|
22999
|
-
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: [editingQuote && (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-mb-8" }, { children: [jsx("div", __assign({ className: "bunny-text-slate-500 bunny-text-right bunny-text-xs bunny-mb-2" }, { children: "TOTAL" })), jsx("div", __assign({ className: "bunny-text-right ".concat(isMobile ?
|
|
23279
|
+
return (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-items-end" }, { children: [editingQuote && (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-mb-8" }, { children: [jsx("div", __assign({ className: "bunny-text-slate-500 bunny-text-right bunny-text-xs bunny-mb-2" }, { children: "TOTAL" })), jsx("div", __assign({ className: "bunny-text-right ".concat(isMobile ? 'bunny-text-2xl' : 'bunny-text-xl') }, { children: formatCurrency(getQuoteAmountDue(editingQuote), (editingQuote === null || editingQuote === void 0 ? void 0 : editingQuote.currencyId) || '') }))] }))), jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-end ".concat(isMobile ? 'bunny-w-full' : '') }, { children: jsx(Button, __assign({ className: "bunny-w-full", onClick: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial)
|
|
23000
23280
|
? function () { return trialUpgradeMutation.mutate(editingQuoteData.id); }
|
|
23001
|
-
: openCheckout, disabled: !editingQuoteData, size: isMobile ?
|
|
23281
|
+
: openCheckout, disabled: !editingQuoteData || !editingQuote, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: (editingQuoteData === null || editingQuoteData === void 0 ? void 0 : editingQuoteData.isTrial) ? 'Activate Trial' : 'Proceed to checkout' })) }))] })));
|
|
23002
23282
|
};
|
|
23003
23283
|
|
|
23004
23284
|
var QUANTITY_CHANGE_HEADER_TITLE = 'Update unit quantity';
|
|
@@ -23021,7 +23301,7 @@ var QuantityChangeDrawerDesktop = function (_a) {
|
|
|
23021
23301
|
}, [open]);
|
|
23022
23302
|
if (!openLocal)
|
|
23023
23303
|
return null;
|
|
23024
|
-
return (jsxs(Drawer, __assign({ closeIcon: null,
|
|
23304
|
+
return (jsxs(Drawer, __assign({ closeIcon: null, destroyOnHidden: true, onClose: onClose, open: open, styles: isMobile
|
|
23025
23305
|
? {
|
|
23026
23306
|
body: {
|
|
23027
23307
|
padding: '1rem',
|
|
@@ -23099,8 +23379,7 @@ var SubscriptionsWrapper = function (_a) {
|
|
|
23099
23379
|
var styles = __assign(__assign({}, defaultStyles), userStyles);
|
|
23100
23380
|
var _f = useState(undefined), upgradingSubscription = _f[0], setUpgradingSubscription = _f[1];
|
|
23101
23381
|
var _g = useState(undefined), updatingChargeQuantityId = _g[0], setUpdatingChargeQuantityId = _g[1];
|
|
23102
|
-
var _h = useState(
|
|
23103
|
-
var _j = useState(null), subscriptionUpgradeId = _j[0], setSubscriptionUpgradeId = _j[1];
|
|
23382
|
+
var _h = useState(null), subscriptionUpgradeId = _h[0], setSubscriptionUpgradeId = _h[1];
|
|
23104
23383
|
return (jsx(SubscriptionsContext.Provider, __assign({ value: {
|
|
23105
23384
|
gap: styles.gap,
|
|
23106
23385
|
shadow: styles.shadow,
|
|
@@ -23113,11 +23392,9 @@ var SubscriptionsWrapper = function (_a) {
|
|
|
23113
23392
|
setUpgradingSubscription: setUpgradingSubscription,
|
|
23114
23393
|
updatingChargeQuantityId: updatingChargeQuantityId,
|
|
23115
23394
|
setUpdatingChargeQuantityId: setUpdatingChargeQuantityId,
|
|
23116
|
-
quotePreviewData: quotePreviewData,
|
|
23117
|
-
setQuotePreviewData: setQuotePreviewData,
|
|
23118
23395
|
subscriptionUpgradeId: subscriptionUpgradeId,
|
|
23119
23396
|
setSubscriptionUpgradeId: setSubscriptionUpgradeId,
|
|
23120
|
-
} }, { children: jsx(Subscriptions, { handlePortalErrors: handlePortalErrors, companyName: companyName, noSubscriptionsComponent: noSubscriptionsComponent, hideTitle: hideTitle, hideExpiredToggle: hideExpiredToggle }) })));
|
|
23397
|
+
} }, { children: jsx(QuotePreviewProvider, { children: jsx(Subscriptions, { handlePortalErrors: handlePortalErrors, companyName: companyName, noSubscriptionsComponent: noSubscriptionsComponent, hideTitle: hideTitle, hideExpiredToggle: hideExpiredToggle }) }) })));
|
|
23121
23398
|
};
|
|
23122
23399
|
var Subscriptions = function (_a) {
|
|
23123
23400
|
var handlePortalErrors = _a.handlePortalErrors, companyName = _a.companyName, noSubscriptionsComponent = _a.noSubscriptionsComponent, hideTitle = _a.hideTitle, hideExpiredToggle = _a.hideExpiredToggle;
|