@axos-web-dev/shared-components 1.0.100-dev.57 → 1.0.100-dev.58
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 +4 -2
- package/dist/Accordion/Accordion.css.js +2 -1
- package/dist/Accordion/Accordion.js +2 -1
- package/dist/AlertBanner/index.js +2 -1
- package/dist/Article/Article.css.js +2 -1
- package/dist/ArticlesSet/ArticlesSet.css.js +2 -1
- package/dist/Auth/ErrorAlert.js +4 -2
- package/dist/Auth/SignIn.css.js +2 -1
- package/dist/AwardsBanner/AwardsBanner.css.js +2 -1
- package/dist/Blockquote/Blockquote.module.js +3 -3
- package/dist/BulletItem/BulletItem.js +2 -1
- package/dist/Button/Button.css.js +2 -1
- package/dist/Button/Button.js +4 -2
- package/dist/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js +2 -1
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.js +2 -1
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +2 -1
- package/dist/Calculators/AxosOneCalculator/index.js +4 -3
- package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js +2 -1
- package/dist/Calculators/BalanceAPYCalculator/index.js +2 -1
- package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.js +2 -1
- package/dist/Calculators/Calculator.js +4 -2
- package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +2 -1
- package/dist/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js +2 -1
- package/dist/Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js +2 -1
- package/dist/Calculators/SummitApyCalculator/index.js +2 -1
- package/dist/Calculators/calculator.css.js +2 -1
- package/dist/CallToActionBar/CallToActionBar.css.js +2 -1
- package/dist/Carousel/Carousel.css.js +2 -1
- package/dist/Carousel/index.js +4 -2
- package/dist/Chatbot/AnimatedGradientBorder.css.d.ts +3 -0
- package/dist/Chatbot/AnimatedGradientBorder.css.js +13 -0
- package/dist/Chatbot/Bubble.css.d.ts +4 -0
- package/dist/Chatbot/Bubble.css.js +15 -3
- package/dist/Chatbot/Bubble.js +26 -19
- package/dist/Chatbot/ChatWindow.css.d.ts +17 -0
- package/dist/Chatbot/ChatWindow.css.js +46 -17
- package/dist/Chatbot/ChatWindow.d.ts +4 -1
- package/dist/Chatbot/ChatWindow.js +322 -283
- package/dist/Chatbot/Chatbot.css.js +1 -1
- package/dist/Chatbot/Chatbot.js +32 -5
- package/dist/Chatbot/ChatbotMessage.d.ts +16 -0
- package/dist/Chatbot/ChatbotMessage.js +215 -0
- package/dist/Chatbot/ThankYouMessage.d.ts +9 -0
- package/dist/Chatbot/ThankYouMessage.js +510 -0
- package/dist/Chatbot/index.js +18 -2
- package/dist/Chatbot/store/chat.d.ts +3 -0
- package/dist/Chatbot/store/chat.js +4 -1
- package/dist/Chatbot/store/messages.d.ts +1 -1
- package/dist/Chatbot/store/messages.js +7 -2
- package/dist/Chevron/Chevron.css.js +2 -1
- package/dist/Chevron/index.js +4 -2
- package/dist/CollectInformationAlert/CollectInformationAlert.css.js +2 -1
- package/dist/CollectInformationAlert/index.js +2 -1
- package/dist/Comparison/Comparison.css.js +2 -1
- package/dist/Comparison/Comparison.js +4 -2
- package/dist/ContentBanner/ContentBanner.css.js +2 -1
- package/dist/DownloadTile/DownloadTile.css.js +2 -1
- package/dist/ExecutiveBio/ExecutiveBio.css.js +2 -1
- package/dist/ExecutiveBio/ExecutiveBio.js +4 -2
- package/dist/FaqAccordion/FaqAccordion.css.js +2 -1
- package/dist/FaqAccordion/index.js +4 -2
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.css.js +2 -1
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.js +2 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.css.js +2 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +5 -21
- package/dist/Forms/ApplicationStart.js +2 -1
- package/dist/Forms/ApplyNow.js +4 -2
- package/dist/Forms/ClearingForm.js +2 -1
- package/dist/Forms/CommercialDeposits.js +2 -1
- package/dist/Forms/CommercialDepositsNoLendingOption.js +2 -1
- package/dist/Forms/CommercialLending.js +2 -1
- package/dist/Forms/CommercialPremiumFinance.js +2 -1
- package/dist/Forms/ContactCompany.js +2 -1
- package/dist/Forms/ContactCompanyTitle.js +2 -1
- package/dist/Forms/ContactUs.js +2 -1
- package/dist/Forms/ContactUsAAS.js +2 -1
- package/dist/Forms/ContactUsBusiness.js +4 -2
- package/dist/Forms/ContactUsBusinessNameEmail.js +4 -2
- package/dist/Forms/ContactUsLVF.js +2 -1
- package/dist/Forms/ContactUsNMLSId.js +4 -2
- package/dist/Forms/CpraRequest.js +2 -1
- package/dist/Forms/CraPublicFile.js +4 -2
- package/dist/Forms/DealerServices.js +2 -1
- package/dist/Forms/EmailOnly.js +4 -2
- package/dist/Forms/EmailUs.js +2 -1
- package/dist/Forms/Forms.css.js +2 -1
- package/dist/Forms/MortgageRate/MortgageRateForm.js +4 -2
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +4 -2
- package/dist/Forms/MortgageWarehouseLending.js +4 -2
- package/dist/Forms/QuickPricer/QuickPricerForm.js +2 -1
- package/dist/Forms/QuickPricer/UserInformation.css.js +2 -1
- package/dist/Forms/ScheduleCall.js +2 -1
- package/dist/Forms/ScheduleCallPremier.js +2 -1
- package/dist/Forms/SuccesForm.js +4 -2
- package/dist/Forms/WcplSurvey.js +2 -1
- package/dist/HeroBanner/HeroBanner.css.js +2 -1
- package/dist/HeroBanner/HeroBanner.js +2 -1
- package/dist/HeroBanner/LargeBanner.css.js +2 -1
- package/dist/HeroBanner/SelectionBanner.css.js +2 -1
- package/dist/Hyperlink/Hyperlink.css.js +2 -1
- package/dist/Hyperlink/index.js +4 -2
- package/dist/IconBillboard/IconBillboard.css.js +2 -1
- package/dist/ImageBillboard/ImageBillboard.css.js +2 -1
- package/dist/ImageBillboard/ImageBillboard.js +2 -1
- package/dist/ImageBillboard/ImageBillboardSet.js +2 -1
- package/dist/ImageLink/ImageLink.js +4 -2
- package/dist/ImageLink/ImageLinkSet.js +4 -2
- package/dist/ImageLink/index.js +4 -2
- package/dist/Input/Input.css.js +2 -1
- package/dist/Inputs/Input.css.js +2 -1
- package/dist/Insight/Featured/CategorySelector.css.js +2 -1
- package/dist/Insight/Featured/CategorySelector.js +4 -2
- package/dist/Insight/Featured/Featured.js +4 -2
- package/dist/Insight/Featured/Header.js +4 -2
- package/dist/Interstitial/Interstitial-variants.css.js +2 -1
- package/dist/LandingPageHeader/LandingPageHeader.css.js +2 -1
- package/dist/LandingPageHeader/LandingPageHeader.js +2 -1
- package/dist/MainHTML/index.d.ts +1 -1
- package/dist/MainHTML/index.js +3 -1
- package/dist/Modal/Modal.css.js +2 -1
- package/dist/Modal/Modal.js +4 -2
- package/dist/Modal/contextApi/store.js +1 -1
- package/dist/NavigationMenu/AxosALTS/NavBar.css.js +2 -1
- package/dist/NavigationMenu/AxosALTS/NavData.js +4 -2
- package/dist/NavigationMenu/AxosALTS/index.js +4 -2
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +2 -1
- package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.js +2 -1
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.js +2 -1
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.js +2 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +4 -2
- package/dist/NavigationMenu/AxosBank/NavBar.css.js +2 -1
- package/dist/NavigationMenu/AxosBank/NavData.js +4 -2
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +4 -2
- package/dist/NavigationMenu/AxosBank/SubNavbar.css.js +2 -1
- package/dist/NavigationMenu/AxosBank/index.js +4 -2
- package/dist/NavigationMenu/LaVictoire/NavData.js +4 -2
- package/dist/NavigationMenu/LaVictoire/index.js +4 -2
- package/dist/NavigationMenu/NavDataJson.js +4 -2
- package/dist/NavigationMenu/Navbar.js +4 -2
- package/dist/NavigationMenu/SignInNavButton.js +4 -2
- package/dist/PageNavItem/PageNavItem.css.js +2 -1
- package/dist/Pagination/Pagination.js +2 -1
- package/dist/SecondaryFooter/SecondaryFooter.css.js +2 -1
- package/dist/SetContainer/SetContainer.css.js +2 -1
- package/dist/SetContainer/SetContainer.js +4 -2
- package/dist/SocialMediaBar/iconsRepository.js +4 -2
- package/dist/StepItem/StepItem.css.js +2 -1
- package/dist/StepItemSet/StepItemSet.css.js +2 -1
- package/dist/StepItemSet/StepItemSet.js +2 -1
- package/dist/Tab/Tab.css.js +2 -1
- package/dist/Table/Table.css.js +2 -1
- package/dist/Table/Table.js +2 -1
- package/dist/TextBlock/TextBlock.css.js +2 -1
- package/dist/VideoTile/VideoTile.css.js +2 -1
- package/dist/VideoTile/VideoTile.js +4 -2
- package/dist/VideoWrapper/index.js +4 -2
- package/dist/assets/Blockquote/Blockquote.css.css +72 -72
- package/dist/assets/Chatbot/AnimatedGradientBorder.css +37 -0
- package/dist/assets/Chatbot/Bubble.css +58 -21
- package/dist/assets/Chatbot/ChatWindow.css +208 -83
- package/dist/assets/Chatbot/Chatbot.css +3 -0
- package/dist/assets/DownloadTile/DownloadTile.css +1 -1
- package/dist/assets/Insight/Insight.css +2 -2
- package/dist/assets/themes/axos.css +11 -0
- package/dist/assets/themes/premier.css +11 -0
- package/dist/assets/themes/ufb.css +51 -0
- package/dist/assets/themes/victorie.css +11 -0
- package/dist/icons/ArrowIcon/ArrowIcon.css.js +2 -1
- package/dist/icons/CheckIcon/CheckIcon.css.js +2 -1
- package/dist/icons/DownloadIcon/DownloadIcon.css.js +2 -1
- package/dist/icons/FollowIcon/FollowIcon.css.js +2 -1
- package/dist/main.js +20 -2
- package/dist/themes/axos.css.d.ts +17 -0
- package/dist/themes/axos.css.js +1 -1
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +2 -0
- package/dist/themes/ufb.css.d.ts +1 -0
- package/dist/themes/ufb.css.js +6 -0
- package/package.json +136 -136
- package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +0 -1
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { vars } from "../themes/axos.css.js";
|
|
4
|
+
import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
3
8
|
import clsx from "clsx";
|
|
4
|
-
import React, { useRef, useEffect
|
|
5
|
-
import ReactMarkdown from "react-markdown";
|
|
9
|
+
import React, { useRef, useEffect } from "react";
|
|
6
10
|
import { useNetworkState, useMount } from "react-use";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
11
|
+
import { gradientFocus } from "./AnimatedGradientBorder.css.js";
|
|
12
|
+
import { ChatbotMessage } from "./ChatbotMessage.js";
|
|
13
|
+
import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, inputStyle, autoResize, sendButtonStyle, windowStyle, windowOpenStyle } from "./ChatWindow.css.js";
|
|
10
14
|
import { EllipsisIcon } from "./EllipsisIcon.js";
|
|
11
15
|
import { useOpenChat } from "./store/chat.js";
|
|
16
|
+
import { ThankYouMessage } from "./ThankYouMessage.js";
|
|
12
17
|
const ChatWindow = ({
|
|
13
18
|
messages,
|
|
14
19
|
status = "connected",
|
|
@@ -20,8 +25,16 @@ const ChatWindow = ({
|
|
|
20
25
|
},
|
|
21
26
|
showReconnect = false,
|
|
22
27
|
virtualAgent,
|
|
23
|
-
showAvatar = false
|
|
28
|
+
showAvatar = false,
|
|
29
|
+
onNewChat = () => {
|
|
30
|
+
console.log("Start chat");
|
|
31
|
+
},
|
|
32
|
+
showName = false,
|
|
33
|
+
onCloseAfterThankYou = () => {
|
|
34
|
+
console.log("Close after thank you");
|
|
35
|
+
}
|
|
24
36
|
}) => {
|
|
37
|
+
const { showThankyouMessage, displayThankyouMessage, toggleThankyouMessage } = useOpenChat();
|
|
25
38
|
const [mounted, setMounted] = React.useState(false);
|
|
26
39
|
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
27
40
|
const [showEndChatDialog, setShowEndChatDialog] = React.useState(false);
|
|
@@ -44,10 +57,6 @@ const ChatWindow = ({
|
|
|
44
57
|
useMount(() => {
|
|
45
58
|
setMounted(true);
|
|
46
59
|
});
|
|
47
|
-
const project = process.env.CCAI_PROJECT_ID;
|
|
48
|
-
const isAxos = project === "axos";
|
|
49
|
-
const endUserBg = isAxos ? "#14263d" : "#323339";
|
|
50
|
-
const chatbotBg = isAxos ? "#E9F8FF" : "#EAE8E8";
|
|
51
60
|
const escalationDeflected = messages?.filter(
|
|
52
61
|
(item) => item.type == "noti" && item.event == "escalationDeflected"
|
|
53
62
|
).length > 0;
|
|
@@ -63,146 +72,291 @@ const ChatWindow = ({
|
|
|
63
72
|
useEffect(() => {
|
|
64
73
|
autoResizeTextarea();
|
|
65
74
|
}, [input]);
|
|
75
|
+
const displayThankYouScreen = () => {
|
|
76
|
+
displayThankyouMessage();
|
|
77
|
+
};
|
|
78
|
+
const onCancelEndChat = () => {
|
|
79
|
+
setShowEndChatDialog(false);
|
|
80
|
+
toggleThankyouMessage?.();
|
|
81
|
+
onCloseAfterThankYou();
|
|
82
|
+
setInput("");
|
|
83
|
+
};
|
|
84
|
+
const onStartChat = () => {
|
|
85
|
+
onNewChat();
|
|
86
|
+
setInput("");
|
|
87
|
+
toggleThankyouMessage?.();
|
|
88
|
+
};
|
|
66
89
|
return /* @__PURE__ */ jsxs("div", { className: clsx(windowStyle, isOpen && windowOpenStyle), children: [
|
|
67
90
|
/* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
src: "https://www.axos.com/images/2xmVfQm5l0HWOKjgxQO1Iw/axb-assistant.svg",
|
|
73
|
-
style: { marginRight: 12 },
|
|
74
|
-
height: 18,
|
|
75
|
-
width: 18
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ jsx("h2", { className: chat_title, children: "Evo Virtual Assistant" })
|
|
79
|
-
] }),
|
|
80
|
-
/* @__PURE__ */ jsx(
|
|
81
|
-
"button",
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: clsx(left_bar_section) }),
|
|
92
|
+
/* @__PURE__ */ jsxs(
|
|
93
|
+
"div",
|
|
82
94
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
className: "flex middle center",
|
|
96
|
+
style: { paddingBlock: "6px", gap: 4 },
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsxs(
|
|
99
|
+
"svg",
|
|
100
|
+
{
|
|
101
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
102
|
+
width: "20",
|
|
103
|
+
height: "17",
|
|
104
|
+
viewBox: "0 0 20 17",
|
|
105
|
+
fill: "none",
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx(
|
|
108
|
+
"path",
|
|
109
|
+
{
|
|
110
|
+
d: "M10.5277 2.78937C10.8911 2.78937 11.1852 3.08251 11.1853 3.44452C11.1852 3.80654 10.8911 4.10056 10.5277 4.10056H5.26386C4.5371 4.10064 3.94791 4.68761 3.94789 5.41175V10.6565C3.9479 11.3806 4.5371 11.9676 5.26386 11.9677H6.97488C7.12012 11.9678 7.23818 12.0854 7.23825 12.2301V15.6861L10.8932 12.0445C10.9424 11.9956 11.0092 11.9679 11.0786 11.9677H14.4765C15.2032 11.9676 15.7925 11.3806 15.7925 10.6565V9.27302C15.7925 8.91106 16.0868 8.61721 16.45 8.61697C16.8134 8.61699 17.1084 8.91093 17.1084 9.27302V10.6565C17.1084 12.1048 15.9301 13.2788 14.4765 13.2789H11.5149L8.16901 16.6135C7.33997 17.4393 5.92245 16.8542 5.92229 15.6861V13.2789H5.26386C3.81026 13.2788 2.63193 12.1048 2.63193 10.6565V5.41175C2.63194 3.96341 3.81027 2.78945 5.26386 2.78937H10.5277Z",
|
|
111
|
+
fill: "#1E3860"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
"path",
|
|
116
|
+
{
|
|
117
|
+
d: "M9.21265 0.166102C9.57579 0.166381 9.87012 0.460269 9.87018 0.822142C9.87004 1.18394 9.57574 1.47701 9.21265 1.47729H3.29036C2.20017 1.47729 1.31606 2.35831 1.31596 3.44452V6.72294C1.31577 7.08487 1.02083 7.37808 0.657534 7.37808C0.294361 7.37794 0.000196551 7.08478 0 6.72294V3.44452C9.80773e-05 1.63411 1.47333 0.166102 3.29036 0.166102H9.21265Z",
|
|
118
|
+
fill: "#1E3860"
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ jsx(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
d: "M15.7145 0.475824C15.9558 -0.158638 16.8779 -0.158578 17.1192 0.475824L17.6459 1.8611C17.7218 2.06058 17.8835 2.2175 18.0885 2.29132L19.511 2.80454C20.163 3.03936 20.163 3.93626 19.511 4.17107L18.0885 4.6843C17.8835 4.75812 17.7218 4.91504 17.6459 5.11452L17.1192 6.49979C16.8779 7.1342 15.9558 7.13426 15.7145 6.49979L15.1878 5.11452C15.1119 4.91508 14.9502 4.75811 14.7453 4.6843L13.3227 4.17107C12.6708 3.93622 12.6708 3.0394 13.3227 2.80454L14.7453 2.29132C14.9502 2.21751 15.1119 2.06054 15.1878 1.8611L15.7145 0.475824Z",
|
|
125
|
+
fill: "#1E3860"
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ jsx("h2", { className: chat_title, children: "Ask Sam AI" })
|
|
132
|
+
]
|
|
96
133
|
}
|
|
97
134
|
),
|
|
98
|
-
|
|
99
|
-
"button",
|
|
100
|
-
{
|
|
101
|
-
type: "button",
|
|
102
|
-
onClick: () => {
|
|
103
|
-
setShowEndChatDialog(true);
|
|
104
|
-
setMenuOpen(false);
|
|
105
|
-
},
|
|
106
|
-
style: { width: "100%" },
|
|
107
|
-
children: "Finish chat"
|
|
108
|
-
}
|
|
109
|
-
) }) }),
|
|
110
|
-
showEndChatDialog && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ jsxs("div", { className: clsx(buttonss_section), children: [
|
|
111
136
|
/* @__PURE__ */ jsx(
|
|
112
|
-
"
|
|
137
|
+
"button",
|
|
113
138
|
{
|
|
139
|
+
onClick: () => {
|
|
140
|
+
setMenuOpen(!menuOpen);
|
|
141
|
+
},
|
|
142
|
+
className: clsx(button_bar),
|
|
114
143
|
style: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
144
|
+
border: menuOpen ? `1px solid ${vars.chatbot.window.headerText}` : "none",
|
|
145
|
+
cursor: "pointer",
|
|
146
|
+
padding: 0,
|
|
147
|
+
display: "flex",
|
|
148
|
+
alignContent: "center",
|
|
149
|
+
background: menuOpen ? "#0000000f" : void 0
|
|
150
|
+
},
|
|
151
|
+
children: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
124
152
|
}
|
|
125
153
|
),
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
127
|
-
"
|
|
154
|
+
menuOpen && /* @__PURE__ */ jsx("ul", { className: clsx(chatbotMenu), children: /* @__PURE__ */ jsx("li", { className: chatbotMenuItem, children: /* @__PURE__ */ jsxs(
|
|
155
|
+
"button",
|
|
128
156
|
{
|
|
129
|
-
|
|
157
|
+
type: "button",
|
|
158
|
+
onClick: () => {
|
|
159
|
+
setShowEndChatDialog(true);
|
|
160
|
+
setMenuOpen(false);
|
|
161
|
+
},
|
|
130
162
|
style: {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
border: `1px solid ${endUserBg}`,
|
|
136
|
-
outline: "none",
|
|
137
|
-
maxWidth: "90%",
|
|
138
|
-
top: "25%",
|
|
139
|
-
marginInline: "auto",
|
|
140
|
-
zIndex: 1e3
|
|
163
|
+
width: "100%",
|
|
164
|
+
display: "flex",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
gap: "12px"
|
|
141
167
|
},
|
|
142
|
-
children:
|
|
143
|
-
/* @__PURE__ */ jsx("
|
|
144
|
-
|
|
145
|
-
"div",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ jsx("div", { className: clsx(button_bar), children: /* @__PURE__ */ jsxs(
|
|
170
|
+
"svg",
|
|
146
171
|
{
|
|
147
|
-
|
|
172
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
173
|
+
width: "16",
|
|
174
|
+
height: "16",
|
|
175
|
+
viewBox: "0 0 16 16",
|
|
176
|
+
fill: "none",
|
|
148
177
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
children: "No"
|
|
170
|
-
}
|
|
171
|
-
)
|
|
178
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_92_1389)", children: [
|
|
179
|
+
/* @__PURE__ */ jsx(
|
|
180
|
+
"path",
|
|
181
|
+
{
|
|
182
|
+
d: "M11.1236 5.37374L8.60278 7.89457L11.1236 10.4167L10.4166 11.1237L7.89445 8.6029L5.37362 11.1237L4.66658 10.4167L7.18742 7.89457L4.66658 5.37374L5.37362 4.66671L7.89445 7.18754L10.4166 4.66671L11.1236 5.37374Z",
|
|
183
|
+
fill: "#1E3860"
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
/* @__PURE__ */ jsx(
|
|
187
|
+
"path",
|
|
188
|
+
{
|
|
189
|
+
fillRule: "evenodd",
|
|
190
|
+
clipRule: "evenodd",
|
|
191
|
+
d: "M13.3333 0.833374C14.3458 0.833374 15.1666 1.65419 15.1666 2.66671V13.3334C15.1666 14.3459 14.3458 15.1667 13.3333 15.1667H2.66659C1.65406 15.1667 0.833252 14.3459 0.833252 13.3334V2.66671C0.833252 1.65419 1.65406 0.833374 2.66659 0.833374H13.3333ZM2.66659 1.83337C2.20635 1.83337 1.83325 2.20647 1.83325 2.66671V13.3334C1.83325 13.7936 2.20635 14.1667 2.66659 14.1667H13.3333C13.7935 14.1667 14.1666 13.7936 14.1666 13.3334V2.66671C14.1666 2.20647 13.7935 1.83337 13.3333 1.83337H2.66659Z",
|
|
192
|
+
fill: "#1E3860"
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] }),
|
|
196
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_92_1389", children: /* @__PURE__ */ jsx("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
172
197
|
]
|
|
173
198
|
}
|
|
174
|
-
)
|
|
175
|
-
|
|
199
|
+
) }),
|
|
200
|
+
/* @__PURE__ */ jsx("span", { children: "End Chat" })
|
|
201
|
+
]
|
|
176
202
|
}
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
{
|
|
182
|
-
onClick: onClose,
|
|
183
|
-
className: button_reset,
|
|
184
|
-
"aria-label": "Close chat",
|
|
185
|
-
title: "Close",
|
|
186
|
-
children: /* @__PURE__ */ jsx(
|
|
187
|
-
"svg",
|
|
203
|
+
) }) }),
|
|
204
|
+
showEndChatDialog && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
205
|
+
/* @__PURE__ */ jsx(
|
|
206
|
+
"div",
|
|
188
207
|
{
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
208
|
+
style: {
|
|
209
|
+
background: "#00000080",
|
|
210
|
+
position: "fixed",
|
|
211
|
+
top: 0,
|
|
212
|
+
left: 0,
|
|
213
|
+
right: 0,
|
|
214
|
+
bottom: 0,
|
|
215
|
+
zIndex: 999
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ jsx("dialog", { open: showEndChatDialog, className: chatEndDialogOverlay, children: /* @__PURE__ */ jsxs("form", { method: "dialog", className: chatFinishDialog, children: [
|
|
220
|
+
/* @__PURE__ */ jsx("div", { className: clsx(button_bar, chatEndCircle), children: /* @__PURE__ */ jsxs(
|
|
221
|
+
"svg",
|
|
222
|
+
{
|
|
223
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
224
|
+
width: "24",
|
|
225
|
+
height: "24",
|
|
226
|
+
viewBox: "0 0 24 24",
|
|
227
|
+
fill: "none",
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ jsx(
|
|
230
|
+
"path",
|
|
231
|
+
{
|
|
232
|
+
d: "M12.7514 7.14531V15.3953H11.2514V7.14531H12.7514Z",
|
|
233
|
+
fill: "#D2272F"
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
/* @__PURE__ */ jsx(
|
|
237
|
+
"path",
|
|
238
|
+
{
|
|
239
|
+
d: "M12.0014 16.8953C12.6227 16.8953 13.1264 17.399 13.1264 18.0203C13.1264 18.6416 12.6227 19.1453 12.0014 19.1453C11.3801 19.1453 10.8764 18.6416 10.8764 18.0203C10.8764 17.399 11.3801 16.8953 12.0014 16.8953Z",
|
|
240
|
+
fill: "#D2272F"
|
|
241
|
+
}
|
|
242
|
+
),
|
|
243
|
+
/* @__PURE__ */ jsx(
|
|
244
|
+
"path",
|
|
245
|
+
{
|
|
246
|
+
fillRule: "evenodd",
|
|
247
|
+
clipRule: "evenodd",
|
|
248
|
+
d: "M9.31805 3.51187L2.17215 17.8037C1.1748 19.7984 2.62529 22.1453 4.85543 22.1453H19.1472C21.3774 22.1453 22.8279 19.7984 21.8305 17.8037L14.6846 3.51188C13.579 1.30073 10.4236 1.30073 9.31805 3.51187ZM3.51379 18.4745L10.6597 4.18269C11.2125 3.07712 12.7902 3.07712 13.343 4.1827L20.4889 18.4745C20.9875 19.4718 20.2623 20.6453 19.1472 20.6453H4.85543C3.74036 20.6453 3.01512 19.4718 3.51379 18.4745Z",
|
|
249
|
+
fill: "#D2272F"
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
) }),
|
|
255
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
256
|
+
"Are you sure you want to end",
|
|
257
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
258
|
+
" this chat?"
|
|
259
|
+
] }),
|
|
260
|
+
/* @__PURE__ */ jsxs(
|
|
261
|
+
"div",
|
|
262
|
+
{
|
|
263
|
+
style: {
|
|
264
|
+
display: "flex",
|
|
265
|
+
gap: "1rem",
|
|
266
|
+
marginTop: "1rem",
|
|
267
|
+
flexDirection: "column",
|
|
268
|
+
marginBottom: 24,
|
|
269
|
+
width: "100%"
|
|
270
|
+
},
|
|
271
|
+
children: [
|
|
272
|
+
/* @__PURE__ */ jsx(
|
|
273
|
+
"button",
|
|
274
|
+
{
|
|
275
|
+
className: endChatButtonStyle,
|
|
276
|
+
type: "submit",
|
|
277
|
+
onClick: () => {
|
|
278
|
+
endChat();
|
|
279
|
+
displayThankYouScreen();
|
|
280
|
+
setShowEndChatDialog(false);
|
|
281
|
+
},
|
|
282
|
+
children: "Yes, End Chat"
|
|
283
|
+
}
|
|
284
|
+
),
|
|
285
|
+
/* @__PURE__ */ jsx(
|
|
286
|
+
"button",
|
|
287
|
+
{
|
|
288
|
+
className: clsx(endChatButtonStyle, noAnswerButton),
|
|
289
|
+
type: "button",
|
|
290
|
+
onClick: () => {
|
|
291
|
+
setShowEndChatDialog(false);
|
|
292
|
+
},
|
|
293
|
+
children: "No, Go Back"
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
" "
|
|
300
|
+
] }) })
|
|
301
|
+
] }),
|
|
302
|
+
/* @__PURE__ */ jsx(
|
|
303
|
+
ThankYouMessage,
|
|
304
|
+
{
|
|
305
|
+
showEndChatDialog: showThankyouMessage,
|
|
306
|
+
onStart: onStartChat,
|
|
307
|
+
onClose: onCancelEndChat
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
onClose && /* @__PURE__ */ jsxs(
|
|
311
|
+
"button",
|
|
312
|
+
{
|
|
313
|
+
onClick: () => {
|
|
314
|
+
onClose();
|
|
315
|
+
setMenuOpen(false);
|
|
316
|
+
},
|
|
317
|
+
className: clsx(button_reset, button_bar),
|
|
318
|
+
"aria-label": "Close chat window",
|
|
319
|
+
title: "Close",
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ jsx(
|
|
322
|
+
"svg",
|
|
196
323
|
{
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
324
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
325
|
+
width: "24",
|
|
326
|
+
height: "24",
|
|
327
|
+
viewBox: "0 0 24 24",
|
|
328
|
+
fill: "none",
|
|
329
|
+
children: /* @__PURE__ */ jsx(
|
|
330
|
+
"path",
|
|
331
|
+
{
|
|
332
|
+
className: arrowFill,
|
|
333
|
+
d: "M2.46875 7.76574L11.9991 17.2961L21.5294 7.76574L20.4687 6.70508L11.9991 15.1749L3.52941 6.70508L2.46875 7.76574Z",
|
|
334
|
+
color: vars.chatbot.window.headerText
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
}
|
|
338
|
+
),
|
|
339
|
+
/* @__PURE__ */ jsx(
|
|
340
|
+
"svg",
|
|
341
|
+
{
|
|
342
|
+
width: "15",
|
|
343
|
+
height: "15",
|
|
344
|
+
viewBox: "0 0 15 15",
|
|
345
|
+
fill: "none",
|
|
346
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
347
|
+
children: /* @__PURE__ */ jsx(
|
|
348
|
+
"path",
|
|
349
|
+
{
|
|
350
|
+
d: "M13.2187 0L14.0142 0.795495L7.803 7.0065L14.0142 13.2187L13.2187 14.0142L7.0065 7.803L0.795495 14.0142L0 13.2187L6.21112 7.0065L0 0.795495L0.795495 0L7.0065 6.21112L13.2187 0Z",
|
|
351
|
+
fill: vars.chatbot.window.headerText
|
|
352
|
+
}
|
|
353
|
+
)
|
|
200
354
|
}
|
|
201
355
|
)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
)
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
] })
|
|
206
360
|
] }),
|
|
207
361
|
mounted && !state.online ? /* @__PURE__ */ jsx("div", { className: clsx(chatNetworkStatus), children: /* @__PURE__ */ jsxs(
|
|
208
362
|
"div",
|
|
@@ -235,7 +389,6 @@ const ChatWindow = ({
|
|
|
235
389
|
style: {
|
|
236
390
|
textAlign: "left",
|
|
237
391
|
alignSelf: "flex-start",
|
|
238
|
-
background: "#eee",
|
|
239
392
|
color: "#1e3860",
|
|
240
393
|
borderRadius: 16,
|
|
241
394
|
padding: "8px 8px",
|
|
@@ -246,151 +399,28 @@ const ChatWindow = ({
|
|
|
246
399
|
"div",
|
|
247
400
|
{
|
|
248
401
|
style: {
|
|
249
|
-
fontSize:
|
|
402
|
+
fontSize: 14,
|
|
250
403
|
display: "flex",
|
|
251
404
|
flexDirection: "column",
|
|
252
405
|
gap: 4
|
|
253
406
|
},
|
|
254
|
-
children: /* @__PURE__ */ jsx(
|
|
407
|
+
children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "AI thinking..." })
|
|
255
408
|
}
|
|
256
409
|
)
|
|
257
410
|
}
|
|
258
411
|
),
|
|
259
|
-
messages?.map((msg) => /* @__PURE__ */
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/* @__PURE__ */ jsxs(
|
|
272
|
-
"div",
|
|
273
|
-
{
|
|
274
|
-
className: notificationStyle,
|
|
275
|
-
style: { fontSize: 12 },
|
|
276
|
-
children: [
|
|
277
|
-
"Our chat team is available weekdays, 8am-5pm, except federal bank holidays. For immediate assistance you can reach out to us at ",
|
|
278
|
-
/* @__PURE__ */ jsx("a", { href: "tel:1-888-502-2967", children: "1-888-502-2967" }),
|
|
279
|
-
"."
|
|
280
|
-
]
|
|
281
|
-
},
|
|
282
|
-
msg.$index
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginBottom: 12 }, children: /* @__PURE__ */ jsx("button", { className: endChatButtonStyle, onClick: endChat, children: "End Chat" }) })
|
|
285
|
-
] }),
|
|
286
|
-
["text", "markdown_template", "markdown"].includes(msg.type) && /* @__PURE__ */ jsx(
|
|
287
|
-
"div",
|
|
288
|
-
{
|
|
289
|
-
className: messageStyle,
|
|
290
|
-
style: {
|
|
291
|
-
textAlign: msg.$userType == "end_user" ? "right" : "left",
|
|
292
|
-
alignSelf: msg.$userType == "end_user" ? "flex-end" : "flex-start",
|
|
293
|
-
background: msg.$userType == "end_user" ? endUserBg : chatbotBg,
|
|
294
|
-
color: msg.$userType == "end_user" ? "#fff" : "#1F1F1F",
|
|
295
|
-
boxShadow: msg.$userType == "end_user" ? "0 1px 4px #b3e0ff55" : void 0
|
|
296
|
-
},
|
|
297
|
-
children: /* @__PURE__ */ jsxs(
|
|
298
|
-
"div",
|
|
299
|
-
{
|
|
300
|
-
style: {
|
|
301
|
-
fontSize: 13,
|
|
302
|
-
display: "flex",
|
|
303
|
-
flexDirection: "column",
|
|
304
|
-
gap: 4
|
|
305
|
-
},
|
|
306
|
-
children: [
|
|
307
|
-
msg.$userType == "virtual_agent" && /* @__PURE__ */ jsxs(
|
|
308
|
-
"div",
|
|
309
|
-
{
|
|
310
|
-
style: {
|
|
311
|
-
display: "flex",
|
|
312
|
-
alignItems: "center",
|
|
313
|
-
gap: "8px"
|
|
314
|
-
},
|
|
315
|
-
children: [
|
|
316
|
-
showAvatar && /* @__PURE__ */ jsx(
|
|
317
|
-
"img",
|
|
318
|
-
{
|
|
319
|
-
width: 24,
|
|
320
|
-
height: 24,
|
|
321
|
-
src: virtualAgent?.avatar_url,
|
|
322
|
-
alt: "agent avatar"
|
|
323
|
-
}
|
|
324
|
-
),
|
|
325
|
-
/* @__PURE__ */ jsx("strong", { children: virtualAgent?.name })
|
|
326
|
-
]
|
|
327
|
-
}
|
|
328
|
-
),
|
|
329
|
-
msg.$userType != "end_user" ? /* @__PURE__ */ jsx(
|
|
330
|
-
ReactMarkdown,
|
|
331
|
-
{
|
|
332
|
-
remarkPlugins: [[remarkGfm, { singleTilde: false }]],
|
|
333
|
-
components: {
|
|
334
|
-
p: ({ ...props }) => /* @__PURE__ */ jsx(
|
|
335
|
-
"p",
|
|
336
|
-
{
|
|
337
|
-
style: { margin: 0, fontSize: "inherit" },
|
|
338
|
-
title: new Date(msg.$timestamp).toLocaleString(),
|
|
339
|
-
...props
|
|
340
|
-
}
|
|
341
|
-
)
|
|
342
|
-
},
|
|
343
|
-
children: msg.content
|
|
344
|
-
}
|
|
345
|
-
) : /* @__PURE__ */ jsx("div", { title: new Date(msg.$timestamp).toLocaleString(), children: msg.content })
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
)
|
|
349
|
-
},
|
|
350
|
-
msg.$index
|
|
351
|
-
),
|
|
352
|
-
msg.type == "inline_button" && Array.isArray(msg.buttons) && msg.buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: inline_button_wrapper, children: msg.buttons.length !== 0 && Array.isArray(msg.buttons) && msg.buttons.map((button, index) => {
|
|
353
|
-
const lastItem = msg.buttons && msg.buttons?.length - 1;
|
|
354
|
-
return /* @__PURE__ */ jsx(
|
|
355
|
-
"button",
|
|
356
|
-
{
|
|
357
|
-
className: inline_button,
|
|
358
|
-
style: {
|
|
359
|
-
borderRadius: "0px",
|
|
360
|
-
borderTopLeftRadius: [0].includes(index) ? 8 : 0,
|
|
361
|
-
borderTopRightRadius: [0].includes(index) ? 8 : 0,
|
|
362
|
-
borderBottomLeftRadius: [lastItem].includes(index) ? 8 : 0,
|
|
363
|
-
borderBottomRightRadius: [lastItem].includes(index) ? 8 : 0
|
|
364
|
-
},
|
|
365
|
-
onClick: () => {
|
|
366
|
-
onSend(button?.title);
|
|
367
|
-
},
|
|
368
|
-
children: button.title
|
|
369
|
-
},
|
|
370
|
-
index
|
|
371
|
-
);
|
|
372
|
-
}) }),
|
|
373
|
-
msg.event == "chatEnded" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
374
|
-
/* @__PURE__ */ jsxs(
|
|
375
|
-
"div",
|
|
376
|
-
{
|
|
377
|
-
title: (/* @__PURE__ */ new Date()).toLocaleString(),
|
|
378
|
-
style: {
|
|
379
|
-
fontSize: 12,
|
|
380
|
-
color: "#888",
|
|
381
|
-
marginBottom: 4,
|
|
382
|
-
textAlign: "center"
|
|
383
|
-
},
|
|
384
|
-
children: [
|
|
385
|
-
"Thank you for chatting!",
|
|
386
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
387
|
-
" This conversation has ended."
|
|
388
|
-
]
|
|
389
|
-
}
|
|
390
|
-
),
|
|
391
|
-
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginBottom: 12 }, children: /* @__PURE__ */ jsx("button", { className: endChatButtonStyle, onClick: endChat, children: "End Chat" }) })
|
|
392
|
-
] })
|
|
393
|
-
] }, msg.$index)),
|
|
412
|
+
messages?.map((msg) => /* @__PURE__ */ jsx(
|
|
413
|
+
ChatbotMessage,
|
|
414
|
+
{
|
|
415
|
+
msg,
|
|
416
|
+
onSend,
|
|
417
|
+
showAvatar,
|
|
418
|
+
showName,
|
|
419
|
+
virtualAgent,
|
|
420
|
+
onCancelEndChat
|
|
421
|
+
},
|
|
422
|
+
msg?.$index
|
|
423
|
+
)),
|
|
394
424
|
showReconnect && /* @__PURE__ */ jsx(
|
|
395
425
|
"button",
|
|
396
426
|
{
|
|
@@ -402,14 +432,14 @@ const ChatWindow = ({
|
|
|
402
432
|
),
|
|
403
433
|
/* @__PURE__ */ jsx("div", { ref: messagesEndRef })
|
|
404
434
|
] }),
|
|
405
|
-
/* @__PURE__ */ jsxs(
|
|
406
|
-
"
|
|
435
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "16px 16px 24px 16px" }, children: /* @__PURE__ */ jsx("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: /* @__PURE__ */ jsxs(
|
|
436
|
+
"div",
|
|
407
437
|
{
|
|
408
|
-
onSubmit: handleSend,
|
|
409
438
|
style: {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
439
|
+
display: "flex",
|
|
440
|
+
padding: "12px 16px",
|
|
441
|
+
background: "#ffffff",
|
|
442
|
+
borderRadius: 12
|
|
413
443
|
},
|
|
414
444
|
children: [
|
|
415
445
|
/* @__PURE__ */ jsx(
|
|
@@ -428,7 +458,7 @@ const ChatWindow = ({
|
|
|
428
458
|
}
|
|
429
459
|
}
|
|
430
460
|
},
|
|
431
|
-
placeholder: "Ask
|
|
461
|
+
placeholder: "Ask anything...",
|
|
432
462
|
className: clsx(inputStyle, autoResize),
|
|
433
463
|
autoFocus: true,
|
|
434
464
|
disabled: inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
|
|
@@ -438,28 +468,37 @@ const ChatWindow = ({
|
|
|
438
468
|
/* @__PURE__ */ jsx(
|
|
439
469
|
"button",
|
|
440
470
|
{
|
|
441
|
-
className: clsx(
|
|
471
|
+
className: clsx(
|
|
472
|
+
sendButtonStyle,
|
|
473
|
+
input.trim().length > 0 && "active"
|
|
474
|
+
),
|
|
442
475
|
type: "submit",
|
|
443
476
|
title: "Send message",
|
|
444
477
|
disabled: inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
|
|
445
|
-
children: /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ jsx(
|
|
446
479
|
"svg",
|
|
447
480
|
{
|
|
448
481
|
xmlns: "http://www.w3.org/2000/svg",
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
482
|
+
width: "16",
|
|
483
|
+
height: "16",
|
|
484
|
+
viewBox: "0 0 16 16",
|
|
485
|
+
fill: "none",
|
|
486
|
+
children: /* @__PURE__ */ jsx(
|
|
487
|
+
"path",
|
|
488
|
+
{
|
|
489
|
+
fillRule: "evenodd",
|
|
490
|
+
clipRule: "evenodd",
|
|
491
|
+
d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
|
|
492
|
+
fill: "#435164"
|
|
493
|
+
}
|
|
494
|
+
)
|
|
456
495
|
}
|
|
457
496
|
)
|
|
458
497
|
}
|
|
459
498
|
)
|
|
460
499
|
]
|
|
461
500
|
}
|
|
462
|
-
)
|
|
501
|
+
) }) })
|
|
463
502
|
] });
|
|
464
503
|
};
|
|
465
504
|
export {
|