@axos-web-dev/shared-components 2.2.8 → 2.2.9

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.
@@ -66,8 +66,8 @@ import "../Carousel/index.js";
66
66
  /* empty css */
67
67
  import "../Chatbot/store/chat.js";
68
68
  import "../Chatbot/Chatbot.js";
69
- import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
70
69
  import "../LoadingIndicator/LoadingIndicator.css.js";
70
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
71
71
  /* empty css */
72
72
  import "../Chatbot/store/messages.js";
73
73
  import { Hyperlink } from "../Hyperlink/index.js";
@@ -53,9 +53,9 @@ import "../Carousel/index.js";
53
53
  /* empty css */
54
54
  import "../Chatbot/store/chat.js";
55
55
  import "../Chatbot/Chatbot.js";
56
- import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
57
56
  import "../LoadingIndicator/LoadingIndicator.css.js";
58
57
  import "react-use";
58
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
59
59
  /* empty css */
60
60
  import "../Chatbot/store/messages.js";
61
61
  /* empty css */
@@ -3,6 +3,7 @@ import '../assets/Chatbot/ChatWindow.css';import '../assets/Typography/Typograph
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
+ import "./Chatbot.css.ts.vanilla.css.js";
6
7
  /* empty css */
7
8
  var windowStyle = "_13n1jqk1";
8
9
  var windowExpandedStyle = "_13n1jqk2";
@@ -11,7 +11,7 @@ import React, { useRef, useState, useEffect } from "react";
11
11
  import { useNetworkState, useMount } from "react-use";
12
12
  import { focusAnimation, gradientFocus } from "./AnimatedGradientBorder.css.js";
13
13
  import { ChatbotMessage } from "./ChatbotMessage.js";
14
- import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, formTextButton, inputStyle, autoResize, sendButtonStyle, chatAiDisclaimer, windowStyle, windowOpenStyle, windowExpandedStyle } from "./ChatWindow.css.js";
14
+ import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, formTextButton, inputStyle, autoResize, sendButtonStyle, windowStyle, windowOpenStyle, windowExpandedStyle } from "./ChatWindow.css.js";
15
15
  import { EllipsisIcon } from "./EllipsisIcon.js";
16
16
  import { ExpandChatToggle } from "./ExpandChatToggle.js";
17
17
  import { useOpenChat } from "./store/chat.js";
@@ -515,94 +515,91 @@ const ChatWindow = ({
515
515
  ),
516
516
  /* @__PURE__ */ jsx("div", { ref: messagesEndRef })
517
517
  ] }),
518
- /* @__PURE__ */ jsxs("div", { style: { padding: "16px 16px 24px 16px" }, children: [
519
- /* @__PURE__ */ jsxs("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: [
520
- /* @__PURE__ */ jsx(
521
- "div",
522
- {
523
- className: clsx(
524
- focused && !inputDisabled && !isBlockedInput ? focusAnimation : ""
525
- ),
526
- style: {
527
- position: "absolute",
528
- left: "10%",
529
- width: "80%",
530
- height: "40px",
531
- zIndex: "-1"
532
- }
533
- }
534
- ),
535
- /* @__PURE__ */ jsxs(
536
- "div",
537
- {
538
- className: formTextButton,
539
- style: {
540
- display: "flex",
541
- padding: "12px 16px",
542
- background: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
543
- borderRadius: 12
544
- },
545
- children: [
546
- /* @__PURE__ */ jsx(
547
- "textarea",
548
- {
549
- ref: inputRef,
550
- value: input,
551
- onChange: (e) => setInput(e.target.value),
552
- onKeyDown: (e) => {
553
- if (hasEscalated) {
554
- previewTyping(e.target?.value);
555
- }
556
- if (e.key === "Enter" && !e.shiftKey) {
557
- handleSend(e);
558
- }
559
- },
560
- onFocus: () => setFocused(() => true),
561
- onBlur: () => setFocused(() => false),
562
- placeholder: "Ask anything...",
563
- className: clsx(inputStyle, autoResize),
564
- autoFocus: true,
565
- disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
566
- rows: 1
567
- }
568
- ),
569
- /* @__PURE__ */ jsx(
570
- "button",
571
- {
572
- className: clsx(
573
- sendButtonStyle,
574
- input.trim().length > 0 && "active"
575
- ),
576
- type: "submit",
577
- title: "Send message",
578
- disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
579
- children: /* @__PURE__ */ jsx(
580
- "svg",
581
- {
582
- xmlns: "http://www.w3.org/2000/svg",
583
- width: "20",
584
- height: "20",
585
- viewBox: "0 0 16 16",
586
- fill: "none",
587
- children: /* @__PURE__ */ jsx(
588
- "path",
589
- {
590
- fillRule: "evenodd",
591
- clipRule: "evenodd",
592
- d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
593
- fill: "#435164"
594
- }
595
- )
596
- }
597
- )
598
- }
599
- )
600
- ]
518
+ /* @__PURE__ */ jsx("div", { style: { padding: "16px 16px 24px 16px" }, children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: [
519
+ /* @__PURE__ */ jsx(
520
+ "div",
521
+ {
522
+ className: clsx(
523
+ focused && !inputDisabled && !isBlockedInput ? focusAnimation : ""
524
+ ),
525
+ style: {
526
+ position: "absolute",
527
+ left: "10%",
528
+ width: "80%",
529
+ height: "40px",
530
+ zIndex: "-1"
601
531
  }
602
- )
603
- ] }),
604
- /* @__PURE__ */ jsx("p", { className: chatAiDisclaimer, children: "Evo is AI and can make mistakes. Verify important details." })
605
- ] })
532
+ }
533
+ ),
534
+ /* @__PURE__ */ jsxs(
535
+ "div",
536
+ {
537
+ className: formTextButton,
538
+ style: {
539
+ display: "flex",
540
+ padding: "12px 16px",
541
+ 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
+ borderRadius: 12
543
+ },
544
+ children: [
545
+ /* @__PURE__ */ jsx(
546
+ "textarea",
547
+ {
548
+ ref: inputRef,
549
+ value: input,
550
+ onChange: (e) => setInput(e.target.value),
551
+ onKeyDown: (e) => {
552
+ if (hasEscalated) {
553
+ previewTyping(e.target?.value);
554
+ }
555
+ if (e.key === "Enter" && !e.shiftKey) {
556
+ handleSend(e);
557
+ }
558
+ },
559
+ onFocus: () => setFocused(() => true),
560
+ onBlur: () => setFocused(() => false),
561
+ placeholder: "Ask anything...",
562
+ className: clsx(inputStyle, autoResize),
563
+ autoFocus: true,
564
+ disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
565
+ rows: 1
566
+ }
567
+ ),
568
+ /* @__PURE__ */ jsx(
569
+ "button",
570
+ {
571
+ className: clsx(
572
+ sendButtonStyle,
573
+ input.trim().length > 0 && "active"
574
+ ),
575
+ type: "submit",
576
+ title: "Send message",
577
+ disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
578
+ children: /* @__PURE__ */ jsx(
579
+ "svg",
580
+ {
581
+ xmlns: "http://www.w3.org/2000/svg",
582
+ width: "20",
583
+ height: "20",
584
+ viewBox: "0 0 16 16",
585
+ fill: "none",
586
+ children: /* @__PURE__ */ jsx(
587
+ "path",
588
+ {
589
+ fillRule: "evenodd",
590
+ clipRule: "evenodd",
591
+ d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
592
+ fill: "#435164"
593
+ }
594
+ )
595
+ }
596
+ )
597
+ }
598
+ )
599
+ ]
600
+ }
601
+ )
602
+ ] }) })
606
603
  ]
607
604
  }
608
605
  );
@@ -1,4 +1,3 @@
1
- import "./Chatbot.css.ts.vanilla.css.js";
2
1
  var chatbotAXB = "_1hpv6vm0";
3
2
  var chatbotUFB = "_1hpv6vm1";
4
3
  export {
@@ -444,36 +444,6 @@ const Chatbot = ({
444
444
  }
445
445
  }
446
446
  }, [isOpen, isVisible]);
447
- useMount(() => {
448
- const hasParams = () => {
449
- return window.location.search.includes("utm_");
450
- };
451
- const tryStart = () => {
452
- if (hasParams()) {
453
- startChat("utm-ready");
454
- return true;
455
- }
456
- return false;
457
- };
458
- if (tryStart()) return;
459
- const original = history.replaceState;
460
- history.replaceState = function(...args) {
461
- original.apply(this, args);
462
- if (tryStart()) {
463
- history.replaceState = original;
464
- }
465
- };
466
- const interval = setInterval(() => {
467
- if (tryStart()) {
468
- clearInterval(interval);
469
- history.replaceState = original;
470
- }
471
- }, 100);
472
- return () => {
473
- clearInterval(interval);
474
- history.replaceState = original;
475
- };
476
- });
477
447
  return menusLoaded && /* @__PURE__ */ jsxs(
478
448
  "div",
479
449
  {
@@ -62,9 +62,9 @@ import "../Carousel/index.js";
62
62
  /* empty css */
63
63
  import "../Chatbot/store/chat.js";
64
64
  import "../Chatbot/Chatbot.js";
65
- import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
66
65
  import "../LoadingIndicator/LoadingIndicator.css.js";
67
66
  import "react-use";
67
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
68
68
  /* empty css */
69
69
  import "../Chatbot/store/messages.js";
70
70
  /* empty css */
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.2.8",
4
+ "version": "2.2.9",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/main.js",