yt-chat-components 1.1.0 → 1.1.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-chat-components",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "build/static/js/bundle.min.js",
5
5
  "module": "build/static/js/bundle.min.js",
6
6
  "types": "build/static/js/index.d.ts",
@@ -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',
@@ -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}
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
- library: {
10
- name: "YtChatComponents", // 定义全局命名空间
11
- type: "umd", // 保持 UMD 格式
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
  };