@axos-web-dev/shared-components 1.0.77-patch.74 → 1.0.77-patch.75
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/Chatbot/Chatbot.js +33 -16
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +18 -0
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +27 -27
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
- package/dist/assets/DownloadTile/DownloadTile.css +7 -0
- package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +353 -353
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +445 -445
- package/dist/assets/SetContainer/SetContainer.css +3 -0
- package/dist/assets/TextBlock/TextBlock.css +7 -0
- package/package.json +135 -135
package/dist/Chatbot/Chatbot.js
CHANGED
|
@@ -28,6 +28,7 @@ const Chatbot = ({
|
|
|
28
28
|
const menuRef = useRef(null);
|
|
29
29
|
const isMountedRef = useRef(false);
|
|
30
30
|
const chatRef = useRef(null);
|
|
31
|
+
const chatLoading = useRef(false);
|
|
31
32
|
const agent_virtual = useRef(null);
|
|
32
33
|
const [status, setStatus] = useState("idle");
|
|
33
34
|
const [hasStarted, setHasStarted] = useState(false);
|
|
@@ -87,7 +88,7 @@ const Chatbot = ({
|
|
|
87
88
|
setMenusLoaded(true);
|
|
88
89
|
console.log("menus:", menuRef.current);
|
|
89
90
|
if (menuRef.current !== null) {
|
|
90
|
-
await startChat();
|
|
91
|
+
await startChat("onReady");
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
};
|
|
@@ -248,23 +249,28 @@ const Chatbot = ({
|
|
|
248
249
|
registerEventHandlers();
|
|
249
250
|
return;
|
|
250
251
|
};
|
|
251
|
-
const startChat = async () => {
|
|
252
|
-
console.log("Starting chat", chatRef.current);
|
|
252
|
+
const startChat = async (source) => {
|
|
253
253
|
const client = clientRef.current;
|
|
254
254
|
if (!client) return;
|
|
255
255
|
if (hasStarted) return;
|
|
256
|
-
if (
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
await new Promise((res) => setTimeout(res, 100));
|
|
260
|
-
waited += 100;
|
|
261
|
-
}
|
|
262
|
-
if (!menuRef.current || !menuRef.current.menus) {
|
|
263
|
-
console.error("Menu not loaded, cannot start chat");
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
256
|
+
if (chatLoading.current) {
|
|
257
|
+
console.log(`startChat skipped [${source}] — already in progress`);
|
|
258
|
+
return;
|
|
266
259
|
}
|
|
267
260
|
try {
|
|
261
|
+
console.log(`Starting chat [${source}]`, chatRef.current);
|
|
262
|
+
chatLoading.current = true;
|
|
263
|
+
if (!menuRef.current || !menuRef.current.menus) {
|
|
264
|
+
let waited = 0;
|
|
265
|
+
while ((!menuRef.current || !menuRef.current.menus) && waited < 5e3) {
|
|
266
|
+
await new Promise((res) => setTimeout(res, 100));
|
|
267
|
+
waited += 100;
|
|
268
|
+
}
|
|
269
|
+
if (!menuRef.current || !menuRef.current.menus) {
|
|
270
|
+
console.error("Menu not loaded, cannot start chat");
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
268
274
|
console.log("menus: ->", menuRef.current);
|
|
269
275
|
const ongoingChat = await client.loadOngoingChat();
|
|
270
276
|
console.log("theres a ongoing chat?: -->", ongoingChat);
|
|
@@ -294,6 +300,7 @@ const Chatbot = ({
|
|
|
294
300
|
} catch (err) {
|
|
295
301
|
console.error("Error creating chat:", err);
|
|
296
302
|
} finally {
|
|
303
|
+
chatLoading.current = false;
|
|
297
304
|
setHasStarted(true);
|
|
298
305
|
}
|
|
299
306
|
};
|
|
@@ -301,12 +308,21 @@ const Chatbot = ({
|
|
|
301
308
|
toggle();
|
|
302
309
|
if (hasStarted) return;
|
|
303
310
|
if (!hasOpenedOnce) {
|
|
304
|
-
await startChat();
|
|
311
|
+
await startChat("bubbleClick");
|
|
305
312
|
setHasStarted(true);
|
|
306
313
|
}
|
|
307
314
|
};
|
|
308
315
|
const onSendMessage = async (msg) => {
|
|
309
|
-
|
|
316
|
+
const clientChatId = clientRef.current?.chat?.id;
|
|
317
|
+
const refChatId = chatRef.current?.id;
|
|
318
|
+
console.log(
|
|
319
|
+
"Sending message:",
|
|
320
|
+
msg,
|
|
321
|
+
"| client.chat.id:",
|
|
322
|
+
clientChatId,
|
|
323
|
+
"| chatRef.id:",
|
|
324
|
+
refChatId
|
|
325
|
+
);
|
|
310
326
|
try {
|
|
311
327
|
await clientRef.current?.sendTextMessage(msg);
|
|
312
328
|
} catch (error) {
|
|
@@ -332,7 +348,7 @@ const Chatbot = ({
|
|
|
332
348
|
const onEndAndStartNewChat = async () => {
|
|
333
349
|
console.log("Ending current chat and starting a new one");
|
|
334
350
|
await onEndChat();
|
|
335
|
-
await startChat();
|
|
351
|
+
await startChat("endAndStartNew");
|
|
336
352
|
};
|
|
337
353
|
useMount(async () => {
|
|
338
354
|
console.log("Chatbot mounted");
|
|
@@ -343,6 +359,7 @@ const Chatbot = ({
|
|
|
343
359
|
useUnmount(() => {
|
|
344
360
|
console.log("Chatbot unmounted");
|
|
345
361
|
deregisterEventHandlers();
|
|
362
|
+
chatLoading.current = false;
|
|
346
363
|
reset();
|
|
347
364
|
setHasStarted(false);
|
|
348
365
|
setStatus("idle");
|
|
@@ -424,6 +424,15 @@ const AxosFooterSiteMap = ({
|
|
|
424
424
|
),
|
|
425
425
|
children: "Treasury Management"
|
|
426
426
|
}
|
|
427
|
+
) }),
|
|
428
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
429
|
+
"a",
|
|
430
|
+
{
|
|
431
|
+
href: findMoreAxosDomains(
|
|
432
|
+
"{AXOSBANK}/commercial/banking/technology-and-life-sciences-banking"
|
|
433
|
+
),
|
|
434
|
+
children: "Technology and Life Sciences Banking"
|
|
435
|
+
}
|
|
427
436
|
) })
|
|
428
437
|
] })
|
|
429
438
|
] })
|
|
@@ -794,6 +803,15 @@ const AxosFooterSiteMap = ({
|
|
|
794
803
|
),
|
|
795
804
|
children: "Treasury Management"
|
|
796
805
|
}
|
|
806
|
+
) }),
|
|
807
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
808
|
+
"a",
|
|
809
|
+
{
|
|
810
|
+
href: findMoreAxosDomains(
|
|
811
|
+
"{AXOSBANK}/commercial/banking/technology-and-life-sciences-banking"
|
|
812
|
+
),
|
|
813
|
+
children: "Technology and Life Sciences Banking"
|
|
814
|
+
}
|
|
797
815
|
) })
|
|
798
816
|
] }),
|
|
799
817
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import '../../../assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css';const overlay = "
|
|
2
|
-
const drawer = "
|
|
3
|
-
const mobileNavRow = "
|
|
4
|
-
const loginTrigger = "
|
|
5
|
-
const hamburger = "
|
|
6
|
-
const loginDrawerTitle = "
|
|
7
|
-
const loginDrawerContent = "
|
|
8
|
-
const header = "
|
|
9
|
-
const back = "
|
|
10
|
-
const close = "
|
|
11
|
-
const levelContainer = "
|
|
12
|
-
const level = "
|
|
13
|
-
const levelTitle = "
|
|
14
|
-
const menu = "
|
|
15
|
-
const menuItem = "
|
|
16
|
-
const loginAccordion = "
|
|
17
|
-
const loginAccordionList = "
|
|
18
|
-
const loginAccordionGroup = "
|
|
19
|
-
const loginAccordionHeading = "
|
|
20
|
-
const loginAccordionGroupList = "
|
|
21
|
-
const loginHeading = "
|
|
22
|
-
const chevron = "
|
|
23
|
-
const chevronIcon = "
|
|
24
|
-
const quickLinks = "
|
|
25
|
-
const quickLink = "
|
|
26
|
-
const sr_only = "
|
|
27
|
-
const loginAccordionOverlay = "
|
|
1
|
+
import '../../../assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css';const overlay = "_overlay_hbh7s_1";
|
|
2
|
+
const drawer = "_drawer_hbh7s_9";
|
|
3
|
+
const mobileNavRow = "_mobileNavRow_hbh7s_29";
|
|
4
|
+
const loginTrigger = "_loginTrigger_hbh7s_35";
|
|
5
|
+
const hamburger = "_hamburger_hbh7s_51";
|
|
6
|
+
const loginDrawerTitle = "_loginDrawerTitle_hbh7s_73";
|
|
7
|
+
const loginDrawerContent = "_loginDrawerContent_hbh7s_79";
|
|
8
|
+
const header = "_header_hbh7s_85";
|
|
9
|
+
const back = "_back_hbh7s_96";
|
|
10
|
+
const close = "_close_hbh7s_104";
|
|
11
|
+
const levelContainer = "_levelContainer_hbh7s_115";
|
|
12
|
+
const level = "_level_hbh7s_115";
|
|
13
|
+
const levelTitle = "_levelTitle_hbh7s_131";
|
|
14
|
+
const menu = "_menu_hbh7s_136";
|
|
15
|
+
const menuItem = "_menuItem_hbh7s_152";
|
|
16
|
+
const loginAccordion = "_loginAccordion_hbh7s_168";
|
|
17
|
+
const loginAccordionList = "_loginAccordionList_hbh7s_172";
|
|
18
|
+
const loginAccordionGroup = "_loginAccordionGroup_hbh7s_178";
|
|
19
|
+
const loginAccordionHeading = "_loginAccordionHeading_hbh7s_215";
|
|
20
|
+
const loginAccordionGroupList = "_loginAccordionGroupList_hbh7s_225";
|
|
21
|
+
const loginHeading = "_loginHeading_hbh7s_269";
|
|
22
|
+
const chevron = "_chevron_hbh7s_279";
|
|
23
|
+
const chevronIcon = "_chevronIcon_hbh7s_284";
|
|
24
|
+
const quickLinks = "_quickLinks_hbh7s_295";
|
|
25
|
+
const quickLink = "_quickLink_hbh7s_295";
|
|
26
|
+
const sr_only = "_sr_only_hbh7s_319";
|
|
27
|
+
const loginAccordionOverlay = "_loginAccordionOverlay_hbh7s_344";
|
|
28
28
|
const styles = {
|
|
29
29
|
overlay,
|
|
30
30
|
drawer,
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import '../../assets/NavigationMenu/AxosBank/NavBar.css.css';const header = "
|
|
2
|
-
const wrapper = "
|
|
3
|
-
const header_main_row = "
|
|
4
|
-
const logo_wrap = "
|
|
5
|
-
const primary_links = "
|
|
6
|
-
const main_nav_link = "
|
|
7
|
-
const sub_nav_link = "
|
|
8
|
-
const signin_wrap = "
|
|
9
|
-
const signin_btn = "
|
|
10
|
-
const header_sub_row = "
|
|
11
|
-
const signin_dropdown = "
|
|
12
|
-
const shadow = "
|
|
13
|
-
const signin_header = "
|
|
14
|
-
const signin_subheader = "
|
|
15
|
-
const opacity = "
|
|
16
|
-
const fadeInDown = "
|
|
17
|
-
const signin_footer = "
|
|
18
|
-
const open = "
|
|
19
|
-
const dd_wrapper = "
|
|
20
|
-
const dd_media = "
|
|
21
|
-
const dd_media_img = "
|
|
22
|
-
const dd_site_navs = "
|
|
23
|
-
const dd_media_header = "
|
|
24
|
-
const mt_8 = "
|
|
25
|
-
const mt_16 = "
|
|
26
|
-
const ml_8 = "
|
|
27
|
-
const reversed_row = "
|
|
28
|
-
const headline = "
|
|
29
|
-
const nav_anchor = "
|
|
30
|
-
const headline_cta = "
|
|
31
|
-
const site_lists = "
|
|
32
|
-
const modify_fit = "
|
|
33
|
-
const mobile_only = "
|
|
34
|
-
const mobile_logo = "
|
|
35
|
-
const highlight = "
|
|
36
|
-
const mobile_opened = "
|
|
37
|
-
const dd_footer = "
|
|
38
|
-
const skip_btn = "
|
|
39
|
-
const desktop_only = "
|
|
1
|
+
import '../../assets/NavigationMenu/AxosBank/NavBar.css.css';const header = "_header_ak0c_1";
|
|
2
|
+
const wrapper = "_wrapper_ak0c_5";
|
|
3
|
+
const header_main_row = "_header_main_row_ak0c_11";
|
|
4
|
+
const logo_wrap = "_logo_wrap_ak0c_17";
|
|
5
|
+
const primary_links = "_primary_links_ak0c_21";
|
|
6
|
+
const main_nav_link = "_main_nav_link_ak0c_25";
|
|
7
|
+
const sub_nav_link = "_sub_nav_link_ak0c_57";
|
|
8
|
+
const signin_wrap = "_signin_wrap_ak0c_59";
|
|
9
|
+
const signin_btn = "_signin_btn_ak0c_60";
|
|
10
|
+
const header_sub_row = "_header_sub_row_ak0c_98";
|
|
11
|
+
const signin_dropdown = "_signin_dropdown_ak0c_131";
|
|
12
|
+
const shadow = "_shadow_ak0c_141";
|
|
13
|
+
const signin_header = "_signin_header_ak0c_151";
|
|
14
|
+
const signin_subheader = "_signin_subheader_ak0c_158";
|
|
15
|
+
const opacity = "_opacity_ak0c_179";
|
|
16
|
+
const fadeInDown = "_fadeInDown_ak0c_1";
|
|
17
|
+
const signin_footer = "_signin_footer_ak0c_185";
|
|
18
|
+
const open = "_open_ak0c_206";
|
|
19
|
+
const dd_wrapper = "_dd_wrapper_ak0c_218";
|
|
20
|
+
const dd_media = "_dd_media_ak0c_227";
|
|
21
|
+
const dd_media_img = "_dd_media_img_ak0c_232";
|
|
22
|
+
const dd_site_navs = "_dd_site_navs_ak0c_236";
|
|
23
|
+
const dd_media_header = "_dd_media_header_ak0c_243";
|
|
24
|
+
const mt_8 = "_mt_8_ak0c_254";
|
|
25
|
+
const mt_16 = "_mt_16_ak0c_258";
|
|
26
|
+
const ml_8 = "_ml_8_ak0c_262";
|
|
27
|
+
const reversed_row = "_reversed_row_ak0c_266";
|
|
28
|
+
const headline = "_headline_ak0c_270";
|
|
29
|
+
const nav_anchor = "_nav_anchor_ak0c_278";
|
|
30
|
+
const headline_cta = "_headline_cta_ak0c_286";
|
|
31
|
+
const site_lists = "_site_lists_ak0c_302";
|
|
32
|
+
const modify_fit = "_modify_fit_ak0c_322";
|
|
33
|
+
const mobile_only = "_mobile_only_ak0c_347";
|
|
34
|
+
const mobile_logo = "_mobile_logo_ak0c_353";
|
|
35
|
+
const highlight = "_highlight_ak0c_360";
|
|
36
|
+
const mobile_opened = "_mobile_opened_ak0c_366";
|
|
37
|
+
const dd_footer = "_dd_footer_ak0c_374";
|
|
38
|
+
const skip_btn = "_skip_btn_ak0c_382";
|
|
39
|
+
const desktop_only = "_desktop_only_ak0c_418";
|
|
40
40
|
const styles = {
|
|
41
41
|
header,
|
|
42
42
|
wrapper,
|