@gientech/modual 2.0.8 → 2.0.9

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 (415) hide show
  1. package/.editorconfig +38 -0
  2. package/.prettierignore +16 -0
  3. package/.prettierrc +17 -0
  4. package/INSTALL_TROUBLESHOOTING.md +316 -0
  5. package/USAGE.md +247 -0
  6. package/bash.exe.stackdump +40 -0
  7. package/components.json +21 -0
  8. package/dist/README.md +761 -0
  9. package/dist/package.json +68 -0
  10. package/doc_assets/2.png +0 -0
  11. package/doc_assets/demo.md +27 -0
  12. package/doc_assets/demos/dist-app/assets/index.Dh-ZAS9Z.css +2 -0
  13. package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js +23699 -0
  14. package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js.map +1 -0
  15. package/doc_assets/demos/dist-app/index.html +14 -0
  16. package/doc_assets/demos/dist-app/vite.svg +1 -0
  17. package/doc_assets/images/1.png +0 -0
  18. package/doc_assets/images/3.png +0 -0
  19. package/doc_assets/images/component-screenshot.png +1 -0
  20. package/doc_assets/install.md +5 -0
  21. package/doc_assets/v2.0.7/345/217/230/346/233/264/346/200/273/347/273/223.md +115 -0
  22. package/doc_assets//346/226/271/346/241/210//344/274/230/345/214/226/346/226/271/346/241/210-/345/244/232/344/274/232/350/257/235SSE/350/277/236/346/216/245/347/256/241/347/220/206.md +504 -0
  23. package/eslint.config.js +92 -0
  24. package/index.html +13 -0
  25. package/package.json +103 -41
  26. package/package.json.demo-backup +109 -0
  27. package/postcss.config.cjs +19 -0
  28. package/public/icons/answerAwartar.png +0 -0
  29. package/public/icons/docx-file.png +0 -0
  30. package/public/icons/folder.png +0 -0
  31. package/public/icons/html.png +0 -0
  32. package/public/icons/image.png +0 -0
  33. package/public/icons/jpg-file.png +0 -0
  34. package/public/icons/json.png +0 -0
  35. package/public/icons/md.png +0 -0
  36. package/public/icons/pdf.png +0 -0
  37. package/public/icons/pptx.png +0 -0
  38. package/public/icons/questionAwartar.png +0 -0
  39. package/public/icons/sheets.png +0 -0
  40. package/public/icons/txt.png +0 -0
  41. package/public/icons/xlsx.png +0 -0
  42. package/public/vite.svg +1 -0
  43. package/public/worker/pdf.worker.min.js +22 -0
  44. package/scripts/README.md +133 -0
  45. package/scripts/build-demo.js +88 -0
  46. package/scripts/decrypt-api-key.js +95 -0
  47. package/scripts/demo-selector.js +216 -0
  48. package/scripts/dev-demo.js +76 -0
  49. package/scripts/preview-demo.js +130 -0
  50. package/scripts/run-demo.bat +34 -0
  51. package/src/assets/img/close.png +0 -0
  52. package/src/assets/img/database.png +0 -0
  53. package/src/assets/img/downArrow.png +0 -0
  54. package/src/assets/img/downLoad.png +0 -0
  55. package/src/assets/img/excel.png +0 -0
  56. package/src/assets/img/graphIcon.png +0 -0
  57. package/src/assets/img/img.png +0 -0
  58. package/src/assets/img/pdf.png +0 -0
  59. package/src/assets/img/ppt.png +0 -0
  60. package/src/assets/img/singleQa.png +0 -0
  61. package/src/assets/img/txt.png +0 -0
  62. package/src/assets/img/webSearch.png +0 -0
  63. package/src/assets/img/word.png +0 -0
  64. package/src/assets/login/homeBg.png +0 -0
  65. package/src/assets/login/left.jpg +0 -0
  66. package/src/assets/login/logoImg.png +0 -0
  67. package/src/examples/ConversationAssistantPage/index.tsx +41 -0
  68. package/src/examples/Demo/index.tsx +12 -0
  69. package/src/examples/LoginPage/index.tsx +18 -0
  70. package/src/examples/chat/components/DrawerGraphPreview.tsx +78 -0
  71. package/src/examples/chat/index.tsx +166 -0
  72. package/src/examples/chat/logo03.png +0 -0
  73. package/src/examples/gientechStreamFilesReader/index.tsx +951 -0
  74. package/src/examples/headlessChat/assets/mind.svg +6 -0
  75. package/src/examples/headlessChat/assets/net.svg +7 -0
  76. package/src/examples/headlessChat/index.tsx +285 -0
  77. package/src/examples/ragDatabaseDataPage/index.tsx +40 -0
  78. package/src/examples/ragDatabaseIdPage/index.tsx +47 -0
  79. package/src/examples/ragDatabasePage/index.tsx +36 -0
  80. package/src/examples/ragModelManagePage/index.tsx +38 -0
  81. package/src/examples/ragSearchPage/index.tsx +0 -0
  82. package/src/examples/ragSensitiveWordsPage/index.tsx +32 -0
  83. package/src/examples/streamFiles/index.tsx +417 -0
  84. package/src/lib_enter.ts +43 -0
  85. package/src/main.tsx +5 -0
  86. package/src/main.tsx.backup +5 -0
  87. package/src/modules/CHAT_UNIFICATION_PLAN.md +324 -0
  88. package/src/modules/assistantConfig/assets/databse.svg +6 -0
  89. package/src/modules/assistantConfig/assets/empty.png +0 -0
  90. package/src/modules/assistantConfig/assets/graph.svg +4 -0
  91. package/src/modules/assistantConfig/assets/knowledge.svg +4 -0
  92. package/src/modules/assistantConfig/assets/sensitive.svg +5 -0
  93. package/src/modules/assistantConfig/components/Database.tsx +171 -0
  94. package/src/modules/assistantConfig/components/Graph.tsx +177 -0
  95. package/src/modules/assistantConfig/components/Knowledge.tsx +276 -0
  96. package/src/modules/assistantConfig/components/NotFoundContent.tsx +21 -0
  97. package/src/modules/assistantConfig/components/Paragraph.tsx +51 -0
  98. package/src/modules/assistantConfig/components/ParamsItem.tsx +39 -0
  99. package/src/modules/assistantConfig/components/ResourceBinderItem.tsx +133 -0
  100. package/src/modules/assistantConfig/components/SearchableSelector.tsx +500 -0
  101. package/src/modules/assistantConfig/components/Sensitive.tsx +221 -0
  102. package/src/modules/assistantConfig/components/SliderInput.tsx +65 -0
  103. package/src/modules/assistantConfig/constants.tsx +75 -0
  104. package/src/modules/assistantConfig/index.tsx +710 -0
  105. package/src/modules/assistantConfig/server.ts +262 -0
  106. package/src/modules/chat/Conversations/Item.tsx +167 -0
  107. package/src/modules/chat/Conversations/List.tsx +210 -0
  108. package/src/modules/chat/Conversations/groupByTime.ts +39 -0
  109. package/src/modules/chat/Conversations/index.tsx +252 -0
  110. package/src/modules/chat/ReferenceBar.tsx +622 -0
  111. package/src/modules/chat/constants.tsx +57 -0
  112. package/src/modules/chat/index.tsx +2449 -0
  113. package/src/modules/chat/referenceCom/DeleteModal.tsx +75 -0
  114. package/src/modules/chat/referenceCom/DrawerContent.tsx +136 -0
  115. package/src/modules/chat/referenceCom/DrawerDatabase.tsx +102 -0
  116. package/src/modules/chat/referenceCom/DrawerGraphPreview.tsx +86 -0
  117. package/src/modules/chat/referenceCom/DrawerPreview.tsx +73 -0
  118. package/src/modules/chat/referenceCom/DrawerTitle.tsx +26 -0
  119. package/src/modules/chat/referenceCom/RenameModal.tsx +86 -0
  120. package/src/modules/chat/referenceCom/TagCom.tsx +30 -0
  121. package/src/modules/chat/style.less +3 -0
  122. package/src/modules/chat/types.ts +17 -0
  123. package/src/modules/chat/utils/index.ts +348 -0
  124. package/src/modules/database/CreateModal.tsx +403 -0
  125. package/src/modules/database/assets/Doris.png +0 -0
  126. package/src/modules/database/assets/PostgreSQL.png +0 -0
  127. package/src/modules/database/assets/SQLServer.png +0 -0
  128. package/src/modules/database/assets/database.svg +11 -0
  129. package/src/modules/database/assets/database_add.svg +53 -0
  130. package/src/modules/database/assets/database_connect.svg +66 -0
  131. package/src/modules/database/assets/database_upload.svg +29 -0
  132. package/src/modules/database/assets/empty.png +0 -0
  133. package/src/modules/database/assets/mysql.svg +14 -0
  134. package/src/modules/database/index.tsx +477 -0
  135. package/src/modules/database/server.ts +196 -0
  136. package/src/modules/databaseId/CustomCom.tsx +156 -0
  137. package/src/modules/databaseId/EditConfig.tsx +280 -0
  138. package/src/modules/databaseId/UploadDrawer.tsx +535 -0
  139. package/src/modules/databaseId/assets/aiOptimize.svg +10 -0
  140. package/src/modules/databaseId/assets/empty.png +0 -0
  141. package/src/modules/databaseId/assets/template.svg +6 -0
  142. package/src/modules/databaseId/assets/upload.svg +9 -0
  143. package/src/modules/databaseId/assets/useTemp.svg +6 -0
  144. package/src/modules/databaseId/index.tsx +769 -0
  145. package/src/modules/databaseId/server.ts +286 -0
  146. package/src/modules/databaseId/style.css +5 -0
  147. package/src/modules/databaseTable/EditRowDrawer.tsx +124 -0
  148. package/src/modules/databaseTable/index.tsx +359 -0
  149. package/src/modules/databaseTable/server.ts +180 -0
  150. package/src/modules/headlessChat/ReferenceBar.tsx +783 -0
  151. package/src/modules/headlessChat/constants.tsx +54 -0
  152. package/src/modules/headlessChat/index.tsx +1782 -0
  153. package/src/modules/headlessChat/referenceCom/DeleteModal.tsx +75 -0
  154. package/src/modules/headlessChat/referenceCom/DrawerContent.tsx +136 -0
  155. package/src/modules/headlessChat/referenceCom/DrawerDatabase.tsx +102 -0
  156. package/src/modules/headlessChat/referenceCom/DrawerGraphPreview.tsx +86 -0
  157. package/src/modules/headlessChat/referenceCom/DrawerPreview.tsx +73 -0
  158. package/src/modules/headlessChat/referenceCom/DrawerTitle.tsx +26 -0
  159. package/src/modules/headlessChat/referenceCom/RenameModal.tsx +86 -0
  160. package/src/modules/headlessChat/referenceCom/TagCom.tsx +30 -0
  161. package/src/modules/headlessChat/style.less +3 -0
  162. package/src/modules/headlessChat/types.ts +23 -0
  163. package/src/modules/headlessChat/utils/index.ts +348 -0
  164. package/src/modules/login/components/Login/LoginBox/index.tsx +102 -0
  165. package/src/modules/login/components/Login/RegisterBox/index.tsx +180 -0
  166. package/src/modules/login/components/Login/index.tsx +100 -0
  167. package/src/modules/login/index.tsx +106 -0
  168. package/src/modules/login/style.css +3 -0
  169. package/src/modules/login/useServices.ts +53 -0
  170. package/src/modules/login/utils.ts +42 -0
  171. package/src/modules/modelManage/ConfigDrawer.tsx +249 -0
  172. package/src/modules/modelManage/ReplaceModal.tsx +124 -0
  173. package/src/modules/modelManage/assets/empty.png +0 -0
  174. package/src/modules/modelManage/const.ts +51 -0
  175. package/src/modules/modelManage/index.tsx +606 -0
  176. package/src/modules/modelManage/server.ts +223 -0
  177. package/src/modules/nodegraph/index.tsx +1 -0
  178. package/src/modules/search/assets/Icon-history.svg +8 -0
  179. package/src/modules/search/assets/answerAwartar.png +0 -0
  180. package/src/modules/search/assets/doc.png +0 -0
  181. package/src/modules/search/assets/genera.gif +0 -0
  182. package/src/modules/search/assets/icon-robot.svg +9 -0
  183. package/src/modules/search/assets/icon-search-bar.svg +14 -0
  184. package/src/modules/search/assets/icon-sub-title.svg +3 -0
  185. package/src/modules/search/assets/icon-title.svg +9 -0
  186. package/src/modules/search/assets/icon-zoomOut.svg +9 -0
  187. package/src/modules/search/assets/iconAi.svg +9 -0
  188. package/src/modules/search/assets/pdf.png +0 -0
  189. package/src/modules/search/assets/ppt.png +0 -0
  190. package/src/modules/search/assets/search.svg +3 -0
  191. package/src/modules/search/assets/selected.svg +4 -0
  192. package/src/modules/search/assets/txt.png +0 -0
  193. package/src/modules/search/assets/xls.png +0 -0
  194. package/src/modules/search/components/AssisSelect.tsx +137 -0
  195. package/src/modules/search/components/Editor/ChatViewEditor.tsx +261 -0
  196. package/src/modules/search/components/Editor/aichat.css +1 -0
  197. package/src/modules/search/components/Editor/constant.ts +13 -0
  198. package/src/modules/search/components/Editor/index.tsx +113 -0
  199. package/src/modules/search/components/Editor/plugins/autofomatRules.ts +332 -0
  200. package/src/modules/search/components/Editor/plugins/convertImgPlugins.tsx +20 -0
  201. package/src/modules/search/components/Editor/plugins/createIndexes.tsx +38 -0
  202. package/src/modules/search/components/Editor/plugins/displayer.ts +298 -0
  203. package/src/modules/search/components/Editor/plugins/imageClick.tsx +32 -0
  204. package/src/modules/search/components/Editor/plugins/myplugin.tsx +98 -0
  205. package/src/modules/search/components/Editor/ui/avatar.tsx +19 -0
  206. package/src/modules/search/components/Editor/ui/blockquote-element.tsx +21 -0
  207. package/src/modules/search/components/Editor/ui/button.tsx +58 -0
  208. package/src/modules/search/components/Editor/ui/calendar.tsx +68 -0
  209. package/src/modules/search/components/Editor/ui/caption.tsx +46 -0
  210. package/src/modules/search/components/Editor/ui/checkbox.tsx +27 -0
  211. package/src/modules/search/components/Editor/ui/code-block-combobox.tsx +188 -0
  212. package/src/modules/search/components/Editor/ui/code-block-element.css +434 -0
  213. package/src/modules/search/components/Editor/ui/code-block-element.tsx +39 -0
  214. package/src/modules/search/components/Editor/ui/code-leaf.tsx +24 -0
  215. package/src/modules/search/components/Editor/ui/code-line-element.tsx +10 -0
  216. package/src/modules/search/components/Editor/ui/code-syntax-leaf.tsx +21 -0
  217. package/src/modules/search/components/Editor/ui/column-element.tsx +30 -0
  218. package/src/modules/search/components/Editor/ui/column-group-element.tsx +94 -0
  219. package/src/modules/search/components/Editor/ui/command.tsx +75 -0
  220. package/src/modules/search/components/Editor/ui/comment-avatar.tsx +22 -0
  221. package/src/modules/search/components/Editor/ui/comment-create-form.tsx +37 -0
  222. package/src/modules/search/components/Editor/ui/comment-item.tsx +74 -0
  223. package/src/modules/search/components/Editor/ui/comment-leaf.tsx +49 -0
  224. package/src/modules/search/components/Editor/ui/comment-more-dropdown.tsx +42 -0
  225. package/src/modules/search/components/Editor/ui/comment-reply-items.tsx +22 -0
  226. package/src/modules/search/components/Editor/ui/comment-resolve-button.tsx +32 -0
  227. package/src/modules/search/components/Editor/ui/comment-value.tsx +34 -0
  228. package/src/modules/search/components/Editor/ui/comments-popover.tsx +63 -0
  229. package/src/modules/search/components/Editor/ui/date-element.tsx +83 -0
  230. package/src/modules/search/components/Editor/ui/dialog.tsx +63 -0
  231. package/src/modules/search/components/Editor/ui/draggable.tsx +177 -0
  232. package/src/modules/search/components/Editor/ui/dropdown-menu.tsx +180 -0
  233. package/src/modules/search/components/Editor/ui/emoji-input-element.tsx +85 -0
  234. package/src/modules/search/components/Editor/ui/excalidraw-element.tsx +28 -0
  235. package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.tsx +76 -0
  236. package/src/modules/search/components/Editor/ui/fixed-toolbar.tsx +8 -0
  237. package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.tsx +51 -0
  238. package/src/modules/search/components/Editor/ui/floating-toolbar.tsx +77 -0
  239. package/src/modules/search/components/Editor/ui/heading-element.tsx +48 -0
  240. package/src/modules/search/components/Editor/ui/highlight-leaf.tsx +17 -0
  241. package/src/modules/search/components/Editor/ui/hr-element.tsx +30 -0
  242. package/src/modules/search/components/Editor/ui/icons.tsx +267 -0
  243. package/src/modules/search/components/Editor/ui/image-element.tsx +74 -0
  244. package/src/modules/search/components/Editor/ui/inline-combobox.tsx +368 -0
  245. package/src/modules/search/components/Editor/ui/input.tsx +25 -0
  246. package/src/modules/search/components/Editor/ui/insert-dropdown-menu.tsx +218 -0
  247. package/src/modules/search/components/Editor/ui/kbd-leaf.tsx +20 -0
  248. package/src/modules/search/components/Editor/ui/link-element.tsx +29 -0
  249. package/src/modules/search/components/Editor/ui/link-floating-toolbar.tsx +161 -0
  250. package/src/modules/search/components/Editor/ui/list-element.tsx +30 -0
  251. package/src/modules/search/components/Editor/ui/mark-toolbar-button.tsx +24 -0
  252. package/src/modules/search/components/Editor/ui/media-embed-element.tsx +133 -0
  253. package/src/modules/search/components/Editor/ui/media-popover.tsx +97 -0
  254. package/src/modules/search/components/Editor/ui/mention-element.tsx +43 -0
  255. package/src/modules/search/components/Editor/ui/mention-input-element.tsx +141 -0
  256. package/src/modules/search/components/Editor/ui/mode-dropdown-menu.tsx +93 -0
  257. package/src/modules/search/components/Editor/ui/more-dropdown-menu.tsx +67 -0
  258. package/src/modules/search/components/Editor/ui/paragraph-element.tsx +4 -0
  259. package/src/modules/search/components/Editor/ui/placeholder.tsx +52 -0
  260. package/src/modules/search/components/Editor/ui/popover.tsx +32 -0
  261. package/src/modules/search/components/Editor/ui/resizable.tsx +66 -0
  262. package/src/modules/search/components/Editor/ui/separator.tsx +25 -0
  263. package/src/modules/search/components/Editor/ui/style.less +12 -0
  264. package/src/modules/search/components/Editor/ui/table-cell-element.tsx +143 -0
  265. package/src/modules/search/components/Editor/ui/table-element.tsx +243 -0
  266. package/src/modules/search/components/Editor/ui/table-row-element.tsx +22 -0
  267. package/src/modules/search/components/Editor/ui/tableValue.tsx +135 -0
  268. package/src/modules/search/components/Editor/ui/todo-list-element.tsx +43 -0
  269. package/src/modules/search/components/Editor/ui/toggle-element.tsx +31 -0
  270. package/src/modules/search/components/Editor/ui/toolbar.tsx +157 -0
  271. package/src/modules/search/components/Editor/ui/tooltip.tsx +65 -0
  272. package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.tsx +160 -0
  273. package/src/modules/search/components/Editor/ui/with-draggables.tsx +175 -0
  274. package/src/modules/search/components/FileList.tsx +287 -0
  275. package/src/modules/search/components/ImageGroupView/index.tsx +85 -0
  276. package/src/modules/search/components/ResultContent.tsx +232 -0
  277. package/src/modules/search/components/SearchInput.tsx +232 -0
  278. package/src/modules/search/components/SearchLanding.tsx +74 -0
  279. package/src/modules/search/components/SearchView.tsx +563 -0
  280. package/src/modules/search/components/SimpleEditor.tsx +158 -0
  281. package/src/modules/search/components/SimpleFileList.tsx +215 -0
  282. package/src/modules/search/index.tsx +10 -0
  283. package/src/modules/search/reademe.md +1 -0
  284. package/src/modules/search/servers/apis.tsx +19 -0
  285. package/src/modules/search/servers/index.ts +184 -0
  286. package/src/modules/search/style.less +503 -0
  287. package/src/modules/search/type.ts +22 -0
  288. package/src/modules/search/utils.ts +34 -0
  289. package/src/modules/sensitive/index.tsx +313 -0
  290. package/src/modules/sensitive/server.ts +122 -0
  291. package/src/modules/streamFilesReader/GientechStreamReader.tsx +1625 -0
  292. package/src/modules/streamFilesReader/components/Header/Toolbar.tsx +0 -0
  293. package/src/modules/streamFilesReader/components/Header/index.tsx +297 -0
  294. package/src/modules/streamFilesReader/index.tsx +3 -0
  295. package/src/style.css +6 -0
  296. package/src/type.d.ts +0 -0
  297. package/src/utils/commonFn.tsx +111 -0
  298. package/src/utils/decryptApiKey.ts +40 -0
  299. package/src/utils/gientechCommon/components/AppError.tsx +32 -0
  300. package/src/utils/gientechCommon/components/AppLoading.tsx +75 -0
  301. package/src/utils/gientechCommon/components/DeleteModal.tsx +75 -0
  302. package/src/utils/gientechCommon/components/DisplayError.tsx +33 -0
  303. package/src/utils/gientechCommon/components/DisplayLoading.tsx +38 -0
  304. package/src/utils/gientechCommon/components/FeedBackModal.tsx +319 -0
  305. package/src/utils/gientechCommon/components/FileCardCommon.tsx +82 -0
  306. package/src/utils/gientechCommon/components/FileManager/index.tsx +418 -0
  307. package/src/utils/gientechCommon/components/FileManager/style.css +5 -0
  308. package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +581 -0
  309. package/src/utils/gientechCommon/components/Messages/ReferenceCard.tsx +359 -0
  310. package/src/utils/gientechCommon/components/Messages/RetriveItem.tsx +245 -0
  311. package/src/utils/gientechCommon/components/Messages/WebRetriveItem.tsx +209 -0
  312. package/src/utils/gientechCommon/components/Messages/defaultBot.png +0 -0
  313. package/src/utils/gientechCommon/components/Messages/defaultStyleSet.tsx +148 -0
  314. package/src/utils/gientechCommon/components/Messages/defaultWeLogo.svg +14 -0
  315. package/src/utils/gientechCommon/components/RenameModal.tsx +86 -0
  316. package/src/utils/gientechCommon/components/style.less +11 -0
  317. package/src/utils/gientechCommon/configs/commonConfig.ts +2 -0
  318. package/src/utils/gientechCommon/configs/senderConfig.ts +0 -0
  319. package/src/utils/gientechCommon/configs/stylesConfig.ts +142 -0
  320. package/src/utils/gientechCommon/hooks/AichatUseController.tsx +417 -0
  321. package/src/utils/gientechCommon/hooks/useFileDisplayTools.tsx +251 -0
  322. package/src/utils/gientechCommon/hooks/useFileManager.ts +208 -0
  323. package/src/utils/gientechCommon/slate/converters/deserializers.ts +763 -0
  324. package/src/utils/gientechCommon/slate/converters/mockData.ts +232 -0
  325. package/src/utils/gientechCommon/slate/converters/slateConverters.ts +258 -0
  326. package/src/utils/gientechCommon/slate/richElements/index.tsx +499 -0
  327. package/src/utils/gientechCommon/utils/fileUtils.ts +86 -0
  328. package/src/utils/gientechCommon/utils/request.ts +37 -0
  329. package/src/utils/gientechCommon/utils/serverFn.ts +172 -0
  330. package/src/utils/index.tsx +142 -0
  331. package/src/utils/testconfigs/demologin/index.tsx +32 -0
  332. package/src/utils/testconfigs/index.ts +59 -0
  333. package/src/vite-env.d.ts +42 -0
  334. package/stats.html +4949 -0
  335. package/tailwind.config.js +170 -0
  336. package/tsconfig.app.json +30 -0
  337. package/tsconfig.app.tsbuildinfo +11 -0
  338. package/tsconfig.json +13 -0
  339. package/tsconfig.node.json +22 -0
  340. package/tsconfig.node.tsbuildinfo +1 -0
  341. package/vite.config.app.ts +93 -0
  342. package/vite.config.ts +232 -0
  343. package/workflows/release.yml +60 -0
  344. package//346/215/242/350/241/214/346/240/274/345/274/217/344/277/235/346/214/201/344/274/230/345/214/226/346/226/271/346/241/210.md +359 -0
  345. /package/{assets → dist/assets}/Doris.png +0 -0
  346. /package/{assets → dist/assets}/GientechStreamReader-CNj6Rcm7.js +0 -0
  347. /package/{assets → dist/assets}/PostgreSQL.png +0 -0
  348. /package/{assets → dist/assets}/SQLServer.png +0 -0
  349. /package/{assets → dist/assets}/database.svg +0 -0
  350. /package/{assets → dist/assets}/database_add.svg +0 -0
  351. /package/{assets → dist/assets}/database_connect.svg +0 -0
  352. /package/{assets → dist/assets}/database_upload.svg +0 -0
  353. /package/{assets → dist/assets}/databse.svg +0 -0
  354. /package/{assets → dist/assets}/defaultWeLogo.svg +0 -0
  355. /package/{assets → dist/assets}/empty.png +0 -0
  356. /package/{assets → dist/assets}/graph.svg +0 -0
  357. /package/{assets → dist/assets}/homeBg.png +0 -0
  358. /package/{assets → dist/assets}/index-B2yNvzjy.js +0 -0
  359. /package/{assets → dist/assets}/index-BJv0t0eJ.js +0 -0
  360. /package/{assets → dist/assets}/index-BKe5FgcC.js +0 -0
  361. /package/{assets → dist/assets}/index-CU45mVZ4.js +0 -0
  362. /package/{assets → dist/assets}/index-CpW6Dhpp.js +0 -0
  363. /package/{assets → dist/assets}/index-D72cKELw.js +0 -0
  364. /package/{assets → dist/assets}/index-DdVFXD_y.js +0 -0
  365. /package/{assets → dist/assets}/index-DrkSoKz6.js +0 -0
  366. /package/{assets → dist/assets}/index-ZopkeZtI.js +0 -0
  367. /package/{assets → dist/assets}/index-g-SUxfJH.js +0 -0
  368. /package/{assets → dist/assets}/index-j0kQJd0a.js +0 -0
  369. /package/{assets → dist/assets}/knowledge.svg +0 -0
  370. /package/{assets → dist/assets}/left.jpg +0 -0
  371. /package/{assets → dist/assets}/logoImg.png +0 -0
  372. /package/{assets → dist/assets}/mysql.svg +0 -0
  373. /package/{assets → dist/assets}/plus-V9zUoSq6.js +0 -0
  374. /package/{assets → dist/assets}/sensitive.svg +0 -0
  375. /package/{assets → dist/assets}/style-CGmZ5osp.js +0 -0
  376. /package/{assets → dist/assets}/style.css +0 -0
  377. /package/{assets → dist/assets}/style2.css +0 -0
  378. /package/{assets → dist/assets}/style3.css +0 -0
  379. /package/{assets → dist/assets}/style4.css +0 -0
  380. /package/{assets → dist/assets}/worker-BbpylX7l.js +0 -0
  381. /package/{assets → dist/assets}/x-CnaaLGJF.js +0 -0
  382. /package/{assistantConfig.d.ts → dist/assistantConfig.d.ts} +0 -0
  383. /package/{assistantConfig.js → dist/assistantConfig.js} +0 -0
  384. /package/{chat.d.ts → dist/chat.d.ts} +0 -0
  385. /package/{chat.js → dist/chat.js} +0 -0
  386. /package/{database.d.ts → dist/database.d.ts} +0 -0
  387. /package/{database.js → dist/database.js} +0 -0
  388. /package/{databaseId.d.ts → dist/databaseId.d.ts} +0 -0
  389. /package/{databaseId.js → dist/databaseId.js} +0 -0
  390. /package/{databaseTable.d.ts → dist/databaseTable.d.ts} +0 -0
  391. /package/{databaseTable.js → dist/databaseTable.js} +0 -0
  392. /package/{icons → dist/icons}/answerAwartar.png +0 -0
  393. /package/{icons → dist/icons}/docx-file.png +0 -0
  394. /package/{icons → dist/icons}/folder.png +0 -0
  395. /package/{icons → dist/icons}/html.png +0 -0
  396. /package/{icons → dist/icons}/image.png +0 -0
  397. /package/{icons → dist/icons}/jpg-file.png +0 -0
  398. /package/{icons → dist/icons}/json.png +0 -0
  399. /package/{icons → dist/icons}/md.png +0 -0
  400. /package/{icons → dist/icons}/pdf.png +0 -0
  401. /package/{icons → dist/icons}/pptx.png +0 -0
  402. /package/{icons → dist/icons}/questionAwartar.png +0 -0
  403. /package/{icons → dist/icons}/sheets.png +0 -0
  404. /package/{icons → dist/icons}/txt.png +0 -0
  405. /package/{icons → dist/icons}/xlsx.png +0 -0
  406. /package/{index.d.ts → dist/index.d.ts} +0 -0
  407. /package/{index.js → dist/index.js} +0 -0
  408. /package/{modelManage.d.ts → dist/modelManage.d.ts} +0 -0
  409. /package/{modelManage.js → dist/modelManage.js} +0 -0
  410. /package/{sensitive.d.ts → dist/sensitive.d.ts} +0 -0
  411. /package/{sensitive.js → dist/sensitive.js} +0 -0
  412. /package/{streamFilesReader.d.ts → dist/streamFilesReader.d.ts} +0 -0
  413. /package/{streamFilesReader.js → dist/streamFilesReader.js} +0 -0
  414. /package/{vite.svg → dist/vite.svg} +0 -0
  415. /package/{worker → dist/worker}/pdf.worker.min.js +0 -0
@@ -0,0 +1,535 @@
1
+ import React, { useState, useCallback, useMemo, useRef } from 'react';
2
+ import { message, Drawer, Tooltip, Switch, Modal } from 'antd';
3
+ import { Button } from '@mxmweb/zui';
4
+ import { PromptTempDesigner } from '@mxmweb/rtext';
5
+ import { HelpCircle, File, X } from 'lucide-react';
6
+ import { Xviwer } from '@mxmweb/xviewer';
7
+
8
+ import UseTempIcon from './assets/useTemp.svg';
9
+ import UploadIcon from './assets/upload.svg';
10
+ import AxiosInstance from './server';
11
+ import './style.css';
12
+ const initTemplate =
13
+ '<template key="type" placeholder="输入表格类型"></template>表格主要展示了<template key="scene" placeholder="输入场景名称"></template>场景的数据,包含<template key="primary_key" placeholder="主要字段(可写多个,用顿号分隔)"></template>等主要字段,支持用户查询<template key="search_direction" placeholder="大概介绍需要查询的方向"></template>问题,如果设计多表关联查询,最好说明此表格通过<template key="key_name" placeholder="字段名称"></template>字段可以关联另一个<template key="table_name" placeholder="表格名称"></template>表格。';
14
+
15
+ interface UploadDrawerProps {
16
+ drawerTitle: string;
17
+ drawerVisible: boolean;
18
+ handleDrawerClose: (type?: 'refresh') => void;
19
+ dbId: string | number;
20
+ tableInfo: any;
21
+ uploadUrl: string;
22
+ url?: string;
23
+ role?: string;
24
+ token?: string;
25
+ }
26
+ const theme = {
27
+ colors: {
28
+ background: '#ffffff',
29
+ border: '#e5e7eb',
30
+ appBackground: '#ffffff',
31
+ listBackground: '#ffffff',
32
+ dashboardBackground: '#ffffff',
33
+ },
34
+ space: {
35
+ padding: '0',
36
+ margin: 'md',
37
+ shadow: 'none',
38
+ },
39
+ };
40
+ const UploadDrawer = ({
41
+ drawerTitle,
42
+ drawerVisible,
43
+ uploadUrl,
44
+ handleDrawerClose,
45
+ dbId,
46
+ tableInfo,
47
+ token,
48
+ url,
49
+ role,
50
+ }: UploadDrawerProps) => {
51
+ // 表单数据状态
52
+ const formData = useMemo(() => {
53
+ return {
54
+ id: 'upload',
55
+ layout: 'vertical',
56
+ formWidth: '670px', // 使用外部传入的表单宽度或默认值
57
+ fields: [
58
+ {
59
+ id: 'fileIds',
60
+ name: 'fileIds',
61
+ type: 'uploader',
62
+ required: false,
63
+ defaultValue: '',
64
+ uploaderConfig: {
65
+ multiple: tableInfo ? false : true,
66
+ accept: '.csv,.xlsx,.xls',
67
+ maxFiles: tableInfo ? 1 : 20,
68
+ url: uploadUrl,
69
+ // url: 'http://10.15.12.13:8888/index/database/dataTable/uploadFile', // 添加上传接口地址
70
+ autoUpload: true,
71
+ headers: {
72
+ Authorization: token,
73
+ },
74
+ queryParams: {
75
+ databaseId: dbId,
76
+ ...(tableInfo && { tableId: tableInfo.tableId }),
77
+ },
78
+ placeholder: (
79
+ <div>
80
+ <div className="text-lg font-bold">点击或将文件拖拽到此处上传</div>
81
+ <div className="flex flex-col gap-1.8 mt-[12px]">
82
+ <div className="text-[#888888] font-[12px]">数量:≤20 文件(当前 0/20)</div>
83
+ <div
84
+ className="text-[#888888] font-[12px]"
85
+ style={{
86
+ width: '580px',
87
+ }}
88
+ >
89
+ 格式:.xlsx / .xls / .csv /(第一行是表头,其他行是数据;CSV 支持
90
+ UTF-8/GBK/GB2312…)
91
+ </div>
92
+ <div className="text-[#888888] font-[12px]">
93
+ 单文件限制: ≤10万行,≤60列(超出自动忽略); 每文件 ≤1个Sheet
94
+ </div>
95
+ <div className="text-[#888888] font-[12px]">
96
+ 上传的文件,如果有不符合文本格式的数据系统自动忽略
97
+ </div>
98
+ </div>
99
+ </div>
100
+ ),
101
+
102
+ listName: tableInfo ? '追加文件' : '上传文件列表',
103
+ icons: {
104
+ // 文件类型图标配置
105
+ dragUpload: <img src={UploadIcon} width={40} />,
106
+ itemStatus: {
107
+ pending: <span style={{ fontSize: '12px', color: '#6b7280' }}></span>,
108
+ uploading: <span style={{ fontSize: '12px', color: '#007bff' }}></span>,
109
+ success: <span style={{ fontSize: '12px', color: '#10b981' }}></span>,
110
+ error: <span style={{ fontSize: '12px', color: '#ef4444' }}>失败</span>,
111
+ },
112
+ fileType: {
113
+ default: <File size={20} style={{ color: '#6b7280' }} />,
114
+ },
115
+ },
116
+ ...(!tableInfo && {
117
+ buttons: [
118
+ {
119
+ label: '使用模版',
120
+ icon: <img src={UseTempIcon} />,
121
+ mode: 'text',
122
+ onClick: () => {
123
+ setIsUseTemplate(true);
124
+ },
125
+ },
126
+ ],
127
+ }),
128
+ ...(!tableInfo && {
129
+ itemForm: [
130
+ {
131
+ type: 'textarea',
132
+ name: 'description',
133
+ counter: 150, // 最大150个字符
134
+ placeholder: '为了提高问答准确率,请输入描述',
135
+ },
136
+ ],
137
+ }),
138
+ },
139
+ },
140
+ ],
141
+ };
142
+ }, [tableInfo]);
143
+
144
+ // 表单提交状态
145
+ const [isSubmitting, setIsSubmitting] = useState(false);
146
+ const [formValues, setFormValues] = useState<any>({});
147
+ // 表单引用
148
+ const formRef = useRef<any>(null);
149
+
150
+ //是否生成自动描述
151
+ const [isGenDescription, setIsGenDescription] = useState(false);
152
+
153
+ //所有上传文件及状态
154
+ const [files, setFiles] = useState<{ id: string; status: 'success' | 'error' }[]>([]);
155
+ //-------模版相关--------
156
+ //是否使用模版
157
+ const [isUseTemplate, setIsUseTemplate] = useState(false);
158
+
159
+ const [templateContent, setTemplateContent] = useState(initTemplate);
160
+ const [getDataFunction, setGetDataFunction] = useState<
161
+ ((format: 'pure_string' | 'string' | 'markdown' | 'html') => string) | null
162
+ >(null);
163
+
164
+ const [data, setData] = useState<string>(initTemplate);
165
+ const [version, setVersion] = useState<number>(0);
166
+
167
+ const { parseFiles, parseAppendFile, deleteUploadedFiles } = AxiosInstance({
168
+ url,
169
+ token,
170
+ role,
171
+ });
172
+
173
+ // 事件处理函数
174
+ const handleEventsEmit = useCallback(async (name: string, data: any, appFn: any) => {
175
+ console.log('[DynamicFormAdopter] 事件:', name, data);
176
+
177
+ switch (name) {
178
+ case 'form:ready':
179
+ if (data.formRef) {
180
+ formRef.current = data.formRef;
181
+ } else {
182
+ console.log('❌ data.formRef 为空,无法保存表单引用');
183
+ }
184
+ break;
185
+ case 'form:submit':
186
+ // 处理表单提交
187
+ handleFormSubmit();
188
+ break;
189
+ case 'form_field_change':
190
+ setFormValues((prev: any) => ({
191
+ ...prev,
192
+ [data.fieldId]: data.value,
193
+ }));
194
+ break;
195
+ case 'uploader:error':
196
+ if (data.item?.id) {
197
+ setFiles(pre => [
198
+ {
199
+ id: data.item.id,
200
+ status: data.item.status,
201
+ },
202
+ ...pre,
203
+ ]);
204
+ } else {
205
+ message.error(data?.message);
206
+ }
207
+ break;
208
+ case 'uploader:success':
209
+ setFiles(pre => [
210
+ {
211
+ id: data.item.id,
212
+ status: data.item.status,
213
+ },
214
+ ...pre,
215
+ ]);
216
+ break;
217
+ case 'uploader:remove':
218
+ const fileStatus = data.item.status;
219
+ setFiles(pre => pre.filter(p => p.id !== data.item.id));
220
+ if (fileStatus == 'success') {
221
+ await handleDeleteFile([data.item.uploadApiRes]);
222
+ }
223
+ break;
224
+ default:
225
+ console.log('未处理的事件:', name);
226
+ }
227
+ }, []);
228
+
229
+ // 视图配置
230
+ const viewConfig = useMemo(
231
+ () => ({
232
+ label: '动态表单示例',
233
+ defaultActiveId: 'form-view',
234
+ model: null,
235
+ views: [
236
+ {
237
+ label: '用户注册表单',
238
+ id: 'form-view',
239
+ type: 'form',
240
+ size: 'md' as const,
241
+ formWidth: formData.formWidth, // 设置视图宽度
242
+ formConfig: {
243
+ layout: formData.layout,
244
+ showReset: false, // 不显示内置的重置按钮
245
+ showSubmit: false, // 不显示内置的提交按钮
246
+ formWidth: formData.formWidth, // 传递表单宽度
247
+ // 提供获取表单数据的方法,包括 uploader 组件的数据
248
+ getFormData: () => {
249
+ // 返回当前表单的基础数据
250
+ return {
251
+ ...formValues,
252
+ timestamp: new Date().toISOString(),
253
+ formId: formData.id,
254
+ };
255
+ },
256
+ onFieldChange: (fieldId: string, value: any) => {
257
+ handleEventsEmit('form_field_change', { fieldId, value }, undefined);
258
+ },
259
+ onValidationError: (errors: any) => {
260
+ handleEventsEmit('form_validation_error', errors, undefined);
261
+ },
262
+ },
263
+ },
264
+ ],
265
+ dataSource: [
266
+ {
267
+ id: formData.id,
268
+ fields: formData.fields,
269
+ defaultValues: {},
270
+ },
271
+ ], // 表单数据
272
+ eventsEmit: handleEventsEmit,
273
+ styles: { theme },
274
+ }),
275
+ [tableInfo, formData]
276
+ );
277
+
278
+ // 表单提交处理
279
+ const handleFormSubmit = async () => {
280
+ try {
281
+ setIsSubmitting(true);
282
+ const allFormData = await formRef.current.getAllData();
283
+ if (allFormData.isValid) {
284
+ const files = allFormData.fields.find((field: any) => field.name == 'fileIds')?.value;
285
+ if (Array.isArray(files) && files?.length > 0) {
286
+ let res: any;
287
+ if (tableInfo) {
288
+ // 追加数据
289
+ res = await parseAppendFile({
290
+ fileIds: files.map((f: any) => f.uploadApiRes),
291
+ tableId: tableInfo.id,
292
+ });
293
+ } else {
294
+ //上传数据表
295
+ const params = {
296
+ fileIds: files.map((f: any) => f.uploadApiRes),
297
+ tableDescriptionMap: files.reduce((acc: any, item: any) => {
298
+ acc[item.uploadApiRes] = item.formData.description;
299
+ return acc;
300
+ }, {}),
301
+ isGenDescription,
302
+ };
303
+ res = await parseFiles(params);
304
+ }
305
+ if (res) {
306
+ handleDrawerClose('refresh');
307
+ }
308
+ }
309
+ }
310
+ } catch (error) {
311
+ console.error('表单数据失败:', error);
312
+ } finally {
313
+ handleDrawerClose();
314
+ setIsSubmitting(false);
315
+ setIsGenDescription(false);
316
+ }
317
+ };
318
+
319
+ //点击取消和关闭抽屉
320
+ const handleCancel = async (id?: any[]) => {
321
+ try {
322
+ const allFormData = await formRef.current.getAllData();
323
+ // 取消关闭弹窗的时候,删除已上传的文件
324
+ if (allFormData.isValid) {
325
+ const files = allFormData.fields.find((field: any) => field.name == 'fileIds')?.value;
326
+ if (files && Array.isArray(files) && files?.length > 0) {
327
+ const fileIds = files.map((f: any) => f.uploadApiRes);
328
+ const res = await handleDeleteFile(fileIds);
329
+ }
330
+ }
331
+ } catch (error) {
332
+ console.error('表单数据失败:', error);
333
+ } finally {
334
+ handleDrawerClose();
335
+ setIsGenDescription(false);
336
+ }
337
+ };
338
+
339
+ //删除上传文件
340
+ const handleDeleteFile = async (fileIds: string[] | number[]) => {
341
+ try {
342
+ const res = await deleteUploadedFiles(fileIds);
343
+ if (res) {
344
+ // todo: 刷新
345
+ return res;
346
+ }
347
+ } catch (error) {
348
+ console.error('删除文件数据失败:', error);
349
+ }
350
+ };
351
+ // 处理自动描述开关
352
+ const onChange = (checked: boolean) => {
353
+ setIsGenDescription(checked);
354
+ };
355
+
356
+ // 处理模版内容变化
357
+ const handleTemplateChange = useCallback((template: string) => {
358
+ setTemplateContent(template);
359
+ console.log('模版内容变化:', template);
360
+ }, []);
361
+
362
+ // 处理getData回调
363
+ const handleGetData = useCallback(
364
+ (getData: (format: 'pure_string' | 'string' | 'markdown' | 'html') => string) => {
365
+ setGetDataFunction(() => getData);
366
+ console.log('getData函数已设置');
367
+ },
368
+ []
369
+ );
370
+ // 复制
371
+ const handleCopy = useCallback(async () => {
372
+ try {
373
+ if (!getDataFunction) {
374
+ console.error('getData函数尚未准备好,请稍后再试');
375
+ return;
376
+ }
377
+ const result = getDataFunction('pure_string');
378
+ await navigator.clipboard.writeText(result);
379
+ message.success('已复制', 1);
380
+ } catch (err) {
381
+ console.error('复制失败:', err);
382
+ } finally {
383
+ setIsUseTemplate(false);
384
+ }
385
+ }, [getDataFunction]);
386
+
387
+ return (
388
+ <Drawer
389
+ title={drawerTitle}
390
+ className="database-upload-drawer"
391
+ placement="right"
392
+ width={720}
393
+ closeIcon={false}
394
+ extra={
395
+ <X size={20} color="#888888" onClick={() => handleCancel()} className="cursor-pointer" />
396
+ }
397
+ open={drawerVisible}
398
+ destroyOnHidden
399
+ footer={
400
+ <div
401
+ className={`flex items-center`}
402
+ style={{
403
+ justifyContent: tableInfo ? 'end' : 'space-between',
404
+ }}
405
+ >
406
+ {!tableInfo && (
407
+ <div className="flex gap-2 items-center">
408
+ <span>自动生成数据表描述</span>{' '}
409
+ <Tooltip title="自动生成开启时将基于数据智能生成描述;若开启此功能并手动填写描述,将优先采用用户填写的内容。">
410
+ <HelpCircle size={14} />
411
+ </Tooltip>
412
+ <Switch onChange={onChange} />
413
+ </div>
414
+ )}
415
+ <div className="flex self-end gap-3">
416
+ <Button
417
+ mode="default"
418
+ style={{
419
+ marginRight: 10,
420
+ }}
421
+ label="取消"
422
+ onClick={handleCancel}
423
+ />
424
+ <Button
425
+ mode="primary"
426
+ label="确认导入"
427
+ loading={isSubmitting}
428
+ disabled={files.some(f => f.status == 'error')}
429
+ onClick={async () => {
430
+ await handleFormSubmit();
431
+ }}
432
+ />
433
+ </div>
434
+ </div>
435
+ }
436
+ >
437
+ <Xviwer key="upload-file" {...viewConfig} />
438
+ <Modal
439
+ title={
440
+ <div>
441
+ 模版
442
+ <span className="text-[12px] text-[#888888] ml-[8px]">
443
+ 完成编辑后,可将文本复制粘贴到相应描述框中。
444
+ </span>
445
+ </div>
446
+ }
447
+ width={672}
448
+ destroyOnHidden
449
+ open={isUseTemplate}
450
+ onCancel={() => setIsUseTemplate(false)}
451
+ footer={
452
+ <div className={`flex justify-end items-center gap-3`}>
453
+ <Button
454
+ mode="default"
455
+ label="重置"
456
+ onClick={() => {
457
+ setData(initTemplate);
458
+ setVersion(v => v + 1);
459
+ }}
460
+ />
461
+ <Button mode="primary" label="复制" onClick={handleCopy} />
462
+ </div>
463
+ }
464
+ >
465
+ <PromptTempDesigner
466
+ key={version}
467
+ data={data}
468
+ onChange={handleTemplateChange}
469
+ onGetData={handleGetData}
470
+ styles={{
471
+ theme: {
472
+ colors: {
473
+ primary: '#0969da',
474
+ secondary: '#6b7280',
475
+ success: '#10b981',
476
+ warning: '#f59e0b',
477
+ error: '#ef4444',
478
+ info: '#3b82f6',
479
+ background: '#ffffff',
480
+ text: '#1f2937',
481
+ border: '#e5e7eb',
482
+ disabled: '#9ca3af',
483
+ disabledBackground: '#f3f4f6',
484
+ disabledText: '#6b7280',
485
+ shadow: '0 1px 3px rgba(0, 0, 0, 0.1)',
486
+ appBackground: 'transparent',
487
+ listBackground: '#f9fafb',
488
+ dashboardBackground: '#ffffff',
489
+ textSecondary: '#6b7280',
490
+ },
491
+ space: {
492
+ sidebar: '260px',
493
+ size: '12px',
494
+ radius: '8px',
495
+ padding: '1rem',
496
+ margin: '1rem',
497
+ shadow: '0 2px 8px rgba(0,0,0,0.1)',
498
+ lineHeight: '1.8',
499
+ },
500
+ icons: {},
501
+ fonts: {
502
+ body: {
503
+ size: '14px',
504
+ weight: 'normal',
505
+ family: 'PingFang SC, Microsoft YaHei, Arial, sans-serif',
506
+ },
507
+ heading: {
508
+ size: '14px',
509
+ weight: '600',
510
+ family: 'PingFang SC, Microsoft YaHei, Arial, sans-serif',
511
+ },
512
+ },
513
+ others: {
514
+ baseFontWeight: 'normal',
515
+ },
516
+ },
517
+ templateField: {
518
+ backgroundColor: '#E5EEFF', // 输入框背景色
519
+ borderColor: '#84ADFF', // 输入框边框颜色
520
+ borderRadius: '6px',
521
+ padding: '6px 12px', // 调整为1px间距,让蓝色块之间有精确的1px间距
522
+ margin: '2px',
523
+ fontSize: '14px',
524
+ fontWeight: '500',
525
+ minWidth: '80px',
526
+ textColor: '#84ADFF', // 未激活前文字颜色
527
+ },
528
+ }}
529
+ />
530
+ </Modal>
531
+ </Drawer>
532
+ );
533
+ };
534
+
535
+ export default UploadDrawer;
@@ -0,0 +1,10 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_4199_8826)">
3
+ <path d="M15.5554 12.4444C14.9626 13.0373 14.6666 13.6293 14.6666 14.2222C14.6666 14.8151 14.9626 15.4071 15.5554 16C14.9626 15.4071 14.3706 15.1111 13.7777 15.1111C13.1848 15.1111 12.5928 15.4071 11.9999 16C12.5928 15.4071 12.8888 14.8151 12.8888 14.2222C12.8888 13.6293 12.5928 13.0373 11.9999 12.4444C12.5928 13.0373 13.1848 13.3333 13.7777 13.3333C14.3706 13.3333 14.9626 13.0373 15.5554 12.4444ZM14.6488 4.01778C15.1905 4.55954 15.4948 5.29431 15.4948 6.06044C15.4948 6.82658 15.1905 7.56135 14.6488 8.10311L7.735 15.0169C7.46766 15.2892 7.14901 15.5058 6.79746 15.6543C6.44592 15.8028 6.06844 15.8801 5.68684 15.8819C5.30523 15.8836 4.92706 15.8097 4.57417 15.6645C4.22127 15.5193 3.90065 15.3056 3.63081 15.0357C3.36097 14.7659 3.14727 14.4453 3.00205 14.0924C2.85682 13.7395 2.78295 13.3613 2.7847 12.9797C2.78646 12.5981 2.8638 12.2206 3.01226 11.8691C3.16072 11.5176 3.37736 11.1989 3.64967 10.9316L3.95545 10.6249L3.85145 10.5244C3.30922 10.0267 2.76522 9.77778 2.22211 9.77778C1.62923 9.77778 1.03722 10.0738 0.444336 10.6667C1.03722 10.0738 1.33322 9.48178 1.33322 8.88889C1.33322 8.296 1.03722 7.704 0.444336 7.11111C1.03722 7.704 1.62923 8 2.22211 8C2.815 8 3.407 7.704 3.99989 7.11111C3.407 7.704 3.111 8.296 3.111 8.88889C3.111 9.46667 3.39278 10.0444 3.95545 10.6222L10.5634 4.01778C11.1052 3.47606 11.84 3.17173 12.6061 3.17173C13.3723 3.17173 14.107 3.47606 14.6488 4.01778ZM9.55189 6.91378L4.59189 11.8738C4.30004 12.1655 4.13603 12.5612 4.13594 12.9739C4.1359 13.1782 4.17611 13.3806 4.25426 13.5694C4.33242 13.7582 4.44699 13.9297 4.59145 14.0742C4.7359 14.2187 4.9074 14.3334 5.09617 14.4116C5.28493 14.4898 5.48725 14.5301 5.69158 14.5302C6.10424 14.5303 6.50004 14.3664 6.79189 14.0747L11.7519 9.11378L9.55189 6.91378ZM11.5066 4.96089L10.495 5.97156L12.695 8.17156L13.7057 7.16C13.9846 6.86582 14.1377 6.47437 14.1323 6.069C14.1269 5.66364 13.9635 5.27639 13.6768 4.98973C13.3902 4.70306 13.0029 4.53964 12.5976 4.53425C12.1922 4.52887 11.8007 4.68194 11.5066 4.96089ZM9.59545 0C8.85589 0.740444 8.48434 1.48178 8.48434 2.22222C8.48434 2.96267 8.85589 3.704 9.59545 4.44444C8.85589 3.704 8.11456 3.33333 7.37322 3.33333C6.63367 3.33333 5.89234 3.704 5.151 4.44444C5.89234 3.704 6.26211 2.96267 6.26211 2.22222C6.26211 1.48178 5.89322 0.740444 5.15189 0C5.89322 0.740444 6.63456 1.11111 7.37411 1.11111C8.11545 1.11111 8.85678 0.740444 9.59634 0H9.59545Z" fill="#055AFF"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_4199_8826">
7
+ <rect width="16" height="16" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14 1C13.4997 1.50025 13.25 1.99975 13.25 2.5C13.25 3.00025 13.4997 3.49975 14 4C13.4997 3.49975 13.0003 3.25 12.5 3.25C11.9997 3.25 11.5003 3.49975 11 4C11.5003 3.49975 11.75 3.00025 11.75 2.5C11.75 1.99975 11.5003 1.50025 11 1C11.5003 1.50025 11.9997 1.75 12.5 1.75C13.0003 1.75 13.4997 1.50025 14 1Z" fill="#055AFF"/>
3
+ <path d="M13 6.28571V13C13 13.5523 12.5523 14 12 14H4C3.44772 14 3 13.5523 3 13V3C3 2.44772 3.44772 2 4 2H9.25" stroke="#055AFF" stroke-width="1.3" stroke-linecap="round"/>
4
+ <line x1="5.65" y1="6.35" x2="10.35" y2="6.35" stroke="#055AFF" stroke-width="1.3" stroke-linecap="round"/>
5
+ <line x1="5.65" y1="9.35" x2="8.35" y2="9.35" stroke="#055AFF" stroke-width="1.3" stroke-linecap="round"/>
6
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M42 22C43.1046 22 44 22.8954 44 24V42C44 43.1046 43.1046 44 42 44H6C4.89543 44 4 43.1046 4 42V24.0088C4 22.9042 4.89543 22.0078 6 22.0078C7.10457 22.0078 8 22.9042 8 24.0088V40H40V24C40 22.8954 40.8954 22 42 22ZM24.0293 4.00195C24.0808 4.00272 24.1322 4.00504 24.1836 4.00977C24.1904 4.01042 24.1973 4.011 24.2041 4.01172C24.2673 4.01819 24.3301 4.02757 24.3926 4.04004C24.3939 4.04031 24.3952 4.04075 24.3965 4.04102C24.7693 4.11623 25.125 4.29691 25.4141 4.58594L34.4141 13.5859C35.1951 14.367 35.1951 15.633 34.4141 16.4141C33.633 17.1951 32.367 17.1951 31.5859 16.4141L25.9922 10.8203V32C25.9922 33.1046 25.0968 34 23.9922 34C22.8876 34 21.9922 33.1046 21.9922 32V10.8359L16.4141 16.4141C15.633 17.1951 14.367 17.1951 13.5859 16.4141C12.8049 15.633 12.8049 14.367 13.5859 13.5859L22.498 4.67285C22.8016 4.33138 23.2194 4.09559 23.6924 4.02441C23.7122 4.02135 23.732 4.01809 23.752 4.01562C23.7862 4.01152 23.8207 4.00919 23.8555 4.00684C23.8887 4.00446 23.9218 4.00268 23.9551 4.00195C23.9674 4.00173 23.9798 4 23.9922 4C24.0046 4 24.0169 4.00173 24.0293 4.00195Z" fill="url(#paint0_linear_4072_34663)"/>
3
+ <defs>
4
+ <linearGradient id="paint0_linear_4072_34663" x1="4" y1="-7.25" x2="54.4707" y2="1.556" gradientUnits="userSpaceOnUse">
5
+ <stop stop-color="#2B69FF"/>
6
+ <stop offset="1" stop-color="#8F91FF"/>
7
+ </linearGradient>
8
+ </defs>
9
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14 1C13.4997 1.50025 13.25 1.99975 13.25 2.5C13.25 3.00025 13.4997 3.49975 14 4C13.4997 3.49975 13.0003 3.25 12.5 3.25C11.9997 3.25 11.5003 3.49975 11 4C11.5003 3.49975 11.75 3.00025 11.75 2.5C11.75 1.99975 11.5003 1.50025 11 1C11.5003 1.50025 11.9997 1.75 12.5 1.75C13.0003 1.75 13.4997 1.50025 14 1Z" fill="#055AFF"/>
3
+ <path d="M13 6.28571V13C13 13.5523 12.5523 14 12 14H4C3.44772 14 3 13.5523 3 13V3C3 2.44772 3.44772 2 4 2H9.25" stroke="#055AFF" stroke-width="1.3" stroke-linecap="round"/>
4
+ <line x1="5.65" y1="6.35" x2="10.35" y2="6.35" stroke="#055AFF" stroke-width="1.3" stroke-linecap="round"/>
5
+ <line x1="5.65" y1="9.35" x2="8.35" y2="9.35" stroke="#055AFF" stroke-width="1.3" stroke-linecap="round"/>
6
+ </svg>