@myun/gimi-chat 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.scss +272 -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.scss +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.scss +295 -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.scss +125 -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.scss +44 -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.scss +45 -0
- package/dist/components/empty/index.d.ts +9 -0
- package/dist/components/empty/index.js +32 -0
- package/dist/components/empty/index.module.scss +27 -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.scss +210 -0
- package/dist/components/excel-components/styles.module.scss +186 -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.scss +139 -0
- package/dist/components/file-preview/index.d.ts +3 -0
- package/dist/components/file-preview/index.js +229 -0
- package/dist/components/file-preview/index.module.scss +120 -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.scss +136 -0
- package/dist/components/header/index.d.ts +5 -0
- package/dist/components/header/index.js +20 -0
- package/dist/components/header/index.module.scss +26 -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.scss +262 -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 +167 -0
- package/dist/components/message-list/index.module.scss +304 -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.scss +42 -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.scss +48 -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.scss +76 -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.scss +164 -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.scss +73 -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 +110 -0
- package/dist/components/templates/index.module.scss +119 -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.scss +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.scss +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.scss +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.scss +23 -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 +2 -3
- package/LICENSE +0 -21
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
.excelSucess {
|
|
2
|
+
width: 328px;
|
|
3
|
+
flex-shrink: 0;
|
|
4
|
+
border-radius: 12px;
|
|
5
|
+
border: 1px solid var(---, #e9ebf2);
|
|
6
|
+
background: var(---, #f2f3f7);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 12px;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
&:hover {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
.icon {
|
|
15
|
+
display: flex;
|
|
16
|
+
width: 36px;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
img {
|
|
21
|
+
width: 36px;
|
|
22
|
+
height: 36px;
|
|
23
|
+
object-fit: cover;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.left {
|
|
27
|
+
flex: 1;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
.iconName {
|
|
32
|
+
display: flex;
|
|
33
|
+
margin-bottom: 4px;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
.nameSize {
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
.type {
|
|
42
|
+
width: fit-content;
|
|
43
|
+
text-align: center;
|
|
44
|
+
color: var(---, #717f94);
|
|
45
|
+
font-family: 'PingFang SC';
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
font-style: normal;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
line-height: normal;
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
height: 17px;
|
|
52
|
+
margin-right: 12px;
|
|
53
|
+
}
|
|
54
|
+
.name {
|
|
55
|
+
flex: 1;
|
|
56
|
+
color: var(---, #2e394c);
|
|
57
|
+
font-family: 'PingFang SC';
|
|
58
|
+
font-size: 16px;
|
|
59
|
+
width: 190px;
|
|
60
|
+
font-style: normal;
|
|
61
|
+
font-weight: 400;
|
|
62
|
+
line-height: normal;
|
|
63
|
+
overflow: hidden; /* 隐藏溢出内容 */
|
|
64
|
+
white-space: nowrap; /* 强制文本不换行 */
|
|
65
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
66
|
+
margin-bottom: 6px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.typeSize {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
.type {
|
|
74
|
+
color: var(--, #56bf8c);
|
|
75
|
+
text-align: center;
|
|
76
|
+
font-family: 'PingFang SC';
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
font-style: normal;
|
|
79
|
+
font-weight: 400;
|
|
80
|
+
line-height: normal;
|
|
81
|
+
padding: 0 3px;
|
|
82
|
+
border-radius: 4px;
|
|
83
|
+
border: 1px solid var(--, #56bf8c);
|
|
84
|
+
height: 17px;
|
|
85
|
+
margin-right: 12px;
|
|
86
|
+
}
|
|
87
|
+
.size {
|
|
88
|
+
color: var(---, #717f94);
|
|
89
|
+
font-family: 'PingFang SC';
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-style: normal;
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
line-height: normal;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
.right {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
width: fit-content;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
.text {
|
|
104
|
+
color: var(--, #4086ff);
|
|
105
|
+
text-align: right;
|
|
106
|
+
font-family: 'PingFang SC';
|
|
107
|
+
font-size: 16px;
|
|
108
|
+
font-style: normal;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
line-height: normal;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
.failText {
|
|
115
|
+
color: #2e394c;
|
|
116
|
+
font-family: 'PingFang SC';
|
|
117
|
+
font-size: 16px;
|
|
118
|
+
font-style: normal;
|
|
119
|
+
font-weight: 400;
|
|
120
|
+
line-height: 28px; /* 175% */
|
|
121
|
+
margin-bottom: 12px;
|
|
122
|
+
white-space: pre-line;
|
|
123
|
+
max-width: clamp(360px, 50%, 600px);
|
|
124
|
+
}
|
|
125
|
+
.excelFail {
|
|
126
|
+
.failText {
|
|
127
|
+
color: #2e394c;
|
|
128
|
+
font-family: 'PingFang SC';
|
|
129
|
+
font-size: 16px;
|
|
130
|
+
font-style: normal;
|
|
131
|
+
font-weight: 400;
|
|
132
|
+
line-height: 28px; /* 175% */
|
|
133
|
+
margin-bottom: 12px;
|
|
134
|
+
white-space: pre-line;
|
|
135
|
+
}
|
|
136
|
+
.Retry {
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: center;
|
|
141
|
+
width: 96px;
|
|
142
|
+
height: 44px;
|
|
143
|
+
flex-shrink: 0;
|
|
144
|
+
border-radius: 22px;
|
|
145
|
+
border: 1px solid var(---, #d9dce5);
|
|
146
|
+
background: #fff;
|
|
147
|
+
color: #000;
|
|
148
|
+
font-family: 'PingFang SC';
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
font-style: normal;
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
line-height: normal;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.disablebox {
|
|
156
|
+
border-radius: 22px;
|
|
157
|
+
border: 1px solid var(---, #d9dce5);
|
|
158
|
+
background: #fff;
|
|
159
|
+
color: #ced3d9;
|
|
160
|
+
font-family: 'PingFang SC';
|
|
161
|
+
font-size: 14px;
|
|
162
|
+
font-style: normal;
|
|
163
|
+
font-weight: 600;
|
|
164
|
+
line-height: normal;
|
|
165
|
+
cursor: not-allowed;
|
|
166
|
+
pointer-events: none;
|
|
167
|
+
}
|
|
168
|
+
.selectbox {
|
|
169
|
+
border-radius: 22px;
|
|
170
|
+
background: var(---, #2e394c);
|
|
171
|
+
color: #fff;
|
|
172
|
+
font-family: 'PingFang SC';
|
|
173
|
+
font-size: 14px;
|
|
174
|
+
font-style: normal;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
line-height: normal;
|
|
177
|
+
cursor: not-allowed;
|
|
178
|
+
pointer-events: none;
|
|
179
|
+
}
|
|
180
|
+
.Retry:hover {
|
|
181
|
+
border-radius: 22px;
|
|
182
|
+
border: 1px solid var(---, #d9dce5);
|
|
183
|
+
background: #f7f7f7;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
.excelRunning {
|
|
187
|
+
width: clamp(360px, 45vw, 680px);
|
|
188
|
+
margin-top: 12px;
|
|
189
|
+
.running {
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
img {
|
|
193
|
+
width: 16px;
|
|
194
|
+
height: 16px;
|
|
195
|
+
object-fit: cover;
|
|
196
|
+
}
|
|
197
|
+
.runningText {
|
|
198
|
+
color: #000;
|
|
199
|
+
font-family: 'PingFang SC';
|
|
200
|
+
font-size: 16px;
|
|
201
|
+
font-style: normal;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
line-height: 28px; /* 175% */
|
|
204
|
+
margin-left: 10px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
.progress{
|
|
209
|
+
margin: 0 8px;
|
|
210
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
.container{
|
|
2
|
+
height: 300px;
|
|
3
|
+
}
|
|
4
|
+
.aiLoadingSteps {
|
|
5
|
+
background: linear-gradient(180deg, #F9FEFE 0%, #FFFFFF 100%);
|
|
6
|
+
border-radius: 16px;
|
|
7
|
+
padding: 16px;
|
|
8
|
+
width: clamp(380px, 100%, 680px);
|
|
9
|
+
border: 1px solid rgba(233, 235, 242, 1);
|
|
10
|
+
box-shadow: 0px 2px 2px 0px rgba(255, 255, 255, 1) inset;
|
|
11
|
+
transition: all 0.5s ease-in-out;
|
|
12
|
+
min-height: 60px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.header {
|
|
16
|
+
margin-bottom: 10px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.title {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: rgba(46, 57, 76, 1);
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 8px;
|
|
25
|
+
font-family: PingFang SC;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
font-style: Semibold;
|
|
28
|
+
letter-spacing: 0px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.titleIcon {
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
color: #1890ff;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.description {
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
color: rgba(113, 127, 148, 1);
|
|
39
|
+
margin: 0;
|
|
40
|
+
font-family: PingFang SC;
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
font-style: Regular;
|
|
43
|
+
font-size: 14px;
|
|
44
|
+
line-height: 180%;
|
|
45
|
+
letter-spacing: 0px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.stepsContainer {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 0;
|
|
52
|
+
margin-left: 4px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.stepItem {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: baseline;
|
|
58
|
+
gap: 12px;
|
|
59
|
+
position: relative;
|
|
60
|
+
min-height: 32px;
|
|
61
|
+
transition: all 300ms ease;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.stepActiveItem {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: flex-start;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
position: relative;
|
|
69
|
+
min-height: 32px;
|
|
70
|
+
transition: all 300ms ease;
|
|
71
|
+
margin-left: -4px;
|
|
72
|
+
margin-top: 5px;
|
|
73
|
+
margin-bottom: 16px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.stepIndicator {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
align-items: center;
|
|
80
|
+
position: relative;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes rotate360 {
|
|
84
|
+
0% {
|
|
85
|
+
transform: rotate(0deg);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
100% {
|
|
89
|
+
transform: rotate(360deg);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.checkIcon {
|
|
94
|
+
font-size: 14px;
|
|
95
|
+
color: rgba(62, 179, 86, 1) !important;
|
|
96
|
+
background: white;
|
|
97
|
+
position: relative;
|
|
98
|
+
z-index: 2;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.pendingIcon {
|
|
102
|
+
width: 22px;
|
|
103
|
+
height: 22px;
|
|
104
|
+
animation: rotate360 1s linear infinite;
|
|
105
|
+
position: relative;
|
|
106
|
+
z-index: 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.verticalLine {
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: 22px;
|
|
112
|
+
left: 50%;
|
|
113
|
+
transform: translateX(-50%);
|
|
114
|
+
width: 2px;
|
|
115
|
+
height: 8px;
|
|
116
|
+
border-radius: 4px;
|
|
117
|
+
background: rgba(217, 220, 229, 1);
|
|
118
|
+
z-index: 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.stepItem.completed {
|
|
122
|
+
.verticalLine {
|
|
123
|
+
background: #52c41a;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.stepContent {
|
|
128
|
+
flex: 1;
|
|
129
|
+
padding: 0 0 12px 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.stepText {
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
color: rgba(46, 57, 76, 1);
|
|
135
|
+
font-family: PingFang SC;
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
font-style: Regular;
|
|
138
|
+
font-size: 16px;
|
|
139
|
+
line-height: 18px;
|
|
140
|
+
letter-spacing: 0px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.finishText {
|
|
144
|
+
font-family: PingFang SC;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
font-style: Semibold;
|
|
147
|
+
font-size: 16px;
|
|
148
|
+
line-height: 180%;
|
|
149
|
+
letter-spacing: 0px;
|
|
150
|
+
color: rgba(46, 57, 76, 1);
|
|
151
|
+
transition: opacity 0.3s ease-in-out;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.stepItem.completed {
|
|
155
|
+
.stepText {
|
|
156
|
+
color: #8c8c8c;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.stepActiveItem.active {
|
|
161
|
+
.stepText {
|
|
162
|
+
color: #262626;
|
|
163
|
+
font-weight: 500;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.verticalLine {
|
|
167
|
+
height: 24px;
|
|
168
|
+
top: 26px;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.contentWrapper {
|
|
173
|
+
transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out;
|
|
174
|
+
padding: 2px 0;
|
|
175
|
+
overflow: hidden;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.contentWrapper.collapsing {
|
|
179
|
+
max-height: 0;
|
|
180
|
+
opacity: 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.contentWrapper.expanded {
|
|
184
|
+
max-height: 300px;
|
|
185
|
+
opacity: 1;
|
|
186
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import GimiSideBar from "../gimi-sidebar";
|
|
3
|
+
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
4
|
+
import { setShowSidebarFileList, setSidebarFileList } from "../../store/slices/gimiMenuSlice";
|
|
5
|
+
import { useCallback } from "react";
|
|
6
|
+
import ReactDOM from 'react-dom';
|
|
7
|
+
import styles from "./index.module.scss";
|
|
8
|
+
import { FileCard } from ".";
|
|
9
|
+
var FileCardSideBar = function FileCardSideBar(props) {
|
|
10
|
+
var targetElement = props.targetElement,
|
|
11
|
+
isOverFlow = props.isOverFlow,
|
|
12
|
+
className = props.className,
|
|
13
|
+
style = props.style;
|
|
14
|
+
var showSidebar = useAppSelector(function (state) {
|
|
15
|
+
return state.gimiMenu.showSidebarFileList;
|
|
16
|
+
});
|
|
17
|
+
var fileList = useAppSelector(function (state) {
|
|
18
|
+
return state.gimiMenu.sidebarFileList;
|
|
19
|
+
});
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var handleClose = useCallback(function () {
|
|
22
|
+
dispatch(setShowSidebarFileList({
|
|
23
|
+
showSidebarFileList: false
|
|
24
|
+
}));
|
|
25
|
+
dispatch(setSidebarFileList([]));
|
|
26
|
+
}, [dispatch]);
|
|
27
|
+
var renderContent = function renderContent() {
|
|
28
|
+
return /*#__PURE__*/React.createElement(GimiSideBar, {
|
|
29
|
+
show: showSidebar,
|
|
30
|
+
isOverFlow: isOverFlow,
|
|
31
|
+
title: "\u5168\u90E8",
|
|
32
|
+
handleClose: handleClose,
|
|
33
|
+
className: className,
|
|
34
|
+
style: style
|
|
35
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: styles.list
|
|
37
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
className: styles.total
|
|
39
|
+
}, "\u672C\u5BF9\u8BDD\u5171".concat((fileList === null || fileList === void 0 ? void 0 : fileList.length) || 0, "\u4E2A\u6587\u6863")), fileList.map(function (file, index) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(FileCard, {
|
|
41
|
+
fileName: file.fileName,
|
|
42
|
+
fileType: file.fileType,
|
|
43
|
+
size: file.size,
|
|
44
|
+
downloadUrl: file.downloadUrl,
|
|
45
|
+
key: index
|
|
46
|
+
});
|
|
47
|
+
})));
|
|
48
|
+
};
|
|
49
|
+
if (isOverFlow) {
|
|
50
|
+
var targetElm = targetElement || document.getElementById('myun_gimi_design_chat');
|
|
51
|
+
if (!targetElm) return null;
|
|
52
|
+
return /*#__PURE__*/ReactDOM.createPortal(renderContent(), targetElm);
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderContent());
|
|
55
|
+
};
|
|
56
|
+
export default FileCardSideBar;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IFileCardProps {
|
|
3
|
+
fileName: string;
|
|
4
|
+
downloadUrl: string;
|
|
5
|
+
size: string;
|
|
6
|
+
fileType: string;
|
|
7
|
+
onDownloadCallback?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FileCard: React.FC<IFileCardProps & {
|
|
10
|
+
downloadText?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const MultipleFileCard: React.FC<{
|
|
13
|
+
list: IFileCardProps[];
|
|
14
|
+
}>;
|
|
15
|
+
export default MultipleFileCard;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip } from '@douyinfe/semi-ui';
|
|
3
|
+
import styles from "./index.module.scss";
|
|
4
|
+
import { downloadExcelByUrl } from "../../utils/tools";
|
|
5
|
+
import { useAppDispatch } from "../../store/hooks";
|
|
6
|
+
import { setFilePreviewState, setShowSidebarFileList, setSidebarFileList } from "../../store/slices/gimiMenuSlice";
|
|
7
|
+
import { RightOutlined } from '@ant-design/icons';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
export var FileCard = function FileCard(_ref) {
|
|
10
|
+
var fileName = _ref.fileName,
|
|
11
|
+
downloadUrl = _ref.downloadUrl,
|
|
12
|
+
size = _ref.size,
|
|
13
|
+
fileType = _ref.fileType,
|
|
14
|
+
downloadText = _ref.downloadText,
|
|
15
|
+
onDownloadCallback = _ref.onDownloadCallback;
|
|
16
|
+
var dispatch = useAppDispatch();
|
|
17
|
+
var handleDownLoad = function handleDownLoad(_event) {
|
|
18
|
+
_event.stopPropagation();
|
|
19
|
+
downloadExcelByUrl(downloadUrl, decodeURIComponent(fileName));
|
|
20
|
+
onDownloadCallback === null || onDownloadCallback === void 0 || onDownloadCallback();
|
|
21
|
+
};
|
|
22
|
+
var previewExcel = function previewExcel() {
|
|
23
|
+
dispatch(setFilePreviewState({
|
|
24
|
+
filePreviewState: {
|
|
25
|
+
show: true,
|
|
26
|
+
url: downloadUrl,
|
|
27
|
+
filename: fileName
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: classNames(styles.file_main, styles.card),
|
|
33
|
+
onClick: previewExcel
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: styles.icon
|
|
36
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
37
|
+
src: "https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202512/19/b8723_20251219094824.png",
|
|
38
|
+
alt: ""
|
|
39
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: styles.left
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: styles.iconName
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: styles.nameSize
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
46
|
+
content: decodeURIComponent(fileName),
|
|
47
|
+
position: "topLeft"
|
|
48
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: styles.name
|
|
50
|
+
}, decodeURIComponent(fileName))), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: styles.type
|
|
52
|
+
}, "".concat(fileType, " | ").concat(size))))), /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
className: styles.right,
|
|
54
|
+
onClick: handleDownLoad
|
|
55
|
+
}, downloadText && /*#__PURE__*/React.createElement("span", {
|
|
56
|
+
className: styles.text
|
|
57
|
+
}, downloadText), /*#__PURE__*/React.createElement(Tooltip, {
|
|
58
|
+
content: '下载'
|
|
59
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
60
|
+
src: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202509/15/c61c4_20250915193545.png",
|
|
61
|
+
width: 20,
|
|
62
|
+
alt: ""
|
|
63
|
+
})))));
|
|
64
|
+
};
|
|
65
|
+
export var MultipleFileCard = function MultipleFileCard(_ref2) {
|
|
66
|
+
var list = _ref2.list;
|
|
67
|
+
var dispatch = useAppDispatch();
|
|
68
|
+
var renderList = [];
|
|
69
|
+
var hasMore = (list === null || list === void 0 ? void 0 : list.length) > 2;
|
|
70
|
+
if (hasMore) {
|
|
71
|
+
renderList = list.slice(0, 2);
|
|
72
|
+
} else {
|
|
73
|
+
renderList = list;
|
|
74
|
+
}
|
|
75
|
+
var openSidebar = function openSidebar() {
|
|
76
|
+
dispatch(setShowSidebarFileList({
|
|
77
|
+
showSidebarFileList: true
|
|
78
|
+
}));
|
|
79
|
+
dispatch(setSidebarFileList(list));
|
|
80
|
+
};
|
|
81
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: styles.main
|
|
83
|
+
}, renderList.map(function (item, index) {
|
|
84
|
+
return /*#__PURE__*/React.createElement(FileCard, {
|
|
85
|
+
fileName: item.fileName,
|
|
86
|
+
fileType: item.fileType,
|
|
87
|
+
size: item.size,
|
|
88
|
+
downloadUrl: item.downloadUrl,
|
|
89
|
+
key: index,
|
|
90
|
+
downloadText: "\u4E0B\u8F7D"
|
|
91
|
+
});
|
|
92
|
+
}), hasMore && /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: styles.all,
|
|
94
|
+
onClick: openSidebar
|
|
95
|
+
}, "\u5168\u90E8", /*#__PURE__*/React.createElement(RightOutlined, null))));
|
|
96
|
+
};
|
|
97
|
+
export default MultipleFileCard;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
.main {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
gap: 10px;
|
|
5
|
+
padding: 10px 0px;
|
|
6
|
+
|
|
7
|
+
.all {
|
|
8
|
+
width: 78px;
|
|
9
|
+
border-radius: 12px;
|
|
10
|
+
border: 1px solid rgba(233, 235, 242, 1);
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
font-family: PingFang SC;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
line-height: 14px;
|
|
18
|
+
letter-spacing: 0px;
|
|
19
|
+
color: rgba(46, 57, 76, 1);
|
|
20
|
+
box-shadow: 0px 2px 16px 0px rgba(84, 105, 140, 0.1);
|
|
21
|
+
&:hover {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.card {
|
|
28
|
+
box-shadow: 0px 2px 16px 0px rgba(84, 105, 140, 0.1);
|
|
29
|
+
background: rgba(255, 255, 255, 1) !important;
|
|
30
|
+
&:hover {
|
|
31
|
+
background: rgba(241, 247, 255, 1) !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.file_main {
|
|
36
|
+
max-width: 328px;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
border-radius: 12px;
|
|
39
|
+
border: 1px solid rgba(233, 235, 242, 1);
|
|
40
|
+
background: linear-gradient(90deg, #EAF2FF 0%, #FFFFFF 100%);
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 10px;
|
|
44
|
+
padding: 16px;
|
|
45
|
+
&:hover {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
}
|
|
48
|
+
.icon {
|
|
49
|
+
display: flex;
|
|
50
|
+
width: 40px;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
img {
|
|
55
|
+
width: 40px;
|
|
56
|
+
height: 36px;
|
|
57
|
+
object-fit: cover;
|
|
58
|
+
padding: 2px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
.left {
|
|
62
|
+
flex: 1;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
.iconName {
|
|
67
|
+
display: flex;
|
|
68
|
+
margin-bottom: 4px;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
.nameSize {
|
|
72
|
+
flex: 1 1 auto;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
.type {
|
|
77
|
+
width: fit-content;
|
|
78
|
+
text-align: center;
|
|
79
|
+
color: var(---, #717f94);
|
|
80
|
+
font-family: 'PingFang SC';
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
font-style: normal;
|
|
83
|
+
font-weight: 400;
|
|
84
|
+
line-height: normal;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
height: 17px;
|
|
87
|
+
margin-right: 12px;
|
|
88
|
+
}
|
|
89
|
+
.name {
|
|
90
|
+
flex: 1;
|
|
91
|
+
color: var(---, #2e394c);
|
|
92
|
+
font-family: 'PingFang SC';
|
|
93
|
+
font-size: 16px;
|
|
94
|
+
width: fit-content;
|
|
95
|
+
max-width: 190px;
|
|
96
|
+
font-style: normal;
|
|
97
|
+
font-weight: 400;
|
|
98
|
+
line-height: normal;
|
|
99
|
+
overflow: hidden; /* 隐藏溢出内容 */
|
|
100
|
+
white-space: nowrap; /* 强制文本不换行 */
|
|
101
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
102
|
+
margin-bottom: 6px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.right {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
width: fit-content;
|
|
111
|
+
justify-content: space-between;
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
.text {
|
|
114
|
+
color: rgba(64, 134, 255, 1);
|
|
115
|
+
text-align: right;
|
|
116
|
+
font-family: 'PingFang SC';
|
|
117
|
+
font-size: 16px;
|
|
118
|
+
font-style: normal;
|
|
119
|
+
font-weight: 600;
|
|
120
|
+
line-height: normal;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.list {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
gap: 10px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.text {
|
|
132
|
+
font-family: PingFang SC;
|
|
133
|
+
font-weight: 400;
|
|
134
|
+
font-style: Regular;
|
|
135
|
+
font-size: 15px;
|
|
136
|
+
line-height: 180%;
|
|
137
|
+
letter-spacing: 0px;
|
|
138
|
+
color: rgba(46, 57, 76, 1);
|
|
139
|
+
}
|