@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.
Files changed (98) hide show
  1. package/dist/components/ai-chat-dialogue/index.js +182 -136
  2. package/dist/components/ai-chat-dialogue/index.module.css +230 -0
  3. package/dist/components/ai-correction/index.js +38 -25
  4. package/dist/components/ai-loading/index.js +13 -9
  5. package/dist/components/ai-loading/index.module.css +11 -0
  6. package/dist/components/answer-item/index.js +136 -114
  7. package/dist/components/answer-item/index.module.css +266 -0
  8. package/dist/components/ask-card/index.js +43 -34
  9. package/dist/components/ask-card/index.module.css +122 -0
  10. package/dist/components/chat-input/index.js +136 -115
  11. package/dist/components/chat-input/index.module.css +42 -0
  12. package/dist/components/chat-voice/VoiceCommunication.js +23 -21
  13. package/dist/components/chat-voice/VoiceRecord.js +24 -21
  14. package/dist/components/conversation-delete/index.js +10 -8
  15. package/dist/components/dots-loading/index.js +11 -8
  16. package/dist/components/dots-loading/index.module.css +41 -0
  17. package/dist/components/empty/index.js +13 -8
  18. package/dist/components/empty/index.module.css +24 -0
  19. package/dist/components/excel-components/ExcelCard.js +7 -3
  20. package/dist/components/excel-components/ExcelExcuting.js +61 -44
  21. package/dist/components/excel-components/ExcelFailCard.js +16 -11
  22. package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
  23. package/dist/components/excel-components/index.module.css +212 -0
  24. package/dist/components/excel-components/styles.module.css +178 -0
  25. package/dist/components/file-card/fileCardSidebar.js +24 -17
  26. package/dist/components/file-card/index.js +69 -50
  27. package/dist/components/file-card/index.module.css +139 -0
  28. package/dist/components/file-preview/index.js +39 -34
  29. package/dist/components/file-preview/index.module.css +83 -0
  30. package/dist/components/file-upload/index.js +10 -7
  31. package/dist/components/file-upload/uploadV1.js +33 -27
  32. package/dist/components/gimi-sidebar/index.js +21 -14
  33. package/dist/components/gimi-sidebar/index.module.css +118 -0
  34. package/dist/components/header/index.js +19 -12
  35. package/dist/components/header/index.module.css +19 -0
  36. package/dist/components/iconfont-com/index.js +2 -1
  37. package/dist/components/knowledge-trace/KnowledgeIconComponent.js +29 -23
  38. package/dist/components/knowledge-trace/classList.js +38 -29
  39. package/dist/components/knowledge-trace/documentList.js +37 -28
  40. package/dist/components/knowledge-trace/index.js +29 -22
  41. package/dist/components/knowledge-trace/index.module.css +254 -0
  42. package/dist/components/knowledge-trace/videoList.js +47 -37
  43. package/dist/components/lottie-img/index.js +10 -8
  44. package/dist/components/message-actions/CopyButton.js +25 -22
  45. package/dist/components/message-actions/LikeButton.js +25 -22
  46. package/dist/components/message-actions/RegenerateButton.js +21 -18
  47. package/dist/components/message-actions/UnLikeButton.js +25 -22
  48. package/dist/components/message-actions/VoicePlay.js +25 -22
  49. package/dist/components/message-list/index.js +86 -76
  50. package/dist/components/message-list/index.module.css +261 -0
  51. package/dist/components/no-microphone-root/index.js +40 -30
  52. package/dist/components/no-microphone-root/index.module.css +48 -0
  53. package/dist/components/preset-agent-content/index.js +21 -16
  54. package/dist/components/preset-agent-content/index.module.css +46 -0
  55. package/dist/components/quoted-content/index.module.css +80 -0
  56. package/dist/components/reasoning-content/index.js +56 -43
  57. package/dist/components/reasoning-content/index.module.css +169 -0
  58. package/dist/components/reference-content/index.js +73 -64
  59. package/dist/components/reference-content/index.module.css +84 -0
  60. package/dist/components/templates/CommonChat.js +79 -65
  61. package/dist/components/templates/GimiChatComponent.js +13 -6
  62. package/dist/components/templates/demo/demo.js +104 -103
  63. package/dist/components/templates/index.module.css +109 -0
  64. package/dist/components/upload-list/index.js +57 -42
  65. package/dist/components/upload-list/index.module.css +119 -0
  66. package/dist/components/voice-bars/index.js +22 -19
  67. package/dist/components/voice-check-dialog/index.js +25 -18
  68. package/dist/components/voice-check-dialog/{index.module.scss → index.module.css} +2 -2
  69. package/dist/components/voice-recording/index.js +58 -43
  70. package/dist/components/voice-recording/index.module.css +41 -0
  71. package/dist/components/work-flow-content/demo.js +2 -1
  72. package/dist/components/work-flow-content/index.js +13 -10
  73. package/dist/components/work-flow-content/index.module.css +24 -0
  74. package/package.json +7 -6
  75. package/dist/components/ai-chat-dialogue/index.module.scss +0 -272
  76. package/dist/components/ai-loading/index.module.scss +0 -11
  77. package/dist/components/answer-item/index.module.scss +0 -295
  78. package/dist/components/ask-card/index.module.scss +0 -125
  79. package/dist/components/chat-input/index.module.scss +0 -44
  80. package/dist/components/dots-loading/index.module.scss +0 -45
  81. package/dist/components/empty/index.module.scss +0 -27
  82. package/dist/components/excel-components/index.module.scss +0 -210
  83. package/dist/components/excel-components/styles.module.scss +0 -186
  84. package/dist/components/file-card/index.module.scss +0 -139
  85. package/dist/components/file-preview/index.module.scss +0 -120
  86. package/dist/components/gimi-sidebar/index.module.scss +0 -136
  87. package/dist/components/header/index.module.scss +0 -26
  88. package/dist/components/knowledge-trace/index.module.scss +0 -262
  89. package/dist/components/message-list/index.module.scss +0 -304
  90. package/dist/components/no-microphone-root/index.module.scss +0 -42
  91. package/dist/components/preset-agent-content/index.module.scss +0 -48
  92. package/dist/components/quoted-content/index.module.scss +0 -76
  93. package/dist/components/reasoning-content/index.module.scss +0 -164
  94. package/dist/components/reference-content/index.module.scss +0 -73
  95. package/dist/components/templates/index.module.scss +0 -119
  96. package/dist/components/upload-list/index.module.scss +0 -119
  97. package/dist/components/voice-recording/index.module.scss +0 -41
  98. 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.scss";
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__*/React.createElement("img", {
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__*/React.createElement("div", {
48
+ return /*#__PURE__*/_jsxs("div", {
47
49
  className: styles.icon_btn,
48
- onClick: handleIconClick
49
- }, /*#__PURE__*/React.createElement(KnowledgeIcon, {
50
- url: iconUrl
51
- }), /*#__PURE__*/React.createElement("span", null, "".concat(resources === null || resources === void 0 ? void 0 : resources.length, "\u4E2A").concat(type === 'video' ? '视频' : type === 'product' ? '课程' : '文档')));
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__*/React.createElement("div", {
87
+ return /*#__PURE__*/_jsx("div", {
83
88
  style: {
84
89
  display: 'inline-block'
85
- }
86
- }, /*#__PURE__*/React.createElement("div", {
87
- style: {
88
- display: 'flex',
89
- gap: '5px',
90
- flexWrap: 'wrap'
91
- }
92
- }, renderList.map(function (item) {
93
- return /*#__PURE__*/React.createElement(KnowledgeIconComponent, {
94
- type: item,
95
- resources: knowledgeMap.get(item) || [],
96
- key: item,
97
- messageId: value.messageId
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.scss";
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__*/React.createElement("div", {
22
- className: classes
23
- }, item.equityLabel);
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__*/React.createElement("div", {
45
+ return /*#__PURE__*/_jsxs("div", {
43
46
  className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : isActive ? styles.active : ''),
44
- onClick: handleClick
45
- }, /*#__PURE__*/React.createElement("img", {
46
- alt: "\u8BFE\u7A0B\u5C01\u9762",
47
- className: styles.class_img,
48
- src: item.productUrl
49
- }), /*#__PURE__*/React.createElement("div", {
50
- className: styles.class_description
51
- }, /*#__PURE__*/React.createElement("div", {
52
- className: styles.text
53
- }, tagContent, /*#__PURE__*/React.createElement(Tooltip, {
54
- content: item.name
55
- }, ((_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.length) > 33 ? "".concat(item.name.substring(0, 33), "...") : item.name || '')), item.isDelete === 1 && /*#__PURE__*/React.createElement("div", {
56
- className: styles.knowledge_trace_deactive
57
- }, "\u8BFE\u7A0B\u5931\u6548")));
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__*/React.createElement("div", {
62
- className: styles.knowledgeList
63
- }, /*#__PURE__*/React.createElement("span", {
64
- className: styles.total
65
- }, "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u8BFE\u7A0B")), list.map(function (item) {
66
- return /*#__PURE__*/React.createElement(ClassItem, {
67
- item: item,
68
- key: item.id
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.scss";
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__*/React.createElement("div", {
45
+ return /*#__PURE__*/_jsxs("div", {
44
46
  className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : isActive ? styles.active : ''),
45
- onClick: handleClick
46
- }, /*#__PURE__*/React.createElement("img", {
47
- alt: "\u6587\u6863\u56FE\u7247",
48
- className: styles.img,
49
- src: documentConstants[item.suffix] || documentConstants.default
50
- }), /*#__PURE__*/React.createElement("div", {
51
- className: styles.description
52
- }, /*#__PURE__*/React.createElement(Tooltip, {
53
- content: item.name
54
- }, /*#__PURE__*/React.createElement("div", {
55
- className: styles.text
56
- }, item.name)), /*#__PURE__*/React.createElement("div", {
57
- className: styles.timeTrace
58
- }, "".concat(item.suffix, " | ").concat(item.sizeUnit)), item.isDelete === 1 && /*#__PURE__*/React.createElement("div", {
59
- className: styles.knowledge_trace_deactive
60
- }, "\u6587\u6863\u5931\u6548")));
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__*/React.createElement("div", {
65
- className: styles.knowledgeList
66
- }, /*#__PURE__*/React.createElement("span", {
67
- className: styles.total
68
- }, "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u6587\u6863")), list.map(function (item) {
69
- return /*#__PURE__*/React.createElement(FileItem, {
70
- item: item,
71
- key: item.id
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.scss";
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__*/React.createElement(AiLoading, null);
108
+ if (isLoading) return /*#__PURE__*/_jsx(AiLoading, {});
107
109
  switch (activeKey) {
108
110
  case 'video':
109
- return /*#__PURE__*/React.createElement(VideoList, {
111
+ return /*#__PURE__*/_jsx(VideoList, {
110
112
  list: videoSliceList
111
113
  });
112
114
  case 'product':
113
- return /*#__PURE__*/React.createElement(ClassList, {
115
+ return /*#__PURE__*/_jsx(ClassList, {
114
116
  list: productList
115
117
  });
116
118
  case 'document':
117
- return /*#__PURE__*/React.createElement(DocumentList, {
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__*/React.createElement(GimiSideBar, {
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
- }, /*#__PURE__*/React.createElement("div", {
134
- className: styles.tabs
135
- }, (tabList === null || tabList === void 0 ? void 0 : tabList.length) > 1 ? /*#__PURE__*/React.createElement(Tabs, {
136
- type: "button",
137
- size: "small",
138
- activeKey: activeKey,
139
- onChange: handleTabChange
140
- }, tabList.map(function (tab) {
141
- return /*#__PURE__*/React.createElement(TabPane, {
142
- tab: tab.name,
143
- itemKey: tab.type,
144
- key: tab.type
145
- }, tabContent);
146
- })) : tabContent));
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__*/React.createElement(React.Fragment, null, (kowledgeTraceList === null || kowledgeTraceList === void 0 ? void 0 : kowledgeTraceList.length) > 0 ? renderContent() : null);
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
+ }