@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.
- package/.editorconfig +38 -0
- package/.prettierignore +16 -0
- package/.prettierrc +17 -0
- package/README.md +643 -129
- package/USAGE.md +247 -0
- package/bash.exe.stackdump +40 -0
- package/components.json +21 -0
- package/dist/README.md +643 -0
- package/dist/assets/GientechStreamReader-C21-q_Qv.js +449 -0
- package/dist/assets/chevron-down-DjLtKwcs.js +280 -0
- package/{assets → dist/assets}/database.svg +11 -11
- package/{assets → dist/assets}/database_add.svg +53 -53
- package/{assets → dist/assets}/database_connect.svg +66 -66
- package/{assets → dist/assets}/database_upload.svg +29 -29
- package/dist/assets/databse.svg +6 -0
- package/{assets → dist/assets}/defaultWeLogo.svg +14 -14
- package/dist/assets/graph.svg +4 -0
- package/dist/assets/homeBg.png +0 -0
- package/dist/assets/index-BMz4lcjQ.js +1 -0
- package/dist/assets/index-C3Viu8Oj.js +1 -0
- package/dist/assets/index-C9GlPyHu.js +13 -0
- package/dist/assets/index-CRbX3ZA1.js +1 -0
- package/dist/assets/index-CTwzi_v2.js +21 -0
- package/dist/assets/index-DQlLDleQ.js +11 -0
- package/dist/assets/index-DRU1P9R0.js +1150 -0
- package/dist/assets/index-Dqej68NT.js +585 -0
- package/dist/assets/index-ECprhahs.js +157 -0
- package/dist/assets/index-i7qcZOwY.js +1088 -0
- package/dist/assets/knowledge.svg +4 -0
- package/dist/assets/left.jpg +0 -0
- package/dist/assets/logoImg.png +0 -0
- package/{assets/MySQL.svg → dist/assets/mysql.svg} +14 -14
- package/{assets/plus-fNg4vmeA.js → dist/assets/plus-CvJRSbOe.js} +1 -1
- package/dist/assets/sensitive.svg +5 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/style3.css +1 -0
- package/dist/assets/worker-BbpylX7l.js +13 -0
- package/{assets/x-tMUaBf0a.js → dist/assets/x-DKPeLdlu.js} +1 -1
- package/dist/assistantConfig.d.ts +31 -0
- package/dist/assistantConfig.js +1 -0
- package/{chat.d.ts → dist/chat.d.ts} +25 -1
- package/dist/chat.js +842 -0
- package/dist/database.js +20 -0
- package/dist/databaseId.js +1 -0
- package/dist/databaseTable.js +6 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +1 -0
- package/dist/modelManage.js +1 -0
- package/dist/package.json +68 -0
- package/dist/sensitive.js +1 -0
- package/{streamFilesReader.d.ts → dist/streamFilesReader.d.ts} +3 -0
- package/dist/streamFilesReader.js +1 -0
- package/{worker → dist/worker}/pdf.worker.min.js +21 -21
- package/doc_assets/2.png +0 -0
- package/doc_assets/demo.md +27 -0
- package/doc_assets/demos/dist-app/assets/index.Dh-ZAS9Z.css +2 -0
- package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js +23699 -0
- package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js.map +1 -0
- package/doc_assets/demos/dist-app/index.html +14 -0
- package/doc_assets/demos/dist-app/vite.svg +1 -0
- package/doc_assets/images/1.png +0 -0
- package/doc_assets/images/3.png +0 -0
- package/doc_assets/images/component-screenshot.png +1 -0
- package/doc_assets/install.md +5 -0
- 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
- package/eslint.config.js +92 -0
- package/index.html +13 -0
- package/package.json +109 -40
- package/package.json.demo-backup +109 -0
- package/postcss.config.cjs +19 -0
- package/public/vite.svg +1 -0
- package/public/worker/pdf.worker.min.js +22 -0
- package/scripts/README.md +133 -0
- package/scripts/build-demo.js +88 -0
- package/scripts/demo-selector.js +216 -0
- package/scripts/dev-demo.js +76 -0
- package/scripts/preview-demo.js +130 -0
- package/scripts/run-demo.bat +34 -0
- 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 +37 -0
- package/src/examples/Demo/index.tsx +12 -0
- package/src/examples/LoginPage/index.tsx +18 -0
- package/src/examples/chat/components/DrawerGraphPreview.tsx +78 -0
- package/src/examples/chat/index.tsx +153 -0
- package/src/examples/chat/logo03.png +0 -0
- package/src/examples/gientechStreamFilesReader/index.tsx +951 -0
- package/src/examples/ragDatabaseDataPage/index.tsx +36 -0
- package/src/examples/ragDatabaseIdPage/index.tsx +44 -0
- package/src/examples/ragDatabasePage/index.tsx +36 -0
- package/src/examples/ragModelManagePage/index.tsx +37 -0
- package/src/examples/ragSearchPage/index.tsx +0 -0
- package/src/examples/ragSensitiveWordsPage/index.tsx +32 -0
- package/src/examples/streamFiles/index.tsx +384 -0
- package/src/lib_enter.ts +43 -0
- package/src/main.tsx +5 -0
- package/src/main.tsx.backup +5 -0
- package/src/modules/assistantConfig/assets/databse.svg +6 -0
- package/src/modules/assistantConfig/assets/empty.png +0 -0
- package/src/modules/assistantConfig/assets/graph.svg +4 -0
- package/src/modules/assistantConfig/assets/knowledge.svg +4 -0
- package/src/modules/assistantConfig/assets/sensitive.svg +5 -0
- package/src/modules/assistantConfig/components/Database.tsx +144 -0
- package/src/modules/assistantConfig/components/Graph.tsx +156 -0
- package/src/modules/assistantConfig/components/Knowledge.tsx +266 -0
- package/src/modules/assistantConfig/components/NotFoundContent.tsx +21 -0
- package/src/modules/assistantConfig/components/Paragraph.tsx +51 -0
- package/src/modules/assistantConfig/components/ParamsItem.tsx +39 -0
- package/src/modules/assistantConfig/components/ResourceBinderItem.tsx +132 -0
- package/src/modules/assistantConfig/components/SearchableSelector.tsx +500 -0
- package/src/modules/assistantConfig/components/Sensitive.tsx +179 -0
- package/src/modules/assistantConfig/components/SliderInput.tsx +65 -0
- package/src/modules/assistantConfig/constants.tsx +74 -0
- package/src/modules/assistantConfig/index.tsx +700 -0
- package/src/modules/assistantConfig/server.ts +262 -0
- package/src/modules/chat/Conversations/Item.tsx +167 -0
- package/src/modules/chat/Conversations/List.tsx +210 -0
- package/src/modules/chat/Conversations/groupByTime.ts +39 -0
- package/src/modules/chat/Conversations/index.tsx +230 -0
- package/src/modules/chat/ReferenceBar.tsx +592 -0
- package/src/modules/chat/constants.tsx +56 -0
- package/src/modules/chat/data.txt +82 -0
- package/src/modules/chat/index.tsx +2081 -0
- package/src/modules/chat/referenceCom/DeleteModal.tsx +75 -0
- package/src/modules/chat/referenceCom/DrawerContent.tsx +136 -0
- package/src/modules/chat/referenceCom/DrawerDatabase.tsx +110 -0
- package/src/modules/chat/referenceCom/DrawerGraphPreview.tsx +86 -0
- package/src/modules/chat/referenceCom/DrawerPreview.tsx +73 -0
- package/src/modules/chat/referenceCom/DrawerTitle.tsx +26 -0
- package/src/modules/chat/referenceCom/RenameModal.tsx +86 -0
- package/src/modules/chat/referenceCom/TagCom.tsx +30 -0
- package/src/modules/chat/style.less +3 -0
- package/src/modules/chat/types.ts +17 -0
- package/src/modules/chat/utils/index.ts +326 -0
- package/src/modules/database/CreateModal.tsx +398 -0
- 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.svg +11 -0
- package/src/modules/database/assets/database_add.svg +53 -0
- package/src/modules/database/assets/database_connect.svg +66 -0
- package/src/modules/database/assets/database_upload.svg +29 -0
- package/src/modules/database/assets/empty.png +0 -0
- package/src/modules/database/assets/mysql.svg +14 -0
- package/src/modules/database/index.tsx +466 -0
- package/src/modules/database/server.ts +196 -0
- package/src/modules/databaseId/CustomCom.tsx +156 -0
- package/src/modules/databaseId/EditConfig.tsx +268 -0
- package/src/modules/databaseId/UploadDrawer.tsx +520 -0
- package/src/modules/databaseId/assets/aiOptimize.svg +10 -0
- package/src/modules/databaseId/assets/empty.png +0 -0
- package/src/modules/databaseId/assets/template.svg +6 -0
- package/src/modules/databaseId/assets/upload.svg +9 -0
- package/src/modules/databaseId/assets/useTemp.svg +6 -0
- package/src/modules/databaseId/index.tsx +734 -0
- package/src/modules/databaseId/server.ts +286 -0
- package/src/modules/databaseId/style.css +5 -0
- package/src/modules/databaseTable/EditRowDrawer.tsx +119 -0
- package/src/modules/databaseTable/index.tsx +357 -0
- package/src/modules/databaseTable/server.ts +180 -0
- package/src/modules/headlessChat/constants.tsx +32 -0
- package/src/modules/headlessChat/index.tsx +1063 -0
- package/src/modules/headlessChat/types.ts +23 -0
- package/src/modules/login/components/Login/LoginBox/index.tsx +102 -0
- package/src/modules/login/components/Login/RegisterBox/index.tsx +180 -0
- package/src/modules/login/components/Login/index.tsx +100 -0
- package/src/modules/login/index.tsx +106 -0
- package/src/modules/login/style.css +3 -0
- package/src/modules/login/useServices.ts +53 -0
- package/src/modules/login/utils.ts +42 -0
- package/src/modules/modelManage/ConfigDrawer.tsx +249 -0
- package/src/modules/modelManage/assets/empty.png +0 -0
- package/src/modules/modelManage/const.ts +50 -0
- package/src/modules/modelManage/index.tsx +439 -0
- package/src/modules/modelManage/server.ts +185 -0
- package/src/modules/nodegraph/index.tsx +1 -0
- package/src/modules/search/assets/Icon-history.svg +8 -0
- 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 +9 -0
- package/src/modules/search/assets/icon-search-bar.svg +14 -0
- package/src/modules/search/assets/icon-sub-title.svg +3 -0
- package/src/modules/search/assets/icon-title.svg +9 -0
- package/src/modules/search/assets/icon-zoomOut.svg +9 -0
- package/src/modules/search/assets/iconAi.svg +9 -0
- 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 +3 -0
- package/src/modules/search/assets/selected.svg +4 -0
- 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 +137 -0
- package/src/modules/search/components/Editor/ChatViewEditor.tsx +261 -0
- package/src/modules/search/components/Editor/aichat.css +1 -0
- package/src/modules/search/components/Editor/constant.ts +13 -0
- package/src/modules/search/components/Editor/index.tsx +113 -0
- package/src/modules/search/components/Editor/plugins/autofomatRules.ts +332 -0
- package/src/modules/search/components/Editor/plugins/convertImgPlugins.tsx +20 -0
- package/src/modules/search/components/Editor/plugins/createIndexes.tsx +38 -0
- package/src/modules/search/components/Editor/plugins/displayer.ts +298 -0
- package/src/modules/search/components/Editor/plugins/imageClick.tsx +32 -0
- package/src/modules/search/components/Editor/plugins/myplugin.tsx +98 -0
- package/src/modules/search/components/Editor/ui/avatar.tsx +19 -0
- package/src/modules/search/components/Editor/ui/blockquote-element.tsx +21 -0
- package/src/modules/search/components/Editor/ui/button.tsx +58 -0
- package/src/modules/search/components/Editor/ui/calendar.tsx +68 -0
- package/src/modules/search/components/Editor/ui/caption.tsx +46 -0
- package/src/modules/search/components/Editor/ui/checkbox.tsx +27 -0
- package/src/modules/search/components/Editor/ui/code-block-combobox.tsx +188 -0
- package/src/modules/search/components/Editor/ui/code-block-element.css +434 -0
- package/src/modules/search/components/Editor/ui/code-block-element.tsx +39 -0
- package/src/modules/search/components/Editor/ui/code-leaf.tsx +24 -0
- package/src/modules/search/components/Editor/ui/code-line-element.tsx +10 -0
- package/src/modules/search/components/Editor/ui/code-syntax-leaf.tsx +21 -0
- package/src/modules/search/components/Editor/ui/column-element.tsx +30 -0
- package/src/modules/search/components/Editor/ui/column-group-element.tsx +94 -0
- package/src/modules/search/components/Editor/ui/command.tsx +75 -0
- package/src/modules/search/components/Editor/ui/comment-avatar.tsx +22 -0
- package/src/modules/search/components/Editor/ui/comment-create-form.tsx +37 -0
- package/src/modules/search/components/Editor/ui/comment-item.tsx +74 -0
- package/src/modules/search/components/Editor/ui/comment-leaf.tsx +49 -0
- package/src/modules/search/components/Editor/ui/comment-more-dropdown.tsx +42 -0
- package/src/modules/search/components/Editor/ui/comment-reply-items.tsx +22 -0
- package/src/modules/search/components/Editor/ui/comment-resolve-button.tsx +32 -0
- package/src/modules/search/components/Editor/ui/comment-value.tsx +34 -0
- package/src/modules/search/components/Editor/ui/comments-popover.tsx +63 -0
- package/src/modules/search/components/Editor/ui/date-element.tsx +83 -0
- package/src/modules/search/components/Editor/ui/dialog.tsx +63 -0
- package/src/modules/search/components/Editor/ui/draggable.tsx +177 -0
- package/src/modules/search/components/Editor/ui/dropdown-menu.tsx +180 -0
- package/src/modules/search/components/Editor/ui/emoji-input-element.tsx +85 -0
- package/src/modules/search/components/Editor/ui/excalidraw-element.tsx +28 -0
- package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.tsx +76 -0
- package/src/modules/search/components/Editor/ui/fixed-toolbar.tsx +8 -0
- package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.tsx +51 -0
- package/src/modules/search/components/Editor/ui/floating-toolbar.tsx +77 -0
- package/src/modules/search/components/Editor/ui/heading-element.tsx +48 -0
- package/src/modules/search/components/Editor/ui/highlight-leaf.tsx +17 -0
- package/src/modules/search/components/Editor/ui/hr-element.tsx +30 -0
- package/src/modules/search/components/Editor/ui/icons.tsx +267 -0
- package/src/modules/search/components/Editor/ui/image-element.tsx +74 -0
- package/src/modules/search/components/Editor/ui/inline-combobox.tsx +368 -0
- package/src/modules/search/components/Editor/ui/input.tsx +25 -0
- package/src/modules/search/components/Editor/ui/insert-dropdown-menu.tsx +218 -0
- package/src/modules/search/components/Editor/ui/kbd-leaf.tsx +20 -0
- package/src/modules/search/components/Editor/ui/link-element.tsx +29 -0
- package/src/modules/search/components/Editor/ui/link-floating-toolbar.tsx +161 -0
- package/src/modules/search/components/Editor/ui/list-element.tsx +30 -0
- package/src/modules/search/components/Editor/ui/mark-toolbar-button.tsx +24 -0
- package/src/modules/search/components/Editor/ui/media-embed-element.tsx +133 -0
- package/src/modules/search/components/Editor/ui/media-popover.tsx +97 -0
- package/src/modules/search/components/Editor/ui/mention-element.tsx +43 -0
- package/src/modules/search/components/Editor/ui/mention-input-element.tsx +141 -0
- package/src/modules/search/components/Editor/ui/mode-dropdown-menu.tsx +93 -0
- package/src/modules/search/components/Editor/ui/more-dropdown-menu.tsx +67 -0
- package/src/modules/search/components/Editor/ui/paragraph-element.tsx +4 -0
- package/src/modules/search/components/Editor/ui/placeholder.tsx +52 -0
- package/src/modules/search/components/Editor/ui/popover.tsx +32 -0
- package/src/modules/search/components/Editor/ui/resizable.tsx +66 -0
- package/src/modules/search/components/Editor/ui/separator.tsx +25 -0
- package/src/modules/search/components/Editor/ui/style.less +12 -0
- package/src/modules/search/components/Editor/ui/table-cell-element.tsx +143 -0
- package/src/modules/search/components/Editor/ui/table-element.tsx +243 -0
- package/src/modules/search/components/Editor/ui/table-row-element.tsx +22 -0
- package/src/modules/search/components/Editor/ui/tableValue.tsx +135 -0
- package/src/modules/search/components/Editor/ui/todo-list-element.tsx +43 -0
- package/src/modules/search/components/Editor/ui/toggle-element.tsx +31 -0
- package/src/modules/search/components/Editor/ui/toolbar.tsx +157 -0
- package/src/modules/search/components/Editor/ui/tooltip.tsx +65 -0
- package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.tsx +160 -0
- package/src/modules/search/components/Editor/ui/with-draggables.tsx +175 -0
- package/src/modules/search/components/FileList.tsx +287 -0
- package/src/modules/search/components/ImageGroupView/index.tsx +85 -0
- package/src/modules/search/components/ResultContent.tsx +232 -0
- package/src/modules/search/components/SearchInput.tsx +232 -0
- package/src/modules/search/components/SearchLanding.tsx +74 -0
- package/src/modules/search/components/SearchView.tsx +563 -0
- package/src/modules/search/components/SimpleEditor.tsx +158 -0
- package/src/modules/search/components/SimpleFileList.tsx +215 -0
- package/src/modules/search/index.tsx +10 -0
- package/src/modules/search/reademe.md +1 -0
- package/src/modules/search/servers/apis.tsx +19 -0
- package/src/modules/search/servers/index.ts +184 -0
- package/src/modules/search/style.less +503 -0
- package/src/modules/search/type.ts +22 -0
- package/src/modules/search/utils.ts +34 -0
- package/src/modules/sensitive/index.tsx +313 -0
- package/src/modules/sensitive/server.ts +122 -0
- package/src/modules/streamFilesReader/GientechStreamReader.tsx +1624 -0
- package/src/modules/streamFilesReader/components/Header/Toolbar.tsx +0 -0
- package/src/modules/streamFilesReader/components/Header/index.tsx +297 -0
- package/src/modules/streamFilesReader/index.tsx +3 -0
- package/src/style.css +6 -0
- package/src/type.d.ts +0 -0
- package/src/utils/commonFn.tsx +111 -0
- package/src/utils/gientechCommon/components/AppError.tsx +32 -0
- package/src/utils/gientechCommon/components/AppLoading.tsx +75 -0
- package/src/utils/gientechCommon/components/DeleteModal.tsx +75 -0
- package/src/utils/gientechCommon/components/DisplayError.tsx +33 -0
- package/src/utils/gientechCommon/components/DisplayLoading.tsx +38 -0
- package/src/utils/gientechCommon/components/FeedBackModal.tsx +310 -0
- package/src/utils/gientechCommon/components/FileCardCommon.tsx +82 -0
- package/src/utils/gientechCommon/components/FileManager/index.tsx +390 -0
- package/src/utils/gientechCommon/components/FileManager/style.css +5 -0
- package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +581 -0
- package/src/utils/gientechCommon/components/Messages/ReferenceCard.tsx +339 -0
- package/src/utils/gientechCommon/components/Messages/RetriveItem.tsx +245 -0
- package/src/utils/gientechCommon/components/Messages/WebRetriveItem.tsx +209 -0
- package/src/utils/gientechCommon/components/Messages/defaultBot.png +0 -0
- package/src/utils/gientechCommon/components/Messages/defaultStyleSet.tsx +148 -0
- package/src/utils/gientechCommon/components/Messages/defaultWeLogo.svg +14 -0
- package/src/utils/gientechCommon/components/RenameModal.tsx +86 -0
- package/src/utils/gientechCommon/components/style.less +11 -0
- package/src/utils/gientechCommon/configs/commonConfig.ts +2 -0
- package/src/utils/gientechCommon/configs/senderConfig.ts +0 -0
- package/src/utils/gientechCommon/configs/stylesConfig.ts +142 -0
- package/src/utils/gientechCommon/hooks/AichatUseController.tsx +417 -0
- package/src/utils/gientechCommon/slate/converters/deserializers.ts +763 -0
- package/src/utils/gientechCommon/slate/converters/mockData.ts +232 -0
- package/src/utils/gientechCommon/slate/converters/slateConverters.ts +258 -0
- package/src/utils/gientechCommon/slate/richElements/index.tsx +499 -0
- package/src/utils/gientechCommon/utils/request.ts +37 -0
- package/src/utils/gientechCommon/utils/serverFn.ts +172 -0
- package/src/utils/index.tsx +126 -0
- package/src/utils/testconfigs/demologin/index.tsx +32 -0
- package/src/utils/testconfigs/index.ts +59 -0
- package/src/vite-env.d.ts +11 -0
- package/stats.html +4949 -0
- package/tailwind.config.js +170 -0
- package/tsconfig.app.json +30 -0
- package/tsconfig.app.tsbuildinfo +11 -0
- package/tsconfig.json +13 -0
- package/tsconfig.node.json +22 -0
- package/tsconfig.node.tsbuildinfo +1 -0
- package/vite.config.ts +227 -0
- package/workflows/release.yml +60 -0
- package/assets/_commonjsHelpers-gnU0ypJ3.js +0 -1
- package/assets/index--DG-fVvc.js +0 -26
- package/assets/index-BfureYPx.js +0 -1505
- package/assets/index-CXwV5fAx.js +0 -1230
- package/assets/style.css +0 -1
- package/assets/style3.css +0 -1
- package/assets/styled-components.browser.esm-DPkS13KC.js +0 -2
- package/chat.js +0 -893
- package/database.js +0 -20
- package/databaseId.js +0 -21
- package/databaseTable.js +0 -6
- package/modelManage.js +0 -1
- package/sensitive.js +0 -1
- package/streamFilesReader.js +0 -442
- /package/{assets → dist/assets}/Doris.png +0 -0
- /package/{assets → dist/assets}/PostgreSQL.png +0 -0
- /package/{assets → dist/assets}/SQLServer.png +0 -0
- /package/{assets → dist/assets}/empty.png +0 -0
- /package/{assets → dist/assets}/index-CpW6Dhpp.js +0 -0
- /package/{assets → dist/assets}/style2.css +0 -0
- /package/{database.d.ts → dist/database.d.ts} +0 -0
- /package/{databaseId.d.ts → dist/databaseId.d.ts} +0 -0
- /package/{databaseTable.d.ts → dist/databaseTable.d.ts} +0 -0
- /package/{modelManage.d.ts → dist/modelManage.d.ts} +0 -0
- /package/{sensitive.d.ts → dist/sensitive.d.ts} +0 -0
- /package/{vite.svg → dist/vite.svg} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DatabaseTableView from '../../modules/databaseTable';
|
|
2
|
+
import { rag_dev_database_data } from '../../utils/testconfigs';
|
|
3
|
+
|
|
4
|
+
export default function DatabaseDataPage() {
|
|
5
|
+
const customComponents: any = {
|
|
6
|
+
ContentLoading: () => (
|
|
7
|
+
<div className="flex flex-col items-center justify-center h-full">
|
|
8
|
+
<div className="text-xl font-semibold mb-3">
|
|
9
|
+
{/* <Spin indicator={<LoadingOutlined spin />} size="large" /> */}
|
|
10
|
+
</div>
|
|
11
|
+
<div className="text-base mb-2" style={{ color: '#055AFF' }}>
|
|
12
|
+
加载中...
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const handlePageEventsEmit = (name: string, data: any) => {
|
|
19
|
+
console.log('[DatabaseIdPage] pageEventsEmit ', name, data);
|
|
20
|
+
};
|
|
21
|
+
return (
|
|
22
|
+
<DatabaseTableView
|
|
23
|
+
url={rag_dev_database_data.url}
|
|
24
|
+
token={rag_dev_database_data.token}
|
|
25
|
+
role="admin"
|
|
26
|
+
fileId={rag_dev_database_data.fileId}
|
|
27
|
+
dbId={rag_dev_database_data.dbId}
|
|
28
|
+
tableId={rag_dev_database_data.tableId}
|
|
29
|
+
tableName={rag_dev_database_data.tableName}
|
|
30
|
+
dbType={rag_dev_database_data.dbType}
|
|
31
|
+
eventsEmit={handlePageEventsEmit}
|
|
32
|
+
// getBtnDisabled={getBtnDisabled}
|
|
33
|
+
CustomComponents={customComponents}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import DatabaseIdView from '../../modules/databaseId';
|
|
2
|
+
|
|
3
|
+
import { rag_dev_database_id } from '../../utils/testconfigs';
|
|
4
|
+
|
|
5
|
+
export default function DatabaseIdPage() {
|
|
6
|
+
const customComponents: any = {
|
|
7
|
+
ContentLoading: () => (
|
|
8
|
+
<div className="flex flex-col items-center justify-center h-full">
|
|
9
|
+
<div className="text-xl font-semibold mb-3">
|
|
10
|
+
{/* <Spin indicator={<LoadingOutlined spin />} size="large" /> */}
|
|
11
|
+
</div>
|
|
12
|
+
<div className="text-base mb-2" style={{ color: '#055AFF' }}>
|
|
13
|
+
加载中...
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
),
|
|
17
|
+
ContainerLoading: () => (
|
|
18
|
+
<div className="flex flex-col items-center justify-center h-full">
|
|
19
|
+
<div className="text-xl font-semibold mb-3">
|
|
20
|
+
{/* <Spin indicator={<LoadingOutlined spin />} size="large" /> */}
|
|
21
|
+
</div>
|
|
22
|
+
<div className="text-base mb-2" style={{ color: '#055AFF' }}>
|
|
23
|
+
加载中...
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
),
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const handlePageEventsEmit = (name: string, data: any) => {
|
|
30
|
+
console.log('[DatabaseIdPage] pageEventsEmit ', name, data);
|
|
31
|
+
};
|
|
32
|
+
return (
|
|
33
|
+
<DatabaseIdView
|
|
34
|
+
url={rag_dev_database_id.url}
|
|
35
|
+
token={rag_dev_database_id.token}
|
|
36
|
+
role="admin"
|
|
37
|
+
id={rag_dev_database_id.id}
|
|
38
|
+
dbType={rag_dev_database_id.dbType}
|
|
39
|
+
CustomComponents={customComponents}
|
|
40
|
+
eventsEmit={handlePageEventsEmit}
|
|
41
|
+
// getBtnDisabled={getBtnDisabled}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DatabaseView from '../../modules/database';
|
|
2
|
+
import { rag_dev_database } from '../../utils/testconfigs';
|
|
3
|
+
|
|
4
|
+
const token = rag_dev_database.token;
|
|
5
|
+
const url = rag_dev_database.url;
|
|
6
|
+
|
|
7
|
+
const DatabasePage = () => {
|
|
8
|
+
const customComponents: any = {
|
|
9
|
+
ContentLoading: () => (
|
|
10
|
+
<div className="flex flex-col items-center justify-center h-full">
|
|
11
|
+
<div className="text-xl font-semibold mb-3">
|
|
12
|
+
{/* <Spin indicator={<LoadingOutlined spin />} size="large" /> */}
|
|
13
|
+
</div>
|
|
14
|
+
<div className="text-base mb-2" style={{ color: '#055AFF' }}>
|
|
15
|
+
加载中...
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const handlePageEventsEmit = (name: string, data: any) => {
|
|
22
|
+
console.log('[DatabasePage] pageEventsEmit ', name, data);
|
|
23
|
+
};
|
|
24
|
+
return (
|
|
25
|
+
<DatabaseView
|
|
26
|
+
url={url}
|
|
27
|
+
token={token}
|
|
28
|
+
role="admin"
|
|
29
|
+
eventsEmit={handlePageEventsEmit}
|
|
30
|
+
CustomComponents={customComponents}
|
|
31
|
+
// getBtnDisabled={getBtnDisabled}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default DatabasePage;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import ModelManageView from '../../modules/modelManage';
|
|
2
|
+
import { rag_dev_model_manage } from '../../utils/testconfigs';
|
|
3
|
+
|
|
4
|
+
const token = rag_dev_model_manage.token;
|
|
5
|
+
const url = rag_dev_model_manage.url;
|
|
6
|
+
|
|
7
|
+
export default function DatabasePage() {
|
|
8
|
+
const customComponents: any = {
|
|
9
|
+
ContentLoading: () => (
|
|
10
|
+
<div className="flex flex-col items-center justify-center h-full">
|
|
11
|
+
<div className="text-xl font-semibold mb-3">
|
|
12
|
+
{/* <Spin indicator={<LoadingOutlined spin />} size="large" /> */}
|
|
13
|
+
</div>
|
|
14
|
+
<div className="text-base mb-2" style={{ color: '#055AFF' }}>
|
|
15
|
+
加载中...
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const handlePageEventsEmit = (name: string, data: any) => {
|
|
22
|
+
console.log('[DatabasePage] pageEventsEmit ', name, data);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<ModelManageView
|
|
28
|
+
url={url}
|
|
29
|
+
token={token}
|
|
30
|
+
role={'admin'}
|
|
31
|
+
eventsEmit={handlePageEventsEmit}
|
|
32
|
+
CustomComponents={customComponents}
|
|
33
|
+
// getBtnDisabled={getBtnDisabled}
|
|
34
|
+
/>
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import SensitivityView from '../../modules/sensitive';
|
|
2
|
+
import { rag_dev_sensitive_words } from '../../utils/testconfigs';
|
|
3
|
+
|
|
4
|
+
const token = rag_dev_sensitive_words.token;
|
|
5
|
+
const url = rag_dev_sensitive_words.url;
|
|
6
|
+
|
|
7
|
+
export default function DatabasePage() {
|
|
8
|
+
const customComponents: any = {
|
|
9
|
+
ContentLoading: () => (
|
|
10
|
+
<div className="flex flex-col items-center justify-center h-full">
|
|
11
|
+
<div className="text-xl font-semibold mb-3">
|
|
12
|
+
{/* <Spin indicator={<LoadingOutlined spin />} size="large" /> */}
|
|
13
|
+
</div>
|
|
14
|
+
<div className="text-base mb-2" style={{ color: '#055AFF' }}>
|
|
15
|
+
加载中...
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
),
|
|
19
|
+
};
|
|
20
|
+
const handlePageEventsEmit = (name: string, data: any) => {
|
|
21
|
+
console.log('[DatabasePage] pageEventsEmit ', name, data);
|
|
22
|
+
};
|
|
23
|
+
return (
|
|
24
|
+
<SensitivityView
|
|
25
|
+
url={url}
|
|
26
|
+
token={token}
|
|
27
|
+
role="admin"
|
|
28
|
+
eventsEmit={handlePageEventsEmit}
|
|
29
|
+
CustomComponents={customComponents}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { GientechStreamReader } from '../../modules/streamFilesReader';
|
|
3
|
+
import { Styles } from '@mxmweb/zui';
|
|
4
|
+
|
|
5
|
+
// 演示用的主题配置
|
|
6
|
+
const demoTheme: Styles = {
|
|
7
|
+
colors: {
|
|
8
|
+
primary: '#1890ff',
|
|
9
|
+
secondary: '#52c41a',
|
|
10
|
+
success: '#52c41a',
|
|
11
|
+
warning: '#faad14',
|
|
12
|
+
error: '#ff4d4f',
|
|
13
|
+
info: '#1890ff',
|
|
14
|
+
background: '#ffffff',
|
|
15
|
+
text: '#262626',
|
|
16
|
+
border: '#d9d9d9',
|
|
17
|
+
disabled: '#bfbfbf',
|
|
18
|
+
disabledBackground: '#f5f5f5',
|
|
19
|
+
disabledText: '#bfbfbf',
|
|
20
|
+
},
|
|
21
|
+
space: {
|
|
22
|
+
sidebar: '200px',
|
|
23
|
+
size: '14px',
|
|
24
|
+
radius: '6px',
|
|
25
|
+
padding: '16px',
|
|
26
|
+
margin: '8px',
|
|
27
|
+
shadow: '0 2px 8px rgba(0,0,0,0.15)',
|
|
28
|
+
lineHeight: '1.5715',
|
|
29
|
+
},
|
|
30
|
+
icons: {},
|
|
31
|
+
others: {
|
|
32
|
+
baseFontWeight: 'normal',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// 模拟的标注数据
|
|
37
|
+
const mockAnnotations = [
|
|
38
|
+
{
|
|
39
|
+
id: '1',
|
|
40
|
+
type: 'highlight',
|
|
41
|
+
content: '这是一个重要的段落',
|
|
42
|
+
position: { x: 100, y: 200 },
|
|
43
|
+
page: 1,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: '2',
|
|
47
|
+
type: 'note',
|
|
48
|
+
content: '这是备注内容',
|
|
49
|
+
position: { x: 150, y: 300 },
|
|
50
|
+
page: 1,
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const StreamFilesDemo: React.FC = () => {
|
|
55
|
+
const [currentFile, setCurrentFile] = useState({
|
|
56
|
+
convertedFilePath: '/api/files/sample.pdf',
|
|
57
|
+
fileName: '示例文档.pdf',
|
|
58
|
+
fileType: 'pdf',
|
|
59
|
+
totalPages: 10,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const [fileType, setFileType] = useState<'pdf' | 'markdown' | 'image' | 'text'>('pdf');
|
|
63
|
+
|
|
64
|
+
// 处理事件
|
|
65
|
+
const handleEventsEmit = (name: string, data?: any) => {
|
|
66
|
+
console.log('GientechStreamReader 事件:', name, data);
|
|
67
|
+
|
|
68
|
+
switch (name) {
|
|
69
|
+
case 'pageChange':
|
|
70
|
+
console.log('页面变化:', data);
|
|
71
|
+
break;
|
|
72
|
+
case 'zoomChange':
|
|
73
|
+
console.log('缩放变化:', data);
|
|
74
|
+
break;
|
|
75
|
+
case 'rotateChange':
|
|
76
|
+
console.log('旋转变化:', data);
|
|
77
|
+
break;
|
|
78
|
+
case 'md_annotation_add':
|
|
79
|
+
console.log('Markdown 标注添加:', data);
|
|
80
|
+
break;
|
|
81
|
+
case 'table_annotation_add':
|
|
82
|
+
console.log('表格标注添加:', data);
|
|
83
|
+
break;
|
|
84
|
+
case 'request_finish':
|
|
85
|
+
console.log('请求完成,CSRF Token:', data);
|
|
86
|
+
break;
|
|
87
|
+
case 'viewer:close':
|
|
88
|
+
console.log('查看器关闭');
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
console.log('其他事件:', name, data);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// 切换文件类型
|
|
96
|
+
const switchFileType = (type: 'pdf' | 'markdown' | 'image' | 'text') => {
|
|
97
|
+
setFileType(type);
|
|
98
|
+
|
|
99
|
+
const fileConfigs = {
|
|
100
|
+
pdf: {
|
|
101
|
+
convertedFilePath: '/api/files/sample.pdf',
|
|
102
|
+
fileName: '示例PDF文档.pdf',
|
|
103
|
+
fileType: 'pdf',
|
|
104
|
+
totalPages: 10,
|
|
105
|
+
},
|
|
106
|
+
markdown: {
|
|
107
|
+
convertedFilePath: '/api/files/sample.md',
|
|
108
|
+
fileName: '示例Markdown文档.md',
|
|
109
|
+
fileType: 'markdown',
|
|
110
|
+
totalPages: 1,
|
|
111
|
+
},
|
|
112
|
+
image: {
|
|
113
|
+
convertedFilePath: '/api/files/sample.jpg',
|
|
114
|
+
fileName: '示例图片.jpg',
|
|
115
|
+
fileType: 'image',
|
|
116
|
+
totalPages: 1,
|
|
117
|
+
},
|
|
118
|
+
text: {
|
|
119
|
+
convertedFilePath: '/api/files/sample.txt',
|
|
120
|
+
fileName: '示例文本文件.txt',
|
|
121
|
+
fileType: 'text',
|
|
122
|
+
totalPages: 1,
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
setCurrentFile(fileConfigs[type]);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<div style={{
|
|
131
|
+
display: 'flex',
|
|
132
|
+
flexDirection: 'column',
|
|
133
|
+
height: '100vh',
|
|
134
|
+
background: '#f0f2f5',
|
|
135
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
136
|
+
}}>
|
|
137
|
+
{/* 顶部控制栏 */}
|
|
138
|
+
<div style={{
|
|
139
|
+
background: '#fff',
|
|
140
|
+
padding: '16px',
|
|
141
|
+
borderBottom: '1px solid #d9d9d9',
|
|
142
|
+
display: 'flex',
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
gap: '16px',
|
|
145
|
+
boxShadow: '0 2px 8px rgba(0,0,0,0.06)'
|
|
146
|
+
}}>
|
|
147
|
+
<h2 style={{ margin: 0, color: '#262626' }}>GientechStreamReader 演示</h2>
|
|
148
|
+
|
|
149
|
+
<div style={{ display: 'flex', gap: '8px' }}>
|
|
150
|
+
<button
|
|
151
|
+
onClick={() => switchFileType('pdf')}
|
|
152
|
+
style={{
|
|
153
|
+
padding: '6px 12px',
|
|
154
|
+
border: '1px solid #d9d9d9',
|
|
155
|
+
borderRadius: '4px',
|
|
156
|
+
background: fileType === 'pdf' ? '#1890ff' : '#fff',
|
|
157
|
+
color: fileType === 'pdf' ? '#fff' : '#262626',
|
|
158
|
+
cursor: 'pointer',
|
|
159
|
+
fontSize: '12px'
|
|
160
|
+
}}
|
|
161
|
+
>
|
|
162
|
+
PDF
|
|
163
|
+
</button>
|
|
164
|
+
<button
|
|
165
|
+
onClick={() => switchFileType('markdown')}
|
|
166
|
+
style={{
|
|
167
|
+
padding: '6px 12px',
|
|
168
|
+
border: '1px solid #d9d9d9',
|
|
169
|
+
borderRadius: '4px',
|
|
170
|
+
background: fileType === 'markdown' ? '#1890ff' : '#fff',
|
|
171
|
+
color: fileType === 'markdown' ? '#fff' : '#262626',
|
|
172
|
+
cursor: 'pointer',
|
|
173
|
+
fontSize: '12px'
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
Markdown
|
|
177
|
+
</button>
|
|
178
|
+
<button
|
|
179
|
+
onClick={() => switchFileType('image')}
|
|
180
|
+
style={{
|
|
181
|
+
padding: '6px 12px',
|
|
182
|
+
border: '1px solid #d9d9d9',
|
|
183
|
+
borderRadius: '4px',
|
|
184
|
+
background: fileType === 'image' ? '#1890ff' : '#fff',
|
|
185
|
+
color: fileType === 'image' ? '#fff' : '#262626',
|
|
186
|
+
cursor: 'pointer',
|
|
187
|
+
fontSize: '12px'
|
|
188
|
+
}}
|
|
189
|
+
>
|
|
190
|
+
图片
|
|
191
|
+
</button>
|
|
192
|
+
<button
|
|
193
|
+
onClick={() => switchFileType('text')}
|
|
194
|
+
style={{
|
|
195
|
+
padding: '6px 12px',
|
|
196
|
+
border: '1px solid #d9d9d9',
|
|
197
|
+
borderRadius: '4px',
|
|
198
|
+
background: fileType === 'text' ? '#1890ff' : '#fff',
|
|
199
|
+
color: fileType === 'text' ? '#fff' : '#262626',
|
|
200
|
+
cursor: 'pointer',
|
|
201
|
+
fontSize: '12px'
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
文本
|
|
205
|
+
</button>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<div style={{ marginLeft: 'auto', fontSize: '12px', color: '#8c8c8c' }}>
|
|
209
|
+
当前文件: {currentFile.fileName}
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
{/* 主要内容区域 */}
|
|
214
|
+
<div style={{ flex: 1, display: 'flex', gap: '16px', padding: '16px' }}>
|
|
215
|
+
{/* 左侧信息面板 */}
|
|
216
|
+
<div style={{
|
|
217
|
+
width: '300px',
|
|
218
|
+
background: '#fff',
|
|
219
|
+
borderRadius: '6px',
|
|
220
|
+
padding: '16px',
|
|
221
|
+
boxShadow: '0 2px 8px rgba(0,0,0,0.06)',
|
|
222
|
+
height: 'fit-content'
|
|
223
|
+
}}>
|
|
224
|
+
<h3 style={{ margin: '0 0 16px 0', color: '#262626' }}>配置信息</h3>
|
|
225
|
+
|
|
226
|
+
<div style={{ marginBottom: '12px' }}>
|
|
227
|
+
<label style={{ display: 'block', fontSize: '12px', color: '#8c8c8c', marginBottom: '4px' }}>
|
|
228
|
+
文件路径:
|
|
229
|
+
</label>
|
|
230
|
+
<code style={{
|
|
231
|
+
display: 'block',
|
|
232
|
+
padding: '4px 8px',
|
|
233
|
+
background: '#f5f5f5',
|
|
234
|
+
borderRadius: '4px',
|
|
235
|
+
fontSize: '11px',
|
|
236
|
+
wordBreak: 'break-all'
|
|
237
|
+
}}>
|
|
238
|
+
{currentFile.convertedFilePath}
|
|
239
|
+
</code>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<div style={{ marginBottom: '12px' }}>
|
|
243
|
+
<label style={{ display: 'block', fontSize: '12px', color: '#8c8c8c', marginBottom: '4px' }}>
|
|
244
|
+
文件类型:
|
|
245
|
+
</label>
|
|
246
|
+
<span style={{
|
|
247
|
+
display: 'inline-block',
|
|
248
|
+
padding: '2px 8px',
|
|
249
|
+
background: '#e6f7ff',
|
|
250
|
+
color: '#1890ff',
|
|
251
|
+
borderRadius: '4px',
|
|
252
|
+
fontSize: '11px'
|
|
253
|
+
}}>
|
|
254
|
+
{currentFile.fileType}
|
|
255
|
+
</span>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div style={{ marginBottom: '12px' }}>
|
|
259
|
+
<label style={{ display: 'block', fontSize: '12px', color: '#8c8c8c', marginBottom: '4px' }}>
|
|
260
|
+
总页数:
|
|
261
|
+
</label>
|
|
262
|
+
<span style={{ fontSize: '14px', color: '#262626' }}>
|
|
263
|
+
{currentFile.totalPages}
|
|
264
|
+
</span>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div style={{ marginBottom: '12px' }}>
|
|
268
|
+
<label style={{ display: 'block', fontSize: '12px', color: '#8c8c8c', marginBottom: '4px' }}>
|
|
269
|
+
标注数量:
|
|
270
|
+
</label>
|
|
271
|
+
<span style={{ fontSize: '14px', color: '#262626' }}>
|
|
272
|
+
{mockAnnotations.length}
|
|
273
|
+
</span>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<div style={{ marginBottom: '12px' }}>
|
|
277
|
+
<label style={{ display: 'block', fontSize: '12px', color: '#8c8c8c', marginBottom: '4px' }}>
|
|
278
|
+
功能特性:
|
|
279
|
+
</label>
|
|
280
|
+
<ul style={{ margin: 0, paddingLeft: '16px', fontSize: '12px', color: '#595959' }}>
|
|
281
|
+
<li>分页加载 (PDF)</li>
|
|
282
|
+
<li>缓存机制</li>
|
|
283
|
+
<li>缩放控制</li>
|
|
284
|
+
<li>旋转功能 (图片)</li>
|
|
285
|
+
<li>标注支持</li>
|
|
286
|
+
<li>主题定制</li>
|
|
287
|
+
</ul>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
{/* 右侧文件查看器 */}
|
|
292
|
+
<div style={{ flex: 1, background: '#fff', borderRadius: '6px', overflow: 'hidden', boxShadow: '0 2px 8px rgba(0,0,0,0.06)' }}>
|
|
293
|
+
<GientechStreamReader
|
|
294
|
+
convertedFilePath={currentFile.convertedFilePath}
|
|
295
|
+
fileName={currentFile.fileName}
|
|
296
|
+
fileType={currentFile.fileType}
|
|
297
|
+
totalPages={currentFile.totalPages}
|
|
298
|
+
initialPage={1}
|
|
299
|
+
initialZoom={1}
|
|
300
|
+
annotations={mockAnnotations}
|
|
301
|
+
pageSize={5}
|
|
302
|
+
streamApiUrl="http://10.15.12.13:9005/proxy/index/knowledgeBase/file/stream"
|
|
303
|
+
authorization="Bearer your-token-here"
|
|
304
|
+
eventsEmit={handleEventsEmit}
|
|
305
|
+
styles={{ theme: demoTheme }}
|
|
306
|
+
tools={{
|
|
307
|
+
annotation: true,
|
|
308
|
+
download: true,
|
|
309
|
+
zoom: true,
|
|
310
|
+
close: false,
|
|
311
|
+
navigation: true,
|
|
312
|
+
rotate: fileType === 'image',
|
|
313
|
+
}}
|
|
314
|
+
customComponents={{
|
|
315
|
+
LoadingComponent: ({ status, theme }) => (
|
|
316
|
+
<div style={{
|
|
317
|
+
display: 'flex',
|
|
318
|
+
flexDirection: 'column',
|
|
319
|
+
alignItems: 'center',
|
|
320
|
+
justifyContent: 'center',
|
|
321
|
+
height: '400px',
|
|
322
|
+
background: theme.colors.background,
|
|
323
|
+
color: theme.colors.text
|
|
324
|
+
}}>
|
|
325
|
+
<div style={{
|
|
326
|
+
width: '40px',
|
|
327
|
+
height: '40px',
|
|
328
|
+
border: `3px solid ${theme.colors.border}`,
|
|
329
|
+
borderTop: `3px solid ${theme.colors.primary}`,
|
|
330
|
+
borderRadius: '50%',
|
|
331
|
+
animation: 'spin 1s linear infinite',
|
|
332
|
+
marginBottom: '16px'
|
|
333
|
+
}} />
|
|
334
|
+
<div style={{ fontSize: '14px' }}>{status}</div>
|
|
335
|
+
<style>{`
|
|
336
|
+
@keyframes spin {
|
|
337
|
+
0% { transform: rotate(0deg); }
|
|
338
|
+
100% { transform: rotate(360deg); }
|
|
339
|
+
}
|
|
340
|
+
`}</style>
|
|
341
|
+
</div>
|
|
342
|
+
),
|
|
343
|
+
ErrorComponent: ({ error, theme }) => (
|
|
344
|
+
<div style={{
|
|
345
|
+
display: 'flex',
|
|
346
|
+
flexDirection: 'column',
|
|
347
|
+
alignItems: 'center',
|
|
348
|
+
justifyContent: 'center',
|
|
349
|
+
height: '400px',
|
|
350
|
+
background: theme.colors.background,
|
|
351
|
+
color: theme.colors.error,
|
|
352
|
+
textAlign: 'center',
|
|
353
|
+
padding: '20px'
|
|
354
|
+
}}>
|
|
355
|
+
<div style={{ fontSize: '48px', marginBottom: '16px' }}>⚠️</div>
|
|
356
|
+
<div style={{ fontSize: '16px', marginBottom: '8px' }}>加载失败</div>
|
|
357
|
+
<div style={{ fontSize: '12px', color: theme.colors.text }}>{error}</div>
|
|
358
|
+
</div>
|
|
359
|
+
),
|
|
360
|
+
}}
|
|
361
|
+
/>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
|
|
365
|
+
{/* 底部日志区域 */}
|
|
366
|
+
<div style={{
|
|
367
|
+
background: '#fff',
|
|
368
|
+
borderTop: '1px solid #d9d9d9',
|
|
369
|
+
padding: '12px 16px',
|
|
370
|
+
fontSize: '12px',
|
|
371
|
+
color: '#8c8c8c',
|
|
372
|
+
maxHeight: '120px',
|
|
373
|
+
overflow: 'auto'
|
|
374
|
+
}}>
|
|
375
|
+
<div style={{ marginBottom: '8px', fontWeight: '500' }}>事件日志:</div>
|
|
376
|
+
<div style={{ fontFamily: 'Monaco, Consolas, "Courier New", monospace' }}>
|
|
377
|
+
打开浏览器控制台查看详细的事件日志...
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
);
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
export default StreamFilesDemo;
|
package/src/lib_enter.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Gientech 多入口集成项目 - 统一导出入口
|
|
2
|
+
// 导出所有业务模块和组件
|
|
3
|
+
|
|
4
|
+
// 聊天模块
|
|
5
|
+
export * from './modules/chat';
|
|
6
|
+
|
|
7
|
+
// 数据库模块
|
|
8
|
+
export * from './modules/database';
|
|
9
|
+
|
|
10
|
+
// 数据库ID模块
|
|
11
|
+
export * from './modules/databaseId';
|
|
12
|
+
|
|
13
|
+
// 数据库表模块
|
|
14
|
+
export * from './modules/databaseTable';
|
|
15
|
+
|
|
16
|
+
// // 无头聊天模块
|
|
17
|
+
// export * from './modules/headlessChat';
|
|
18
|
+
|
|
19
|
+
// 登录模块
|
|
20
|
+
export * from './modules/login';
|
|
21
|
+
|
|
22
|
+
// 模型管理模块
|
|
23
|
+
export * from './modules/modelManage';
|
|
24
|
+
|
|
25
|
+
// 搜索模块(暂不导出,待重构后再开放)
|
|
26
|
+
// export * from './modules/search';
|
|
27
|
+
|
|
28
|
+
// 敏感词模块
|
|
29
|
+
export * from './modules/sensitive';
|
|
30
|
+
|
|
31
|
+
// 流式文件读取器模块
|
|
32
|
+
export * from './modules/streamFilesReader';
|
|
33
|
+
|
|
34
|
+
// 敏感词模块
|
|
35
|
+
export * from './modules/assistantConfig';
|
|
36
|
+
|
|
37
|
+
// 从 @mxmweb/fviewer 重新导出 PDF Worker 注册函数和类型
|
|
38
|
+
export { registerPDFWorker } from '@mxmweb/fviewer';
|
|
39
|
+
export type { Annotation } from '@mxmweb/fviewer';
|
|
40
|
+
|
|
41
|
+
// 导出 AppTheme 类型(如果用户需要从 @gientech/modual 导入)
|
|
42
|
+
export type { AppTheme } from '@mxmweb/zui';
|
|
43
|
+
export { defaultTheme } from '@mxmweb/zui-theme';
|
package/src/main.tsx
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="24" height="24" rx="3.55556" fill="#925BFF"/>
|
|
3
|
+
<path d="M11.9971 11.265C15.249 11.265 17.8891 10.443 17.8891 9.423V7.95288C17.8891 6.93291 15.2492 6.11084 11.9971 6.11084C8.74513 6.11084 6.10504 6.93276 6.10504 7.95288V9.42285C6.10504 10.437 8.73898 11.265 11.9971 11.265Z" fill="white"/>
|
|
4
|
+
<path d="M11.9971 14.577C15.249 14.577 17.8891 13.7551 17.8891 12.7349V10.527C17.8891 11.5469 15.2492 12.369 11.9971 12.369C8.74513 12.369 6.10504 11.5471 6.10504 10.527V12.7349C6.10504 13.749 8.73898 14.577 11.9971 14.577Z" fill="white"/>
|
|
5
|
+
<path d="M11.9971 15.681C8.7451 15.681 6.11102 14.859 6.11102 13.839V16.0469C6.11102 17.0609 8.74496 17.889 12.0031 17.889C15.255 17.889 17.8951 17.0671 17.8951 16.0469V13.8391C17.889 14.859 15.249 15.681 11.9971 15.681Z" fill="white"/>
|
|
6
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="24" height="24" rx="3.55556" fill="#00C1B8"/>
|
|
3
|
+
<path d="M17.9887 12.582C18.1207 13.6621 17.2267 14.5801 16.1526 14.4901C15.3306 14.4181 14.6645 13.7521 14.6045 12.924C14.5745 12.558 14.6645 12.21 14.8445 11.9159C14.9285 11.7779 14.9045 11.6039 14.8025 11.4899L14.3885 11.0339C14.2805 10.9139 14.1005 10.8839 13.9565 10.9559C13.6144 11.1239 13.2304 11.2199 12.8224 11.2199C12.6244 11.2199 12.4324 11.1959 12.2464 11.1539C12.0963 11.1179 11.9463 11.1779 11.8563 11.3039L11.2803 12.1259C11.1783 12.276 11.1963 12.474 11.3223 12.606C11.8983 13.188 12.2464 13.9921 12.2284 14.8741C12.1924 16.4702 10.9203 17.7963 9.32417 17.9043C7.45804 18.0243 5.90994 16.4942 6.00595 14.6281C6.08995 13.038 7.38604 11.7599 8.97614 11.6879C9.42017 11.6699 9.8402 11.7419 10.2302 11.8919C10.3922 11.9519 10.5722 11.8979 10.6743 11.7599L11.1663 11.0579C11.2743 10.9019 11.2503 10.6919 11.1123 10.5658C10.5302 10.0498 10.1882 9.26976 10.2662 8.4177C10.3742 7.18162 11.3823 6.18556 12.6244 6.09555C14.1245 5.98154 15.3846 7.17562 15.3846 8.65172C15.3846 9.20376 15.2106 9.70779 14.9105 10.1278C14.8085 10.2658 14.8205 10.4578 14.9345 10.5898L15.3786 11.0819C15.4746 11.1899 15.6306 11.2259 15.7626 11.1779C16.0086 11.0939 16.2786 11.0639 16.5606 11.1119C17.3047 11.2259 17.8987 11.8319 17.9887 12.582Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="20" height="20" rx="2.22222" fill="#00B2F9"/>
|
|
3
|
+
<path d="M5.3125 13.9672V13.975C5.32812 14.6938 5.89922 15.2734 6.61875 15.2734H13.9062C14.3375 15.2734 14.6875 14.9289 14.6875 14.4977V5.50703C14.6875 5.40447 14.6673 5.30292 14.628 5.20818C14.5887 5.11344 14.5312 5.02736 14.4586 4.95488C14.3861 4.8824 14.2999 4.82492 14.2052 4.78575C14.1104 4.74657 14.0088 4.72646 13.9062 4.72656H6.875C6.01172 4.72656 5.3125 5.42031 5.3125 6.28359V13.9672ZM7.5 9.24531V6.25C7.5 6.07813 7.64062 5.9375 7.8125 5.9375H9.6875C9.86016 5.9375 10 6.07813 10 6.25V9.24531C10 9.30716 9.98175 9.36762 9.94741 9.41906C9.91308 9.47049 9.86425 9.51058 9.80712 9.53426C9.74999 9.55793 9.68712 9.56412 9.62647 9.55204C9.56581 9.53996 9.51011 9.51016 9.46641 9.46641L8.97109 8.97109C8.94207 8.94204 8.90761 8.91899 8.86967 8.90326C8.83173 8.88754 8.79107 8.87944 8.75 8.87944C8.70893 8.87944 8.66827 8.88754 8.63033 8.90326C8.59239 8.91899 8.55793 8.94204 8.52891 8.97109L8.03359 9.46641C7.98989 9.51016 7.93418 9.53996 7.87353 9.55204C7.81288 9.56412 7.75001 9.55793 7.69288 9.53426C7.63575 9.51058 7.58692 9.47049 7.55259 9.41906C7.51825 9.36762 7.49995 9.30716 7.5 9.24531ZM6.54375 14.2063C6.45208 14.1156 6.40625 14.0052 6.40625 13.875C6.40625 13.7458 6.45208 13.6354 6.54375 13.5438C6.6349 13.4521 6.74531 13.4062 6.875 13.4062H13.5938V14.3438H6.875C6.74531 14.3438 6.6349 14.2979 6.54375 14.2063Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="20" height="20" rx="2.22222" fill="#FFCC3C"/>
|
|
3
|
+
<path d="M13.3263 12.7917H7.53763C7.33426 12.8116 7.17923 12.9825 7.17923 13.1867C7.17923 13.3909 7.33426 13.5618 7.53763 13.5817H13.3277C13.3828 13.5871 13.4384 13.5809 13.4909 13.5634C13.5435 13.546 13.5918 13.5178 13.6328 13.4806C13.6738 13.4434 13.7066 13.3981 13.729 13.3474C13.7514 13.2968 13.763 13.2421 13.763 13.1867C13.763 13.1313 13.7514 13.0766 13.729 13.026C13.7066 12.9753 13.6738 12.93 13.6328 12.8928C13.5918 12.8556 13.5435 12.8274 13.4909 12.8099C13.4384 12.7925 13.3828 12.7863 13.3277 12.7917H13.3263ZM9.19742 7.60418L8.84232 8.55193H9.57339L9.19742 7.60418Z" fill="white"/>
|
|
4
|
+
<path d="M15.3211 14.7707V6.9692H14.4704V14.3543H6.70511C6.06668 14.3392 5.55704 13.8173 5.55704 13.1788C5.55704 12.5402 6.06668 12.0184 6.70511 12.0033H13.352C13.4644 12.0075 13.5735 11.9648 13.653 11.8852C13.6923 11.8459 13.7231 11.7988 13.7434 11.747C13.7638 11.6952 13.7731 11.6398 13.771 11.5842V5.20102C13.7736 5.14526 13.7646 5.08958 13.7445 5.03752C13.7244 4.98546 13.6936 4.93816 13.6542 4.89865C13.6148 4.85915 13.5675 4.82832 13.5155 4.80812C13.4634 4.78792 13.4077 4.7788 13.352 4.78134H6.70511C5.60281 4.80136 4.71609 5.69369 4.70291 6.79599V13.1759C4.71609 14.283 5.61038 15.1773 6.71756 15.1905H14.8893C15.0042 15.1994 15.1173 15.1585 15.1999 15.0782C15.2407 15.0385 15.2727 14.9905 15.2936 14.9375C15.3145 14.8845 15.3239 14.8276 15.3211 14.7707ZM8.98782 6.78585H9.44888L10.7213 9.92562H10.2475L9.9075 9.06759H8.51871L8.19742 9.92562H7.72354L8.98782 6.78585Z" fill="white"/>
|
|
5
|
+
</svg>
|