yt-chat-components 1.1.2 → 1.1.3
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/modules.xml +1 -1
- package/.idea/sonarlint/issuestore/3/6/364385cedcce4c06de1901392ffeeac0caef0f3c +0 -0
- package/.idea/sonarlint/issuestore/3/9/39129446b425a1d640160c068e4194e96639eedf +0 -0
- package/.idea/sonarlint/issuestore/4/a/4a2f33951ce07c1ff7184f91877aa13db05d3785 +0 -0
- package/.idea/sonarlint/issuestore/4/a/4a7b99bdbee5792679d347b6474463bf5e14b66d +0 -0
- package/.idea/sonarlint/issuestore/4/b/4b015aa5428c4d4c3d672893ec23f5fe3969f9be +0 -0
- package/.idea/sonarlint/issuestore/4/b/4b6989b8ccae808ebc45d02230d336ea53800365 +0 -0
- package/.idea/sonarlint/issuestore/6/1/61ebb9fd6e8cf9082658121d5d81e297791dacd0 +0 -0
- package/.idea/sonarlint/issuestore/6/c/6c024c1d0ad64656b9d4b0695ec3c49c0454addf +0 -0
- package/.idea/sonarlint/issuestore/6/e/6e75fc1c07c3a427a86fc213ca9479caaaff00ea +0 -0
- package/.idea/sonarlint/issuestore/8/d/8d6123af13a140f93e06299fff7ea23c547e9ec8 +0 -0
- package/.idea/sonarlint/issuestore/c/c/cc2352788140b6778ac06df4b33f50b390d2d8be +0 -0
- package/.idea/sonarlint/issuestore/d/5/d5595158cc48f9bf3e51b06f6e6805a8fd2d6262 +0 -0
- package/.idea/sonarlint/issuestore/d/7/d747cbed4201192dfa83a1a51345b020a050b647 +0 -0
- package/.idea/sonarlint/issuestore/d/9/d938938695d447dadda115e28781c6541f53fc4f +0 -0
- package/.idea/sonarlint/issuestore/index.pb +31 -3
- package/build/static/js/bundle.min.js +2 -0
- package/build/static/js/bundle.min.js.LICENSE.txt +132 -0
- package/package.json +79 -78
- package/public/index.html +108 -108
- package/src/YtChatView/chatWidget/chatWindow/chatMessage/index.tsx +498 -464
- 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 +1099 -1086
- package/src/YtChatView/chatWidget/chatWindow/types/chatWidget/index.ts +50 -50
- package/src/YtChatView/chatWidget/index.tsx +2593 -2591
- 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 +600 -600
- package/src/YtChatView/previewDialog/index.module.css +253 -253
- package/src/chatWidget/chatWindow/index.tsx +426 -426
- package/src/chatWidget/index.tsx +2193 -2193
- package/src/index.tsx +10 -10
- package/webpack.config.js +50 -50
- package/dist/build/static/js/bundle.min.js +0 -1
- /package/.idea/{langflow-embedded-chat-clone.iml → langflow-embedded-chat.iml} +0 -0
- /package/.idea/sonarlint/issuestore/{7/0/7030d0b2f71b999ff89a343de08c414af32fc93a → 0/f/0f8c0c92cf798431ebb931ff6e997b1af86ecee5} +0 -0
- /package/.idea/sonarlint/issuestore/{9/c/9cfff9a6d27bd6c255aa751213163c7901fb8ce7 → 2/7/27e69cb561aeea20c1afbdd32d260dd60b89a81b} +0 -0
|
@@ -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;
|