@axos-web-dev/shared-components 1.0.100-dev.33 → 1.0.100-dev.35
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 +2 -1
- package/dist/Auth/ErrorAlert.js +2 -1
- package/dist/Avatar/Avatar.module.js +7 -7
- package/dist/Blockquote/Blockquote.module.js +3 -3
- package/dist/Button/Button.js +2 -1
- package/dist/Calculators/Calculator.js +2 -1
- package/dist/Carousel/index.js +2 -1
- package/dist/Chatbot/Bubble.d.ts +3 -1
- package/dist/Chatbot/Bubble.js +6 -3
- package/dist/Chatbot/ChatWindow.css.js +0 -1
- package/dist/Chatbot/ChatWindow.d.ts +2 -6
- package/dist/Chatbot/Chatbot.css.js +1 -0
- package/dist/Chatbot/Chatbot.d.ts +6 -1
- package/dist/Chatbot/Chatbot.js +163 -22
- package/dist/Chatbot/index.d.ts +0 -1
- package/dist/Chatbot/index.js +0 -2
- package/dist/Chatbot/store/chat.d.ts +1 -0
- package/dist/Chatbot/store/chat.js +10 -3
- package/dist/Chevron/index.js +2 -1
- package/dist/Comparison/Comparison.js +2 -1
- package/dist/ExecutiveBio/ExecutiveBio.js +2 -1
- package/dist/FaqAccordion/index.js +2 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +2 -1
- package/dist/Forms/ApplyNow.js +2 -1
- package/dist/Forms/ContactUsBusiness.js +2 -1
- package/dist/Forms/ContactUsBusinessNameEmail.js +2 -1
- package/dist/Forms/ContactUsNMLSId.js +2 -1
- package/dist/Forms/CraPublicFile.js +2 -1
- package/dist/Forms/EmailOnly.js +2 -1
- package/dist/Forms/MortgageRate/MortgageRateForm.js +2 -1
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +2 -1
- package/dist/Forms/MortgageWarehouseLending.js +2 -1
- package/dist/Forms/SuccesForm.js +2 -1
- package/dist/Hyperlink/index.js +2 -1
- package/dist/ImageLink/ImageLink.js +2 -1
- package/dist/ImageLink/ImageLinkSet.js +2 -1
- package/dist/ImageLink/index.js +2 -1
- package/dist/Insight/Featured/CategorySelector.js +2 -1
- package/dist/Insight/Featured/Featured.js +2 -1
- package/dist/Insight/Featured/Header.js +2 -1
- package/dist/Modal/Modal.js +2 -1
- package/dist/NavigationMenu/AxosALTS/NavData.js +2 -1
- package/dist/NavigationMenu/AxosALTS/index.js +2 -1
- package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +16 -16
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +2 -1
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
- package/dist/NavigationMenu/AxosBank/NavData.js +2 -1
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +2 -1
- package/dist/NavigationMenu/AxosBank/index.js +2 -1
- package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
- package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +41 -41
- package/dist/NavigationMenu/LaVictoire/NavData.js +2 -1
- package/dist/NavigationMenu/LaVictoire/index.js +2 -1
- package/dist/NavigationMenu/NavDataJson.js +2 -1
- package/dist/NavigationMenu/Navbar.js +2 -1
- package/dist/NavigationMenu/SignInNavButton.js +2 -1
- package/dist/SetContainer/SetContainer.js +2 -1
- package/dist/SocialMediaBar/iconsRepository.js +2 -1
- package/dist/Table/Table.css.d.ts +4 -5
- package/dist/VideoTile/VideoTile.js +2 -1
- package/dist/VideoWrapper/index.js +2 -1
- package/dist/assets/Accordion/Accordion.css +2 -2
- package/dist/assets/Avatar/Avatar.css.css +59 -59
- package/dist/assets/Blockquote/Blockquote.css.css +72 -72
- package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +1 -1
- package/dist/assets/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css +2 -2
- package/dist/assets/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css +1 -1
- package/dist/assets/ImageBillboard/ImageBillboard.css +0 -1
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css.css +609 -609
- package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css.css +630 -630
- package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +192 -192
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +445 -445
- package/dist/assets/NavigationMenu/AxosClearing/NavBar.css.css +484 -484
- package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css.css +427 -427
- package/dist/assets/Table/Table.css +4 -5
- package/dist/assets/themes/axos.css +2 -2
- package/dist/main.js +0 -2
- package/package.json +136 -136
|
@@ -70,9 +70,10 @@ import "../Carousel/index.js";
|
|
|
70
70
|
/* empty css */
|
|
71
71
|
import "../Chatbot/store/chat.js";
|
|
72
72
|
import "../Chatbot/authenticate.js";
|
|
73
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
74
73
|
/* empty css */
|
|
75
74
|
import "../Chatbot/store/messages.js";
|
|
75
|
+
import "@ujet/websdk-headless";
|
|
76
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
76
77
|
/* empty css */
|
|
77
78
|
import "../Comparison/Comparison.css.js";
|
|
78
79
|
import "next/image.js";
|
package/dist/Auth/ErrorAlert.js
CHANGED
|
@@ -62,9 +62,10 @@ import "../Carousel/index.js";
|
|
|
62
62
|
/* empty css */
|
|
63
63
|
import "../Chatbot/store/chat.js";
|
|
64
64
|
import "../Chatbot/authenticate.js";
|
|
65
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
66
65
|
/* empty css */
|
|
67
66
|
import "../Chatbot/store/messages.js";
|
|
67
|
+
import "@ujet/websdk-headless";
|
|
68
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
68
69
|
import { Hyperlink } from "../Hyperlink/index.js";
|
|
69
70
|
/* empty css */
|
|
70
71
|
import "../Comparison/Comparison.css.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import '../assets/Avatar/Avatar.css.css';const avatar_sec = "
|
|
2
|
-
const container = "
|
|
3
|
-
const image = "
|
|
4
|
-
const text = "
|
|
5
|
-
const name = "
|
|
6
|
-
const title = "
|
|
7
|
-
const description = "
|
|
1
|
+
import '../assets/Avatar/Avatar.css.css';const avatar_sec = "_avatar_sec_1clr6_1";
|
|
2
|
+
const container = "_container_1clr6_5";
|
|
3
|
+
const image = "_image_1clr6_14";
|
|
4
|
+
const text = "_text_1clr6_23";
|
|
5
|
+
const name = "_name_1clr6_29";
|
|
6
|
+
const title = "_title_1clr6_37";
|
|
7
|
+
const description = "_description_1clr6_44";
|
|
8
8
|
const css = {
|
|
9
9
|
avatar_sec,
|
|
10
10
|
container,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '../assets/Blockquote/Blockquote.css.css';const quote_spacer = "
|
|
2
|
-
const author = "
|
|
3
|
-
const quote = "
|
|
1
|
+
import '../assets/Blockquote/Blockquote.css.css';const quote_spacer = "_quote_spacer_ovx4r_1";
|
|
2
|
+
const author = "_author_ovx4r_7";
|
|
3
|
+
const quote = "_quote_ovx4r_1";
|
|
4
4
|
const css = {
|
|
5
5
|
quote_spacer,
|
|
6
6
|
author,
|
package/dist/Button/Button.js
CHANGED
|
@@ -73,9 +73,10 @@ import "../Carousel/index.js";
|
|
|
73
73
|
/* empty css */
|
|
74
74
|
import "../Chatbot/store/chat.js";
|
|
75
75
|
import "../Chatbot/authenticate.js";
|
|
76
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
77
76
|
/* empty css */
|
|
78
77
|
import "../Chatbot/store/messages.js";
|
|
78
|
+
import "@ujet/websdk-headless";
|
|
79
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
79
80
|
/* empty css */
|
|
80
81
|
import "../Comparison/Comparison.css.js";
|
|
81
82
|
import "next/image.js";
|
|
@@ -53,9 +53,10 @@ import "../Carousel/index.js";
|
|
|
53
53
|
import "../Chatbot/store/chat.js";
|
|
54
54
|
import "../Chatbot/authenticate.js";
|
|
55
55
|
import "react-use";
|
|
56
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
57
56
|
/* empty css */
|
|
58
57
|
import "../Chatbot/store/messages.js";
|
|
58
|
+
import "@ujet/websdk-headless";
|
|
59
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
59
60
|
/* empty css */
|
|
60
61
|
import "../Comparison/Comparison.css.js";
|
|
61
62
|
import "next/image.js";
|
package/dist/Carousel/index.js
CHANGED
|
@@ -75,9 +75,10 @@ import "../Auth/SignInPassword.js";
|
|
|
75
75
|
/* empty css */
|
|
76
76
|
import "../Chatbot/store/chat.js";
|
|
77
77
|
import "../Chatbot/authenticate.js";
|
|
78
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
79
78
|
/* empty css */
|
|
80
79
|
import "../Chatbot/store/messages.js";
|
|
80
|
+
import "@ujet/websdk-headless";
|
|
81
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
82
|
/* empty css */
|
|
82
83
|
import "../Comparison/Comparison.css.js";
|
|
83
84
|
import "next/image.js";
|
package/dist/Chatbot/Bubble.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const Bubble: ({ children }: PropsWithChildren
|
|
3
|
+
export declare const Bubble: ({ children, onClick, }: PropsWithChildren & {
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Chatbot/Bubble.js
CHANGED
|
@@ -3,10 +3,13 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { AnimatePresence, motion } from "framer-motion";
|
|
4
4
|
import { bubbleWrapper, svgFill } from "./Bubble.css.js";
|
|
5
5
|
import { useOpenChat } from "./store/chat.js";
|
|
6
|
-
const Bubble = ({
|
|
6
|
+
const Bubble = ({
|
|
7
|
+
children,
|
|
8
|
+
onClick = () => {
|
|
9
|
+
}
|
|
10
|
+
}) => {
|
|
7
11
|
const isOpen = useOpenChat((state) => state.isOpen);
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", { className: bubbleWrapper, onClick: toggle, children: [
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { className: bubbleWrapper, onClick, children: [
|
|
10
13
|
/* @__PURE__ */ jsx("div", { className: "bubble-circle flex", children: /* @__PURE__ */ jsx(AnimatePresence, { children: !isOpen ? /* @__PURE__ */ jsxs(
|
|
11
14
|
motion.svg,
|
|
12
15
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MessageResponse as BaseMessageResponse, HumanAgent } from '@ujet/websdk-headless';
|
|
1
|
+
import { MessageResponse as BaseMessageResponse, HumanAgent, VirtualAgent } from '@ujet/websdk-headless';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
|
|
4
4
|
interface MessageResponse extends BaseMessageResponse {
|
|
@@ -19,11 +19,7 @@ interface ChatWindowProps {
|
|
|
19
19
|
onClose?: () => void;
|
|
20
20
|
endChat?: () => void;
|
|
21
21
|
showReconnect?: boolean;
|
|
22
|
-
virtualAgent?:
|
|
23
|
-
avatar_url: string;
|
|
24
|
-
name: string;
|
|
25
|
-
id: string;
|
|
26
|
-
};
|
|
22
|
+
virtualAgent?: VirtualAgent | null;
|
|
27
23
|
showAvatar?: boolean;
|
|
28
24
|
}
|
|
29
25
|
export declare const ChatWindow: React.FC<ChatWindowProps>;
|
|
@@ -2,4 +2,9 @@ export type ChatbotProps = {
|
|
|
2
2
|
project?: "axos" | "ufb";
|
|
3
3
|
debug?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare const Chatbot: (
|
|
5
|
+
export declare const Chatbot: ({ project, projectEnv, menuOption, }: {
|
|
6
|
+
project?: "axos" | "ufb";
|
|
7
|
+
projectEnv?: "dev" | "qa" | "uat" | "stg" | "prod";
|
|
8
|
+
menuOption?: "Support Virtual Agent" | string;
|
|
9
|
+
debug?: boolean;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Chatbot/Chatbot.js
CHANGED
|
@@ -2,37 +2,178 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { authenticate } from "./authenticate.js";
|
|
4
4
|
import { Bubble } from "./Bubble.js";
|
|
5
|
-
import { chatbotUFB, chatbotAXB } from "./Chatbot.css.js";
|
|
6
5
|
import { ChatWindow } from "./ChatWindow.js";
|
|
7
6
|
import { useOpenChat } from "./store/chat.js";
|
|
8
7
|
import { useMessages } from "./store/messages.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
import { Logger, consoleLoggerHandler, Client } from "@ujet/websdk-headless";
|
|
9
|
+
import { useRef, useState } from "react";
|
|
10
|
+
import { useMount, useUnmount } from "react-use";
|
|
11
|
+
const Chatbot = ({
|
|
12
|
+
project = "axos",
|
|
13
|
+
projectEnv = "dev",
|
|
14
|
+
menuOption = "Support Virtual Agent"
|
|
15
|
+
}) => {
|
|
16
|
+
const { hasOpenedOnce, toggle, reset } = useOpenChat();
|
|
17
|
+
const { addMessage, addMessages, clearMessages, messages } = useMessages();
|
|
18
|
+
const clientRef = useRef(null);
|
|
19
|
+
const menuRef = useRef(null);
|
|
20
|
+
const isMountedRef = useRef(false);
|
|
21
|
+
const chatRef = useRef(null);
|
|
22
|
+
const agent_virtual = useRef(null);
|
|
23
|
+
const [status, setStatus] = useState("idle");
|
|
24
|
+
const brandMap = /* @__PURE__ */ new Map([
|
|
25
|
+
["axos", 1],
|
|
26
|
+
["ufb", 3]
|
|
27
|
+
]);
|
|
28
|
+
const custom_data = {
|
|
29
|
+
unsigned: {
|
|
30
|
+
facingBrandId: {
|
|
31
|
+
label: "facingBrandId",
|
|
32
|
+
value: `${brandMap.get(project) || 1}`
|
|
33
|
+
},
|
|
34
|
+
channel: {
|
|
35
|
+
label: "channel",
|
|
36
|
+
value: "in_web"
|
|
37
|
+
},
|
|
38
|
+
user_auth: {
|
|
39
|
+
label: "user_auth",
|
|
40
|
+
value: "false"
|
|
41
|
+
},
|
|
42
|
+
env: {
|
|
43
|
+
label: "env",
|
|
44
|
+
value: projectEnv
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
if (projectEnv !== "prod") {
|
|
49
|
+
Logger.addHandler(consoleLoggerHandler);
|
|
50
|
+
}
|
|
51
|
+
const createClient = async () => {
|
|
52
|
+
const client = new Client({
|
|
53
|
+
companyId: process.env.CCAI_COMPANY_ID || "",
|
|
54
|
+
tenant: process.env.CCAI_TENANT_NAME || "",
|
|
55
|
+
host: process.env.CCAI_HOST || "",
|
|
56
|
+
// or your region
|
|
57
|
+
authenticate
|
|
58
|
+
});
|
|
59
|
+
clientRef.current = client;
|
|
60
|
+
menuRef.current = await client.getMenus();
|
|
61
|
+
console.log("menus:", menuRef.current);
|
|
62
|
+
clientRef.current.on("ready", async () => {
|
|
63
|
+
console.log("Chat client is ready");
|
|
64
|
+
});
|
|
65
|
+
clientRef.current.on("authenticated", async () => {
|
|
66
|
+
console.log("Chat client is authenticated");
|
|
67
|
+
});
|
|
68
|
+
client.on("chat.ongoing", (chat) => {
|
|
69
|
+
console.log(chat);
|
|
70
|
+
});
|
|
71
|
+
clientRef.current.on("chat.message", (message) => {
|
|
72
|
+
console.log("Received message:", message);
|
|
73
|
+
addMessage(message);
|
|
74
|
+
});
|
|
75
|
+
clientRef.current.on("chat.typingStarted", (identity) => {
|
|
76
|
+
console.log(identity);
|
|
77
|
+
});
|
|
78
|
+
clientRef.current.on("chat.disconnected", () => {
|
|
79
|
+
console.log("disconnected");
|
|
80
|
+
setStatus("idle");
|
|
81
|
+
});
|
|
82
|
+
clientRef.current.on("chat.dismissed", () => {
|
|
83
|
+
console.log("dismissed");
|
|
84
|
+
});
|
|
85
|
+
clientRef.current.on("chat.timeout", () => {
|
|
86
|
+
console.log("timeout");
|
|
87
|
+
});
|
|
88
|
+
clientRef.current.on("chat.ended", () => {
|
|
89
|
+
console.log("ended");
|
|
90
|
+
setStatus("finished");
|
|
91
|
+
});
|
|
92
|
+
clientRef.current.on("chat.destroyed", () => {
|
|
93
|
+
console.log("destroyed");
|
|
94
|
+
});
|
|
95
|
+
clientRef.current.on("chat.memberLeft", (identity) => {
|
|
96
|
+
console.log(identity);
|
|
97
|
+
});
|
|
98
|
+
clientRef.current.on("chat.typingStarted", (identity) => {
|
|
99
|
+
console.log(identity);
|
|
100
|
+
});
|
|
101
|
+
return;
|
|
102
|
+
};
|
|
103
|
+
const startChat = async () => {
|
|
104
|
+
console.log("Starting chat");
|
|
105
|
+
const client = clientRef.current;
|
|
106
|
+
if (!client) return;
|
|
107
|
+
try {
|
|
108
|
+
const ongoingChat = await client.loadOngoingChat();
|
|
109
|
+
if (ongoingChat) {
|
|
110
|
+
console.log("Ongoing chat found:", ongoingChat);
|
|
111
|
+
console.log("Resuming chat:", ongoingChat.id);
|
|
112
|
+
chatRef.current = await client.resumeChat(ongoingChat.id);
|
|
113
|
+
agent_virtual.current = ongoingChat.agent;
|
|
114
|
+
clientRef?.current?.on("chat.connected", async () => {
|
|
115
|
+
setStatus("connected");
|
|
116
|
+
console.log("connected");
|
|
117
|
+
const messages2 = await clientRef.current?.fetchMessages();
|
|
118
|
+
if (messages2) {
|
|
119
|
+
addMessages(messages2);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const foundMenu = menuRef.current.menus.find(
|
|
125
|
+
(menu) => menu.name === menuOption
|
|
126
|
+
);
|
|
127
|
+
const menuId = foundMenu && foundMenu.id;
|
|
128
|
+
console.log("Creating new chat with menu ID:", menuId);
|
|
129
|
+
const newChat = await client.createChat(menuId, { custom_data });
|
|
130
|
+
if (newChat !== null) {
|
|
131
|
+
chatRef.current = newChat;
|
|
132
|
+
console.log("Chat created id:", newChat.id);
|
|
133
|
+
}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
console.error("Error creating chat:", err);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const handleClick = async () => {
|
|
139
|
+
toggle();
|
|
140
|
+
if (!hasOpenedOnce) {
|
|
141
|
+
await startChat();
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const onSendMessage = (msg) => {
|
|
145
|
+
console.log("Sending message:", msg);
|
|
146
|
+
clientRef.current?.sendTextMessage(msg);
|
|
147
|
+
};
|
|
148
|
+
const onEndChat = async () => {
|
|
149
|
+
console.log("Ending chat");
|
|
150
|
+
if (chatRef.current) {
|
|
151
|
+
await clientRef.current?.finishChat();
|
|
152
|
+
clearMessages();
|
|
153
|
+
chatRef.current = null;
|
|
154
|
+
console.log("Chat ended");
|
|
155
|
+
reset();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
useMount(async () => {
|
|
159
|
+
console.log("Chatbot mounted");
|
|
160
|
+
if (isMountedRef.current) return;
|
|
161
|
+
isMountedRef.current = true;
|
|
162
|
+
await createClient();
|
|
163
|
+
});
|
|
164
|
+
useUnmount(() => {
|
|
165
|
+
console.log("Chatbot unmounted");
|
|
21
166
|
});
|
|
22
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
/* @__PURE__ */ jsx(Bubble, {}),
|
|
167
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
168
|
+
/* @__PURE__ */ jsx(Bubble, { onClick: handleClick }),
|
|
24
169
|
/* @__PURE__ */ jsx(
|
|
25
170
|
ChatWindow,
|
|
26
171
|
{
|
|
27
172
|
status,
|
|
28
|
-
|
|
173
|
+
virtualAgent: agent_virtual.current,
|
|
29
174
|
messages,
|
|
30
|
-
onSend:
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
endChat,
|
|
34
|
-
virtualAgent,
|
|
35
|
-
showReconnect
|
|
175
|
+
onSend: onSendMessage,
|
|
176
|
+
endChat: onEndChat
|
|
36
177
|
}
|
|
37
178
|
)
|
|
38
179
|
] });
|
package/dist/Chatbot/index.d.ts
CHANGED
package/dist/Chatbot/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import { ChatWindow } from "./ChatWindow.js";
|
|
|
7
7
|
import { arrowFill, button_reset, chatFinishDialog, chatNetworkStatus, chat_title, chatbotMenu, chatbotMenuItem, endChatButtonStyle, inline_button, inline_button_wrapper, inputStyle, messageStyle, messagesContainerStyle, notificationStyle, sendButtonStyle, windowBarStyle, windowOpenStyle, windowStyle } from "./ChatWindow.css.js";
|
|
8
8
|
import { useOpenChat } from "./store/chat.js";
|
|
9
9
|
import { useMessages } from "./store/messages.js";
|
|
10
|
-
import { useHeadlessChat } from "./useHeadlessChat.js";
|
|
11
10
|
export {
|
|
12
11
|
Bubble,
|
|
13
12
|
ChatWindow,
|
|
@@ -31,7 +30,6 @@ export {
|
|
|
31
30
|
notificationStyle,
|
|
32
31
|
sendButtonStyle,
|
|
33
32
|
svgFill,
|
|
34
|
-
useHeadlessChat,
|
|
35
33
|
useMessages,
|
|
36
34
|
useOpenChat,
|
|
37
35
|
windowBarStyle,
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { create } from "zustand";
|
|
2
|
-
const useOpenChat = create((set) => ({
|
|
2
|
+
const useOpenChat = create((set, get) => ({
|
|
3
3
|
isOpen: false,
|
|
4
|
+
hasOpenedOnce: false,
|
|
4
5
|
toggle: () => set((state) => ({ isOpen: !state.isOpen })),
|
|
5
|
-
open: () =>
|
|
6
|
+
open: () => {
|
|
7
|
+
const alreadyOpened = get().hasOpenedOnce;
|
|
8
|
+
set({
|
|
9
|
+
isOpen: true,
|
|
10
|
+
hasOpenedOnce: alreadyOpened ? true : true
|
|
11
|
+
});
|
|
12
|
+
},
|
|
6
13
|
close: () => set({ isOpen: false }),
|
|
7
|
-
reset: () => set({ isOpen: false })
|
|
14
|
+
reset: () => set({ hasOpenedOnce: false, isOpen: false })
|
|
8
15
|
}));
|
|
9
16
|
export {
|
|
10
17
|
useOpenChat
|
package/dist/Chevron/index.js
CHANGED
|
@@ -75,9 +75,10 @@ import "../Carousel/index.js";
|
|
|
75
75
|
/* empty css */
|
|
76
76
|
import "../Chatbot/store/chat.js";
|
|
77
77
|
import "../Chatbot/authenticate.js";
|
|
78
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
79
78
|
/* empty css */
|
|
80
79
|
import "../Chatbot/store/messages.js";
|
|
80
|
+
import "@ujet/websdk-headless";
|
|
81
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
82
|
/* empty css */
|
|
82
83
|
import "../Comparison/Comparison.css.js";
|
|
83
84
|
import "next/image.js";
|
|
@@ -75,9 +75,10 @@ import "../Carousel/index.js";
|
|
|
75
75
|
/* empty css */
|
|
76
76
|
import "../Chatbot/store/chat.js";
|
|
77
77
|
import "../Chatbot/authenticate.js";
|
|
78
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
79
78
|
/* empty css */
|
|
80
79
|
import "../Chatbot/store/messages.js";
|
|
80
|
+
import "@ujet/websdk-headless";
|
|
81
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
82
|
/* empty css */
|
|
82
83
|
import { comparison_layout, comparison_content, headerComparison, feature_header, feature_title, comparison_feature, comparison_list, comparison_buttons, comparison } from "./Comparison.css.js";
|
|
83
84
|
import "next/image.js";
|
|
@@ -75,9 +75,10 @@ import "../Carousel/index.js";
|
|
|
75
75
|
/* empty css */
|
|
76
76
|
import "../Chatbot/store/chat.js";
|
|
77
77
|
import "../Chatbot/authenticate.js";
|
|
78
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
79
78
|
/* empty css */
|
|
80
79
|
import "../Chatbot/store/messages.js";
|
|
80
|
+
import "@ujet/websdk-headless";
|
|
81
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
82
|
/* empty css */
|
|
82
83
|
import "../Comparison/Comparison.css.js";
|
|
83
84
|
import "next/image.js";
|
|
@@ -76,9 +76,10 @@ import "../Carousel/index.js";
|
|
|
76
76
|
/* empty css */
|
|
77
77
|
import "../Chatbot/store/chat.js";
|
|
78
78
|
import "../Chatbot/authenticate.js";
|
|
79
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
80
79
|
/* empty css */
|
|
81
80
|
import "../Chatbot/store/messages.js";
|
|
81
|
+
import "@ujet/websdk-headless";
|
|
82
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
82
83
|
/* empty css */
|
|
83
84
|
import "../Comparison/Comparison.css.js";
|
|
84
85
|
import "next/image.js";
|
|
@@ -71,9 +71,10 @@ import "../../Carousel/index.js";
|
|
|
71
71
|
/* empty css */
|
|
72
72
|
import "../../Chatbot/store/chat.js";
|
|
73
73
|
import "../../Chatbot/authenticate.js";
|
|
74
|
-
import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
75
74
|
/* empty css */
|
|
76
75
|
import "../../Chatbot/store/messages.js";
|
|
76
|
+
import "@ujet/websdk-headless";
|
|
77
|
+
import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
77
78
|
/* empty css */
|
|
78
79
|
import "../../Comparison/Comparison.css.js";
|
|
79
80
|
import "next/image.js";
|
package/dist/Forms/ApplyNow.js
CHANGED
|
@@ -76,9 +76,10 @@ import "../Carousel/index.js";
|
|
|
76
76
|
/* empty css */
|
|
77
77
|
import "../Chatbot/store/chat.js";
|
|
78
78
|
import "../Chatbot/authenticate.js";
|
|
79
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
80
79
|
/* empty css */
|
|
81
80
|
import "../Chatbot/store/messages.js";
|
|
81
|
+
import "@ujet/websdk-headless";
|
|
82
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
82
83
|
/* empty css */
|
|
83
84
|
import "../Comparison/Comparison.css.js";
|
|
84
85
|
import "next/image.js";
|
|
@@ -77,9 +77,10 @@ import "../Carousel/index.js";
|
|
|
77
77
|
/* empty css */
|
|
78
78
|
import "../Chatbot/store/chat.js";
|
|
79
79
|
import "../Chatbot/authenticate.js";
|
|
80
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
80
|
/* empty css */
|
|
82
81
|
import "../Chatbot/store/messages.js";
|
|
82
|
+
import "@ujet/websdk-headless";
|
|
83
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
83
84
|
/* empty css */
|
|
84
85
|
import "../Comparison/Comparison.css.js";
|
|
85
86
|
import "next/image.js";
|
|
@@ -77,9 +77,10 @@ import "../Carousel/index.js";
|
|
|
77
77
|
/* empty css */
|
|
78
78
|
import "../Chatbot/store/chat.js";
|
|
79
79
|
import "../Chatbot/authenticate.js";
|
|
80
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
80
|
/* empty css */
|
|
82
81
|
import "../Chatbot/store/messages.js";
|
|
82
|
+
import "@ujet/websdk-headless";
|
|
83
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
83
84
|
/* empty css */
|
|
84
85
|
import "../Comparison/Comparison.css.js";
|
|
85
86
|
import "next/image.js";
|
|
@@ -77,9 +77,10 @@ import "../Carousel/index.js";
|
|
|
77
77
|
/* empty css */
|
|
78
78
|
import "../Chatbot/store/chat.js";
|
|
79
79
|
import "../Chatbot/authenticate.js";
|
|
80
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
80
|
/* empty css */
|
|
82
81
|
import "../Chatbot/store/messages.js";
|
|
82
|
+
import "@ujet/websdk-headless";
|
|
83
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
83
84
|
/* empty css */
|
|
84
85
|
import "../Comparison/Comparison.css.js";
|
|
85
86
|
import "next/image.js";
|
|
@@ -77,9 +77,10 @@ import "../Carousel/index.js";
|
|
|
77
77
|
/* empty css */
|
|
78
78
|
import "../Chatbot/store/chat.js";
|
|
79
79
|
import "../Chatbot/authenticate.js";
|
|
80
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
80
|
/* empty css */
|
|
82
81
|
import "../Chatbot/store/messages.js";
|
|
82
|
+
import "@ujet/websdk-headless";
|
|
83
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
83
84
|
/* empty css */
|
|
84
85
|
import "../Comparison/Comparison.css.js";
|
|
85
86
|
import "next/image.js";
|
package/dist/Forms/EmailOnly.js
CHANGED
|
@@ -78,9 +78,10 @@ import "../Carousel/index.js";
|
|
|
78
78
|
/* empty css */
|
|
79
79
|
import "../Chatbot/store/chat.js";
|
|
80
80
|
import "../Chatbot/authenticate.js";
|
|
81
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
82
81
|
/* empty css */
|
|
83
82
|
import "../Chatbot/store/messages.js";
|
|
83
|
+
import "@ujet/websdk-headless";
|
|
84
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
84
85
|
/* empty css */
|
|
85
86
|
import "../Comparison/Comparison.css.js";
|
|
86
87
|
import "next/image.js";
|
|
@@ -78,9 +78,10 @@ import "../../Carousel/index.js";
|
|
|
78
78
|
/* empty css */
|
|
79
79
|
import "../../Chatbot/store/chat.js";
|
|
80
80
|
import "../../Chatbot/authenticate.js";
|
|
81
|
-
import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
82
81
|
/* empty css */
|
|
83
82
|
import "../../Chatbot/store/messages.js";
|
|
83
|
+
import "@ujet/websdk-headless";
|
|
84
|
+
import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
84
85
|
/* empty css */
|
|
85
86
|
import "../../Comparison/Comparison.css.js";
|
|
86
87
|
import "next/image.js";
|
|
@@ -74,9 +74,10 @@ import "../../Carousel/index.js";
|
|
|
74
74
|
/* empty css */
|
|
75
75
|
import "../../Chatbot/store/chat.js";
|
|
76
76
|
import "../../Chatbot/authenticate.js";
|
|
77
|
-
import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
78
77
|
/* empty css */
|
|
79
78
|
import "../../Chatbot/store/messages.js";
|
|
79
|
+
import "@ujet/websdk-headless";
|
|
80
|
+
import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
80
81
|
/* empty css */
|
|
81
82
|
import "../../Comparison/Comparison.css.js";
|
|
82
83
|
import "next/image.js";
|
|
@@ -77,9 +77,10 @@ import "../Carousel/index.js";
|
|
|
77
77
|
/* empty css */
|
|
78
78
|
import "../Chatbot/store/chat.js";
|
|
79
79
|
import "../Chatbot/authenticate.js";
|
|
80
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
81
80
|
/* empty css */
|
|
82
81
|
import "../Chatbot/store/messages.js";
|
|
82
|
+
import "@ujet/websdk-headless";
|
|
83
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
83
84
|
/* empty css */
|
|
84
85
|
import "../Comparison/Comparison.css.js";
|
|
85
86
|
import "next/image.js";
|
package/dist/Forms/SuccesForm.js
CHANGED
|
@@ -62,9 +62,10 @@ import "../Carousel/index.js";
|
|
|
62
62
|
import "../Chatbot/store/chat.js";
|
|
63
63
|
import "../Chatbot/authenticate.js";
|
|
64
64
|
import "react-use";
|
|
65
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
66
65
|
/* empty css */
|
|
67
66
|
import "../Chatbot/store/messages.js";
|
|
67
|
+
import "@ujet/websdk-headless";
|
|
68
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
68
69
|
/* empty css */
|
|
69
70
|
import "../Comparison/Comparison.css.js";
|
|
70
71
|
import "next/image.js";
|
package/dist/Hyperlink/index.js
CHANGED
|
@@ -70,9 +70,10 @@ import "../Carousel/index.js";
|
|
|
70
70
|
/* empty css */
|
|
71
71
|
import "../Chatbot/store/chat.js";
|
|
72
72
|
import "../Chatbot/authenticate.js";
|
|
73
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
74
73
|
/* empty css */
|
|
75
74
|
import "../Chatbot/store/messages.js";
|
|
75
|
+
import "@ujet/websdk-headless";
|
|
76
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
76
77
|
/* empty css */
|
|
77
78
|
import "../Comparison/Comparison.css.js";
|
|
78
79
|
import "next/image.js";
|
|
@@ -69,9 +69,10 @@ import "../Carousel/index.js";
|
|
|
69
69
|
/* empty css */
|
|
70
70
|
import "../Chatbot/store/chat.js";
|
|
71
71
|
import "../Chatbot/authenticate.js";
|
|
72
|
-
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
73
72
|
/* empty css */
|
|
74
73
|
import "../Chatbot/store/messages.js";
|
|
74
|
+
import "@ujet/websdk-headless";
|
|
75
|
+
import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
|
|
75
76
|
/* empty css */
|
|
76
77
|
import "../Comparison/Comparison.css.js";
|
|
77
78
|
import "../Tab/Tab.css.js";
|