@gientech/modual 1.2.7 → 1.2.9-fix

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 (377) hide show
  1. package/.editorconfig +38 -0
  2. package/.prettierignore +16 -0
  3. package/.prettierrc +17 -0
  4. package/README.md +643 -129
  5. package/USAGE.md +247 -0
  6. package/bash.exe.stackdump +40 -0
  7. package/components.json +21 -0
  8. package/dist/README.md +643 -0
  9. package/dist/assets/GientechStreamReader-C21-q_Qv.js +449 -0
  10. package/dist/assets/chevron-down-DjLtKwcs.js +280 -0
  11. package/{assets → dist/assets}/database.svg +11 -11
  12. package/{assets → dist/assets}/database_add.svg +53 -53
  13. package/{assets → dist/assets}/database_connect.svg +66 -66
  14. package/{assets → dist/assets}/database_upload.svg +29 -29
  15. package/dist/assets/databse.svg +6 -0
  16. package/{assets → dist/assets}/defaultWeLogo.svg +14 -14
  17. package/dist/assets/graph.svg +4 -0
  18. package/dist/assets/homeBg.png +0 -0
  19. package/dist/assets/index-BMz4lcjQ.js +1 -0
  20. package/dist/assets/index-C3Viu8Oj.js +1 -0
  21. package/dist/assets/index-C9GlPyHu.js +13 -0
  22. package/dist/assets/index-CRbX3ZA1.js +1 -0
  23. package/dist/assets/index-CTwzi_v2.js +21 -0
  24. package/dist/assets/index-DQlLDleQ.js +11 -0
  25. package/dist/assets/index-DRU1P9R0.js +1150 -0
  26. package/dist/assets/index-Dqej68NT.js +585 -0
  27. package/dist/assets/index-ECprhahs.js +157 -0
  28. package/dist/assets/index-i7qcZOwY.js +1088 -0
  29. package/dist/assets/knowledge.svg +4 -0
  30. package/dist/assets/left.jpg +0 -0
  31. package/dist/assets/logoImg.png +0 -0
  32. package/{assets/MySQL.svg → dist/assets/mysql.svg} +14 -14
  33. package/{assets/plus-fNg4vmeA.js → dist/assets/plus-CvJRSbOe.js} +1 -1
  34. package/dist/assets/sensitive.svg +5 -0
  35. package/dist/assets/style.css +1 -0
  36. package/dist/assets/style3.css +1 -0
  37. package/dist/assets/worker-BbpylX7l.js +13 -0
  38. package/{assets/x-tMUaBf0a.js → dist/assets/x-DKPeLdlu.js} +1 -1
  39. package/dist/assistantConfig.d.ts +31 -0
  40. package/dist/assistantConfig.js +1 -0
  41. package/{chat.d.ts → dist/chat.d.ts} +25 -1
  42. package/dist/chat.js +842 -0
  43. package/dist/database.js +20 -0
  44. package/dist/databaseId.js +1 -0
  45. package/dist/databaseTable.js +6 -0
  46. package/dist/index.d.ts +85 -0
  47. package/dist/index.js +1 -0
  48. package/dist/modelManage.js +1 -0
  49. package/dist/package.json +68 -0
  50. package/dist/sensitive.js +1 -0
  51. package/{streamFilesReader.d.ts → dist/streamFilesReader.d.ts} +3 -0
  52. package/dist/streamFilesReader.js +1 -0
  53. package/{worker → dist/worker}/pdf.worker.min.js +21 -21
  54. package/doc_assets/2.png +0 -0
  55. package/doc_assets/demo.md +27 -0
  56. package/doc_assets/demos/dist-app/assets/index.Dh-ZAS9Z.css +2 -0
  57. package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js +23699 -0
  58. package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js.map +1 -0
  59. package/doc_assets/demos/dist-app/index.html +14 -0
  60. package/doc_assets/demos/dist-app/vite.svg +1 -0
  61. package/doc_assets/images/1.png +0 -0
  62. package/doc_assets/images/3.png +0 -0
  63. package/doc_assets/images/component-screenshot.png +1 -0
  64. package/doc_assets/install.md +5 -0
  65. 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
  66. package/eslint.config.js +92 -0
  67. package/index.html +13 -0
  68. package/package.json +109 -40
  69. package/package.json.demo-backup +109 -0
  70. package/postcss.config.cjs +19 -0
  71. package/public/vite.svg +1 -0
  72. package/public/worker/pdf.worker.min.js +22 -0
  73. package/scripts/README.md +133 -0
  74. package/scripts/build-demo.js +88 -0
  75. package/scripts/demo-selector.js +216 -0
  76. package/scripts/dev-demo.js +76 -0
  77. package/scripts/preview-demo.js +130 -0
  78. package/scripts/run-demo.bat +34 -0
  79. package/src/assets/img/close.png +0 -0
  80. package/src/assets/img/database.png +0 -0
  81. package/src/assets/img/downArrow.png +0 -0
  82. package/src/assets/img/downLoad.png +0 -0
  83. package/src/assets/img/excel.png +0 -0
  84. package/src/assets/img/graphIcon.png +0 -0
  85. package/src/assets/img/img.png +0 -0
  86. package/src/assets/img/pdf.png +0 -0
  87. package/src/assets/img/ppt.png +0 -0
  88. package/src/assets/img/singleQa.png +0 -0
  89. package/src/assets/img/txt.png +0 -0
  90. package/src/assets/img/webSearch.png +0 -0
  91. package/src/assets/img/word.png +0 -0
  92. package/src/assets/login/homeBg.png +0 -0
  93. package/src/assets/login/left.jpg +0 -0
  94. package/src/assets/login/logoImg.png +0 -0
  95. package/src/examples/ConversationAssistantPage/index.tsx +37 -0
  96. package/src/examples/Demo/index.tsx +12 -0
  97. package/src/examples/LoginPage/index.tsx +18 -0
  98. package/src/examples/chat/components/DrawerGraphPreview.tsx +78 -0
  99. package/src/examples/chat/index.tsx +153 -0
  100. package/src/examples/chat/logo03.png +0 -0
  101. package/src/examples/gientechStreamFilesReader/index.tsx +951 -0
  102. package/src/examples/ragDatabaseDataPage/index.tsx +36 -0
  103. package/src/examples/ragDatabaseIdPage/index.tsx +44 -0
  104. package/src/examples/ragDatabasePage/index.tsx +36 -0
  105. package/src/examples/ragModelManagePage/index.tsx +37 -0
  106. package/src/examples/ragSearchPage/index.tsx +0 -0
  107. package/src/examples/ragSensitiveWordsPage/index.tsx +32 -0
  108. package/src/examples/streamFiles/index.tsx +384 -0
  109. package/src/lib_enter.ts +43 -0
  110. package/src/main.tsx +5 -0
  111. package/src/main.tsx.backup +5 -0
  112. package/src/modules/assistantConfig/assets/databse.svg +6 -0
  113. package/src/modules/assistantConfig/assets/empty.png +0 -0
  114. package/src/modules/assistantConfig/assets/graph.svg +4 -0
  115. package/src/modules/assistantConfig/assets/knowledge.svg +4 -0
  116. package/src/modules/assistantConfig/assets/sensitive.svg +5 -0
  117. package/src/modules/assistantConfig/components/Database.tsx +144 -0
  118. package/src/modules/assistantConfig/components/Graph.tsx +156 -0
  119. package/src/modules/assistantConfig/components/Knowledge.tsx +266 -0
  120. package/src/modules/assistantConfig/components/NotFoundContent.tsx +21 -0
  121. package/src/modules/assistantConfig/components/Paragraph.tsx +51 -0
  122. package/src/modules/assistantConfig/components/ParamsItem.tsx +39 -0
  123. package/src/modules/assistantConfig/components/ResourceBinderItem.tsx +132 -0
  124. package/src/modules/assistantConfig/components/SearchableSelector.tsx +500 -0
  125. package/src/modules/assistantConfig/components/Sensitive.tsx +179 -0
  126. package/src/modules/assistantConfig/components/SliderInput.tsx +65 -0
  127. package/src/modules/assistantConfig/constants.tsx +74 -0
  128. package/src/modules/assistantConfig/index.tsx +700 -0
  129. package/src/modules/assistantConfig/server.ts +262 -0
  130. package/src/modules/chat/Conversations/Item.tsx +167 -0
  131. package/src/modules/chat/Conversations/List.tsx +210 -0
  132. package/src/modules/chat/Conversations/groupByTime.ts +39 -0
  133. package/src/modules/chat/Conversations/index.tsx +230 -0
  134. package/src/modules/chat/ReferenceBar.tsx +592 -0
  135. package/src/modules/chat/constants.tsx +56 -0
  136. package/src/modules/chat/data.txt +82 -0
  137. package/src/modules/chat/index.tsx +2081 -0
  138. package/src/modules/chat/referenceCom/DeleteModal.tsx +75 -0
  139. package/src/modules/chat/referenceCom/DrawerContent.tsx +136 -0
  140. package/src/modules/chat/referenceCom/DrawerDatabase.tsx +110 -0
  141. package/src/modules/chat/referenceCom/DrawerGraphPreview.tsx +86 -0
  142. package/src/modules/chat/referenceCom/DrawerPreview.tsx +73 -0
  143. package/src/modules/chat/referenceCom/DrawerTitle.tsx +26 -0
  144. package/src/modules/chat/referenceCom/RenameModal.tsx +86 -0
  145. package/src/modules/chat/referenceCom/TagCom.tsx +30 -0
  146. package/src/modules/chat/style.less +3 -0
  147. package/src/modules/chat/types.ts +17 -0
  148. package/src/modules/chat/utils/index.ts +326 -0
  149. package/src/modules/database/CreateModal.tsx +398 -0
  150. package/src/modules/database/assets/Doris.png +0 -0
  151. package/src/modules/database/assets/PostgreSQL.png +0 -0
  152. package/src/modules/database/assets/SQLServer.png +0 -0
  153. package/src/modules/database/assets/database.svg +11 -0
  154. package/src/modules/database/assets/database_add.svg +53 -0
  155. package/src/modules/database/assets/database_connect.svg +66 -0
  156. package/src/modules/database/assets/database_upload.svg +29 -0
  157. package/src/modules/database/assets/empty.png +0 -0
  158. package/src/modules/database/assets/mysql.svg +14 -0
  159. package/src/modules/database/index.tsx +466 -0
  160. package/src/modules/database/server.ts +196 -0
  161. package/src/modules/databaseId/CustomCom.tsx +156 -0
  162. package/src/modules/databaseId/EditConfig.tsx +268 -0
  163. package/src/modules/databaseId/UploadDrawer.tsx +520 -0
  164. package/src/modules/databaseId/assets/aiOptimize.svg +10 -0
  165. package/src/modules/databaseId/assets/empty.png +0 -0
  166. package/src/modules/databaseId/assets/template.svg +6 -0
  167. package/src/modules/databaseId/assets/upload.svg +9 -0
  168. package/src/modules/databaseId/assets/useTemp.svg +6 -0
  169. package/src/modules/databaseId/index.tsx +734 -0
  170. package/src/modules/databaseId/server.ts +286 -0
  171. package/src/modules/databaseId/style.css +5 -0
  172. package/src/modules/databaseTable/EditRowDrawer.tsx +119 -0
  173. package/src/modules/databaseTable/index.tsx +357 -0
  174. package/src/modules/databaseTable/server.ts +180 -0
  175. package/src/modules/headlessChat/constants.tsx +32 -0
  176. package/src/modules/headlessChat/index.tsx +1063 -0
  177. package/src/modules/headlessChat/types.ts +23 -0
  178. package/src/modules/login/components/Login/LoginBox/index.tsx +102 -0
  179. package/src/modules/login/components/Login/RegisterBox/index.tsx +180 -0
  180. package/src/modules/login/components/Login/index.tsx +100 -0
  181. package/src/modules/login/index.tsx +106 -0
  182. package/src/modules/login/style.css +3 -0
  183. package/src/modules/login/useServices.ts +53 -0
  184. package/src/modules/login/utils.ts +42 -0
  185. package/src/modules/modelManage/ConfigDrawer.tsx +249 -0
  186. package/src/modules/modelManage/assets/empty.png +0 -0
  187. package/src/modules/modelManage/const.ts +50 -0
  188. package/src/modules/modelManage/index.tsx +439 -0
  189. package/src/modules/modelManage/server.ts +185 -0
  190. package/src/modules/nodegraph/index.tsx +1 -0
  191. package/src/modules/search/assets/Icon-history.svg +8 -0
  192. package/src/modules/search/assets/answerAwartar.png +0 -0
  193. package/src/modules/search/assets/doc.png +0 -0
  194. package/src/modules/search/assets/genera.gif +0 -0
  195. package/src/modules/search/assets/icon-robot.svg +9 -0
  196. package/src/modules/search/assets/icon-search-bar.svg +14 -0
  197. package/src/modules/search/assets/icon-sub-title.svg +3 -0
  198. package/src/modules/search/assets/icon-title.svg +9 -0
  199. package/src/modules/search/assets/icon-zoomOut.svg +9 -0
  200. package/src/modules/search/assets/iconAi.svg +9 -0
  201. package/src/modules/search/assets/pdf.png +0 -0
  202. package/src/modules/search/assets/ppt.png +0 -0
  203. package/src/modules/search/assets/search.svg +3 -0
  204. package/src/modules/search/assets/selected.svg +4 -0
  205. package/src/modules/search/assets/txt.png +0 -0
  206. package/src/modules/search/assets/xls.png +0 -0
  207. package/src/modules/search/components/AssisSelect.tsx +137 -0
  208. package/src/modules/search/components/Editor/ChatViewEditor.tsx +261 -0
  209. package/src/modules/search/components/Editor/aichat.css +1 -0
  210. package/src/modules/search/components/Editor/constant.ts +13 -0
  211. package/src/modules/search/components/Editor/index.tsx +113 -0
  212. package/src/modules/search/components/Editor/plugins/autofomatRules.ts +332 -0
  213. package/src/modules/search/components/Editor/plugins/convertImgPlugins.tsx +20 -0
  214. package/src/modules/search/components/Editor/plugins/createIndexes.tsx +38 -0
  215. package/src/modules/search/components/Editor/plugins/displayer.ts +298 -0
  216. package/src/modules/search/components/Editor/plugins/imageClick.tsx +32 -0
  217. package/src/modules/search/components/Editor/plugins/myplugin.tsx +98 -0
  218. package/src/modules/search/components/Editor/ui/avatar.tsx +19 -0
  219. package/src/modules/search/components/Editor/ui/blockquote-element.tsx +21 -0
  220. package/src/modules/search/components/Editor/ui/button.tsx +58 -0
  221. package/src/modules/search/components/Editor/ui/calendar.tsx +68 -0
  222. package/src/modules/search/components/Editor/ui/caption.tsx +46 -0
  223. package/src/modules/search/components/Editor/ui/checkbox.tsx +27 -0
  224. package/src/modules/search/components/Editor/ui/code-block-combobox.tsx +188 -0
  225. package/src/modules/search/components/Editor/ui/code-block-element.css +434 -0
  226. package/src/modules/search/components/Editor/ui/code-block-element.tsx +39 -0
  227. package/src/modules/search/components/Editor/ui/code-leaf.tsx +24 -0
  228. package/src/modules/search/components/Editor/ui/code-line-element.tsx +10 -0
  229. package/src/modules/search/components/Editor/ui/code-syntax-leaf.tsx +21 -0
  230. package/src/modules/search/components/Editor/ui/column-element.tsx +30 -0
  231. package/src/modules/search/components/Editor/ui/column-group-element.tsx +94 -0
  232. package/src/modules/search/components/Editor/ui/command.tsx +75 -0
  233. package/src/modules/search/components/Editor/ui/comment-avatar.tsx +22 -0
  234. package/src/modules/search/components/Editor/ui/comment-create-form.tsx +37 -0
  235. package/src/modules/search/components/Editor/ui/comment-item.tsx +74 -0
  236. package/src/modules/search/components/Editor/ui/comment-leaf.tsx +49 -0
  237. package/src/modules/search/components/Editor/ui/comment-more-dropdown.tsx +42 -0
  238. package/src/modules/search/components/Editor/ui/comment-reply-items.tsx +22 -0
  239. package/src/modules/search/components/Editor/ui/comment-resolve-button.tsx +32 -0
  240. package/src/modules/search/components/Editor/ui/comment-value.tsx +34 -0
  241. package/src/modules/search/components/Editor/ui/comments-popover.tsx +63 -0
  242. package/src/modules/search/components/Editor/ui/date-element.tsx +83 -0
  243. package/src/modules/search/components/Editor/ui/dialog.tsx +63 -0
  244. package/src/modules/search/components/Editor/ui/draggable.tsx +177 -0
  245. package/src/modules/search/components/Editor/ui/dropdown-menu.tsx +180 -0
  246. package/src/modules/search/components/Editor/ui/emoji-input-element.tsx +85 -0
  247. package/src/modules/search/components/Editor/ui/excalidraw-element.tsx +28 -0
  248. package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.tsx +76 -0
  249. package/src/modules/search/components/Editor/ui/fixed-toolbar.tsx +8 -0
  250. package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.tsx +51 -0
  251. package/src/modules/search/components/Editor/ui/floating-toolbar.tsx +77 -0
  252. package/src/modules/search/components/Editor/ui/heading-element.tsx +48 -0
  253. package/src/modules/search/components/Editor/ui/highlight-leaf.tsx +17 -0
  254. package/src/modules/search/components/Editor/ui/hr-element.tsx +30 -0
  255. package/src/modules/search/components/Editor/ui/icons.tsx +267 -0
  256. package/src/modules/search/components/Editor/ui/image-element.tsx +74 -0
  257. package/src/modules/search/components/Editor/ui/inline-combobox.tsx +368 -0
  258. package/src/modules/search/components/Editor/ui/input.tsx +25 -0
  259. package/src/modules/search/components/Editor/ui/insert-dropdown-menu.tsx +218 -0
  260. package/src/modules/search/components/Editor/ui/kbd-leaf.tsx +20 -0
  261. package/src/modules/search/components/Editor/ui/link-element.tsx +29 -0
  262. package/src/modules/search/components/Editor/ui/link-floating-toolbar.tsx +161 -0
  263. package/src/modules/search/components/Editor/ui/list-element.tsx +30 -0
  264. package/src/modules/search/components/Editor/ui/mark-toolbar-button.tsx +24 -0
  265. package/src/modules/search/components/Editor/ui/media-embed-element.tsx +133 -0
  266. package/src/modules/search/components/Editor/ui/media-popover.tsx +97 -0
  267. package/src/modules/search/components/Editor/ui/mention-element.tsx +43 -0
  268. package/src/modules/search/components/Editor/ui/mention-input-element.tsx +141 -0
  269. package/src/modules/search/components/Editor/ui/mode-dropdown-menu.tsx +93 -0
  270. package/src/modules/search/components/Editor/ui/more-dropdown-menu.tsx +67 -0
  271. package/src/modules/search/components/Editor/ui/paragraph-element.tsx +4 -0
  272. package/src/modules/search/components/Editor/ui/placeholder.tsx +52 -0
  273. package/src/modules/search/components/Editor/ui/popover.tsx +32 -0
  274. package/src/modules/search/components/Editor/ui/resizable.tsx +66 -0
  275. package/src/modules/search/components/Editor/ui/separator.tsx +25 -0
  276. package/src/modules/search/components/Editor/ui/style.less +12 -0
  277. package/src/modules/search/components/Editor/ui/table-cell-element.tsx +143 -0
  278. package/src/modules/search/components/Editor/ui/table-element.tsx +243 -0
  279. package/src/modules/search/components/Editor/ui/table-row-element.tsx +22 -0
  280. package/src/modules/search/components/Editor/ui/tableValue.tsx +135 -0
  281. package/src/modules/search/components/Editor/ui/todo-list-element.tsx +43 -0
  282. package/src/modules/search/components/Editor/ui/toggle-element.tsx +31 -0
  283. package/src/modules/search/components/Editor/ui/toolbar.tsx +157 -0
  284. package/src/modules/search/components/Editor/ui/tooltip.tsx +65 -0
  285. package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.tsx +160 -0
  286. package/src/modules/search/components/Editor/ui/with-draggables.tsx +175 -0
  287. package/src/modules/search/components/FileList.tsx +287 -0
  288. package/src/modules/search/components/ImageGroupView/index.tsx +85 -0
  289. package/src/modules/search/components/ResultContent.tsx +232 -0
  290. package/src/modules/search/components/SearchInput.tsx +232 -0
  291. package/src/modules/search/components/SearchLanding.tsx +74 -0
  292. package/src/modules/search/components/SearchView.tsx +563 -0
  293. package/src/modules/search/components/SimpleEditor.tsx +158 -0
  294. package/src/modules/search/components/SimpleFileList.tsx +215 -0
  295. package/src/modules/search/index.tsx +10 -0
  296. package/src/modules/search/reademe.md +1 -0
  297. package/src/modules/search/servers/apis.tsx +19 -0
  298. package/src/modules/search/servers/index.ts +184 -0
  299. package/src/modules/search/style.less +503 -0
  300. package/src/modules/search/type.ts +22 -0
  301. package/src/modules/search/utils.ts +34 -0
  302. package/src/modules/sensitive/index.tsx +313 -0
  303. package/src/modules/sensitive/server.ts +122 -0
  304. package/src/modules/streamFilesReader/GientechStreamReader.tsx +1624 -0
  305. package/src/modules/streamFilesReader/components/Header/Toolbar.tsx +0 -0
  306. package/src/modules/streamFilesReader/components/Header/index.tsx +297 -0
  307. package/src/modules/streamFilesReader/index.tsx +3 -0
  308. package/src/style.css +6 -0
  309. package/src/type.d.ts +0 -0
  310. package/src/utils/commonFn.tsx +111 -0
  311. package/src/utils/gientechCommon/components/AppError.tsx +32 -0
  312. package/src/utils/gientechCommon/components/AppLoading.tsx +75 -0
  313. package/src/utils/gientechCommon/components/DeleteModal.tsx +75 -0
  314. package/src/utils/gientechCommon/components/DisplayError.tsx +33 -0
  315. package/src/utils/gientechCommon/components/DisplayLoading.tsx +38 -0
  316. package/src/utils/gientechCommon/components/FeedBackModal.tsx +310 -0
  317. package/src/utils/gientechCommon/components/FileCardCommon.tsx +82 -0
  318. package/src/utils/gientechCommon/components/FileManager/index.tsx +390 -0
  319. package/src/utils/gientechCommon/components/FileManager/style.css +5 -0
  320. package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +581 -0
  321. package/src/utils/gientechCommon/components/Messages/ReferenceCard.tsx +339 -0
  322. package/src/utils/gientechCommon/components/Messages/RetriveItem.tsx +245 -0
  323. package/src/utils/gientechCommon/components/Messages/WebRetriveItem.tsx +209 -0
  324. package/src/utils/gientechCommon/components/Messages/defaultBot.png +0 -0
  325. package/src/utils/gientechCommon/components/Messages/defaultStyleSet.tsx +148 -0
  326. package/src/utils/gientechCommon/components/Messages/defaultWeLogo.svg +14 -0
  327. package/src/utils/gientechCommon/components/RenameModal.tsx +86 -0
  328. package/src/utils/gientechCommon/components/style.less +11 -0
  329. package/src/utils/gientechCommon/configs/commonConfig.ts +2 -0
  330. package/src/utils/gientechCommon/configs/senderConfig.ts +0 -0
  331. package/src/utils/gientechCommon/configs/stylesConfig.ts +142 -0
  332. package/src/utils/gientechCommon/hooks/AichatUseController.tsx +417 -0
  333. package/src/utils/gientechCommon/slate/converters/deserializers.ts +763 -0
  334. package/src/utils/gientechCommon/slate/converters/mockData.ts +232 -0
  335. package/src/utils/gientechCommon/slate/converters/slateConverters.ts +258 -0
  336. package/src/utils/gientechCommon/slate/richElements/index.tsx +499 -0
  337. package/src/utils/gientechCommon/utils/request.ts +37 -0
  338. package/src/utils/gientechCommon/utils/serverFn.ts +172 -0
  339. package/src/utils/index.tsx +126 -0
  340. package/src/utils/testconfigs/demologin/index.tsx +32 -0
  341. package/src/utils/testconfigs/index.ts +59 -0
  342. package/src/vite-env.d.ts +11 -0
  343. package/stats.html +4949 -0
  344. package/tailwind.config.js +170 -0
  345. package/tsconfig.app.json +30 -0
  346. package/tsconfig.app.tsbuildinfo +11 -0
  347. package/tsconfig.json +13 -0
  348. package/tsconfig.node.json +22 -0
  349. package/tsconfig.node.tsbuildinfo +1 -0
  350. package/vite.config.ts +227 -0
  351. package/workflows/release.yml +60 -0
  352. package/assets/_commonjsHelpers-gnU0ypJ3.js +0 -1
  353. package/assets/index--DG-fVvc.js +0 -26
  354. package/assets/index-BfureYPx.js +0 -1505
  355. package/assets/index-CXwV5fAx.js +0 -1230
  356. package/assets/style.css +0 -1
  357. package/assets/style3.css +0 -1
  358. package/assets/styled-components.browser.esm-DPkS13KC.js +0 -2
  359. package/chat.js +0 -893
  360. package/database.js +0 -20
  361. package/databaseId.js +0 -21
  362. package/databaseTable.js +0 -6
  363. package/modelManage.js +0 -1
  364. package/sensitive.js +0 -1
  365. package/streamFilesReader.js +0 -442
  366. /package/{assets → dist/assets}/Doris.png +0 -0
  367. /package/{assets → dist/assets}/PostgreSQL.png +0 -0
  368. /package/{assets → dist/assets}/SQLServer.png +0 -0
  369. /package/{assets → dist/assets}/empty.png +0 -0
  370. /package/{assets → dist/assets}/index-CpW6Dhpp.js +0 -0
  371. /package/{assets → dist/assets}/style2.css +0 -0
  372. /package/{database.d.ts → dist/database.d.ts} +0 -0
  373. /package/{databaseId.d.ts → dist/databaseId.d.ts} +0 -0
  374. /package/{databaseTable.d.ts → dist/databaseTable.d.ts} +0 -0
  375. /package/{modelManage.d.ts → dist/modelManage.d.ts} +0 -0
  376. /package/{sensitive.d.ts → dist/sensitive.d.ts} +0 -0
  377. /package/{vite.svg → dist/vite.svg} +0 -0
@@ -0,0 +1,144 @@
1
+ import { useState, useEffect, useRef } from 'react';
2
+ import ResourceBinderItem from './ResourceBinderItem';
3
+ import SearchableSelector, { type SearchableSelectorRef } from './SearchableSelector';
4
+ import { Button, Modal } from 'antd';
5
+ import { Plus } from 'lucide-react';
6
+ import Icon from '../assets/databse.svg';
7
+ import AxiosInstance from '../server';
8
+
9
+ const maxCount = 10;
10
+
11
+ const DatabaseSection = ({ url, token, role, eventsEmit, sectionData, disabled }: any) => {
12
+ const [options, setOptions]: any = useState([]);
13
+ const [data, setData]: any = useState([]);
14
+ const [isModalShow, setIsModalShow] = useState(false);
15
+ const selectorRef = useRef<SearchableSelectorRef>(null);
16
+
17
+ const { fetchDatabases } = AxiosInstance({
18
+ url,
19
+ token,
20
+ role,
21
+ eventsEmit,
22
+ });
23
+
24
+ useEffect(() => {
25
+ getList();
26
+ }, []);
27
+
28
+ useEffect(() => {
29
+ if (sectionData) {
30
+ setData(sectionData);
31
+ }
32
+ }, [sectionData]);
33
+
34
+ const getList = async () => {
35
+ try {
36
+ const res = await fetchDatabases();
37
+ if (res) {
38
+ const options = (res || []).map((item: any) => {
39
+ return {
40
+ key: item.primitiveName,
41
+ label: item.name,
42
+ };
43
+ });
44
+ setOptions(options);
45
+ }
46
+ } catch (e) {
47
+ console.error(e);
48
+ }
49
+ };
50
+
51
+ const handleEventsEmit = (name: string, eventsData?: any) => {
52
+ switch (name) {
53
+ case 'removeItem':
54
+ const _data = data.filter((p: any) => p.key !== eventsData.key);
55
+ setData([..._data]);
56
+ eventsEmit && eventsEmit('database_selected', _data);
57
+ break;
58
+ }
59
+ };
60
+
61
+ const handleOk = () => {
62
+ // 通过 ref 获取选中的项
63
+ const selectedItems = selectorRef.current?.getSelectedItems() || [];
64
+ setData(selectedItems);
65
+ setIsModalShow(false);
66
+ eventsEmit && eventsEmit('database_selected', selectedItems);
67
+ };
68
+
69
+ return (
70
+ <div style={{ borderBottom: '1px solid #E5E6EB', padding: '12px 0 ' }}>
71
+ <div className="flex items-center justify-between">
72
+ <div className="flex items-center">
73
+ <img src={Icon} />
74
+ <span
75
+ className="font-medium "
76
+ style={{
77
+ marginLeft: '10px',
78
+ }}
79
+ >
80
+ 数据库
81
+ </span>
82
+ </div>
83
+
84
+ <div className="flex items-center gap-2">
85
+ <Button
86
+ color="primary"
87
+ variant="outlined"
88
+ size="small"
89
+ icon={<Plus size={14} />}
90
+ onClick={() => setIsModalShow(true)}
91
+ disabled={data.length >= maxCount || disabled}
92
+ >
93
+ 添加
94
+ </Button>
95
+ </div>
96
+ </div>
97
+ {data?.length > 0 && (
98
+ <ResourceBinderItem
99
+ countText={data?.length > 0 ? `已选:${data?.length}个数据库` : undefined}
100
+ eventsEmit={handleEventsEmit}
101
+ data={data}
102
+ />
103
+ )}
104
+
105
+ <Modal
106
+ width={740}
107
+ title="选择数据库"
108
+ okText="确定"
109
+ cancelText="取消"
110
+ open={isModalShow}
111
+ onOk={handleOk}
112
+ onCancel={() => setIsModalShow(false)}
113
+ destroyOnHidden
114
+ >
115
+ <SearchableSelector
116
+ ref={selectorRef}
117
+ dataSource={options}
118
+ value={data}
119
+ searchPlaceholder="搜索数据库..."
120
+ width="700px"
121
+ height="500px"
122
+ title="数据库"
123
+ maxCount={maxCount}
124
+ renderItem={item => {
125
+ return (
126
+ <div className="flex ">
127
+ <img src={Icon} alt="add" />
128
+ <span
129
+ style={{
130
+ marginLeft: 8,
131
+ }}
132
+ >
133
+ {item.label}
134
+ </span>
135
+ </div>
136
+ );
137
+ }}
138
+ />
139
+ </Modal>
140
+ </div>
141
+ );
142
+ };
143
+
144
+ export default DatabaseSection;
@@ -0,0 +1,156 @@
1
+ import { useState, useEffect, useRef } from 'react';
2
+ import ResourceBinderItem from './ResourceBinderItem';
3
+ import SearchableSelector, { type SearchableSelectorRef } from './SearchableSelector';
4
+ import { Button, Modal } from 'antd';
5
+ import { Plus } from 'lucide-react';
6
+ import Icon from '../assets/graph.svg';
7
+ import AxiosInstance from '../server';
8
+
9
+ const GraphSection = ({ url, token, role, eventsEmit, sectionData }: any) => {
10
+ const [options, setOptions]: any = useState([]);
11
+ const [data, setData]: any = useState([]);
12
+ const [isModalShow, setIsModalShow] = useState(false);
13
+ const selectorRef = useRef<SearchableSelectorRef>(null);
14
+
15
+ const { fetchGraphs } = AxiosInstance({
16
+ url,
17
+ token,
18
+ role,
19
+ eventsEmit,
20
+ });
21
+
22
+ useEffect(() => {
23
+ getList();
24
+ }, []);
25
+
26
+ useEffect(() => {
27
+ if (sectionData) {
28
+ const _data = sectionData.map((g: any) => {
29
+ return {
30
+ key: g.index_name,
31
+ label: g.graph_name,
32
+ };
33
+ });
34
+ setData(_data);
35
+ }
36
+ }, [sectionData]);
37
+
38
+ const getList = async () => {
39
+ try {
40
+ const res = await fetchGraphs();
41
+ if (res?.records) {
42
+ const options = (res?.records || []).map((item: any) => {
43
+ return {
44
+ key: item.schemaId,
45
+ label: item.name,
46
+ };
47
+ });
48
+ setOptions(options);
49
+ }
50
+ } catch (e) {
51
+ console.error(e);
52
+ }
53
+ };
54
+
55
+ const handleEventsEmit = (name: string, eventsData?: any) => {
56
+ switch (name) {
57
+ case 'removeItem':
58
+ const _data = data.filter((p: any) => p.key !== eventsData.key);
59
+ setData([..._data]);
60
+ handleDatatoSubmit(_data);
61
+ break;
62
+ }
63
+ };
64
+
65
+ const handleDatatoSubmit = (selectedItems: any) => {
66
+ const graph_nb_name = (selectedItems || []).map((s: any) => {
67
+ return {
68
+ graph_name: s.label,
69
+ index_name: s.key,
70
+ };
71
+ });
72
+ eventsEmit && eventsEmit('graph_selected', graph_nb_name);
73
+ };
74
+
75
+ const handleOk = () => {
76
+ // 通过 ref 获取选中的项
77
+ const selectedItems = selectorRef.current?.getSelectedItems() || [];
78
+ setData(selectedItems);
79
+ setIsModalShow(false);
80
+ handleDatatoSubmit(selectedItems);
81
+ };
82
+
83
+ return (
84
+ <div style={{ borderBottom: '1px solid #E5E6EB', padding: '12px 0 ' }}>
85
+ <div className="flex items-center justify-between">
86
+ <div className="flex items-center">
87
+ <img src={Icon} />
88
+ <span
89
+ className="font-medium "
90
+ style={{
91
+ marginLeft: '10px',
92
+ }}
93
+ >
94
+ 图谱库
95
+ </span>
96
+ </div>
97
+
98
+ <div className="flex items-center gap-2">
99
+ <Button
100
+ color="primary"
101
+ variant="outlined"
102
+ size="small"
103
+ icon={<Plus size={14} />}
104
+ onClick={() => setIsModalShow(true)}
105
+ >
106
+ 添加
107
+ </Button>
108
+ </div>
109
+ </div>
110
+ {data?.length > 0 && (
111
+ <ResourceBinderItem
112
+ countText={data?.length > 0 ? `已选:${data?.length}个图谱` : undefined}
113
+ eventsEmit={handleEventsEmit}
114
+ data={data}
115
+ />
116
+ )}
117
+
118
+ <Modal
119
+ width={740}
120
+ title="选择图谱"
121
+ okText="确定"
122
+ cancelText="取消"
123
+ open={isModalShow}
124
+ onOk={handleOk}
125
+ destroyOnHidden
126
+ onCancel={() => setIsModalShow(false)}
127
+ >
128
+ <SearchableSelector
129
+ ref={selectorRef}
130
+ dataSource={options}
131
+ value={data}
132
+ searchPlaceholder="搜索图谱..."
133
+ width="700px"
134
+ height="500px"
135
+ title="图谱"
136
+ renderItem={item => {
137
+ return (
138
+ <div className="flex ">
139
+ <img src={Icon} alt="add" />
140
+ <span
141
+ style={{
142
+ marginLeft: 8,
143
+ }}
144
+ >
145
+ {item.label}
146
+ </span>
147
+ </div>
148
+ );
149
+ }}
150
+ />
151
+ </Modal>
152
+ </div>
153
+ );
154
+ };
155
+
156
+ export default GraphSection;
@@ -0,0 +1,266 @@
1
+ import React, { useState, useEffect, useRef, useMemo } from 'react';
2
+ import ResourceBinderItem from './ResourceBinderItem';
3
+ import SearchableSelector, { type SearchableSelectorRef } from './SearchableSelector';
4
+ import { Button, Modal, Select } from 'antd';
5
+ import { Plus } from 'lucide-react';
6
+ import Icon from '../assets/knowledge.svg';
7
+ import AxiosInstance from '../server';
8
+
9
+ const KnowledgeSection = ({ url, token, role, sectionData, createBy, eventsEmit }: any) => {
10
+ console.log('助手配置——zhishiku', role, sectionData, createBy);
11
+
12
+ const [options, setOptions]: any = useState();
13
+ const [data, setData]: any = useState([]);
14
+ const [isModalShow, setIsModalShow] = useState(false);
15
+ const selectorRef = useRef<SearchableSelectorRef>(null);
16
+ const [loading, setLoading] = useState(false);
17
+ const [tagOptions, setTagOptions] = useState([]);
18
+ const tagIdMap = useRef(new Map()).current;
19
+ const { fetchKnowledgeBase, getBizLabelLabels } = AxiosInstance({
20
+ url,
21
+ token,
22
+ role,
23
+ eventsEmit,
24
+ });
25
+
26
+ const hasInitialized = useRef(false);
27
+
28
+ useEffect(() => {
29
+ // 如果已经初始化过,不再执行
30
+ if (hasInitialized.current) return;
31
+
32
+ if (createBy) {
33
+ getList(createBy);
34
+ hasInitialized.current = true;
35
+ } else {
36
+ getList();
37
+ hasInitialized.current = true;
38
+ }
39
+ }, [createBy]);
40
+
41
+ useEffect(() => {
42
+ if (sectionData && options?.length > 0) {
43
+ const kbNames = sectionData?.knowledge_base_name;
44
+ const kbNamesArr = kbNames && (Array.isArray(kbNames) ? kbNames : kbNames.split(';'));
45
+
46
+ const _list = (kbNamesArr || []).map((kb: string) => {
47
+ const selKb = (sectionData?.selectedKnowledgeBase || []).find((k: any) => k.name == kb);
48
+ const optionKb = (options || []).find((i: any) => i.label === kb);
49
+ const { key, label, knowledge_base_name, knowledge_base_name_source } = optionKb;
50
+ return {
51
+ key,
52
+ label,
53
+ knowledge_base_name,
54
+ knowledge_base_name_source,
55
+ tags: selKb?.labels,
56
+ };
57
+ });
58
+ setData(_list);
59
+ }
60
+ }, [sectionData, options]);
61
+
62
+ const getList = async (params?: any) => {
63
+ try {
64
+ const res = await fetchKnowledgeBase(params);
65
+ if (res) {
66
+ const options = (res || []).map((kb: any) => {
67
+ return {
68
+ key: kb.id,
69
+ label: kb.kbName,
70
+ knowledge_base_name: kb.kbName,
71
+ knowledge_base_name_source: kb.primitiveName,
72
+ };
73
+ });
74
+ setOptions(options);
75
+ }
76
+ } catch (e) {
77
+ console.error(e);
78
+ }
79
+ };
80
+
81
+ const handleEventsEmit = (name: string, eventsData?: any) => {
82
+ switch (name) {
83
+ case 'removeItem':
84
+ const _data = data.filter((p: any) => p.key !== eventsData.key);
85
+ setData([..._data]);
86
+ handleDatatoSubmit(_data);
87
+ break;
88
+ case 'removeTag':
89
+ const index = data.findIndex((d: any) => d.key == eventsData.key);
90
+ if (index !== -1) {
91
+ // 替换元素
92
+ data[index] = eventsData;
93
+ }
94
+
95
+ setData([...data]);
96
+ handleDatatoSubmit(data);
97
+ break;
98
+ }
99
+ };
100
+
101
+ const handleDatatoSubmit = (selectedItems: any) => {
102
+ const knowledge_base_name = (selectedItems || [])
103
+ .map((s: any) => s?.label || '')
104
+ .filter(key => key)
105
+ .join(';');
106
+ const knowledge_base_name_source = (selectedItems || [])
107
+ .map((s: any) => s?.knowledge_base_name_source || '')
108
+ .filter(key => key)
109
+ .join(';');
110
+ const selectedKnowledgeBase = (selectedItems || []).map((s: any) => {
111
+ return {
112
+ id: s.key,
113
+ name: s.label,
114
+ knowledge_base_name_source: s.knowledge_base_name_source,
115
+ labels: s.tags,
116
+ };
117
+ });
118
+ eventsEmit &&
119
+ eventsEmit('knowledge_selected', {
120
+ knowledge_base_name,
121
+ knowledge_base_name_source,
122
+ selectedKnowledgeBase,
123
+ });
124
+ };
125
+
126
+ const handleOk = () => {
127
+ // 通过 ref 获取选中的项
128
+ const selectedItems = selectorRef.current?.getSelectedItems() || [];
129
+ setData(selectedItems);
130
+ setIsModalShow(false);
131
+ handleDatatoSubmit(selectedItems);
132
+ };
133
+
134
+ // 监听下拉框展开事件
135
+ const handleDropdownVisibleChange = async (open: boolean, targetId: number) => {
136
+ if (open) {
137
+ const o = tagIdMap.get(targetId);
138
+ if (o) {
139
+ setTagOptions(o);
140
+ return;
141
+ }
142
+ // 如果尚未加载过数据,则发起请求
143
+ if (!loading) {
144
+ try {
145
+ setLoading(true);
146
+ const res: any = await getBizLabelLabels({ kbNames: [targetId] });
147
+
148
+ if (Array.isArray(res)) {
149
+ const label = res.length ? res[0].label : '';
150
+ const labels = label
151
+ ? (label || '').split(',').map((item: any) => {
152
+ return { label: item, value: item };
153
+ })
154
+ : [];
155
+
156
+ tagIdMap.set(targetId, labels);
157
+ setTagOptions(labels);
158
+ }
159
+ setLoading(false);
160
+ } catch (error) {
161
+ console.error('Error fetching data:', error);
162
+ setLoading(false);
163
+ }
164
+ }
165
+ }
166
+ };
167
+
168
+ return (
169
+ <div style={{ borderBottom: '1px solid #E5E6EB', padding: '12px 0 ' }}>
170
+ <div className="flex items-center justify-between">
171
+ <div className="flex items-center">
172
+ <img src={Icon} />
173
+ <span
174
+ className="font-medium "
175
+ style={{
176
+ marginLeft: '10px',
177
+ }}
178
+ >
179
+ 知识库
180
+ </span>
181
+ </div>
182
+
183
+ <div className="flex items-center gap-2">
184
+ <Button
185
+ color="primary"
186
+ variant="outlined"
187
+ size="small"
188
+ icon={<Plus size={14} />}
189
+ onClick={() => setIsModalShow(true)}
190
+ >
191
+ 添加
192
+ </Button>
193
+ </div>
194
+ </div>
195
+ {data?.length > 0 && (
196
+ <ResourceBinderItem
197
+ countText={data?.length > 0 ? `已选:${data?.length}个知识库` : undefined}
198
+ eventsEmit={handleEventsEmit}
199
+ data={data}
200
+ />
201
+ )}
202
+
203
+ <Modal
204
+ width={740}
205
+ title="选择数据库"
206
+ okText="确定"
207
+ cancelText="取消"
208
+ open={isModalShow}
209
+ onOk={handleOk}
210
+ onCancel={() => setIsModalShow(false)}
211
+ destroyOnHidden
212
+ >
213
+ <SearchableSelector
214
+ ref={selectorRef}
215
+ dataSource={options}
216
+ value={data}
217
+ searchPlaceholder="搜索数据库..."
218
+ width="700px"
219
+ height="500px"
220
+ title="知识库"
221
+ renderItem={item => {
222
+ return (
223
+ <div className="flex ">
224
+ <img src={Icon} alt="add" />
225
+ <span
226
+ style={{
227
+ marginLeft: 8,
228
+ }}
229
+ >
230
+ {item.label}
231
+ </span>
232
+ </div>
233
+ );
234
+ }}
235
+ renderSelectedItem={(item, updateItemData) => {
236
+ return (
237
+ <div className="flex ">
238
+ <img src={Icon} alt="add" />
239
+ <div style={{ marginLeft: '12px' }}>
240
+ <div style={{ marginBottom: '8px', fontWeight: 500 }}>{item.label}</div>
241
+ <Select
242
+ mode="tags"
243
+ placeholder="选择标签..."
244
+ maxTagCount={1}
245
+ value={item.tags || []}
246
+ onChange={tags => {
247
+ updateItemData(tags);
248
+ }}
249
+ style={{ width: 250 }}
250
+ options={tagOptions}
251
+ loading={loading}
252
+ onOpenChange={(open: boolean) => {
253
+ handleDropdownVisibleChange(open, item.knowledge_base_name);
254
+ }}
255
+ />
256
+ </div>
257
+ </div>
258
+ );
259
+ }}
260
+ />
261
+ </Modal>
262
+ </div>
263
+ );
264
+ };
265
+
266
+ export default React.memo(KnowledgeSection);
@@ -0,0 +1,21 @@
1
+ const NotFoundContent = () => {
2
+ return (
3
+ <div className="w-full h-[80px] rounded-md flex flex-col justify-center items-center">
4
+ <svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
5
+ <g transform="translate(0 1)" fill="none" fill-rule="evenodd">
6
+ <ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse>
7
+ <g fill-rule="nonzero" stroke="#d9d9d9">
8
+ <path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path>
9
+ <path
10
+ d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
11
+ fill="#fafafa"
12
+ ></path>
13
+ </g>
14
+ </g>
15
+ </svg>
16
+ <div>暂无可用模型</div>
17
+ </div>
18
+ );
19
+ };
20
+
21
+ export default NotFoundContent;
@@ -0,0 +1,51 @@
1
+ import { useState, type PropsWithChildren } from 'react';
2
+ import { ChevronUp, ChevronDown } from 'lucide-react';
3
+ type ParagraphTitleProps = {
4
+ title: string;
5
+ defaultExpanded?: boolean;
6
+ className?: string;
7
+ };
8
+
9
+ const ParagraphTitle = ({
10
+ title,
11
+ defaultExpanded = true,
12
+ className,
13
+ children,
14
+ }: PropsWithChildren<ParagraphTitleProps>) => {
15
+ const [expanded, setExpanded] = useState<boolean>(defaultExpanded);
16
+
17
+ return (
18
+ <div className={className}>
19
+ <div className="flex items-center justify-between" style={{ marginBottom: '10px' }}>
20
+ <div className="flex items-center">
21
+ <div
22
+ style={{
23
+ width: '3px',
24
+ height: '12px',
25
+ backgroundColor: '#4E6EF2',
26
+ borderRadius: '6px',
27
+ marginRight: '6px',
28
+ }}
29
+ ></div>
30
+ <div className="font-bold">{title}</div>
31
+ </div>
32
+ {expanded ? (
33
+ <ChevronUp onClick={() => setExpanded(v => !v)} color="#4E6EF2" size={18} />
34
+ ) : (
35
+ <ChevronDown onClick={() => setExpanded(v => !v)} color="#4E5969" size={18} />
36
+ )}
37
+ </div>
38
+ {children ? (
39
+ <div
40
+ style={{
41
+ display: expanded ? 'block' : 'none',
42
+ }}
43
+ >
44
+ {children}
45
+ </div>
46
+ ) : null}
47
+ </div>
48
+ );
49
+ };
50
+
51
+ export default ParagraphTitle;
@@ -0,0 +1,39 @@
1
+ import { Form, Col } from 'antd';
2
+ import { useMemo } from 'react';
3
+ import SliderInput from './SliderInput';
4
+ const { Item } = Form;
5
+
6
+ const ParamsItem = ({ label, name, configScale }: any) => {
7
+ const config = useMemo(() => {
8
+ return configScale[name];
9
+ }, [configScale]);
10
+
11
+ const validateNumber = (min: number, max: number) => ({
12
+ validator(_: any, value: any) {
13
+ // 自定义验证逻辑
14
+ if (value === null || value === undefined) {
15
+ return Promise.reject('请输入有效数字');
16
+ }
17
+ if (typeof +value !== 'number' || isNaN(+value)) {
18
+ return Promise.reject('只能输入数字');
19
+ }
20
+ if (value < min || value > max) {
21
+ return Promise.reject(`请输入${min}到${max}之间的数字`);
22
+ }
23
+ return Promise.resolve();
24
+ },
25
+ });
26
+ return (
27
+ <Col span={12}>
28
+ <Item
29
+ label={label}
30
+ name={name}
31
+ tooltip={config.tooltip}
32
+ rules={[{ required: true, message: '' }, validateNumber(config.min, config.max)]}
33
+ >
34
+ <SliderInput min={config.min} max={config.max} step={config.step} />
35
+ </Item>
36
+ </Col>
37
+ );
38
+ };
39
+ export default ParamsItem;