@gientech/modual 2.0.9 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +761 -761
- package/{dist/assets/GientechStreamReader-CNj6Rcm7.js → assets/GientechStreamReader-DybWMK4d.js} +1 -1
- package/{src/modules/database/assets → assets}/database.svg +11 -11
- package/{src/modules/database/assets → assets}/database_add.svg +53 -53
- package/{src/modules/database/assets → assets}/database_connect.svg +66 -66
- package/{dist/assets → assets}/database_upload.svg +29 -29
- package/{dist/assets → assets}/databse.svg +6 -6
- package/{dist/assets → assets}/defaultWeLogo.svg +14 -14
- package/{dist/assets → assets}/graph.svg +4 -4
- package/{dist/assets/index-DrkSoKz6.js → assets/index-B1ZDDbC1.js} +1 -1
- package/{dist/assets/index-D72cKELw.js → assets/index-CBTA5S-5.js} +1 -1
- package/{dist/assets/index-B2yNvzjy.js → assets/index-CN2AYX8Q.js} +1 -1
- package/{dist/assets/index-BJv0t0eJ.js → assets/index-D0DDewJ2.js} +34 -34
- package/{dist/assets/index-BKe5FgcC.js → assets/index-D9lYd8TZ.js} +1 -1
- package/{dist/assets/index-ZopkeZtI.js → assets/index-DYhXjvk4.js} +1 -1
- package/{dist/assets/index-g-SUxfJH.js → assets/index-LDFwTu47.js} +1 -1
- package/{dist/assets/index-j0kQJd0a.js → assets/index-NFQIKNFn.js} +1 -1
- package/{dist/assets/index-CU45mVZ4.js → assets/index-S4W4X-HN.js} +2 -2
- package/{dist/assets/index-DdVFXD_y.js → assets/index-s0cmC4Ks.js} +1 -1
- package/{src/modules/assistantConfig/assets → assets}/knowledge.svg +4 -4
- package/{src/modules/database/assets → assets}/mysql.svg +14 -14
- package/{dist/assets/plus-V9zUoSq6.js → assets/plus-G7zGXf6S.js} +1 -1
- package/{dist/assets → assets}/sensitive.svg +5 -5
- package/{dist/assets/style-CGmZ5osp.js → assets/style-Bn7b5XHU.js} +2 -2
- package/assets/style4.css +1 -0
- package/{dist/assets/x-CnaaLGJF.js → assets/x-vfKYzKkK.js} +1 -1
- package/assistantConfig.js +1 -0
- package/chat.js +806 -0
- package/database.js +20 -0
- package/databaseId.js +1 -0
- package/{dist/databaseTable.js → databaseTable.js} +1 -1
- package/index.js +1 -0
- package/{dist/modelManage.js → modelManage.js} +1 -1
- package/package.json +44 -106
- package/{dist/sensitive.js → sensitive.js} +1 -1
- package/streamFilesReader.js +1 -0
- package/{public/worker → worker}/pdf.worker.min.js +21 -21
- package/.editorconfig +0 -38
- package/.prettierignore +0 -16
- package/.prettierrc +0 -17
- package/INSTALL_TROUBLESHOOTING.md +0 -316
- package/USAGE.md +0 -247
- package/bash.exe.stackdump +0 -40
- package/components.json +0 -21
- package/dist/README.md +0 -761
- package/dist/assets/database.svg +0 -11
- package/dist/assets/database_add.svg +0 -53
- package/dist/assets/database_connect.svg +0 -66
- package/dist/assets/knowledge.svg +0 -4
- package/dist/assets/mysql.svg +0 -14
- package/dist/assets/style4.css +0 -1
- package/dist/assistantConfig.js +0 -1
- package/dist/chat.js +0 -844
- package/dist/database.js +0 -20
- package/dist/databaseId.js +0 -1
- package/dist/index.js +0 -1
- package/dist/package.json +0 -68
- package/dist/streamFilesReader.js +0 -1
- package/dist/worker/pdf.worker.min.js +0 -22
- package/doc_assets/2.png +0 -0
- package/doc_assets/demo.md +0 -27
- package/doc_assets/demos/dist-app/assets/index.Dh-ZAS9Z.css +0 -2
- package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js +0 -23699
- package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js.map +0 -1
- package/doc_assets/demos/dist-app/index.html +0 -14
- package/doc_assets/demos/dist-app/vite.svg +0 -1
- package/doc_assets/images/1.png +0 -0
- package/doc_assets/images/3.png +0 -0
- package/doc_assets/images/component-screenshot.png +0 -1
- package/doc_assets/install.md +0 -5
- package/doc_assets/v2.0.7/345/217/230/346/233/264/346/200/273/347/273/223.md +0 -115
- 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 +0 -504
- package/eslint.config.js +0 -92
- package/index.html +0 -13
- package/package.json.demo-backup +0 -109
- package/postcss.config.cjs +0 -19
- package/public/icons/answerAwartar.png +0 -0
- package/public/icons/docx-file.png +0 -0
- package/public/icons/folder.png +0 -0
- package/public/icons/html.png +0 -0
- package/public/icons/image.png +0 -0
- package/public/icons/jpg-file.png +0 -0
- package/public/icons/json.png +0 -0
- package/public/icons/md.png +0 -0
- package/public/icons/pdf.png +0 -0
- package/public/icons/pptx.png +0 -0
- package/public/icons/questionAwartar.png +0 -0
- package/public/icons/sheets.png +0 -0
- package/public/icons/txt.png +0 -0
- package/public/icons/xlsx.png +0 -0
- package/public/vite.svg +0 -1
- package/scripts/README.md +0 -133
- package/scripts/build-demo.js +0 -88
- package/scripts/decrypt-api-key.js +0 -95
- package/scripts/demo-selector.js +0 -216
- package/scripts/dev-demo.js +0 -76
- package/scripts/preview-demo.js +0 -130
- package/scripts/run-demo.bat +0 -34
- package/src/assets/img/close.png +0 -0
- package/src/assets/img/database.png +0 -0
- package/src/assets/img/downArrow.png +0 -0
- package/src/assets/img/downLoad.png +0 -0
- package/src/assets/img/excel.png +0 -0
- package/src/assets/img/graphIcon.png +0 -0
- package/src/assets/img/img.png +0 -0
- package/src/assets/img/pdf.png +0 -0
- package/src/assets/img/ppt.png +0 -0
- package/src/assets/img/singleQa.png +0 -0
- package/src/assets/img/txt.png +0 -0
- package/src/assets/img/webSearch.png +0 -0
- package/src/assets/img/word.png +0 -0
- package/src/assets/login/homeBg.png +0 -0
- package/src/assets/login/left.jpg +0 -0
- package/src/assets/login/logoImg.png +0 -0
- package/src/examples/ConversationAssistantPage/index.tsx +0 -41
- package/src/examples/Demo/index.tsx +0 -12
- package/src/examples/LoginPage/index.tsx +0 -18
- package/src/examples/chat/components/DrawerGraphPreview.tsx +0 -78
- package/src/examples/chat/index.tsx +0 -166
- package/src/examples/chat/logo03.png +0 -0
- package/src/examples/gientechStreamFilesReader/index.tsx +0 -951
- package/src/examples/headlessChat/assets/mind.svg +0 -6
- package/src/examples/headlessChat/assets/net.svg +0 -7
- package/src/examples/headlessChat/index.tsx +0 -285
- package/src/examples/ragDatabaseDataPage/index.tsx +0 -40
- package/src/examples/ragDatabaseIdPage/index.tsx +0 -47
- package/src/examples/ragDatabasePage/index.tsx +0 -36
- package/src/examples/ragModelManagePage/index.tsx +0 -38
- package/src/examples/ragSearchPage/index.tsx +0 -0
- package/src/examples/ragSensitiveWordsPage/index.tsx +0 -32
- package/src/examples/streamFiles/index.tsx +0 -417
- package/src/lib_enter.ts +0 -43
- package/src/main.tsx +0 -5
- package/src/main.tsx.backup +0 -5
- package/src/modules/CHAT_UNIFICATION_PLAN.md +0 -324
- package/src/modules/assistantConfig/assets/databse.svg +0 -6
- package/src/modules/assistantConfig/assets/empty.png +0 -0
- package/src/modules/assistantConfig/assets/graph.svg +0 -4
- package/src/modules/assistantConfig/assets/sensitive.svg +0 -5
- package/src/modules/assistantConfig/components/Database.tsx +0 -171
- package/src/modules/assistantConfig/components/Graph.tsx +0 -177
- package/src/modules/assistantConfig/components/Knowledge.tsx +0 -276
- package/src/modules/assistantConfig/components/NotFoundContent.tsx +0 -21
- package/src/modules/assistantConfig/components/Paragraph.tsx +0 -51
- package/src/modules/assistantConfig/components/ParamsItem.tsx +0 -39
- package/src/modules/assistantConfig/components/ResourceBinderItem.tsx +0 -133
- package/src/modules/assistantConfig/components/SearchableSelector.tsx +0 -500
- package/src/modules/assistantConfig/components/Sensitive.tsx +0 -221
- package/src/modules/assistantConfig/components/SliderInput.tsx +0 -65
- package/src/modules/assistantConfig/constants.tsx +0 -75
- package/src/modules/assistantConfig/index.tsx +0 -710
- package/src/modules/assistantConfig/server.ts +0 -262
- package/src/modules/chat/Conversations/Item.tsx +0 -167
- package/src/modules/chat/Conversations/List.tsx +0 -210
- package/src/modules/chat/Conversations/groupByTime.ts +0 -39
- package/src/modules/chat/Conversations/index.tsx +0 -252
- package/src/modules/chat/ReferenceBar.tsx +0 -622
- package/src/modules/chat/constants.tsx +0 -57
- package/src/modules/chat/index.tsx +0 -2449
- package/src/modules/chat/referenceCom/DeleteModal.tsx +0 -75
- package/src/modules/chat/referenceCom/DrawerContent.tsx +0 -136
- package/src/modules/chat/referenceCom/DrawerDatabase.tsx +0 -102
- package/src/modules/chat/referenceCom/DrawerGraphPreview.tsx +0 -86
- package/src/modules/chat/referenceCom/DrawerPreview.tsx +0 -73
- package/src/modules/chat/referenceCom/DrawerTitle.tsx +0 -26
- package/src/modules/chat/referenceCom/RenameModal.tsx +0 -86
- package/src/modules/chat/referenceCom/TagCom.tsx +0 -30
- package/src/modules/chat/style.less +0 -3
- package/src/modules/chat/types.ts +0 -17
- package/src/modules/chat/utils/index.ts +0 -348
- package/src/modules/database/CreateModal.tsx +0 -403
- package/src/modules/database/assets/Doris.png +0 -0
- package/src/modules/database/assets/PostgreSQL.png +0 -0
- package/src/modules/database/assets/SQLServer.png +0 -0
- package/src/modules/database/assets/database_upload.svg +0 -29
- package/src/modules/database/assets/empty.png +0 -0
- package/src/modules/database/index.tsx +0 -477
- package/src/modules/database/server.ts +0 -196
- package/src/modules/databaseId/CustomCom.tsx +0 -156
- package/src/modules/databaseId/EditConfig.tsx +0 -280
- package/src/modules/databaseId/UploadDrawer.tsx +0 -535
- package/src/modules/databaseId/assets/aiOptimize.svg +0 -10
- package/src/modules/databaseId/assets/empty.png +0 -0
- package/src/modules/databaseId/assets/template.svg +0 -6
- package/src/modules/databaseId/assets/upload.svg +0 -9
- package/src/modules/databaseId/assets/useTemp.svg +0 -6
- package/src/modules/databaseId/index.tsx +0 -769
- package/src/modules/databaseId/server.ts +0 -286
- package/src/modules/databaseId/style.css +0 -5
- package/src/modules/databaseTable/EditRowDrawer.tsx +0 -124
- package/src/modules/databaseTable/index.tsx +0 -359
- package/src/modules/databaseTable/server.ts +0 -180
- package/src/modules/headlessChat/ReferenceBar.tsx +0 -783
- package/src/modules/headlessChat/constants.tsx +0 -54
- package/src/modules/headlessChat/index.tsx +0 -1782
- package/src/modules/headlessChat/referenceCom/DeleteModal.tsx +0 -75
- package/src/modules/headlessChat/referenceCom/DrawerContent.tsx +0 -136
- package/src/modules/headlessChat/referenceCom/DrawerDatabase.tsx +0 -102
- package/src/modules/headlessChat/referenceCom/DrawerGraphPreview.tsx +0 -86
- package/src/modules/headlessChat/referenceCom/DrawerPreview.tsx +0 -73
- package/src/modules/headlessChat/referenceCom/DrawerTitle.tsx +0 -26
- package/src/modules/headlessChat/referenceCom/RenameModal.tsx +0 -86
- package/src/modules/headlessChat/referenceCom/TagCom.tsx +0 -30
- package/src/modules/headlessChat/style.less +0 -3
- package/src/modules/headlessChat/types.ts +0 -23
- package/src/modules/headlessChat/utils/index.ts +0 -348
- package/src/modules/login/components/Login/LoginBox/index.tsx +0 -102
- package/src/modules/login/components/Login/RegisterBox/index.tsx +0 -180
- package/src/modules/login/components/Login/index.tsx +0 -100
- package/src/modules/login/index.tsx +0 -106
- package/src/modules/login/style.css +0 -3
- package/src/modules/login/useServices.ts +0 -53
- package/src/modules/login/utils.ts +0 -42
- package/src/modules/modelManage/ConfigDrawer.tsx +0 -249
- package/src/modules/modelManage/ReplaceModal.tsx +0 -124
- package/src/modules/modelManage/assets/empty.png +0 -0
- package/src/modules/modelManage/const.ts +0 -51
- package/src/modules/modelManage/index.tsx +0 -606
- package/src/modules/modelManage/server.ts +0 -223
- package/src/modules/nodegraph/index.tsx +0 -1
- package/src/modules/search/assets/Icon-history.svg +0 -8
- package/src/modules/search/assets/answerAwartar.png +0 -0
- package/src/modules/search/assets/doc.png +0 -0
- package/src/modules/search/assets/genera.gif +0 -0
- package/src/modules/search/assets/icon-robot.svg +0 -9
- package/src/modules/search/assets/icon-search-bar.svg +0 -14
- package/src/modules/search/assets/icon-sub-title.svg +0 -3
- package/src/modules/search/assets/icon-title.svg +0 -9
- package/src/modules/search/assets/icon-zoomOut.svg +0 -9
- package/src/modules/search/assets/iconAi.svg +0 -9
- package/src/modules/search/assets/pdf.png +0 -0
- package/src/modules/search/assets/ppt.png +0 -0
- package/src/modules/search/assets/search.svg +0 -3
- package/src/modules/search/assets/selected.svg +0 -4
- package/src/modules/search/assets/txt.png +0 -0
- package/src/modules/search/assets/xls.png +0 -0
- package/src/modules/search/components/AssisSelect.tsx +0 -137
- package/src/modules/search/components/Editor/ChatViewEditor.tsx +0 -261
- package/src/modules/search/components/Editor/aichat.css +0 -1
- package/src/modules/search/components/Editor/constant.ts +0 -13
- package/src/modules/search/components/Editor/index.tsx +0 -113
- package/src/modules/search/components/Editor/plugins/autofomatRules.ts +0 -332
- package/src/modules/search/components/Editor/plugins/convertImgPlugins.tsx +0 -20
- package/src/modules/search/components/Editor/plugins/createIndexes.tsx +0 -38
- package/src/modules/search/components/Editor/plugins/displayer.ts +0 -298
- package/src/modules/search/components/Editor/plugins/imageClick.tsx +0 -32
- package/src/modules/search/components/Editor/plugins/myplugin.tsx +0 -98
- package/src/modules/search/components/Editor/ui/avatar.tsx +0 -19
- package/src/modules/search/components/Editor/ui/blockquote-element.tsx +0 -21
- package/src/modules/search/components/Editor/ui/button.tsx +0 -58
- package/src/modules/search/components/Editor/ui/calendar.tsx +0 -68
- package/src/modules/search/components/Editor/ui/caption.tsx +0 -46
- package/src/modules/search/components/Editor/ui/checkbox.tsx +0 -27
- package/src/modules/search/components/Editor/ui/code-block-combobox.tsx +0 -188
- package/src/modules/search/components/Editor/ui/code-block-element.css +0 -434
- package/src/modules/search/components/Editor/ui/code-block-element.tsx +0 -39
- package/src/modules/search/components/Editor/ui/code-leaf.tsx +0 -24
- package/src/modules/search/components/Editor/ui/code-line-element.tsx +0 -10
- package/src/modules/search/components/Editor/ui/code-syntax-leaf.tsx +0 -21
- package/src/modules/search/components/Editor/ui/column-element.tsx +0 -30
- package/src/modules/search/components/Editor/ui/column-group-element.tsx +0 -94
- package/src/modules/search/components/Editor/ui/command.tsx +0 -75
- package/src/modules/search/components/Editor/ui/comment-avatar.tsx +0 -22
- package/src/modules/search/components/Editor/ui/comment-create-form.tsx +0 -37
- package/src/modules/search/components/Editor/ui/comment-item.tsx +0 -74
- package/src/modules/search/components/Editor/ui/comment-leaf.tsx +0 -49
- package/src/modules/search/components/Editor/ui/comment-more-dropdown.tsx +0 -42
- package/src/modules/search/components/Editor/ui/comment-reply-items.tsx +0 -22
- package/src/modules/search/components/Editor/ui/comment-resolve-button.tsx +0 -32
- package/src/modules/search/components/Editor/ui/comment-value.tsx +0 -34
- package/src/modules/search/components/Editor/ui/comments-popover.tsx +0 -63
- package/src/modules/search/components/Editor/ui/date-element.tsx +0 -83
- package/src/modules/search/components/Editor/ui/dialog.tsx +0 -63
- package/src/modules/search/components/Editor/ui/draggable.tsx +0 -177
- package/src/modules/search/components/Editor/ui/dropdown-menu.tsx +0 -180
- package/src/modules/search/components/Editor/ui/emoji-input-element.tsx +0 -85
- package/src/modules/search/components/Editor/ui/excalidraw-element.tsx +0 -28
- package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.tsx +0 -76
- package/src/modules/search/components/Editor/ui/fixed-toolbar.tsx +0 -8
- package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.tsx +0 -51
- package/src/modules/search/components/Editor/ui/floating-toolbar.tsx +0 -77
- package/src/modules/search/components/Editor/ui/heading-element.tsx +0 -48
- package/src/modules/search/components/Editor/ui/highlight-leaf.tsx +0 -17
- package/src/modules/search/components/Editor/ui/hr-element.tsx +0 -30
- package/src/modules/search/components/Editor/ui/icons.tsx +0 -267
- package/src/modules/search/components/Editor/ui/image-element.tsx +0 -74
- package/src/modules/search/components/Editor/ui/inline-combobox.tsx +0 -368
- package/src/modules/search/components/Editor/ui/input.tsx +0 -25
- package/src/modules/search/components/Editor/ui/insert-dropdown-menu.tsx +0 -218
- package/src/modules/search/components/Editor/ui/kbd-leaf.tsx +0 -20
- package/src/modules/search/components/Editor/ui/link-element.tsx +0 -29
- package/src/modules/search/components/Editor/ui/link-floating-toolbar.tsx +0 -161
- package/src/modules/search/components/Editor/ui/list-element.tsx +0 -30
- package/src/modules/search/components/Editor/ui/mark-toolbar-button.tsx +0 -24
- package/src/modules/search/components/Editor/ui/media-embed-element.tsx +0 -133
- package/src/modules/search/components/Editor/ui/media-popover.tsx +0 -97
- package/src/modules/search/components/Editor/ui/mention-element.tsx +0 -43
- package/src/modules/search/components/Editor/ui/mention-input-element.tsx +0 -141
- package/src/modules/search/components/Editor/ui/mode-dropdown-menu.tsx +0 -93
- package/src/modules/search/components/Editor/ui/more-dropdown-menu.tsx +0 -67
- package/src/modules/search/components/Editor/ui/paragraph-element.tsx +0 -4
- package/src/modules/search/components/Editor/ui/placeholder.tsx +0 -52
- package/src/modules/search/components/Editor/ui/popover.tsx +0 -32
- package/src/modules/search/components/Editor/ui/resizable.tsx +0 -66
- package/src/modules/search/components/Editor/ui/separator.tsx +0 -25
- package/src/modules/search/components/Editor/ui/style.less +0 -12
- package/src/modules/search/components/Editor/ui/table-cell-element.tsx +0 -143
- package/src/modules/search/components/Editor/ui/table-element.tsx +0 -243
- package/src/modules/search/components/Editor/ui/table-row-element.tsx +0 -22
- package/src/modules/search/components/Editor/ui/tableValue.tsx +0 -135
- package/src/modules/search/components/Editor/ui/todo-list-element.tsx +0 -43
- package/src/modules/search/components/Editor/ui/toggle-element.tsx +0 -31
- package/src/modules/search/components/Editor/ui/toolbar.tsx +0 -157
- package/src/modules/search/components/Editor/ui/tooltip.tsx +0 -65
- package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.tsx +0 -160
- package/src/modules/search/components/Editor/ui/with-draggables.tsx +0 -175
- package/src/modules/search/components/FileList.tsx +0 -287
- package/src/modules/search/components/ImageGroupView/index.tsx +0 -85
- package/src/modules/search/components/ResultContent.tsx +0 -232
- package/src/modules/search/components/SearchInput.tsx +0 -232
- package/src/modules/search/components/SearchLanding.tsx +0 -74
- package/src/modules/search/components/SearchView.tsx +0 -563
- package/src/modules/search/components/SimpleEditor.tsx +0 -158
- package/src/modules/search/components/SimpleFileList.tsx +0 -215
- package/src/modules/search/index.tsx +0 -10
- package/src/modules/search/reademe.md +0 -1
- package/src/modules/search/servers/apis.tsx +0 -19
- package/src/modules/search/servers/index.ts +0 -184
- package/src/modules/search/style.less +0 -503
- package/src/modules/search/type.ts +0 -22
- package/src/modules/search/utils.ts +0 -34
- package/src/modules/sensitive/index.tsx +0 -313
- package/src/modules/sensitive/server.ts +0 -122
- package/src/modules/streamFilesReader/GientechStreamReader.tsx +0 -1625
- package/src/modules/streamFilesReader/components/Header/Toolbar.tsx +0 -0
- package/src/modules/streamFilesReader/components/Header/index.tsx +0 -297
- package/src/modules/streamFilesReader/index.tsx +0 -3
- package/src/style.css +0 -6
- package/src/type.d.ts +0 -0
- package/src/utils/commonFn.tsx +0 -111
- package/src/utils/decryptApiKey.ts +0 -40
- package/src/utils/gientechCommon/components/AppError.tsx +0 -32
- package/src/utils/gientechCommon/components/AppLoading.tsx +0 -75
- package/src/utils/gientechCommon/components/DeleteModal.tsx +0 -75
- package/src/utils/gientechCommon/components/DisplayError.tsx +0 -33
- package/src/utils/gientechCommon/components/DisplayLoading.tsx +0 -38
- package/src/utils/gientechCommon/components/FeedBackModal.tsx +0 -319
- package/src/utils/gientechCommon/components/FileCardCommon.tsx +0 -82
- package/src/utils/gientechCommon/components/FileManager/index.tsx +0 -418
- package/src/utils/gientechCommon/components/FileManager/style.css +0 -5
- package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +0 -581
- package/src/utils/gientechCommon/components/Messages/ReferenceCard.tsx +0 -359
- package/src/utils/gientechCommon/components/Messages/RetriveItem.tsx +0 -245
- package/src/utils/gientechCommon/components/Messages/WebRetriveItem.tsx +0 -209
- package/src/utils/gientechCommon/components/Messages/defaultBot.png +0 -0
- package/src/utils/gientechCommon/components/Messages/defaultStyleSet.tsx +0 -148
- package/src/utils/gientechCommon/components/Messages/defaultWeLogo.svg +0 -14
- package/src/utils/gientechCommon/components/RenameModal.tsx +0 -86
- package/src/utils/gientechCommon/components/style.less +0 -11
- package/src/utils/gientechCommon/configs/commonConfig.ts +0 -2
- package/src/utils/gientechCommon/configs/senderConfig.ts +0 -0
- package/src/utils/gientechCommon/configs/stylesConfig.ts +0 -142
- package/src/utils/gientechCommon/hooks/AichatUseController.tsx +0 -417
- package/src/utils/gientechCommon/hooks/useFileDisplayTools.tsx +0 -251
- package/src/utils/gientechCommon/hooks/useFileManager.ts +0 -208
- package/src/utils/gientechCommon/slate/converters/deserializers.ts +0 -763
- package/src/utils/gientechCommon/slate/converters/mockData.ts +0 -232
- package/src/utils/gientechCommon/slate/converters/slateConverters.ts +0 -258
- package/src/utils/gientechCommon/slate/richElements/index.tsx +0 -499
- package/src/utils/gientechCommon/utils/fileUtils.ts +0 -86
- package/src/utils/gientechCommon/utils/request.ts +0 -37
- package/src/utils/gientechCommon/utils/serverFn.ts +0 -172
- package/src/utils/index.tsx +0 -142
- package/src/utils/testconfigs/demologin/index.tsx +0 -32
- package/src/utils/testconfigs/index.ts +0 -59
- package/src/vite-env.d.ts +0 -42
- package/stats.html +0 -4949
- package/tailwind.config.js +0 -170
- package/tsconfig.app.json +0 -30
- package/tsconfig.app.tsbuildinfo +0 -11
- package/tsconfig.json +0 -13
- package/tsconfig.node.json +0 -22
- package/tsconfig.node.tsbuildinfo +0 -1
- package/vite.config.app.ts +0 -93
- package/vite.config.ts +0 -232
- package/workflows/release.yml +0 -60
- 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 +0 -359
- /package/{dist/assets → assets}/Doris.png +0 -0
- /package/{dist/assets → assets}/PostgreSQL.png +0 -0
- /package/{dist/assets → assets}/SQLServer.png +0 -0
- /package/{dist/assets → assets}/empty.png +0 -0
- /package/{dist/assets → assets}/homeBg.png +0 -0
- /package/{dist/assets → assets}/index-CpW6Dhpp.js +0 -0
- /package/{dist/assets → assets}/left.jpg +0 -0
- /package/{dist/assets → assets}/logoImg.png +0 -0
- /package/{dist/assets → assets}/style.css +0 -0
- /package/{dist/assets → assets}/style2.css +0 -0
- /package/{dist/assets → assets}/style3.css +0 -0
- /package/{dist/assets → assets}/worker-BbpylX7l.js +0 -0
- /package/{dist/assistantConfig.d.ts → assistantConfig.d.ts} +0 -0
- /package/{dist/chat.d.ts → chat.d.ts} +0 -0
- /package/{dist/database.d.ts → database.d.ts} +0 -0
- /package/{dist/databaseId.d.ts → databaseId.d.ts} +0 -0
- /package/{dist/databaseTable.d.ts → databaseTable.d.ts} +0 -0
- /package/{dist/icons → icons}/answerAwartar.png +0 -0
- /package/{dist/icons → icons}/docx-file.png +0 -0
- /package/{dist/icons → icons}/folder.png +0 -0
- /package/{dist/icons → icons}/html.png +0 -0
- /package/{dist/icons → icons}/image.png +0 -0
- /package/{dist/icons → icons}/jpg-file.png +0 -0
- /package/{dist/icons → icons}/json.png +0 -0
- /package/{dist/icons → icons}/md.png +0 -0
- /package/{dist/icons → icons}/pdf.png +0 -0
- /package/{dist/icons → icons}/pptx.png +0 -0
- /package/{dist/icons → icons}/questionAwartar.png +0 -0
- /package/{dist/icons → icons}/sheets.png +0 -0
- /package/{dist/icons → icons}/txt.png +0 -0
- /package/{dist/icons → icons}/xlsx.png +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/modelManage.d.ts → modelManage.d.ts} +0 -0
- /package/{dist/sensitive.d.ts → sensitive.d.ts} +0 -0
- /package/{dist/streamFilesReader.d.ts → streamFilesReader.d.ts} +0 -0
- /package/{dist/vite.svg → vite.svg} +0 -0
|
@@ -1,535 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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>
|
|
Binary file
|
|
@@ -1,6 +0,0 @@
|
|
|
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>
|
|
@@ -1,9 +0,0 @@
|
|
|
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>
|
|
@@ -1,6 +0,0 @@
|
|
|
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>
|