@myun/gimi-chat 0.0.4 → 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 +182 -136
- package/dist/components/ai-chat-dialogue/index.module.css +230 -0
- package/dist/components/ai-correction/index.js +38 -25
- package/dist/components/ai-loading/index.js +13 -9
- package/dist/components/ai-loading/index.module.css +11 -0
- package/dist/components/answer-item/index.js +136 -114
- package/dist/components/answer-item/index.module.css +266 -0
- package/dist/components/ask-card/index.js +43 -34
- package/dist/components/ask-card/index.module.css +122 -0
- package/dist/components/chat-input/index.js +136 -115
- package/dist/components/chat-input/index.module.css +42 -0
- 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 +11 -8
- package/dist/components/dots-loading/index.module.css +41 -0
- package/dist/components/empty/index.js +13 -8
- package/dist/components/empty/index.module.css +24 -0
- package/dist/components/excel-components/ExcelCard.js +7 -3
- package/dist/components/excel-components/ExcelExcuting.js +61 -44
- package/dist/components/excel-components/ExcelFailCard.js +16 -11
- package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
- package/dist/components/excel-components/index.module.css +212 -0
- package/dist/components/excel-components/styles.module.css +178 -0
- package/dist/components/file-card/fileCardSidebar.js +24 -17
- package/dist/components/file-card/index.js +69 -50
- package/dist/components/file-card/index.module.css +139 -0
- package/dist/components/file-preview/index.js +39 -34
- package/dist/components/file-preview/index.module.css +83 -0
- 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 +21 -14
- package/dist/components/gimi-sidebar/index.module.css +118 -0
- package/dist/components/header/index.js +19 -12
- package/dist/components/header/index.module.css +19 -0
- package/dist/components/iconfont-com/index.js +2 -1
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +29 -23
- package/dist/components/knowledge-trace/classList.js +38 -29
- package/dist/components/knowledge-trace/documentList.js +37 -28
- package/dist/components/knowledge-trace/index.js +29 -22
- package/dist/components/knowledge-trace/index.module.css +254 -0
- package/dist/components/knowledge-trace/videoList.js +47 -37
- 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 +86 -76
- package/dist/components/message-list/index.module.css +261 -0
- package/dist/components/no-microphone-root/index.js +40 -30
- package/dist/components/no-microphone-root/index.module.css +48 -0
- package/dist/components/preset-agent-content/index.js +21 -16
- package/dist/components/preset-agent-content/index.module.css +46 -0
- package/dist/components/quoted-content/index.module.css +80 -0
- package/dist/components/reasoning-content/index.js +56 -43
- package/dist/components/reasoning-content/index.module.css +169 -0
- package/dist/components/reference-content/index.js +73 -64
- package/dist/components/reference-content/index.module.css +84 -0
- package/dist/components/templates/CommonChat.js +79 -65
- package/dist/components/templates/GimiChatComponent.js +13 -6
- package/dist/components/templates/demo/demo.js +104 -103
- package/dist/components/templates/index.module.css +109 -0
- package/dist/components/upload-list/index.js +57 -42
- package/dist/components/upload-list/index.module.css +119 -0
- package/dist/components/voice-bars/index.js +22 -19
- package/dist/components/voice-check-dialog/index.js +25 -18
- package/dist/components/voice-check-dialog/{index.module.scss → index.module.css} +2 -2
- package/dist/components/voice-recording/index.js +58 -43
- package/dist/components/voice-recording/index.module.css +41 -0
- package/dist/components/work-flow-content/demo.js +2 -1
- package/dist/components/work-flow-content/index.js +13 -10
- package/dist/components/work-flow-content/index.module.css +24 -0
- package/package.json +7 -6
- package/dist/components/ai-chat-dialogue/index.module.scss +0 -272
- package/dist/components/ai-loading/index.module.scss +0 -11
- package/dist/components/answer-item/index.module.scss +0 -295
- package/dist/components/ask-card/index.module.scss +0 -125
- package/dist/components/chat-input/index.module.scss +0 -44
- package/dist/components/dots-loading/index.module.scss +0 -45
- package/dist/components/empty/index.module.scss +0 -27
- package/dist/components/excel-components/index.module.scss +0 -210
- package/dist/components/excel-components/styles.module.scss +0 -186
- package/dist/components/file-card/index.module.scss +0 -139
- package/dist/components/file-preview/index.module.scss +0 -120
- package/dist/components/gimi-sidebar/index.module.scss +0 -136
- package/dist/components/header/index.module.scss +0 -26
- package/dist/components/knowledge-trace/index.module.scss +0 -262
- package/dist/components/message-list/index.module.scss +0 -304
- package/dist/components/no-microphone-root/index.module.scss +0 -42
- package/dist/components/preset-agent-content/index.module.scss +0 -48
- package/dist/components/quoted-content/index.module.scss +0 -76
- package/dist/components/reasoning-content/index.module.scss +0 -164
- package/dist/components/reference-content/index.module.scss +0 -73
- package/dist/components/templates/index.module.scss +0 -119
- package/dist/components/upload-list/index.module.scss +0 -119
- package/dist/components/voice-recording/index.module.scss +0 -41
- package/dist/components/work-flow-content/index.module.scss +0 -23
|
@@ -4,14 +4,16 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
import styles from "./index.module.
|
|
7
|
+
import styles from "./index.module.css";
|
|
8
8
|
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;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import styles from "./index.module.
|
|
1
|
+
import styles from "./index.module.css";
|
|
2
2
|
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;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import styles from "./index.module.
|
|
2
|
+
import styles from "./index.module.css";
|
|
3
3
|
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;
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import styles from "./index.module.
|
|
8
|
+
import styles from "./index.module.css";
|
|
9
9
|
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
10
10
|
import { setShowKonwledgeTrace, setKonwledgeTraceState } from "../../store/slices/gimiMenuSlice";
|
|
11
11
|
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
@@ -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;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.wisdom_layout {
|
|
3
|
+
position: absolute;
|
|
4
|
+
right: 0;
|
|
5
|
+
z-index: 3;
|
|
6
|
+
height: calc(100vh - 70px) !important;
|
|
7
|
+
box-shadow: -1px 0 10px 0 rgb(233, 235, 242);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tabs .tab_content {
|
|
11
|
+
/**重写tab样式 start*/
|
|
12
|
+
}
|
|
13
|
+
.tabs .tab_content :global(.ant-tabs-nav::before) {
|
|
14
|
+
border-bottom: none !important;
|
|
15
|
+
}
|
|
16
|
+
.tabs .tab_content :global(.ant-tabs-ink-bar) {
|
|
17
|
+
display: none !important;
|
|
18
|
+
}
|
|
19
|
+
.tabs .tab_content :global(.ant-tabs-tab) {
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 5px 10px;
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
}
|
|
24
|
+
.tabs .tab_content :global(.ant-tabs-tab-active) {
|
|
25
|
+
background-color: #F1F7FF;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
}
|
|
28
|
+
.tabs .tab_content :global(.ant-tabs-nav) {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
.tabs .tab_content :global(.ant-tabs-content-holder) {
|
|
32
|
+
flex: 1;
|
|
33
|
+
display: flex;
|
|
34
|
+
}
|
|
35
|
+
.tabs .tab_content :global(.ant-tabs-content) {
|
|
36
|
+
flex: 1;
|
|
37
|
+
display: flex;
|
|
38
|
+
}
|
|
39
|
+
.tabs .tab_content :global(.ant-tabs-tabpane) {
|
|
40
|
+
margin-top: 10px;
|
|
41
|
+
flex: 1;
|
|
42
|
+
width: 100%;
|
|
43
|
+
overflow-y: auto;
|
|
44
|
+
overflow-x: hidden;
|
|
45
|
+
}
|
|
46
|
+
.tabs .tab_content {
|
|
47
|
+
/**重写tab样式 end*/
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.closed {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.knowledgeList {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 10px;
|
|
58
|
+
padding-bottom: 10px;
|
|
59
|
+
}
|
|
60
|
+
.knowledgeList .total {
|
|
61
|
+
font-family: "PingFang SC";
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
line-height: 150%;
|
|
65
|
+
letter-spacing: 0px;
|
|
66
|
+
color: #4c5a70;
|
|
67
|
+
}
|
|
68
|
+
.knowledgeList .resource_deactive {
|
|
69
|
+
cursor: not-allowed !important;
|
|
70
|
+
}
|
|
71
|
+
.knowledgeList .resource_deactive::after {
|
|
72
|
+
content: "";
|
|
73
|
+
position: absolute;
|
|
74
|
+
inset: 0;
|
|
75
|
+
background: rgba(255, 255, 255, 0.5);
|
|
76
|
+
border-radius: 12px;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
z-index: 2;
|
|
79
|
+
}
|
|
80
|
+
.knowledgeList .knowledge {
|
|
81
|
+
background-color: #f7f8fa;
|
|
82
|
+
border-radius: 12px;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: 10px;
|
|
86
|
+
padding: 10px;
|
|
87
|
+
position: relative;
|
|
88
|
+
}
|
|
89
|
+
.knowledgeList .knowledge:hover {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
.knowledgeList .knowledge .img {
|
|
93
|
+
height: 36px;
|
|
94
|
+
width: 36px;
|
|
95
|
+
}
|
|
96
|
+
.knowledgeList .knowledge .class_img {
|
|
97
|
+
width: 90px;
|
|
98
|
+
height: 50px;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
}
|
|
101
|
+
.knowledgeList .knowledge .class_img_play {
|
|
102
|
+
position: absolute;
|
|
103
|
+
left: 24px;
|
|
104
|
+
top: 3px;
|
|
105
|
+
width: 45px;
|
|
106
|
+
height: 45px;
|
|
107
|
+
}
|
|
108
|
+
.knowledgeList .knowledge .knowledge_trace_deactive {
|
|
109
|
+
position: relative;
|
|
110
|
+
font-family: "PingFang SC";
|
|
111
|
+
font-weight: 500;
|
|
112
|
+
font-size: 12px;
|
|
113
|
+
color: rgb(76, 90, 112);
|
|
114
|
+
z-index: 3;
|
|
115
|
+
}
|
|
116
|
+
.knowledgeList .knowledge .description {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 5px;
|
|
120
|
+
}
|
|
121
|
+
.knowledgeList .knowledge .description .text {
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
display: -webkit-box;
|
|
124
|
+
-webkit-line-clamp: 2;
|
|
125
|
+
-webkit-box-orient: vertical;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
width: 200px;
|
|
128
|
+
font-family: "PingFang SC";
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
line-height: 150%;
|
|
132
|
+
letter-spacing: 0px;
|
|
133
|
+
color: #2e394c;
|
|
134
|
+
}
|
|
135
|
+
.knowledgeList .knowledge .description .timeTrace {
|
|
136
|
+
text-overflow: ellipsis;
|
|
137
|
+
display: -webkit-box;
|
|
138
|
+
-webkit-line-clamp: 2;
|
|
139
|
+
-webkit-box-orient: vertical;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
color: #717f94;
|
|
142
|
+
width: 200px;
|
|
143
|
+
font-family: "PingFang SC";
|
|
144
|
+
font-weight: 400;
|
|
145
|
+
font-style: Regular;
|
|
146
|
+
font-size: 12px;
|
|
147
|
+
line-height: 150%;
|
|
148
|
+
letter-spacing: 0px;
|
|
149
|
+
}
|
|
150
|
+
.knowledgeList .knowledge .class_description {
|
|
151
|
+
position: relative;
|
|
152
|
+
}
|
|
153
|
+
.knowledgeList .knowledge .class_description .tag_badge_green {
|
|
154
|
+
font-family: "PingFang SC";
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
font-size: 10px;
|
|
157
|
+
line-height: 18px;
|
|
158
|
+
letter-spacing: 0px;
|
|
159
|
+
text-align: center;
|
|
160
|
+
width: 48px;
|
|
161
|
+
height: 18px;
|
|
162
|
+
border-radius: 4px;
|
|
163
|
+
float: left;
|
|
164
|
+
margin-right: 5px;
|
|
165
|
+
background-color: #ccffe5;
|
|
166
|
+
color: #3d996b;
|
|
167
|
+
}
|
|
168
|
+
.knowledgeList .knowledge .class_description .tag_badge_warning {
|
|
169
|
+
font-family: "PingFang SC";
|
|
170
|
+
font-weight: 600;
|
|
171
|
+
font-size: 10px;
|
|
172
|
+
line-height: 18px;
|
|
173
|
+
letter-spacing: 0px;
|
|
174
|
+
text-align: center;
|
|
175
|
+
width: 48px;
|
|
176
|
+
height: 18px;
|
|
177
|
+
border-radius: 4px;
|
|
178
|
+
float: left;
|
|
179
|
+
margin-right: 5px;
|
|
180
|
+
background-color: #ffecd9;
|
|
181
|
+
color: #e58845;
|
|
182
|
+
}
|
|
183
|
+
.knowledgeList .knowledge .class_description .tag_badge_default {
|
|
184
|
+
font-family: "PingFang SC";
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
font-size: 10px;
|
|
187
|
+
line-height: 18px;
|
|
188
|
+
letter-spacing: 0px;
|
|
189
|
+
text-align: center;
|
|
190
|
+
width: 48px;
|
|
191
|
+
height: 18px;
|
|
192
|
+
border-radius: 4px;
|
|
193
|
+
float: left;
|
|
194
|
+
margin-right: 5px;
|
|
195
|
+
background-color: #7d91b3;
|
|
196
|
+
color: #ffffff;
|
|
197
|
+
}
|
|
198
|
+
.knowledgeList .knowledge .class_description .text {
|
|
199
|
+
text-overflow: ellipsis;
|
|
200
|
+
display: -webkit-box;
|
|
201
|
+
-webkit-line-clamp: 2;
|
|
202
|
+
-webkit-box-orient: vertical;
|
|
203
|
+
overflow: hidden;
|
|
204
|
+
width: 150px;
|
|
205
|
+
max-height: 63px;
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
font-family: "PingFang SC";
|
|
208
|
+
font-weight: 500;
|
|
209
|
+
font-size: 14px;
|
|
210
|
+
line-height: 150%;
|
|
211
|
+
letter-spacing: 0px;
|
|
212
|
+
color: #2e394c;
|
|
213
|
+
}
|
|
214
|
+
.knowledgeList .knowledge .class_description .timeTrace {
|
|
215
|
+
text-overflow: ellipsis;
|
|
216
|
+
display: -webkit-box;
|
|
217
|
+
-webkit-line-clamp: 2;
|
|
218
|
+
-webkit-box-orient: vertical;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
color: #717f94;
|
|
221
|
+
width: 150px;
|
|
222
|
+
font-family: "PingFang SC";
|
|
223
|
+
font-weight: 400;
|
|
224
|
+
font-size: 12px;
|
|
225
|
+
line-height: 150%;
|
|
226
|
+
letter-spacing: 0px;
|
|
227
|
+
}
|
|
228
|
+
.knowledgeList .active {
|
|
229
|
+
border: 1px solid #0073e6;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.icon_btn {
|
|
233
|
+
width: fit-content;
|
|
234
|
+
height: 22px;
|
|
235
|
+
font-size: 12px;
|
|
236
|
+
padding: 0px 5px;
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
justify-content: center;
|
|
240
|
+
border-radius: 4px;
|
|
241
|
+
gap: 5px;
|
|
242
|
+
border: 0;
|
|
243
|
+
background-color: #f1f7ff;
|
|
244
|
+
}
|
|
245
|
+
.icon_btn:hover {
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
background-color: #FFFFFF;
|
|
248
|
+
color: #4086FF;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.icon_btn_active {
|
|
252
|
+
background-color: #4086ff;
|
|
253
|
+
color: #ffffff;
|
|
254
|
+
}
|