@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.
Files changed (206) hide show
  1. package/dist/apis/fetch.d.ts +64 -0
  2. package/dist/apis/fetch.js +512 -0
  3. package/dist/apis/useApi.d.ts +57 -0
  4. package/dist/apis/useApi.js +378 -0
  5. package/dist/assets/image/Subtract.png +0 -0
  6. package/dist/assets/image/ai-logo.png +0 -0
  7. package/dist/assets/image/copyIcon.png +0 -0
  8. package/dist/assets/image/deepthinkActive.png +0 -0
  9. package/dist/assets/image/empty-img-dark.png +0 -0
  10. package/dist/assets/image/empty-img.png +0 -0
  11. package/dist/assets/image/like_active.png +0 -0
  12. package/dist/assets/image/love.png +0 -0
  13. package/dist/assets/image/retry.png +0 -0
  14. package/dist/assets/image/soundOut.png +0 -0
  15. package/dist/assets/image/unlike_active.png +0 -0
  16. package/dist/assets/image/unlove.png +0 -0
  17. package/dist/assets/lottie/ai-bg.json +1704 -0
  18. package/dist/assets/lottie/ai-loading.json +192 -0
  19. package/dist/assets/lottie/ai-output-loading.json +272 -0
  20. package/dist/assets/lottie/ai-output-normal.json +17694 -0
  21. package/dist/assets/lottie/ai-output-strengthen.json +17321 -0
  22. package/dist/assets/lottie/ai-voice-play.json +1 -0
  23. package/dist/assets/lottie/living.json +705 -0
  24. package/dist/assets/lottie/myun-living.json +726 -0
  25. package/dist/assets/lottie/myun-loading.json +530 -0
  26. package/dist/components/ai-chat-dialogue/index.d.ts +16 -0
  27. package/dist/components/ai-chat-dialogue/index.js +1056 -0
  28. package/dist/components/ai-chat-dialogue/index.module.css +230 -0
  29. package/dist/components/ai-chat-dialogue/message-parser.d.ts +36 -0
  30. package/dist/components/ai-chat-dialogue/message-parser.js +52 -0
  31. package/dist/components/ai-chat-dialogue/tlv.d.ts +7 -0
  32. package/dist/components/ai-chat-dialogue/tlv.js +32 -0
  33. package/dist/components/ai-chat-dialogue/volc-voice-call-client.d.ts +47 -0
  34. package/dist/components/ai-chat-dialogue/volc-voice-call-client.js +246 -0
  35. package/dist/components/ai-correction/index.d.ts +5 -0
  36. package/dist/components/ai-correction/index.js +45 -0
  37. package/dist/components/ai-loading/index.d.ts +3 -0
  38. package/dist/components/ai-loading/index.js +14 -0
  39. package/dist/components/ai-loading/index.module.css +11 -0
  40. package/dist/components/answer-item/index.d.ts +27 -0
  41. package/dist/components/answer-item/index.js +194 -0
  42. package/dist/components/answer-item/index.module.css +266 -0
  43. package/dist/components/ask-card/index.d.ts +10 -0
  44. package/dist/components/ask-card/index.js +76 -0
  45. package/dist/components/ask-card/index.module.css +122 -0
  46. package/dist/components/chat-input/index.d.ts +31 -0
  47. package/dist/components/chat-input/index.js +433 -0
  48. package/dist/components/chat-input/index.module.css +42 -0
  49. package/dist/components/chat-voice/VoiceCommunication.d.ts +7 -0
  50. package/dist/components/chat-voice/VoiceCommunication.js +69 -0
  51. package/dist/components/chat-voice/VoiceRecord.d.ts +7 -0
  52. package/dist/components/chat-voice/VoiceRecord.js +34 -0
  53. package/dist/components/conversation-delete/index.d.ts +5 -0
  54. package/dist/components/conversation-delete/index.js +24 -0
  55. package/dist/components/dots-loading/index.d.ts +2 -0
  56. package/dist/components/dots-loading/index.js +11 -0
  57. package/dist/components/dots-loading/index.module.css +41 -0
  58. package/dist/components/empty/index.d.ts +9 -0
  59. package/dist/components/empty/index.js +32 -0
  60. package/dist/components/empty/index.module.css +24 -0
  61. package/dist/components/excel-components/ExcelCard.d.ts +11 -0
  62. package/dist/components/excel-components/ExcelCard.js +35 -0
  63. package/dist/components/excel-components/ExcelExcuting.d.ts +10 -0
  64. package/dist/components/excel-components/ExcelExcuting.js +263 -0
  65. package/dist/components/excel-components/ExcelFailCard.d.ts +9 -0
  66. package/dist/components/excel-components/ExcelFailCard.js +20 -0
  67. package/dist/components/excel-components/ExcelSuccessCard.d.ts +5 -0
  68. package/dist/components/excel-components/ExcelSuccessCard.js +50 -0
  69. package/dist/components/excel-components/index.module.css +212 -0
  70. package/dist/components/excel-components/styles.module.css +178 -0
  71. package/dist/components/file-card/fileCardSidebar.d.ts +8 -0
  72. package/dist/components/file-card/fileCardSidebar.js +56 -0
  73. package/dist/components/file-card/index.d.ts +15 -0
  74. package/dist/components/file-card/index.js +97 -0
  75. package/dist/components/file-card/index.module.css +139 -0
  76. package/dist/components/file-preview/index.d.ts +3 -0
  77. package/dist/components/file-preview/index.js +227 -0
  78. package/dist/components/file-preview/index.module.css +83 -0
  79. package/dist/components/file-upload/index.d.ts +16 -0
  80. package/dist/components/file-upload/index.js +238 -0
  81. package/dist/components/file-upload/uploadV1.d.ts +16 -0
  82. package/dist/components/file-upload/uploadV1.js +267 -0
  83. package/dist/components/gimi-sidebar/index.d.ts +17 -0
  84. package/dist/components/gimi-sidebar/index.js +41 -0
  85. package/dist/components/gimi-sidebar/index.module.css +118 -0
  86. package/dist/components/header/index.d.ts +5 -0
  87. package/dist/components/header/index.js +20 -0
  88. package/dist/components/header/index.module.css +19 -0
  89. package/dist/components/iconfont-com/index.d.ts +11 -0
  90. package/dist/components/iconfont-com/index.js +29 -0
  91. package/dist/components/index.d.ts +1 -0
  92. package/dist/components/index.js +1 -0
  93. package/dist/components/knowledge-trace/KnowledgeIconComponent.d.ts +7 -0
  94. package/dist/components/knowledge-trace/KnowledgeIconComponent.js +101 -0
  95. package/dist/components/knowledge-trace/classList.d.ts +6 -0
  96. package/dist/components/knowledge-trace/classList.js +72 -0
  97. package/dist/components/knowledge-trace/documentList.d.ts +6 -0
  98. package/dist/components/knowledge-trace/documentList.js +75 -0
  99. package/dist/components/knowledge-trace/index.d.ts +18 -0
  100. package/dist/components/knowledge-trace/index.js +155 -0
  101. package/dist/components/knowledge-trace/index.module.css +254 -0
  102. package/dist/components/knowledge-trace/interfaces.d.ts +166 -0
  103. package/dist/components/knowledge-trace/interfaces.js +1 -0
  104. package/dist/components/knowledge-trace/videoList.d.ts +6 -0
  105. package/dist/components/knowledge-trace/videoList.js +91 -0
  106. package/dist/components/lottie-img/index.d.ts +8 -0
  107. package/dist/components/lottie-img/index.js +99 -0
  108. package/dist/components/message-actions/CopyButton.d.ts +7 -0
  109. package/dist/components/message-actions/CopyButton.js +33 -0
  110. package/dist/components/message-actions/LikeButton.d.ts +7 -0
  111. package/dist/components/message-actions/LikeButton.js +34 -0
  112. package/dist/components/message-actions/RegenerateButton.d.ts +5 -0
  113. package/dist/components/message-actions/RegenerateButton.js +27 -0
  114. package/dist/components/message-actions/UnLikeButton.d.ts +7 -0
  115. package/dist/components/message-actions/UnLikeButton.js +34 -0
  116. package/dist/components/message-actions/VoicePlay.d.ts +10 -0
  117. package/dist/components/message-actions/VoicePlay.js +74 -0
  118. package/dist/components/message-list/index.d.ts +19 -0
  119. package/dist/components/message-list/index.js +164 -0
  120. package/dist/components/message-list/index.module.css +261 -0
  121. package/dist/components/no-microphone-root/index.d.ts +6 -0
  122. package/dist/components/no-microphone-root/index.js +36 -0
  123. package/dist/components/no-microphone-root/index.module.css +48 -0
  124. package/dist/components/preset-agent-content/index.d.ts +8 -0
  125. package/dist/components/preset-agent-content/index.js +24 -0
  126. package/dist/components/preset-agent-content/index.module.css +46 -0
  127. package/dist/components/quoted-content/index.d.ts +0 -0
  128. package/dist/components/quoted-content/index.js +171 -0
  129. package/dist/components/quoted-content/index.module.css +80 -0
  130. package/dist/components/reasoning-content/index.d.ts +6 -0
  131. package/dist/components/reasoning-content/index.js +116 -0
  132. package/dist/components/reasoning-content/index.module.css +169 -0
  133. package/dist/components/reference-content/index.d.ts +28 -0
  134. package/dist/components/reference-content/index.js +125 -0
  135. package/dist/components/reference-content/index.module.css +84 -0
  136. package/dist/components/templates/CommonChat.d.ts +5 -0
  137. package/dist/components/templates/CommonChat.js +218 -0
  138. package/dist/components/templates/GimiChatComponent.d.ts +4 -0
  139. package/dist/components/templates/GimiChatComponent.js +23 -0
  140. package/dist/components/templates/demo/demo.d.ts +2 -0
  141. package/dist/components/templates/demo/demo.js +109 -0
  142. package/dist/components/templates/index.module.css +109 -0
  143. package/dist/components/upload-list/index.d.ts +15 -0
  144. package/dist/components/upload-list/index.js +90 -0
  145. package/dist/components/upload-list/index.module.css +119 -0
  146. package/dist/components/voice-bars/index.d.ts +4 -0
  147. package/dist/components/voice-bars/index.js +174 -0
  148. package/dist/components/voice-check-dialog/index.d.ts +8 -0
  149. package/dist/components/voice-check-dialog/index.js +163 -0
  150. package/dist/components/voice-check-dialog/index.module.css +9 -0
  151. package/dist/components/voice-recording/index.d.ts +9 -0
  152. package/dist/components/voice-recording/index.js +54 -0
  153. package/dist/components/voice-recording/index.module.css +41 -0
  154. package/dist/components/work-flow-content/demo.d.ts +3 -0
  155. package/dist/components/work-flow-content/demo.js +11 -0
  156. package/dist/components/work-flow-content/index.d.ts +6 -0
  157. package/dist/components/work-flow-content/index.js +55 -0
  158. package/dist/components/work-flow-content/index.module.css +24 -0
  159. package/dist/constants.d.ts +24 -0
  160. package/dist/constants.js +24 -0
  161. package/dist/hooks/useChatActions.d.ts +12 -0
  162. package/dist/hooks/useChatActions.js +207 -0
  163. package/dist/hooks/useChatHistory.d.ts +8 -0
  164. package/dist/hooks/useChatHistory.js +225 -0
  165. package/dist/hooks/useChatMessage.d.ts +49 -0
  166. package/dist/hooks/useChatMessage.js +87 -0
  167. package/dist/hooks/useChatRecommend.d.ts +8 -0
  168. package/dist/hooks/useChatRecommend.js +126 -0
  169. package/dist/hooks/useChatStream.d.ts +20 -0
  170. package/dist/hooks/useChatStream.js +244 -0
  171. package/dist/hooks/useChatUI.d.ts +32 -0
  172. package/dist/hooks/useChatUI.js +134 -0
  173. package/dist/hooks/useChatVoice.d.ts +11 -0
  174. package/dist/hooks/useChatVoice.js +379 -0
  175. package/dist/hooks/useCommonChatAPI.d.ts +27 -0
  176. package/dist/hooks/useCommonChatAPI.js +1276 -0
  177. package/dist/hooks/useFile.d.ts +13 -0
  178. package/dist/hooks/useFile.js +288 -0
  179. package/dist/hooks/useKnowledgeService.d.ts +17 -0
  180. package/dist/hooks/useKnowledgeService.js +210 -0
  181. package/dist/hooks/useLastEventId.d.ts +8 -0
  182. package/dist/hooks/useLastEventId.js +66 -0
  183. package/dist/hooks/useLongPoll.d.ts +3 -0
  184. package/dist/hooks/useLongPoll.js +111 -0
  185. package/dist/hooks/useScroll.d.ts +4 -0
  186. package/dist/hooks/useScroll.js +172 -0
  187. package/dist/index.d.ts +1 -0
  188. package/dist/index.js +1 -0
  189. package/dist/interfaces/chatMessage.d.ts +139 -0
  190. package/dist/interfaces/fileInterface.d.ts +10 -0
  191. package/dist/interfaces/fileInterface.js +11 -0
  192. package/dist/interfaces/knowledgeTrace.d.ts +177 -0
  193. package/dist/store/hooks.d.ts +4 -0
  194. package/dist/store/hooks.js +3 -0
  195. package/dist/store/index.d.ts +7 -0
  196. package/dist/store/index.js +7 -0
  197. package/dist/store/slices/gimiMenuSlice.d.ts +95 -0
  198. package/dist/store/slices/gimiMenuSlice.js +251 -0
  199. package/dist/utils/chatInputUtil.d.ts +19 -0
  200. package/dist/utils/chatInputUtil.js +45 -0
  201. package/dist/utils/tools.d.ts +50 -0
  202. package/dist/utils/tools.js +474 -0
  203. package/dist/utils/voice-stream.d.ts +119 -0
  204. package/dist/utils/voice-stream.js +1162 -0
  205. package/package.json +5 -6
  206. package/LICENSE +0 -21
@@ -0,0 +1,50 @@
1
+ import React from "react";
2
+ import { FileCard, MultipleFileCard } from "../file-card";
3
+ var transforata = function transforata(data) {
4
+ var fileName = data.file_name || '文件下载.xlsx';
5
+ var size = data.size || '0.0KB';
6
+ var downloadUrl = data.result_url || '';
7
+ var tempArr = fileName.split('.');
8
+ var fileType = (tempArr === null || tempArr === void 0 ? void 0 : tempArr.length) > 1 ? tempArr.pop() : 'xlsx';
9
+ return {
10
+ fileName: fileName,
11
+ fileType: fileType,
12
+ size: size,
13
+ downloadUrl: downloadUrl
14
+ };
15
+ };
16
+ var ExcelSuccessCard = function ExcelSuccessCard(_ref) {
17
+ var value = _ref.value;
18
+ var skillDetail = [];
19
+ try {
20
+ skillDetail = typeof value === 'string' ? JSON.parse(value) : value;
21
+ } catch (error) {
22
+ // console.error(error);
23
+ return null;
24
+ }
25
+
26
+ // 新天工数据格式
27
+ if (Array.isArray(skillDetail)) {
28
+ var renderData = skillDetail.map(function (item) {
29
+ return transforata(item);
30
+ });
31
+ return /*#__PURE__*/React.createElement(MultipleFileCard, {
32
+ list: renderData
33
+ });
34
+ }
35
+
36
+ // 老天工数据格式
37
+ var _transforata = transforata(skillDetail),
38
+ fileName = _transforata.fileName,
39
+ downloadUrl = _transforata.downloadUrl,
40
+ size = _transforata.size,
41
+ fileType = _transforata.fileType;
42
+ return /*#__PURE__*/React.createElement(FileCard, {
43
+ fileName: fileName,
44
+ fileType: fileType,
45
+ size: size,
46
+ downloadUrl: downloadUrl,
47
+ downloadText: "\u4E0B\u8F7D"
48
+ });
49
+ };
50
+ export default ExcelSuccessCard;
@@ -0,0 +1,212 @@
1
+ @charset "UTF-8";
2
+ .excelSucess {
3
+ width: 328px;
4
+ flex-shrink: 0;
5
+ border-radius: 12px;
6
+ border: 1px solid var(---, #e9ebf2);
7
+ background: var(---, #f2f3f7);
8
+ display: flex;
9
+ align-items: center;
10
+ gap: 12px;
11
+ padding: 16px;
12
+ }
13
+ .excelSucess:hover {
14
+ cursor: pointer;
15
+ }
16
+ .excelSucess .icon {
17
+ display: flex;
18
+ width: 36px;
19
+ justify-content: center;
20
+ align-items: center;
21
+ flex-shrink: 0;
22
+ }
23
+ .excelSucess .icon img {
24
+ width: 36px;
25
+ height: 36px;
26
+ object-fit: cover;
27
+ }
28
+ .excelSucess .left {
29
+ flex: 1;
30
+ display: flex;
31
+ flex-direction: column;
32
+ justify-content: space-between;
33
+ }
34
+ .excelSucess .left .iconName {
35
+ display: flex;
36
+ margin-bottom: 4px;
37
+ display: flex;
38
+ align-items: center;
39
+ }
40
+ .excelSucess .left .iconName .nameSize {
41
+ flex: 1 1 auto;
42
+ display: flex;
43
+ flex-direction: column;
44
+ justify-content: center;
45
+ }
46
+ .excelSucess .left .iconName .nameSize .type {
47
+ width: fit-content;
48
+ text-align: center;
49
+ color: var(---, #717f94);
50
+ font-family: "PingFang SC";
51
+ font-size: 14px;
52
+ font-style: normal;
53
+ font-weight: 400;
54
+ line-height: normal;
55
+ border-radius: 4px;
56
+ height: 17px;
57
+ margin-right: 12px;
58
+ }
59
+ .excelSucess .left .iconName .nameSize .name {
60
+ flex: 1;
61
+ color: var(---, #2e394c);
62
+ font-family: "PingFang SC";
63
+ font-size: 16px;
64
+ width: 190px;
65
+ font-style: normal;
66
+ font-weight: 400;
67
+ line-height: normal;
68
+ overflow: hidden; /* 隐藏溢出内容 */
69
+ white-space: nowrap; /* 强制文本不换行 */
70
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
71
+ margin-bottom: 6px;
72
+ }
73
+ .excelSucess .left .typeSize {
74
+ display: flex;
75
+ align-items: center;
76
+ }
77
+ .excelSucess .left .typeSize .type {
78
+ color: var(--, #56bf8c);
79
+ text-align: center;
80
+ font-family: "PingFang SC";
81
+ font-size: 12px;
82
+ font-style: normal;
83
+ font-weight: 400;
84
+ line-height: normal;
85
+ padding: 0 3px;
86
+ border-radius: 4px;
87
+ border: 1px solid var(--, #56bf8c);
88
+ height: 17px;
89
+ margin-right: 12px;
90
+ }
91
+ .excelSucess .left .typeSize .size {
92
+ color: var(---, #717f94);
93
+ font-family: "PingFang SC";
94
+ font-size: 14px;
95
+ font-style: normal;
96
+ font-weight: 400;
97
+ line-height: normal;
98
+ }
99
+ .excelSucess .right {
100
+ display: flex;
101
+ align-items: center;
102
+ width: fit-content;
103
+ justify-content: space-between;
104
+ flex-shrink: 0;
105
+ }
106
+ .excelSucess .right .text {
107
+ color: var(--, #4086ff);
108
+ text-align: right;
109
+ font-family: "PingFang SC";
110
+ font-size: 16px;
111
+ font-style: normal;
112
+ font-weight: 600;
113
+ line-height: normal;
114
+ }
115
+
116
+ .failText {
117
+ color: #2e394c;
118
+ font-family: "PingFang SC";
119
+ font-size: 16px;
120
+ font-style: normal;
121
+ font-weight: 400;
122
+ line-height: 28px; /* 175% */
123
+ margin-bottom: 12px;
124
+ white-space: pre-line;
125
+ max-width: clamp(360px, 50%, 600px);
126
+ }
127
+
128
+ .excelFail .failText {
129
+ color: #2e394c;
130
+ font-family: "PingFang SC";
131
+ font-size: 16px;
132
+ font-style: normal;
133
+ font-weight: 400;
134
+ line-height: 28px; /* 175% */
135
+ margin-bottom: 12px;
136
+ white-space: pre-line;
137
+ }
138
+ .excelFail .Retry {
139
+ cursor: pointer;
140
+ display: flex;
141
+ align-items: center;
142
+ justify-content: center;
143
+ width: 96px;
144
+ height: 44px;
145
+ flex-shrink: 0;
146
+ border-radius: 22px;
147
+ border: 1px solid var(---, #d9dce5);
148
+ background: #fff;
149
+ color: #000;
150
+ font-family: "PingFang SC";
151
+ font-size: 14px;
152
+ font-style: normal;
153
+ font-weight: 600;
154
+ line-height: normal;
155
+ }
156
+ .excelFail .disablebox {
157
+ border-radius: 22px;
158
+ border: 1px solid var(---, #d9dce5);
159
+ background: #fff;
160
+ color: #ced3d9;
161
+ font-family: "PingFang SC";
162
+ font-size: 14px;
163
+ font-style: normal;
164
+ font-weight: 600;
165
+ line-height: normal;
166
+ cursor: not-allowed;
167
+ pointer-events: none;
168
+ }
169
+ .excelFail .selectbox {
170
+ border-radius: 22px;
171
+ background: var(---, #2e394c);
172
+ color: #fff;
173
+ font-family: "PingFang SC";
174
+ font-size: 14px;
175
+ font-style: normal;
176
+ font-weight: 600;
177
+ line-height: normal;
178
+ cursor: not-allowed;
179
+ pointer-events: none;
180
+ }
181
+ .excelFail .Retry:hover {
182
+ border-radius: 22px;
183
+ border: 1px solid var(---, #d9dce5);
184
+ background: #f7f7f7;
185
+ }
186
+
187
+ .excelRunning {
188
+ width: clamp(360px, 45vw, 680px);
189
+ margin-top: 12px;
190
+ }
191
+ .excelRunning .running {
192
+ display: flex;
193
+ align-items: center;
194
+ }
195
+ .excelRunning .running img {
196
+ width: 16px;
197
+ height: 16px;
198
+ object-fit: cover;
199
+ }
200
+ .excelRunning .running .runningText {
201
+ color: #000;
202
+ font-family: "PingFang SC";
203
+ font-size: 16px;
204
+ font-style: normal;
205
+ font-weight: 600;
206
+ line-height: 28px; /* 175% */
207
+ margin-left: 10px;
208
+ }
209
+
210
+ .progress {
211
+ margin: 0 8px;
212
+ }
@@ -0,0 +1,178 @@
1
+ .container {
2
+ height: 300px;
3
+ }
4
+
5
+ .aiLoadingSteps {
6
+ background: linear-gradient(180deg, #F9FEFE 0%, #FFFFFF 100%);
7
+ border-radius: 16px;
8
+ padding: 16px;
9
+ width: clamp(380px, 100%, 680px);
10
+ border: 1px solid rgb(233, 235, 242);
11
+ box-shadow: 0px 2px 2px 0px rgb(255, 255, 255) inset;
12
+ transition: all 0.5s ease-in-out;
13
+ min-height: 60px;
14
+ }
15
+
16
+ .header {
17
+ margin-bottom: 10px;
18
+ }
19
+
20
+ .title {
21
+ font-size: 16px;
22
+ color: rgb(46, 57, 76);
23
+ display: flex;
24
+ align-items: center;
25
+ gap: 8px;
26
+ font-family: PingFang SC;
27
+ font-weight: 600;
28
+ font-style: Semibold;
29
+ letter-spacing: 0px;
30
+ }
31
+
32
+ .titleIcon {
33
+ font-size: 16px;
34
+ color: #1890ff;
35
+ }
36
+
37
+ .description {
38
+ font-size: 14px;
39
+ color: rgb(113, 127, 148);
40
+ margin: 0;
41
+ font-family: PingFang SC;
42
+ font-weight: 400;
43
+ font-style: Regular;
44
+ font-size: 14px;
45
+ line-height: 180%;
46
+ letter-spacing: 0px;
47
+ }
48
+
49
+ .stepsContainer {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: 0;
53
+ margin-left: 4px;
54
+ }
55
+
56
+ .stepItem {
57
+ display: flex;
58
+ align-items: baseline;
59
+ gap: 12px;
60
+ position: relative;
61
+ min-height: 32px;
62
+ transition: all 300ms ease;
63
+ }
64
+
65
+ .stepActiveItem {
66
+ display: flex;
67
+ align-items: flex-start;
68
+ gap: 8px;
69
+ position: relative;
70
+ min-height: 32px;
71
+ transition: all 300ms ease;
72
+ margin-left: -4px;
73
+ margin-top: 5px;
74
+ margin-bottom: 16px;
75
+ }
76
+
77
+ .stepIndicator {
78
+ display: flex;
79
+ flex-direction: column;
80
+ align-items: center;
81
+ position: relative;
82
+ }
83
+
84
+ @keyframes rotate360 {
85
+ 0% {
86
+ transform: rotate(0deg);
87
+ }
88
+ 100% {
89
+ transform: rotate(360deg);
90
+ }
91
+ }
92
+ .checkIcon {
93
+ font-size: 14px;
94
+ color: rgb(62, 179, 86) !important;
95
+ background: white;
96
+ position: relative;
97
+ z-index: 2;
98
+ }
99
+
100
+ .pendingIcon {
101
+ width: 22px;
102
+ height: 22px;
103
+ animation: rotate360 1s linear infinite;
104
+ position: relative;
105
+ z-index: 2;
106
+ }
107
+
108
+ .verticalLine {
109
+ position: absolute;
110
+ top: 22px;
111
+ left: 50%;
112
+ transform: translateX(-50%);
113
+ width: 2px;
114
+ height: 8px;
115
+ border-radius: 4px;
116
+ background: rgb(217, 220, 229);
117
+ z-index: 1;
118
+ }
119
+
120
+ .stepItem.completed .verticalLine {
121
+ background: #52c41a;
122
+ }
123
+
124
+ .stepContent {
125
+ flex: 1;
126
+ padding: 0 0 12px 0;
127
+ }
128
+
129
+ .stepText {
130
+ font-size: 16px;
131
+ color: rgb(46, 57, 76);
132
+ font-family: PingFang SC;
133
+ font-weight: 400;
134
+ font-style: Regular;
135
+ font-size: 16px;
136
+ line-height: 18px;
137
+ letter-spacing: 0px;
138
+ }
139
+
140
+ .finishText {
141
+ font-family: PingFang SC;
142
+ font-weight: 600;
143
+ font-style: Semibold;
144
+ font-size: 16px;
145
+ line-height: 180%;
146
+ letter-spacing: 0px;
147
+ color: rgb(46, 57, 76);
148
+ transition: opacity 0.3s ease-in-out;
149
+ }
150
+
151
+ .stepItem.completed .stepText {
152
+ color: #8c8c8c;
153
+ }
154
+
155
+ .stepActiveItem.active .stepText {
156
+ color: #262626;
157
+ font-weight: 500;
158
+ }
159
+ .stepActiveItem.active .verticalLine {
160
+ height: 24px;
161
+ top: 26px;
162
+ }
163
+
164
+ .contentWrapper {
165
+ transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out;
166
+ padding: 2px 0;
167
+ overflow: hidden;
168
+ }
169
+
170
+ .contentWrapper.collapsing {
171
+ max-height: 0;
172
+ opacity: 0;
173
+ }
174
+
175
+ .contentWrapper.expanded {
176
+ max-height: 300px;
177
+ opacity: 1;
178
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const FileCardSideBar: (props: {
3
+ targetElement?: HTMLElement;
4
+ isOverFlow: boolean;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }) => React.JSX.Element | null;
8
+ export default FileCardSideBar;
@@ -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.css";
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.css";
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;