@myun/gimi-chat 0.0.5 → 0.0.6
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/dist/components/ai-chat-dialogue/index.js +181 -135
- package/dist/components/ai-correction/index.js +38 -25
- package/dist/components/ai-loading/index.js +12 -8
- package/dist/components/answer-item/index.js +135 -113
- package/dist/components/ask-card/index.js +42 -33
- package/dist/components/chat-input/index.js +135 -114
- package/dist/components/chat-voice/VoiceCommunication.js +23 -21
- package/dist/components/chat-voice/VoiceRecord.js +24 -21
- package/dist/components/conversation-delete/index.js +10 -8
- package/dist/components/dots-loading/index.js +10 -7
- package/dist/components/empty/index.js +12 -7
- package/dist/components/excel-components/ExcelCard.js +7 -3
- package/dist/components/excel-components/ExcelExcuting.js +60 -43
- package/dist/components/excel-components/ExcelFailCard.js +15 -10
- package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
- package/dist/components/file-card/fileCardSidebar.js +23 -16
- package/dist/components/file-card/index.js +68 -49
- package/dist/components/file-preview/index.js +36 -29
- package/dist/components/file-upload/index.js +10 -7
- package/dist/components/file-upload/uploadV1.js +33 -27
- package/dist/components/gimi-sidebar/index.js +20 -13
- package/dist/components/header/index.js +18 -11
- package/dist/components/iconfont-com/index.js +2 -1
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +28 -22
- package/dist/components/knowledge-trace/classList.js +37 -28
- package/dist/components/knowledge-trace/documentList.js +36 -27
- package/dist/components/knowledge-trace/index.js +28 -21
- package/dist/components/knowledge-trace/videoList.js +46 -36
- package/dist/components/lottie-img/index.js +10 -8
- package/dist/components/message-actions/CopyButton.js +25 -22
- package/dist/components/message-actions/LikeButton.js +25 -22
- package/dist/components/message-actions/RegenerateButton.js +21 -18
- package/dist/components/message-actions/UnLikeButton.js +25 -22
- package/dist/components/message-actions/VoicePlay.js +25 -22
- package/dist/components/message-list/index.js +85 -72
- package/dist/components/no-microphone-root/index.js +39 -29
- package/dist/components/preset-agent-content/index.js +20 -15
- package/dist/components/reasoning-content/index.js +55 -42
- package/dist/components/reference-content/index.js +72 -63
- package/dist/components/templates/CommonChat.js +78 -64
- package/dist/components/templates/GimiChatComponent.js +13 -6
- package/dist/components/templates/demo/demo.js +104 -102
- package/dist/components/upload-list/index.js +56 -41
- package/dist/components/voice-bars/index.js +22 -19
- package/dist/components/voice-check-dialog/index.js +24 -17
- package/dist/components/voice-recording/index.js +57 -42
- package/dist/components/work-flow-content/demo.js +2 -1
- package/dist/components/work-flow-content/index.js +12 -9
- package/package.json +6 -5
|
@@ -2,19 +2,26 @@ import classNames from 'classnames';
|
|
|
2
2
|
import styles from "./index.module.css";
|
|
3
3
|
import aiLogo from "../../assets/image/ai-logo.png";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
7
|
var Header = function Header(_ref) {
|
|
6
8
|
var _ref$title = _ref.title,
|
|
7
9
|
title = _ref$title === void 0 ? '' : _ref$title;
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
-
className: styles.header
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
return /*#__PURE__*/_jsx("div", {
|
|
11
|
+
className: styles.header,
|
|
12
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
13
|
+
className: styles.container,
|
|
14
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
15
|
+
className: styles.logo,
|
|
16
|
+
src: aiLogo,
|
|
17
|
+
alt: ""
|
|
18
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: classNames(styles.title, 'ellipse'),
|
|
20
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
21
|
+
children: title
|
|
22
|
+
})
|
|
23
|
+
})]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
19
26
|
};
|
|
20
27
|
export default Header;
|
|
@@ -12,11 +12,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
var IconFont = createFromIconfontCN({
|
|
16
17
|
scriptUrl: '//at.alicdn.com/t/c/font_3429456_0fjwg76h4xco.js'
|
|
17
18
|
});
|
|
18
19
|
var IconFontCom = function IconFontCom(props) {
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/_jsx(IconFont, {
|
|
20
21
|
type: props.type,
|
|
21
22
|
style: _objectSpread({
|
|
22
23
|
fontSize: (props === null || props === void 0 ? void 0 : props.size) || 12,
|
|
@@ -9,9 +9,11 @@ import { knowledgeConstants } from "../../constants";
|
|
|
9
9
|
import { useAppDispatch, useAppSelector } from "../../store/hooks";
|
|
10
10
|
import { setShowKonwledgeTrace, setKonwledgeTraceState } from "../../store/slices/gimiMenuSlice";
|
|
11
11
|
import React from 'react';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
14
|
var KnowledgeIcon = function KnowledgeIcon(_ref) {
|
|
13
15
|
var url = _ref.url;
|
|
14
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_jsx("img", {
|
|
15
17
|
style: {
|
|
16
18
|
width: '12px',
|
|
17
19
|
height: '12px'
|
|
@@ -43,12 +45,15 @@ export var KnowledgeIconComponent = function KnowledgeIconComponent(_ref2) {
|
|
|
43
45
|
showKonwledgeTrace: true
|
|
44
46
|
}));
|
|
45
47
|
};
|
|
46
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
47
49
|
className: styles.icon_btn,
|
|
48
|
-
onClick: handleIconClick
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
onClick: handleIconClick,
|
|
51
|
+
children: [/*#__PURE__*/_jsx(KnowledgeIcon, {
|
|
52
|
+
url: iconUrl
|
|
53
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
54
|
+
children: "".concat(resources === null || resources === void 0 ? void 0 : resources.length, "\u4E2A").concat(type === 'video' ? '视频' : type === 'product' ? '课程' : '文档')
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
52
57
|
};
|
|
53
58
|
var KnowledgeIconGroup = function KnowledgeIconGroup(_ref3) {
|
|
54
59
|
var value = _ref3.value;
|
|
@@ -79,23 +84,24 @@ var KnowledgeIconGroup = function KnowledgeIconGroup(_ref3) {
|
|
|
79
84
|
}
|
|
80
85
|
}, [value.content]);
|
|
81
86
|
var renderList = knowledgeMap.keys().toArray() || [];
|
|
82
|
-
return /*#__PURE__*/
|
|
87
|
+
return /*#__PURE__*/_jsx("div", {
|
|
83
88
|
style: {
|
|
84
89
|
display: 'inline-block'
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
},
|
|
91
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
92
|
+
style: {
|
|
93
|
+
display: 'flex',
|
|
94
|
+
gap: '5px',
|
|
95
|
+
flexWrap: 'wrap'
|
|
96
|
+
},
|
|
97
|
+
children: renderList.map(function (item) {
|
|
98
|
+
return /*#__PURE__*/_jsx(KnowledgeIconComponent, {
|
|
99
|
+
type: item,
|
|
100
|
+
resources: knowledgeMap.get(item) || [],
|
|
101
|
+
messageId: value.messageId
|
|
102
|
+
}, item);
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
});
|
|
100
106
|
};
|
|
101
107
|
export default KnowledgeIconGroup;
|
|
@@ -3,6 +3,8 @@ import classNames from 'classnames';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Toast, Tooltip } from '@douyinfe/semi-ui';
|
|
5
5
|
import { useAppSelector } from "../../store/hooks";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
8
|
var ClassItem = function ClassItem(_ref) {
|
|
7
9
|
var _konwledgeTraceState$, _item$name;
|
|
8
10
|
var item = _ref.item;
|
|
@@ -18,9 +20,10 @@ var ClassItem = function ClassItem(_ref) {
|
|
|
18
20
|
var tagContent = React.useMemo(function () {
|
|
19
21
|
if (item.showStyle === 0) return null;
|
|
20
22
|
var classes = item.showStyle === 1 ? styles.tag_badge_green : item.showStyle === 2 ? styles.tag_badge_warning : styles.tag_badge_default;
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
className: classes
|
|
23
|
-
|
|
23
|
+
return /*#__PURE__*/_jsx("div", {
|
|
24
|
+
className: classes,
|
|
25
|
+
children: item.equityLabel
|
|
26
|
+
});
|
|
24
27
|
}, [item.showStyle, item.equityLabel]);
|
|
25
28
|
var handleClick = function handleClick() {
|
|
26
29
|
if (item.isDelete === 1) return;
|
|
@@ -39,34 +42,40 @@ var ClassItem = function ClassItem(_ref) {
|
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
|
-
return /*#__PURE__*/
|
|
45
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
43
46
|
className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : isActive ? styles.active : ''),
|
|
44
|
-
onClick: handleClick
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
onClick: handleClick,
|
|
48
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
49
|
+
alt: "\u8BFE\u7A0B\u5C01\u9762",
|
|
50
|
+
className: styles.class_img,
|
|
51
|
+
src: item.productUrl
|
|
52
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
53
|
+
className: styles.class_description,
|
|
54
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
55
|
+
className: styles.text,
|
|
56
|
+
children: [tagContent, /*#__PURE__*/_jsx(Tooltip, {
|
|
57
|
+
content: item.name,
|
|
58
|
+
children: ((_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.length) > 33 ? "".concat(item.name.substring(0, 33), "...") : item.name || ''
|
|
59
|
+
})]
|
|
60
|
+
}), item.isDelete === 1 && /*#__PURE__*/_jsx("div", {
|
|
61
|
+
className: styles.knowledge_trace_deactive,
|
|
62
|
+
children: "\u8BFE\u7A0B\u5931\u6548"
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
58
66
|
};
|
|
59
67
|
var ClassList = function ClassList(_ref2) {
|
|
60
68
|
var list = _ref2.list;
|
|
61
|
-
return /*#__PURE__*/
|
|
62
|
-
className: styles.knowledgeList
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
70
|
+
className: styles.knowledgeList,
|
|
71
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
72
|
+
className: styles.total,
|
|
73
|
+
children: "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u8BFE\u7A0B")
|
|
74
|
+
}), list.map(function (item) {
|
|
75
|
+
return /*#__PURE__*/_jsx(ClassItem, {
|
|
76
|
+
item: item
|
|
77
|
+
}, item.id);
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
71
80
|
};
|
|
72
81
|
export default ClassList;
|
|
@@ -4,6 +4,8 @@ import classNames from 'classnames';
|
|
|
4
4
|
import { documentConstants } from "../../constants";
|
|
5
5
|
import { Toast, Tooltip } from '@douyinfe/semi-ui';
|
|
6
6
|
import { useAppSelector } from "../../store/hooks";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
9
|
var SUPPORT_PREVIEW_FILE_TYPE = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
|
8
10
|
var FileItem = function FileItem(_ref) {
|
|
9
11
|
var _konwledgeTraceState$;
|
|
@@ -40,36 +42,43 @@ var FileItem = function FileItem(_ref) {
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
|
-
return /*#__PURE__*/
|
|
45
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
44
46
|
className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : isActive ? styles.active : ''),
|
|
45
|
-
onClick: handleClick
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
onClick: handleClick,
|
|
48
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
49
|
+
alt: "\u6587\u6863\u56FE\u7247",
|
|
50
|
+
className: styles.img,
|
|
51
|
+
src: documentConstants[item.suffix] || documentConstants.default
|
|
52
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
53
|
+
className: styles.description,
|
|
54
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
55
|
+
content: item.name,
|
|
56
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
57
|
+
className: styles.text,
|
|
58
|
+
children: item.name
|
|
59
|
+
})
|
|
60
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
61
|
+
className: styles.timeTrace,
|
|
62
|
+
children: "".concat(item.suffix, " | ").concat(item.sizeUnit)
|
|
63
|
+
}), item.isDelete === 1 && /*#__PURE__*/_jsx("div", {
|
|
64
|
+
className: styles.knowledge_trace_deactive,
|
|
65
|
+
children: "\u6587\u6863\u5931\u6548"
|
|
66
|
+
})]
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
61
69
|
};
|
|
62
70
|
var DocumentList = function DocumentList(_ref2) {
|
|
63
71
|
var list = _ref2.list;
|
|
64
|
-
return /*#__PURE__*/
|
|
65
|
-
className: styles.knowledgeList
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
73
|
+
className: styles.knowledgeList,
|
|
74
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
75
|
+
className: styles.total,
|
|
76
|
+
children: "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u6587\u6863")
|
|
77
|
+
}), list.map(function (item) {
|
|
78
|
+
return /*#__PURE__*/_jsx(FileItem, {
|
|
79
|
+
item: item
|
|
80
|
+
}, item.id);
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
74
83
|
};
|
|
75
84
|
export default DocumentList;
|
|
@@ -17,6 +17,8 @@ import useKnowledgeService from "../../hooks/useKnowledgeService";
|
|
|
17
17
|
import AiLoading from "../ai-loading";
|
|
18
18
|
import ReactDOM from 'react-dom';
|
|
19
19
|
import GimiSideBar from "../gimi-sidebar";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
22
|
var KonwledgeTrace = function KonwledgeTrace(_ref) {
|
|
21
23
|
var targetElement = _ref.targetElement,
|
|
22
24
|
chatList = _ref.chatList,
|
|
@@ -103,18 +105,18 @@ var KonwledgeTrace = function KonwledgeTrace(_ref) {
|
|
|
103
105
|
setActiveKey(activeKey);
|
|
104
106
|
};
|
|
105
107
|
var tabContent = React.useMemo(function () {
|
|
106
|
-
if (isLoading) return /*#__PURE__*/
|
|
108
|
+
if (isLoading) return /*#__PURE__*/_jsx(AiLoading, {});
|
|
107
109
|
switch (activeKey) {
|
|
108
110
|
case 'video':
|
|
109
|
-
return /*#__PURE__*/
|
|
111
|
+
return /*#__PURE__*/_jsx(VideoList, {
|
|
110
112
|
list: videoSliceList
|
|
111
113
|
});
|
|
112
114
|
case 'product':
|
|
113
|
-
return /*#__PURE__*/
|
|
115
|
+
return /*#__PURE__*/_jsx(ClassList, {
|
|
114
116
|
list: productList
|
|
115
117
|
});
|
|
116
118
|
case 'document':
|
|
117
|
-
return /*#__PURE__*/
|
|
119
|
+
return /*#__PURE__*/_jsx(DocumentList, {
|
|
118
120
|
list: documentList
|
|
119
121
|
});
|
|
120
122
|
default:
|
|
@@ -122,34 +124,39 @@ var KonwledgeTrace = function KonwledgeTrace(_ref) {
|
|
|
122
124
|
}
|
|
123
125
|
}, [activeKey, videoSliceList, productList, documentList, isLoading]);
|
|
124
126
|
var renderContent = function renderContent() {
|
|
125
|
-
return /*#__PURE__*/
|
|
127
|
+
return /*#__PURE__*/_jsx(GimiSideBar, {
|
|
126
128
|
show: showKonwledgeTrace,
|
|
127
129
|
isOverFlow: isOverFlow,
|
|
128
130
|
ref: tabPaneRef,
|
|
129
131
|
title: "\u5F15\u7528\u6765\u6E90",
|
|
130
132
|
handleClose: handleClose,
|
|
131
133
|
style: style,
|
|
132
|
-
className: className
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
134
|
+
className: className,
|
|
135
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
136
|
+
className: styles.tabs,
|
|
137
|
+
children: (tabList === null || tabList === void 0 ? void 0 : tabList.length) > 1 ? /*#__PURE__*/_jsx(Tabs, {
|
|
138
|
+
type: "button",
|
|
139
|
+
size: "small",
|
|
140
|
+
activeKey: activeKey,
|
|
141
|
+
onChange: handleTabChange,
|
|
142
|
+
children: tabList.map(function (tab) {
|
|
143
|
+
return /*#__PURE__*/_jsx(TabPane, {
|
|
144
|
+
tab: tab.name,
|
|
145
|
+
itemKey: tab.type,
|
|
146
|
+
children: tabContent
|
|
147
|
+
}, tab.type);
|
|
148
|
+
})
|
|
149
|
+
}) : tabContent
|
|
150
|
+
})
|
|
151
|
+
});
|
|
147
152
|
};
|
|
148
153
|
if (isOverFlow && (kowledgeTraceList === null || kowledgeTraceList === void 0 ? void 0 : kowledgeTraceList.length) > 0) {
|
|
149
154
|
var targetElm = targetElement || document.getElementById('myun_gimi_design_chat');
|
|
150
155
|
if (!targetElm) return null;
|
|
151
156
|
return /*#__PURE__*/ReactDOM.createPortal(renderContent(), targetElm);
|
|
152
157
|
}
|
|
153
|
-
return /*#__PURE__*/
|
|
158
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
159
|
+
children: (kowledgeTraceList === null || kowledgeTraceList === void 0 ? void 0 : kowledgeTraceList.length) > 0 ? renderContent() : null
|
|
160
|
+
});
|
|
154
161
|
};
|
|
155
162
|
export default KonwledgeTrace;
|
|
@@ -4,6 +4,8 @@ import classNames from 'classnames';
|
|
|
4
4
|
import { knowledgeConstants } from "../../constants";
|
|
5
5
|
import { Toast, Tooltip } from '@douyinfe/semi-ui';
|
|
6
6
|
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
9
|
var VideoItem = function VideoItem(_ref) {
|
|
8
10
|
var _konwledgeTraceState$;
|
|
9
11
|
var item = _ref.item;
|
|
@@ -47,45 +49,53 @@ var VideoItem = function VideoItem(_ref) {
|
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
};
|
|
50
|
-
return /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
51
53
|
className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : isActive ? styles.active : ''),
|
|
52
|
-
onClick: handleClick
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
onClick: handleClick,
|
|
55
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
56
|
+
style: {
|
|
57
|
+
position: 'relative'
|
|
58
|
+
},
|
|
59
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
60
|
+
alt: "\u89C6\u9891\u5C01\u9762\u56FE\u7247",
|
|
61
|
+
className: styles.class_img,
|
|
62
|
+
src: item.coverUrl || knowledgeConstants.VIDEO_DEFAULT_COVER_ADDRESS
|
|
63
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
64
|
+
alt: "\u64AD\u653E\u6309\u94AE\u56FE\u7247",
|
|
65
|
+
className: styles.class_img_play,
|
|
66
|
+
src: knowledgeConstants.VIDEO_PLAY_ICON_ADDRESS
|
|
67
|
+
})]
|
|
68
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
69
|
+
className: styles.class_description,
|
|
70
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
71
|
+
placement: "topLeft",
|
|
72
|
+
content: item.name,
|
|
73
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
74
|
+
className: styles.text,
|
|
75
|
+
children: item.name
|
|
76
|
+
})
|
|
77
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
78
|
+
className: styles.timeTrace,
|
|
79
|
+
children: "\u89C6\u9891\u7247\u6BB5: ".concat(item.startedAt || "0'0\"", " - ").concat(item.endedAt || "0'0\"")
|
|
80
|
+
}), item.isDelete === 1 && /*#__PURE__*/_jsx("div", {
|
|
81
|
+
className: styles.knowledge_trace_deactive,
|
|
82
|
+
children: "\u89C6\u9891\u5931\u6548"
|
|
83
|
+
})]
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
77
86
|
};
|
|
78
87
|
var VideoList = function VideoList(_ref2) {
|
|
79
88
|
var list = _ref2.list;
|
|
80
|
-
return /*#__PURE__*/
|
|
81
|
-
className: styles.knowledgeList
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
90
|
+
className: styles.knowledgeList,
|
|
91
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
92
|
+
className: styles.total,
|
|
93
|
+
children: "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u89C6\u9891")
|
|
94
|
+
}), list.map(function (item) {
|
|
95
|
+
return /*#__PURE__*/_jsx(VideoItem, {
|
|
96
|
+
item: item
|
|
97
|
+
}, item.id);
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
90
100
|
};
|
|
91
101
|
export default VideoList;
|
|
@@ -13,6 +13,7 @@ import * as aiOutputStrengthen from "../../assets/lottie/ai-output-strengthen.js
|
|
|
13
13
|
import * as aiOutputLoading from "../../assets/lottie/ai-output-loading.json";
|
|
14
14
|
import * as aiVoicePlay from "../../assets/lottie/ai-voice-play.json";
|
|
15
15
|
import React from 'react';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
var names = [{
|
|
17
18
|
name: 'live',
|
|
18
19
|
value: live
|
|
@@ -84,16 +85,17 @@ var LottieImg = function LottieImg(_ref) {
|
|
|
84
85
|
pathFillColor: '#ff0000',
|
|
85
86
|
pathStrokeColor: '#000000'
|
|
86
87
|
};
|
|
87
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/_jsx("div", {
|
|
88
89
|
style: {
|
|
89
90
|
pointerEvents: 'none',
|
|
90
91
|
margin: '0 auto'
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
},
|
|
93
|
+
children: /*#__PURE__*/_jsx(Lottie, {
|
|
94
|
+
params: defaultOptions,
|
|
95
|
+
width: width,
|
|
96
|
+
height: height,
|
|
97
|
+
style: _objectSpread({}, style)
|
|
98
|
+
})
|
|
99
|
+
});
|
|
98
100
|
};
|
|
99
101
|
export default LottieImg;
|
|
@@ -2,32 +2,35 @@ import React from 'react';
|
|
|
2
2
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
3
3
|
import { usePureChatActions } from "../../hooks/useChatActions";
|
|
4
4
|
import copyIcon from "../../assets/image/copyIcon.png";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
var CopyButton = function CopyButton(_ref) {
|
|
6
7
|
var item = _ref.item,
|
|
7
8
|
onCopyCallback = _ref.onCopyCallback;
|
|
8
9
|
var _usePureChatActions = usePureChatActions(),
|
|
9
10
|
copyToClipboard = _usePureChatActions.copyToClipboard;
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
-
content: "\u590D\u5236"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
12
|
+
content: "\u590D\u5236",
|
|
13
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
14
|
+
style: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
cursor: 'pointer'
|
|
19
|
+
},
|
|
20
|
+
children: /*#__PURE__*/_jsx("img", {
|
|
21
|
+
width: 18,
|
|
22
|
+
height: 18,
|
|
23
|
+
style: {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center'
|
|
26
|
+
},
|
|
27
|
+
src: copyIcon,
|
|
28
|
+
onClick: function onClick() {
|
|
29
|
+
copyToClipboard(item);
|
|
30
|
+
onCopyCallback === null || onCopyCallback === void 0 || onCopyCallback();
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
});
|
|
32
35
|
};
|
|
33
36
|
export default CopyButton;
|
|
@@ -3,32 +3,35 @@ import likeIcon from "../../assets/image/like_active.png";
|
|
|
3
3
|
import love from "../../assets/image/love.png";
|
|
4
4
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
var LikeButton = function LikeButton(_ref) {
|
|
7
8
|
var item = _ref.item,
|
|
8
9
|
onLikeCallback = _ref.onLikeCallback;
|
|
9
10
|
var _usePureChatActions = usePureChatActions(),
|
|
10
11
|
handleUnlove = _usePureChatActions.handleUnlove;
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
-
content: "".concat(item.mark === 2 ? '已点赞' : '点赞')
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
13
|
+
content: "".concat(item.mark === 2 ? '已点赞' : '点赞'),
|
|
14
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
15
|
+
style: {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
cursor: 'pointer',
|
|
19
|
+
userSelect: 'none'
|
|
20
|
+
},
|
|
21
|
+
onClick: function onClick() {
|
|
22
|
+
handleUnlove(item, 'love');
|
|
23
|
+
onLikeCallback === null || onLikeCallback === void 0 || onLikeCallback();
|
|
24
|
+
},
|
|
25
|
+
children: /*#__PURE__*/_jsx("img", {
|
|
26
|
+
width: 18,
|
|
27
|
+
height: 18,
|
|
28
|
+
style: {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
alignItems: 'center'
|
|
31
|
+
},
|
|
32
|
+
src: item.mark === 2 ? likeIcon : love
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
});
|
|
33
36
|
};
|
|
34
37
|
export default LikeButton;
|