@axos-web-dev/shared-components 2.0.0-dev.16-nav-0 → 2.0.0-dev.17-nav-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { useRef, useEffect } from "react";
4
- import { authenticate } from "./authenticate.js";
5
4
  import { useMessages } from "./store/messages.js";
6
- const companyId = process.env.CCAI_COMPANY_ID || "";
7
- const tenant = process.env.CCAI_TENANT_NAME || "";
8
- const host = process.env.CCAI_HOST || "";
5
+ const companyId = "";
6
+ const tenant = "";
7
+ const host = "";
8
+ const authUrl = "";
9
9
  const COBROWSE_CONSENT_TEMPLATE = `
10
10
  <script class="cobrowse-template" type="text/template">
11
11
  <div class="cobrowse">
@@ -53,7 +53,18 @@ function Chat() {
53
53
  }
54
54
  },
55
55
  host,
56
- authenticate
56
+ authenticate: async () => {
57
+ const res = await fetch(authUrl, {
58
+ method: "GET",
59
+ headers: {
60
+ "Content-Type": "application/json"
61
+ }
62
+ });
63
+ const data = await res.json();
64
+ return {
65
+ token: data.token
66
+ };
67
+ }
57
68
  });
58
69
  const menus = await clientRef.current?.getMenus();
59
70
  try {
@@ -43,7 +43,8 @@ const ChatWindow = ({
43
43
  toggleThankyouMessage,
44
44
  hasEscalated,
45
45
  isBlockedInput,
46
- isOpen
46
+ isOpen,
47
+ hasOpenedOnce
47
48
  } = useOpenChat();
48
49
  const [mounted, setMounted] = React.useState(false);
49
50
  const [menuOpen, setMenuOpen] = React.useState(false);
@@ -398,7 +399,7 @@ const ChatWindow = ({
398
399
  }
399
400
  ) }) : null,
400
401
  /* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
401
- (status === "idle" || messages.length == 0) && /* @__PURE__ */ jsx(
402
+ (status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
402
403
  "div",
403
404
  {
404
405
  className: clsx(),
@@ -425,23 +426,28 @@ const ChatWindow = ({
425
426
  )
426
427
  }
427
428
  ),
428
- messages?.map((msg) => /* @__PURE__ */ jsx(
429
- ChatbotMessage,
430
- {
431
- msg,
432
- onSend,
433
- showAvatar,
434
- showName,
435
- virtualAgent,
436
- onCancelEndChat,
437
- onEndChat: () => {
438
- endChat();
439
- onCloseAfterThankYou();
429
+ messages?.map((msg) => {
430
+ if (!hasOpenedOnce) {
431
+ return null;
432
+ }
433
+ return /* @__PURE__ */ jsx(
434
+ ChatbotMessage,
435
+ {
436
+ msg,
437
+ onSend,
438
+ showAvatar,
439
+ showName,
440
+ virtualAgent,
441
+ onCancelEndChat,
442
+ onEndChat: () => {
443
+ endChat();
444
+ onCloseAfterThankYou();
445
+ },
446
+ inputRef
440
447
  },
441
- inputRef
442
- },
443
- msg?.$index
444
- )),
448
+ msg?.$index
449
+ );
450
+ }),
445
451
  showReconnect && /* @__PURE__ */ jsx(
446
452
  "button",
447
453
  {
@@ -2,9 +2,17 @@ export type ChatbotProps = {
2
2
  project?: "axos" | "ufb";
3
3
  debug?: boolean;
4
4
  };
5
- export declare const Chatbot: ({ project, projectEnv, menuOption, debug, }: {
5
+ type InitalizeChatbot = {
6
+ companyId: string;
7
+ tenantName: string;
8
+ host: string;
9
+ authUrl: string;
10
+ };
11
+ export declare const Chatbot: ({ project, projectEnv, menuOption, debug, config, }: {
6
12
  project?: "axos" | "ufb" | "Axos" | "Ufb";
7
13
  projectEnv?: "dev" | "qa" | "uat" | "stg" | "prod";
8
14
  menuOption?: "Support Virtual Agent" | string;
9
15
  debug?: boolean;
16
+ config: InitalizeChatbot;
10
17
  }) => false | import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -3,14 +3,11 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { useRef, useState, useEffect } from "react";
4
4
  import { useMount, useUnmount } from "react-use";
5
5
  import notificationSound from "../assets/notification.mp3.js";
6
- import { authenticate } from "./authenticate.js";
7
6
  import { Bubble } from "./Bubble.js";
8
7
  import { chatbotAXB, chatbotUFB } from "./Chatbot.css.js";
9
8
  import { ChatWindow } from "./ChatWindow.js";
10
9
  import { useOpenChat } from "./store/chat.js";
11
10
  import { useMessages } from "./store/messages.js";
12
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": true };
13
- const env = __vite_import_meta_env__ || process.env;
14
11
  if (typeof window !== "undefined") {
15
12
  const OriginalAudio = window.Audio;
16
13
  class PatchedAudio extends OriginalAudio {
@@ -25,7 +22,8 @@ const Chatbot = ({
25
22
  project = "axos",
26
23
  projectEnv = "dev",
27
24
  menuOption = "Support Virtual Agent",
28
- debug = false
25
+ debug = false,
26
+ config
29
27
  }) => {
30
28
  const {
31
29
  hasOpenedOnce,
@@ -41,13 +39,11 @@ const Chatbot = ({
41
39
  const clientRef = useRef(null);
42
40
  const menuRef = useRef(null);
43
41
  const isMountedRef = useRef(false);
44
- const hasLoadedBefore = useRef(true);
45
42
  const chatRef = useRef(null);
46
43
  const agent_virtual = useRef(null);
47
44
  const [status, setStatus] = useState("idle");
48
45
  const [hasStarted, setHasStarted] = useState(false);
49
46
  const [menusLoaded, setMenusLoaded] = useState(false);
50
- const [pendingStart, setPendingStart] = useState(false);
51
47
  const [isTyping, setIsTyping] = useState(false);
52
48
  const [scalationStarted, setScalationStarted] = useState(false);
53
49
  useEffect(() => {
@@ -102,6 +98,9 @@ const Chatbot = ({
102
98
  menuRef.current = await clientRef.current.getMenus();
103
99
  setMenusLoaded(true);
104
100
  console.log("menus:", menuRef.current);
101
+ if (menuRef.current !== null) {
102
+ await startChat();
103
+ }
105
104
  }
106
105
  };
107
106
  const onAuthenticatedHandler = async () => {
@@ -238,10 +237,21 @@ const Chatbot = ({
238
237
  }
239
238
  if (clientRef.current) return;
240
239
  const client = new Client({
241
- companyId: env.VITE_COMPANY_ID || env.CCAI_COMPANY_ID || "",
242
- tenant: env.VITE_TENANT_NAME || env.CCAI_TENANT_NAME || "",
243
- host: env.VITE_HOST || env.CCAI_HOST || "",
244
- authenticate
240
+ companyId: config.companyId,
241
+ tenant: config.tenantName,
242
+ host: config.host,
243
+ authenticate: async () => {
244
+ const res = await fetch(config.authUrl, {
245
+ method: "GET",
246
+ headers: {
247
+ "Content-Type": "application/json"
248
+ }
249
+ });
250
+ const data = await res.json();
251
+ return {
252
+ token: data.token
253
+ };
254
+ }
245
255
  });
246
256
  client?.on("ready", onReadyHandler);
247
257
  client?.on("authenticated", onAuthenticatedHandler);
@@ -251,9 +261,10 @@ const Chatbot = ({
251
261
  return;
252
262
  };
253
263
  const startChat = async () => {
254
- console.log("Starting chat");
264
+ console.log("Starting chat", chatRef.current);
255
265
  const client = clientRef.current;
256
266
  if (!client) return;
267
+ if (hasStarted) return;
257
268
  if (!menuRef.current || !menuRef.current.menus) {
258
269
  let waited = 0;
259
270
  while ((!menuRef.current || !menuRef.current.menus) && waited < 5e3) {
@@ -266,19 +277,26 @@ const Chatbot = ({
266
277
  }
267
278
  }
268
279
  try {
280
+ console.log("menus: ->", menuRef.current);
269
281
  const ongoingChat = await client.loadOngoingChat();
282
+ console.log("theres a ongoing chat?: -->", ongoingChat);
270
283
  if (ongoingChat) {
271
284
  console.log("Ongoing chat found:", ongoingChat);
272
285
  console.log("Resuming chat:", ongoingChat.id);
273
- chatRef.current = await client.resumeChat(ongoingChat.id);
286
+ chatRef.current = ongoingChat;
274
287
  agent_virtual.current = ongoingChat.agent;
275
288
  return;
276
289
  }
290
+ console.log("not ongoing chat ");
291
+ console.log(!!ongoingChat);
277
292
  const foundMenu = menuRef.current.menus.find(
278
293
  (menu) => menu.name === menuOption
279
294
  );
280
295
  const menuId = foundMenu && foundMenu.id;
281
296
  console.log("Creating new chat with menu ID:", menuId);
297
+ if (!foundMenu) {
298
+ throw new Error("Menu not found: " + menuOption);
299
+ }
282
300
  const newChat = await client.createChat(menuId, { custom_data });
283
301
  if (newChat !== null) {
284
302
  chatRef.current = newChat;
@@ -288,6 +306,7 @@ const Chatbot = ({
288
306
  } catch (err) {
289
307
  console.error("Error creating chat:", err);
290
308
  } finally {
309
+ setHasStarted(true);
291
310
  if (clientRef?.current?.chat?.state?.status == "va_assigned") {
292
311
  const OriginalAudio = window.Audio;
293
312
  class PatchedAudio extends OriginalAudio {
@@ -303,10 +322,6 @@ const Chatbot = ({
303
322
  const handleClick = async () => {
304
323
  toggle();
305
324
  if (hasStarted) return;
306
- if (!menusLoaded) {
307
- setPendingStart(true);
308
- return;
309
- }
310
325
  if (!hasOpenedOnce) {
311
326
  await startChat();
312
327
  setHasStarted(true);
@@ -347,17 +362,9 @@ const Chatbot = ({
347
362
  isMountedRef.current = true;
348
363
  await createClient();
349
364
  });
350
- useEffect(() => {
351
- if (menusLoaded && pendingStart && !hasStarted) {
352
- startChat();
353
- setPendingStart(false);
354
- }
355
- }, [menusLoaded, pendingStart, hasStarted]);
356
365
  useUnmount(() => {
357
366
  console.log("Chatbot unmounted");
358
367
  deregisterEventHandlers();
359
- isMountedRef.current = false;
360
- hasLoadedBefore.current = true;
361
368
  reset();
362
369
  setHasStarted(false);
363
370
  setStatus("idle");
@@ -370,9 +377,13 @@ const Chatbot = ({
370
377
  const onClose = () => {
371
378
  toggle();
372
379
  };
373
- const onCloseAfterThankYou = () => {
380
+ const newChatSession = async () => {
381
+ console.log("create new session");
382
+ };
383
+ const onCloseAfterThankYou = async () => {
374
384
  reset();
375
385
  setHasStarted(false);
386
+ newChatSession();
376
387
  };
377
388
  const onPreviewTyping = async (msg) => {
378
389
  console.log("Preview typing message:", msg);
@@ -373,6 +373,15 @@ const AxosFooterSiteMap = ({
373
373
  ),
374
374
  children: "Treasury Management"
375
375
  }
376
+ ) }),
377
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
378
+ "a",
379
+ {
380
+ href: resolveUrl(
381
+ "{AXOSBANK}/commercial/banking/technology-and-life-sciences-banking"
382
+ ),
383
+ children: "Technology and Life Sciences Banking"
384
+ }
376
385
  ) })
377
386
  ] })
378
387
  ] })
@@ -687,6 +696,15 @@ const AxosFooterSiteMap = ({
687
696
  ),
688
697
  children: "Treasury Management"
689
698
  }
699
+ ) }),
700
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
701
+ "a",
702
+ {
703
+ href: resolveUrl(
704
+ "{AXOSBANK}/commercial/banking/technology-and-life-sciences-banking"
705
+ ),
706
+ children: "Technology and Life Sciences Banking"
707
+ }
690
708
  ) })
691
709
  ] }),
692
710
  /* @__PURE__ */ jsxs("ul", { children: [
@@ -64,8 +64,8 @@ const RepresentativesFico = [
64
64
  ];
65
65
  const DocType = [
66
66
  { value: "FullDoc", text: "Full Doc" },
67
- { value: "AssetDepletion", text: "Asset Depletion" },
68
- { value: "AssetUtilization", text: "Asset Utilization" },
67
+ // { value: "AssetDepletion", text: "Asset Depletion" },
68
+ // { value: "AssetUtilization", text: "Asset Utilization" },
69
69
  { value: "PersonalBankStmt12Mos", text: "Personal Bank Stmt: 12 Mos" },
70
70
  { value: "BusinessBankStmt12Mos", text: "Business Bank Stmt: 12 Mos" },
71
71
  { value: "PersonalBankStmt24Mos", text: "Personal Bank Stmt: 24 Mos" },
@@ -1,30 +1,30 @@
1
- const overlay = "_overlay_7ufer_1";
2
- const drawer = "_drawer_7ufer_9";
3
- const mobileNavRow = "_mobileNavRow_7ufer_29";
4
- const loginTrigger = "_loginTrigger_7ufer_35";
5
- const hamburger = "_hamburger_7ufer_51";
6
- const loginDrawerTitle = "_loginDrawerTitle_7ufer_73";
7
- const loginDrawerContent = "_loginDrawerContent_7ufer_79";
8
- const header = "_header_7ufer_85";
9
- const back = "_back_7ufer_96";
10
- const close = "_close_7ufer_104";
11
- const levelContainer = "_levelContainer_7ufer_115";
12
- const level = "_level_7ufer_115";
13
- const levelTitle = "_levelTitle_7ufer_131";
14
- const menu = "_menu_7ufer_136";
15
- const menuItem = "_menuItem_7ufer_152";
16
- const loginAccordion = "_loginAccordion_7ufer_168";
17
- const loginAccordionList = "_loginAccordionList_7ufer_172";
18
- const loginAccordionGroup = "_loginAccordionGroup_7ufer_178";
19
- const loginAccordionHeading = "_loginAccordionHeading_7ufer_215";
20
- const loginAccordionGroupList = "_loginAccordionGroupList_7ufer_225";
21
- const loginHeading = "_loginHeading_7ufer_269";
22
- const chevron = "_chevron_7ufer_279";
23
- const chevronIcon = "_chevronIcon_7ufer_284";
24
- const quickLinks = "_quickLinks_7ufer_295";
25
- const quickLink = "_quickLink_7ufer_295";
26
- const sr_only = "_sr_only_7ufer_319";
27
- const loginAccordionOverlay = "_loginAccordionOverlay_7ufer_344";
1
+ 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,4 +1,4 @@
1
- ._overlay_7ufer_1 {
1
+ ._overlay_hbh7s_1 {
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  height: 100vh;
@@ -6,7 +6,7 @@
6
6
  z-index: 10000;
7
7
  }
8
8
 
9
- ._drawer_7ufer_9 {
9
+ ._drawer_hbh7s_9 {
10
10
  background: #fff;
11
11
  border-radius: 0 0 0 1rem;
12
12
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
@@ -22,17 +22,17 @@
22
22
  z-index: 10001;
23
23
  }
24
24
 
25
- ._drawer_7ufer_9::-webkit-scrollbar {
25
+ ._drawer_hbh7s_9::-webkit-scrollbar {
26
26
  display: none;
27
27
  }
28
28
 
29
- ._mobileNavRow_7ufer_29 {
29
+ ._mobileNavRow_hbh7s_29 {
30
30
  display: flex;
31
31
  align-items: center;
32
32
  gap: 16px;
33
33
  }
34
34
 
35
- ._loginTrigger_7ufer_35 {
35
+ ._loginTrigger_hbh7s_35 {
36
36
  background: transparent;
37
37
  border: none;
38
38
  color: var(--_1073cm83);
@@ -44,11 +44,11 @@
44
44
  transition: opacity 0.2s ease;
45
45
  }
46
46
 
47
- ._loginTrigger_7ufer_35:hover {
47
+ ._loginTrigger_hbh7s_35:hover {
48
48
  opacity: 0.85;
49
49
  }
50
50
 
51
- ._hamburger_7ufer_51 {
51
+ ._hamburger_hbh7s_51 {
52
52
  background: transparent;
53
53
  border: none;
54
54
  cursor: pointer;
@@ -56,7 +56,7 @@
56
56
  position: relative;
57
57
  }
58
58
 
59
- ._hamburger_7ufer_51::before {
59
+ ._hamburger_hbh7s_51::before {
60
60
  content: "";
61
61
  position: absolute;
62
62
  left: -7px;
@@ -66,23 +66,23 @@
66
66
  top: -2px;
67
67
  }
68
68
 
69
- ._hamburger_7ufer_51:hover {
69
+ ._hamburger_hbh7s_51:hover {
70
70
  opacity: 0.8;
71
71
  }
72
72
 
73
- ._loginDrawerTitle_7ufer_73 {
73
+ ._loginDrawerTitle_hbh7s_73 {
74
74
  font-weight: 700;
75
75
  font-size: 1rem;
76
76
  color: var(--_1073cm83);
77
77
  }
78
78
 
79
- ._loginDrawerContent_7ufer_79 {
79
+ ._loginDrawerContent_hbh7s_79 {
80
80
  padding: 1rem 1.2rem 1.2rem;
81
81
  overflow: auto;
82
82
  flex: 1;
83
83
  }
84
84
 
85
- ._header_7ufer_85 {
85
+ ._header_hbh7s_85 {
86
86
  display: flex;
87
87
  align-items: center;
88
88
  background: #f4f4f4;
@@ -93,7 +93,7 @@
93
93
  z-index: 1;
94
94
  }
95
95
 
96
- ._back_7ufer_96 {
96
+ ._back_hbh7s_96 {
97
97
  color: var(--_1073cm83);
98
98
  font-size: 1rem;
99
99
  font-weight: 700;
@@ -101,23 +101,23 @@
101
101
  padding: 0;
102
102
  }
103
103
 
104
- ._close_7ufer_104 {
104
+ ._close_hbh7s_104 {
105
105
  font-size: 1.3rem;
106
106
  }
107
107
 
108
- ._back_7ufer_96,
109
- ._close_7ufer_104 {
108
+ ._back_hbh7s_96,
109
+ ._close_hbh7s_104 {
110
110
  background: none;
111
111
  border: none;
112
112
  cursor: pointer;
113
113
  }
114
114
 
115
- ._levelContainer_7ufer_115 {
115
+ ._levelContainer_hbh7s_115 {
116
116
  height: 100%;
117
117
  position: relative;
118
118
  }
119
119
 
120
- ._level_7ufer_115 {
120
+ ._level_hbh7s_115 {
121
121
  background: var(--_1073cm86);
122
122
  color: var(--_1073cm85);
123
123
  font-size: 0.9rem;
@@ -128,12 +128,12 @@
128
128
  z-index: 1;
129
129
  }
130
130
 
131
- ._levelTitle_7ufer_131 {
131
+ ._levelTitle_hbh7s_131 {
132
132
  font: 700 0.9rem / 1.39 var(--main-font-family);
133
133
  letter-spacing: 0.4px;
134
134
  }
135
135
 
136
- ._menu_7ufer_136 {
136
+ ._menu_hbh7s_136 {
137
137
  background-color: transparent;
138
138
  list-style: none;
139
139
  margin: 0;
@@ -142,14 +142,14 @@
142
142
  position: relative;
143
143
  }
144
144
 
145
- ._menu_7ufer_136 li {
145
+ ._menu_hbh7s_136 li {
146
146
  color: var(--_1073cm83);
147
147
  font-family: var(--header-font-family);
148
148
  font-weight: 500;
149
149
  border-top: 1px solid #e9e9e9;
150
150
  }
151
151
 
152
- ._menuItem_7ufer_152 {
152
+ ._menuItem_hbh7s_152 {
153
153
  display: flex;
154
154
  align-items: center;
155
155
  background: none;
@@ -165,31 +165,31 @@
165
165
  width: 100%;
166
166
  }
167
167
 
168
- ._loginAccordion_7ufer_168 {
168
+ ._loginAccordion_hbh7s_168 {
169
169
  padding: 0;
170
170
  }
171
171
 
172
- ._loginAccordionList_7ufer_172 {
172
+ ._loginAccordionList_hbh7s_172 {
173
173
  list-style: none;
174
174
  margin: 0;
175
175
  padding: 0;
176
176
  }
177
177
 
178
- ._loginAccordionGroup_7ufer_178 {
178
+ ._loginAccordionGroup_hbh7s_178 {
179
179
  padding-block: 4px;
180
180
  }
181
181
 
182
- ._loginAccordionGroup_7ufer_178 + ._loginAccordionGroup_7ufer_178 {
182
+ ._loginAccordionGroup_hbh7s_178 + ._loginAccordionGroup_hbh7s_178 {
183
183
  margin-top: 2px;
184
184
  position: relative;
185
185
  }
186
186
 
187
- ._loginAccordionGroup_7ufer_178:nth-child(4):is(:last-child) {
187
+ ._loginAccordionGroup_hbh7s_178:nth-child(5):is(:last-child) {
188
188
  padding-top: 12px;
189
189
  margin-top: 12px;
190
190
  }
191
191
 
192
- ._loginAccordionGroup_7ufer_178:nth-child(4):is(:last-child)::before {
192
+ ._loginAccordionGroup_hbh7s_178:nth-child(5):is(:last-child)::before {
193
193
  content: "";
194
194
  background-color: #8f8f8f;
195
195
  height: 2px;
@@ -200,7 +200,7 @@
200
200
  width: 94%;
201
201
  }
202
202
 
203
- ._loginAccordionGroup_7ufer_178:nth-child(4):is(:last-child) > span {
203
+ ._loginAccordionGroup_hbh7s_178:nth-child(5):is(:last-child) > span {
204
204
  position: absolute;
205
205
  border: 0;
206
206
  clip: rect(0, 0, 0, 0);
@@ -212,7 +212,7 @@
212
212
  width: 1px;
213
213
  }
214
214
 
215
- ._loginAccordionHeading_7ufer_215 {
215
+ ._loginAccordionHeading_hbh7s_215 {
216
216
  display: block;
217
217
  font-family: var(--header-font-family);
218
218
  font-weight: 700;
@@ -222,18 +222,18 @@
222
222
  padding: 0.35rem 0 0.2rem;
223
223
  }
224
224
 
225
- ._loginAccordionGroupList_7ufer_225 {
225
+ ._loginAccordionGroupList_hbh7s_225 {
226
226
  list-style: none;
227
227
  margin: 0;
228
228
  padding: 0 0 0 8px;
229
229
  }
230
230
 
231
- ._loginAccordionList_7ufer_172 li {
231
+ ._loginAccordionList_hbh7s_172 li {
232
232
  font-family: var(--header-font-family);
233
233
  font-weight: 500;
234
234
  }
235
235
 
236
- ._loginAccordionList_7ufer_172 li li {
236
+ ._loginAccordionList_hbh7s_172 li li {
237
237
  border-top: none;
238
238
  color: #1e629a;
239
239
  font-weight: 400;
@@ -241,22 +241,22 @@
241
241
  font-family: var(--main-font-family);
242
242
  }
243
243
 
244
- ._loginAccordionList_7ufer_172 ._menuItem_7ufer_152 {
244
+ ._loginAccordionList_hbh7s_172 ._menuItem_hbh7s_152 {
245
245
  display: inline;
246
246
  padding-block: 0px;
247
247
  }
248
248
 
249
- ._loginAccordionList_7ufer_172 ._menuItem_7ufer_152:hover {
249
+ ._loginAccordionList_hbh7s_172 ._menuItem_hbh7s_152:hover {
250
250
  opacity: 0.7;
251
251
  }
252
252
 
253
- ._loginAccordion_7ufer_168 > ._menuItem_7ufer_152 {
253
+ ._loginAccordion_hbh7s_168 > ._menuItem_hbh7s_152 {
254
254
  padding-block: 4px;
255
255
  position: relative;
256
256
  isolation: isolate;
257
257
  }
258
258
 
259
- ._loginAccordion_7ufer_168 > ._menuItem_7ufer_152::after {
259
+ ._loginAccordion_hbh7s_168 > ._menuItem_hbh7s_152::after {
260
260
  content: "return to menu";
261
261
  position: absolute;
262
262
  right: 36px;
@@ -266,7 +266,7 @@
266
266
  letter-spacing: 0.5px;
267
267
  }
268
268
 
269
- ._loginHeading_7ufer_269 {
269
+ ._loginHeading_hbh7s_269 {
270
270
  font-family: var(--header-font-family);
271
271
  font-size: 20px;
272
272
  font-weight: 700;
@@ -276,23 +276,23 @@
276
276
  gap: 8px;
277
277
  }
278
278
 
279
- ._chevron_7ufer_279 {
279
+ ._chevron_hbh7s_279 {
280
280
  font-size: 1.2rem;
281
281
  margin-left: auto;
282
282
  }
283
283
 
284
- ._chevronIcon_7ufer_284 {
284
+ ._chevronIcon_hbh7s_284 {
285
285
  height: auto;
286
286
  margin-right: 10px;
287
287
  max-width: 8px;
288
288
  }
289
289
 
290
- body:has(._drawer_7ufer_9) {
290
+ body:has(._drawer_hbh7s_9) {
291
291
  overflow-y: hidden;
292
292
  position: relative;
293
293
  }
294
294
 
295
- ._quickLinks_7ufer_295 {
295
+ ._quickLinks_hbh7s_295 {
296
296
  background-color: #e8f7ff;
297
297
  bottom: 0;
298
298
  box-shadow: 0 15px 10px -20px rgba(0, 0, 0, 0.45) inset;
@@ -302,7 +302,7 @@ body:has(._drawer_7ufer_9) {
302
302
  position: sticky;
303
303
  }
304
304
 
305
- ._quickLink_7ufer_295 {
305
+ ._quickLink_hbh7s_295 {
306
306
  display: flex;
307
307
  align-items: center;
308
308
  color: var(--_1073cm83);
@@ -316,7 +316,7 @@ body:has(._drawer_7ufer_9) {
316
316
  text-transform: uppercase;
317
317
  }
318
318
 
319
- ._sr_only_7ufer_319 {
319
+ ._sr_only_hbh7s_319 {
320
320
  position: absolute;
321
321
  border: 0;
322
322
  clip: rect(0, 0, 0, 0);
@@ -329,25 +329,25 @@ body:has(._drawer_7ufer_9) {
329
329
  }
330
330
 
331
331
  @media (max-width: 540px) {
332
- ._drawer_7ufer_9 {
332
+ ._drawer_hbh7s_9 {
333
333
  border-radius: 0;
334
334
  max-width: none;
335
335
  width: 100%;
336
336
  }
337
- ._menu_7ufer_136 li + li {
337
+ ._menu_hbh7s_136 li + li {
338
338
  margin-top: 3px;
339
339
  }
340
- ._menuItem_7ufer_152 {
340
+ ._menuItem_hbh7s_152 {
341
341
  font-size: 0.9rem;
342
342
  padding: 0.65rem 0;
343
343
  }
344
- ._loginAccordionOverlay_7ufer_344::before {
344
+ ._loginAccordionOverlay_hbh7s_344::before {
345
345
  opacity: 0.1;
346
346
  }
347
347
  }
348
348
 
349
349
  @media (min-width: 541px) {
350
- ._drawer_7ufer_9:has(._loginDrawerContent_7ufer_79) {
350
+ ._drawer_hbh7s_9:has(._loginDrawerContent_hbh7s_79) {
351
351
  max-width: 345px;
352
352
  }
353
353
  }
@@ -43,9 +43,6 @@ span#personalized-refi-table:has(*) {
43
43
  .page_body_contents > div:first-child > .billboard {
44
44
  margin-top: 3.5rem;
45
45
  }
46
- .flex, [class*='flex_'] {
47
- display: flex;
48
- }
49
46
  .flex_row {
50
47
  flex-direction: row;
51
48
  }
@@ -249,6 +246,9 @@ p:empty, ul:empty {
249
246
  .containment {
250
247
  width: min(1200px, calc(100% - 4rem));
251
248
  }
249
+ .flex, [class*='flex_'] {
250
+ display: flex;
251
+ }
252
252
  .rounded {
253
253
  border-radius: 1rem;
254
254
  overflow: hidden;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "2.0.0-dev.16-nav-0",
4
+ "version": "2.0.0-dev.17-nav-0",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "module": "dist/main.js",
@@ -1,3 +0,0 @@
1
- export declare const authenticate: () => Promise<{
2
- token: any;
3
- }>;
@@ -1,16 +0,0 @@
1
- const AUTH_URL = process.env.AUTH_CHAT_URL || "http://localhost:3000/api/auth/token";
2
- const authenticate = async () => {
3
- const res = await fetch(AUTH_URL, {
4
- method: "GET",
5
- headers: {
6
- "Content-Type": "application/json"
7
- }
8
- });
9
- const data = await res.json();
10
- return {
11
- token: data.token
12
- };
13
- };
14
- export {
15
- authenticate
16
- };