@axos-web-dev/shared-components 2.0.0-queryparams.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -111
- package/dist/ATMLocator/ATMLocator.d.ts +1 -1
- package/dist/ATMLocator/ATMLocator.js +2 -3
- package/dist/Accordion/Accordion.d.ts +3 -3
- package/dist/Article/Article.d.ts +1 -1
- package/dist/Auth/ErrorAlert.d.ts +1 -1
- package/dist/Auth/ErrorAlert.js +2 -3
- package/dist/Auth/Logout.d.ts +1 -1
- package/dist/Auth/SignInPassword.d.ts +1 -1
- package/dist/Avatar/Avatar.module.js +7 -7
- package/dist/Blockquote/Blockquote.module.js +3 -3
- package/dist/BulletItem/BulletItem.d.ts +1 -1
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +3 -22
- package/dist/Button/GoBackButton.d.ts +1 -1
- package/dist/Calculators/AnnualFeeCalculator/index.js +1 -1
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.d.ts +46 -5
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.js +72 -19
- package/dist/Calculators/ApyCalculator/index.js +583 -293
- package/dist/Calculators/Calculator.d.ts +1 -1
- package/dist/Calculators/Calculator.js +4 -5
- package/dist/Calculators/MarginTradingCalculator/index.js +2 -3
- package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +1 -1
- package/dist/Calculators/MaxLoanCalculator/index.js +1 -1
- package/dist/Calculators/MonthlyPaymentCalculator/index.js +1 -1
- package/dist/Calculators/calculator.css.d.ts +21 -1
- package/dist/Calculators/calculator.css.js +3 -3
- package/dist/Carousel/index.d.ts +3 -3
- package/dist/Carousel/index.js +3 -4
- package/dist/Chatbot/Bubble.d.ts +2 -1
- package/dist/Chatbot/Chat.d.ts +1 -1
- package/dist/Chatbot/ChatWindow.js +31 -19
- package/dist/Chatbot/Chatbot.d.ts +11 -3
- package/dist/Chatbot/Chatbot.js +98 -66
- package/dist/Chatbot/ChatbotMessage.d.ts +1 -0
- package/dist/Chatbot/ChatbotMessage.js +5 -1
- package/dist/Chatbot/EllipsisAnimation.d.ts +1 -1
- package/dist/Chatbot/EllipsisIcon.d.ts +1 -1
- package/dist/Chevron/index.js +2 -15
- package/dist/Comparison/Comparison.d.ts +1 -1
- package/dist/Comparison/Comparison.js +2 -3
- package/dist/Comparison/ComparisonSet.d.ts +1 -1
- package/dist/ExecutiveBio/ExecutiveBio.d.ts +1 -1
- package/dist/ExecutiveBio/ExecutiveBio.js +2 -3
- package/dist/ExecutiveBio/ExecutiveBioSet.d.ts +1 -1
- package/dist/ExecutiveBio/Overlay.d.ts +1 -1
- package/dist/FaqAccordion/index.d.ts +5 -5
- package/dist/FaqAccordion/index.js +2 -3
- package/dist/FdicCallout/FdicCallout.module.js +2 -2
- package/dist/FdicCallout/index.d.ts +1 -1
- package/dist/FooterDisclosure/FooterDisclosure.d.ts +4 -4
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.d.ts +1 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.d.ts +1 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +20 -3
- package/dist/Forms/ApplicationStart.d.ts +1 -1
- package/dist/Forms/ApplyNow.d.ts +1 -1
- package/dist/Forms/ApplyNow.js +3 -4
- package/dist/Forms/BoatMooringLocation.d.ts +7 -2
- package/dist/Forms/BoatMooringLocation.js +145 -8
- package/dist/Forms/ClearingForm.d.ts +1 -1
- package/dist/Forms/CommercialDeposits.d.ts +1 -1
- package/dist/Forms/CommercialDepositsNoLendingOption.d.ts +1 -1
- package/dist/Forms/CommercialLending.d.ts +1 -1
- package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
- package/dist/Forms/ConstructionLendingDynamic.d.ts +1 -1
- package/dist/Forms/ContactCompany.d.ts +1 -1
- package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
- package/dist/Forms/ContactUs.d.ts +1 -1
- package/dist/Forms/ContactUsAAS.d.ts +1 -1
- package/dist/Forms/ContactUsBusiness.d.ts +1 -1
- package/dist/Forms/ContactUsBusiness.js +2 -3
- package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
- package/dist/Forms/ContactUsBusinessNameEmail.js +2 -3
- package/dist/Forms/ContactUsLVF.d.ts +1 -1
- package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
- package/dist/Forms/ContactUsNMLSId.js +2 -3
- package/dist/Forms/CpraRequest.d.ts +1 -1
- package/dist/Forms/CpraRequest.js +2 -3
- package/dist/Forms/CraPublicFile.d.ts +1 -1
- package/dist/Forms/CraPublicFile.js +2 -3
- package/dist/Forms/DealerServices.d.ts +1 -1
- package/dist/Forms/EmailOnly.d.ts +1 -1
- package/dist/Forms/EmailOnly.js +2 -3
- package/dist/Forms/EmailUs.d.ts +1 -1
- package/dist/Forms/EmailUs.js +40 -34
- package/dist/Forms/FormEnums.js +2 -2
- package/dist/Forms/Forms.css.d.ts +3 -0
- package/dist/Forms/Forms.css.js +39 -39
- package/dist/Forms/HoneyPot/index.d.ts +1 -1
- package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
- package/dist/Forms/MortgageRate/MortgageRateForm.js +3 -4
- package/dist/Forms/MortgageRate/MortgageRateQuoteFilters.d.ts +1 -1
- package/dist/Forms/MortgageRate/MortgageRateWatch.d.ts +1 -1
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +3 -4
- package/dist/Forms/MortgageWarehouseLending.d.ts +1 -1
- package/dist/Forms/MortgageWarehouseLending.js +2 -3
- package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
- package/dist/Forms/QuickPricer/UserInformation.d.ts +1 -1
- package/dist/Forms/ScheduleCall.d.ts +1 -1
- package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
- package/dist/Forms/SuccesForm.d.ts +1 -1
- package/dist/Forms/SuccesForm.js +4 -5
- package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
- package/dist/Forms/WcplSurvey.d.ts +1 -1
- package/dist/HeroBanner/HeroBanner.css.d.ts +1 -0
- package/dist/HeroBanner/HeroBanner.css.js +19 -16
- package/dist/HeroBanner/HeroBanner.d.ts +1 -1
- package/dist/HeroBanner/HeroBanner.interface.d.ts +4 -1
- package/dist/HeroBanner/HeroBanner.js +26 -160
- package/dist/HeroBanner/HeroVideoPoster.d.ts +5 -0
- package/dist/HeroBanner/HeroVideoPoster.js +24 -0
- package/dist/HeroBanner/LargeBanner.css.d.ts +110 -0
- package/dist/HeroBanner/LargeBanner.css.js +22 -8
- package/dist/HeroBanner/LargeHeroBanner.d.ts +5 -0
- package/dist/HeroBanner/LargeHeroBanner.js +228 -0
- package/dist/HeroBanner/index.js +3 -2
- package/dist/Hyperlink/index.js +2 -15
- package/dist/IconBillboard/IconBillboard.d.ts +1 -1
- package/dist/IconBillboard/IconBillboardSet.d.ts +1 -1
- package/dist/IconBillboard/sections/CallToActionSection.d.ts +1 -1
- package/dist/IconBillboard/sections/CallToActionSection.js +3 -1
- package/dist/IconBillboard/sections/HeaderSection.d.ts +2 -2
- package/dist/IconBillboard/sections/IconSection.d.ts +1 -1
- package/dist/IconBillboard/sections/ItemsSection.d.ts +1 -1
- package/dist/IconBillboard/sections/LayoutSection.d.ts +1 -1
- package/dist/ImageBillboard/ExitIntentModal/ModalWrapper.d.ts +1 -1
- package/dist/ImageBillboard/ImageBillboard.d.ts +1 -1
- package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
- package/dist/ImageLink/ImageLink.d.ts +1 -1
- package/dist/ImageLink/ImageLink.js +2 -3
- package/dist/ImageLink/ImageLinkSet.d.ts +1 -1
- package/dist/ImageLink/ImageLinkSet.js +1 -2
- package/dist/ImageLink/index.js +2 -3
- package/dist/ImageWrapper/ImageWrapper.d.ts +1 -1
- package/dist/Insight/Featured/CategorySelector.d.ts +2 -2
- package/dist/Insight/Featured/CategorySelector.js +3 -4
- package/dist/Insight/Featured/Featured.d.ts +2 -2
- package/dist/Insight/Featured/Featured.js +3 -4
- package/dist/Insight/Featured/Header.d.ts +1 -1
- package/dist/Insight/Featured/Header.js +3 -4
- package/dist/Interstitial/Interstitial.module.js +10 -10
- package/dist/LandingPageHeader/LandingPageHeader.d.ts +1 -1
- package/dist/LoadingIndicator/index.d.ts +1 -1
- package/dist/MainHTML/index.d.ts +1 -1
- package/dist/Modal/Modal.js +2 -3
- package/dist/Modal/contextApi/store.d.ts +1 -1
- package/dist/NavigationMenu/AxosALTS/NavBar.module.js +23 -23
- package/dist/NavigationMenu/AxosALTS/index.d.ts +1 -1
- package/dist/NavigationMenu/AxosALTS/index.js +2 -3
- package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
- package/dist/NavigationMenu/AxosAdvisor/SubNavBar.d.ts +1 -1
- package/dist/NavigationMenu/AxosAdvisor/index.d.ts +1 -1
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavBar.d.ts +1 -1
- package/dist/NavigationMenu/AxosAdvisorServices/index.d.ts +1 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.d.ts +1 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +2 -3
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +27 -27
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +13 -8
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +29 -26
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
- package/dist/NavigationMenu/AxosBank/SubNavBar.d.ts +1 -1
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +72 -38
- package/dist/NavigationMenu/AxosBank/index.d.ts +1 -1
- package/dist/NavigationMenu/AxosBank/index.js +31 -30
- package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
- package/dist/NavigationMenu/AxosClearing/SubNavBar.d.ts +1 -1
- package/dist/NavigationMenu/AxosClearing/index.d.ts +1 -1
- package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +41 -41
- package/dist/NavigationMenu/AxosFiduciary/index.d.ts +1 -1
- package/dist/NavigationMenu/LaVictoire/NavBar.module.js +37 -37
- package/dist/NavigationMenu/LaVictoire/SubNavBar.d.ts +1 -1
- package/dist/NavigationMenu/LaVictoire/index.d.ts +1 -1
- package/dist/NavigationMenu/LaVictoire/index.js +2 -3
- package/dist/NavigationMenu/NavItem/index.d.ts +1 -1
- package/dist/NavigationMenu/Navbar.d.ts +1 -1
- package/dist/NavigationMenu/Navbar.js +2 -3
- package/dist/NavigationMenu/SignInNavButton.d.ts +3 -1
- package/dist/NavigationMenu/SignInNavButton.js +2 -3
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/SecondaryFooter/index.d.ts +1 -1
- package/dist/SetContainer/SetContainer.css.d.ts +1 -0
- package/dist/SetContainer/SetContainer.css.js +5 -3
- package/dist/SetContainer/SetContainer.d.ts +1 -1
- package/dist/SetContainer/SetContainer.js +10 -5
- package/dist/SetContainer/index.js +2 -1
- package/dist/SocialMediaBar/iconsRepository.d.ts +14 -14
- package/dist/SocialMediaBar/iconsRepository.js +2 -3
- package/dist/SocialMediaBar/index.d.ts +1 -1
- package/dist/Tab/Tab.d.ts +1 -1
- package/dist/Tab/TabContainer.d.ts +1 -1
- package/dist/Table/Table.css.d.ts +21 -1
- package/dist/Table/Table.css.js +18 -18
- package/dist/Table/Table.d.ts +5 -5
- package/dist/Table/Table.js +5 -3
- package/dist/TextBlock/TextBlock.d.ts +1 -1
- package/dist/Topic/Topic.d.ts +4 -4
- package/dist/VideoTile/VideoInit.d.ts +1 -1
- package/dist/VideoTile/VideoTile.js +2 -3
- package/dist/VideoWrapper/index.js +2 -3
- package/dist/WalnutIframe/index.d.ts +1 -1
- package/dist/WalnutIframe/wrapper.module.js +3 -3
- package/dist/assets/Avatar/Avatar.css +59 -59
- package/dist/assets/Blockquote/Blockquote.css +72 -72
- package/dist/assets/Calculators/ApyCalculator/ApyCalculator.css +350 -64
- package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +2 -2
- package/dist/assets/Calculators/calculator.css +25 -15
- package/dist/assets/Chatbot/AnimatedGradientBorder.css +1 -1
- package/dist/assets/Chatbot/ChatWindow.css +19 -19
- package/dist/assets/Comparison/Comparison.css +2 -2
- package/dist/assets/DownloadTile/DownloadTile.css +7 -0
- package/dist/assets/ExecutiveBio/ExecutiveBio.css +0 -2
- package/dist/assets/FdicCallout/FdicCallout.css +48 -48
- package/dist/assets/Forms/Forms.css +94 -91
- package/dist/assets/HeroBanner/HeroBanner.css +82 -65
- package/dist/assets/HeroBanner/LargeBanner.css +126 -59
- package/dist/assets/ImageBillboard/ImageBillboard.css +1 -1
- package/dist/assets/Interstitial/Interstitial.css +142 -142
- package/dist/assets/NavigationMenu/AxosALTS/NavBar.css +264 -264
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +609 -609
- package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css +630 -630
- package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css +353 -353
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css +445 -445
- package/dist/assets/NavigationMenu/AxosClearing/NavBar.css +484 -484
- package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css +427 -427
- package/dist/assets/NavigationMenu/LaVictoire/NavBar.css +429 -429
- package/dist/assets/SetContainer/SetContainer.css +25 -15
- package/dist/assets/Table/Table.css +90 -75
- package/dist/assets/TextBlock/TextBlock.css +7 -0
- package/dist/assets/VideoTile/VideoTile.css +6 -0
- package/dist/assets/WalnutIframe/wrapper.css +48 -48
- package/dist/assets/globals.css +9 -9
- package/dist/assets/themes/axos.css +8 -7
- package/dist/assets/themes/premier.css +9 -8
- package/dist/assets/themes/ufb.css +9 -8
- package/dist/assets/themes/victorie.css +9 -8
- package/dist/assets/utils/optimizeImage/optimizeImage.css +47 -47
- package/dist/icons/AxosX/Blue.d.ts +1 -1
- package/dist/icons/AxosX/index.d.ts +1 -1
- package/dist/icons/CheckCircle.d.ts +1 -1
- package/dist/icons/CheckCircleLight.d.ts +1 -1
- package/dist/icons/CheckIcon/index.d.ts +1 -1
- package/dist/icons/ChevronDown.d.ts +1 -1
- package/dist/icons/ChevronUp.d.ts +1 -1
- package/dist/icons/Clock/index.d.ts +1 -1
- package/dist/icons/EqualHousingLender.d.ts +1 -1
- package/dist/icons/Logos/AAS.d.ts +1 -1
- package/dist/icons/Logos/AFS.d.ts +1 -1
- package/dist/icons/Logos/AXA.d.ts +1 -1
- package/dist/icons/Logos/AXB.d.ts +1 -1
- package/dist/icons/Logos/AXC.d.ts +1 -1
- package/dist/icons/Logos/AXI.d.ts +1 -1
- package/dist/icons/Logos/AXOS.d.ts +1 -1
- package/dist/icons/Logos/GBLVF.d.ts +1 -1
- package/dist/icons/Logos/LVF.d.ts +1 -1
- package/dist/icons/Logos/LVFText.d.ts +1 -1
- package/dist/icons/Logos/SPB.d.ts +1 -1
- package/dist/icons/MemberFdicLogo.d.ts +1 -1
- package/dist/icons/QuoteIconGrey.d.ts +1 -1
- package/dist/icons/QuoteIconWhite.d.ts +1 -1
- package/dist/icons/QuoteIconYellow.d.ts +1 -1
- package/dist/main.js +5 -8
- package/dist/themes/axos.css.d.ts +1 -0
- package/dist/themes/axos.css.js +1 -1
- package/dist/utils/appendQueryParams.js +53 -16
- package/dist/utils/getPosition.d.ts +1 -0
- package/dist/utils/getPosition.js +17 -0
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -5
- package/dist/utils/optimizeImage/optimizeImage.module.js +3 -3
- package/dist/utils/variant.types.d.ts +1 -0
- package/package.json +148 -149
- package/dist/utils/samePageNavigation.d.ts +0 -3
- package/dist/utils/samePageNavigation.js +0 -23
- package/dist/utils/samePageQueryParamsNavigation.d.ts +0 -4
- package/dist/utils/samePageQueryParamsNavigation.js +0 -63
|
@@ -16,4 +16,4 @@ export interface CalculatorProps {
|
|
|
16
16
|
initialBalance?: number;
|
|
17
17
|
callToActionRow?: ChevronProps[];
|
|
18
18
|
}
|
|
19
|
-
export declare const Calculator: (props: CalculatorProps) =>
|
|
19
|
+
export declare const Calculator: (props: CalculatorProps) => React.JSX.Element;
|
|
@@ -39,7 +39,7 @@ import { ApyCalculator } from "./ApyCalculator/index.js";
|
|
|
39
39
|
import { AxosOneCalculator } from "./AxosOneCalculator/index.js";
|
|
40
40
|
import { BalanceAPYCalculator } from "./BalanceAPYCalculator/index.js";
|
|
41
41
|
import { BuyDownCalculator } from "./BuyDownCalculator/index.js";
|
|
42
|
-
import { calculator_headline, calculator_description } from "./calculator.css.js";
|
|
42
|
+
import { calculator_headline, calculator_description, calculator } from "./calculator.css.js";
|
|
43
43
|
import { MarginTradingCalculator } from "./MarginTradingCalculator/index.js";
|
|
44
44
|
import { MarineLoanMonthlyPaymentCalculator } from "./MarineLoanMonthlyPaymentCalculator/index.js";
|
|
45
45
|
import { MaxLoanCalculator } from "./MaxLoanCalculator/index.js";
|
|
@@ -52,16 +52,15 @@ import "../Carousel/index.js";
|
|
|
52
52
|
/* empty css */
|
|
53
53
|
/* empty css */
|
|
54
54
|
import "../Chatbot/store/chat.js";
|
|
55
|
-
import "../Chatbot/authenticate.js";
|
|
56
|
-
/* empty css */
|
|
57
55
|
import "react-use";
|
|
56
|
+
/* empty css */
|
|
58
57
|
/* empty css */
|
|
59
58
|
import "../Chatbot/store/messages.js";
|
|
60
59
|
/* empty css */
|
|
61
60
|
import "../Comparison/Comparison.css.js";
|
|
62
61
|
import "next/image.js";
|
|
63
|
-
import "../HeroBanner/HeroBanner.css.js";
|
|
64
62
|
import "../HeroBanner/LargeBanner.css.js";
|
|
63
|
+
import "../HeroBanner/HeroBanner.css.js";
|
|
65
64
|
import "../HeroBanner/SelectionBanner.css.js";
|
|
66
65
|
import "../SetContainer/SetContainer.css.js";
|
|
67
66
|
import "../Tab/Tab.css.js";
|
|
@@ -271,7 +270,7 @@ const Calculator = (props) => {
|
|
|
271
270
|
}
|
|
272
271
|
);
|
|
273
272
|
} else {
|
|
274
|
-
return /* @__PURE__ */ jsx("section", { id, children: /* @__PURE__ */ jsxs("div", { className: clsx("containment"), children: [
|
|
273
|
+
return /* @__PURE__ */ jsx("section", { id, className: clsx(calculator({ variant })), children: /* @__PURE__ */ jsxs("div", { className: clsx("containment"), children: [
|
|
275
274
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
276
275
|
icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
|
|
277
276
|
/* @__PURE__ */ jsx(
|
|
@@ -27,6 +27,7 @@ import "../../Article/Article.css.js";
|
|
|
27
27
|
import "../../ArticlesSet/ArticlesSet.css.js";
|
|
28
28
|
import "../AnnualFeeCalculator/AnnualFeeCalculator.css.js";
|
|
29
29
|
import { useGlobalContext } from "../../Modal/contextApi/store.js";
|
|
30
|
+
import "next/image.js";
|
|
30
31
|
import "../../Table/Table.css.js";
|
|
31
32
|
import "../AxosOneCalculator/BalanceAPYCalculator.css.js";
|
|
32
33
|
import "../BalanceAPYCalculator/BalanceAPYCalculator.css.js";
|
|
@@ -74,15 +75,13 @@ import "../../Carousel/index.js";
|
|
|
74
75
|
/* empty css */
|
|
75
76
|
/* empty css */
|
|
76
77
|
import "../../Chatbot/store/chat.js";
|
|
77
|
-
import "../../Chatbot/authenticate.js";
|
|
78
78
|
/* empty css */
|
|
79
79
|
/* empty css */
|
|
80
80
|
import "../../Chatbot/store/messages.js";
|
|
81
81
|
/* empty css */
|
|
82
82
|
import "../../Comparison/Comparison.css.js";
|
|
83
|
-
import "next/image.js";
|
|
84
|
-
import "../../HeroBanner/HeroBanner.css.js";
|
|
85
83
|
import "../../HeroBanner/LargeBanner.css.js";
|
|
84
|
+
import "../../HeroBanner/HeroBanner.css.js";
|
|
86
85
|
import "../../HeroBanner/SelectionBanner.css.js";
|
|
87
86
|
import "../../SetContainer/SetContainer.css.js";
|
|
88
87
|
import "../../Tab/Tab.css.js";
|
|
@@ -108,7 +108,7 @@ const MarineLoanMonthlyPaymentCalculator = ({ variant, header, disclosure, bodyC
|
|
|
108
108
|
setEstimatedPayment(0);
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
|
-
return /* @__PURE__ */ jsx("section", { className: clsx(calculator), children: /* @__PURE__ */ jsx("div", { className: "containment", children: /* @__PURE__ */ jsxs(
|
|
111
|
+
return /* @__PURE__ */ jsx("section", { className: clsx(calculator({ variant: fullVariant })), children: /* @__PURE__ */ jsx("div", { className: "containment", children: /* @__PURE__ */ jsxs(
|
|
112
112
|
"div",
|
|
113
113
|
{
|
|
114
114
|
className: `rounded ${calc_container} ${container({ variant: fullVariant })}`,
|
|
@@ -111,7 +111,7 @@ const MaxLoanCalculator = ({
|
|
|
111
111
|
setLoanAmount(0);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
-
return /* @__PURE__ */ jsx("section", { className: clsx(calculator), children: /* @__PURE__ */ jsx("div", { className: "containment", children: /* @__PURE__ */ jsxs(
|
|
114
|
+
return /* @__PURE__ */ jsx("section", { className: clsx(calculator({ variant: fullVariant })), children: /* @__PURE__ */ jsx("div", { className: "containment", children: /* @__PURE__ */ jsxs(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
className: `rounded ${calc_container} ${container({ variant: fullVariant })}`,
|
|
@@ -110,7 +110,7 @@ const MonthlyPaymentCalculator = ({
|
|
|
110
110
|
setEstimatedPayment(0);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
return /* @__PURE__ */ jsx("section", { className: clsx(calculator), children: /* @__PURE__ */ jsx("div", { className: "containment", children: /* @__PURE__ */ jsxs(
|
|
113
|
+
return /* @__PURE__ */ jsx("section", { className: clsx(calculator({ variant: fullVariant })), children: /* @__PURE__ */ jsx("div", { className: "containment", children: /* @__PURE__ */ jsxs(
|
|
114
114
|
"div",
|
|
115
115
|
{
|
|
116
116
|
className: `rounded ${calc_container} ${container({ variant: fullVariant })}`,
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
export declare const calculator:
|
|
1
|
+
export declare const calculator: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
2
|
+
variant: {
|
|
3
|
+
primary: {
|
|
4
|
+
marginInline: "auto";
|
|
5
|
+
paddingBlock: "2.5rem";
|
|
6
|
+
selectors: {
|
|
7
|
+
".page_body_contents > div:not(:first-child) &": {
|
|
8
|
+
paddingTop: "0px";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
"@media": {
|
|
12
|
+
"screen and (max-width: 768px)": {
|
|
13
|
+
paddingBlock: "1.5rem";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
secondary: {};
|
|
18
|
+
tertiary: {};
|
|
19
|
+
quaternary: {};
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
2
22
|
export declare const calculator_description: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
3
23
|
variant: {
|
|
4
24
|
primary: {
|
|
@@ -5,9 +5,9 @@ import '../assets/Calculators/calculator.css';import '../assets/themes/victorie.
|
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
8
|
-
var calculator = "iois7n0";
|
|
9
|
-
var calculator_description = createRuntimeFn({ defaultClassName: "
|
|
10
|
-
var calculator_headline = createRuntimeFn({ defaultClassName: "
|
|
8
|
+
var calculator = createRuntimeFn({ defaultClassName: "iois7n0", variantClassNames: { variant: { primary: "iois7n1", secondary: "iois7n2", tertiary: "iois7n3", quaternary: "iois7n4" } }, defaultVariants: { variant: "primary" }, compoundVariants: [] });
|
|
9
|
+
var calculator_description = createRuntimeFn({ defaultClassName: "iois7n5", variantClassNames: { variant: { primary: "iois7n6", secondary: "iois7n7", tertiary: "iois7n8", quaternary: "iois7n9" } }, defaultVariants: {}, compoundVariants: [] });
|
|
10
|
+
var calculator_headline = createRuntimeFn({ defaultClassName: "iois7na", variantClassNames: { variant: { primary: "iois7nb", secondary: "iois7nc", tertiary: "iois7nd", quaternary: "iois7ne" } }, defaultVariants: {}, compoundVariants: [] });
|
|
11
11
|
export {
|
|
12
12
|
calculator,
|
|
13
13
|
calculator_description,
|
package/dist/Carousel/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { carouselVariants } from './Carousel.css';
|
|
3
3
|
|
|
4
4
|
export interface SlideProps extends PropsWithChildren {
|
|
@@ -17,5 +17,5 @@ export interface CarouselProps extends PropsWithChildren {
|
|
|
17
17
|
description?: ReactNode;
|
|
18
18
|
internalName?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare const CarouselSlide: (props: SlideProps & carouselVariants) =>
|
|
21
|
-
export declare const Carousel: (props: CarouselProps & carouselVariants) =>
|
|
20
|
+
export declare const CarouselSlide: (props: SlideProps & carouselVariants) => React.JSX.Element;
|
|
21
|
+
export declare const Carousel: (props: CarouselProps & carouselVariants) => React.JSX.Element;
|
package/dist/Carousel/index.js
CHANGED
|
@@ -24,8 +24,9 @@ import "../Article/Article.css.js";
|
|
|
24
24
|
import "../ArticlesSet/ArticlesSet.css.js";
|
|
25
25
|
import "../Calculators/calculator.css.js";
|
|
26
26
|
import "../Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js";
|
|
27
|
-
import "../Button/Button.css.js";
|
|
28
27
|
import "../Modal/contextApi/store.js";
|
|
28
|
+
import "next/image.js";
|
|
29
|
+
import "../Button/Button.css.js";
|
|
29
30
|
import "../Calculators/ApyCalculator/ApyCalculator.css.js";
|
|
30
31
|
import "../Table/Table.css.js";
|
|
31
32
|
import "../Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js";
|
|
@@ -75,15 +76,13 @@ import "../Auth/SignInPassword.js";
|
|
|
75
76
|
/* empty css */
|
|
76
77
|
/* empty css */
|
|
77
78
|
import "../Chatbot/store/chat.js";
|
|
78
|
-
import "../Chatbot/authenticate.js";
|
|
79
79
|
/* empty css */
|
|
80
80
|
/* empty css */
|
|
81
81
|
import "../Chatbot/store/messages.js";
|
|
82
82
|
/* empty css */
|
|
83
83
|
import "../Comparison/Comparison.css.js";
|
|
84
|
-
import "next/image.js";
|
|
85
|
-
import "../HeroBanner/HeroBanner.css.js";
|
|
86
84
|
import "../HeroBanner/LargeBanner.css.js";
|
|
85
|
+
import "../HeroBanner/HeroBanner.css.js";
|
|
87
86
|
import "../HeroBanner/SelectionBanner.css.js";
|
|
88
87
|
import "../SetContainer/SetContainer.css.js";
|
|
89
88
|
import "../Tab/Tab.css.js";
|
package/dist/Chatbot/Bubble.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export declare const Bubble: ({ children, onClick, }: PropsWithChildren & {
|
|
4
4
|
onClick?: () => void;
|
|
5
|
-
|
|
5
|
+
project: "axos" | "ufb" | "Axos" | "Ufb";
|
|
6
|
+
}) => import("react").JSX.Element;
|
package/dist/Chatbot/Chat.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function Chat(): import("react
|
|
1
|
+
export default function Chat(): import("react").JSX.Element;
|
|
@@ -43,7 +43,8 @@ const ChatWindow = ({
|
|
|
43
43
|
toggleThankyouMessage,
|
|
44
44
|
hasEscalated,
|
|
45
45
|
isBlockedInput,
|
|
46
|
-
isOpen
|
|
46
|
+
isOpen,
|
|
47
|
+
hasOpenedOnce
|
|
47
48
|
} = useOpenChat();
|
|
48
49
|
const [mounted, setMounted] = React.useState(false);
|
|
49
50
|
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
@@ -96,6 +97,11 @@ const ChatWindow = ({
|
|
|
96
97
|
setInput("");
|
|
97
98
|
toggleThankyouMessage?.();
|
|
98
99
|
};
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (inputRef.current) {
|
|
102
|
+
inputRef.current.focus();
|
|
103
|
+
}
|
|
104
|
+
}, [messages]);
|
|
99
105
|
return /* @__PURE__ */ jsxs("div", { className: clsx(windowStyle, isOpen && windowOpenStyle), children: [
|
|
100
106
|
/* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
|
|
101
107
|
/* @__PURE__ */ jsx("div", { className: clsx(left_bar_section) }),
|
|
@@ -393,7 +399,7 @@ const ChatWindow = ({
|
|
|
393
399
|
}
|
|
394
400
|
) }) : null,
|
|
395
401
|
/* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
|
|
396
|
-
(status === "idle" || messages.length == 0) && /* @__PURE__ */ jsx(
|
|
402
|
+
(status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
|
|
397
403
|
"div",
|
|
398
404
|
{
|
|
399
405
|
className: clsx(),
|
|
@@ -415,27 +421,33 @@ const ChatWindow = ({
|
|
|
415
421
|
flexDirection: "column",
|
|
416
422
|
gap: 4
|
|
417
423
|
},
|
|
418
|
-
children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "
|
|
424
|
+
children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "Chat connecting..." })
|
|
419
425
|
}
|
|
420
426
|
)
|
|
421
427
|
}
|
|
422
428
|
),
|
|
423
|
-
messages?.map((msg) =>
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
429
|
+
messages?.map((msg) => {
|
|
430
|
+
if (!hasOpenedOnce) {
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
return /* @__PURE__ */ jsx(
|
|
434
|
+
ChatbotMessage,
|
|
435
|
+
{
|
|
436
|
+
msg,
|
|
437
|
+
onSend,
|
|
438
|
+
showAvatar,
|
|
439
|
+
showName,
|
|
440
|
+
virtualAgent,
|
|
441
|
+
onCancelEndChat,
|
|
442
|
+
onEndChat: () => {
|
|
443
|
+
endChat();
|
|
444
|
+
onCloseAfterThankYou();
|
|
445
|
+
},
|
|
446
|
+
inputRef
|
|
447
|
+
},
|
|
448
|
+
msg?.$index
|
|
449
|
+
);
|
|
450
|
+
}),
|
|
439
451
|
showReconnect && /* @__PURE__ */ jsx(
|
|
440
452
|
"button",
|
|
441
453
|
{
|
|
@@ -2,9 +2,17 @@ export type ChatbotProps = {
|
|
|
2
2
|
project?: "axos" | "ufb";
|
|
3
3
|
debug?: boolean;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type InitalizeChatbot = {
|
|
6
|
+
companyId: string;
|
|
7
|
+
tenantName: string;
|
|
8
|
+
host: string;
|
|
9
|
+
authUrl: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const Chatbot: ({ project, projectEnv, menuOption, config, }: {
|
|
12
|
+
project?: "axos" | "ufb" | "Axos" | "Ufb";
|
|
7
13
|
projectEnv?: "dev" | "qa" | "uat" | "stg" | "prod";
|
|
8
14
|
menuOption?: "Support Virtual Agent" | string;
|
|
9
15
|
debug?: boolean;
|
|
10
|
-
|
|
16
|
+
config: InitalizeChatbot;
|
|
17
|
+
}) => false | import("react").JSX.Element;
|
|
18
|
+
export {};
|
package/dist/Chatbot/Chatbot.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useRef, useState, useEffect } from "react";
|
|
4
|
+
import { useMount, useUnmount } from "react-use";
|
|
4
5
|
import { Bubble } from "./Bubble.js";
|
|
5
|
-
import {
|
|
6
|
+
import { chatbotAXB, chatbotUFB } from "./Chatbot.css.js";
|
|
6
7
|
import { ChatWindow } from "./ChatWindow.js";
|
|
7
8
|
import { useOpenChat } from "./store/chat.js";
|
|
8
9
|
import { useMessages } from "./store/messages.js";
|
|
9
|
-
import { useRef, useState, useEffect } from "react";
|
|
10
|
-
import { useMount, useUnmount } from "react-use";
|
|
11
10
|
const Chatbot = ({
|
|
12
11
|
project = "axos",
|
|
13
12
|
projectEnv = "dev",
|
|
14
13
|
menuOption = "Support Virtual Agent",
|
|
15
|
-
|
|
14
|
+
config
|
|
16
15
|
}) => {
|
|
17
16
|
const {
|
|
18
17
|
hasOpenedOnce,
|
|
@@ -28,13 +27,12 @@ const Chatbot = ({
|
|
|
28
27
|
const clientRef = useRef(null);
|
|
29
28
|
const menuRef = useRef(null);
|
|
30
29
|
const isMountedRef = useRef(false);
|
|
31
|
-
const hasLoadedBefore = useRef(true);
|
|
32
30
|
const chatRef = useRef(null);
|
|
31
|
+
const chatLoading = useRef(false);
|
|
33
32
|
const agent_virtual = useRef(null);
|
|
34
33
|
const [status, setStatus] = useState("idle");
|
|
35
34
|
const [hasStarted, setHasStarted] = useState(false);
|
|
36
35
|
const [menusLoaded, setMenusLoaded] = useState(false);
|
|
37
|
-
const [pendingStart, setPendingStart] = useState(false);
|
|
38
36
|
const [isTyping, setIsTyping] = useState(false);
|
|
39
37
|
const [scalationStarted, setScalationStarted] = useState(false);
|
|
40
38
|
useEffect(() => {
|
|
@@ -89,6 +87,9 @@ const Chatbot = ({
|
|
|
89
87
|
menuRef.current = await clientRef.current.getMenus();
|
|
90
88
|
setMenusLoaded(true);
|
|
91
89
|
console.log("menus:", menuRef.current);
|
|
90
|
+
if (menuRef.current !== null) {
|
|
91
|
+
await startChat("onReady");
|
|
92
|
+
}
|
|
92
93
|
}
|
|
93
94
|
};
|
|
94
95
|
const onAuthenticatedHandler = async () => {
|
|
@@ -219,20 +220,27 @@ const Chatbot = ({
|
|
|
219
220
|
clientRef.current?.off("chat.connected", onChatConnectedHandler);
|
|
220
221
|
};
|
|
221
222
|
const createClient = async () => {
|
|
222
|
-
const { Client
|
|
223
|
-
if (projectEnv !== "prod" || debug) {
|
|
224
|
-
Logger.addHandler(consoleLoggerHandler);
|
|
225
|
-
}
|
|
223
|
+
const { Client } = await import("@ujet/websdk-headless");
|
|
226
224
|
if (clientRef.current) return;
|
|
225
|
+
console.log({
|
|
226
|
+
config
|
|
227
|
+
});
|
|
227
228
|
const client = new Client({
|
|
228
|
-
companyId:
|
|
229
|
-
tenant:
|
|
230
|
-
host:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
companyId: config.companyId,
|
|
230
|
+
tenant: config.tenantName,
|
|
231
|
+
host: config.host,
|
|
232
|
+
authenticate: async () => {
|
|
233
|
+
const res = await fetch(config.authUrl, {
|
|
234
|
+
method: "GET",
|
|
235
|
+
headers: {
|
|
236
|
+
"Content-Type": "application/json"
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
const data = await res.json();
|
|
240
|
+
return {
|
|
241
|
+
token: data.token
|
|
242
|
+
};
|
|
243
|
+
}
|
|
236
244
|
});
|
|
237
245
|
client?.on("ready", onReadyHandler);
|
|
238
246
|
client?.on("authenticated", onAuthenticatedHandler);
|
|
@@ -241,35 +249,48 @@ const Chatbot = ({
|
|
|
241
249
|
registerEventHandlers();
|
|
242
250
|
return;
|
|
243
251
|
};
|
|
244
|
-
const startChat = async () => {
|
|
245
|
-
console.log("Starting chat");
|
|
252
|
+
const startChat = async (source) => {
|
|
246
253
|
const client = clientRef.current;
|
|
247
254
|
if (!client) return;
|
|
248
|
-
if (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
waited += 100;
|
|
253
|
-
}
|
|
254
|
-
if (!menuRef.current || !menuRef.current.menus) {
|
|
255
|
-
console.error("Menu not loaded, cannot start chat");
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
255
|
+
if (hasStarted) return;
|
|
256
|
+
if (chatLoading.current) {
|
|
257
|
+
console.log(`startChat skipped [${source}] — already in progress`);
|
|
258
|
+
return;
|
|
258
259
|
}
|
|
259
260
|
try {
|
|
261
|
+
console.log(`Starting chat [${source}]`, chatRef.current);
|
|
262
|
+
chatLoading.current = true;
|
|
263
|
+
if (!menuRef.current || !menuRef.current.menus) {
|
|
264
|
+
let waited = 0;
|
|
265
|
+
while ((!menuRef.current || !menuRef.current.menus) && waited < 5e3) {
|
|
266
|
+
await new Promise((res) => setTimeout(res, 100));
|
|
267
|
+
waited += 100;
|
|
268
|
+
}
|
|
269
|
+
if (!menuRef.current || !menuRef.current.menus) {
|
|
270
|
+
console.error("Menu not loaded, cannot start chat");
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
console.log("menus: ->", menuRef.current);
|
|
260
275
|
const ongoingChat = await client.loadOngoingChat();
|
|
276
|
+
console.log("theres a ongoing chat?: -->", ongoingChat);
|
|
261
277
|
if (ongoingChat) {
|
|
262
278
|
console.log("Ongoing chat found:", ongoingChat);
|
|
263
279
|
console.log("Resuming chat:", ongoingChat.id);
|
|
264
|
-
chatRef.current =
|
|
280
|
+
chatRef.current = ongoingChat;
|
|
265
281
|
agent_virtual.current = ongoingChat.agent;
|
|
266
282
|
return;
|
|
267
283
|
}
|
|
284
|
+
console.log("not ongoing chat ");
|
|
285
|
+
console.log(!!ongoingChat);
|
|
268
286
|
const foundMenu = menuRef.current.menus.find(
|
|
269
287
|
(menu) => menu.name === menuOption
|
|
270
288
|
);
|
|
271
289
|
const menuId = foundMenu && foundMenu.id;
|
|
272
290
|
console.log("Creating new chat with menu ID:", menuId);
|
|
291
|
+
if (!foundMenu) {
|
|
292
|
+
throw new Error("Menu not found: " + menuOption);
|
|
293
|
+
}
|
|
273
294
|
const newChat = await client.createChat(menuId, { custom_data });
|
|
274
295
|
if (newChat !== null) {
|
|
275
296
|
chatRef.current = newChat;
|
|
@@ -278,22 +299,30 @@ const Chatbot = ({
|
|
|
278
299
|
}
|
|
279
300
|
} catch (err) {
|
|
280
301
|
console.error("Error creating chat:", err);
|
|
302
|
+
} finally {
|
|
303
|
+
chatLoading.current = false;
|
|
304
|
+
setHasStarted(true);
|
|
281
305
|
}
|
|
282
306
|
};
|
|
283
307
|
const handleClick = async () => {
|
|
284
308
|
toggle();
|
|
285
309
|
if (hasStarted) return;
|
|
286
|
-
if (!menusLoaded) {
|
|
287
|
-
setPendingStart(true);
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
310
|
if (!hasOpenedOnce) {
|
|
291
|
-
await startChat();
|
|
311
|
+
await startChat("bubbleClick");
|
|
292
312
|
setHasStarted(true);
|
|
293
313
|
}
|
|
294
314
|
};
|
|
295
315
|
const onSendMessage = async (msg) => {
|
|
296
|
-
|
|
316
|
+
const clientChatId = clientRef.current?.chat?.id;
|
|
317
|
+
const refChatId = chatRef.current?.id;
|
|
318
|
+
console.log(
|
|
319
|
+
"Sending message:",
|
|
320
|
+
msg,
|
|
321
|
+
"| client.chat.id:",
|
|
322
|
+
clientChatId,
|
|
323
|
+
"| chatRef.id:",
|
|
324
|
+
refChatId
|
|
325
|
+
);
|
|
297
326
|
try {
|
|
298
327
|
await clientRef.current?.sendTextMessage(msg);
|
|
299
328
|
} catch (error) {
|
|
@@ -319,7 +348,7 @@ const Chatbot = ({
|
|
|
319
348
|
const onEndAndStartNewChat = async () => {
|
|
320
349
|
console.log("Ending current chat and starting a new one");
|
|
321
350
|
await onEndChat();
|
|
322
|
-
await startChat();
|
|
351
|
+
await startChat("endAndStartNew");
|
|
323
352
|
};
|
|
324
353
|
useMount(async () => {
|
|
325
354
|
console.log("Chatbot mounted");
|
|
@@ -327,17 +356,10 @@ const Chatbot = ({
|
|
|
327
356
|
isMountedRef.current = true;
|
|
328
357
|
await createClient();
|
|
329
358
|
});
|
|
330
|
-
useEffect(() => {
|
|
331
|
-
if (menusLoaded && pendingStart && !hasStarted) {
|
|
332
|
-
startChat();
|
|
333
|
-
setPendingStart(false);
|
|
334
|
-
}
|
|
335
|
-
}, [menusLoaded, pendingStart, hasStarted]);
|
|
336
359
|
useUnmount(() => {
|
|
337
360
|
console.log("Chatbot unmounted");
|
|
338
361
|
deregisterEventHandlers();
|
|
339
|
-
|
|
340
|
-
hasLoadedBefore.current = true;
|
|
362
|
+
chatLoading.current = false;
|
|
341
363
|
reset();
|
|
342
364
|
setHasStarted(false);
|
|
343
365
|
setStatus("idle");
|
|
@@ -350,9 +372,13 @@ const Chatbot = ({
|
|
|
350
372
|
const onClose = () => {
|
|
351
373
|
toggle();
|
|
352
374
|
};
|
|
353
|
-
const
|
|
375
|
+
const newChatSession = async () => {
|
|
376
|
+
console.log("create new session");
|
|
377
|
+
};
|
|
378
|
+
const onCloseAfterThankYou = async () => {
|
|
354
379
|
reset();
|
|
355
380
|
setHasStarted(false);
|
|
381
|
+
newChatSession();
|
|
356
382
|
};
|
|
357
383
|
const onPreviewTyping = async (msg) => {
|
|
358
384
|
console.log("Preview typing message:", msg);
|
|
@@ -365,24 +391,30 @@ const Chatbot = ({
|
|
|
365
391
|
console.error("Error sending preview message:", error);
|
|
366
392
|
}
|
|
367
393
|
};
|
|
368
|
-
return menusLoaded && /* @__PURE__ */ jsxs(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
394
|
+
return menusLoaded && /* @__PURE__ */ jsxs(
|
|
395
|
+
"div",
|
|
396
|
+
{
|
|
397
|
+
className: ["axos", "Axos"].includes(project) ? chatbotAXB : chatbotUFB,
|
|
398
|
+
children: [
|
|
399
|
+
/* @__PURE__ */ jsx(Bubble, { onClick: handleClick, project }),
|
|
400
|
+
/* @__PURE__ */ jsx(
|
|
401
|
+
ChatWindow,
|
|
402
|
+
{
|
|
403
|
+
status,
|
|
404
|
+
virtualAgent: agent_virtual.current,
|
|
405
|
+
messages,
|
|
406
|
+
onSend: onSendMessage,
|
|
407
|
+
endChat: onEndChat,
|
|
408
|
+
onClose,
|
|
409
|
+
onNewChat: onEndAndStartNewChat,
|
|
410
|
+
onCloseAfterThankYou,
|
|
411
|
+
previewTyping: onPreviewTyping,
|
|
412
|
+
isTyping
|
|
413
|
+
}
|
|
414
|
+
)
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
);
|
|
386
418
|
};
|
|
387
419
|
export {
|
|
388
420
|
Chatbot
|
|
@@ -12,6 +12,7 @@ interface ChatbotMessageProps {
|
|
|
12
12
|
onCancelEndChat?: () => void;
|
|
13
13
|
onSend?: (content: string) => void;
|
|
14
14
|
onEndChat?: () => void;
|
|
15
|
+
inputRef: React.RefObject<HTMLTextAreaElement | null>;
|
|
15
16
|
}
|
|
16
17
|
export declare const ChatbotMessage: FC<ChatbotMessageProps>;
|
|
17
18
|
export {};
|
|
@@ -25,7 +25,8 @@ const ChatbotMessage = ({
|
|
|
25
25
|
showName,
|
|
26
26
|
virtualAgent,
|
|
27
27
|
onEndChat,
|
|
28
|
-
onSend
|
|
28
|
+
onSend,
|
|
29
|
+
inputRef
|
|
29
30
|
}) => {
|
|
30
31
|
const { hasEscalated } = useOpenChat();
|
|
31
32
|
const [timeText, setTimeText] = useState(timeAgo(msg.$timestamp));
|
|
@@ -36,6 +37,9 @@ const ChatbotMessage = ({
|
|
|
36
37
|
return () => clearInterval(interval);
|
|
37
38
|
}, [msg.$timestamp]);
|
|
38
39
|
if (msg.$sid === "typing-1" && !hasEscalated) {
|
|
40
|
+
if (inputRef?.current) {
|
|
41
|
+
inputRef?.current.focus();
|
|
42
|
+
}
|
|
39
43
|
return /* @__PURE__ */ jsx(
|
|
40
44
|
"div",
|
|
41
45
|
{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const EllipsisLoader: () => import("react
|
|
1
|
+
declare const EllipsisLoader: () => import("react").JSX.Element;
|
|
2
2
|
export default EllipsisLoader;
|