@axos-web-dev/shared-components 2.0.0-dev.3-evo-ui.2 → 2.0.0-dev.30-toast
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 +7 -5
- package/dist/Accordion/Accordion.js +3 -3
- package/dist/AlertBanner/index.js +1 -1
- package/dist/Article/Article.js +1 -1
- package/dist/Auth/ErrorAlert.js +8 -6
- package/dist/Button/Button.js +26 -6
- package/dist/Calculators/AnnualFeeCalculator/index.js +2 -2
- 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/ApyCalculatorUserTest/ApyCalculatorUserTest.css.d.ts +95 -0
- package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.js +101 -0
- package/dist/Calculators/ApyCalculatorUserTest/index.d.ts +12 -0
- package/dist/Calculators/ApyCalculatorUserTest/index.js +618 -0
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +2 -1
- package/dist/Calculators/BuyDownCalculator/index.js +1 -1
- package/dist/Calculators/Calculator.js +19 -7
- package/dist/Calculators/MarginTradingCalculator/index.js +8 -6
- package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +2 -2
- package/dist/Calculators/MaxLoanCalculator/index.js +2 -2
- package/dist/Calculators/MonthlyPaymentCalculator/index.js +2 -2
- package/dist/Calculators/MonthlyPaymentLVFCalculator/index.js +1 -1
- package/dist/Calculators/calculator.css.d.ts +21 -1
- package/dist/Calculators/calculator.css.js +3 -3
- package/dist/Calculators/index.d.ts +1 -0
- package/dist/Calculators/index.js +2 -0
- package/dist/Carousel/index.js +9 -7
- package/dist/Chatbot/AnimatedGradientBorder.css.d.ts +5 -0
- package/dist/Chatbot/AnimatedGradientBorder.css.js +13 -3
- package/dist/Chatbot/AudioManager.d.ts +19 -0
- package/dist/Chatbot/AudioManager.js +61 -0
- package/dist/Chatbot/Bubble.css.js +1 -0
- package/dist/Chatbot/Bubble.d.ts +1 -0
- package/dist/Chatbot/Bubble.js +3 -12
- package/dist/Chatbot/Chat.js +17 -7
- package/dist/Chatbot/ChatWindow.css.d.ts +8 -0
- package/dist/Chatbot/ChatWindow.css.js +49 -33
- package/dist/Chatbot/ChatWindow.js +459 -366
- package/dist/Chatbot/Chatbot.css.js +0 -1
- package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
- package/dist/Chatbot/Chatbot.d.ts +13 -2
- package/dist/Chatbot/Chatbot.js +200 -84
- package/dist/Chatbot/ChatbotMessage.d.ts +1 -0
- package/dist/Chatbot/ChatbotMessage.js +189 -160
- package/dist/Chatbot/EllipsisAnimation.js +0 -6
- package/dist/Chatbot/ExpandChatToggle.d.ts +8 -0
- package/dist/Chatbot/ExpandChatToggle.js +74 -0
- package/dist/Chatbot/index.js +11 -2
- package/dist/Chatbot/store/chat.d.ts +8 -0
- package/dist/Chatbot/store/chat.js +14 -2
- package/dist/Chatbot/useHeadlessChat.js +1 -2
- package/dist/Chevron/index.js +10 -5
- package/dist/Comparison/Comparison.css.js +3 -2
- package/dist/Comparison/Comparison.js +7 -5
- package/dist/ContentBanner/index.js +1 -1
- package/dist/ExecutiveBio/ExecutiveBio.js +115 -106
- package/dist/ExecutiveBio/ExecutiveBioSet.js +1 -1
- package/dist/FaqAccordion/index.js +8 -6
- package/dist/FooterDisclosure/FooterDisclosure.js +1 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +26 -6
- package/dist/Forms/ApplyNow.js +8 -6
- package/dist/Forms/BoatMooringLocation.d.ts +6 -1
- package/dist/Forms/BoatMooringLocation.js +145 -8
- package/dist/Forms/ContactUsBusiness.js +9 -7
- package/dist/Forms/ContactUsBusinessNameEmail.js +9 -7
- package/dist/Forms/ContactUsNMLSId.js +9 -7
- package/dist/Forms/ContactUsSchwabAAS.d.ts +11 -0
- package/dist/Forms/ContactUsSchwabAAS.js +263 -0
- package/dist/Forms/CpraRequest.js +8 -6
- package/dist/Forms/CraPublicFile.js +9 -7
- package/dist/Forms/EmailOnly.js +10 -8
- package/dist/Forms/FormEnums.js +2 -2
- package/dist/Forms/MortgageRate/MortgageRateForm.js +9 -7
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +8 -6
- package/dist/Forms/MortgageWarehouseLending.d.ts +1 -1
- package/dist/Forms/MortgageWarehouseLending.js +16 -14
- package/dist/Forms/SuccesForm.js +9 -7
- package/dist/Forms/index.d.ts +1 -0
- package/dist/Forms/index.js +2 -0
- 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 +6 -1
- package/dist/HeroBanner/HeroBanner.js +54 -183
- 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 +9 -7
- package/dist/IconBillboard/IconBillboard.css.js +2 -1
- package/dist/IconBillboard/IconBillboard.interface.d.ts +2 -0
- package/dist/IconBillboard/IconBillboardSet.js +1 -1
- package/dist/IconBillboard/sections/CallToActionSection.js +3 -1
- package/dist/ImageBillboard/ImageBillboard.interface.d.ts +2 -0
- package/dist/ImageBillboard/ImageBillboard.js +1 -1
- package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
- package/dist/ImageBillboard/ImageBillboardSet.js +4 -1
- package/dist/ImageLink/ImageLink.js +7 -5
- package/dist/ImageLink/ImageLinkSet.js +6 -4
- package/dist/ImageLink/index.js +8 -6
- package/dist/ImageToast/ImageToast.css.d.ts +5 -0
- package/dist/ImageToast/ImageToast.css.js +13 -0
- package/dist/ImageToast/index.d.ts +9 -0
- package/dist/ImageToast/index.js +188 -0
- package/dist/Input/Checkbox.js +2 -2
- package/dist/Input/DownPaymentInput.js +1 -1
- package/dist/Input/Dropdown.js +1 -1
- package/dist/Input/Input.js +1 -1
- package/dist/Input/InputTextArea.js +1 -1
- package/dist/Insight/Featured/CategorySelector.js +8 -6
- package/dist/Insight/Featured/Featured.js +10 -8
- package/dist/Insight/Featured/Header.js +8 -6
- package/dist/LandingPageHeader/LandingPageHeader.js +1 -1
- package/dist/Modal/Modal.js +8 -6
- package/dist/Modal/contextApi/store.d.ts +0 -3
- package/dist/Modal/contextApi/store.js +88 -2
- package/dist/NavigationMenu/AxosALTS/index.js +7 -5
- package/dist/NavigationMenu/AxosAdvisorServices/index.js +0 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +7 -5
- 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 +30 -25
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +78 -41
- package/dist/NavigationMenu/AxosBank/index.js +50 -32
- package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +40 -43
- package/dist/NavigationMenu/AxosFiduciary/index.js +0 -1
- package/dist/NavigationMenu/LaVictoire/index.js +8 -6
- package/dist/NavigationMenu/Navbar.js +9 -7
- package/dist/NavigationMenu/SignInNavButton.js +10 -8
- package/dist/PageNavItem/PageNavItem.js +1 -1
- package/dist/SetContainer/SetContainer.css.d.ts +1 -0
- package/dist/SetContainer/SetContainer.css.js +5 -3
- package/dist/SetContainer/SetContainer.js +15 -7
- package/dist/SetContainer/index.js +2 -1
- package/dist/SocialMediaBar/iconsRepository.js +8 -6
- package/dist/StepItem/StepItem.js +1 -1
- package/dist/StepItemSet/StepItemSet.js +1 -1
- package/dist/Table/Table.css.d.ts +14 -1
- package/dist/Table/Table.css.js +21 -19
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/Table.js +5 -3
- package/dist/Topic/Topic.js +1 -1
- package/dist/TopicalNavItem/TopicalNavItem.css.d.ts +0 -1
- package/dist/TopicalNavItem/TopicalNavItem.css.js +2 -4
- package/dist/TopicalNavItem/TopicalNavItem.js +11 -33
- package/dist/TopicalNavItem/index.js +1 -2
- package/dist/VideoTile/VideoTile.js +7 -5
- package/dist/VideoWrapper/index.js +8 -6
- package/dist/assets/Calculators/ApyCalculator/ApyCalculator.css +350 -64
- package/dist/assets/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css +424 -0
- package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +2 -2
- package/dist/assets/Calculators/calculator.css +25 -15
- package/dist/assets/Chatbot/AnimatedGradientBorder.css +104 -24
- package/dist/assets/Chatbot/Bubble.css +25 -7
- package/dist/assets/Chatbot/ChatWindow.css +181 -88
- package/dist/assets/Comparison/Comparison.css +2 -2
- package/dist/assets/DownloadTile/DownloadTile.css +7 -0
- package/dist/assets/ExecutiveBio/ExecutiveBio.css +38 -14
- package/dist/assets/HeroBanner/HeroBanner.css +83 -65
- package/dist/assets/HeroBanner/LargeBanner.css +126 -59
- package/dist/assets/IconBillboard/IconBillboard.css +33 -0
- package/dist/assets/ImageBillboard/ImageBillboard.css +1 -1
- package/dist/assets/ImageToast/ImageToast.css +33 -0
- package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css +49 -49
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css +88 -88
- package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css +82 -82
- package/dist/assets/SetContainer/SetContainer.css +25 -15
- package/dist/assets/Table/Table.css +85 -76
- package/dist/assets/TextBlock/TextBlock.css +7 -0
- package/dist/assets/TopicalNavItem/TopicalNavItem.css +25 -52
- package/dist/assets/TopicalNavSet/TopicalNavSet.css +29 -4
- package/dist/assets/VideoTile/VideoTile.css +6 -0
- package/dist/assets/globals.css +9 -9
- package/dist/assets/notification.mp3.js +4 -0
- 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/main.js +24 -8
- package/dist/themes/axos.css.d.ts +1 -0
- package/dist/themes/axos.css.js +1 -1
- package/dist/utils/allowedAxosDomains.js +2 -1
- package/dist/utils/appendQueryParams.d.ts +3 -1
- package/dist/utils/appendQueryParams.js +66 -66
- package/dist/utils/getPosition.d.ts +1 -0
- package/dist/utils/getPosition.js +17 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/tealiumOrganicFallback.d.ts +21 -0
- package/dist/utils/tealiumOrganicFallback.js +26 -0
- package/dist/utils/useVisibility.d.ts +1 -0
- package/dist/utils/useVisibility.js +18 -0
- package/dist/utils/variant.types.d.ts +1 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +3 -3
- package/dist/Chatbot/authenticate.d.ts +0 -3
- package/dist/Chatbot/authenticate.js +0 -16
- package/dist/assets/Chatbot/Chatbot.css +0 -3
|
@@ -9,7 +9,7 @@ import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
import clsx from "clsx";
|
|
12
|
-
import { shimmerText, notificationStyle, messageStyle, user_msg, agent_msg, inline_button_wrapper, inline_button, endChatButtonStyle } from "./ChatWindow.css.js";
|
|
12
|
+
import { shimmerText, notificationStyle, trMortgageTable, tableCell, tableHead, tableMsg, messageStyle, user_msg, agent_msg, inline_button_wrapper, inline_button, endChatButtonStyle } from "./ChatWindow.css.js";
|
|
13
13
|
import { useOpenChat } from "./store/chat.js";
|
|
14
14
|
function timeAgo(date) {
|
|
15
15
|
const seconds = Math.floor(((/* @__PURE__ */ new Date()).getTime() - date.getTime()) / 1e3);
|
|
@@ -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
|
{
|
|
@@ -64,172 +68,197 @@ const ChatbotMessage = ({
|
|
|
64
68
|
}
|
|
65
69
|
);
|
|
66
70
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"You are now connected with a",
|
|
75
|
-
" ",
|
|
76
|
-
msg.to_agent ? /* @__PURE__ */ jsx("strong", { children: msg?.to_agent?.name }) : "an agent"
|
|
77
|
-
] }, msg.$index),
|
|
78
|
-
msg.type == "noti" && msg.$userType == "virtual_agent" && msg.event == "escalationDeflected" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
className: notificationStyle,
|
|
82
|
-
style: { fontSize: 12 },
|
|
83
|
-
children: [
|
|
84
|
-
"Our chat team is available weekdays, 8am-5pm, except federal bank holidays. For immediate assistance you can reach out to us at",
|
|
85
|
-
" ",
|
|
86
|
-
/* @__PURE__ */ jsx("a", { href: "tel:1-888-502-2967", children: "1-888-502-2967" }),
|
|
87
|
-
"."
|
|
88
|
-
]
|
|
71
|
+
const checkInformationMortgage = typeof msg.content == "string" ? msg.content.replace(/•/g, "-").replace(/\\n/g, "\n") : "";
|
|
72
|
+
return /* @__PURE__ */ jsxs(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
style: {
|
|
76
|
+
display: "flex",
|
|
77
|
+
flexDirection: "column"
|
|
89
78
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
79
|
+
children: [
|
|
80
|
+
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),
|
|
81
|
+
msg.type == "noti" && msg.$userType == "system" && msg.event == "memberLeft" && /* @__PURE__ */ jsxs("div", { className: notificationStyle, children: [
|
|
82
|
+
/* @__PURE__ */ jsx("strong", { children: "Virtual Agent" }),
|
|
83
|
+
" just left the conversation."
|
|
84
|
+
] }, msg.$index),
|
|
85
|
+
msg.type == "noti" && msg.$userType == "system" && msg.event == "escalationAccepted" && /* @__PURE__ */ jsxs("div", { className: notificationStyle, children: [
|
|
86
|
+
"You are now connected with a",
|
|
87
|
+
" ",
|
|
88
|
+
msg.to_agent ? /* @__PURE__ */ jsx("strong", { children: msg?.to_agent?.name }) : "an agent"
|
|
89
|
+
] }, msg.$index),
|
|
90
|
+
msg.type == "noti" && msg.$userType == "virtual_agent" && msg.event == "escalationDeflected" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
className: notificationStyle,
|
|
94
|
+
style: { fontSize: 12 },
|
|
95
|
+
children: [
|
|
96
|
+
"Our chat team is available weekdays, 8am-5pm, except federal bank holidays. For immediate assistance you can reach out to us at",
|
|
97
|
+
" ",
|
|
98
|
+
/* @__PURE__ */ jsx("a", { href: "tel:1-888-502-2967", children: "1-888-502-2967" }),
|
|
99
|
+
"."
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
msg.$index
|
|
103
|
+
) }),
|
|
104
|
+
["text", "markdown_template", "markdown"].includes(msg.type) && /* @__PURE__ */ jsx(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: clsx(
|
|
108
|
+
messageStyle,
|
|
109
|
+
msg.$userType == "end_user" ? user_msg : agent_msg
|
|
110
|
+
),
|
|
111
|
+
children: /* @__PURE__ */ jsxs(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
style: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
display: "flex",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
gap: 4
|
|
119
|
+
},
|
|
120
|
+
children: [
|
|
121
|
+
msg.$userType == "virtual_agent" && /* @__PURE__ */ jsxs(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
style: {
|
|
125
|
+
display: "flex",
|
|
126
|
+
alignItems: "center",
|
|
127
|
+
gap: "8px"
|
|
128
|
+
},
|
|
129
|
+
children: [
|
|
130
|
+
showAvatar && /* @__PURE__ */ jsx(
|
|
131
|
+
"img",
|
|
132
|
+
{
|
|
133
|
+
width: 24,
|
|
134
|
+
height: 24,
|
|
135
|
+
src: virtualAgent?.avatar_url,
|
|
136
|
+
alt: "agent avatar"
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
showName && /* @__PURE__ */ jsx("strong", { children: virtualAgent?.name })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
msg.$userType != "end_user" ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
144
|
+
ReactMarkdown,
|
|
145
|
+
{
|
|
146
|
+
remarkPlugins: [[remarkGfm, { singleTilde: false }]],
|
|
147
|
+
components: {
|
|
148
|
+
p: ({ ...props }) => /* @__PURE__ */ jsx(
|
|
149
|
+
"p",
|
|
150
|
+
{
|
|
151
|
+
style: { margin: 0, fontSize: "inherit" },
|
|
152
|
+
title: new Date(msg.$timestamp).toLocaleTimeString([], {
|
|
153
|
+
hour: "2-digit",
|
|
154
|
+
minute: "2-digit"
|
|
155
|
+
}),
|
|
156
|
+
...props
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
a: ({ ...props }) => /* @__PURE__ */ jsx("a", { style: { wordBreak: "break-word" }, ...props }),
|
|
160
|
+
table: ({ node, ...props }) => /* @__PURE__ */ jsx("div", { style: { overflowX: "auto", marginTop: 4 }, children: /* @__PURE__ */ jsx(
|
|
161
|
+
"table",
|
|
162
|
+
{
|
|
163
|
+
...props,
|
|
164
|
+
className: clsx(tableMsg),
|
|
165
|
+
style: { tableLayout: "fixed" }
|
|
166
|
+
}
|
|
167
|
+
) }),
|
|
168
|
+
th: ({ node, ...props }) => /* @__PURE__ */ jsx("th", { ...props, className: clsx(tableHead) }),
|
|
169
|
+
td: ({ node, ...props }) => /* @__PURE__ */ jsx("td", { ...props, className: clsx(tableCell) }),
|
|
170
|
+
tr: ({ node, ...props }) => {
|
|
171
|
+
return /* @__PURE__ */ jsx("tr", { className: clsx(trMortgageTable), ...props });
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
children: msg?.content?.includes("Does this information look correct?") ? checkInformationMortgage : msg.content
|
|
175
|
+
}
|
|
176
|
+
) }) : /* @__PURE__ */ jsx(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
title: new Date(msg.$timestamp).toLocaleTimeString([], {
|
|
180
|
+
hour: "2-digit",
|
|
181
|
+
minute: "2-digit"
|
|
182
|
+
}),
|
|
183
|
+
children: msg.content
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
},
|
|
190
|
+
msg.$index
|
|
98
191
|
),
|
|
99
|
-
|
|
192
|
+
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) => {
|
|
193
|
+
return /* @__PURE__ */ jsx(
|
|
194
|
+
"button",
|
|
195
|
+
{
|
|
196
|
+
className: inline_button,
|
|
197
|
+
onClick: () => {
|
|
198
|
+
onSend?.(button?.title);
|
|
199
|
+
},
|
|
200
|
+
children: button.title
|
|
201
|
+
},
|
|
202
|
+
index
|
|
203
|
+
);
|
|
204
|
+
}) }),
|
|
205
|
+
" ",
|
|
206
|
+
msg.event == "chatEnded" && msg.status == "failed" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
207
|
+
/* @__PURE__ */ jsxs(
|
|
208
|
+
"div",
|
|
209
|
+
{
|
|
210
|
+
title: (/* @__PURE__ */ new Date()).toLocaleString(),
|
|
211
|
+
style: {
|
|
212
|
+
fontSize: 12,
|
|
213
|
+
color: "#888",
|
|
214
|
+
marginBottom: 4,
|
|
215
|
+
textAlign: "center"
|
|
216
|
+
},
|
|
217
|
+
children: [
|
|
218
|
+
"No team members are online at the moment.",
|
|
219
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
220
|
+
" Please try again later."
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginBottom: 12 }, children: /* @__PURE__ */ jsx("button", { className: endChatButtonStyle, onClick: onEndChat, children: "End Chat" }) })
|
|
225
|
+
] }),
|
|
226
|
+
msg.event == "chatEnded" && msg.status != "failed" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
227
|
+
/* @__PURE__ */ jsxs(
|
|
228
|
+
"div",
|
|
229
|
+
{
|
|
230
|
+
title: (/* @__PURE__ */ new Date()).toLocaleString(),
|
|
231
|
+
style: {
|
|
232
|
+
fontSize: 12,
|
|
233
|
+
color: "#888",
|
|
234
|
+
marginBottom: 4,
|
|
235
|
+
textAlign: "center"
|
|
236
|
+
},
|
|
237
|
+
children: [
|
|
238
|
+
"Thank you for chatting!",
|
|
239
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
240
|
+
" This conversation has ended."
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
),
|
|
244
|
+
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginBottom: 12 }, children: /* @__PURE__ */ jsx("button", { className: endChatButtonStyle, onClick: onEndChat, children: "End Chat" }) })
|
|
245
|
+
] }),
|
|
246
|
+
msg.type == "text" && /* @__PURE__ */ jsx(
|
|
100
247
|
"div",
|
|
101
248
|
{
|
|
102
249
|
style: {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
250
|
+
textAlign: msg.$userType === "end_user" ? "right" : "left",
|
|
251
|
+
fontSize: 12,
|
|
252
|
+
color: vars.chatbot.window.timestampColor,
|
|
253
|
+
textTransform: "capitalize",
|
|
254
|
+
fontFamily: "inherit"
|
|
107
255
|
},
|
|
108
|
-
children:
|
|
109
|
-
msg.$userType == "virtual_agent" && /* @__PURE__ */ jsxs(
|
|
110
|
-
"div",
|
|
111
|
-
{
|
|
112
|
-
style: {
|
|
113
|
-
display: "flex",
|
|
114
|
-
alignItems: "center",
|
|
115
|
-
gap: "8px"
|
|
116
|
-
},
|
|
117
|
-
children: [
|
|
118
|
-
showAvatar && /* @__PURE__ */ jsx(
|
|
119
|
-
"img",
|
|
120
|
-
{
|
|
121
|
-
width: 24,
|
|
122
|
-
height: 24,
|
|
123
|
-
src: virtualAgent?.avatar_url,
|
|
124
|
-
alt: "agent avatar"
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
showName && /* @__PURE__ */ jsx("strong", { children: virtualAgent?.name })
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
msg.$userType != "end_user" ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
132
|
-
ReactMarkdown,
|
|
133
|
-
{
|
|
134
|
-
remarkPlugins: [[remarkGfm, { singleTilde: false }]],
|
|
135
|
-
components: {
|
|
136
|
-
p: ({ ...props }) => /* @__PURE__ */ jsx(
|
|
137
|
-
"p",
|
|
138
|
-
{
|
|
139
|
-
style: { margin: 0, fontSize: "inherit" },
|
|
140
|
-
title: new Date(msg.$timestamp).toLocaleTimeString([], {
|
|
141
|
-
hour: "2-digit",
|
|
142
|
-
minute: "2-digit"
|
|
143
|
-
}),
|
|
144
|
-
...props
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
a: ({ ...props }) => /* @__PURE__ */ jsx("a", { style: { wordBreak: "break-word" }, ...props })
|
|
148
|
-
},
|
|
149
|
-
children: msg.content
|
|
150
|
-
}
|
|
151
|
-
) }) : /* @__PURE__ */ jsx(
|
|
152
|
-
"div",
|
|
153
|
-
{
|
|
154
|
-
title: new Date(msg.$timestamp).toLocaleTimeString([], {
|
|
155
|
-
hour: "2-digit",
|
|
156
|
-
minute: "2-digit"
|
|
157
|
-
}),
|
|
158
|
-
children: msg.content
|
|
159
|
-
}
|
|
160
|
-
)
|
|
161
|
-
]
|
|
256
|
+
children: timeText
|
|
162
257
|
}
|
|
163
258
|
)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
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) => {
|
|
168
|
-
return /* @__PURE__ */ jsx(
|
|
169
|
-
"button",
|
|
170
|
-
{
|
|
171
|
-
className: inline_button,
|
|
172
|
-
onClick: () => {
|
|
173
|
-
onSend?.(button?.title);
|
|
174
|
-
},
|
|
175
|
-
children: button.title
|
|
176
|
-
},
|
|
177
|
-
index
|
|
178
|
-
);
|
|
179
|
-
}) }),
|
|
180
|
-
" ",
|
|
181
|
-
msg.event == "chatEnded" && msg.status == "failed" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
182
|
-
/* @__PURE__ */ jsxs(
|
|
183
|
-
"div",
|
|
184
|
-
{
|
|
185
|
-
title: (/* @__PURE__ */ new Date()).toLocaleString(),
|
|
186
|
-
style: {
|
|
187
|
-
fontSize: 12,
|
|
188
|
-
color: "#888",
|
|
189
|
-
marginBottom: 4,
|
|
190
|
-
textAlign: "center"
|
|
191
|
-
},
|
|
192
|
-
children: [
|
|
193
|
-
"No team members are online at the moment.",
|
|
194
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
195
|
-
" Please try again later."
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginBottom: 12 }, children: /* @__PURE__ */ jsx("button", { className: endChatButtonStyle, onClick: onEndChat, children: "End Chat" }) })
|
|
200
|
-
] }),
|
|
201
|
-
msg.event == "chatEnded" && msg.status != "failed" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
202
|
-
/* @__PURE__ */ jsxs(
|
|
203
|
-
"div",
|
|
204
|
-
{
|
|
205
|
-
title: (/* @__PURE__ */ new Date()).toLocaleString(),
|
|
206
|
-
style: {
|
|
207
|
-
fontSize: 12,
|
|
208
|
-
color: "#888",
|
|
209
|
-
marginBottom: 4,
|
|
210
|
-
textAlign: "center"
|
|
211
|
-
},
|
|
212
|
-
children: [
|
|
213
|
-
"Thank you for chatting!",
|
|
214
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
215
|
-
" This conversation has ended."
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
/* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginBottom: 12 }, children: /* @__PURE__ */ jsx("button", { className: endChatButtonStyle, onClick: onEndChat, children: "End Chat" }) })
|
|
220
|
-
] }),
|
|
221
|
-
msg.type == "text" && /* @__PURE__ */ jsx(
|
|
222
|
-
"div",
|
|
223
|
-
{
|
|
224
|
-
style: {
|
|
225
|
-
textAlign: msg.$userType === "end_user" ? "right" : "left",
|
|
226
|
-
fontSize: 12,
|
|
227
|
-
color: vars.chatbot.window.timestampColor
|
|
228
|
-
},
|
|
229
|
-
children: timeText
|
|
230
|
-
}
|
|
231
|
-
)
|
|
232
|
-
] });
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
);
|
|
233
262
|
};
|
|
234
263
|
export {
|
|
235
264
|
ChatbotMessage
|
|
@@ -30,9 +30,6 @@ const loadingTransition = {
|
|
|
30
30
|
ease: "easeInOut"
|
|
31
31
|
};
|
|
32
32
|
const EllipsisLoader = () => {
|
|
33
|
-
const project = process.env.CCAI_PROJECT_ID;
|
|
34
|
-
const isAxos = project === "axos";
|
|
35
|
-
const endUserBg = isAxos ? "#14263d" : "#323339";
|
|
36
33
|
return /* @__PURE__ */ jsxs(
|
|
37
34
|
motion.svg,
|
|
38
35
|
{
|
|
@@ -49,7 +46,6 @@ const EllipsisLoader = () => {
|
|
|
49
46
|
cx: "20",
|
|
50
47
|
cy: "15",
|
|
51
48
|
r: "8",
|
|
52
|
-
fill: endUserBg,
|
|
53
49
|
variants: loadingCircleVariants,
|
|
54
50
|
transition: loadingTransition
|
|
55
51
|
}
|
|
@@ -60,7 +56,6 @@ const EllipsisLoader = () => {
|
|
|
60
56
|
cx: "50",
|
|
61
57
|
cy: "15",
|
|
62
58
|
r: "8",
|
|
63
|
-
fill: endUserBg,
|
|
64
59
|
variants: loadingCircleVariants,
|
|
65
60
|
transition: loadingTransition
|
|
66
61
|
}
|
|
@@ -71,7 +66,6 @@ const EllipsisLoader = () => {
|
|
|
71
66
|
cx: "80",
|
|
72
67
|
cy: "15",
|
|
73
68
|
r: "8",
|
|
74
|
-
fill: endUserBg,
|
|
75
69
|
variants: loadingCircleVariants,
|
|
76
70
|
transition: loadingTransition
|
|
77
71
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { vars } from "../themes/axos.css.js";
|
|
3
|
+
import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
import clsx from "clsx";
|
|
8
|
+
import { button_bar, expandToggleStyle } from "./ChatWindow.css.js";
|
|
9
|
+
const ExpandChatToggle = ({
|
|
10
|
+
isExpanded,
|
|
11
|
+
onToggle
|
|
12
|
+
}) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
"button",
|
|
15
|
+
{
|
|
16
|
+
type: "button",
|
|
17
|
+
onClick: onToggle,
|
|
18
|
+
className: clsx(button_bar, expandToggleStyle),
|
|
19
|
+
style: { border: "none", cursor: "pointer", padding: 0, lineHeight: 1 },
|
|
20
|
+
"aria-label": isExpanded ? "Collapse chat window" : "Expand chat window",
|
|
21
|
+
title: isExpanded ? "Collapse" : "Expand",
|
|
22
|
+
children: isExpanded ? (
|
|
23
|
+
// Collapse: inward corners — shown when panel is expanded (shrink toward bottom-right)
|
|
24
|
+
/* @__PURE__ */ jsxs(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
width: 16,
|
|
29
|
+
height: 16,
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
stroke: vars.chatbot.window.headerText,
|
|
33
|
+
strokeWidth: 2,
|
|
34
|
+
strokeLinecap: "round",
|
|
35
|
+
strokeLinejoin: "round",
|
|
36
|
+
"aria-hidden": true,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx("polyline", { points: "20 14 14 14 14 20" }),
|
|
39
|
+
/* @__PURE__ */ jsx("polyline", { points: "4 10 10 10 10 4" }),
|
|
40
|
+
/* @__PURE__ */ jsx("line", { x1: "14", y1: "14", x2: "21", y2: "21" }),
|
|
41
|
+
/* @__PURE__ */ jsx("line", { x1: "10", y1: "10", x2: "3", y2: "3" })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
) : (
|
|
46
|
+
// Expand: outward corners — shown when panel is compact (grow toward top-left)
|
|
47
|
+
/* @__PURE__ */ jsxs(
|
|
48
|
+
"svg",
|
|
49
|
+
{
|
|
50
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
+
width: 16,
|
|
52
|
+
height: 16,
|
|
53
|
+
viewBox: "0 0 24 24",
|
|
54
|
+
fill: "none",
|
|
55
|
+
stroke: vars.chatbot.window.headerText,
|
|
56
|
+
strokeWidth: 2,
|
|
57
|
+
strokeLinecap: "round",
|
|
58
|
+
strokeLinejoin: "round",
|
|
59
|
+
"aria-hidden": true,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx("polyline", { points: "9 3 3 3 3 9" }),
|
|
62
|
+
/* @__PURE__ */ jsx("polyline", { points: "15 21 21 21 21 15" }),
|
|
63
|
+
/* @__PURE__ */ jsx("line", { x1: "3", y1: "3", x2: "10", y2: "10" }),
|
|
64
|
+
/* @__PURE__ */ jsx("line", { x1: "21", y1: "21", x2: "14", y2: "14" })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
ExpandChatToggle
|
|
74
|
+
};
|
package/dist/Chatbot/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Bubble } from "./Bubble.js";
|
|
3
3
|
import { borderHoverGradient, bubbleButton, bubbleText, bubbleWrapper, inner, svgFill } from "./Bubble.css.js";
|
|
4
|
-
import { Chatbot } from "./Chatbot.js";
|
|
4
|
+
import { Chatbot, audioManager } from "./Chatbot.js";
|
|
5
5
|
import { chatbotAXB, chatbotUFB } from "./Chatbot.css.js";
|
|
6
6
|
import { ChatWindow } from "./ChatWindow.js";
|
|
7
|
-
import { agent_msg, arrowFill, autoResize, button_bar, button_reset, buttonss_section, chatEndCircle, chatEndDialogOverlay, chatFinishDialog, chatNetworkStatus, chat_title, chatbotMenu, chatbotMenuItem, endChatButtonStyle, inline_button, inline_button_wrapper, inputStyle, left_bar_section, messageStyle, messagesContainerStyle, noAnswerButton, notificationStyle, sendButtonStyle, shimmerText, thankyou_image, thankyou_message, thankyou_overlay, user_msg, windowBarStyle, windowOpenStyle, windowStyle } from "./ChatWindow.css.js";
|
|
7
|
+
import { agent_msg, arrowFill, autoResize, button_bar, button_reset, buttonss_section, chatAiDisclaimer, chatEndCircle, chatEndDialogOverlay, chatFinishDialog, chatNetworkStatus, chat_title, chatbotMenu, chatbotMenuItem, endChatButtonStyle, expandToggleStyle, formTextButton, inline_button, inline_button_wrapper, inputStyle, left_bar_section, messageStyle, messagesContainerStyle, noAnswerButton, notificationStyle, sendButtonStyle, shimmerText, tableCell, tableHead, tableMsg, thankyou_image, thankyou_message, thankyou_overlay, trMortgageTable, user_msg, windowBarStyle, windowExpandedStyle, windowOpenStyle, windowStyle } from "./ChatWindow.css.js";
|
|
8
8
|
import { useOpenChat } from "./store/chat.js";
|
|
9
9
|
import { useMessages } from "./store/messages.js";
|
|
10
10
|
export {
|
|
@@ -13,6 +13,7 @@ export {
|
|
|
13
13
|
Chatbot,
|
|
14
14
|
agent_msg,
|
|
15
15
|
arrowFill,
|
|
16
|
+
audioManager,
|
|
16
17
|
autoResize,
|
|
17
18
|
borderHoverGradient,
|
|
18
19
|
bubbleButton,
|
|
@@ -21,6 +22,7 @@ export {
|
|
|
21
22
|
button_bar,
|
|
22
23
|
button_reset,
|
|
23
24
|
buttonss_section,
|
|
25
|
+
chatAiDisclaimer,
|
|
24
26
|
chatEndCircle,
|
|
25
27
|
chatEndDialogOverlay,
|
|
26
28
|
chatFinishDialog,
|
|
@@ -31,6 +33,8 @@ export {
|
|
|
31
33
|
chatbotMenuItem,
|
|
32
34
|
chatbotUFB,
|
|
33
35
|
endChatButtonStyle,
|
|
36
|
+
expandToggleStyle,
|
|
37
|
+
formTextButton,
|
|
34
38
|
inline_button,
|
|
35
39
|
inline_button_wrapper,
|
|
36
40
|
inner,
|
|
@@ -43,13 +47,18 @@ export {
|
|
|
43
47
|
sendButtonStyle,
|
|
44
48
|
shimmerText,
|
|
45
49
|
svgFill,
|
|
50
|
+
tableCell,
|
|
51
|
+
tableHead,
|
|
52
|
+
tableMsg,
|
|
46
53
|
thankyou_image,
|
|
47
54
|
thankyou_message,
|
|
48
55
|
thankyou_overlay,
|
|
56
|
+
trMortgageTable,
|
|
49
57
|
useMessages,
|
|
50
58
|
useOpenChat,
|
|
51
59
|
user_msg,
|
|
52
60
|
windowBarStyle,
|
|
61
|
+
windowExpandedStyle,
|
|
53
62
|
windowOpenStyle,
|
|
54
63
|
windowStyle
|
|
55
64
|
};
|
|
@@ -7,6 +7,7 @@ interface OpenChatState {
|
|
|
7
7
|
reset: () => void;
|
|
8
8
|
showThankyouMessage: boolean;
|
|
9
9
|
displayThankyouMessage: () => void;
|
|
10
|
+
hideDisplayThankyouMessage: () => void;
|
|
10
11
|
toggleThankyouMessage?: () => void;
|
|
11
12
|
hasEscalated?: boolean;
|
|
12
13
|
startEscalation?: () => void;
|
|
@@ -14,6 +15,13 @@ interface OpenChatState {
|
|
|
14
15
|
isBlockedInput?: boolean;
|
|
15
16
|
blockInput?: () => void;
|
|
16
17
|
unblockInput?: () => void;
|
|
18
|
+
hasStarted: boolean;
|
|
19
|
+
setChatStarted: () => void;
|
|
20
|
+
resetChatStarted: () => void;
|
|
21
|
+
chatStatus: "idle" | "connected" | "connecting" | "ending" | "ended";
|
|
22
|
+
setChatStatus: (status: "idle" | "connected" | "connecting" | "ending" | "ended") => void;
|
|
23
|
+
isWindowExpanded: boolean;
|
|
24
|
+
toggleWindowExpanded: () => void;
|
|
17
25
|
}
|
|
18
26
|
export declare const useOpenChat: import('zustand').UseBoundStore<import('zustand').StoreApi<OpenChatState>>;
|
|
19
27
|
export {};
|
|
@@ -4,6 +4,10 @@ const useOpenChat = create((set, get) => ({
|
|
|
4
4
|
hasOpenedOnce: false,
|
|
5
5
|
showThankyouMessage: false,
|
|
6
6
|
hasEscalated: false,
|
|
7
|
+
hasStarted: false,
|
|
8
|
+
chatStatus: "idle",
|
|
9
|
+
isWindowExpanded: false,
|
|
10
|
+
toggleWindowExpanded: () => set((state) => ({ isWindowExpanded: !state.isWindowExpanded })),
|
|
7
11
|
toggle: () => set((state) => ({ isOpen: !state.isOpen, hasOpenedOnce: true })),
|
|
8
12
|
open: () => {
|
|
9
13
|
const alreadyOpened = get().hasOpenedOnce;
|
|
@@ -18,15 +22,23 @@ const useOpenChat = create((set, get) => ({
|
|
|
18
22
|
isOpen: false,
|
|
19
23
|
showThankyouMessage: false,
|
|
20
24
|
hasEscalated: false,
|
|
21
|
-
isBlockedInput: false
|
|
25
|
+
isBlockedInput: false,
|
|
26
|
+
hasStarted: false,
|
|
27
|
+
isWindowExpanded: false
|
|
22
28
|
}),
|
|
23
29
|
displayThankyouMessage: () => set({ showThankyouMessage: true }),
|
|
30
|
+
hideDisplayThankyouMessage: () => set({ showThankyouMessage: false }),
|
|
24
31
|
toggleThankyouMessage: () => set((state) => ({ showThankyouMessage: !state.showThankyouMessage })),
|
|
25
32
|
startEscalation: () => set({ hasEscalated: true }),
|
|
26
33
|
endEscalation: () => set({ hasEscalated: false }),
|
|
27
34
|
isBlockedInput: false,
|
|
28
35
|
blockInput: () => set({ isBlockedInput: true }),
|
|
29
|
-
unblockInput: () => set({ isBlockedInput: false })
|
|
36
|
+
unblockInput: () => set({ isBlockedInput: false }),
|
|
37
|
+
setChatStarted: () => set({ hasStarted: true }),
|
|
38
|
+
resetChatStarted: () => set({ hasStarted: false }),
|
|
39
|
+
setChatStatus: (status) => set({
|
|
40
|
+
chatStatus: status
|
|
41
|
+
})
|
|
30
42
|
}));
|
|
31
43
|
export {
|
|
32
44
|
useOpenChat
|
|
@@ -76,8 +76,7 @@ function useHeadlessChat({
|
|
|
76
76
|
let chatTimeoutHandler;
|
|
77
77
|
async function init() {
|
|
78
78
|
setStatus("connecting");
|
|
79
|
-
const { Client
|
|
80
|
-
if (debug) Logger.addHandler(consoleLoggerHandler);
|
|
79
|
+
const { Client } = await import("@ujet/websdk-headless");
|
|
81
80
|
try {
|
|
82
81
|
clientRef.current = new Client({
|
|
83
82
|
companyId,
|