@myun/gimi-chat 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/components/ai-chat-dialogue/index.js +182 -136
  2. package/dist/components/ai-chat-dialogue/index.module.css +230 -0
  3. package/dist/components/ai-correction/index.js +38 -25
  4. package/dist/components/ai-loading/index.js +13 -9
  5. package/dist/components/ai-loading/index.module.css +11 -0
  6. package/dist/components/answer-item/index.js +136 -114
  7. package/dist/components/answer-item/index.module.css +266 -0
  8. package/dist/components/ask-card/index.js +43 -34
  9. package/dist/components/ask-card/index.module.css +122 -0
  10. package/dist/components/chat-input/index.js +136 -115
  11. package/dist/components/chat-input/index.module.css +42 -0
  12. package/dist/components/chat-voice/VoiceCommunication.js +23 -21
  13. package/dist/components/chat-voice/VoiceRecord.js +24 -21
  14. package/dist/components/conversation-delete/index.js +10 -8
  15. package/dist/components/dots-loading/index.js +11 -8
  16. package/dist/components/dots-loading/index.module.css +41 -0
  17. package/dist/components/empty/index.js +13 -8
  18. package/dist/components/empty/index.module.css +24 -0
  19. package/dist/components/excel-components/ExcelCard.js +7 -3
  20. package/dist/components/excel-components/ExcelExcuting.js +61 -44
  21. package/dist/components/excel-components/ExcelFailCard.js +16 -11
  22. package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
  23. package/dist/components/excel-components/index.module.css +212 -0
  24. package/dist/components/excel-components/styles.module.css +178 -0
  25. package/dist/components/file-card/fileCardSidebar.js +24 -17
  26. package/dist/components/file-card/index.js +69 -50
  27. package/dist/components/file-card/index.module.css +139 -0
  28. package/dist/components/file-preview/index.js +39 -34
  29. package/dist/components/file-preview/index.module.css +83 -0
  30. package/dist/components/file-upload/index.js +10 -7
  31. package/dist/components/file-upload/uploadV1.js +33 -27
  32. package/dist/components/gimi-sidebar/index.js +21 -14
  33. package/dist/components/gimi-sidebar/index.module.css +118 -0
  34. package/dist/components/header/index.js +19 -12
  35. package/dist/components/header/index.module.css +19 -0
  36. package/dist/components/iconfont-com/index.js +2 -1
  37. package/dist/components/knowledge-trace/KnowledgeIconComponent.js +29 -23
  38. package/dist/components/knowledge-trace/classList.js +38 -29
  39. package/dist/components/knowledge-trace/documentList.js +37 -28
  40. package/dist/components/knowledge-trace/index.js +29 -22
  41. package/dist/components/knowledge-trace/index.module.css +254 -0
  42. package/dist/components/knowledge-trace/videoList.js +47 -37
  43. package/dist/components/lottie-img/index.js +10 -8
  44. package/dist/components/message-actions/CopyButton.js +25 -22
  45. package/dist/components/message-actions/LikeButton.js +25 -22
  46. package/dist/components/message-actions/RegenerateButton.js +21 -18
  47. package/dist/components/message-actions/UnLikeButton.js +25 -22
  48. package/dist/components/message-actions/VoicePlay.js +25 -22
  49. package/dist/components/message-list/index.js +86 -76
  50. package/dist/components/message-list/index.module.css +261 -0
  51. package/dist/components/no-microphone-root/index.js +40 -30
  52. package/dist/components/no-microphone-root/index.module.css +48 -0
  53. package/dist/components/preset-agent-content/index.js +21 -16
  54. package/dist/components/preset-agent-content/index.module.css +46 -0
  55. package/dist/components/quoted-content/index.module.css +80 -0
  56. package/dist/components/reasoning-content/index.js +56 -43
  57. package/dist/components/reasoning-content/index.module.css +169 -0
  58. package/dist/components/reference-content/index.js +73 -64
  59. package/dist/components/reference-content/index.module.css +84 -0
  60. package/dist/components/templates/CommonChat.js +79 -65
  61. package/dist/components/templates/GimiChatComponent.js +13 -6
  62. package/dist/components/templates/demo/demo.js +104 -103
  63. package/dist/components/templates/index.module.css +109 -0
  64. package/dist/components/upload-list/index.js +57 -42
  65. package/dist/components/upload-list/index.module.css +119 -0
  66. package/dist/components/voice-bars/index.js +22 -19
  67. package/dist/components/voice-check-dialog/index.js +25 -18
  68. package/dist/components/voice-check-dialog/{index.module.scss → index.module.css} +2 -2
  69. package/dist/components/voice-recording/index.js +58 -43
  70. package/dist/components/voice-recording/index.module.css +41 -0
  71. package/dist/components/work-flow-content/demo.js +2 -1
  72. package/dist/components/work-flow-content/index.js +13 -10
  73. package/dist/components/work-flow-content/index.module.css +24 -0
  74. package/package.json +7 -6
  75. package/dist/components/ai-chat-dialogue/index.module.scss +0 -272
  76. package/dist/components/ai-loading/index.module.scss +0 -11
  77. package/dist/components/answer-item/index.module.scss +0 -295
  78. package/dist/components/ask-card/index.module.scss +0 -125
  79. package/dist/components/chat-input/index.module.scss +0 -44
  80. package/dist/components/dots-loading/index.module.scss +0 -45
  81. package/dist/components/empty/index.module.scss +0 -27
  82. package/dist/components/excel-components/index.module.scss +0 -210
  83. package/dist/components/excel-components/styles.module.scss +0 -186
  84. package/dist/components/file-card/index.module.scss +0 -139
  85. package/dist/components/file-preview/index.module.scss +0 -120
  86. package/dist/components/gimi-sidebar/index.module.scss +0 -136
  87. package/dist/components/header/index.module.scss +0 -26
  88. package/dist/components/knowledge-trace/index.module.scss +0 -262
  89. package/dist/components/message-list/index.module.scss +0 -304
  90. package/dist/components/no-microphone-root/index.module.scss +0 -42
  91. package/dist/components/preset-agent-content/index.module.scss +0 -48
  92. package/dist/components/quoted-content/index.module.scss +0 -76
  93. package/dist/components/reasoning-content/index.module.scss +0 -164
  94. package/dist/components/reference-content/index.module.scss +0 -73
  95. package/dist/components/templates/index.module.scss +0 -119
  96. package/dist/components/upload-list/index.module.scss +0 -119
  97. package/dist/components/voice-recording/index.module.scss +0 -41
  98. package/dist/components/work-flow-content/index.module.scss +0 -23
@@ -1,110 +1,111 @@
1
1
  import GimiChatComponent from "../GimiChatComponent";
2
2
  import React from "react";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
3
4
  export default function Demo() {
4
- return /*#__PURE__*/React.createElement("div", {
5
+ return /*#__PURE__*/_jsx("div", {
5
6
  style: {
6
7
  height: '600px'
7
- }
8
- }, /*#__PURE__*/React.createElement(GimiChatComponent, {
9
- baseUrl: 't-mgateway.gaodunwangxiao.com',
10
- businessType: "correction",
11
- token: 'eyJhZ2VuY3kiOjk1NTU1LCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJHYW9kdW4iLCJpYXQiOjE3Njg4OTEyMzIsInN1YiI6IjE1Mjg4NzQiLCJpc3MiOiJHYW9kdW4iLCJleHAiOjE3NzE0ODMyMzJ9.6JpEbaJnxMKiER78Ko5irwVpGFfKOP1zxYSUYXPL00Y',
12
- platform: "myun",
13
- agentId: 79
14
- // bussinessParams={
15
- // {
16
- // "ANSWER_ID": 19923,
17
- // "QUESTION_ID": 77595
18
- // }
19
- // }
20
- // agentDetail={{
21
- // "agentIcon": "https://mstatic.gaodunwangxiao.com/image/2025/09/24/Excel建模-1758706152601.png",
22
- // "agentId": 65,
23
- // "agentIntroduce": "帮你智能搭建财务数据表格信息",
24
- // "agentMode": "workflow",
25
- // "agentName": "智能Excel建模",
26
- // "agentState": 1,
27
- // "agentType": "product",
28
- // "botId": "BOT1757402118115",
29
- // "botInstructionId": 0,
30
- // "characterSetting": null,
31
- // "conversationType": 2,
32
- // "customizeInstructContent": null,
33
- // "defaultPrompt": "我要生成一个{{输入模板名称,如PVM模板}},用于{{输入使用场景,如分析收入增长主要驱动力}}。关键数据:{{输入数据}}",
34
- // "inputPrompt": "",
35
- // "isCustomizeInstruct": 0,
36
- // "isEnableRelated": 1,
37
- // "isEnableVoiceCall": 0,
38
- // "maxLength": null,
39
- // "modeType": null,
40
- // "openUploadFile": 1,
41
- // "productId": 36842,
42
- // "prologue": "帮你智能搭建财务数据表格信息",
43
- // "questionList": [
44
- // {
45
- // "id": 127,
46
- // "question": "会计是现代社会经济活动开展的重要基础,也是推动国际经贸往来的重要保障"
47
- // },
48
- // {
49
- // "id": 128,
50
- // "question": "全面预算的执行和监控中可以采用什么方式做好业务支持和预算管控?"
51
- // }
52
- // ],
53
- // "showName": "智能Excel建模",
54
- // "showNameStatus": 1,
55
- // "sourceModelId": null,
56
- // "temperature": null,
57
- // "voiceConfigs": [
58
- // {
59
- // "emotions": [
60
- // {
61
- // "name": "悲伤",
62
- // "param": "sad"
63
- // },
64
- // {
65
- // "name": "恐惧",
66
- // "param": "fear"
67
- // },
68
- // {
69
- // "name": "厌恶",
70
- // "param": "hate"
71
- // },
72
- // {
73
- // "name": "中性",
74
- // "param": "neutral"
75
- // }
76
- // ],
77
- // "gender": "female",
78
- // "isSupportMix": 0,
79
- // "languageCode": "zh-CN",
80
- // "languageId": 1,
81
- // "languageName": "中文",
82
- // "scene": "多情感",
83
- // "toneId": 2,
84
- // "toneName": "甜心小美(多情感)",
85
- // "voiceType": "zh_female_tianxinxiaomei_emo_v2_mars_bigtts"
86
- // }
87
- // ],
88
- // "workflowList": [
89
- // {
90
- // "botFlowId": "MC-2CDBD8AB38B6410A8C14EE503C9ADBCE",
91
- // "workflowId": 315,
92
- // "workflowName": "excel生成926(第3版)"
93
- // }
94
- // ]
95
- // }}
96
- ,
97
- showPrologue: true,
98
- model: 'fullscreen'
99
- // conversationId={8394}
100
- ,
101
- chatInputConfig: {
102
- enableFileUpload: true,
103
- enableVoiceChat: true,
104
- enableVoiceRecord: true
105
8
  },
106
- messageConfig: {
107
- enableRegenerate: true
108
- }
109
- }));
9
+ children: /*#__PURE__*/_jsx(GimiChatComponent, {
10
+ baseUrl: 't-mgateway.gaodunwangxiao.com',
11
+ businessType: "correction",
12
+ token: 'eyJhZ2VuY3kiOjk1NTU1LCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJHYW9kdW4iLCJpYXQiOjE3Njg4OTEyMzIsInN1YiI6IjE1Mjg4NzQiLCJpc3MiOiJHYW9kdW4iLCJleHAiOjE3NzE0ODMyMzJ9.6JpEbaJnxMKiER78Ko5irwVpGFfKOP1zxYSUYXPL00Y',
13
+ platform: "myun",
14
+ agentId: 79
15
+ // bussinessParams={
16
+ // {
17
+ // "ANSWER_ID": 19923,
18
+ // "QUESTION_ID": 77595
19
+ // }
20
+ // }
21
+ // agentDetail={{
22
+ // "agentIcon": "https://mstatic.gaodunwangxiao.com/image/2025/09/24/Excel建模-1758706152601.png",
23
+ // "agentId": 65,
24
+ // "agentIntroduce": "帮你智能搭建财务数据表格信息",
25
+ // "agentMode": "workflow",
26
+ // "agentName": "智能Excel建模",
27
+ // "agentState": 1,
28
+ // "agentType": "product",
29
+ // "botId": "BOT1757402118115",
30
+ // "botInstructionId": 0,
31
+ // "characterSetting": null,
32
+ // "conversationType": 2,
33
+ // "customizeInstructContent": null,
34
+ // "defaultPrompt": "我要生成一个{{输入模板名称,如PVM模板}},用于{{输入使用场景,如分析收入增长主要驱动力}}。关键数据:{{输入数据}}",
35
+ // "inputPrompt": "",
36
+ // "isCustomizeInstruct": 0,
37
+ // "isEnableRelated": 1,
38
+ // "isEnableVoiceCall": 0,
39
+ // "maxLength": null,
40
+ // "modeType": null,
41
+ // "openUploadFile": 1,
42
+ // "productId": 36842,
43
+ // "prologue": "帮你智能搭建财务数据表格信息",
44
+ // "questionList": [
45
+ // {
46
+ // "id": 127,
47
+ // "question": "会计是现代社会经济活动开展的重要基础,也是推动国际经贸往来的重要保障"
48
+ // },
49
+ // {
50
+ // "id": 128,
51
+ // "question": "全面预算的执行和监控中可以采用什么方式做好业务支持和预算管控?"
52
+ // }
53
+ // ],
54
+ // "showName": "智能Excel建模",
55
+ // "showNameStatus": 1,
56
+ // "sourceModelId": null,
57
+ // "temperature": null,
58
+ // "voiceConfigs": [
59
+ // {
60
+ // "emotions": [
61
+ // {
62
+ // "name": "悲伤",
63
+ // "param": "sad"
64
+ // },
65
+ // {
66
+ // "name": "恐惧",
67
+ // "param": "fear"
68
+ // },
69
+ // {
70
+ // "name": "厌恶",
71
+ // "param": "hate"
72
+ // },
73
+ // {
74
+ // "name": "中性",
75
+ // "param": "neutral"
76
+ // }
77
+ // ],
78
+ // "gender": "female",
79
+ // "isSupportMix": 0,
80
+ // "languageCode": "zh-CN",
81
+ // "languageId": 1,
82
+ // "languageName": "中文",
83
+ // "scene": "多情感",
84
+ // "toneId": 2,
85
+ // "toneName": "甜心小美(多情感)",
86
+ // "voiceType": "zh_female_tianxinxiaomei_emo_v2_mars_bigtts"
87
+ // }
88
+ // ],
89
+ // "workflowList": [
90
+ // {
91
+ // "botFlowId": "MC-2CDBD8AB38B6410A8C14EE503C9ADBCE",
92
+ // "workflowId": 315,
93
+ // "workflowName": "excel生成926(第3版)"
94
+ // }
95
+ // ]
96
+ // }}
97
+ ,
98
+ showPrologue: true,
99
+ model: 'fullscreen',
100
+ conversationId: 8394,
101
+ chatInputConfig: {
102
+ enableFileUpload: true,
103
+ enableVoiceChat: true,
104
+ enableVoiceRecord: true
105
+ },
106
+ messageConfig: {
107
+ enableRegenerate: true
108
+ }
109
+ })
110
+ });
110
111
  }
@@ -0,0 +1,109 @@
1
+ @charset "UTF-8";
2
+ .main {
3
+ width: 100%;
4
+ height: 100%;
5
+ display: flex;
6
+ gap: 20px;
7
+ overflow: hidden;
8
+ position: relative;
9
+ }
10
+
11
+ .chat_content {
12
+ flex: 1;
13
+ height: 100%;
14
+ display: flex;
15
+ flex-direction: column;
16
+ min-width: 0;
17
+ position: relative;
18
+ }
19
+
20
+ .scroll_wrapper {
21
+ flex: 1;
22
+ position: relative;
23
+ width: 100%;
24
+ min-height: 0;
25
+ }
26
+
27
+ .scroll_container {
28
+ height: 100%;
29
+ overflow-y: auto;
30
+ overflow-x: hidden;
31
+ width: 100%;
32
+ position: relative;
33
+ }
34
+ .scroll_container::-webkit-scrollbar {
35
+ width: 6px;
36
+ height: 6px;
37
+ }
38
+ .scroll_container::-webkit-scrollbar-thumb {
39
+ border-radius: 6px;
40
+ background: transparent;
41
+ }
42
+ .scroll_container::-webkit-scrollbar-track {
43
+ background: transparent;
44
+ border-radius: 6px;
45
+ }
46
+ .scroll_container.scrolling::-webkit-scrollbar-thumb {
47
+ background: rgba(144, 147, 153, 0.3);
48
+ }
49
+ .scroll_container::-webkit-scrollbar-thumb:hover {
50
+ background: rgba(144, 147, 153, 0.5);
51
+ }
52
+
53
+ .backBottomBtn {
54
+ position: absolute;
55
+ bottom: 20px;
56
+ right: 20px;
57
+ width: 40px;
58
+ height: 40px;
59
+ background: #fff;
60
+ border-radius: 50%;
61
+ box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ cursor: pointer;
66
+ z-index: 10;
67
+ transition: all 0.3s;
68
+ color: #1c1f23;
69
+ }
70
+ .backBottomBtn:hover {
71
+ background: #f2f3f5;
72
+ }
73
+
74
+ .content_header {
75
+ width: 100%;
76
+ height: 50px;
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ font-family: PingFangSC, PingFang SC;
81
+ font-weight: 500;
82
+ font-size: 16px;
83
+ color: #2e394c;
84
+ line-height: 22px;
85
+ text-align: center;
86
+ font-style: normal;
87
+ position: relative;
88
+ }
89
+ .content_header .content_header_title {
90
+ width: 340px;
91
+ height: 100%;
92
+ line-height: 50px;
93
+ overflow: hidden;
94
+ /* 隐藏溢出内容 */
95
+ white-space: nowrap;
96
+ /* 强制文本不换行 */
97
+ text-overflow: ellipsis;
98
+ /* 超出部分显示省略号 */
99
+ }
100
+ .content_header .text_shanow {
101
+ z-index: 5;
102
+ pointer-events: none;
103
+ background: linear-gradient(rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
104
+ width: 97%;
105
+ height: 32px;
106
+ position: absolute;
107
+ top: 100%;
108
+ left: 1px;
109
+ }
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
- import styles from "./index.module.scss";
2
+ import styles from "./index.module.css";
3
3
  import reTry from "../../assets/image/retry.png";
4
4
  import { FileStatus } from "../../interfaces/fileInterface";
5
5
  import { formatSizeToKB } from "../../utils/tools";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
8
  var UploadFile = function UploadFile(_ref) {
7
9
  var file = _ref.file,
8
10
  handleDelFile = _ref.handleDelFile,
@@ -45,46 +47,59 @@ var UploadFile = function UploadFile(_ref) {
45
47
 
46
48
  var isError = file.status === FileStatus.UPLOAD_FAILED || file.status === FileStatus.ANALYSE_FAILED || file.status === FileStatus.NETWORK_ERROR;
47
49
  var isLoading = [FileStatus.PADDING, FileStatus.RETRING, FileStatus.UPLOADING].includes(file.status);
48
- return /*#__PURE__*/React.createElement("div", {
49
- className: styles.uploadBox
50
- }, /*#__PURE__*/React.createElement("div", {
51
- className: styles.uploadIcon
52
- }, /*#__PURE__*/React.createElement("img", {
53
- src: fileIcon,
54
- alt: "file-icon"
55
- })), /*#__PURE__*/React.createElement("div", {
56
- className: styles.uploadName
57
- }, /*#__PURE__*/React.createElement("div", {
58
- className: styles.uploadfileName
59
- }, /*#__PURE__*/React.createElement("div", {
60
- className: styles.fileName
61
- }, fileName)), (fileSize || isError) && /*#__PURE__*/React.createElement("div", {
62
- className: styles.sizeText
63
- }, fileSize && !isError && /*#__PURE__*/React.createElement("span", {
64
- className: styles.size
65
- }, fileSize), isError && /*#__PURE__*/React.createElement("span", {
66
- className: styles.errorText
67
- }, file.status === FileStatus.UPLOAD_FAILED ? '上传失败' : file.status === FileStatus.NETWORK_ERROR ? '网络错误' : '解析失败'))), isLoading && /*#__PURE__*/React.createElement("div", {
68
- className: styles.uploadLoading
69
- }, /*#__PURE__*/React.createElement("span", null, file.status === FileStatus.PADDING ? '解析中...' : file.status === FileStatus.UPLOADING ? '上传中...' : '重试中...'), /*#__PURE__*/React.createElement("img", {
70
- src: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202509/07/0a0fa_20250907093927.gif",
71
- alt: "loading"
72
- })), isError && /*#__PURE__*/React.createElement("div", {
73
- className: styles.uploadError,
74
- onClick: handleRetryClick
75
- }, "\u91CD\u8BD5", /*#__PURE__*/React.createElement("img", {
76
- src: reTry,
77
- alt: "",
78
- style: {
79
- width: 16,
80
- height: 16
81
- }
82
- })), showDel && /*#__PURE__*/React.createElement("div", {
83
- className: styles.delIcon,
84
- onClick: handleDeleteClick
85
- }, /*#__PURE__*/React.createElement("img", {
86
- src: "https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/12/6fa3e_20250912145501.png",
87
- alt: "delete"
88
- })));
50
+ return /*#__PURE__*/_jsxs("div", {
51
+ className: styles.uploadBox,
52
+ children: [/*#__PURE__*/_jsx("div", {
53
+ className: styles.uploadIcon,
54
+ children: /*#__PURE__*/_jsx("img", {
55
+ src: fileIcon,
56
+ alt: "file-icon"
57
+ })
58
+ }), /*#__PURE__*/_jsxs("div", {
59
+ className: styles.uploadName,
60
+ children: [/*#__PURE__*/_jsx("div", {
61
+ className: styles.uploadfileName,
62
+ children: /*#__PURE__*/_jsx("div", {
63
+ className: styles.fileName,
64
+ children: fileName
65
+ })
66
+ }), (fileSize || isError) && /*#__PURE__*/_jsxs("div", {
67
+ className: styles.sizeText,
68
+ children: [fileSize && !isError && /*#__PURE__*/_jsx("span", {
69
+ className: styles.size,
70
+ children: fileSize
71
+ }), isError && /*#__PURE__*/_jsx("span", {
72
+ className: styles.errorText,
73
+ children: file.status === FileStatus.UPLOAD_FAILED ? '上传失败' : file.status === FileStatus.NETWORK_ERROR ? '网络错误' : '解析失败'
74
+ })]
75
+ })]
76
+ }), isLoading && /*#__PURE__*/_jsxs("div", {
77
+ className: styles.uploadLoading,
78
+ children: [/*#__PURE__*/_jsx("span", {
79
+ children: file.status === FileStatus.PADDING ? '解析中...' : file.status === FileStatus.UPLOADING ? '上传中...' : '重试中...'
80
+ }), /*#__PURE__*/_jsx("img", {
81
+ src: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202509/07/0a0fa_20250907093927.gif",
82
+ alt: "loading"
83
+ })]
84
+ }), isError && /*#__PURE__*/_jsxs("div", {
85
+ className: styles.uploadError,
86
+ onClick: handleRetryClick,
87
+ children: ["\u91CD\u8BD5", /*#__PURE__*/_jsx("img", {
88
+ src: reTry,
89
+ alt: "",
90
+ style: {
91
+ width: 16,
92
+ height: 16
93
+ }
94
+ })]
95
+ }), showDel && /*#__PURE__*/_jsx("div", {
96
+ className: styles.delIcon,
97
+ onClick: handleDeleteClick,
98
+ children: /*#__PURE__*/_jsx("img", {
99
+ src: "https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/12/6fa3e_20250912145501.png",
100
+ alt: "delete"
101
+ })
102
+ })]
103
+ });
89
104
  };
90
105
  export default UploadFile;
@@ -0,0 +1,119 @@
1
+ @charset "UTF-8";
2
+ .uploadBox {
3
+ display: flex;
4
+ align-items: center;
5
+ min-width: 228px; /* 最小宽度保证 */
6
+ max-width: 380px; /* 最大宽度限制 */
7
+ width: fit-content; /* 自动适应内容宽度 */
8
+ flex-shrink: 0;
9
+ border-radius: 12px;
10
+ background: var(---, #f2f3f7);
11
+ padding: 14px 16px 14px 12px;
12
+ margin-bottom: 12px;
13
+ position: relative;
14
+ }
15
+
16
+ .uploadIcon img {
17
+ width: 24px;
18
+ height: 22px;
19
+ margin-right: 8px;
20
+ }
21
+ .uploadIcon img img {
22
+ width: 100%;
23
+ height: 100%;
24
+ object-fit: cover;
25
+ }
26
+
27
+ .uploadName {
28
+ flex: 1; /* 让文件名占满剩余空间 */
29
+ color: #2e394c;
30
+ font-family: "PingFang SC";
31
+ font-size: 14px;
32
+ font-style: normal;
33
+ font-weight: 400;
34
+ line-height: normal;
35
+ min-width: 0; /* 关键:允许flex子元素缩小到内容尺寸以下 */
36
+ }
37
+ .uploadName .uploadfileName {
38
+ display: flex;
39
+ align-items: center;
40
+ max-width: 100%; /* 限制整个文件名区域宽度 */
41
+ }
42
+ .uploadName .uploadfileName .fileName {
43
+ /* 动态计算可用宽度,减去扩展名和间距 */
44
+ flex: 1;
45
+ min-width: 0; /* 允许文件名进一步缩小 */
46
+ white-space: nowrap;
47
+ overflow: hidden;
48
+ text-overflow: ellipsis;
49
+ margin-right: 4px; /* 与扩展名保持一点距离 */
50
+ }
51
+ .uploadName .uploadfileName .fileExtension {
52
+ white-space: nowrap; /* 确保扩展名不换行 */
53
+ color: #717F94; /* 可以给扩展名一个不同的颜色区分 */
54
+ }
55
+ .uploadName .sizeText .size {
56
+ margin-right: 4px;
57
+ font-size: 12px; /* 修复之前的语法错误,添加单位px */
58
+ color: #717F94;
59
+ }
60
+ .uploadName .sizeText .errorText {
61
+ color: #f33;
62
+ font-family: "PingFang SC";
63
+ font-size: 12px;
64
+ font-style: normal;
65
+ font-weight: 400;
66
+ line-height: normal;
67
+ }
68
+
69
+ .uploadStatus,
70
+ .uploadLoading {
71
+ display: flex;
72
+ align-items: center;
73
+ margin-left: 8px;
74
+ font-size: 14px;
75
+ flex-shrink: 0;
76
+ color: #717F94;
77
+ }
78
+ .uploadStatus img,
79
+ .uploadLoading img {
80
+ width: 18px;
81
+ height: 18px;
82
+ object-fit: cover;
83
+ margin-left: 5px;
84
+ }
85
+
86
+ .delIcon {
87
+ position: absolute;
88
+ right: -7px;
89
+ top: -5px;
90
+ width: 14px;
91
+ height: 14px;
92
+ background-color: rgba(0, 0, 0, 0.6);
93
+ color: white;
94
+ border-radius: 50%;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ cursor: pointer;
99
+ background-color: white;
100
+ }
101
+ .delIcon img {
102
+ width: 100%;
103
+ height: 100%;
104
+ object-fit: cover;
105
+ }
106
+
107
+ .uploadError {
108
+ cursor: pointer;
109
+ color: #4086ff;
110
+ text-align: right;
111
+ font-family: "PingFang SC";
112
+ font-size: 14px;
113
+ font-style: normal;
114
+ font-weight: 400;
115
+ line-height: normal;
116
+ margin-left: 20px;
117
+ display: flex;
118
+ align-items: center;
119
+ }
@@ -9,6 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
9
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React from 'react';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
12
13
  export default function VoiceBars(_ref) {
13
14
  var _ref$parentWidth = _ref.parentWidth,
14
15
  parentWidth = _ref$parentWidth === void 0 ? undefined : _ref$parentWidth;
@@ -151,24 +152,26 @@ export default function VoiceBars(_ref) {
151
152
  }
152
153
  };
153
154
  }, []);
154
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
155
- style: {
156
- display: 'flex',
157
- alignItems: 'center',
158
- justifyContent: 'center',
159
- height: 40,
160
- gap: 6
161
- }
162
- }, volumes.map(function (h, i) {
163
- return /*#__PURE__*/React.createElement("div", {
164
- key: i,
155
+ return /*#__PURE__*/_jsx("div", {
156
+ children: /*#__PURE__*/_jsx("div", {
165
157
  style: {
166
- width: 6,
167
- height: h,
168
- background: '#4f8cff',
169
- borderRadius: 4,
170
- transition: 'height 0.1s ease-out'
171
- }
172
- });
173
- })));
158
+ display: 'flex',
159
+ alignItems: 'center',
160
+ justifyContent: 'center',
161
+ height: 40,
162
+ gap: 6
163
+ },
164
+ children: volumes.map(function (h, i) {
165
+ return /*#__PURE__*/_jsx("div", {
166
+ style: {
167
+ width: 6,
168
+ height: h,
169
+ background: '#4f8cff',
170
+ borderRadius: 4,
171
+ transition: 'height 0.1s ease-out'
172
+ }
173
+ }, i);
174
+ })
175
+ })
176
+ });
174
177
  }
@@ -12,10 +12,13 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React from 'react';
14
14
  import classNames from 'classnames';
15
- import styles from "./index.module.scss";
15
+ import styles from "./index.module.css";
16
16
  import NoMicrophoneModalContent from "../no-microphone-root";
17
17
  import { useAppDispatch, useAppSelector } from "../../store/hooks";
18
18
  import { setShowMicWarning } from "../../store/slices/gimiMenuSlice";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { Fragment as _Fragment } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
22
  var VoiceCheckDialog = function VoiceCheckDialog(_ref) {
20
23
  var _layout$x, _layout$y;
21
24
  var className = _ref.className,
@@ -142,22 +145,26 @@ var VoiceCheckDialog = function VoiceCheckDialog(_ref) {
142
145
  showMicWarning: false
143
146
  }));
144
147
  };
145
- return /*#__PURE__*/React.createElement(React.Fragment, null, trigger && /*#__PURE__*/React.createElement("div", {
146
- ref: triggerRef,
147
- style: {
148
- display: 'flex'
149
- }
150
- }, trigger), showMicWarning && /*#__PURE__*/React.createElement("div", {
151
- ref: dialogRef,
152
- className: classNames(styles['voice-check-dialog'], className),
153
- style: _objectSpread({
154
- left: "".concat((_layout$x = layout === null || layout === void 0 ? void 0 : layout.x) !== null && _layout$x !== void 0 ? _layout$x : 0, "px"),
155
- top: "".concat((_layout$y = layout === null || layout === void 0 ? void 0 : layout.y) !== null && _layout$y !== void 0 ? _layout$y : 0, "px"),
156
- opacity: layout ? 1 : 0,
157
- visibility: layout ? 'visible' : 'hidden'
158
- }, style)
159
- }, /*#__PURE__*/React.createElement(NoMicrophoneModalContent, {
160
- onOk: onCancel
161
- })));
148
+ return /*#__PURE__*/_jsxs(_Fragment, {
149
+ children: [trigger && /*#__PURE__*/_jsx("div", {
150
+ ref: triggerRef,
151
+ style: {
152
+ display: 'flex'
153
+ },
154
+ children: trigger
155
+ }), showMicWarning && /*#__PURE__*/_jsx("div", {
156
+ ref: dialogRef,
157
+ className: classNames(styles['voice-check-dialog'], className),
158
+ style: _objectSpread({
159
+ left: "".concat((_layout$x = layout === null || layout === void 0 ? void 0 : layout.x) !== null && _layout$x !== void 0 ? _layout$x : 0, "px"),
160
+ top: "".concat((_layout$y = layout === null || layout === void 0 ? void 0 : layout.y) !== null && _layout$y !== void 0 ? _layout$y : 0, "px"),
161
+ opacity: layout ? 1 : 0,
162
+ visibility: layout ? 'visible' : 'hidden'
163
+ }, style),
164
+ children: /*#__PURE__*/_jsx(NoMicrophoneModalContent, {
165
+ onOk: onCancel
166
+ })
167
+ })]
168
+ });
162
169
  };
163
170
  export default VoiceCheckDialog;