yt-chat-components 1.1.0 → 1.1.1
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/package.json
CHANGED
|
@@ -140,7 +140,7 @@ export default function ChatMessage({
|
|
|
140
140
|
|
|
141
141
|
const renderUserMessage = () => {
|
|
142
142
|
return (
|
|
143
|
-
<div className="msg_userMessageBox">
|
|
143
|
+
<div style={user_message_style} className="msg_userMessageBox">
|
|
144
144
|
<div style={user_message_style} className="cl-user_message">
|
|
145
145
|
{message.message}
|
|
146
146
|
</div>
|
|
@@ -832,13 +832,15 @@ export default function ChatWindow({
|
|
|
832
832
|
{
|
|
833
833
|
display: tagList?.length > 0 ? '' : 'none',
|
|
834
834
|
zIndex: tagList?.length > 0 ? '2' : '-1',
|
|
835
|
-
maxWidth: 'calc(100vw - 3.2rem)',
|
|
835
|
+
maxWidth: 'calc(100vw - 3.2rem - 24px)',
|
|
836
836
|
flexWrap: "nowrap",
|
|
837
837
|
overflowX: "auto",
|
|
838
838
|
WebkitOverflowScrolling: 'touch',
|
|
839
839
|
scrollbarWidth: "none",
|
|
840
840
|
overflowY: "hidden",
|
|
841
841
|
background: 'transparent',
|
|
842
|
+
padding: '8px 0 8px 0',
|
|
843
|
+
marginLeft: 10,
|
|
842
844
|
} : {
|
|
843
845
|
// bottom: fileList.length > 0 ? '130px' : '80px',
|
|
844
846
|
display: tagList?.length > 0 ? '' : 'none',
|
|
@@ -16,7 +16,7 @@ import icon_history_upload from '../../assets/aicenter/icon_history_upload.png';
|
|
|
16
16
|
import icon_history_headerbg from '../../assets/aicenter/icon_history_headerbg.png';
|
|
17
17
|
import icon_history_add from '../../assets/aicenter/icon_history_add.png';
|
|
18
18
|
import ChatWidget from "../chatWidget";
|
|
19
|
-
import Draggable from 'react-draggable';
|
|
19
|
+
// import Draggable from 'react-draggable';
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
const style=`
|
|
@@ -634,6 +634,7 @@ export class MobileChatPage extends React.Component {
|
|
|
634
634
|
currentFlow: item,
|
|
635
635
|
dropDownList: this.getDropDownList(item.welcome_words),
|
|
636
636
|
agentDrawerVisible: false,
|
|
637
|
+
drawerVisible: false,
|
|
637
638
|
});
|
|
638
639
|
this.setWindowTitle(item.name)
|
|
639
640
|
this.getCurrentFlowHistory(item.id);
|
|
@@ -752,7 +753,7 @@ export class MobileChatPage extends React.Component {
|
|
|
752
753
|
<ChatWidget
|
|
753
754
|
input_container_style={{zIndex:2}}
|
|
754
755
|
chat_window_style={{paddingTop: 0}}
|
|
755
|
-
bot_message_style={{background: '#fff'}}
|
|
756
|
+
bot_message_style={{background: '#fff', maxWidth:'100%'}}
|
|
756
757
|
window_title={currentFlow?.name || title}
|
|
757
758
|
flow_id={currentFlow?.id || flowId}
|
|
758
759
|
tags={currentFlow?.keywords || tags}
|
|
@@ -775,15 +776,16 @@ export class MobileChatPage extends React.Component {
|
|
|
775
776
|
{
|
|
776
777
|
isShowSideRight && (
|
|
777
778
|
<>
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
779
|
+
{/*<Draggable onStart={() => { this.dragging = false; }}*/}
|
|
780
|
+
{/* onDrag={() => { this.dragging = true; }}*/}
|
|
781
|
+
{/* onStop={(e) => {*/}
|
|
782
|
+
{/* if (!this.dragging) {*/}
|
|
783
|
+
{/* this.setState({drawerVisible: true})*/}
|
|
784
|
+
{/* }*/}
|
|
785
|
+
{/* }}>*/}
|
|
785
786
|
<img
|
|
786
787
|
src={icon_agents}
|
|
788
|
+
onClick={() => {this.setState({drawerVisible: true})}}
|
|
787
789
|
style={{
|
|
788
790
|
width: '60px',
|
|
789
791
|
height: '60px',
|
|
@@ -793,7 +795,7 @@ export class MobileChatPage extends React.Component {
|
|
|
793
795
|
zIndex: 1000
|
|
794
796
|
}}
|
|
795
797
|
/>
|
|
796
|
-
|
|
798
|
+
{/*</Draggable>*/}
|
|
797
799
|
<Drawer
|
|
798
800
|
title={'专项技能'}
|
|
799
801
|
// closable={false}
|
package/webpack.config.js
CHANGED
|
@@ -6,11 +6,9 @@ module.exports = {
|
|
|
6
6
|
output: {
|
|
7
7
|
filename: "bundle.min.js",
|
|
8
8
|
path: path.resolve(__dirname, "build/static/js"),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
globalObject: "this", // 兼容 Node 和浏览器
|
|
9
|
+
libraryTarget: "umd",
|
|
10
|
+
globalObject: "this",
|
|
11
|
+
library: "YtChatComponents", // 可选,定义全局命名空间
|
|
14
12
|
},
|
|
15
13
|
module: {
|
|
16
14
|
rules: [
|
|
@@ -50,18 +48,4 @@ module.exports = {
|
|
|
50
48
|
minimize: true,
|
|
51
49
|
usedExports: false, // 禁用 tree-shaking,避免移除 React
|
|
52
50
|
},
|
|
53
|
-
externals: {
|
|
54
|
-
react: {
|
|
55
|
-
commonjs: "react",
|
|
56
|
-
commonjs2: "react",
|
|
57
|
-
amd: "react",
|
|
58
|
-
root: "React",
|
|
59
|
-
},
|
|
60
|
-
"react-draggable": {
|
|
61
|
-
commonjs: "react-draggable",
|
|
62
|
-
commonjs2: "react-draggable",
|
|
63
|
-
amd: "react-draggable",
|
|
64
|
-
root: "ReactDraggable",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
51
|
};
|