yt-chat-components 1.2.2 → 1.2.4
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/.idea/sonarlint/issuestore/7/0/7030d0b2f71b999ff89a343de08c414af32fc93a +0 -0
- package/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d +0 -0
- package/.idea/sonarlint/issuestore/9/c/9cfff9a6d27bd6c255aa751213163c7901fb8ce7 +0 -0
- package/.idea/sonarlint/issuestore/index.pb +7 -0
- package/build/asset-manifest.json +20 -0
- package/build/index.html +1 -0
- package/build/static/css/main.8ee59d98.css +2 -0
- package/build/static/css/main.8ee59d98.css.map +1 -0
- package/build/static/js/main.371ede49.js +3 -0
- package/build/static/js/main.371ede49.js.LICENSE.txt +181 -0
- package/build/static/js/main.371ede49.js.map +1 -0
- package/build/static/media/ai_call_working.a63afffab31dc8264d05.gif +0 -0
- package/build/static/media/aiavatar.74bafa995cce4c01b804.png +0 -0
- package/build/static/media/history-list-empty.1eb65b1550aef4e8c8a4.png +0 -0
- package/build/static/media/icon_history_headerbg.50747e81d01257f55346.png +0 -0
- package/build/static/media/moreAi.285e66289f838072060c.png +0 -0
- package/build/static/media/moreBg.9fc998472925cecd89f2.png +0 -0
- package/build/static/media/phone.19bc6f0d2e9eae4863ae.png +0 -0
- package/package.json +80 -78
- package/public/index.html +108 -108
- package/src/YtChatView/chatWidget/chatWindow/callInterface/index.module.css +50 -50
- package/src/YtChatView/chatWidget/chatWindow/callInterface/index.tsx +549 -549
- package/src/YtChatView/chatWidget/chatWindow/callInterface/style.ts +44 -44
- package/src/YtChatView/chatWidget/chatWindow/chatMessage/index.tsx +501 -501
- package/src/YtChatView/chatWidget/chatWindow/chatPlaceholder/index.tsx +23 -23
- package/src/YtChatView/chatWidget/chatWindow/controllers/index.ts +249 -249
- package/src/YtChatView/chatWidget/chatWindow/index.module.css +196 -196
- package/src/YtChatView/chatWidget/chatWindow/index.tsx +1182 -1186
- package/src/YtChatView/chatWidget/chatWindow/types/chatWidget/index.ts +50 -50
- package/src/YtChatView/chatWidget/index.tsx +2598 -2596
- package/src/YtChatView/logoBtn/index.css +3 -3
- package/src/YtChatView/logoBtn/index.jsx +103 -103
- package/src/YtChatView/logoSplitBtn/index.css +3 -3
- package/src/YtChatView/logoSplitBtn/index.jsx +105 -105
- package/src/YtChatView/mobileChat/index.jsx +945 -945
- package/src/YtChatView/mobileChat/index.module.css +253 -253
- package/src/YtChatView/previewDialog/index.jsx +601 -601
- package/src/YtChatView/previewDialog/index.module.css +253 -253
- package/src/chatWidget/chatWindow/index.tsx +426 -426
- package/src/chatWidget/index.tsx +2195 -2195
- package/src/index.tsx +11 -127
- package/webpack.config.js +50 -50
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Modal 样式 */
|
|
2
|
-
.yt-chat-modal .ant-modal-content {
|
|
3
|
-
padding: 0 !important;
|
|
1
|
+
/* Modal 样式 */
|
|
2
|
+
.yt-chat-modal .ant-modal-content {
|
|
3
|
+
padding: 0 !important;
|
|
4
4
|
}
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ToolDialog from "../previewDialog";
|
|
3
|
-
import { Modal } from 'antd';
|
|
4
|
-
import './index.css'
|
|
5
|
-
|
|
6
|
-
export class LogoBtn extends React.Component {
|
|
7
|
-
state={
|
|
8
|
-
isShow:false
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
render() {
|
|
12
|
-
const {
|
|
13
|
-
left,
|
|
14
|
-
right,
|
|
15
|
-
top,
|
|
16
|
-
bottom,
|
|
17
|
-
width,
|
|
18
|
-
height,
|
|
19
|
-
iconUrl,
|
|
20
|
-
title,
|
|
21
|
-
appId,
|
|
22
|
-
hostUrl,
|
|
23
|
-
userInfo,
|
|
24
|
-
tags,
|
|
25
|
-
boxStyle,
|
|
26
|
-
isShowSideRight,
|
|
27
|
-
isShowSideLeft,
|
|
28
|
-
modalIndex = 1000,
|
|
29
|
-
modalWidth = 1000,
|
|
30
|
-
dialogIndex = 1000,
|
|
31
|
-
agentUrl,
|
|
32
|
-
agentName,
|
|
33
|
-
logoWidth,
|
|
34
|
-
logoFontSize,
|
|
35
|
-
logoPosition = 'absolute',
|
|
36
|
-
isTitleSideIcon,
|
|
37
|
-
isShowUploadButton,
|
|
38
|
-
dropManUrl
|
|
39
|
-
} = this.props;
|
|
40
|
-
const iconConfig = {
|
|
41
|
-
width: `${width || 100}px`,
|
|
42
|
-
height: `${height || 100}px`,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if(left){
|
|
46
|
-
iconConfig.left = `${left}px`;
|
|
47
|
-
}else if(right){
|
|
48
|
-
iconConfig.right = `${right}px`;
|
|
49
|
-
}else {
|
|
50
|
-
iconConfig.right = `50px`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if(top){
|
|
54
|
-
iconConfig.top = `${top}px`;
|
|
55
|
-
}else if(bottom){
|
|
56
|
-
iconConfig.bottom = `${bottom}px`;
|
|
57
|
-
}else {
|
|
58
|
-
iconConfig.bottom = `50px`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<div style={{ position: logoPosition, ...iconConfig, zIndex: dialogIndex }}>
|
|
63
|
-
{iconUrl && <img src={iconUrl} style={{ width: "100%", height: "100%" }} onClick={(event) => this.setState({ isShow: true })}/>}
|
|
64
|
-
<Modal
|
|
65
|
-
wrapClassName={'yt-chat-modal'}
|
|
66
|
-
open={this.state.isShow}
|
|
67
|
-
width={modalWidth}
|
|
68
|
-
closable={false}
|
|
69
|
-
onCancel={() => this.setState({ isShow: false })}
|
|
70
|
-
footer={null}
|
|
71
|
-
centered={true}
|
|
72
|
-
zIndex={modalIndex}
|
|
73
|
-
>
|
|
74
|
-
<ToolDialog
|
|
75
|
-
title={title}
|
|
76
|
-
appId={appId}
|
|
77
|
-
hostUrl={hostUrl}
|
|
78
|
-
setDialogVisible={() => {
|
|
79
|
-
this.setState({ isShow: false })
|
|
80
|
-
}}
|
|
81
|
-
userInfo={userInfo || {}}
|
|
82
|
-
tags={tags || []}
|
|
83
|
-
boxStyle={boxStyle || { position: 'relative', height: '700px' }}
|
|
84
|
-
isShowSideRight={isShowSideRight}
|
|
85
|
-
isShowSideLeft={isShowSideLeft}
|
|
86
|
-
agentUrl={agentUrl}
|
|
87
|
-
agentName={agentName}
|
|
88
|
-
logoWidth={logoWidth}
|
|
89
|
-
logoFontSize={logoFontSize}
|
|
90
|
-
isTitleSideIcon={isTitleSideIcon}
|
|
91
|
-
modalIndex={modalIndex}
|
|
92
|
-
isShowUploadButton={isShowUploadButton}
|
|
93
|
-
dropManUrl={dropManUrl}
|
|
94
|
-
modalWidth={modalWidth}
|
|
95
|
-
/>
|
|
96
|
-
</Modal>
|
|
97
|
-
</div>
|
|
98
|
-
// </div>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export default LogoBtn;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ToolDialog from "../previewDialog";
|
|
3
|
+
import { Modal } from 'antd';
|
|
4
|
+
import './index.css'
|
|
5
|
+
|
|
6
|
+
export class LogoBtn extends React.Component {
|
|
7
|
+
state={
|
|
8
|
+
isShow:false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
const {
|
|
13
|
+
left,
|
|
14
|
+
right,
|
|
15
|
+
top,
|
|
16
|
+
bottom,
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
iconUrl,
|
|
20
|
+
title,
|
|
21
|
+
appId,
|
|
22
|
+
hostUrl,
|
|
23
|
+
userInfo,
|
|
24
|
+
tags,
|
|
25
|
+
boxStyle,
|
|
26
|
+
isShowSideRight,
|
|
27
|
+
isShowSideLeft,
|
|
28
|
+
modalIndex = 1000,
|
|
29
|
+
modalWidth = 1000,
|
|
30
|
+
dialogIndex = 1000,
|
|
31
|
+
agentUrl,
|
|
32
|
+
agentName,
|
|
33
|
+
logoWidth,
|
|
34
|
+
logoFontSize,
|
|
35
|
+
logoPosition = 'absolute',
|
|
36
|
+
isTitleSideIcon,
|
|
37
|
+
isShowUploadButton,
|
|
38
|
+
dropManUrl
|
|
39
|
+
} = this.props;
|
|
40
|
+
const iconConfig = {
|
|
41
|
+
width: `${width || 100}px`,
|
|
42
|
+
height: `${height || 100}px`,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if(left){
|
|
46
|
+
iconConfig.left = `${left}px`;
|
|
47
|
+
}else if(right){
|
|
48
|
+
iconConfig.right = `${right}px`;
|
|
49
|
+
}else {
|
|
50
|
+
iconConfig.right = `50px`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if(top){
|
|
54
|
+
iconConfig.top = `${top}px`;
|
|
55
|
+
}else if(bottom){
|
|
56
|
+
iconConfig.bottom = `${bottom}px`;
|
|
57
|
+
}else {
|
|
58
|
+
iconConfig.bottom = `50px`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div style={{ position: logoPosition, ...iconConfig, zIndex: dialogIndex }}>
|
|
63
|
+
{iconUrl && <img src={iconUrl} style={{ width: "100%", height: "100%" }} onClick={(event) => this.setState({ isShow: true })}/>}
|
|
64
|
+
<Modal
|
|
65
|
+
wrapClassName={'yt-chat-modal'}
|
|
66
|
+
open={this.state.isShow}
|
|
67
|
+
width={modalWidth}
|
|
68
|
+
closable={false}
|
|
69
|
+
onCancel={() => this.setState({ isShow: false })}
|
|
70
|
+
footer={null}
|
|
71
|
+
centered={true}
|
|
72
|
+
zIndex={modalIndex}
|
|
73
|
+
>
|
|
74
|
+
<ToolDialog
|
|
75
|
+
title={title}
|
|
76
|
+
appId={appId}
|
|
77
|
+
hostUrl={hostUrl}
|
|
78
|
+
setDialogVisible={() => {
|
|
79
|
+
this.setState({ isShow: false })
|
|
80
|
+
}}
|
|
81
|
+
userInfo={userInfo || {}}
|
|
82
|
+
tags={tags || []}
|
|
83
|
+
boxStyle={boxStyle || { position: 'relative', height: '700px' }}
|
|
84
|
+
isShowSideRight={isShowSideRight}
|
|
85
|
+
isShowSideLeft={isShowSideLeft}
|
|
86
|
+
agentUrl={agentUrl}
|
|
87
|
+
agentName={agentName}
|
|
88
|
+
logoWidth={logoWidth}
|
|
89
|
+
logoFontSize={logoFontSize}
|
|
90
|
+
isTitleSideIcon={isTitleSideIcon}
|
|
91
|
+
modalIndex={modalIndex}
|
|
92
|
+
isShowUploadButton={isShowUploadButton}
|
|
93
|
+
dropManUrl={dropManUrl}
|
|
94
|
+
modalWidth={modalWidth}
|
|
95
|
+
/>
|
|
96
|
+
</Modal>
|
|
97
|
+
</div>
|
|
98
|
+
// </div>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default LogoBtn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Modal 样式 */
|
|
2
|
-
.yt-chat-modal .ant-modal-content {
|
|
3
|
-
padding: 0 !important;
|
|
1
|
+
/* Modal 样式 */
|
|
2
|
+
.yt-chat-modal .ant-modal-content {
|
|
3
|
+
padding: 0 !important;
|
|
4
4
|
}
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ToolDialog from "../previewDialog";
|
|
3
|
-
import { Modal } from 'antd';
|
|
4
|
-
import './index.css'
|
|
5
|
-
|
|
6
|
-
export class LogoSplitBtn extends React.Component {
|
|
7
|
-
state={
|
|
8
|
-
isShow:false
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
render() {
|
|
12
|
-
const {
|
|
13
|
-
left,
|
|
14
|
-
right,
|
|
15
|
-
top,
|
|
16
|
-
bottom,
|
|
17
|
-
width,
|
|
18
|
-
height,
|
|
19
|
-
iconUrl,
|
|
20
|
-
title,
|
|
21
|
-
appId,
|
|
22
|
-
hostUrl,
|
|
23
|
-
userInfo,
|
|
24
|
-
tags,
|
|
25
|
-
boxStyle = '{"position":"relative","height":"700px"}',
|
|
26
|
-
sceneId,
|
|
27
|
-
isShowSideRight,
|
|
28
|
-
isShowSideLeft,
|
|
29
|
-
modalIndex = 1000,
|
|
30
|
-
dialogIndex,
|
|
31
|
-
agentUrl,
|
|
32
|
-
agentName,
|
|
33
|
-
modalWidth = 1300,
|
|
34
|
-
logoWidth = '42px',
|
|
35
|
-
logoFontSize = '26px',
|
|
36
|
-
logoPosition = 'absolute',
|
|
37
|
-
isTitleSideIcon,
|
|
38
|
-
isShowUploadButton,
|
|
39
|
-
dropManUrl
|
|
40
|
-
} = this.props;
|
|
41
|
-
const iconConfig = {
|
|
42
|
-
width: `${width || 100}px`,
|
|
43
|
-
height: `${height || 100}px`,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if(left){
|
|
47
|
-
iconConfig.left = `${left}px`;
|
|
48
|
-
}else if(right){
|
|
49
|
-
iconConfig.right = `${right}px`;
|
|
50
|
-
}else {
|
|
51
|
-
iconConfig.right = `50px`;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if(top){
|
|
55
|
-
iconConfig.top = `${top}px`;
|
|
56
|
-
}else if(bottom){
|
|
57
|
-
iconConfig.bottom = `${bottom}px`;
|
|
58
|
-
}else {
|
|
59
|
-
iconConfig.bottom = `50px`;
|
|
60
|
-
}
|
|
61
|
-
return (
|
|
62
|
-
// <div style={{ position: "relative", width: "100vw", height: "100vh", background:'transparent' }}>
|
|
63
|
-
<div style={{ position: logoPosition, ...iconConfig, zIndex: dialogIndex }}>
|
|
64
|
-
<img src={iconUrl} style={{ width: "100%", height: "100%" }} onClick={(event) => this.setState({ isShow: true })}/>
|
|
65
|
-
<Modal
|
|
66
|
-
wrapClassName={'yt-chat-modal'}
|
|
67
|
-
open={this.state.isShow}
|
|
68
|
-
width={modalWidth}
|
|
69
|
-
closable={false}
|
|
70
|
-
onCancel={() => this.setState({ isShow: false })}
|
|
71
|
-
footer={null}
|
|
72
|
-
centered={true}
|
|
73
|
-
zIndex={modalIndex}
|
|
74
|
-
>
|
|
75
|
-
<ToolDialog
|
|
76
|
-
title={title}
|
|
77
|
-
appId={appId}
|
|
78
|
-
hostUrl={hostUrl}
|
|
79
|
-
setDialogVisible={() => {
|
|
80
|
-
this.setState({ isShow: false })
|
|
81
|
-
}}
|
|
82
|
-
userInfo={userInfo || {}}
|
|
83
|
-
tags={tags || []}
|
|
84
|
-
boxStyle={JSON.parse(boxStyle)}
|
|
85
|
-
sceneId={sceneId}
|
|
86
|
-
isShowSideRight={isShowSideRight}
|
|
87
|
-
isShowSideLeft={isShowSideLeft}
|
|
88
|
-
agentUrl={agentUrl}
|
|
89
|
-
agentName={agentName}
|
|
90
|
-
logoWidth={logoWidth}
|
|
91
|
-
logoFontSize={logoFontSize}
|
|
92
|
-
isTitleSideIcon={isTitleSideIcon}
|
|
93
|
-
modalIndex={modalIndex}
|
|
94
|
-
isShowUploadButton={isShowUploadButton}
|
|
95
|
-
dropManUrl={dropManUrl}
|
|
96
|
-
modalWidth={modalWidth}
|
|
97
|
-
/>
|
|
98
|
-
</Modal>
|
|
99
|
-
</div>
|
|
100
|
-
// </div>
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export default LogoSplitBtn;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ToolDialog from "../previewDialog";
|
|
3
|
+
import { Modal } from 'antd';
|
|
4
|
+
import './index.css'
|
|
5
|
+
|
|
6
|
+
export class LogoSplitBtn extends React.Component {
|
|
7
|
+
state={
|
|
8
|
+
isShow:false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
const {
|
|
13
|
+
left,
|
|
14
|
+
right,
|
|
15
|
+
top,
|
|
16
|
+
bottom,
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
iconUrl,
|
|
20
|
+
title,
|
|
21
|
+
appId,
|
|
22
|
+
hostUrl,
|
|
23
|
+
userInfo,
|
|
24
|
+
tags,
|
|
25
|
+
boxStyle = '{"position":"relative","height":"700px"}',
|
|
26
|
+
sceneId,
|
|
27
|
+
isShowSideRight,
|
|
28
|
+
isShowSideLeft,
|
|
29
|
+
modalIndex = 1000,
|
|
30
|
+
dialogIndex,
|
|
31
|
+
agentUrl,
|
|
32
|
+
agentName,
|
|
33
|
+
modalWidth = 1300,
|
|
34
|
+
logoWidth = '42px',
|
|
35
|
+
logoFontSize = '26px',
|
|
36
|
+
logoPosition = 'absolute',
|
|
37
|
+
isTitleSideIcon,
|
|
38
|
+
isShowUploadButton,
|
|
39
|
+
dropManUrl
|
|
40
|
+
} = this.props;
|
|
41
|
+
const iconConfig = {
|
|
42
|
+
width: `${width || 100}px`,
|
|
43
|
+
height: `${height || 100}px`,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if(left){
|
|
47
|
+
iconConfig.left = `${left}px`;
|
|
48
|
+
}else if(right){
|
|
49
|
+
iconConfig.right = `${right}px`;
|
|
50
|
+
}else {
|
|
51
|
+
iconConfig.right = `50px`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if(top){
|
|
55
|
+
iconConfig.top = `${top}px`;
|
|
56
|
+
}else if(bottom){
|
|
57
|
+
iconConfig.bottom = `${bottom}px`;
|
|
58
|
+
}else {
|
|
59
|
+
iconConfig.bottom = `50px`;
|
|
60
|
+
}
|
|
61
|
+
return (
|
|
62
|
+
// <div style={{ position: "relative", width: "100vw", height: "100vh", background:'transparent' }}>
|
|
63
|
+
<div style={{ position: logoPosition, ...iconConfig, zIndex: dialogIndex }}>
|
|
64
|
+
<img src={iconUrl} style={{ width: "100%", height: "100%" }} onClick={(event) => this.setState({ isShow: true })}/>
|
|
65
|
+
<Modal
|
|
66
|
+
wrapClassName={'yt-chat-modal'}
|
|
67
|
+
open={this.state.isShow}
|
|
68
|
+
width={modalWidth}
|
|
69
|
+
closable={false}
|
|
70
|
+
onCancel={() => this.setState({ isShow: false })}
|
|
71
|
+
footer={null}
|
|
72
|
+
centered={true}
|
|
73
|
+
zIndex={modalIndex}
|
|
74
|
+
>
|
|
75
|
+
<ToolDialog
|
|
76
|
+
title={title}
|
|
77
|
+
appId={appId}
|
|
78
|
+
hostUrl={hostUrl}
|
|
79
|
+
setDialogVisible={() => {
|
|
80
|
+
this.setState({ isShow: false })
|
|
81
|
+
}}
|
|
82
|
+
userInfo={userInfo || {}}
|
|
83
|
+
tags={tags || []}
|
|
84
|
+
boxStyle={JSON.parse(boxStyle)}
|
|
85
|
+
sceneId={sceneId}
|
|
86
|
+
isShowSideRight={isShowSideRight}
|
|
87
|
+
isShowSideLeft={isShowSideLeft}
|
|
88
|
+
agentUrl={agentUrl}
|
|
89
|
+
agentName={agentName}
|
|
90
|
+
logoWidth={logoWidth}
|
|
91
|
+
logoFontSize={logoFontSize}
|
|
92
|
+
isTitleSideIcon={isTitleSideIcon}
|
|
93
|
+
modalIndex={modalIndex}
|
|
94
|
+
isShowUploadButton={isShowUploadButton}
|
|
95
|
+
dropManUrl={dropManUrl}
|
|
96
|
+
modalWidth={modalWidth}
|
|
97
|
+
/>
|
|
98
|
+
</Modal>
|
|
99
|
+
</div>
|
|
100
|
+
// </div>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export default LogoSplitBtn;
|