@axos-web-dev/shared-components 1.0.100-dev.56 → 1.0.100-dev.57
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 +2 -4
- package/dist/Accordion/Accordion.css.js +1 -2
- package/dist/Accordion/Accordion.js +1 -2
- package/dist/AlertBanner/index.js +1 -2
- package/dist/Article/Article.css.js +1 -2
- package/dist/ArticlesSet/ArticlesSet.css.js +1 -2
- package/dist/Auth/ErrorAlert.js +2 -4
- package/dist/Auth/SignIn.css.js +1 -2
- package/dist/AwardsBanner/AwardsBanner.css.js +1 -2
- package/dist/Blockquote/Blockquote.module.js +3 -3
- package/dist/BulletItem/BulletItem.js +1 -2
- package/dist/Button/Button.css.js +1 -2
- package/dist/Button/Button.js +2 -4
- package/dist/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js +1 -2
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.js +1 -2
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.d.ts +2 -0
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +7 -3
- package/dist/Calculators/AxosOneCalculator/index.js +72 -66
- package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js +1 -2
- package/dist/Calculators/BalanceAPYCalculator/index.js +1 -2
- package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.js +1 -2
- package/dist/Calculators/Calculator.js +2 -4
- package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +1 -2
- package/dist/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js +1 -2
- package/dist/Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js +1 -2
- package/dist/Calculators/SummitApyCalculator/index.js +1 -2
- package/dist/Calculators/calculator.css.js +1 -2
- package/dist/CallToActionBar/CallToActionBar.css.js +1 -2
- package/dist/Carousel/Carousel.css.js +1 -2
- package/dist/Carousel/index.js +2 -4
- package/dist/Chatbot/Bubble.css.d.ts +0 -4
- package/dist/Chatbot/Bubble.css.js +3 -15
- package/dist/Chatbot/Bubble.js +19 -26
- package/dist/Chatbot/ChatWindow.css.d.ts +0 -17
- package/dist/Chatbot/ChatWindow.css.js +17 -46
- package/dist/Chatbot/ChatWindow.d.ts +1 -4
- package/dist/Chatbot/ChatWindow.js +283 -322
- package/dist/Chatbot/Chatbot.css.js +1 -1
- package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
- package/dist/Chatbot/Chatbot.js +5 -32
- package/dist/Chatbot/index.js +2 -18
- package/dist/Chatbot/store/chat.d.ts +0 -3
- package/dist/Chatbot/store/chat.js +1 -4
- package/dist/Chatbot/store/messages.d.ts +1 -1
- package/dist/Chatbot/store/messages.js +2 -7
- package/dist/Chevron/Chevron.css.js +1 -2
- package/dist/Chevron/index.js +2 -4
- package/dist/CollectInformationAlert/CollectInformationAlert.css.js +1 -2
- package/dist/CollectInformationAlert/index.js +1 -2
- package/dist/Comparison/Comparison.css.js +1 -2
- package/dist/Comparison/Comparison.js +2 -4
- package/dist/ContentBanner/ContentBanner.css.js +1 -2
- package/dist/DownloadTile/DownloadTile.css.js +1 -2
- package/dist/ExecutiveBio/ExecutiveBio.css.js +1 -2
- package/dist/ExecutiveBio/ExecutiveBio.js +2 -4
- package/dist/FaqAccordion/FaqAccordion.css.js +1 -2
- package/dist/FaqAccordion/index.js +2 -4
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.css.js +1 -2
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.js +1 -2
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.css.js +1 -2
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +21 -5
- package/dist/Forms/ApplicationStart.js +1 -2
- package/dist/Forms/ApplyNow.js +2 -4
- package/dist/Forms/ClearingForm.js +1 -2
- package/dist/Forms/CommercialDeposits.js +1 -2
- package/dist/Forms/CommercialDepositsNoLendingOption.js +1 -2
- package/dist/Forms/CommercialLending.js +1 -2
- package/dist/Forms/CommercialPremiumFinance.js +1 -2
- package/dist/Forms/ContactCompany.js +1 -2
- package/dist/Forms/ContactCompanyTitle.js +1 -2
- package/dist/Forms/ContactUs.js +1 -2
- package/dist/Forms/ContactUsAAS.js +1 -2
- package/dist/Forms/ContactUsBusiness.js +2 -4
- package/dist/Forms/ContactUsBusinessNameEmail.js +2 -4
- package/dist/Forms/ContactUsLVF.js +1 -2
- package/dist/Forms/ContactUsNMLSId.js +2 -4
- package/dist/Forms/CpraRequest.js +1 -2
- package/dist/Forms/CraPublicFile.js +2 -4
- package/dist/Forms/DealerServices.js +1 -2
- package/dist/Forms/EmailOnly.js +2 -4
- package/dist/Forms/EmailUs.js +1 -2
- package/dist/Forms/Forms.css.js +1 -2
- package/dist/Forms/MortgageRate/MortgageRateForm.js +2 -4
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +2 -4
- package/dist/Forms/MortgageWarehouseLending.js +2 -4
- package/dist/Forms/QuickPricer/QuickPricerForm.js +1 -2
- package/dist/Forms/QuickPricer/UserInformation.css.js +1 -2
- package/dist/Forms/ScheduleCall.js +1 -2
- package/dist/Forms/ScheduleCallPremier.js +1 -2
- package/dist/Forms/SuccesForm.js +2 -4
- package/dist/Forms/WcplSurvey.js +1 -2
- package/dist/HeroBanner/HeroBanner.css.js +1 -2
- package/dist/HeroBanner/HeroBanner.js +1 -2
- package/dist/HeroBanner/LargeBanner.css.js +1 -2
- package/dist/HeroBanner/SelectionBanner.css.js +1 -2
- package/dist/Hyperlink/Hyperlink.css.js +1 -2
- package/dist/Hyperlink/index.js +2 -4
- package/dist/IconBillboard/IconBillboard.css.js +1 -2
- package/dist/ImageBillboard/ImageBillboard.css.js +1 -2
- package/dist/ImageBillboard/ImageBillboard.js +1 -2
- package/dist/ImageBillboard/ImageBillboardSet.js +1 -2
- package/dist/ImageLink/ImageLink.js +2 -4
- package/dist/ImageLink/ImageLinkSet.js +2 -4
- package/dist/ImageLink/index.js +2 -4
- package/dist/Input/Input.css.js +1 -2
- package/dist/Inputs/Input.css.js +1 -2
- package/dist/Insight/Featured/CategorySelector.css.js +1 -2
- package/dist/Insight/Featured/CategorySelector.js +2 -4
- package/dist/Insight/Featured/Featured.js +2 -4
- package/dist/Insight/Featured/Header.js +2 -4
- package/dist/Interstitial/Interstitial-variants.css.js +1 -2
- package/dist/LandingPageHeader/LandingPageHeader.css.js +1 -2
- package/dist/LandingPageHeader/LandingPageHeader.js +1 -2
- package/dist/MainHTML/index.d.ts +1 -1
- package/dist/MainHTML/index.js +1 -3
- package/dist/Modal/Modal.css.js +1 -2
- package/dist/Modal/Modal.js +2 -4
- package/dist/Modal/contextApi/store.js +1 -1
- package/dist/NavigationMenu/AxosALTS/NavBar.css.js +1 -2
- package/dist/NavigationMenu/AxosALTS/NavData.js +2 -4
- package/dist/NavigationMenu/AxosALTS/index.js +2 -4
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +1 -2
- package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.js +1 -2
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.js +1 -2
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.js +1 -2
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +2 -4
- package/dist/NavigationMenu/AxosBank/NavBar.css.js +1 -2
- package/dist/NavigationMenu/AxosBank/NavData.js +2 -4
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +2 -4
- package/dist/NavigationMenu/AxosBank/SubNavbar.css.js +1 -2
- package/dist/NavigationMenu/AxosBank/index.js +2 -4
- package/dist/NavigationMenu/LaVictoire/NavData.js +2 -4
- package/dist/NavigationMenu/LaVictoire/index.js +2 -4
- package/dist/NavigationMenu/NavDataJson.js +2 -4
- package/dist/NavigationMenu/Navbar.js +2 -4
- package/dist/NavigationMenu/SignInNavButton.js +2 -4
- package/dist/PageNavItem/PageNavItem.css.js +1 -2
- package/dist/Pagination/Pagination.js +1 -2
- package/dist/SecondaryFooter/SecondaryFooter.css.js +1 -2
- package/dist/SetContainer/SetContainer.css.js +1 -2
- package/dist/SetContainer/SetContainer.js +2 -4
- package/dist/SocialMediaBar/iconsRepository.js +2 -4
- package/dist/StepItem/StepItem.css.js +1 -2
- package/dist/StepItemSet/StepItemSet.css.js +1 -2
- package/dist/StepItemSet/StepItemSet.js +1 -2
- package/dist/Tab/Tab.css.js +1 -2
- package/dist/Table/Table.css.js +1 -2
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/Table.js +1 -2
- package/dist/TextBlock/TextBlock.css.js +1 -2
- package/dist/VideoTile/VideoTile.css.js +1 -2
- package/dist/VideoTile/VideoTile.js +2 -4
- package/dist/VideoWrapper/index.js +2 -4
- package/dist/assets/Blockquote/Blockquote.css.css +72 -72
- package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +40 -2
- package/dist/assets/Chatbot/Bubble.css +21 -58
- package/dist/assets/Chatbot/ChatWindow.css +83 -208
- package/dist/assets/DownloadTile/DownloadTile.css +1 -1
- package/dist/assets/Insight/Insight.css +2 -2
- package/dist/assets/themes/axos.css +0 -11
- package/dist/assets/themes/premier.css +0 -11
- package/dist/assets/themes/victorie.css +0 -11
- package/dist/icons/ArrowIcon/ArrowIcon.css.js +1 -2
- package/dist/icons/CheckIcon/CheckIcon.css.js +1 -2
- package/dist/icons/DownloadIcon/DownloadIcon.css.js +1 -2
- package/dist/icons/FollowIcon/FollowIcon.css.js +1 -2
- package/dist/main.js +2 -20
- package/dist/themes/axos.css.d.ts +0 -17
- package/dist/themes/axos.css.js +1 -1
- package/dist/themes/index.d.ts +0 -1
- package/dist/themes/index.js +0 -2
- package/package.json +136 -136
- package/dist/Chatbot/AnimatedGradientBorder.css.d.ts +0 -3
- package/dist/Chatbot/AnimatedGradientBorder.css.js +0 -13
- package/dist/Chatbot/ChatbotMessage.d.ts +0 -16
- package/dist/Chatbot/ChatbotMessage.js +0 -215
- package/dist/Chatbot/ThankYouMessage.d.ts +0 -9
- package/dist/Chatbot/ThankYouMessage.js +0 -510
- package/dist/assets/Chatbot/AnimatedGradientBorder.css +0 -37
- package/dist/assets/Chatbot/Chatbot.css +0 -3
- package/dist/assets/themes/ufb.css +0 -51
- package/dist/themes/ufb.css.d.ts +0 -1
- package/dist/themes/ufb.css.js +0 -6
|
@@ -1,19 +1,14 @@
|
|
|
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 */
|
|
8
3
|
import clsx from "clsx";
|
|
9
|
-
import React, { useRef, useEffect } from "react";
|
|
4
|
+
import React, { useRef, useEffect, Fragment as Fragment$1 } from "react";
|
|
5
|
+
import ReactMarkdown from "react-markdown";
|
|
10
6
|
import { useNetworkState, useMount } from "react-use";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
7
|
+
import remarkGfm from "remark-gfm";
|
|
8
|
+
import { windowBarStyle, chat_title, chatbotMenuItem, chatbotMenu, chatFinishDialog, endChatButtonStyle, button_reset, arrowFill, chatNetworkStatus, notificationStyle, messageStyle, inline_button_wrapper, inline_button, messagesContainerStyle, inputStyle, autoResize, sendButtonStyle, windowStyle, windowOpenStyle } from "./ChatWindow.css.js";
|
|
9
|
+
import EllipsisLoader from "./EllipsisAnimation.js";
|
|
14
10
|
import { EllipsisIcon } from "./EllipsisIcon.js";
|
|
15
11
|
import { useOpenChat } from "./store/chat.js";
|
|
16
|
-
import { ThankYouMessage } from "./ThankYouMessage.js";
|
|
17
12
|
const ChatWindow = ({
|
|
18
13
|
messages,
|
|
19
14
|
status = "connected",
|
|
@@ -25,16 +20,8 @@ const ChatWindow = ({
|
|
|
25
20
|
},
|
|
26
21
|
showReconnect = false,
|
|
27
22
|
virtualAgent,
|
|
28
|
-
showAvatar = false
|
|
29
|
-
onNewChat = () => {
|
|
30
|
-
console.log("Start chat");
|
|
31
|
-
},
|
|
32
|
-
showName = false,
|
|
33
|
-
onCloseAfterThankYou = () => {
|
|
34
|
-
console.log("Close after thank you");
|
|
35
|
-
}
|
|
23
|
+
showAvatar = false
|
|
36
24
|
}) => {
|
|
37
|
-
const { showThankyouMessage, displayThankyouMessage, toggleThankyouMessage } = useOpenChat();
|
|
38
25
|
const [mounted, setMounted] = React.useState(false);
|
|
39
26
|
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
40
27
|
const [showEndChatDialog, setShowEndChatDialog] = React.useState(false);
|
|
@@ -57,6 +44,10 @@ const ChatWindow = ({
|
|
|
57
44
|
useMount(() => {
|
|
58
45
|
setMounted(true);
|
|
59
46
|
});
|
|
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";
|
|
60
51
|
const escalationDeflected = messages?.filter(
|
|
61
52
|
(item) => item.type == "noti" && item.event == "escalationDeflected"
|
|
62
53
|
).length > 0;
|
|
@@ -72,291 +63,146 @@ const ChatWindow = ({
|
|
|
72
63
|
useEffect(() => {
|
|
73
64
|
autoResizeTextarea();
|
|
74
65
|
}, [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
|
-
};
|
|
89
66
|
return /* @__PURE__ */ jsxs("div", { className: clsx(windowStyle, isOpen && windowOpenStyle), children: [
|
|
90
67
|
/* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "flex middle", style: { paddingBlock: "6px" }, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
"img",
|
|
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",
|
|
94
82
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
]
|
|
83
|
+
onClick: () => {
|
|
84
|
+
setMenuOpen(!menuOpen);
|
|
85
|
+
},
|
|
86
|
+
style: {
|
|
87
|
+
border: "none",
|
|
88
|
+
background: "transparent",
|
|
89
|
+
marginLeft: "auto",
|
|
90
|
+
cursor: "pointer",
|
|
91
|
+
padding: 0,
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignContent: "center"
|
|
94
|
+
},
|
|
95
|
+
children: /* @__PURE__ */ jsx(EllipsisIcon, { color: "#fff" })
|
|
133
96
|
}
|
|
134
97
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
98
|
+
menuOpen && /* @__PURE__ */ jsx("ul", { className: clsx(chatbotMenu), children: /* @__PURE__ */ jsx("li", { className: chatbotMenuItem, children: /* @__PURE__ */ jsx(
|
|
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: [
|
|
136
111
|
/* @__PURE__ */ jsx(
|
|
137
|
-
"
|
|
112
|
+
"div",
|
|
138
113
|
{
|
|
139
|
-
onClick: () => {
|
|
140
|
-
setMenuOpen(!menuOpen);
|
|
141
|
-
},
|
|
142
|
-
className: clsx(button_bar),
|
|
143
114
|
style: {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
115
|
+
background: "#00000080",
|
|
116
|
+
position: "fixed",
|
|
117
|
+
top: 0,
|
|
118
|
+
left: 0,
|
|
119
|
+
right: 0,
|
|
120
|
+
bottom: 0,
|
|
121
|
+
zIndex: 999,
|
|
122
|
+
opacity: 0.75
|
|
123
|
+
}
|
|
152
124
|
}
|
|
153
125
|
),
|
|
154
|
-
|
|
155
|
-
"
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
"dialog",
|
|
156
128
|
{
|
|
157
|
-
|
|
158
|
-
onClick: () => {
|
|
159
|
-
setShowEndChatDialog(true);
|
|
160
|
-
setMenuOpen(false);
|
|
161
|
-
},
|
|
129
|
+
open: showEndChatDialog,
|
|
162
130
|
style: {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
131
|
+
padding: "1rem",
|
|
132
|
+
borderRadius: 8,
|
|
133
|
+
background: "#fff",
|
|
134
|
+
color: "#000",
|
|
135
|
+
border: `1px solid ${endUserBg}`,
|
|
136
|
+
outline: "none",
|
|
137
|
+
maxWidth: "90%",
|
|
138
|
+
top: "25%",
|
|
139
|
+
marginInline: "auto",
|
|
140
|
+
zIndex: 1e3
|
|
167
141
|
},
|
|
168
|
-
children: [
|
|
169
|
-
/* @__PURE__ */ jsx("
|
|
170
|
-
|
|
142
|
+
children: /* @__PURE__ */ jsxs("form", { method: "dialog", className: chatFinishDialog, children: [
|
|
143
|
+
/* @__PURE__ */ jsx("p", { children: "Are you sure you want to end this chat?" }),
|
|
144
|
+
/* @__PURE__ */ jsxs(
|
|
145
|
+
"div",
|
|
171
146
|
{
|
|
172
|
-
|
|
173
|
-
width: "16",
|
|
174
|
-
height: "16",
|
|
175
|
-
viewBox: "0 0 16 16",
|
|
176
|
-
fill: "none",
|
|
147
|
+
style: { display: "flex", gap: "1rem", marginTop: "1rem" },
|
|
177
148
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
"
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
149
|
+
/* @__PURE__ */ jsx(
|
|
150
|
+
"button",
|
|
151
|
+
{
|
|
152
|
+
className: endChatButtonStyle,
|
|
153
|
+
type: "submit",
|
|
154
|
+
onClick: () => {
|
|
155
|
+
endChat();
|
|
156
|
+
setShowEndChatDialog(false);
|
|
157
|
+
},
|
|
158
|
+
children: "Yes"
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(
|
|
162
|
+
"button",
|
|
163
|
+
{
|
|
164
|
+
className: endChatButtonStyle,
|
|
165
|
+
type: "button",
|
|
166
|
+
onClick: () => {
|
|
167
|
+
setShowEndChatDialog(false);
|
|
168
|
+
},
|
|
169
|
+
children: "No"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
197
172
|
]
|
|
198
173
|
}
|
|
199
|
-
)
|
|
200
|
-
|
|
201
|
-
]
|
|
174
|
+
)
|
|
175
|
+
] })
|
|
202
176
|
}
|
|
203
|
-
)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
177
|
+
)
|
|
178
|
+
] }),
|
|
179
|
+
onClose && /* @__PURE__ */ jsx(
|
|
180
|
+
"button",
|
|
181
|
+
{
|
|
182
|
+
onClick: onClose,
|
|
183
|
+
className: button_reset,
|
|
184
|
+
"aria-label": "Close chat",
|
|
185
|
+
title: "Close",
|
|
186
|
+
children: /* @__PURE__ */ jsx(
|
|
187
|
+
"svg",
|
|
207
188
|
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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",
|
|
189
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
190
|
+
width: "24",
|
|
191
|
+
height: "24",
|
|
192
|
+
viewBox: "0 0 24 24",
|
|
193
|
+
fill: "none",
|
|
194
|
+
children: /* @__PURE__ */ jsx(
|
|
195
|
+
"path",
|
|
323
196
|
{
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
)
|
|
197
|
+
className: arrowFill,
|
|
198
|
+
d: "M2.46875 7.76574L11.9991 17.2961L21.5294 7.76574L20.4687 6.70508L11.9991 15.1749L3.52941 6.70508L2.46875 7.76574Z",
|
|
199
|
+
fill: "#98DDFF"
|
|
354
200
|
}
|
|
355
201
|
)
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
)
|
|
360
206
|
] }),
|
|
361
207
|
mounted && !state.online ? /* @__PURE__ */ jsx("div", { className: clsx(chatNetworkStatus), children: /* @__PURE__ */ jsxs(
|
|
362
208
|
"div",
|
|
@@ -389,6 +235,7 @@ const ChatWindow = ({
|
|
|
389
235
|
style: {
|
|
390
236
|
textAlign: "left",
|
|
391
237
|
alignSelf: "flex-start",
|
|
238
|
+
background: "#eee",
|
|
392
239
|
color: "#1e3860",
|
|
393
240
|
borderRadius: 16,
|
|
394
241
|
padding: "8px 8px",
|
|
@@ -399,28 +246,151 @@ const ChatWindow = ({
|
|
|
399
246
|
"div",
|
|
400
247
|
{
|
|
401
248
|
style: {
|
|
402
|
-
fontSize:
|
|
249
|
+
fontSize: 13,
|
|
403
250
|
display: "flex",
|
|
404
251
|
flexDirection: "column",
|
|
405
252
|
gap: 4
|
|
406
253
|
},
|
|
407
|
-
children: /* @__PURE__ */ jsx(
|
|
254
|
+
children: /* @__PURE__ */ jsx(EllipsisLoader, {})
|
|
408
255
|
}
|
|
409
256
|
)
|
|
410
257
|
}
|
|
411
258
|
),
|
|
412
|
-
messages?.map((msg) => /* @__PURE__ */
|
|
413
|
-
|
|
414
|
-
{
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
msg
|
|
423
|
-
|
|
259
|
+
messages?.map((msg) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
260
|
+
msg.type == "noti" && msg.$userType == "system" && msg.event == "escalationStarted" && /* @__PURE__ */ jsx("div", { className: notificationStyle, children: "We are connecting you with a human agent..." }, msg.$index),
|
|
261
|
+
msg.type == "noti" && msg.$userType == "system" && msg.event == "memberLeft" && /* @__PURE__ */ jsxs("div", { className: notificationStyle, children: [
|
|
262
|
+
/* @__PURE__ */ jsx("strong", { children: "Virtual Agent" }),
|
|
263
|
+
" just left the conversation."
|
|
264
|
+
] }, msg.$index),
|
|
265
|
+
msg.type == "noti" && msg.$userType == "system" && msg.event == "escalationAccepted" && /* @__PURE__ */ jsxs("div", { className: notificationStyle, children: [
|
|
266
|
+
"You are now connected with a",
|
|
267
|
+
" ",
|
|
268
|
+
msg.to_agent ? /* @__PURE__ */ jsx("strong", { children: msg?.to_agent?.name }) : "an agent"
|
|
269
|
+
] }, msg.$index),
|
|
270
|
+
msg.type == "noti" && msg.$userType == "virtual_agent" && msg.event == "escalationDeflected" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
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)),
|
|
424
394
|
showReconnect && /* @__PURE__ */ jsx(
|
|
425
395
|
"button",
|
|
426
396
|
{
|
|
@@ -432,14 +402,14 @@ const ChatWindow = ({
|
|
|
432
402
|
),
|
|
433
403
|
/* @__PURE__ */ jsx("div", { ref: messagesEndRef })
|
|
434
404
|
] }),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
"
|
|
405
|
+
/* @__PURE__ */ jsxs(
|
|
406
|
+
"form",
|
|
437
407
|
{
|
|
408
|
+
onSubmit: handleSend,
|
|
438
409
|
style: {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
borderRadius: 12
|
|
410
|
+
borderTop: "1px solid #eee",
|
|
411
|
+
display: "flex"
|
|
412
|
+
// gap: 8,
|
|
443
413
|
},
|
|
444
414
|
children: [
|
|
445
415
|
/* @__PURE__ */ jsx(
|
|
@@ -458,7 +428,7 @@ const ChatWindow = ({
|
|
|
458
428
|
}
|
|
459
429
|
}
|
|
460
430
|
},
|
|
461
|
-
placeholder: "Ask
|
|
431
|
+
placeholder: "Ask something...",
|
|
462
432
|
className: clsx(inputStyle, autoResize),
|
|
463
433
|
autoFocus: true,
|
|
464
434
|
disabled: inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
|
|
@@ -468,37 +438,28 @@ const ChatWindow = ({
|
|
|
468
438
|
/* @__PURE__ */ jsx(
|
|
469
439
|
"button",
|
|
470
440
|
{
|
|
471
|
-
className: clsx(
|
|
472
|
-
sendButtonStyle,
|
|
473
|
-
input.trim().length > 0 && "active"
|
|
474
|
-
),
|
|
441
|
+
className: clsx(sendButtonStyle, input.trim().length > 0 && "active"),
|
|
475
442
|
type: "submit",
|
|
476
443
|
title: "Send message",
|
|
477
444
|
disabled: inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
|
|
478
|
-
children: /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ jsxs(
|
|
479
446
|
"svg",
|
|
480
447
|
{
|
|
481
448
|
xmlns: "http://www.w3.org/2000/svg",
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
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
|
-
)
|
|
449
|
+
id: "send-icon",
|
|
450
|
+
width: 24,
|
|
451
|
+
height: 24,
|
|
452
|
+
children: [
|
|
453
|
+
/* @__PURE__ */ jsx("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" }),
|
|
454
|
+
/* @__PURE__ */ jsx("path", { d: "M0 0h24v24H0z", fill: "none" })
|
|
455
|
+
]
|
|
495
456
|
}
|
|
496
457
|
)
|
|
497
458
|
}
|
|
498
459
|
)
|
|
499
460
|
]
|
|
500
461
|
}
|
|
501
|
-
)
|
|
462
|
+
)
|
|
502
463
|
] });
|
|
503
464
|
};
|
|
504
465
|
export {
|