@myun/gimi-chat 0.0.3 → 0.0.5
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/apis/fetch.d.ts +64 -0
- package/dist/apis/fetch.js +512 -0
- package/dist/apis/useApi.d.ts +57 -0
- package/dist/apis/useApi.js +378 -0
- package/dist/assets/image/Subtract.png +0 -0
- package/dist/assets/image/ai-logo.png +0 -0
- package/dist/assets/image/copyIcon.png +0 -0
- package/dist/assets/image/deepthinkActive.png +0 -0
- package/dist/assets/image/empty-img-dark.png +0 -0
- package/dist/assets/image/empty-img.png +0 -0
- package/dist/assets/image/like_active.png +0 -0
- package/dist/assets/image/love.png +0 -0
- package/dist/assets/image/retry.png +0 -0
- package/dist/assets/image/soundOut.png +0 -0
- package/dist/assets/image/unlike_active.png +0 -0
- package/dist/assets/image/unlove.png +0 -0
- package/dist/assets/lottie/ai-bg.json +1704 -0
- package/dist/assets/lottie/ai-loading.json +192 -0
- package/dist/assets/lottie/ai-output-loading.json +272 -0
- package/dist/assets/lottie/ai-output-normal.json +17694 -0
- package/dist/assets/lottie/ai-output-strengthen.json +17321 -0
- package/dist/assets/lottie/ai-voice-play.json +1 -0
- package/dist/assets/lottie/living.json +705 -0
- package/dist/assets/lottie/myun-living.json +726 -0
- package/dist/assets/lottie/myun-loading.json +530 -0
- package/dist/components/ai-chat-dialogue/index.d.ts +16 -0
- package/dist/components/ai-chat-dialogue/index.js +1056 -0
- package/dist/components/ai-chat-dialogue/index.module.css +230 -0
- package/dist/components/ai-chat-dialogue/message-parser.d.ts +36 -0
- package/dist/components/ai-chat-dialogue/message-parser.js +52 -0
- package/dist/components/ai-chat-dialogue/tlv.d.ts +7 -0
- package/dist/components/ai-chat-dialogue/tlv.js +32 -0
- package/dist/components/ai-chat-dialogue/volc-voice-call-client.d.ts +47 -0
- package/dist/components/ai-chat-dialogue/volc-voice-call-client.js +246 -0
- package/dist/components/ai-correction/index.d.ts +5 -0
- package/dist/components/ai-correction/index.js +45 -0
- package/dist/components/ai-loading/index.d.ts +3 -0
- package/dist/components/ai-loading/index.js +14 -0
- package/dist/components/ai-loading/index.module.css +11 -0
- package/dist/components/answer-item/index.d.ts +27 -0
- package/dist/components/answer-item/index.js +194 -0
- package/dist/components/answer-item/index.module.css +266 -0
- package/dist/components/ask-card/index.d.ts +10 -0
- package/dist/components/ask-card/index.js +76 -0
- package/dist/components/ask-card/index.module.css +122 -0
- package/dist/components/chat-input/index.d.ts +31 -0
- package/dist/components/chat-input/index.js +433 -0
- package/dist/components/chat-input/index.module.css +42 -0
- package/dist/components/chat-voice/VoiceCommunication.d.ts +7 -0
- package/dist/components/chat-voice/VoiceCommunication.js +69 -0
- package/dist/components/chat-voice/VoiceRecord.d.ts +7 -0
- package/dist/components/chat-voice/VoiceRecord.js +34 -0
- package/dist/components/conversation-delete/index.d.ts +5 -0
- package/dist/components/conversation-delete/index.js +24 -0
- package/dist/components/dots-loading/index.d.ts +2 -0
- package/dist/components/dots-loading/index.js +11 -0
- package/dist/components/dots-loading/index.module.css +41 -0
- package/dist/components/empty/index.d.ts +9 -0
- package/dist/components/empty/index.js +32 -0
- package/dist/components/empty/index.module.css +24 -0
- package/dist/components/excel-components/ExcelCard.d.ts +11 -0
- package/dist/components/excel-components/ExcelCard.js +35 -0
- package/dist/components/excel-components/ExcelExcuting.d.ts +10 -0
- package/dist/components/excel-components/ExcelExcuting.js +263 -0
- package/dist/components/excel-components/ExcelFailCard.d.ts +9 -0
- package/dist/components/excel-components/ExcelFailCard.js +20 -0
- package/dist/components/excel-components/ExcelSuccessCard.d.ts +5 -0
- package/dist/components/excel-components/ExcelSuccessCard.js +50 -0
- 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.d.ts +8 -0
- package/dist/components/file-card/fileCardSidebar.js +56 -0
- package/dist/components/file-card/index.d.ts +15 -0
- package/dist/components/file-card/index.js +97 -0
- package/dist/components/file-card/index.module.css +139 -0
- package/dist/components/file-preview/index.d.ts +3 -0
- package/dist/components/file-preview/index.js +227 -0
- package/dist/components/file-preview/index.module.css +83 -0
- package/dist/components/file-upload/index.d.ts +16 -0
- package/dist/components/file-upload/index.js +238 -0
- package/dist/components/file-upload/uploadV1.d.ts +16 -0
- package/dist/components/file-upload/uploadV1.js +267 -0
- package/dist/components/gimi-sidebar/index.d.ts +17 -0
- package/dist/components/gimi-sidebar/index.js +41 -0
- package/dist/components/gimi-sidebar/index.module.css +118 -0
- package/dist/components/header/index.d.ts +5 -0
- package/dist/components/header/index.js +20 -0
- package/dist/components/header/index.module.css +19 -0
- package/dist/components/iconfont-com/index.d.ts +11 -0
- package/dist/components/iconfont-com/index.js +29 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/knowledge-trace/KnowledgeIconComponent.d.ts +7 -0
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +101 -0
- package/dist/components/knowledge-trace/classList.d.ts +6 -0
- package/dist/components/knowledge-trace/classList.js +72 -0
- package/dist/components/knowledge-trace/documentList.d.ts +6 -0
- package/dist/components/knowledge-trace/documentList.js +75 -0
- package/dist/components/knowledge-trace/index.d.ts +18 -0
- package/dist/components/knowledge-trace/index.js +155 -0
- package/dist/components/knowledge-trace/index.module.css +254 -0
- package/dist/components/knowledge-trace/interfaces.d.ts +166 -0
- package/dist/components/knowledge-trace/interfaces.js +1 -0
- package/dist/components/knowledge-trace/videoList.d.ts +6 -0
- package/dist/components/knowledge-trace/videoList.js +91 -0
- package/dist/components/lottie-img/index.d.ts +8 -0
- package/dist/components/lottie-img/index.js +99 -0
- package/dist/components/message-actions/CopyButton.d.ts +7 -0
- package/dist/components/message-actions/CopyButton.js +33 -0
- package/dist/components/message-actions/LikeButton.d.ts +7 -0
- package/dist/components/message-actions/LikeButton.js +34 -0
- package/dist/components/message-actions/RegenerateButton.d.ts +5 -0
- package/dist/components/message-actions/RegenerateButton.js +27 -0
- package/dist/components/message-actions/UnLikeButton.d.ts +7 -0
- package/dist/components/message-actions/UnLikeButton.js +34 -0
- package/dist/components/message-actions/VoicePlay.d.ts +10 -0
- package/dist/components/message-actions/VoicePlay.js +74 -0
- package/dist/components/message-list/index.d.ts +19 -0
- package/dist/components/message-list/index.js +164 -0
- package/dist/components/message-list/index.module.css +261 -0
- package/dist/components/no-microphone-root/index.d.ts +6 -0
- package/dist/components/no-microphone-root/index.js +36 -0
- package/dist/components/no-microphone-root/index.module.css +48 -0
- package/dist/components/preset-agent-content/index.d.ts +8 -0
- package/dist/components/preset-agent-content/index.js +24 -0
- package/dist/components/preset-agent-content/index.module.css +46 -0
- package/dist/components/quoted-content/index.d.ts +0 -0
- package/dist/components/quoted-content/index.js +171 -0
- package/dist/components/quoted-content/index.module.css +80 -0
- package/dist/components/reasoning-content/index.d.ts +6 -0
- package/dist/components/reasoning-content/index.js +116 -0
- package/dist/components/reasoning-content/index.module.css +169 -0
- package/dist/components/reference-content/index.d.ts +28 -0
- package/dist/components/reference-content/index.js +125 -0
- package/dist/components/reference-content/index.module.css +84 -0
- package/dist/components/templates/CommonChat.d.ts +5 -0
- package/dist/components/templates/CommonChat.js +218 -0
- package/dist/components/templates/GimiChatComponent.d.ts +4 -0
- package/dist/components/templates/GimiChatComponent.js +23 -0
- package/dist/components/templates/demo/demo.d.ts +2 -0
- package/dist/components/templates/demo/demo.js +109 -0
- package/dist/components/templates/index.module.css +109 -0
- package/dist/components/upload-list/index.d.ts +15 -0
- package/dist/components/upload-list/index.js +90 -0
- package/dist/components/upload-list/index.module.css +119 -0
- package/dist/components/voice-bars/index.d.ts +4 -0
- package/dist/components/voice-bars/index.js +174 -0
- package/dist/components/voice-check-dialog/index.d.ts +8 -0
- package/dist/components/voice-check-dialog/index.js +163 -0
- package/dist/components/voice-check-dialog/index.module.css +9 -0
- package/dist/components/voice-recording/index.d.ts +9 -0
- package/dist/components/voice-recording/index.js +54 -0
- package/dist/components/voice-recording/index.module.css +41 -0
- package/dist/components/work-flow-content/demo.d.ts +3 -0
- package/dist/components/work-flow-content/demo.js +11 -0
- package/dist/components/work-flow-content/index.d.ts +6 -0
- package/dist/components/work-flow-content/index.js +55 -0
- package/dist/components/work-flow-content/index.module.css +24 -0
- package/dist/constants.d.ts +24 -0
- package/dist/constants.js +24 -0
- package/dist/hooks/useChatActions.d.ts +12 -0
- package/dist/hooks/useChatActions.js +207 -0
- package/dist/hooks/useChatHistory.d.ts +8 -0
- package/dist/hooks/useChatHistory.js +225 -0
- package/dist/hooks/useChatMessage.d.ts +49 -0
- package/dist/hooks/useChatMessage.js +87 -0
- package/dist/hooks/useChatRecommend.d.ts +8 -0
- package/dist/hooks/useChatRecommend.js +126 -0
- package/dist/hooks/useChatStream.d.ts +20 -0
- package/dist/hooks/useChatStream.js +244 -0
- package/dist/hooks/useChatUI.d.ts +32 -0
- package/dist/hooks/useChatUI.js +134 -0
- package/dist/hooks/useChatVoice.d.ts +11 -0
- package/dist/hooks/useChatVoice.js +379 -0
- package/dist/hooks/useCommonChatAPI.d.ts +27 -0
- package/dist/hooks/useCommonChatAPI.js +1276 -0
- package/dist/hooks/useFile.d.ts +13 -0
- package/dist/hooks/useFile.js +288 -0
- package/dist/hooks/useKnowledgeService.d.ts +17 -0
- package/dist/hooks/useKnowledgeService.js +210 -0
- package/dist/hooks/useLastEventId.d.ts +8 -0
- package/dist/hooks/useLastEventId.js +66 -0
- package/dist/hooks/useLongPoll.d.ts +3 -0
- package/dist/hooks/useLongPoll.js +111 -0
- package/dist/hooks/useScroll.d.ts +4 -0
- package/dist/hooks/useScroll.js +172 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interfaces/chatMessage.d.ts +139 -0
- package/dist/interfaces/fileInterface.d.ts +10 -0
- package/dist/interfaces/fileInterface.js +11 -0
- package/dist/interfaces/knowledgeTrace.d.ts +177 -0
- package/dist/store/hooks.d.ts +4 -0
- package/dist/store/hooks.js +3 -0
- package/dist/store/index.d.ts +7 -0
- package/dist/store/index.js +7 -0
- package/dist/store/slices/gimiMenuSlice.d.ts +95 -0
- package/dist/store/slices/gimiMenuSlice.js +251 -0
- package/dist/utils/chatInputUtil.d.ts +19 -0
- package/dist/utils/chatInputUtil.js +45 -0
- package/dist/utils/tools.d.ts +50 -0
- package/dist/utils/tools.js +474 -0
- package/dist/utils/voice-stream.d.ts +119 -0
- package/dist/utils/voice-stream.js +1162 -0
- package/package.json +5 -6
- package/LICENSE +0 -21
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 产品信息接口
|
|
3
|
+
*/
|
|
4
|
+
export interface IProduct {
|
|
5
|
+
/** 产品ID(必选) */
|
|
6
|
+
id: number;
|
|
7
|
+
/** 产品名称(必选) */
|
|
8
|
+
name: string;
|
|
9
|
+
/** 产品包别名(可选) */
|
|
10
|
+
nickName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 产品类型(必选)
|
|
13
|
+
* - single: 单个产品
|
|
14
|
+
* - resource: 资源产品包
|
|
15
|
+
* - vip: 会员产品包
|
|
16
|
+
*/
|
|
17
|
+
productType: 'single' | 'product';
|
|
18
|
+
/** 产品封面URL(可选) */
|
|
19
|
+
productUrl?: string;
|
|
20
|
+
/** 产品封面Token(可选) */
|
|
21
|
+
productToken?: string;
|
|
22
|
+
/** 产品介绍(可选) */
|
|
23
|
+
intro?: string;
|
|
24
|
+
/** 产品详细介绍(可选) */
|
|
25
|
+
details?: string;
|
|
26
|
+
/** 产品分类ID(可选) */
|
|
27
|
+
categoryId?: number;
|
|
28
|
+
/** 产品分类名称(可选) */
|
|
29
|
+
categoryName?: string;
|
|
30
|
+
/** 课程模块数(可选,注意:字段类型为String,按原始定义保留) */
|
|
31
|
+
courseNum?: string;
|
|
32
|
+
/** 教学模块数(可选,注意:字段类型为String,按原始定义保留) */
|
|
33
|
+
modelNum?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 是否发布(必选)
|
|
36
|
+
* - 1: 是
|
|
37
|
+
* - 0: 否
|
|
38
|
+
*/
|
|
39
|
+
state: 1 | 0;
|
|
40
|
+
/**
|
|
41
|
+
* 是否公开(必选,推测值为 1:是 / 0:否,与state保持一致格式)
|
|
42
|
+
*/
|
|
43
|
+
publiced: 1 | 0;
|
|
44
|
+
/** 更新时间(可选,格式建议为 ISO 8601 字符串,如:2025-11-10T10:00:00Z) */
|
|
45
|
+
updatedAt?: string;
|
|
46
|
+
/** 机构ID(可选) */
|
|
47
|
+
agencyId?: number;
|
|
48
|
+
/** 系列ID(可选) */
|
|
49
|
+
seriesId?: number;
|
|
50
|
+
/** 系列名称(可选) */
|
|
51
|
+
seriesName?: string;
|
|
52
|
+
/**
|
|
53
|
+
* 产品资源类型(可选)
|
|
54
|
+
* - course: 课程
|
|
55
|
+
* - special: 专题
|
|
56
|
+
*/
|
|
57
|
+
resourceType?: 'course' | 'special';
|
|
58
|
+
/** 授课形式(可选) */
|
|
59
|
+
teachingType?: string;
|
|
60
|
+
/** 标签(可选,若为多个标签建议改为 string[],此处按原始定义保留) */
|
|
61
|
+
label?: string;
|
|
62
|
+
/** 权益标签(可选,若为多个标签建议改为 string[],此处按原始定义保留) */
|
|
63
|
+
equityLabel?: string;
|
|
64
|
+
/** 权益类型名称列表(可选) */
|
|
65
|
+
benefitTypeNames?: string[];
|
|
66
|
+
/**
|
|
67
|
+
* 展示样式(可选)
|
|
68
|
+
* - 0: 不展示
|
|
69
|
+
* - 1: 免费畅看
|
|
70
|
+
* - 2: 计次计费单课
|
|
71
|
+
* - 3: 暂无权益
|
|
72
|
+
*/
|
|
73
|
+
showStyle?: 0 | 1 | 2 | 3;
|
|
74
|
+
/**
|
|
75
|
+
* 是否过期(可选,推测值为 1:是 / 0:否,与state保持一致格式)
|
|
76
|
+
*/
|
|
77
|
+
isExpired?: 1 | 0;
|
|
78
|
+
/**
|
|
79
|
+
* 是否被选中(可选)
|
|
80
|
+
* - 1: 是
|
|
81
|
+
* - 0: 否
|
|
82
|
+
*/
|
|
83
|
+
isChecked?: 1 | 0;
|
|
84
|
+
/** 课堂ID(必选,关联所属课堂) */
|
|
85
|
+
gradeId: number;
|
|
86
|
+
isJoinClass: number;
|
|
87
|
+
isDelete: number;
|
|
88
|
+
isActive?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 教学模块资源信息接口
|
|
92
|
+
*/
|
|
93
|
+
export interface ITeachingModuleResource {
|
|
94
|
+
/** 教学模块ID(可选,允许为null) */
|
|
95
|
+
id?: number | null;
|
|
96
|
+
/** 教学模块名称(可选,允许为null) */
|
|
97
|
+
name?: string | null;
|
|
98
|
+
/** 资源类型(必选) */
|
|
99
|
+
teachingModuleType: string;
|
|
100
|
+
/** 资源ID(必选) */
|
|
101
|
+
hostId: number;
|
|
102
|
+
/** 资源访问Token(必选) */
|
|
103
|
+
fileToken: string;
|
|
104
|
+
/** 视频类型(如mp4、avi等,必选) */
|
|
105
|
+
suffix: string;
|
|
106
|
+
/** 资源URL地址(必选) */
|
|
107
|
+
url: string;
|
|
108
|
+
/** 资源来源(必选,如:upload-用户上传、system-系统内置等) */
|
|
109
|
+
origin: string;
|
|
110
|
+
/** 资源大小(单位:字节,必选,对应后端Long类型,前端用number兼容) */
|
|
111
|
+
size: number;
|
|
112
|
+
/** 资料大小(已做单位转换,如:10MB、200KB等,必选) */
|
|
113
|
+
sizeUnit: string;
|
|
114
|
+
/** 课程模块ID(必选) */
|
|
115
|
+
courseId: number;
|
|
116
|
+
/** 阶段ID(必选,如课程的章节/阶段划分) */
|
|
117
|
+
phaseId: number;
|
|
118
|
+
/** 产品ID(必选,关联所属产品) */
|
|
119
|
+
productId: number;
|
|
120
|
+
/**
|
|
121
|
+
* 产品类型(必选)
|
|
122
|
+
* - single: 单个产品
|
|
123
|
+
* - resource: 资源产品包
|
|
124
|
+
* - vip: 会员产品包
|
|
125
|
+
*/
|
|
126
|
+
productType: 'single' | 'product';
|
|
127
|
+
/** 课堂ID(必选,关联所属课堂) */
|
|
128
|
+
gradeId: number;
|
|
129
|
+
/**是否加入班级,1:是;0:否 */
|
|
130
|
+
isJoinClass: number;
|
|
131
|
+
isDelete: number;
|
|
132
|
+
isActive?: boolean;
|
|
133
|
+
}
|
|
134
|
+
export interface IVideoResource {
|
|
135
|
+
id?: number;
|
|
136
|
+
name?: string;
|
|
137
|
+
teachingModuleType: string;
|
|
138
|
+
hostId: number;
|
|
139
|
+
duration: number;
|
|
140
|
+
fileToken: string;
|
|
141
|
+
suffix: string;
|
|
142
|
+
url: string;
|
|
143
|
+
origin: string;
|
|
144
|
+
size: number;
|
|
145
|
+
durationToHms: string;
|
|
146
|
+
durationSecond: number;
|
|
147
|
+
sizeUnit: string;
|
|
148
|
+
coverUrl: string;
|
|
149
|
+
startedAt?: string;
|
|
150
|
+
endedAt?: string;
|
|
151
|
+
startedAtSecond?: string;
|
|
152
|
+
courseId: number;
|
|
153
|
+
phaseId: number;
|
|
154
|
+
productId: number;
|
|
155
|
+
gradeId: number;
|
|
156
|
+
isJoinClass: number;
|
|
157
|
+
isDelete: number;
|
|
158
|
+
sliceId: string;
|
|
159
|
+
/**
|
|
160
|
+
* 产品类型(必选)
|
|
161
|
+
* - single: 单个产品
|
|
162
|
+
* - resource: 资源产品包
|
|
163
|
+
* - vip: 会员产品包
|
|
164
|
+
*/
|
|
165
|
+
productType: 'single' | 'product';
|
|
166
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from "./index.module.css";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { knowledgeConstants } from "../../constants";
|
|
5
|
+
import { Toast, Tooltip } from '@douyinfe/semi-ui';
|
|
6
|
+
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
7
|
+
var VideoItem = function VideoItem(_ref) {
|
|
8
|
+
var _konwledgeTraceState$;
|
|
9
|
+
var item = _ref.item;
|
|
10
|
+
var konwledgeTraceState = useAppSelector(function (state) {
|
|
11
|
+
return state.gimiMenu.konwledgeTraceState;
|
|
12
|
+
});
|
|
13
|
+
var platform = useAppSelector(function (state) {
|
|
14
|
+
return state.gimiMenu.platform;
|
|
15
|
+
});
|
|
16
|
+
var isActive = (_konwledgeTraceState$ = konwledgeTraceState.resources) === null || _konwledgeTraceState$ === void 0 || (_konwledgeTraceState$ = _konwledgeTraceState$.map(function (item) {
|
|
17
|
+
return item.id;
|
|
18
|
+
})) === null || _konwledgeTraceState$ === void 0 ? void 0 : _konwledgeTraceState$.includes("".concat(item.sliceId));
|
|
19
|
+
var _useAppSelector = useAppSelector(function (state) {
|
|
20
|
+
return state.gimiMenu.bussinessParams;
|
|
21
|
+
}),
|
|
22
|
+
gradeId = _useAppSelector.gradeId,
|
|
23
|
+
teachModuleId = _useAppSelector.teachModuleId;
|
|
24
|
+
var dispatch = useAppDispatch();
|
|
25
|
+
var handleClick = function handleClick() {
|
|
26
|
+
if (item.isDelete === 1) return;
|
|
27
|
+
if (platform !== 'myun') return Toast.warning('当前平台不支持溯源跳转');
|
|
28
|
+
var searchParams = "gradeId=".concat(item.gradeId, "&teachModuleId=").concat(item.id, "&outlineId=").concat(item.courseId, "&phaseId=").concat(item.phaseId);
|
|
29
|
+
if (item.isJoinClass) {
|
|
30
|
+
// 如果溯源就是当前视频,直接跳转到溯源的进度
|
|
31
|
+
if (gradeId === item.gradeId && teachModuleId === item.id) {
|
|
32
|
+
dispatch({
|
|
33
|
+
type: 'smartClassState/setTimeFromSider',
|
|
34
|
+
payload: {
|
|
35
|
+
timeFromSider: item.startedAtSecond
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
// 如果不是当前视频,新开一个学习页面
|
|
40
|
+
window.open("/learningPage?".concat(searchParams, "&startedAt=").concat(item.startedAtSecond));
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
if (item.productType === 'single') {
|
|
44
|
+
window.open("/new-product/".concat(item.productId, "?").concat(searchParams));
|
|
45
|
+
} else {
|
|
46
|
+
window.open("/project-product/".concat(item.productId, "?").concat(searchParams));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : isActive ? styles.active : ''),
|
|
52
|
+
onClick: handleClick
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
style: {
|
|
55
|
+
position: 'relative'
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
58
|
+
alt: "\u89C6\u9891\u5C01\u9762\u56FE\u7247",
|
|
59
|
+
className: styles.class_img,
|
|
60
|
+
src: item.coverUrl || knowledgeConstants.VIDEO_DEFAULT_COVER_ADDRESS
|
|
61
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
62
|
+
alt: "\u64AD\u653E\u6309\u94AE\u56FE\u7247",
|
|
63
|
+
className: styles.class_img_play,
|
|
64
|
+
src: knowledgeConstants.VIDEO_PLAY_ICON_ADDRESS
|
|
65
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: styles.class_description
|
|
67
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
68
|
+
placement: "topLeft",
|
|
69
|
+
content: item.name
|
|
70
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
className: styles.text
|
|
72
|
+
}, item.name)), /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: styles.timeTrace
|
|
74
|
+
}, "\u89C6\u9891\u7247\u6BB5: ".concat(item.startedAt || "0'0\"", " - ").concat(item.endedAt || "0'0\"")), item.isDelete === 1 && /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: styles.knowledge_trace_deactive
|
|
76
|
+
}, "\u89C6\u9891\u5931\u6548")));
|
|
77
|
+
};
|
|
78
|
+
var VideoList = function VideoList(_ref2) {
|
|
79
|
+
var list = _ref2.list;
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
className: styles.knowledgeList
|
|
82
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
83
|
+
className: styles.total
|
|
84
|
+
}, "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u89C6\u9891")), list.map(function (item) {
|
|
85
|
+
return /*#__PURE__*/React.createElement(VideoItem, {
|
|
86
|
+
item: item,
|
|
87
|
+
key: item.id
|
|
88
|
+
});
|
|
89
|
+
}));
|
|
90
|
+
};
|
|
91
|
+
export default VideoList;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { Lottie } from '@douyinfe/semi-ui';
|
|
8
|
+
import * as live from "../../assets/lottie/living.json";
|
|
9
|
+
import * as aiBg from "../../assets/lottie/ai-bg.json";
|
|
10
|
+
import * as aiLoading from "../../assets/lottie/ai-loading.json";
|
|
11
|
+
import * as aiOutputNormal from "../../assets/lottie/ai-output-normal.json";
|
|
12
|
+
import * as aiOutputStrengthen from "../../assets/lottie/ai-output-strengthen.json";
|
|
13
|
+
import * as aiOutputLoading from "../../assets/lottie/ai-output-loading.json";
|
|
14
|
+
import * as aiVoicePlay from "../../assets/lottie/ai-voice-play.json";
|
|
15
|
+
import React from 'react';
|
|
16
|
+
var names = [{
|
|
17
|
+
name: 'live',
|
|
18
|
+
value: live
|
|
19
|
+
}, {
|
|
20
|
+
name: 'aiBg',
|
|
21
|
+
value: aiBg
|
|
22
|
+
}, {
|
|
23
|
+
name: 'aiLoading',
|
|
24
|
+
value: aiLoading
|
|
25
|
+
}, {
|
|
26
|
+
name: 'aiOutputNormal',
|
|
27
|
+
value: aiOutputNormal
|
|
28
|
+
}, {
|
|
29
|
+
name: 'aiOutputStrengthen',
|
|
30
|
+
value: aiOutputStrengthen
|
|
31
|
+
}, {
|
|
32
|
+
name: 'aiOutputLoading',
|
|
33
|
+
value: aiOutputLoading
|
|
34
|
+
}, {
|
|
35
|
+
name: 'aiVoicePlay',
|
|
36
|
+
value: aiVoicePlay
|
|
37
|
+
}];
|
|
38
|
+
var formatSize = function formatSize(size) {
|
|
39
|
+
if (Array.isArray(size)) {
|
|
40
|
+
if (typeof size[0] === 'number') {
|
|
41
|
+
return {
|
|
42
|
+
height: "".concat(size[0], "px"),
|
|
43
|
+
width: "".concat(size[1], "px")
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
height: size[0],
|
|
48
|
+
width: size[1]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (typeof size === 'number') {
|
|
52
|
+
return {
|
|
53
|
+
height: "".concat(size, "px"),
|
|
54
|
+
width: "".concat(size, "px")
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
height: size,
|
|
59
|
+
width: size
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
var LottieImg = function LottieImg(_ref) {
|
|
63
|
+
var name = _ref.name,
|
|
64
|
+
_ref$size = _ref.size,
|
|
65
|
+
size = _ref$size === void 0 ? 12 : _ref$size,
|
|
66
|
+
_ref$style = _ref.style,
|
|
67
|
+
style = _ref$style === void 0 ? {} : _ref$style;
|
|
68
|
+
var _formatSize = formatSize(size),
|
|
69
|
+
height = _formatSize.height,
|
|
70
|
+
width = _formatSize.width;
|
|
71
|
+
var defaultOptions = {
|
|
72
|
+
loop: true,
|
|
73
|
+
autoplay: true,
|
|
74
|
+
isClickToPauseDisabled: true,
|
|
75
|
+
isPaused: false,
|
|
76
|
+
isStopped: false,
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
animationData: names.find(function (v) {
|
|
79
|
+
return v.name === name;
|
|
80
|
+
}).value.default,
|
|
81
|
+
rendererSettings: {
|
|
82
|
+
preserveAspectRatio: 'xMidYMid slice'
|
|
83
|
+
},
|
|
84
|
+
pathFillColor: '#ff0000',
|
|
85
|
+
pathStrokeColor: '#000000'
|
|
86
|
+
};
|
|
87
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
style: {
|
|
89
|
+
pointerEvents: 'none',
|
|
90
|
+
margin: '0 auto'
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/React.createElement(Lottie, {
|
|
93
|
+
params: defaultOptions,
|
|
94
|
+
width: width,
|
|
95
|
+
height: height,
|
|
96
|
+
style: _objectSpread({}, style)
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
export default LottieImg;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip } from '@douyinfe/semi-ui';
|
|
3
|
+
import { usePureChatActions } from "../../hooks/useChatActions";
|
|
4
|
+
import copyIcon from "../../assets/image/copyIcon.png";
|
|
5
|
+
var CopyButton = function CopyButton(_ref) {
|
|
6
|
+
var item = _ref.item,
|
|
7
|
+
onCopyCallback = _ref.onCopyCallback;
|
|
8
|
+
var _usePureChatActions = usePureChatActions(),
|
|
9
|
+
copyToClipboard = _usePureChatActions.copyToClipboard;
|
|
10
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
11
|
+
content: "\u590D\u5236"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
style: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
cursor: 'pointer'
|
|
18
|
+
}
|
|
19
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
20
|
+
width: 18,
|
|
21
|
+
height: 18,
|
|
22
|
+
style: {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center'
|
|
25
|
+
},
|
|
26
|
+
src: copyIcon,
|
|
27
|
+
onClick: function onClick() {
|
|
28
|
+
copyToClipboard(item);
|
|
29
|
+
onCopyCallback === null || onCopyCallback === void 0 || onCopyCallback();
|
|
30
|
+
}
|
|
31
|
+
})));
|
|
32
|
+
};
|
|
33
|
+
export default CopyButton;
|