@axos-web-dev/shared-components 2.0.0-dev.31.insights.7 → 2.0.0-dev.33

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.
Files changed (45) hide show
  1. package/dist/Calculators/ApyCalculator/index.js +2 -1
  2. package/dist/Chatbot/ChatWindow.d.ts +1 -0
  3. package/dist/Chatbot/ChatWindow.js +5 -10
  4. package/dist/Chatbot/Chatbot.js +75 -42
  5. package/dist/Chatbot/ChatbotMessage.d.ts +1 -0
  6. package/dist/Chatbot/ChatbotMessage.js +2 -1
  7. package/dist/Chatbot/store/messages.d.ts +6 -1
  8. package/dist/Chatbot/store/messages.js +62 -3
  9. package/dist/FdicCallout/index.js +1 -1
  10. package/dist/Forms/EmailOnly.js +11 -1
  11. package/dist/Insight/Featured/CategorySelector.css.d.ts +3 -4
  12. package/dist/Insight/Featured/CategorySelector.css.js +7 -9
  13. package/dist/Insight/Featured/CategorySelector.js +23 -53
  14. package/dist/Insight/Featured/Featured.css.d.ts +4 -13
  15. package/dist/Insight/Featured/Featured.css.js +18 -37
  16. package/dist/Insight/Featured/Featured.d.ts +0 -1
  17. package/dist/Insight/Featured/Featured.js +93 -129
  18. package/dist/Insight/Featured/Header.css.d.ts +0 -1
  19. package/dist/Insight/Featured/Header.css.js +6 -9
  20. package/dist/Insight/Featured/Header.js +17 -10
  21. package/dist/Insight/Featured/index.js +4 -13
  22. package/dist/Insight/index.js +4 -13
  23. package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
  24. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +1 -1
  25. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +1 -1
  26. package/dist/NavigationMenu/AxosBank/SubNavBar.js +1 -1
  27. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.module.js +27 -27
  28. package/dist/NavigationMenu/ServerNavigation/NavBar.module.js +40 -40
  29. package/dist/assets/Forms/Forms.css +1 -2
  30. package/dist/assets/Input/Input.css +0 -1
  31. package/dist/assets/Insight/Featured/CategorySelector.css +38 -53
  32. package/dist/assets/Insight/Featured/Featured.css +65 -126
  33. package/dist/assets/Insight/Featured/Header.css +13 -22
  34. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +609 -609
  35. package/dist/assets/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.css +353 -353
  36. package/dist/assets/NavigationMenu/ServerNavigation/NavBar.css +483 -483
  37. package/dist/icons/Clock/index.js +0 -1
  38. package/dist/main.js +3 -12
  39. package/dist/utilities.d.ts +1 -0
  40. package/dist/utilities.js +2 -0
  41. package/dist/utils/allowedAxosDomains.js +0 -2
  42. package/dist/utils/insightsData.d.ts +23 -0
  43. package/dist/utils/insightsData.js +41 -0
  44. package/package.json +5 -4
  45. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css +0 -353
@@ -326,7 +326,8 @@ const ApyCalculator = ({
326
326
  className: `${field_row_input} ${fieldErrors.APY ? ` ${field_row_input_error}` : ""}`,
327
327
  id: "apy",
328
328
  type: "text",
329
- inputMode: "numeric",
329
+ inputMode: "decimal",
330
+ pattern: "[0-9.]*",
330
331
  name: "apy",
331
332
  value: APYDisplay,
332
333
  onChange: handleAPYChange,
@@ -3,6 +3,7 @@ import { default as React } from 'react';
3
3
 
4
4
  interface MessageResponse extends BaseMessageResponse {
5
5
  to_agent?: HumanAgent;
6
+ pending?: boolean;
6
7
  }
7
8
  export interface ChatBubble {
8
9
  id: string | number;
@@ -18,7 +18,6 @@ import { useOpenChat } from "./store/chat.js";
18
18
  import { ThankYouMessage } from "./ThankYouMessage.js";
19
19
  const ChatWindow = ({
20
20
  messages,
21
- status = "connected",
22
21
  onSend,
23
22
  inputDisabled = false,
24
23
  onClose,
@@ -43,7 +42,6 @@ const ChatWindow = ({
43
42
  showThankyouMessage,
44
43
  toggleThankyouMessage,
45
44
  hasEscalated,
46
- isBlockedInput,
47
45
  isOpen,
48
46
  hasOpenedOnce,
49
47
  chatStatus,
@@ -65,7 +63,6 @@ const ChatWindow = ({
65
63
  const handleSend = (e) => {
66
64
  e.preventDefault();
67
65
  const cleaned = cleanInput(input);
68
- if (isBlockedInput) return;
69
66
  if (cleaned != "") {
70
67
  onSend(cleaned);
71
68
  setInput("");
@@ -460,7 +457,7 @@ const ChatWindow = ({
460
457
  }
461
458
  ) }) : null,
462
459
  /* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
463
- (status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
460
+ !messages.some((msg) => !msg.pending) && /* @__PURE__ */ jsx(
464
461
  "div",
465
462
  {
466
463
  className: clsx(),
@@ -525,9 +522,7 @@ const ChatWindow = ({
525
522
  /* @__PURE__ */ jsx(
526
523
  "div",
527
524
  {
528
- className: clsx(
529
- focused && !inputDisabled && !isBlockedInput ? focusAnimation : ""
530
- ),
525
+ className: clsx(focused && !inputDisabled ? focusAnimation : ""),
531
526
  style: {
532
527
  position: "absolute",
533
528
  left: "10%",
@@ -544,7 +539,7 @@ const ChatWindow = ({
544
539
  style: {
545
540
  display: "flex",
546
541
  padding: "12px 16px",
547
- background: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
542
+ background: inputDisabled || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
548
543
  borderRadius: 12
549
544
  },
550
545
  children: [
@@ -568,7 +563,7 @@ const ChatWindow = ({
568
563
  "aria-label": "Ask anything...",
569
564
  className: clsx(inputStyle, autoResize),
570
565
  autoFocus: true,
571
- disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
566
+ disabled: inputDisabled || escalationDeflected,
572
567
  rows: 1
573
568
  }
574
569
  ),
@@ -582,7 +577,7 @@ const ChatWindow = ({
582
577
  type: "submit",
583
578
  title: "Send message",
584
579
  "aria-label": "Send message",
585
- disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
580
+ disabled: inputDisabled || !input.trim() || escalationDeflected,
586
581
  children: /* @__PURE__ */ jsx(
587
582
  "svg",
588
583
  {
@@ -40,17 +40,34 @@ const Chatbot = ({
40
40
  hideDisplayThankyouMessage
41
41
  } = useOpenChat();
42
42
  const isVisible = usePageVisibility();
43
- const { addMessage, addMessages, clearMessages, messages } = useMessages();
43
+ const {
44
+ addMessage,
45
+ addMessages,
46
+ clearMessages,
47
+ messages,
48
+ addPendingMessage,
49
+ resolvePendingMessage
50
+ } = useMessages();
44
51
  const clientRef = useRef(null);
45
52
  const menuRef = useRef(null);
46
53
  const isMountedRef = useRef(false);
47
54
  const chatRef = useRef(null);
48
55
  const chatLoading = useRef(false);
49
56
  const agent_virtual = useRef(null);
57
+ const messageQueueRef = useRef([]);
58
+ const sendInFlightRef = useRef(false);
59
+ const flushingRef = useRef(false);
60
+ const statusRef = useRef("idle");
50
61
  const [status, setStatus] = useState("idle");
51
62
  const [menusLoaded, setMenusLoaded] = useState(false);
52
63
  const [isTyping, setIsTyping] = useState(false);
53
64
  const [scalationStarted, setScalationStarted] = useState(false);
65
+ useEffect(() => {
66
+ statusRef.current = status;
67
+ if (status === "connected") {
68
+ flushQueuedMessages();
69
+ }
70
+ }, [status]);
54
71
  useEffect(() => {
55
72
  if (messages.length === 0) return;
56
73
  const hasScalation = messages.some(
@@ -67,6 +84,9 @@ const Chatbot = ({
67
84
  ["axos", 1],
68
85
  ["ufb", 3]
69
86
  ]);
87
+ const hasRealReply = () => useMessages.getState().messages.some(
88
+ (m) => !m.pending && m.$userType !== "end_user" && m.type !== "noti" && m.$sid !== "typing-1"
89
+ );
70
90
  const typingMessage = {
71
91
  $sid: "typing-1",
72
92
  type: "system",
@@ -107,7 +127,7 @@ const Chatbot = ({
107
127
  menuRef.current = await clientRef.current.getMenus();
108
128
  setMenusLoaded(true);
109
129
  console.log("menus:", menuRef.current);
110
- if (menuRef.current !== null) {
130
+ if (menuRef.current !== null && useOpenChat.getState().isOpen) {
111
131
  await startChat("onReady");
112
132
  }
113
133
  }
@@ -121,10 +141,11 @@ const Chatbot = ({
121
141
  const onChatMessageHandler = async (message) => {
122
142
  console.log("Received message:", message);
123
143
  const { event, $userType } = message;
124
- if (["system", "virtual_agent", "user"].includes($userType) && event === void 0) {
144
+ if (["virtual_agent", "user"].includes($userType) && event === void 0) {
125
145
  addMessage(message);
126
146
  if (!hasEscalated) {
127
147
  unblockInput?.();
148
+ flushQueuedMessages();
128
149
  }
129
150
  return;
130
151
  }
@@ -205,6 +226,7 @@ const Chatbot = ({
205
226
  startEscalation?.();
206
227
  }
207
228
  }
229
+ flushQueuedMessages();
208
230
  } catch (error) {
209
231
  console.error("Error fetching messages on chat connected:", error);
210
232
  }
@@ -226,7 +248,7 @@ const Chatbot = ({
226
248
  const deregisterEventHandlers = () => {
227
249
  clientRef.current?.off("ready", onReadyHandler);
228
250
  clientRef.current?.off("authenticated", onAuthenticatedHandler);
229
- clientRef.current?.off("chat.ongoing", onDismissedHandler);
251
+ clientRef.current?.off("chat.ongoing", onChatOngoingHandler);
230
252
  clientRef.current?.off("chat.message", onChatMessageHandler);
231
253
  clientRef.current?.off("chat.typingStarted", onChatTypingStartedHandler);
232
254
  clientRef.current?.off("chat.typingEnded", onChatTypingEndedHandler);
@@ -340,6 +362,41 @@ const Chatbot = ({
340
362
  setChatStarted();
341
363
  }
342
364
  };
365
+ const sendNow = async (msg) => {
366
+ sendInFlightRef.current = true;
367
+ let success = true;
368
+ try {
369
+ await clientRef.current?.sendTextMessage(msg);
370
+ } catch (error) {
371
+ console.log(error);
372
+ success = false;
373
+ } finally {
374
+ sendInFlightRef.current = false;
375
+ if (!hasEscalated) {
376
+ blockInput?.();
377
+ }
378
+ }
379
+ return success;
380
+ };
381
+ const flushQueuedMessages = async () => {
382
+ if (flushingRef.current) return;
383
+ if (messageQueueRef.current.length === 0) return;
384
+ if (!clientRef.current || statusRef.current !== "connected") return;
385
+ if (!hasRealReply()) return;
386
+ flushingRef.current = true;
387
+ try {
388
+ while (messageQueueRef.current.length > 0 && !useOpenChat.getState().isBlockedInput && !sendInFlightRef.current) {
389
+ const next = messageQueueRef.current[0];
390
+ const success = await sendNow(next.text);
391
+ messageQueueRef.current.shift();
392
+ if (!success) {
393
+ resolvePendingMessage(next.id);
394
+ }
395
+ }
396
+ } finally {
397
+ flushingRef.current = false;
398
+ }
399
+ };
343
400
  const onSendMessage = async (msg) => {
344
401
  const clientChatId = clientRef.current?.chat?.id;
345
402
  const refChatId = chatRef.current?.id;
@@ -351,15 +408,16 @@ const Chatbot = ({
351
408
  "| chatRef.id:",
352
409
  refChatId
353
410
  );
354
- try {
355
- await clientRef.current?.sendTextMessage(msg);
356
- } catch (error) {
357
- console.log(error);
358
- } finally {
359
- if (!hasEscalated) {
360
- blockInput?.();
361
- }
411
+ const notReady = !clientRef.current || statusRef.current !== "connected";
412
+ const isThinking = useOpenChat.getState().isBlockedInput;
413
+ const noReplyYet = !hasRealReply();
414
+ if (notReady || isThinking || sendInFlightRef.current || noReplyYet) {
415
+ const id = `pending-${Date.now()}-${Math.random().toString(36).slice(2)}`;
416
+ messageQueueRef.current.push({ id, text: msg });
417
+ addPendingMessage(id, msg);
418
+ return;
362
419
  }
420
+ await sendNow(msg);
363
421
  };
364
422
  const onEndChat = async () => {
365
423
  console.log(`Ending chat [end chat]`);
@@ -373,6 +431,9 @@ const Chatbot = ({
373
431
  clearMessages();
374
432
  chatRef.current = null;
375
433
  resetChatStarted();
434
+ messageQueueRef.current = [];
435
+ sendInFlightRef.current = false;
436
+ flushingRef.current = false;
376
437
  console.log("Chat ended");
377
438
  endEscalation?.();
378
439
  } finally {
@@ -399,6 +460,8 @@ const Chatbot = ({
399
460
  console.log("Chatbot unmounted");
400
461
  deregisterEventHandlers();
401
462
  chatLoading.current = false;
463
+ messageQueueRef.current = [];
464
+ sendInFlightRef.current = false;
402
465
  reset();
403
466
  resetChatStarted();
404
467
  setStatus("idle");
@@ -443,36 +506,6 @@ const Chatbot = ({
443
506
  }
444
507
  }
445
508
  }, [isOpen, isVisible]);
446
- useMount(() => {
447
- const hasParams = () => {
448
- return window.location.search.includes("utm_");
449
- };
450
- const tryStart = () => {
451
- if (hasParams()) {
452
- startChat("utm-ready");
453
- return true;
454
- }
455
- return false;
456
- };
457
- if (tryStart()) return;
458
- const original = history.replaceState;
459
- history.replaceState = function(...args) {
460
- original.apply(this, args);
461
- if (tryStart()) {
462
- history.replaceState = original;
463
- }
464
- };
465
- const interval = setInterval(() => {
466
- if (tryStart()) {
467
- clearInterval(interval);
468
- history.replaceState = original;
469
- }
470
- }, 100);
471
- return () => {
472
- clearInterval(interval);
473
- history.replaceState = original;
474
- };
475
- });
476
509
  return menusLoaded && /* @__PURE__ */ jsxs(
477
510
  "div",
478
511
  {
@@ -3,6 +3,7 @@ import { MessageResponse as BaseMessageResponse, HumanAgent, VirtualAgent } from
3
3
 
4
4
  interface MessageResponse extends BaseMessageResponse {
5
5
  to_agent?: HumanAgent;
6
+ pending?: boolean;
6
7
  }
7
8
  interface ChatbotMessageProps {
8
9
  msg: MessageResponse;
@@ -108,6 +108,7 @@ const ChatbotMessage = ({
108
108
  messageStyle,
109
109
  msg.$userType == "end_user" ? user_msg : agent_msg
110
110
  ),
111
+ style: msg.pending ? { opacity: 0.65 } : void 0,
111
112
  children: /* @__PURE__ */ jsxs(
112
113
  "div",
113
114
  {
@@ -253,7 +254,7 @@ const ChatbotMessage = ({
253
254
  textTransform: "capitalize",
254
255
  fontFamily: "inherit"
255
256
  },
256
- children: timeText
257
+ children: msg.pending ? "Sending..." : timeText
257
258
  }
258
259
  )
259
260
  ]
@@ -1,12 +1,17 @@
1
1
  import { MessageResponse } from '@ujet/websdk-headless';
2
2
 
3
+ export type PendingMessage = MessageResponse & {
4
+ pending?: boolean;
5
+ };
3
6
  interface MessageStore {
4
- messages: Array<MessageResponse>;
7
+ messages: Array<PendingMessage>;
5
8
  addMessage: (message: MessageResponse) => void;
6
9
  removeMessage: (id: string) => void;
7
10
  addMessages: (newMessages: MessageResponse[]) => void;
8
11
  clearMessages: () => void;
9
12
  isEscalated: boolean;
13
+ addPendingMessage: (id: string, text: string) => void;
14
+ resolvePendingMessage: (id: string) => void;
10
15
  }
11
16
  export interface Message {
12
17
  id: string;
@@ -3,18 +3,77 @@ const useMessages = create((set, get) => ({
3
3
  messages: [],
4
4
  addMessage: (message) => set((state) => {
5
5
  const cleaned = state.messages.filter((m) => m.$sid !== "typing-1");
6
- return { messages: [...cleaned, message] };
6
+ const isPending = message.pending;
7
+ if (!isPending && message.$userType === "end_user") {
8
+ const pendingIdx = cleaned.findIndex(
9
+ (m) => m.pending && m.content === message.content
10
+ );
11
+ if (pendingIdx !== -1) {
12
+ return {
13
+ messages: [
14
+ ...cleaned.slice(0, pendingIdx),
15
+ message,
16
+ ...cleaned.slice(pendingIdx + 1)
17
+ ]
18
+ };
19
+ }
20
+ return { messages: [...cleaned, message] };
21
+ }
22
+ const insertBeforeIdx = !isPending ? cleaned.findIndex((m) => m.pending) : -1;
23
+ if (insertBeforeIdx === -1) {
24
+ return { messages: [...cleaned, message] };
25
+ }
26
+ return {
27
+ messages: [
28
+ ...cleaned.slice(0, insertBeforeIdx),
29
+ message,
30
+ ...cleaned.slice(insertBeforeIdx)
31
+ ]
32
+ };
7
33
  }),
8
34
  removeMessage: (id) => set((state) => ({
9
35
  messages: state.messages.filter(
10
36
  (msg) => "$sid" in msg && msg.$sid !== id
11
37
  )
12
38
  })),
13
- addMessages: (newMessages) => set((state) => ({ messages: [...state.messages, ...newMessages] })),
39
+ addMessages: (newMessages) => set((state) => {
40
+ const pendingIdx = state.messages.findIndex(
41
+ (m) => m.pending
42
+ );
43
+ if (pendingIdx === -1) {
44
+ return { messages: [...state.messages, ...newMessages] };
45
+ }
46
+ return {
47
+ messages: [
48
+ ...state.messages.slice(0, pendingIdx),
49
+ ...newMessages,
50
+ ...state.messages.slice(pendingIdx)
51
+ ]
52
+ };
53
+ }),
14
54
  clearMessages: () => set({ messages: [] }),
15
55
  isEscalated: get()?.messages?.some(
16
56
  (msg) => ["escalationAccepted", "escalationStarted"].includes(msg.event)
17
- )
57
+ ),
58
+ addPendingMessage: (id, text) => set((state) => ({
59
+ messages: [
60
+ ...state.messages,
61
+ {
62
+ $sid: id,
63
+ type: "text",
64
+ content: text,
65
+ sender: { id: "end_user", type: "end_user" },
66
+ $timestamp: /* @__PURE__ */ new Date(),
67
+ $userType: "end_user",
68
+ $index: Date.now(),
69
+ $userId: 0,
70
+ pending: true
71
+ }
72
+ ]
73
+ })),
74
+ resolvePendingMessage: (id) => set((state) => ({
75
+ messages: state.messages.filter((msg) => msg.$sid !== id)
76
+ }))
18
77
  }));
19
78
  export {
20
79
  useMessages
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import css from "./FdicCallout.module.js";
3
3
  const FdicBanner = () => {
4
- return /* @__PURE__ */ jsx("div", { className: css.fdic_callout, "aria-label": "FDIC Notice banner", children: /* @__PURE__ */ jsx("div", { className: css.inner_container, children: /* @__PURE__ */ jsx("div", { className: "flex middle", children: /* @__PURE__ */ jsxs(
4
+ return /* @__PURE__ */ jsx("div", { className: css.fdic_callout, children: /* @__PURE__ */ jsx("div", { className: css.inner_container, children: /* @__PURE__ */ jsx("div", { className: "flex middle", children: /* @__PURE__ */ jsxs(
5
5
  "svg",
6
6
  {
7
7
  width: "430",
@@ -197,7 +197,17 @@ const EmailOnly = ({
197
197
  children: /* @__PURE__ */ jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
198
198
  icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
199
199
  /* @__PURE__ */ jsxs("div", { className: `${headerContainer} text_center`, children: [
200
- /* @__PURE__ */ jsx("h2", { className: clsx(headerForm({ variant }), email_only_h2), children: headline }),
200
+ /* @__PURE__ */ jsx(
201
+ "h2",
202
+ {
203
+ className: clsx(
204
+ "header_2",
205
+ headerForm({ variant }),
206
+ email_only_h2
207
+ ),
208
+ children: headline
209
+ }
210
+ ),
201
211
  description && /* @__PURE__ */ jsx(
202
212
  "div",
203
213
  {
@@ -1,11 +1,10 @@
1
1
  export declare const selector_section: string;
2
2
  export declare const selector_link: string;
3
+ export declare const selector_link_mobile: string;
3
4
  export declare const selector_title_link: string;
4
5
  export declare const selector_more: string;
5
6
  export declare const selector_grid_items: string;
6
7
  export declare const selector_small_item: string;
7
- export declare const selector_img: string;
8
- export declare const img_fit: string;
9
- export declare const selector_grid_content: string;
10
8
  export declare const selector_title: string;
11
- export declare const selector_link_mobile: string;
9
+ export declare const selector_grid_content: string;
10
+ export declare const selector_img: string;
@@ -7,17 +7,15 @@ import '../../assets/Insight/Featured/CategorySelector.css';import '../../assets
7
7
  /* empty css */
8
8
  var selector_section = "_13y9ptj0";
9
9
  var selector_link = "_13y9ptj1";
10
- var selector_title_link = "_13y9ptj2";
11
- var selector_more = "_13y9ptj3";
12
- var selector_grid_items = "_13y9ptj4";
13
- var selector_small_item = "_13y9ptj5 _1sr2o6v5";
14
- var selector_img = "_13y9ptj6";
15
- var img_fit = "_13y9ptj7";
10
+ var selector_link_mobile = "_13y9ptj2 _13y9ptj1";
11
+ var selector_title_link = "_13y9ptj3";
12
+ var selector_more = "_13y9ptj4";
13
+ var selector_grid_items = "_13y9ptj5";
14
+ var selector_small_item = "_13y9ptj6 _1sr2o6v9";
15
+ var selector_title = "_13y9ptj7";
16
16
  var selector_grid_content = "_13y9ptj8";
17
- var selector_title = "_13y9ptj9";
18
- var selector_link_mobile = "_13y9ptja _13y9ptj1";
17
+ var selector_img = "_13y9ptj9";
19
18
  export {
20
- img_fit,
21
19
  selector_grid_content,
22
20
  selector_grid_items,
23
21
  selector_img,
@@ -6,7 +6,7 @@ import { title } from "../../IconBillboard/IconBillboard.css.js";
6
6
  import "../../icons/ArrowIcon/ArrowIcon.css.js";
7
7
  import "../../icons/CheckIcon/CheckIcon.css.js";
8
8
  import ClockIcon from "../../icons/Clock/index.js";
9
- import '../../assets/Modal/Modal.css';import '../../assets/VideoWrapper/VideoWrapper.css';import '../../assets/TopicalNavSet/TopicalNavSet.css';import '../../assets/TopicalNavItem/TopicalNavItem.css';import '../../assets/Topic/Topic.css';import '../../assets/TextBlock/TextBlock.css';import '../../assets/SocialMediaBar/SocialMediaBar.css';import '../../assets/SecondaryFooter/SecondaryFooter.css';import '../../assets/Pagination/Pagination.css';import '../../assets/PageNavSet/PageNavigationSet.css';import '../../assets/NavigationMenu/LaVictoire/NavBar2.css';import '../../assets/NavigationMenu/AxosALTS/NavBar2.css';import '../../assets/NavigationMenu/AxosClearing/NavBar2.css';import '../../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../../assets/NavigationMenu/ServerNavigation/NavigationBar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/NavBar2.css';import '../../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisor/NavBar2.css';import '../../assets/NavigationMenu/AxosBank/NavBar2.css';import '../../assets/ImageLink/ImageLink.css';import '../../assets/VideoTile/VideoTile.css';import '../../assets/HelpArticle/HelpArticle.css';import '../../assets/FooterSiteMap/AxosBank/FooterSiteMap.css';import '../../assets/FooterDisclosure/LVF/LaVictorieFooter.css';import '../../assets/DownloadTile/DownloadTile.css';import '../../assets/CollectInformationAlert/CollectInformationAlert.css';import '../../assets/Chatbot/ChatWindow.css';import '../../assets/Chatbot/Bubble.css';import '../../assets/Chatbot/AnimatedGradientBorder.css';import '../../assets/CallToActionBar/CallToActionBar.css';import '../../assets/Insight/Insight.css';import '../../assets/AwardsItem/AwardsItem.css';import '../../assets/AwardsBanner/AwardsBanner.css';import '../../assets/Auth/SignIn.css';import '../../assets/Auth/ErrorAlert.css';import '../../assets/Calculators/MarginTradingCalculator/MarginTradingCalculator.css';import '../../assets/Forms/QuickPricer/UserInformation.css';import '../../assets/Forms/QuickPricer/QuickPricerResults.css';import '../../assets/Forms/HoneyPot/HoneyPot.css';import '../../assets/ImageToast/ImageToast.css';import '../../assets/BulletItem/BulletItem.css';import '../../assets/Typography/Typography.css';import '../../assets/icons/FollowIcon/FollowIcon.css';import '../../assets/icons/DownloadIcon/DownloadIcon.css';import '../../assets/themes/victorie.css';import '../../assets/themes/ufb.css';import '../../assets/themes/premier.css';import '../../assets/themes/axos.css';/* empty css */
9
+ import '../../assets/Modal/Modal.css';import '../../assets/VideoWrapper/VideoWrapper.css';import '../../assets/TopicalNavSet/TopicalNavSet.css';import '../../assets/TopicalNavItem/TopicalNavItem.css';import '../../assets/Topic/Topic.css';import '../../assets/TextBlock/TextBlock.css';import '../../assets/SocialMediaBar/SocialMediaBar.css';import '../../assets/SecondaryFooter/SecondaryFooter.css';import '../../assets/Pagination/Pagination.css';import '../../assets/PageNavSet/PageNavigationSet.css';import '../../assets/NavigationMenu/LaVictoire/NavBar2.css';import '../../assets/NavigationMenu/AxosALTS/NavBar2.css';import '../../assets/NavigationMenu/AxosClearing/NavBar2.css';import '../../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../../assets/NavigationMenu/ServerNavigation/NavigationBar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/NavBar2.css';import '../../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisor/NavBar2.css';import '../../assets/NavigationMenu/AxosBank/NavBar2.css';import '../../assets/Insight/Featured/Header.css';import '../../assets/ImageLink/ImageLink.css';import '../../assets/VideoTile/VideoTile.css';import '../../assets/HelpArticle/HelpArticle.css';import '../../assets/FooterSiteMap/AxosBank/FooterSiteMap.css';import '../../assets/FooterDisclosure/LVF/LaVictorieFooter.css';import '../../assets/DownloadTile/DownloadTile.css';import '../../assets/CollectInformationAlert/CollectInformationAlert.css';import '../../assets/Chatbot/ChatWindow.css';import '../../assets/Chatbot/Bubble.css';import '../../assets/Chatbot/AnimatedGradientBorder.css';import '../../assets/CallToActionBar/CallToActionBar.css';import '../../assets/Insight/Insight.css';import '../../assets/AwardsItem/AwardsItem.css';import '../../assets/AwardsBanner/AwardsBanner.css';import '../../assets/Auth/SignIn.css';import '../../assets/Auth/ErrorAlert.css';import '../../assets/Calculators/MarginTradingCalculator/MarginTradingCalculator.css';import '../../assets/Forms/QuickPricer/UserInformation.css';import '../../assets/Forms/QuickPricer/QuickPricerResults.css';import '../../assets/Forms/HoneyPot/HoneyPot.css';import '../../assets/ImageToast/ImageToast.css';import '../../assets/BulletItem/BulletItem.css';import '../../assets/Typography/Typography.css';import '../../assets/icons/FollowIcon/FollowIcon.css';import '../../assets/icons/DownloadIcon/DownloadIcon.css';import '../../assets/themes/victorie.css';import '../../assets/themes/ufb.css';import '../../assets/themes/premier.css';import '../../assets/themes/axos.css';/* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
@@ -101,8 +101,8 @@ import "../../ImageBillboard/ImageBillboard.css.js";
101
101
  import "next/script.js";
102
102
  /* empty css */
103
103
  /* empty css */
104
- import { featured_maingrid_text, info_details, onhover } from "./Featured.css.js";
105
- import { insight_wrap } from "./Header.css.js";
104
+ import { featured_maingrid_img, featured_center_vertical, featured_maingrid_item } from "./Featured.css.js";
105
+ /* empty css */
106
106
  import "../../LandingPageHeader/LandingPageHeader.css.js";
107
107
  import "next/link.js";
108
108
  /* empty css */
@@ -132,7 +132,7 @@ import "../../StepItemSet/StepItemSet.css.js";
132
132
  /* empty css */
133
133
  /* empty css */
134
134
  /* empty css */
135
- import { selector_section, selector_link, selector_title_link, selector_more, selector_grid_items, selector_link_mobile, img_fit, selector_img, selector_grid_content, selector_title, selector_small_item } from "./CategorySelector.css.js";
135
+ import { selector_title_link, selector_more, selector_link, selector_grid_items, selector_link_mobile, selector_section, selector_img, selector_title, selector_grid_content, selector_small_item } from "./CategorySelector.css.js";
136
136
  const CategorySelector = (props) => {
137
137
  const {
138
138
  id,
@@ -147,9 +147,9 @@ const CategorySelector = (props) => {
147
147
  } = props;
148
148
  const base = section ? `/${section}/insights` : `/insights`;
149
149
  const url = (subcategory !== void 0 ? `${base}/${category}/${subcategory}` : `${base}/${category}/`).toLowerCase();
150
- return /* @__PURE__ */ jsx("section", { id, className: selector_section, children: /* @__PURE__ */ jsxs("div", { className: insight_wrap, children: [
151
- !hideLink && /* @__PURE__ */ jsx("div", { className: selector_link, children: !hideMore ? /* @__PURE__ */ jsxs(Fragment, { children: [
152
- /* @__PURE__ */ jsx("h2", { children: /* @__PURE__ */ jsx("a", { href: url, className: selector_title_link, children: title2.replaceAll("-", " ") }) }),
150
+ return /* @__PURE__ */ jsx("section", { id, className: clsx(selector_section), children: /* @__PURE__ */ jsxs("div", { className: clsx("containment"), children: [
151
+ !hideLink && /* @__PURE__ */ jsx("div", { className: clsx(selector_link), children: !hideMore ? /* @__PURE__ */ jsxs(Fragment, { children: [
152
+ /* @__PURE__ */ jsx("a", { href: url, className: clsx(selector_title_link), children: title2.replaceAll("-", " ") }),
153
153
  /* @__PURE__ */ jsx(
154
154
  Chevron,
155
155
  {
@@ -159,17 +159,15 @@ const CategorySelector = (props) => {
159
159
  children: `See More ${title2.replaceAll("-", " ")} Articles`
160
160
  }
161
161
  )
162
- ] }) : /* @__PURE__ */ jsx("p", { className: selector_title_link, children: subcategory !== void 0 ? subcategory.replaceAll("-", " ") : title2.replaceAll("-", " ") }) }),
163
- /* @__PURE__ */ jsx("div", { className: selector_grid_items, children: typeof insights !== "undefined" ? insights.map((item) => /* @__PURE__ */ jsx(
162
+ ] }) : /* @__PURE__ */ jsx("p", { className: clsx(selector_title_link), children: subcategory !== void 0 ? subcategory : title2 }) }),
163
+ /* @__PURE__ */ jsx("div", { className: clsx(selector_grid_items), children: typeof insights !== "undefined" ? insights.map((item) => /* @__PURE__ */ jsx(
164
164
  InsightItem,
165
165
  {
166
166
  id: item.id,
167
167
  image: item.image,
168
168
  readingTime: item.readingTime,
169
169
  title: item.title,
170
- text: item.text,
171
- url: item.url,
172
- supertag: item.supertag
170
+ url: item.url
173
171
  },
174
172
  item.id
175
173
  )) : children }),
@@ -185,54 +183,26 @@ const CategorySelector = (props) => {
185
183
  ] }) });
186
184
  };
187
185
  const InsightItem = (props) => {
188
- const {
189
- id,
190
- image,
191
- readingTime,
192
- title: itemTitle,
193
- url,
194
- text,
195
- supertag
196
- } = props;
197
- return /* @__PURE__ */ jsxs("a", { id, href: url, className: clsx(onhover, selector_small_item), children: [
198
- /* @__PURE__ */ jsx("div", { className: clsx(selector_img, "relative"), "aria-hidden": "true", children: /* @__PURE__ */ jsx(
186
+ const { id, image, readingTime, title: itemTitle, url } = props;
187
+ return /* @__PURE__ */ jsxs("a", { id, href: url, className: clsx(selector_small_item), children: [
188
+ /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
199
189
  OptimizeImage,
200
190
  {
201
191
  src: `${image?.url}`,
202
192
  alt: image?.alt ?? "",
203
- className: img_fit,
204
- height: 200,
205
- width: 384,
193
+ className: clsx(featured_maingrid_img, selector_img),
194
+ height: 207,
195
+ width: 368,
206
196
  rootMargin: "210px"
207
197
  }
208
198
  ) }),
209
- /* @__PURE__ */ jsxs("div", { className: selector_grid_content, children: [
210
- /* @__PURE__ */ jsx("h3", { className: clsx(title({ variant: "primary" }), selector_title), children: itemTitle ?? "" }),
211
- /* @__PURE__ */ jsx(
212
- "p",
213
- {
214
- className: featured_maingrid_text,
215
- style: { marginBottom: 24, color: "#1F1F1F" },
216
- children: text ?? ""
217
- }
218
- ),
219
- /* @__PURE__ */ jsx("div", { style: { marginTop: "auto" }, children: /* @__PURE__ */ jsxs("div", { className: "flex middle", style: { gap: "4px" }, children: [
220
- /* @__PURE__ */ jsx(ClockIcon, {}),
221
- /* @__PURE__ */ jsx("span", { className: info_details, children: (readingTime ?? "0") + " minute read" }),
222
- /* @__PURE__ */ jsx("div", { className: "flex middle", style: { paddingInline: "8px" }, children: /* @__PURE__ */ jsx(
223
- "svg",
224
- {
225
- xmlns: "http://www.w3.org/2000/svg",
226
- width: 1,
227
- height: 20,
228
- viewBox: "0 0 1 20",
229
- fill: "none",
230
- "aria-hidden": "true",
231
- children: /* @__PURE__ */ jsx("path", { d: "M0.5 0V20", stroke: "#14263D" })
232
- }
233
- ) }),
234
- /* @__PURE__ */ jsx("span", { className: info_details, style: { fontWeight: "600" }, children: (typeof supertag == "string" && supertag.replaceAll("-", " ")) ?? "" })
235
- ] }) })
199
+ /* @__PURE__ */ jsxs("div", { className: clsx(featured_maingrid_item, selector_grid_content), children: [
200
+ /* @__PURE__ */ jsx("h2", { className: clsx(title({ variant: "primary" }), selector_title), children: itemTitle ?? "" }),
201
+ /* @__PURE__ */ jsxs("div", { children: [
202
+ /* @__PURE__ */ jsx(ClockIcon, { className: clsx(featured_center_vertical) }),
203
+ " ",
204
+ /* @__PURE__ */ jsx("span", { className: clsx(featured_center_vertical), children: (readingTime ?? "0") + " minutes" })
205
+ ] })
236
206
  ] })
237
207
  ] });
238
208
  };