@antscorp/antsomi-ui 1.6.4 → 1.6.6

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 (34) hide show
  1. package/es/components/molecules/ChatBox/ChatBoxInsight/ChatBox.d.ts +3 -0
  2. package/es/components/molecules/ChatBox/ChatBoxInsight/ChatBox.js +160 -0
  3. package/es/components/molecules/ChatBox/ChatBoxInsight/MessageItem.d.ts +5 -0
  4. package/es/components/molecules/ChatBox/ChatBoxInsight/MessageItem.js +74 -0
  5. package/es/components/molecules/ChatBox/ChatBoxInsight/QuestionItem.d.ts +7 -0
  6. package/es/components/molecules/ChatBox/ChatBoxInsight/QuestionItem.js +11 -0
  7. package/es/components/molecules/ChatBox/ChatBoxInsight/constants.d.ts +11 -0
  8. package/es/components/molecules/ChatBox/ChatBoxInsight/constants.js +78 -0
  9. package/es/components/molecules/ChatBox/ChatBoxInsight/index.d.ts +21 -0
  10. package/es/components/molecules/ChatBox/ChatBoxInsight/index.js +45 -0
  11. package/es/components/molecules/ChatBox/ChatBoxInsight/styled.d.ts +16 -0
  12. package/es/components/molecules/ChatBox/ChatBoxInsight/styled.js +331 -0
  13. package/es/components/molecules/ChatBox/ChatBoxInsight/types.d.ts +36 -0
  14. package/es/components/molecules/ChatBox/ChatBoxInsight/types.js +1 -0
  15. package/es/components/molecules/ChatBox/ChatBoxInsight/utils.d.ts +2 -0
  16. package/es/components/molecules/ChatBox/ChatBoxInsight/utils.js +18 -0
  17. package/es/components/molecules/ChatBox/index.d.ts +1 -0
  18. package/es/components/molecules/ChatBox/index.js +1 -0
  19. package/es/components/molecules/EditorTab/EditorTab.d.ts +1 -0
  20. package/es/components/molecules/EditorTab/EditorTab.js +10 -4
  21. package/es/components/molecules/index.d.ts +1 -1
  22. package/es/components/molecules/index.js +1 -1
  23. package/es/components/organism/LeftMenu/components/HomeMenu/useHomeMenu.js +1 -26
  24. package/es/components/organism/LeftMenu/components/common/ChildMenu/index.js +4 -15
  25. package/es/components/organism/LeftMenu/hooks/usePermission.d.ts +4 -4
  26. package/es/components/organism/LeftMenu/hooks/usePermission.js +3 -7
  27. package/es/components/organism/LeftMenu/index.d.ts +1 -0
  28. package/es/components/organism/LeftMenu/stores/index.d.ts +1 -2
  29. package/es/components/organism/LeftMenu/types/index.d.ts +0 -1
  30. package/es/components/organism/LeftMenu/utils/index.d.ts +2 -2
  31. package/es/components/organism/LeftMenu/utils/index.js +5 -3
  32. package/es/components/template/Layout/stores/index.js +1 -1
  33. package/es/test.js +86 -334
  34. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IChatBoxProps } from './types';
3
+ export declare const ChatBox: React.FC<IChatBoxProps>;
@@ -0,0 +1,160 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ /* eslint-disable react-hooks/exhaustive-deps */
11
+ // Libraries
12
+ import axios from 'axios';
13
+ import clsx from 'clsx';
14
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
15
+ // Atoms
16
+ import { Button, Popover } from '@antscorp/antsomi-ui/es/components/atoms';
17
+ import { Input as AntdInput } from 'antd';
18
+ // Components
19
+ import { PlaneIcon } from '@antscorp/antsomi-ui/es/components/icons';
20
+ import MessageItem from './MessageItem';
21
+ import { QuestionItem } from './QuestionItem';
22
+ // Styled
23
+ import { ChatBoxBody, ChatBoxFooter, ChatBoxWrapper, InputWrapper, WrapperContentSuggest, } from './styled';
24
+ const { TextArea } = AntdInput;
25
+ export const ChatBox = props => {
26
+ var _a;
27
+ const { domain, userId, token, avatar, style, lang = 'vi', chartSettings } = props;
28
+ const { chartData, dataSourceName } = chartSettings;
29
+ const [question, setQuestion] = useState('');
30
+ const [isAnswering, setAnswering] = useState(false);
31
+ const [showPlaceHolder, setShowPlaceholder] = useState(false);
32
+ const [conversation, setConversation] = useState([]);
33
+ const [suggestQuestions, setSuggestQuestions] = useState([]);
34
+ const bodyRef = useRef(null);
35
+ const inputRef = useRef(null);
36
+ const initRef = useRef(false);
37
+ const answeringRef = useRef(false);
38
+ const [isOpenSuggestedQuestion, setIsOpenSuggestedQuestions] = useState(false);
39
+ const scrollBody = useCallback(() => {
40
+ if (bodyRef.current) {
41
+ bodyRef.current.scrollTo(0, bodyRef.current.scrollHeight);
42
+ }
43
+ }, []);
44
+ const renderDone = useCallback(idx => {
45
+ if (idx === conversation.length - 1) {
46
+ answeringRef.current = false;
47
+ setAnswering(false);
48
+ }
49
+ }, [conversation]);
50
+ const addMessage = (content, role) => {
51
+ setConversation(prev => [
52
+ ...prev,
53
+ {
54
+ id: crypto.randomUUID(),
55
+ role,
56
+ content,
57
+ },
58
+ ]);
59
+ };
60
+ const fetchSuggestQuestions = () => __awaiter(void 0, void 0, void 0, function* () {
61
+ var _b, _c;
62
+ const res = yield axios.post(`${domain}/api/v1/insight/question`, { chart_settings: { chart_data: chartData, data_source_name: dataSourceName } }, { params: { _token: token, _user_id: userId, _account_id: userId, _lang: lang } });
63
+ setSuggestQuestions(((_c = (_b = res.data) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.questions) || []);
64
+ });
65
+ const handleClickQuestion = question => {
66
+ const { message } = question;
67
+ setQuestion(message);
68
+ setIsOpenSuggestedQuestions(false);
69
+ };
70
+ const request = (question) => __awaiter(void 0, void 0, void 0, function* () {
71
+ var _d;
72
+ const messages = [
73
+ ...conversation,
74
+ ...(question ? [{ content: question, role: "user" /* Role.User */ }] : []),
75
+ ]
76
+ // .filter(({ role }) => role === Role.User)
77
+ .map(({ content, role }) => ({ content, role }));
78
+ const res = yield axios.post(`${domain}/api/v1/insight/conversation`, {
79
+ chart_settings: { chart_data: chartData, data_source_name: dataSourceName },
80
+ messages,
81
+ }, { params: { _token: token, _user_id: userId, _account_id: userId, _lang: lang } });
82
+ const message = (_d = res.data) === null || _d === void 0 ? void 0 : _d.data;
83
+ if (message) {
84
+ addMessage(message, "assistant" /* Role.Assistant */);
85
+ }
86
+ });
87
+ useEffect(() => {
88
+ if (chartData === null || chartData === void 0 ? void 0 : chartData.length) {
89
+ initRef.current = true;
90
+ answeringRef.current = true;
91
+ setAnswering(true);
92
+ request();
93
+ fetchSuggestQuestions();
94
+ }
95
+ }, [chartData]);
96
+ useEffect(() => {
97
+ scrollBody();
98
+ }, [conversation]);
99
+ useEffect(() => {
100
+ var _a;
101
+ if (isAnswering && ((_a = conversation.at(-1)) === null || _a === void 0 ? void 0 : _a.role) !== "assistant" /* Role.Assistant */) {
102
+ setTimeout(() => {
103
+ var _a;
104
+ if (isAnswering && ((_a = conversation.at(-1)) === null || _a === void 0 ? void 0 : _a.role) !== "assistant" /* Role.Assistant */) {
105
+ setShowPlaceholder(true);
106
+ }
107
+ else {
108
+ setShowPlaceholder(false);
109
+ }
110
+ }, Math.random() * 4000);
111
+ }
112
+ else {
113
+ setShowPlaceholder(false);
114
+ }
115
+ }, [isAnswering, conversation]);
116
+ // const handleClose = () => {
117
+ // setIsClosed(true);
118
+ // if (typeof onClose === 'function') {
119
+ // onClose();
120
+ // }
121
+ // };
122
+ const renderMessage = (message, idx, isPlaceholder = false) => (React.createElement(MessageItem, Object.assign({ key: idx, idx: idx }, message, { scrollBody: scrollBody, renderDone: renderDone, doAnimation: initRef.current && idx === conversation.length - 1, avatar: avatar, isPlaceholder: isPlaceholder })));
123
+ const handleKeyDown = e => {
124
+ if (e.key === 'Enter') {
125
+ e.preventDefault();
126
+ if (answeringRef.current || !question || !question.trim()) {
127
+ return;
128
+ }
129
+ initRef.current = true;
130
+ answeringRef.current = true;
131
+ setAnswering(true);
132
+ addMessage(question, "user" /* Role.User */);
133
+ request(question);
134
+ setQuestion('');
135
+ }
136
+ };
137
+ return (React.createElement(ChatBoxWrapper, { style: style },
138
+ React.createElement(ChatBoxBody, { ref: bodyRef },
139
+ conversation.map((message, idx) => renderMessage(message, idx)),
140
+ showPlaceHolder &&
141
+ isAnswering &&
142
+ ((_a = conversation.at(-1)) === null || _a === void 0 ? void 0 : _a.role) !== "assistant" /* Role.Assistant */ &&
143
+ renderMessage({
144
+ id: 'placeholder',
145
+ role: "assistant" /* Role.Assistant */,
146
+ content: '',
147
+ }, conversation.length, true)),
148
+ React.createElement(ChatBoxFooter, null,
149
+ (suggestQuestions === null || suggestQuestions === void 0 ? void 0 : suggestQuestions.length) ? (React.createElement(Popover, { arrow: false, title: "Suggested Questions", placement: "bottom", content: () => (React.createElement(WrapperContentSuggest, null, suggestQuestions.map(question => (React.createElement(QuestionItem, { key: question, message: question, onClickItem: question => handleClickQuestion(question) }))))), trigger: "click", open: isOpenSuggestedQuestion, getPopupContainer: triggerNode => triggerNode, onOpenChange: isOpen => setIsOpenSuggestedQuestions(isOpen), overlayInnerStyle: {
150
+ padding: '12px 16px',
151
+ minWidth: '330px',
152
+ overflow: 'auto',
153
+ } },
154
+ React.createElement(Button, { onClick: () => setIsOpenSuggestedQuestions(true), type: "text" }, "Suggested Questions"))) : null,
155
+ React.createElement(InputWrapper, null,
156
+ React.createElement(TextArea, { ref: inputRef, value: question, onChange: e => setQuestion(e.target.value), className: clsx('input'), placeholder: "Type your question...", onKeyDown: handleKeyDown, autoSize: true }),
157
+ React.createElement(Button, { disabled: isAnswering, className: clsx('submit-btn', { disabled: isAnswering }), onClick: () => handleKeyDown({ key: 'Enter', preventDefault: () => null }) },
158
+ React.createElement(PlaneIcon, { className: clsx('icon') }))))));
159
+ };
160
+ ChatBox.defaultProps = {};
@@ -0,0 +1,5 @@
1
+ import 'highlight.js/styles/vs2015.css';
2
+ import React from 'react';
3
+ import { IChatBoxMessageProps } from './types';
4
+ declare const _default: React.NamedExoticComponent<IChatBoxMessageProps>;
5
+ export default _default;
@@ -0,0 +1,74 @@
1
+ import Icon from '@antscorp/icons';
2
+ import clsx from 'clsx';
3
+ import 'highlight.js/styles/vs2015.css';
4
+ import React, { useEffect, useRef, useState } from 'react';
5
+ import ReactMarkdown from 'react-markdown';
6
+ import rehypeHighlight from 'rehype-highlight';
7
+ import remarkGfm from 'remark-gfm';
8
+ // Atoms
9
+ import { Typography } from '@antscorp/antsomi-ui/es/components/atoms';
10
+ // Components
11
+ import { GPTIconV3, UserIcon } from '@antscorp/antsomi-ui/es/components/icons';
12
+ // Style
13
+ import { MessageItemWrapper, WrapperIsHelpful } from './styled';
14
+ const { Text } = Typography;
15
+ const MessageItem = ({ role, content, scrollBody, renderDone, doAnimation, avatar, idx, isPlaceholder, renderType, }) => {
16
+ const isBot = role === "assistant" /* Role.Assistant */;
17
+ const [text, setText] = useState(isBot && doAnimation ? '' : content);
18
+ const contentRef = useRef();
19
+ const MAP_ICON = {
20
+ ["assistant" /* Role.Assistant */]: React.createElement(GPTIconV3, { className: clsx('icon', 'gpt') }),
21
+ ["user" /* Role.User */]: avatar ? (React.createElement("img", { className: clsx('avatar'), src: avatar, alt: "avatar" })) : (React.createElement(UserIcon, { className: clsx('icon', 'user') })),
22
+ };
23
+ useEffect(() => {
24
+ if (isBot && doAnimation) {
25
+ let i = 0;
26
+ setTimeout(() => {
27
+ const intervalId = setInterval(() => {
28
+ const nextSpace = content.slice(i).indexOf(' ');
29
+ i += nextSpace >= 0 ? nextSpace + 1 : content.length + 1;
30
+ setText(content.slice(0, i));
31
+ if (i > content.length) {
32
+ clearInterval(intervalId);
33
+ renderDone(idx);
34
+ }
35
+ scrollBody();
36
+ }, 20);
37
+ return () => clearInterval(intervalId);
38
+ }, 150);
39
+ }
40
+ else {
41
+ scrollBody();
42
+ }
43
+ // eslint-disable-next-line react-hooks/exhaustive-deps
44
+ }, [isBot]);
45
+ const renderMarkdown = () => {
46
+ try {
47
+ const newContent = isPlaceholder ? (React.createElement("div", { className: "reactMarkDown" },
48
+ React.createElement("pre", null,
49
+ React.createElement("code", null,
50
+ React.createElement("span", null))))) : (React.createElement(ReactMarkdown, { remarkPlugins: [remarkGfm], rehypePlugins: [rehypeHighlight], className: clsx('reactMarkDown', role === "user" /* Role.User */ && 'user') }, text));
51
+ contentRef.current = newContent;
52
+ return contentRef.current;
53
+ }
54
+ catch (error) {
55
+ return contentRef.current;
56
+ }
57
+ };
58
+ return (React.createElement(React.Fragment, null,
59
+ React.createElement(MessageItemWrapper, { className: clsx({ greyBg: isBot }) },
60
+ MAP_ICON[role],
61
+ renderType === 'markdown' ? (React.createElement("div", { className: isPlaceholder || (isBot && doAnimation && text.length < content.length)
62
+ ? 'ants-text-streaming'
63
+ : '' }, renderMarkdown())) : (React.createElement(Text, { className: isPlaceholder || (isBot && doAnimation && text !== content)
64
+ ? 'ants-text-streaming'
65
+ : '' }, isPlaceholder ? '' : text))),
66
+ role === "assistant" /* Role.Assistant */ && (React.createElement(WrapperIsHelpful, null,
67
+ React.createElement("span", null, "Was this answer helful?"),
68
+ React.createElement(Icon, { className: "icon-vote", type: "icon-ants-angle-up" }),
69
+ React.createElement(Icon, { className: "icon-vote", type: "icon-ants-angle-down" })))));
70
+ };
71
+ MessageItem.defaultProps = {
72
+ renderType: 'markdown',
73
+ };
74
+ export default React.memo(MessageItem);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type TQuestionItem = {
3
+ message: string;
4
+ onClickItem: (data: Record<string, any>) => void;
5
+ };
6
+ export declare const QuestionItem: React.FC<TQuestionItem>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ const Item = styled.div `
4
+ padding: 10px;
5
+ background-color: #f3f9ff;
6
+ cursor: pointer;
7
+ `;
8
+ export const QuestionItem = props => {
9
+ const { message, onClickItem } = props;
10
+ return React.createElement(Item, { onClick: () => onClickItem(Object.assign({}, props)) }, message);
11
+ };
@@ -0,0 +1,11 @@
1
+ import { Role } from './types';
2
+ export declare const CONVERSATION: {
3
+ role: Role;
4
+ content: string;
5
+ }[];
6
+ export declare const LIMIT_MESSAGE = 10;
7
+ export declare const SUGGESTED_QUESTIONS: {
8
+ message_id: number;
9
+ message: string;
10
+ ctime: string;
11
+ }[];
@@ -0,0 +1,78 @@
1
+ export const CONVERSATION = [
2
+ {
3
+ role: "assistant" /* Role.Assistant */,
4
+ content: 'Hi there! How can I help?',
5
+ },
6
+ {
7
+ role: "user" /* Role.User */,
8
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
9
+ },
10
+ {
11
+ role: "assistant" /* Role.Assistant */,
12
+ content: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident',
13
+ },
14
+ {
15
+ role: "user" /* Role.User */,
16
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
17
+ },
18
+ {
19
+ role: "assistant" /* Role.Assistant */,
20
+ content: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident',
21
+ },
22
+ {
23
+ role: "user" /* Role.User */,
24
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
25
+ },
26
+ {
27
+ role: "assistant" /* Role.Assistant */,
28
+ content: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident',
29
+ },
30
+ {
31
+ role: "user" /* Role.User */,
32
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
33
+ },
34
+ {
35
+ role: "assistant" /* Role.Assistant */,
36
+ content: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident',
37
+ },
38
+ {
39
+ role: "user" /* Role.User */,
40
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
41
+ },
42
+ {
43
+ role: "assistant" /* Role.Assistant */,
44
+ content: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident',
45
+ },
46
+ {
47
+ role: "user" /* Role.User */,
48
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
49
+ },
50
+ ];
51
+ export const LIMIT_MESSAGE = 10;
52
+ export const SUGGESTED_QUESTIONS = [
53
+ {
54
+ message_id: 54000,
55
+ message: `How many users did I have last week?`,
56
+ ctime: '2023-05-30T08:58:42.017Z',
57
+ },
58
+ {
59
+ message_id: 54001,
60
+ message: `What are my top pages and screens by weeks?`,
61
+ ctime: '2023-05-30T08:58:42.017Z',
62
+ },
63
+ {
64
+ message_id: 54002,
65
+ message: `On what days I get the most users?`,
66
+ ctime: '2023-05-30T08:58:42.017Z',
67
+ },
68
+ {
69
+ message_id: 54003,
70
+ message: `How many new users this year?`,
71
+ ctime: '2023-05-30T08:58:42.017Z',
72
+ },
73
+ {
74
+ message_id: 54004,
75
+ message: `What are my top events by users?`,
76
+ ctime: '2023-05-30T08:58:42.017Z',
77
+ },
78
+ ];
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { IChartSettings } from './types';
3
+ interface IConfig {
4
+ domain: string;
5
+ lang: 'vi' | 'en';
6
+ token: string;
7
+ userId: string;
8
+ portalId?: string;
9
+ avatar?: string;
10
+ }
11
+ interface IGenerativeInsights {
12
+ isShowPopup: boolean;
13
+ title?: any;
14
+ onClose: () => void;
15
+ boundsDraggable?: string;
16
+ isShowResizeHover?: boolean;
17
+ configs: IConfig;
18
+ chartSettings: IChartSettings;
19
+ }
20
+ export declare const ChatBoxInsight: React.FC<IGenerativeInsights>;
21
+ export {};
@@ -0,0 +1,45 @@
1
+ /* eslint-disable prettier/prettier */
2
+ import React from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import { PopupDraggable } from '../..';
5
+ import { ChatBox } from './ChatBox';
6
+ import { Header, WrapperBody, WrapperHeader } from './styled';
7
+ export const ChatBoxInsight = props => {
8
+ const { onClose, isShowPopup, title, boundsDraggable, isShowResizeHover, configs, chartSettings, } = props;
9
+ const { domain, userId, token, avatar, lang } = configs || {};
10
+ const callback = (type) => {
11
+ switch (type) {
12
+ case 'ON_CLOSE_POPUP': {
13
+ onClose();
14
+ break;
15
+ }
16
+ default: {
17
+ break;
18
+ }
19
+ }
20
+ };
21
+ if (!isShowPopup)
22
+ return null;
23
+ return createPortal(React.createElement(PopupDraggable, { isHiddenResizing: true, bounds: boundsDraggable, isShowResizeHover: isShowResizeHover, callback: callback, styleContainer: {
24
+ display: 'flex',
25
+ flexDirection: 'column',
26
+ textAlign: 'left',
27
+ zIndex: 9999,
28
+ } },
29
+ React.createElement(WrapperHeader, { className: "cursor" },
30
+ React.createElement(Header, null, title)),
31
+ React.createElement(WrapperBody, { className: "popup-content", style: { padding: 0 } },
32
+ React.createElement(ChatBox, { domain: domain, userId: userId, token: token, avatar: avatar, lang: lang, chartSettings: chartSettings }))), document.body, 'PORTALS_ANTSOMI_PACKAGE_UI_KEY_POPUP');
33
+ };
34
+ ChatBoxInsight.defaultProps = {
35
+ title: 'Insights',
36
+ boundsDraggable: 'body',
37
+ isShowResizeHover: true,
38
+ configs: {
39
+ domain: 'http://localhost:5001',
40
+ portalId: '33167',
41
+ userId: '123',
42
+ token: '23123',
43
+ lang: 'vi',
44
+ },
45
+ };
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export declare const ChatBoxWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const ChatBoxHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const ChatBoxBody: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const ChatBoxFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const MessageItemWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const WarningWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const TypingCursor: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ export declare const WrapperIsHelpful: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const WrapperContentSuggest: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ export declare const WrapperHeader: import("styled-components").StyledComponent<"strong", any, {}, never>;
13
+ export declare const Header: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
14
+ export declare const WrapperBody: import("styled-components").StyledComponent<"div", any, {
15
+ types?: string | undefined;
16
+ }, never>;