@axos-web-dev/shared-components 1.0.100-dev.9-patch.1 → 1.0.100-envVars-0.2
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/ATMLocator/ATMLocator.js +5 -10
- package/dist/Article/Article.css.d.ts +9 -36
- package/dist/Article/Article.css.js +10 -8
- package/dist/Article/index.js +3 -2
- package/dist/ArticlesSet/ArticlesSet.css.d.ts +10 -70
- package/dist/ArticlesSet/ArticlesSet.js +1 -1
- package/dist/Auth/ErrorAlert.js +5 -10
- package/dist/Auth/SignInPassword.js +2 -3
- package/dist/Avatar/Avatar.module.js +7 -7
- package/dist/AwardsBanner/AwardsBanner.css.js +4 -1
- package/dist/AwardsItem/AwardsItem.css.js +1 -2
- package/dist/Blockquote/Blockquote.module.js +3 -3
- package/dist/BulletItem/BulletItem.js +1 -1
- package/dist/Button/Button.css.d.ts +3 -3
- package/dist/Button/Button.js +6 -10
- package/dist/Calculators/AnnualFeeCalculator/index.js +1 -2
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.d.ts +2 -30
- package/dist/Calculators/ApyCalculator/index.js +11 -5
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.d.ts +1 -0
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +3 -1
- package/dist/Calculators/AxosOneCalculator/index.d.ts +3 -0
- package/dist/Calculators/AxosOneCalculator/index.js +48 -21
- package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.d.ts +2 -30
- package/dist/Calculators/BalanceAPYCalculator/index.js +0 -1
- package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.d.ts +0 -1
- package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.js +2 -4
- package/dist/Calculators/BuyDownCalculator/index.d.ts +4 -1
- package/dist/Calculators/BuyDownCalculator/index.js +108 -69
- package/dist/Calculators/Calculator.d.ts +3 -0
- package/dist/Calculators/Calculator.js +10 -11
- package/dist/Calculators/MarginTradingCalculator/index.js +118 -1
- package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +1 -2
- package/dist/Calculators/MaxLoanCalculator/index.js +1 -2
- package/dist/Calculators/MonthlyPaymentCalculator/index.js +1 -2
- package/dist/Calculators/MonthlyPaymentLVFCalculator/index.js +0 -1
- package/dist/Calculators/SummitApyCalculator/index.js +15 -7
- package/dist/Calculators/calculator.css.d.ts +2 -8
- package/dist/CallToActionBar/CallToActionBar.css.d.ts +3 -1
- package/dist/CallToActionBar/CallToActionBar.css.js +22 -16
- package/dist/CallToActionBar/index.js +4 -3
- package/dist/Carousel/Carousel.css.d.ts +8 -19
- package/dist/Carousel/index.js +4 -9
- package/dist/Chatbot/Bubble.d.ts +3 -1
- package/dist/Chatbot/Bubble.js +6 -3
- package/dist/Chatbot/ChatWindow.css.d.ts +1 -0
- package/dist/Chatbot/ChatWindow.css.js +14 -11
- package/dist/Chatbot/ChatWindow.d.ts +3 -6
- package/dist/Chatbot/ChatWindow.js +139 -68
- package/dist/Chatbot/Chatbot.css.js +0 -1
- package/dist/Chatbot/Chatbot.d.ts +6 -1
- package/dist/Chatbot/Chatbot.js +236 -21
- package/dist/Chatbot/EllipsisAnimation.d.ts +2 -0
- package/dist/Chatbot/EllipsisAnimation.js +85 -0
- package/dist/Chatbot/index.d.ts +0 -1
- package/dist/Chatbot/index.js +2 -3
- package/dist/Chatbot/store/chat.d.ts +1 -0
- package/dist/Chatbot/store/chat.js +11 -4
- package/dist/Chatbot/useHeadlessChat.d.ts +2 -1
- package/dist/Chatbot/useHeadlessChat.js +59 -14
- package/dist/Chevron/Chevron.css.d.ts +2 -2
- package/dist/Chevron/index.js +5 -9
- package/dist/CollectInformationAlert/index.js +1 -1
- package/dist/Comparison/Comparison.js +4 -9
- package/dist/ContentBanner/ContentBanner.css.js +2 -1
- package/dist/ExecutiveBio/ExecutiveBio.css.d.ts +153 -0
- package/dist/ExecutiveBio/ExecutiveBio.css.js +50 -0
- package/dist/ExecutiveBio/ExecutiveBio.d.ts +1 -1
- package/dist/ExecutiveBio/ExecutiveBio.interface.d.ts +11 -4
- package/dist/ExecutiveBio/ExecutiveBio.js +260 -12
- package/dist/ExecutiveBio/Overlay.d.ts +8 -0
- package/dist/ExecutiveBio/Overlay.js +589 -0
- package/dist/ExecutiveBio/index.js +26 -1
- package/dist/FaqAccordion/index.js +4 -9
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +142 -96
- package/dist/Forms/ApplicationStart.js +4 -3
- package/dist/Forms/ApplyNow.js +4 -9
- package/dist/Forms/ClearingForm.js +4 -3
- package/dist/Forms/CommercialDeposits.js +4 -3
- package/dist/Forms/CommercialDepositsNoLendingOption.d.ts +16 -0
- package/dist/Forms/CommercialDepositsNoLendingOption.js +331 -0
- package/dist/Forms/CommercialLending.js +4 -3
- package/dist/Forms/CommercialPremiumFinance.js +4 -3
- package/dist/Forms/ContactCompany.js +4 -3
- package/dist/Forms/ContactCompanyTitle.js +4 -3
- package/dist/Forms/ContactUs.js +4 -3
- package/dist/Forms/ContactUsAAS.js +4 -3
- package/dist/Forms/ContactUsBusiness.d.ts +1 -1
- package/dist/Forms/ContactUsBusiness.js +12 -15
- package/dist/Forms/ContactUsBusinessNameEmail.js +8 -11
- package/dist/Forms/ContactUsLVF.js +4 -3
- package/dist/Forms/ContactUsNMLSId.js +8 -11
- package/dist/Forms/CpraRequest.d.ts +1 -1
- package/dist/Forms/CpraRequest.js +104 -4
- package/dist/Forms/CraPublicFile.js +8 -11
- package/dist/Forms/DealerServices.js +4 -3
- package/dist/Forms/EmailOnly.js +90 -73
- package/dist/Forms/EmailUs.js +7 -6
- package/dist/Forms/Forms.css.d.ts +8 -31
- package/dist/Forms/Forms.css.js +50 -44
- package/dist/Forms/HoneyPot/index.js +2 -2
- package/dist/Forms/MortgageRate/MortgageRateForm.js +41 -23
- package/dist/Forms/MortgageRate/MortgageRateQuoteFilters.js +11 -5
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +4 -9
- package/dist/Forms/MortgageWarehouseLending.js +8 -11
- package/dist/Forms/QuickPricer/QuickPricerForm.js +16 -13
- package/dist/Forms/ScheduleCall.js +4 -3
- package/dist/Forms/ScheduleCallPremier.js +4 -3
- package/dist/Forms/SuccesForm.js +7 -12
- package/dist/Forms/VendorQuestionnaire.js +6 -3
- package/dist/Forms/index.d.ts +1 -0
- package/dist/Forms/index.js +7 -2
- package/dist/HeroBanner/HeroBanner.css.d.ts +5 -17
- package/dist/HeroBanner/HeroBanner.css.js +2 -1
- package/dist/HeroBanner/HeroBanner.js +14 -16
- package/dist/HeroBanner/SelectionBanner.css.d.ts +1 -19
- package/dist/HeroBanner/SelectionBanner.css.js +6 -6
- package/dist/Hyperlink/Hyperlink.css.d.ts +4 -4
- package/dist/Hyperlink/Hyperlink.css.js +4 -1
- package/dist/Hyperlink/index.js +6 -10
- package/dist/IconBillboard/IconBillboard.css.d.ts +6 -40
- package/dist/ImageBillboard/ImageBillboard.css.d.ts +5 -61
- package/dist/ImageBillboard/ImageBillboard.css.js +2 -1
- package/dist/ImageLink/ImageLink.js +5 -10
- package/dist/ImageLink/ImageLinkSet.js +4 -9
- package/dist/ImageLink/index.js +3 -8
- package/dist/Input/Input.css.d.ts +1 -0
- package/dist/Input/Input.css.js +10 -8
- package/dist/Input/index.js +2 -1
- package/dist/Insight/Featured/CategorySelector.js +3 -8
- package/dist/Insight/Featured/Featured.js +4 -9
- package/dist/Insight/Featured/Header.js +4 -9
- package/dist/Insight/Insight.css.d.ts +18 -0
- package/dist/Insight/Insight.css.js +44 -8
- package/dist/Insight/index.js +19 -1
- package/dist/LandingPageHeader/LandingPageHeader.css.d.ts +2 -0
- package/dist/LandingPageHeader/LandingPageHeader.css.js +6 -2
- package/dist/LandingPageHeader/LandingPageHeader.js +18 -9
- package/dist/LandingPageHeader/index.js +3 -1
- package/dist/LoadingIndicator/LoadingIndicator.css.d.ts +4 -4
- package/dist/LoadingIndicator/index.js +1 -1
- package/dist/Modal/Modal.css.d.ts +1 -0
- package/dist/Modal/Modal.css.js +5 -3
- package/dist/Modal/Modal.js +6 -11
- package/dist/Modal/contextApi/store.d.ts +9 -2
- package/dist/Modal/contextApi/store.js +16 -5
- package/dist/NavigationMenu/AxosALTS/NavData.d.ts +5 -1
- package/dist/NavigationMenu/AxosALTS/NavData.js +12 -12
- package/dist/NavigationMenu/AxosALTS/index.js +16 -13
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.d.ts +2 -0
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +7 -2
- package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
- package/dist/NavigationMenu/AxosAdvisor/SubNavBar.js +0 -1
- package/dist/NavigationMenu/AxosAdvisor/index.js +40 -23
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.d.ts +2 -0
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.js +7 -2
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavBar.js +0 -1
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.d.ts +1 -1
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.js +2 -2
- package/dist/NavigationMenu/AxosAdvisorServices/index.js +14 -9
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +127 -5
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +16 -16
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +7 -13
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +305 -202
- package/dist/NavigationMenu/AxosBank/NavBar.css.js +2 -1
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +41 -41
- package/dist/NavigationMenu/AxosBank/NavData.d.ts +37 -2
- package/dist/NavigationMenu/AxosBank/NavData.js +46 -41
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +591 -482
- package/dist/NavigationMenu/AxosBank/SubNavbar.css.d.ts +2 -0
- package/dist/NavigationMenu/AxosBank/SubNavbar.css.js +4 -0
- package/dist/NavigationMenu/AxosBank/index.js +23 -17
- package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
- package/dist/NavigationMenu/AxosClearing/index.js +0 -1
- package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +41 -41
- package/dist/NavigationMenu/LaVictoire/NavData.d.ts +11 -2
- package/dist/NavigationMenu/LaVictoire/NavData.js +16 -21
- package/dist/NavigationMenu/LaVictoire/SubNavBar.js +4 -1
- package/dist/NavigationMenu/LaVictoire/index.js +18 -18
- package/dist/NavigationMenu/Navbar.js +6 -7
- package/dist/NavigationMenu/SignInNavButton.js +19 -18
- package/dist/PageNavItem/PageNavItem.css.d.ts +4 -22
- package/dist/Pagination/Pagination.js +6 -6
- package/dist/SetContainer/SetContainer.js +5 -10
- package/dist/SocialMediaBar/iconsRepository.d.ts +42 -14
- package/dist/SocialMediaBar/iconsRepository.js +35 -34
- package/dist/SocialMediaBar/index.js +3 -1
- package/dist/StepItem/StepItem.css.d.ts +8 -36
- package/dist/StepItemSet/StepItemSet.css.d.ts +5 -32
- package/dist/StepItemSet/StepItemSet.css.js +5 -3
- package/dist/StepItemSet/StepItemSet.d.ts +2 -0
- package/dist/StepItemSet/StepItemSet.js +18 -13
- package/dist/StepItemSet/index.js +3 -2
- package/dist/Tab/Tab.js +1 -1
- package/dist/Table/Table.css.d.ts +7 -7
- package/dist/Table/Table.css.js +5 -5
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/Table.js +1 -2
- package/dist/VideoTile/VideoTile.js +2 -7
- package/dist/VideoWrapper/index.js +2 -7
- package/dist/WalnutIframe/wrapper.module.js +3 -3
- package/dist/assets/Accordion/Accordion.css +4 -4
- package/dist/assets/Article/Article.css +87 -86
- package/dist/assets/ArticlesSet/ArticlesSet.css +26 -56
- package/dist/assets/Auth/SignIn.css +12 -12
- package/dist/assets/Avatar/Avatar.css.css +10 -10
- package/dist/assets/AwardsBanner/AwardsBanner.css +1 -1
- package/dist/assets/AwardsItem/AwardsItem.css +3 -4
- package/dist/assets/Blockquote/Blockquote.css.css +21 -17
- package/dist/assets/Button/Button.css +28 -28
- package/dist/assets/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css +8 -8
- package/dist/assets/Calculators/ApyCalculator/ApyCalculator.css +12 -21
- package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +32 -12
- package/dist/assets/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css +22 -34
- package/dist/assets/Calculators/BuyDownCalculator/BuyDownCalculator.css +15 -21
- package/dist/assets/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css +9 -9
- package/dist/assets/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css +10 -10
- package/dist/assets/Calculators/SummitApyCalculator/BalanceAPYCalculator.css +18 -10
- package/dist/assets/Calculators/calculator.css +9 -15
- package/dist/assets/CallToActionBar/CallToActionBar.css +95 -69
- package/dist/assets/Carousel/Carousel.css +27 -41
- package/dist/assets/Chatbot/ChatWindow.css +38 -26
- package/dist/assets/Chevron/Chevron.css +11 -10
- package/dist/assets/CollectInformationAlert/CollectInformationAlert.css +4 -3
- package/dist/assets/Comparison/Comparison.css +5 -4
- package/dist/assets/ContentBanner/ContentBanner.css +14 -8
- package/dist/assets/DownloadTile/DownloadTile.css +6 -6
- package/dist/assets/ExecutiveBio/ExecutiveBio.css +342 -27
- package/dist/assets/FaqAccordion/FaqAccordion.css +5 -5
- package/dist/assets/FooterDisclosure/FooterDisclosure.css +1 -1
- package/dist/assets/FooterSiteMap/AxosBank/FooterSiteMap.css +3 -8
- package/dist/assets/Forms/Forms.css +176 -165
- package/dist/assets/Forms/QuickPricer/UserInformation.css +1 -1
- package/dist/assets/HeroBanner/HeroBanner.css +85 -76
- package/dist/assets/HeroBanner/LargeBanner.css +15 -15
- package/dist/assets/HeroBanner/SelectionBanner.css +15 -29
- package/dist/assets/Hyperlink/Hyperlink.css +4 -4
- package/dist/assets/IconBillboard/IconBillboard.css +32 -48
- package/dist/assets/ImageBillboard/ImageBillboard.css +59 -64
- package/dist/assets/Input/Input.css +54 -47
- package/dist/assets/Inputs/Input.css +4 -4
- package/dist/assets/Insight/Featured/CategorySelector.css +1 -1
- package/dist/assets/Insight/Insight.css +212 -43
- package/dist/assets/Interstitial/Interstitial-variants.css +3 -3
- package/dist/assets/LandingPageHeader/LandingPageHeader.css +37 -4
- package/dist/assets/LoadingIndicator/LoadingIndicator.css +5 -5
- package/dist/assets/Modal/Modal.css +17 -28
- package/dist/assets/NavigationMenu/AxosALTS/NavBar.css +1 -1
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +25 -2
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css.css +138 -126
- package/dist/assets/NavigationMenu/AxosAdvisor/SubNavbar.css +5 -4
- package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css +25 -2
- package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css.css +142 -130
- package/dist/assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css +22 -4
- package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +32 -31
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css +21 -9
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +120 -148
- package/dist/assets/NavigationMenu/AxosBank/SubNavbar.css +35 -1
- package/dist/assets/NavigationMenu/AxosClearing/NavBar.css.css +133 -107
- package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css.css +84 -83
- package/dist/assets/PageNavItem/PageNavItem.css +16 -33
- package/dist/assets/Pagination/Pagination.css +1 -1
- package/dist/assets/SetContainer/SetContainer.css +5 -5
- package/dist/assets/StepItem/StepItem.css +26 -42
- package/dist/assets/StepItemSet/StepItemSet.css +27 -35
- package/dist/assets/Tab/Tab.css +12 -12
- package/dist/assets/Table/Table.css +90 -97
- package/dist/assets/TextBlock/TextBlock.css +1 -1
- package/dist/assets/TopicalNavItem/TopicalNavItem.css +3 -3
- package/dist/assets/TopicalNavSet/TopicalNavSet.css +1 -1
- package/dist/assets/VideoTile/VideoTile.css +1 -1
- package/dist/assets/WalnutIframe/wrapper.css.css +48 -49
- package/dist/assets/globals.css +11 -8
- package/dist/assets/icons/ArrowIcon/ArrowIcon.css +3 -3
- package/dist/assets/icons/DownloadIcon/DownloadIcon.css +1 -1
- package/dist/assets/icons/FollowIcon/FollowIcon.css +1 -1
- package/dist/assets/themes/axos.css +32 -32
- package/dist/assets/themes/premier.css +31 -31
- package/dist/assets/themes/victorie.css +23 -23
- package/dist/icons/CheckCircle.js +1 -1
- package/dist/icons/CheckCircleLight.js +1 -1
- package/dist/icons/CheckIcon/index.js +1 -1
- package/dist/icons/Clock/index.js +6 -6
- package/dist/icons/Logos/SPB.d.ts +4 -0
- package/dist/icons/Logos/SPB.js +132 -0
- package/dist/icons/QuoteIconGrey.js +2 -2
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +2 -0
- package/dist/main.js +88 -26
- package/dist/themes/axos.css.d.ts +12 -12
- package/dist/themes/axos.css.js +1 -1
- package/dist/utils/allowedAxosDomains.d.ts +3 -2
- package/dist/utils/allowedAxosDomains.js +49 -45
- package/dist/utils/emailValidation.d.ts +1 -0
- package/dist/utils/emailValidation.js +31 -0
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.js +11 -2
- package/dist/utils/nmlsValidation.d.ts +1 -0
- package/dist/utils/nmlsValidation.js +34 -0
- package/dist/utils/useCachedValidators.d.ts +2 -0
- package/dist/utils/useCachedValidators.js +22 -0
- package/dist/utils/validateExternalLinks.d.ts +1 -1
- package/dist/utils/validateExternalLinks.js +2 -2
- package/package.json +1 -1
- package/dist/NavigationMenu/NavDataJson.d.ts +0 -2
- package/dist/NavigationMenu/NavDataJson.js +0 -315
|
@@ -39,38 +39,10 @@ export declare const bodyContent: string;
|
|
|
39
39
|
export declare const header_theme: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
40
40
|
variant: {
|
|
41
41
|
primary: {
|
|
42
|
-
|
|
43
|
-
[x: string]: {
|
|
44
|
-
WebkitBackgroundClip: "text";
|
|
45
|
-
backgroundImage: `var(--${string})`;
|
|
46
|
-
WebkitTextFillColor: "transparent";
|
|
47
|
-
textShadow: "0px 0px #00000000";
|
|
48
|
-
color?: undefined;
|
|
49
|
-
} | {
|
|
50
|
-
color: `var(--${string})`;
|
|
51
|
-
WebkitBackgroundClip?: undefined;
|
|
52
|
-
backgroundImage?: undefined;
|
|
53
|
-
WebkitTextFillColor?: undefined;
|
|
54
|
-
textShadow?: undefined;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
42
|
+
color: `var(--${string})`;
|
|
57
43
|
};
|
|
58
44
|
secondary: {
|
|
59
|
-
|
|
60
|
-
[x: string]: {
|
|
61
|
-
WebkitBackgroundClip: "text";
|
|
62
|
-
backgroundImage: `var(--${string})`;
|
|
63
|
-
WebkitTextFillColor: "transparent";
|
|
64
|
-
textShadow: "0px 0px #00000000";
|
|
65
|
-
color?: undefined;
|
|
66
|
-
} | {
|
|
67
|
-
color: `var(--${string})`;
|
|
68
|
-
WebkitBackgroundClip?: undefined;
|
|
69
|
-
backgroundImage?: undefined;
|
|
70
|
-
WebkitTextFillColor?: undefined;
|
|
71
|
-
textShadow?: undefined;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
45
|
+
color: `var(--${string})`;
|
|
74
46
|
};
|
|
75
47
|
tertiary: {
|
|
76
48
|
color: `var(--${string})`;
|
|
@@ -16,12 +16,20 @@ const ApyCalculator = ({
|
|
|
16
16
|
variant
|
|
17
17
|
}) => {
|
|
18
18
|
const calculator_variant = getVariant(variant);
|
|
19
|
+
const [compounding, setCompounding] = useState(360);
|
|
20
|
+
const getAPR = (apy) => {
|
|
21
|
+
return Number.parseFloat(
|
|
22
|
+
(((1 + apy / 100) ** (1 / compounding) - 1) * compounding * 100).toFixed(
|
|
23
|
+
2
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
};
|
|
19
27
|
const AXOS_ONE_APY = +process.env.NEXT_PUBLIC_AXOS_ONE_APY;
|
|
28
|
+
const AXOS_ONE_APR = getAPR(AXOS_ONE_APY);
|
|
20
29
|
const [initialDeposit, setInititalDeposit] = useState(1e3);
|
|
21
|
-
const [APR, setAPR] = useState(
|
|
30
|
+
const [APR, setAPR] = useState(AXOS_ONE_APR);
|
|
22
31
|
const [APY, setAPY] = useState(AXOS_ONE_APY);
|
|
23
32
|
const [months, setMonths] = useState(12);
|
|
24
|
-
const [compounding, setCompounding] = useState(360);
|
|
25
33
|
const [monthlyDeposits, setMonthlyDeposits] = useState(100);
|
|
26
34
|
const [endingBalance, setEndingBalance] = useState("");
|
|
27
35
|
const [errors, setErrors] = useState([]);
|
|
@@ -103,9 +111,7 @@ const ApyCalculator = ({
|
|
|
103
111
|
};
|
|
104
112
|
const updateAPY = (value) => {
|
|
105
113
|
setAPY(value);
|
|
106
|
-
const new_apr =
|
|
107
|
-
(((1 + value / 100) ** (1 / compounding) - 1) * compounding * 100).toFixed(2)
|
|
108
|
-
);
|
|
114
|
+
const new_apr = getAPR(value);
|
|
109
115
|
setAPR(new_apr);
|
|
110
116
|
convertInterest();
|
|
111
117
|
};
|
|
@@ -19,6 +19,7 @@ var ax1_header_calc = "_11b2y8zb";
|
|
|
19
19
|
var ax1_calc_text = "_11b2y8zc";
|
|
20
20
|
var ax1_description_text = createRuntimeFn({ defaultClassName: "_11b2y8zd", variantClassNames: { variant: { primary: "_11b2y8ze", secondary: "_11b2y8zf", tertiary: "_11b2y8zg", quaternary: "_11b2y8zh" } }, defaultVariants: {}, compoundVariants: [] });
|
|
21
21
|
var ax1_calc_disclosure = createRuntimeFn({ defaultClassName: "_11b2y8zi", variantClassNames: { variant: { primary: "_11b2y8zj", secondary: "_11b2y8zk", tertiary: "_11b2y8zl", quaternary: "_11b2y8zm" } }, defaultVariants: {}, compoundVariants: [] });
|
|
22
|
+
var call_to_action_row = "_11b2y8zn";
|
|
22
23
|
export {
|
|
23
24
|
ax1_calc_disclosure,
|
|
24
25
|
ax1_calc_icon,
|
|
@@ -34,5 +35,6 @@ export {
|
|
|
34
35
|
ax1_input_container,
|
|
35
36
|
ax1_input_label,
|
|
36
37
|
ax1_m_label,
|
|
37
|
-
ax1_table_container
|
|
38
|
+
ax1_table_container,
|
|
39
|
+
call_to_action_row
|
|
38
40
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React, FC } from 'react';
|
|
2
|
+
import { ChevronProps } from '../../Chevron/Chevron.interface';
|
|
2
3
|
|
|
3
4
|
export interface AxosOneCalculatorProps {
|
|
4
5
|
headline?: React.ReactNode | string;
|
|
@@ -6,5 +7,7 @@ export interface AxosOneCalculatorProps {
|
|
|
6
7
|
bodyCopy?: React.ReactNode | string;
|
|
7
8
|
disclosure: React.ReactNode | string;
|
|
8
9
|
variant: string;
|
|
10
|
+
initialBalance?: number;
|
|
11
|
+
callToActionRow?: ChevronProps[];
|
|
9
12
|
}
|
|
10
13
|
export declare const AxosOneCalculator: FC<AxosOneCalculatorProps>;
|
|
@@ -15,28 +15,38 @@ import '../../assets/icons/FollowIcon/FollowIcon.css';import '../../assets/icons
|
|
|
15
15
|
/* empty css */
|
|
16
16
|
import { Table, TableHead, TableRow, TableCell, TableBody } from "../../Table/Table.js";
|
|
17
17
|
import { headerCell } from "../../Table/Table.css.js";
|
|
18
|
-
import "../../utils/allowedAxosDomains.js";
|
|
19
18
|
import { getVariant } from "../../utils/getVariant.js";
|
|
20
19
|
import clsx from "clsx";
|
|
21
|
-
import { ax1_calc_icon, ax1_header_container, ax1_header_calc, ax1_calc_text, ax1_description_text, ax1_calculator_wrapper, ax1_input_container, ax1_input_label, ax1_calculator_input, ax1_calculator_button, ax1_d_label, ax1_m_label, ax1_table_container, ax1_calc_disclosure, ax1_container } from "./BalanceAPYCalculator.css.js";
|
|
20
|
+
import { ax1_calc_icon, ax1_header_container, ax1_header_calc, ax1_calc_text, ax1_description_text, ax1_calculator_wrapper, ax1_input_container, ax1_input_label, ax1_calculator_input, ax1_calculator_button, ax1_d_label, ax1_m_label, ax1_table_container, call_to_action_row, ax1_calc_disclosure, ax1_container } from "./BalanceAPYCalculator.css.js";
|
|
22
21
|
const AxosOneCalculator = ({
|
|
23
22
|
headline,
|
|
24
23
|
bodyCopy,
|
|
25
24
|
disclosure,
|
|
26
25
|
icon,
|
|
27
|
-
variant
|
|
26
|
+
variant,
|
|
27
|
+
initialBalance,
|
|
28
|
+
callToActionRow
|
|
28
29
|
}) => {
|
|
29
30
|
const calc_variant = getVariant(variant);
|
|
30
31
|
const AXOS_ONE_APY = +process.env.NEXT_PUBLIC_AXOS_ONE_APY;
|
|
31
|
-
const
|
|
32
|
+
const startingBalance = Number.isFinite(Number(initialBalance)) && Number(initialBalance) >= 0 ? Number(initialBalance) : 1e4;
|
|
33
|
+
const [balance, setBalance] = useState(startingBalance);
|
|
32
34
|
const [axbAPY, _setAxbAPY] = useState(AXOS_ONE_APY);
|
|
33
|
-
const [axbEarning, setAxbEarning] = useState(
|
|
35
|
+
const [axbEarning, setAxbEarning] = useState(
|
|
36
|
+
AXOS_ONE_APY / 100 * startingBalance
|
|
37
|
+
);
|
|
34
38
|
const [chaseAPY, _setChaseAPY] = useState(0.01);
|
|
35
|
-
const [chaseEarning, setChaseEarning] = useState(
|
|
39
|
+
const [chaseEarning, setChaseEarning] = useState(
|
|
40
|
+
0.01 / 100 * startingBalance
|
|
41
|
+
);
|
|
36
42
|
const [bofaAPY, _setBofaAPY] = useState(0.01);
|
|
37
|
-
const [bofaEarning, setBofaEarning] = useState(
|
|
43
|
+
const [bofaEarning, setBofaEarning] = useState(
|
|
44
|
+
0.01 / 100 * startingBalance
|
|
45
|
+
);
|
|
38
46
|
const [fargoAPY, _setFargoAPY] = useState(0.05);
|
|
39
|
-
const [fargoEarning, setFargoEarning] = useState(
|
|
47
|
+
const [fargoEarning, setFargoEarning] = useState(
|
|
48
|
+
0.05 / 100 * startingBalance
|
|
49
|
+
);
|
|
40
50
|
const removeNonNumeric = (value) => {
|
|
41
51
|
if (value === "") {
|
|
42
52
|
value = "0";
|
|
@@ -59,7 +69,19 @@ const AxosOneCalculator = ({
|
|
|
59
69
|
setBalance(0);
|
|
60
70
|
}
|
|
61
71
|
};
|
|
62
|
-
|
|
72
|
+
const formatUSD = (value) => {
|
|
73
|
+
if (Number.isInteger(value)) {
|
|
74
|
+
return value.toLocaleString(void 0, {
|
|
75
|
+
minimumFractionDigits: 0,
|
|
76
|
+
maximumFractionDigits: 0
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return value.toLocaleString(void 0, {
|
|
80
|
+
minimumFractionDigits: 2,
|
|
81
|
+
maximumFractionDigits: 2
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return /* @__PURE__ */ jsx("section", { className: clsx(ax1_container), id: "axoapycalc", children: /* @__PURE__ */ jsxs("div", { className: clsx("containment"), children: [
|
|
63
85
|
icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", ax1_calc_icon), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
|
|
64
86
|
(headline || bodyCopy) && /* @__PURE__ */ jsxs("div", { className: `${ax1_header_container} text_center`, children: [
|
|
65
87
|
headline && /* @__PURE__ */ jsx("h2", { className: clsx("header_2", ax1_header_calc), children: headline }),
|
|
@@ -134,9 +156,7 @@ const AxosOneCalculator = ({
|
|
|
134
156
|
] }) }),
|
|
135
157
|
/* @__PURE__ */ jsx(TableCell, { variant: "primary", children: /* @__PURE__ */ jsxs("b", { children: [
|
|
136
158
|
"$",
|
|
137
|
-
axbEarning
|
|
138
|
-
maximumFractionDigits: 2
|
|
139
|
-
})
|
|
159
|
+
formatUSD(axbEarning)
|
|
140
160
|
] }) })
|
|
141
161
|
] }),
|
|
142
162
|
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
@@ -150,9 +170,7 @@ const AxosOneCalculator = ({
|
|
|
150
170
|
] }),
|
|
151
171
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
152
172
|
"$",
|
|
153
|
-
fargoEarning
|
|
154
|
-
maximumFractionDigits: 2
|
|
155
|
-
})
|
|
173
|
+
formatUSD(fargoEarning)
|
|
156
174
|
] })
|
|
157
175
|
] }),
|
|
158
176
|
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
@@ -166,9 +184,7 @@ const AxosOneCalculator = ({
|
|
|
166
184
|
] }),
|
|
167
185
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
168
186
|
"$",
|
|
169
|
-
bofaEarning
|
|
170
|
-
maximumFractionDigits: 2
|
|
171
|
-
})
|
|
187
|
+
formatUSD(bofaEarning)
|
|
172
188
|
] })
|
|
173
189
|
] }),
|
|
174
190
|
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
@@ -182,9 +198,7 @@ const AxosOneCalculator = ({
|
|
|
182
198
|
] }),
|
|
183
199
|
/* @__PURE__ */ jsxs(TableCell, { variant: "primary", children: [
|
|
184
200
|
"$",
|
|
185
|
-
chaseEarning
|
|
186
|
-
maximumFractionDigits: 2
|
|
187
|
-
})
|
|
201
|
+
formatUSD(chaseEarning)
|
|
188
202
|
] })
|
|
189
203
|
] })
|
|
190
204
|
] })
|
|
@@ -192,6 +206,19 @@ const AxosOneCalculator = ({
|
|
|
192
206
|
}
|
|
193
207
|
)
|
|
194
208
|
] }),
|
|
209
|
+
Array.isArray(callToActionRow) && callToActionRow.length > 0 && /* @__PURE__ */ jsx("div", { className: `${call_to_action_row}`, children: callToActionRow?.map(
|
|
210
|
+
({ id, variant: variant2, displayText, targetUrl }) => /* @__PURE__ */ jsx(
|
|
211
|
+
Button,
|
|
212
|
+
{
|
|
213
|
+
targetUrl,
|
|
214
|
+
color: getVariant(variant2),
|
|
215
|
+
size: "medium",
|
|
216
|
+
rounded: "medium",
|
|
217
|
+
children: displayText
|
|
218
|
+
},
|
|
219
|
+
id
|
|
220
|
+
)
|
|
221
|
+
) }),
|
|
195
222
|
disclosure && /* @__PURE__ */ jsx("div", { className: ax1_calc_disclosure({ variant: calc_variant }), children: disclosure })
|
|
196
223
|
] }) });
|
|
197
224
|
};
|
|
@@ -33,38 +33,10 @@ export declare const header_container: string;
|
|
|
33
33
|
export declare const header_calc: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
34
34
|
variant: {
|
|
35
35
|
primary: {
|
|
36
|
-
|
|
37
|
-
[x: string]: {
|
|
38
|
-
WebkitBackgroundClip: string;
|
|
39
|
-
backgroundImage: `var(--${string})`;
|
|
40
|
-
WebkitTextFillColor: string;
|
|
41
|
-
textShadow: string;
|
|
42
|
-
color?: undefined;
|
|
43
|
-
} | {
|
|
44
|
-
color: `var(--${string})`;
|
|
45
|
-
WebkitBackgroundClip?: undefined;
|
|
46
|
-
backgroundImage?: undefined;
|
|
47
|
-
WebkitTextFillColor?: undefined;
|
|
48
|
-
textShadow?: undefined;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
36
|
+
color: `var(--${string})`;
|
|
51
37
|
};
|
|
52
38
|
secondary: {
|
|
53
|
-
|
|
54
|
-
[x: string]: {
|
|
55
|
-
WebkitBackgroundClip: "text";
|
|
56
|
-
backgroundImage: `var(--${string})`;
|
|
57
|
-
WebkitTextFillColor: "transparent";
|
|
58
|
-
textShadow: "0px 0px #00000000";
|
|
59
|
-
color?: undefined;
|
|
60
|
-
} | {
|
|
61
|
-
color: `var(--${string})`;
|
|
62
|
-
WebkitBackgroundClip?: undefined;
|
|
63
|
-
backgroundImage?: undefined;
|
|
64
|
-
WebkitTextFillColor?: undefined;
|
|
65
|
-
textShadow?: undefined;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
39
|
+
color: `var(--${string})`;
|
|
68
40
|
};
|
|
69
41
|
tertiary: {
|
|
70
42
|
color: `var(--${string})`;
|
|
@@ -15,7 +15,6 @@ import '../../assets/icons/FollowIcon/FollowIcon.css';import '../../assets/icons
|
|
|
15
15
|
/* empty css */
|
|
16
16
|
import { Table, TableHead, TableRow, TableCell, TableBody } from "../../Table/Table.js";
|
|
17
17
|
import { headerCell } from "../../Table/Table.css.js";
|
|
18
|
-
import "../../utils/allowedAxosDomains.js";
|
|
19
18
|
import { getVariant } from "../../utils/getVariant.js";
|
|
20
19
|
import clsx from "clsx";
|
|
21
20
|
import { calc_icon, header_container, header_calc, calc_text, description_text, calculator_wrapper, input_container, input_label, d_label, m_label, calculator_input, calculator_button, max_balance, error_message, table_container, calc_disclosure, container } from "./BalanceAPYCalculator.css.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import '../../assets/Calculators/BuyDownCalculator/BuyDownCalculator.css';import '../../assets/
|
|
1
|
+
import '../../assets/Calculators/BuyDownCalculator/BuyDownCalculator.css';import '../../assets/themes/victorie.css';import '../../assets/themes/premier.css';import '../../assets/themes/axos.css';import '../../assets/Typography/Typography.css';/* empty css */
|
|
2
|
+
/* empty css */
|
|
2
3
|
/* empty css */
|
|
3
4
|
/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
7
7
|
var calc_container = createRuntimeFn({ defaultClassName: "n9fzuw0", variantClassNames: { variant: { primary: "n9fzuw1", secondary: "n9fzuw2", tertiary: "n9fzuw3", quaternary: "n9fzuw4" } }, defaultVariants: {}, compoundVariants: [] });
|
|
@@ -27,7 +27,6 @@ var bodyContent = "n9fzuwr";
|
|
|
27
27
|
var theme_header = createRuntimeFn({ defaultClassName: "n9fzuws", variantClassNames: { variant: { primary: "n9fzuwt", secondary: "n9fzuwu", tertiary: "n9fzuwv", quaternary: "n9fzuww" } }, defaultVariants: {}, compoundVariants: [] });
|
|
28
28
|
var mt_8 = "n9fzuwx";
|
|
29
29
|
var pis_0 = "n9fzuwy";
|
|
30
|
-
var limit_one = "n9fzuwz";
|
|
31
30
|
export {
|
|
32
31
|
apy_calculator,
|
|
33
32
|
bodyContent,
|
|
@@ -42,7 +41,6 @@ export {
|
|
|
42
41
|
form_disclosure,
|
|
43
42
|
form_wrapper,
|
|
44
43
|
label_symbol,
|
|
45
|
-
limit_one,
|
|
46
44
|
mt_8,
|
|
47
45
|
percent,
|
|
48
46
|
pis_0,
|
|
@@ -19,8 +19,11 @@ export type BuyDownCalculatorInputs = {
|
|
|
19
19
|
fullTimeCharter: boolean;
|
|
20
20
|
mooringOutsideContinentalUS: boolean;
|
|
21
21
|
operatingAccount: boolean;
|
|
22
|
-
ltvAbove60: boolean;
|
|
23
22
|
floorplanDealerIncentive: boolean;
|
|
24
23
|
dealerCommercialDeposit: boolean;
|
|
24
|
+
vesselOver15Years: boolean;
|
|
25
|
+
highPerformanceBoats: boolean;
|
|
26
|
+
retailCheckingAccount: boolean;
|
|
27
|
+
electricMotorHybrid: boolean;
|
|
25
28
|
};
|
|
26
29
|
export declare const BuyDownCalculator: FC<BuyDownCalculatorProps>;
|
|
@@ -16,14 +16,13 @@ import "../../Input/InputAmount.js";
|
|
|
16
16
|
import "../../Input/InputPhone.js";
|
|
17
17
|
import "../../Input/InputTextArea.js";
|
|
18
18
|
import "../../Input/DownPaymentInput.js";
|
|
19
|
-
import
|
|
19
|
+
import "../../Input/RadioButton.js";
|
|
20
20
|
import { PercentageInput } from "../../Input/PercentageInput.js";
|
|
21
|
-
import "
|
|
21
|
+
import { z } from "zod";
|
|
22
22
|
import { getVariant } from "../../utils/getVariant.js";
|
|
23
23
|
import clsx from "clsx";
|
|
24
24
|
import { useForm, FormProvider } from "react-hook-form";
|
|
25
|
-
import {
|
|
26
|
-
import { calc_container, calculator_section, section_header, theme_header, mt_8, buydown_calculator_form, row_form, limit_one, calculate_row, form_wrapper, form_disclosure } from "./BuyDownCalculator.css.js";
|
|
25
|
+
import { calc_container, calculator_section, section_header, theme_header, mt_8, buydown_calculator_form, row_form, calculate_row, form_wrapper, form_disclosure } from "./BuyDownCalculator.css.js";
|
|
27
26
|
const BuyDownCalculator = ({
|
|
28
27
|
header,
|
|
29
28
|
body,
|
|
@@ -45,12 +44,12 @@ const BuyDownCalculator = ({
|
|
|
45
44
|
const [dealerContributionAmount, setDealerContributionAmount] = useState("");
|
|
46
45
|
const [enableFullTimeCharter, setEnableFullTimeCharter] = useState(false);
|
|
47
46
|
const [disableMooringOutside, setDisableMooringOutside] = useState(false);
|
|
48
|
-
const [disableLTVAbove60, setDisableLTVAbove60] = useState(true);
|
|
49
47
|
const [isDealerContributionDisabled, setIsDealerContributionDisabled] = useState(false);
|
|
50
48
|
const [
|
|
51
49
|
isManufacturerContributionDisabled,
|
|
52
50
|
setIsManufacturerContributionDisabled
|
|
53
51
|
] = useState(false);
|
|
52
|
+
const [ltvDiscountApplied, setLtvDiscountApplied] = useState(false);
|
|
54
53
|
const schema = z.object({
|
|
55
54
|
purchasePrice: z.string().min(1, { message: "Loan amount is required." }).transform((val) => {
|
|
56
55
|
return formatToNumber(val);
|
|
@@ -111,7 +110,6 @@ const BuyDownCalculator = ({
|
|
|
111
110
|
if (purchasePrice && downpayment) {
|
|
112
111
|
const financedAmount2 = purchasePrice - downpayment;
|
|
113
112
|
const range = getRange(financedAmount2);
|
|
114
|
-
const disableLTV = checkLTVStatus(downpayment, purchasePrice);
|
|
115
113
|
if (financedAmount2 < 0) {
|
|
116
114
|
ctx.addIssue({
|
|
117
115
|
code: z.ZodIssueCode.custom,
|
|
@@ -123,11 +121,6 @@ const BuyDownCalculator = ({
|
|
|
123
121
|
const loanRange2 = getRange(financedAmount2, program);
|
|
124
122
|
setLoanRange(loanRange2);
|
|
125
123
|
}
|
|
126
|
-
if (!disableLTV) {
|
|
127
|
-
setDisableLTVAbove60(false);
|
|
128
|
-
} else {
|
|
129
|
-
setDisableLTVAbove60(true);
|
|
130
|
-
}
|
|
131
124
|
}
|
|
132
125
|
if (updateFicoRequirements(range, program) === false) {
|
|
133
126
|
ctx.addIssue({
|
|
@@ -166,7 +159,6 @@ const BuyDownCalculator = ({
|
|
|
166
159
|
}
|
|
167
160
|
}, [watchedFields]);
|
|
168
161
|
const calculator_variant = getVariant(variant);
|
|
169
|
-
const enableDependentInputs = enableFullTimeCharter;
|
|
170
162
|
const formatToNumber = (value) => {
|
|
171
163
|
const cleanValue = value.replace(/[%$, ]/gi, "");
|
|
172
164
|
return parseFloat(cleanValue);
|
|
@@ -189,7 +181,7 @@ const BuyDownCalculator = ({
|
|
|
189
181
|
const percentage = downpayment / purchasePrice * 100;
|
|
190
182
|
const loanToValue2 = 100 - percentage;
|
|
191
183
|
if (loanToValue2 <= 60) return false;
|
|
192
|
-
|
|
184
|
+
return true;
|
|
193
185
|
};
|
|
194
186
|
const getRange = (financedAmount2, program, forRates) => {
|
|
195
187
|
let range = "";
|
|
@@ -358,23 +350,34 @@ const BuyDownCalculator = ({
|
|
|
358
350
|
}
|
|
359
351
|
return rate;
|
|
360
352
|
};
|
|
361
|
-
const calculateAdjustments = () => {
|
|
353
|
+
const calculateAdjustments = (purchasePrice, downpayment) => {
|
|
362
354
|
let total = 0;
|
|
363
355
|
const checkboxes = document.querySelectorAll(
|
|
364
|
-
'input[type="checkbox"]:checked
|
|
356
|
+
'input[type="checkbox"]:checked'
|
|
365
357
|
);
|
|
366
358
|
checkboxes.forEach((checkbox) => {
|
|
367
359
|
total += parseFloat(checkbox.value);
|
|
368
360
|
});
|
|
361
|
+
if (purchasePrice && downpayment && purchasePrice > 0 && downpayment >= 0) {
|
|
362
|
+
const ltvStatus = checkLTVStatus(downpayment, purchasePrice);
|
|
363
|
+
if (!ltvStatus) {
|
|
364
|
+
total += -0.35;
|
|
365
|
+
setLtvDiscountApplied(true);
|
|
366
|
+
} else {
|
|
367
|
+
setLtvDiscountApplied(false);
|
|
368
|
+
}
|
|
369
|
+
} else {
|
|
370
|
+
setLtvDiscountApplied(false);
|
|
371
|
+
}
|
|
369
372
|
return total;
|
|
370
373
|
};
|
|
371
|
-
const calculateRates = (program, fico, financedAmount2, buydownRate) => {
|
|
374
|
+
const calculateRates = (program, fico, financedAmount2, buydownRate, purchasePrice, downpayment) => {
|
|
372
375
|
const minRate = 6.94;
|
|
373
376
|
const loanRange2 = getRange(financedAmount2, program, true);
|
|
374
377
|
const startingRate = parseFloat(
|
|
375
378
|
getInterestRate(program, fico, loanRange2).replace(/[%,]/g, "")
|
|
376
379
|
);
|
|
377
|
-
const rateAdjustments = calculateAdjustments();
|
|
380
|
+
const rateAdjustments = calculateAdjustments(purchasePrice, downpayment);
|
|
378
381
|
const adjustedRate = startingRate + rateAdjustments;
|
|
379
382
|
const finalNoteRateValue = Math.max(minRate, adjustedRate);
|
|
380
383
|
const finalNoteRate2 = formatToPercentage(finalNoteRateValue);
|
|
@@ -469,13 +472,19 @@ const BuyDownCalculator = ({
|
|
|
469
472
|
setManuContributionPercentage(percentage);
|
|
470
473
|
return manufacturerContribution;
|
|
471
474
|
};
|
|
472
|
-
const calculateDealerContributionAmount = (dealerContribution, totalBuydownCost2) => {
|
|
473
|
-
|
|
475
|
+
const calculateDealerContributionAmount = (dealerContribution, manufacturerContributionAmount, totalBuydownCost2) => {
|
|
476
|
+
let dealerContributionValue;
|
|
477
|
+
if (dealerContribution > 0) {
|
|
478
|
+
dealerContributionValue = totalBuydownCost2 * (dealerContribution / 100);
|
|
479
|
+
} else {
|
|
480
|
+
dealerContributionValue = totalBuydownCost2 - manufacturerContributionAmount;
|
|
481
|
+
}
|
|
474
482
|
const formattedAmount = formatToCurrency(dealerContributionValue);
|
|
475
483
|
setDealerContributionAmount(formattedAmount);
|
|
476
484
|
};
|
|
477
485
|
const onSubmit = (data) => {
|
|
478
486
|
if (isValid) {
|
|
487
|
+
setLtvDiscountApplied(false);
|
|
479
488
|
const {
|
|
480
489
|
buydownRate,
|
|
481
490
|
buydownTerm,
|
|
@@ -495,7 +504,9 @@ const BuyDownCalculator = ({
|
|
|
495
504
|
program,
|
|
496
505
|
fico,
|
|
497
506
|
financedAmountValue,
|
|
498
|
-
buydownRate
|
|
507
|
+
buydownRate,
|
|
508
|
+
purchasePrice,
|
|
509
|
+
downpayment
|
|
499
510
|
);
|
|
500
511
|
const buydownPayment2 = calculateBuydownPayment(
|
|
501
512
|
buydownRate,
|
|
@@ -517,7 +528,11 @@ const BuyDownCalculator = ({
|
|
|
517
528
|
manufacturerContributionAmount,
|
|
518
529
|
totalBuydownCost2
|
|
519
530
|
);
|
|
520
|
-
calculateDealerContributionAmount(
|
|
531
|
+
calculateDealerContributionAmount(
|
|
532
|
+
dealerContribution,
|
|
533
|
+
manufacturerContributionAmount,
|
|
534
|
+
totalBuydownCost2
|
|
535
|
+
);
|
|
521
536
|
}
|
|
522
537
|
};
|
|
523
538
|
return /* @__PURE__ */ jsxs("section", { className: `${calc_container({ variant: calculator_variant })}`, children: [
|
|
@@ -689,7 +704,7 @@ const BuyDownCalculator = ({
|
|
|
689
704
|
required: true,
|
|
690
705
|
deps: ["program"]
|
|
691
706
|
}),
|
|
692
|
-
label: "Buydown Term
|
|
707
|
+
label: "Buydown Term",
|
|
693
708
|
sizes: "medium",
|
|
694
709
|
required: true,
|
|
695
710
|
error: !!errors.buydownTerm,
|
|
@@ -700,56 +715,57 @@ const BuyDownCalculator = ({
|
|
|
700
715
|
children: BuydownTerm.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }, item.value))
|
|
701
716
|
}
|
|
702
717
|
) }) }),
|
|
703
|
-
/* @__PURE__ */ jsx("div", { className: `${row_form}`, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("label", { children: "Loan Level Rate Adjustments" }) }) }),
|
|
718
|
+
/* @__PURE__ */ jsx("div", { className: `${row_form}`, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("label", { children: "Loan Level Rate Adjustments. Rate Adjustments are subject to change, are limited, and restricted by floor rate." }) }) }),
|
|
704
719
|
/* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
|
|
705
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", { className: row_form, children: /* @__PURE__ */ jsxs(
|
|
706
|
-
RadioButtonSet,
|
|
707
|
-
{
|
|
708
|
-
id: "dependentInputs",
|
|
709
|
-
label: "Limit One",
|
|
710
|
-
sizes: "medium",
|
|
711
|
-
variant,
|
|
712
|
-
direction: "column",
|
|
713
|
-
disabled: !enableDependentInputs,
|
|
714
|
-
className: limit_one,
|
|
715
|
-
children: [
|
|
716
|
-
/* @__PURE__ */ jsx(
|
|
717
|
-
RadioButton,
|
|
718
|
-
{
|
|
719
|
-
id: "mooringOutsideContinentalUS",
|
|
720
|
-
...register("mooringOutsideContinentalUS"),
|
|
721
|
-
value: 0.5,
|
|
722
|
-
radioText: "Mooring Outside Continental U.S. (Includes Puerto Rico,\r\n Hawaii, and Alaska) (Does not apply to Full Time Charter)\r\n +0.500",
|
|
723
|
-
groupName: "dependentInputs",
|
|
724
|
-
disabled: disableMooringOutside
|
|
725
|
-
}
|
|
726
|
-
),
|
|
727
|
-
/* @__PURE__ */ jsx(
|
|
728
|
-
RadioButton,
|
|
729
|
-
{
|
|
730
|
-
id: "operatingAccount",
|
|
731
|
-
...register("operatingAccount"),
|
|
732
|
-
value: -0.25,
|
|
733
|
-
radioText: "Open and fund an LLC Operating Account with Axos - 0.25",
|
|
734
|
-
groupName: "dependentInputs"
|
|
735
|
-
}
|
|
736
|
-
)
|
|
737
|
-
]
|
|
738
|
-
}
|
|
739
|
-
) }) }),
|
|
740
720
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
741
|
-
/* @__PURE__ */ jsx("div", {
|
|
721
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
722
|
+
Checkbox,
|
|
723
|
+
{
|
|
724
|
+
id: "mooringOutsideContinentalUS",
|
|
725
|
+
...register("mooringOutsideContinentalUS"),
|
|
726
|
+
sizes: "medium",
|
|
727
|
+
variant: calculator_variant,
|
|
728
|
+
value: 0.5,
|
|
729
|
+
disabled: !enableFullTimeCharter || disableMooringOutside,
|
|
730
|
+
children: "Mooring Outside Continental U.S. (Includes Puerto Rico, Hawaii, and Alaska) (Does not apply to Full Time Charter) +0.500"
|
|
731
|
+
}
|
|
732
|
+
) }),
|
|
733
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
734
|
+
Checkbox,
|
|
735
|
+
{
|
|
736
|
+
id: "operatingAccount",
|
|
737
|
+
...register("operatingAccount"),
|
|
738
|
+
sizes: "medium",
|
|
739
|
+
variant: calculator_variant,
|
|
740
|
+
value: -0.25,
|
|
741
|
+
disabled: !enableFullTimeCharter,
|
|
742
|
+
children: "Open and fund an LLC Operating Account with Axos - 0.25"
|
|
743
|
+
}
|
|
744
|
+
) }),
|
|
745
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
742
746
|
Checkbox,
|
|
743
747
|
{
|
|
744
|
-
id: "
|
|
745
|
-
...register("
|
|
748
|
+
id: "vesselOver15Years",
|
|
749
|
+
...register("vesselOver15Years"),
|
|
746
750
|
sizes: "medium",
|
|
747
|
-
variant,
|
|
748
|
-
value:
|
|
749
|
-
|
|
750
|
-
children: "LTV ≤ 60% (If not required by program) -0.350"
|
|
751
|
+
variant: calculator_variant,
|
|
752
|
+
value: 1.25,
|
|
753
|
+
children: "Vessel > 15 Years +1.250"
|
|
751
754
|
}
|
|
752
755
|
) }),
|
|
756
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
757
|
+
Checkbox,
|
|
758
|
+
{
|
|
759
|
+
id: "highPerformanceBoats",
|
|
760
|
+
...register("highPerformanceBoats"),
|
|
761
|
+
sizes: "medium",
|
|
762
|
+
variant: calculator_variant,
|
|
763
|
+
value: 0.5,
|
|
764
|
+
children: "High Performance Boats (>4 Engines) +0.500"
|
|
765
|
+
}
|
|
766
|
+
) })
|
|
767
|
+
] }),
|
|
768
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
753
769
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
754
770
|
Checkbox,
|
|
755
771
|
{
|
|
@@ -758,7 +774,29 @@ const BuyDownCalculator = ({
|
|
|
758
774
|
sizes: "medium",
|
|
759
775
|
variant: calculator_variant,
|
|
760
776
|
value: -0.125,
|
|
761
|
-
children: "
|
|
777
|
+
children: "Floor Plan Dealer Incentive -0.125"
|
|
778
|
+
}
|
|
779
|
+
) }),
|
|
780
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
781
|
+
Checkbox,
|
|
782
|
+
{
|
|
783
|
+
id: "retailCheckingAccount",
|
|
784
|
+
...register("retailCheckingAccount"),
|
|
785
|
+
sizes: "medium",
|
|
786
|
+
variant: calculator_variant,
|
|
787
|
+
value: -0.125,
|
|
788
|
+
children: "Retail Checking Account w/ACH and Minimum of 3 Months P&I Balance -0.125"
|
|
789
|
+
}
|
|
790
|
+
) }),
|
|
791
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
792
|
+
Checkbox,
|
|
793
|
+
{
|
|
794
|
+
id: "electricMotorHybrid",
|
|
795
|
+
...register("electricMotorHybrid"),
|
|
796
|
+
sizes: "medium",
|
|
797
|
+
variant: calculator_variant,
|
|
798
|
+
value: -0.25,
|
|
799
|
+
children: "100% Electric Motor / Hybrid -0.250"
|
|
762
800
|
}
|
|
763
801
|
) }),
|
|
764
802
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
@@ -853,7 +891,8 @@ const BuyDownCalculator = ({
|
|
|
853
891
|
label: "Final Note Rate",
|
|
854
892
|
disabled: true,
|
|
855
893
|
variant: calculator_variant,
|
|
856
|
-
value: finalNoteRate
|
|
894
|
+
value: finalNoteRate,
|
|
895
|
+
helperText: ltvDiscountApplied && "LTV discount applied"
|
|
857
896
|
}
|
|
858
897
|
) })
|
|
859
898
|
] }),
|
|
@@ -874,7 +913,7 @@ const BuyDownCalculator = ({
|
|
|
874
913
|
{
|
|
875
914
|
id: "buydownPayment",
|
|
876
915
|
sizes: "medium",
|
|
877
|
-
label: "
|
|
916
|
+
label: "Monthly payment WITH buydown",
|
|
878
917
|
disabled: true,
|
|
879
918
|
variant: calculator_variant,
|
|
880
919
|
value: buydownPayment
|
|
@@ -887,7 +926,7 @@ const BuyDownCalculator = ({
|
|
|
887
926
|
{
|
|
888
927
|
id: "nonBuydownPayment",
|
|
889
928
|
sizes: "medium",
|
|
890
|
-
label: "
|
|
929
|
+
label: "Monthly Payment WITHOUT buydown",
|
|
891
930
|
disabled: true,
|
|
892
931
|
variant: calculator_variant,
|
|
893
932
|
value: nonBuydownPayment
|