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
package/src/index.tsx
CHANGED
|
@@ -1,127 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
window.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
customElements.define('yt-chat', r2wc(LogoBtn, {
|
|
14
|
-
shadow: "closed",
|
|
15
|
-
props: {
|
|
16
|
-
left: "number",
|
|
17
|
-
right: "number",
|
|
18
|
-
top: "number",
|
|
19
|
-
bottom: "number",
|
|
20
|
-
width: "number",
|
|
21
|
-
height: "number",
|
|
22
|
-
iconUrl: "string",
|
|
23
|
-
title: "string",
|
|
24
|
-
appId: "string",
|
|
25
|
-
hostUrl: "string",
|
|
26
|
-
userInfo: "json",
|
|
27
|
-
tags: "json",
|
|
28
|
-
isShowSideRight:"boolean",
|
|
29
|
-
isShowSideLeft:"boolean",
|
|
30
|
-
modalIndex:"number",
|
|
31
|
-
dialogIndex:"number",
|
|
32
|
-
agentUrl:"string",
|
|
33
|
-
agentName:"string",
|
|
34
|
-
modalWidth:"number",
|
|
35
|
-
logoWidth:"string",
|
|
36
|
-
logoFontSize:"string",
|
|
37
|
-
logoPosition:"string",
|
|
38
|
-
isTitleSideIcon:"boolean",
|
|
39
|
-
isShowUploadButton:"boolean",
|
|
40
|
-
dropManUrl:"string",
|
|
41
|
-
},
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
customElements.define('yt-page-chat', r2wc(ToolDialog, {
|
|
45
|
-
shadow: "closed",
|
|
46
|
-
props: {
|
|
47
|
-
title: "string",
|
|
48
|
-
appId: "string",
|
|
49
|
-
hostUrl: "string",
|
|
50
|
-
setDialogVisible: "function",
|
|
51
|
-
userInfo: "json",
|
|
52
|
-
tags: "json",
|
|
53
|
-
boxStyle: "json",
|
|
54
|
-
sceneId: "string",
|
|
55
|
-
isShowSideRight:"boolean",
|
|
56
|
-
isShowSideLeft:"boolean",
|
|
57
|
-
dialogIndex:"number",
|
|
58
|
-
agentUrl:"string",
|
|
59
|
-
agentName:"string",
|
|
60
|
-
logoWidth:"string",
|
|
61
|
-
logoFontSize:"string",
|
|
62
|
-
isTitleSideIcon:"boolean",
|
|
63
|
-
isShowUploadButton:"boolean",
|
|
64
|
-
dropManUrl:"string",
|
|
65
|
-
},
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
customElements.define('yt-split-modal-chat', r2wc(LogoSplitBtn, {
|
|
69
|
-
shadow: "closed",
|
|
70
|
-
props: {
|
|
71
|
-
left: "number",
|
|
72
|
-
right: "number",
|
|
73
|
-
top: "number",
|
|
74
|
-
bottom: "number",
|
|
75
|
-
width: "number",
|
|
76
|
-
height: "number",
|
|
77
|
-
iconUrl: "string",
|
|
78
|
-
title: "string",
|
|
79
|
-
appId: "string",
|
|
80
|
-
hostUrl: "string",
|
|
81
|
-
userInfo: "json",
|
|
82
|
-
tags: "json",
|
|
83
|
-
sceneId: "string",
|
|
84
|
-
boxStyle: "string",
|
|
85
|
-
isShowSideRight:"boolean",
|
|
86
|
-
isShowSideLeft:"boolean",
|
|
87
|
-
modalIndex:"number",
|
|
88
|
-
dialogIndex:"number",
|
|
89
|
-
agentUrl:"string",
|
|
90
|
-
agentName:"string",
|
|
91
|
-
modalWidth:"number",
|
|
92
|
-
logoWidth:"string",
|
|
93
|
-
logoFontSize:"string",
|
|
94
|
-
logoPosition:"string",
|
|
95
|
-
isTitleSideIcon:"boolean",
|
|
96
|
-
isShowUploadButton:"boolean",
|
|
97
|
-
dropManUrl:"string",
|
|
98
|
-
},
|
|
99
|
-
}));
|
|
100
|
-
|
|
101
|
-
customElements.define('yt-page-chat-mobile', r2wc(MobileChatPage, {
|
|
102
|
-
shadow: "closed",
|
|
103
|
-
props: {
|
|
104
|
-
title: "string",
|
|
105
|
-
appId: "string",
|
|
106
|
-
hostUrl: "string",
|
|
107
|
-
setDialogVisible: "function",
|
|
108
|
-
userInfo: "json",
|
|
109
|
-
tags: "json",
|
|
110
|
-
boxStyle: "json",
|
|
111
|
-
sceneId: "string",
|
|
112
|
-
isShowSideRight:"boolean",
|
|
113
|
-
isShowSideLeft:"boolean",
|
|
114
|
-
isLogin:"boolean",
|
|
115
|
-
isShowLogin:"boolean",
|
|
116
|
-
loginBtnClick: "function",
|
|
117
|
-
dialogIndex:"number",
|
|
118
|
-
agentUrl:"string",
|
|
119
|
-
agentName:"string",
|
|
120
|
-
logoWidth:"string",
|
|
121
|
-
logoFontSize:"string",
|
|
122
|
-
isTitleSideIcon:"boolean",
|
|
123
|
-
isShowUploadButton:"boolean",
|
|
124
|
-
isShowVoiceButton:"boolean",
|
|
125
|
-
dropManUrl:"string",
|
|
126
|
-
},
|
|
127
|
-
}));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import LogoBtn from './YtChatView/logoBtn/index';
|
|
4
|
+
import ToolDialog from "./YtChatView/previewDialog/index";
|
|
5
|
+
import LogoSplitBtn from "./YtChatView/logoSplitBtn/index";
|
|
6
|
+
import MobileChatPage from "./YtChatView/mobileChat";
|
|
7
|
+
|
|
8
|
+
// 手动注入 React 和 ReactDOM 到全局
|
|
9
|
+
window.React = React;
|
|
10
|
+
window.ReactDOM = ReactDOM;
|
|
11
|
+
export {ToolDialog, LogoSplitBtn, LogoBtn, MobileChatPage}
|
package/webpack.config.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
mode: "production",
|
|
5
|
-
entry: "./src/index.tsx",
|
|
6
|
-
output: {
|
|
7
|
-
filename: "bundle.min.js",
|
|
8
|
-
path: path.resolve(__dirname, "build/static/js"),
|
|
9
|
-
libraryTarget: "umd",
|
|
10
|
-
globalObject: "this",
|
|
11
|
-
library: "YtChatComponents", // 可选,定义全局命名空间
|
|
12
|
-
},
|
|
13
|
-
module: {
|
|
14
|
-
rules: [
|
|
15
|
-
{
|
|
16
|
-
test: /\.(jsx|js|tsx|ts)$/,
|
|
17
|
-
exclude: /node_modules/,
|
|
18
|
-
use: {
|
|
19
|
-
loader: "babel-loader",
|
|
20
|
-
options: {
|
|
21
|
-
presets: [
|
|
22
|
-
"@babel/preset-env",
|
|
23
|
-
"@babel/preset-react",
|
|
24
|
-
"@babel/preset-typescript",
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
test: /\.css$/,
|
|
31
|
-
use: ["style-loader", "css-loader"],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
test: /\.(png|jpg|jpeg|gif|svg)$/,
|
|
35
|
-
use: {
|
|
36
|
-
loader: "url-loader",
|
|
37
|
-
options: {
|
|
38
|
-
limit: 1000000,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
resolve: {
|
|
45
|
-
extensions: [".jsx", ".js", ".tsx", ".ts"],
|
|
46
|
-
},
|
|
47
|
-
optimization: {
|
|
48
|
-
minimize: true,
|
|
49
|
-
usedExports: false, // 禁用 tree-shaking,避免移除 React
|
|
50
|
-
},
|
|
1
|
+
const path = require("path");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
mode: "production",
|
|
5
|
+
entry: "./src/index.tsx",
|
|
6
|
+
output: {
|
|
7
|
+
filename: "bundle.min.js",
|
|
8
|
+
path: path.resolve(__dirname, "build/static/js"),
|
|
9
|
+
libraryTarget: "umd",
|
|
10
|
+
globalObject: "this",
|
|
11
|
+
library: "YtChatComponents", // 可选,定义全局命名空间
|
|
12
|
+
},
|
|
13
|
+
module: {
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
test: /\.(jsx|js|tsx|ts)$/,
|
|
17
|
+
exclude: /node_modules/,
|
|
18
|
+
use: {
|
|
19
|
+
loader: "babel-loader",
|
|
20
|
+
options: {
|
|
21
|
+
presets: [
|
|
22
|
+
"@babel/preset-env",
|
|
23
|
+
"@babel/preset-react",
|
|
24
|
+
"@babel/preset-typescript",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
test: /\.css$/,
|
|
31
|
+
use: ["style-loader", "css-loader"],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
test: /\.(png|jpg|jpeg|gif|svg)$/,
|
|
35
|
+
use: {
|
|
36
|
+
loader: "url-loader",
|
|
37
|
+
options: {
|
|
38
|
+
limit: 1000000,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
resolve: {
|
|
45
|
+
extensions: [".jsx", ".js", ".tsx", ".ts"],
|
|
46
|
+
},
|
|
47
|
+
optimization: {
|
|
48
|
+
minimize: true,
|
|
49
|
+
usedExports: false, // 禁用 tree-shaking,避免移除 React
|
|
50
|
+
},
|
|
51
51
|
};
|