From 0f89e39da1fffefae1b6553d2f1469ba743fdfef Mon Sep 17 00:00:00 2001 From: Mike Fortman Date: Tue, 15 Jul 2025 13:46:51 -0500 Subject: [PATCH] feat: Move to Biome for linting and formatting (#8997) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * init biome * lint * format * unused vars * more unused vars * error fixes * import ordering * test precommit hook * add precommit hook * [autofix.ci] apply automated fixes * remove prettier and eslint and update gh actions * pre-commit update * ✨ (Makefile): add new targets 'biome' and 'biome_check' to run biome check and format on frontend code. * 🔧 (Makefile): rename 'biome' target to 'format_frontend' for clarity and consistency 🔧 (Makefile): rename 'biome_check' target to 'format_frontend_check' for clarity and consistency * 📝 (biome.json): Update a11y rule in biome.json to turn off 'noStaticElementInteractions' warning 🔧 (apiModal/code-tabs.tsx): Remove unused 'autologin' variable in APITabsComponent ♻️ (global-variable-modal.tsx): Simplify GeneralGlobalVariableModal component by removing unused props definition * 📝 (biome.json): Remove 'debug' from allowed console methods to improve code quality 🔧 (index.tsx): Replace console.debug with console.log for better logging consistency ♻️ (index.tsx): Refactor UpdateAllComponents function signature to remove unnecessary empty object parameter * fix console rules * 📝 (biome.json): update a11y rule to warn for noStaticElementInteractions to improve accessibility compliance. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cristhianzl --- .github/workflows/js_autofix.yml | 2 +- .github/workflows/lint-js.yml | 6 +- .pre-commit-config.yaml | 8 + Makefile | 8 + eslint.config.js | 0 src/frontend/.biomeignore | 13 + src/frontend/.eslintrc.json | 47 - src/frontend/.husky/pre-commit | 1 + src/frontend/.prettierignore | 1 - src/frontend/.prettierrc.mjs | 7 - src/frontend/biome.json | 90 ++ src/frontend/package-lock.json | 954 +++--------------- src/frontend/package.json | 16 +- src/frontend/playwright.config.ts | 1 + src/frontend/src/App.css | 7 +- src/frontend/src/CustomEdges/index.tsx | 18 +- .../ListSelectionComponent/ComboBoxItem.tsx | 2 +- .../ListSelectionComponent/ListItem.tsx | 2 +- .../ListSelectionComponent/index.tsx | 4 +- .../components/NodeDescription/index.tsx | 10 +- .../components/NodeDialogComponent/index.tsx | 6 +- .../components/NodeInputField/index.tsx | 10 +- .../GenericNode/components/NodeName/index.tsx | 4 +- .../NodeOutputParameter/NodeOutputs.tsx | 2 +- .../components/NodeOutputfield/index.tsx | 16 +- .../components/NodeStatus/index.tsx | 25 +- .../components/OutputComponent/index.tsx | 5 +- .../RenderInputParameters/index.tsx | 2 +- .../handleRenderComponent/index.tsx | 6 +- .../GenericNode/components/nodeIcon/index.tsx | 7 +- .../components/switchOutputView/index.tsx | 7 +- .../components/outputModal/index.tsx | 2 +- .../GenericNode/hooks/use-get-build-status.ts | 2 +- .../src/CustomNodes/GenericNode/index.tsx | 22 +- .../NoteNode/NoteToolbarComponent/index.tsx | 9 +- .../components/color-picker-buttons.tsx | 5 +- .../NoteNode/components/select-items.tsx | 5 +- .../src/CustomNodes/NoteNode/index.tsx | 11 +- .../helpers/check-code-validity.ts | 4 +- .../CustomNodes/helpers/check-lucide-icons.ts | 2 +- .../src/CustomNodes/helpers/count-handles.ts | 4 +- .../helpers/get-class-from-build-status.ts | 4 +- .../helpers/get-node-output-colors-name.ts | 4 +- .../helpers/get-node-output-colors.ts | 4 +- .../CustomNodes/helpers/mutate-template.ts | 8 +- .../helpers/process-node-advanced-fields.ts | 6 +- .../helpers/update-hidden-outputs.ts | 2 +- .../hooks/use-fetch-data-on-mount.ts | 4 +- .../CustomNodes/hooks/use-handle-new-value.ts | 10 +- .../hooks/use-handle-node-class.ts | 6 +- .../src/CustomNodes/hooks/use-merge-refs.ts | 2 +- .../CustomNodes/hooks/use-update-all-nodes.ts | 4 +- .../CustomNodes/hooks/use-update-node-code.ts | 6 +- .../hooks/use-update-validation-status.ts | 4 +- .../hooks/use-validation-status-string.ts | 2 +- .../src/CustomNodes/utils/get-field-title.tsx | 2 +- .../src/CustomNodes/utils/get-handle-id.tsx | 2 +- .../components/singleAlertComponent/index.tsx | 6 +- .../src/alerts/alertDropDown/index.tsx | 2 +- src/frontend/src/alerts/error/index.tsx | 2 +- src/frontend/src/alerts/notice/index.tsx | 4 +- src/frontend/src/alerts/success/index.tsx | 2 +- .../src/boilerplate/raw-component/index.tsx | 9 - .../authorization/authAdminGuard/index.tsx | 2 +- .../authorization/authGuard/index.tsx | 2 +- .../common/GradientWrapper/index.tsx | 2 +- .../components/common/ImageViewer/index.tsx | 4 +- .../common/accordionComponent/index.tsx | 4 +- .../common/animatedNumbers/index.tsx | 9 +- .../common/crashErrorComponent/index.tsx | 2 +- .../common/fetchErrorComponent/index.tsx | 2 +- .../common/genericIconComponent/index.tsx | 15 +- .../common/loadingComponent/index.tsx | 2 +- .../components/common/objectRender/index.tsx | 4 +- .../components/common/pageLayout/index.tsx | 2 +- .../common/paginatorComponent/index.tsx | 6 +- .../common/sanitizedHTMLWrapper/index.tsx | 4 +- .../common/shadTooltipComponent/index.tsx | 5 +- .../hooks/use-data-effect.ts | 2 +- .../hooks/use-handle-install.ts | 2 +- .../common/storeCardComponent/index.tsx | 10 +- .../common/tagsSelectorComponent/index.tsx | 2 +- .../common/timeoutErrorComponent/index.tsx | 2 +- .../GlobalVariableModal.tsx | 23 +- .../components/AccountMenu/index.tsx | 247 +++-- .../components/FlowMenu/index.tsx | 7 +- .../components/HeaderMenu/index.tsx | 4 +- .../components/ProfileIcon/index.tsx | 2 +- .../components/ThemeButtons/index.tsx | 2 +- .../components/langflow-counts.tsx | 2 +- .../core/appHeaderComponent/index.tsx | 2 +- .../src/components/core/border-trail.tsx | 2 +- .../core/canvasControlsComponent/index.tsx | 14 +- .../components/dragCardComponent/index.tsx | 2 +- .../cardComponent/hooks/use-on-drag-start.tsx | 4 +- .../core/cardsWrapComponent/index.tsx | 2 +- .../chatComponents/ContentBlockDisplay.tsx | 6 +- .../core/chatComponents/ContentDisplay.tsx | 7 +- .../core/chatComponents/DurationDisplay.tsx | 2 +- .../components/tweakComponent/index.tsx | 6 +- .../components/tweaksComponent/index.tsx | 2 +- .../core/csvOutputComponent/index.tsx | 8 +- .../core/dataOutputComponent/index.tsx | 2 +- .../core/dropdownComponent/index.tsx | 18 +- .../core/editFlowSettingsComponent/index.tsx | 5 +- .../core/flowSettingsComponent/index.tsx | 12 +- .../components/deploy-dropdown.tsx | 6 +- .../components/flow-toolbar-options.tsx | 2 +- .../core/flowToolbarComponent/index.tsx | 4 +- .../components/get-started-progress.tsx | 6 +- .../components/header-buttons.tsx | 4 +- .../components/input-edit-folder-name.tsx | 2 +- .../components/mcp-server-notice.tsx | 2 +- .../components/select-options.tsx | 2 +- .../helpers/handle-select-change.ts | 2 +- .../components/sideBarFolderButtons/index.tsx | 12 +- .../src/components/core/jsonEditor/index.tsx | 22 +- .../components/core/jsonEditor/menuUtils.ts | 2 +- .../core/jsonEditor/useMenuCustomization.ts | 2 +- .../jsonOutputComponent/json-output-view.tsx | 4 +- .../core/logCanvasControlsComponent/index.tsx | 2 +- .../components/TableNodeComponent/index.tsx | 13 +- .../components/ToolsComponent/index.tsx | 4 +- .../components/codeAreaComponent/index.tsx | 2 +- .../components/connectionComponent/index.tsx | 10 +- .../copyFieldAreaComponent/index.tsx | 4 +- .../components/dictComponent/index.tsx | 2 +- .../components/dropdownComponent/index.tsx | 2 +- .../emptyParameterComponent/index.tsx | 2 +- .../components/floatComponent/index.tsx | 4 +- .../components/popover/index.tsx | 8 +- .../components/popoverObject/index.tsx | 3 +- .../components/inputComponent/index.tsx | 6 +- .../components/inputFileComponent/index.tsx | 8 +- .../components/inputGlobalComponent/index.tsx | 4 +- .../components/inputListComponent/index.tsx | 9 +- .../components/intComponent/index.tsx | 6 +- .../components/keypairListComponent/index.tsx | 4 +- .../components/linkComponent/index.tsx | 3 +- .../components/mcpComponent/index.tsx | 4 +- .../components/multiselectComponent/index.tsx | 2 +- .../components/promptComponent/index.tsx | 2 +- .../components/queryComponent/index.tsx | 4 +- .../components/searchBarComponent/index.tsx | 2 +- .../components/sliderComponent/index.tsx | 12 +- .../sortableListComponent/index.tsx | 10 +- .../components/strRenderComponent/index.tsx | 2 +- .../components/tabComponent/index.tsx | 4 +- .../components/TableOptions/index.tsx | 2 +- .../tableAdvancedToggleCellRender/index.tsx | 4 +- .../components/tableAutoCellRender/index.tsx | 6 +- .../tableDropdownCellEditor/index.tsx | 2 +- .../components/tableNodeCellRender/index.tsx | 8 +- .../components/tableComponent/index.tsx | 40 +- .../components/textAreaComponent/index.tsx | 6 +- .../components/toggleShadComponent/index.tsx | 2 +- .../webhookFieldComponent/index.tsx | 4 +- .../core/parameterRenderComponent/index.tsx | 17 +- .../core/parameterRenderComponent/types.ts | 10 +- .../components/core/pdfViewer/Error/index.tsx | 2 +- .../src/components/core/pdfViewer/index.tsx | 4 +- .../core/sidebarComponent/index.tsx | 2 +- .../src/components/ui/TextShimmer.tsx | 4 +- .../src/components/ui/background-gradient.tsx | 4 +- src/frontend/src/components/ui/badge.tsx | 2 +- src/frontend/src/components/ui/command.tsx | 2 +- src/frontend/src/components/ui/dialog.tsx | 5 +- src/frontend/src/components/ui/disclosure.tsx | 8 +- src/frontend/src/components/ui/loading.tsx | 2 +- src/frontend/src/components/ui/sidebar.tsx | 5 +- src/frontend/src/components/ui/switch.tsx | 2 +- .../src/components/ui/tabs-button.tsx | 2 +- src/frontend/src/components/ui/text-loop.tsx | 8 +- .../src/components/ui/textAnimation.tsx | 6 +- src/frontend/src/constants/constants.ts | 2 +- src/frontend/src/contexts/authContext.tsx | 8 +- src/frontend/src/contexts/index.tsx | 6 +- src/frontend/src/controllers/API/api.tsx | 30 +- .../src/controllers/API/helpers/constants.ts | 6 +- src/frontend/src/controllers/API/index.ts | 12 +- .../API/queries/_builds/use-delete-builds.ts | 2 +- .../use-get-builds-polling-mutation.ts | 10 +- .../API/queries/_builds/use-get-builds.ts | 8 +- .../queries/api-keys/use-delete-api-key.ts | 2 +- .../API/queries/api-keys/use-get-api-keys.ts | 2 +- .../queries/api-keys/use-post-add-api-key.ts | 2 +- .../API/queries/auth/use-delete-users.ts | 4 +- .../API/queries/auth/use-get-autologin.ts | 8 +- .../API/queries/auth/use-get-user.ts | 4 +- .../API/queries/auth/use-get-users-page.ts | 4 +- .../queries/auth/use-patch-reset-password.ts | 4 +- .../API/queries/auth/use-patch-update-user.ts | 4 +- .../API/queries/auth/use-post-add-user.ts | 6 +- .../API/queries/auth/use-post-login-user.ts | 4 +- .../API/queries/auth/use-post-logout.ts | 7 +- .../queries/auth/use-post-refresh-access.ts | 5 +- .../API/queries/config/use-get-config.ts | 4 +- .../file-management/use-delete-file.ts | 4 +- .../file-management/use-delete-files.ts | 4 +- .../file-management/use-duplicate-file.ts | 4 +- .../file-management/use-get-download-file.ts | 2 +- .../file-management/use-get-download-files.ts | 2 +- .../queries/file-management/use-get-files.ts | 4 +- .../file-management/use-post-upload-file.ts | 6 +- .../file-management/use-put-rename-file.ts | 4 +- .../API/queries/files/use-download-files.ts | 2 +- .../queries/files/use-get-download-images.ts | 2 +- .../queries/files/use-get-profile-pictures.ts | 2 +- .../API/queries/files/use-post-upload-file.ts | 4 +- .../queries/flows/use-delete-delete-flows.ts | 4 +- .../queries/flows/use-get-basic-examples.ts | 4 +- .../queries/flows/use-get-download-flows.ts | 4 +- .../API/queries/flows/use-get-flow.ts | 6 +- .../flows/use-get-refresh-flows-query.ts | 8 +- .../API/queries/flows/use-get-types.ts | 5 +- .../queries/flows/use-patch-update-flow.ts | 6 +- .../API/queries/flows/use-post-add-flow.ts | 6 +- .../API/queries/folders/use-delete-folders.ts | 4 +- .../folders/use-get-download-folders.ts | 5 +- .../API/queries/folders/use-get-folder.ts | 10 +- .../API/queries/folders/use-get-folders.ts | 4 +- .../API/queries/folders/use-patch-folders.ts | 4 +- .../API/queries/folders/use-post-folders.ts | 4 +- .../folders/use-post-upload-folders.ts | 2 +- .../folders/use-post-upload-to-folder.ts | 2 +- .../API/queries/health/use-get-health.ts | 6 +- .../API/queries/mcp/use-add-mcp-server.ts | 8 +- .../API/queries/mcp/use-delete-mcp-server.ts | 6 +- .../API/queries/mcp/use-get-flows-mcp.ts | 4 +- .../API/queries/mcp/use-get-installed-mcp.ts | 2 +- .../API/queries/mcp/use-get-mcp-server.ts | 4 +- .../API/queries/mcp/use-get-mcp-servers.ts | 4 +- .../API/queries/mcp/use-patch-flows-mcp.ts | 6 +- .../API/queries/mcp/use-patch-install-mcp.ts | 4 +- .../API/queries/mcp/use-patch-mcp-server.ts | 8 +- .../queries/messages/use-delete-messages.ts | 4 +- .../queries/messages/use-delete-sessions.ts | 4 +- .../messages/use-get-messages-polling.ts | 8 +- .../API/queries/messages/use-get-messages.ts | 6 +- .../messages/use-get-sessions-from-flow.ts | 4 +- .../messages/use-put-update-messages.ts | 8 +- .../queries/messages/use-rename-session.ts | 6 +- .../queries/nodes/use-post-template-value.ts | 4 +- .../queries/nodes/use-post-validate-code.ts | 4 +- .../nodes/use-post-validate-component-code.ts | 4 +- .../queries/nodes/use-post-validate-prompt.ts | 4 +- .../API/queries/store/use-get-tags.ts | 2 +- .../queries/store/use-post-like-component.ts | 2 +- .../transactions/use-get-transactions.ts | 4 +- .../variables/use-delete-global-variables.ts | 4 +- .../variables/use-get-global-variables.ts | 6 +- .../use-get-mutation-global-variables.ts | 6 +- .../variables/use-patch-global-variables.ts | 4 +- .../variables/use-post-global-variables.ts | 6 +- .../API/queries/version/use-get-version.ts | 2 +- .../vertex/use-post-retrieve-vertex-order.tsx | 6 +- .../API/services/request-processor.ts | 11 +- .../components/custom-NodeStatus.tsx | 6 +- .../components/custom-chat-input.tsx | 2 +- .../components/custom-connectionComponent.tsx | 4 +- .../custom-fetch-error-component.tsx | 2 +- .../components/custom-file-card.tsx | 2 +- .../components/custom-file-input.tsx | 2 +- .../custom-get-started-progress.tsx | 2 +- .../customization/components/custom-link.tsx | 2 +- .../components/custom-linkComponent.tsx | 2 +- .../components/custom-navigate.tsx | 2 +- .../components/custom-new-modal.tsx | 2 +- .../components/custom-parameter.tsx | 10 +- .../custom-profile-picture-chooser.tsx | 2 +- .../components/custom-voice-assistant.tsx | 2 +- .../use-custom-handle-single-file-download.ts | 2 +- .../hooks/use-custom-navigate.ts | 6 +- .../hooks/use-custom-post-auth.ts | 2 +- .../hooks/use-custom-post-upload-file.ts | 2 +- .../hooks/use-custom-primary-loading.ts | 2 +- .../hooks/use-custom-start-recording.ts | 2 +- .../customization/hooks/use-custom-theme.ts | 3 +- .../utils/custom-get-access-token.ts | 2 +- .../utils/custom-get-download-folders.ts | 2 +- .../utils/custom-reactFlowUtils.ts | 2 +- .../utils/custom-routes-store-pages.tsx | 2 +- .../utils/custom-routes-store.tsx | 2 +- .../src/helpers/get-objects-from-filelist.ts | 6 +- src/frontend/src/hooks/flows/use-add-flow.ts | 8 +- .../src/hooks/flows/use-autosave-flow.ts | 2 +- src/frontend/src/hooks/flows/use-save-flow.ts | 7 +- .../src/hooks/flows/use-upload-flow.ts | 4 +- src/frontend/src/hooks/use-add-component.ts | 8 +- src/frontend/src/icons/AIML/index.tsx | 3 +- src/frontend/src/icons/AWS/index.tsx | 3 +- src/frontend/src/icons/AWSInverted/index.tsx | 3 +- src/frontend/src/icons/AgentQL/index.tsx | 3 +- src/frontend/src/icons/Airbyte/index.tsx | 3 +- src/frontend/src/icons/Anthropic/index.tsx | 3 +- src/frontend/src/icons/Apify/index.tsx | 3 +- src/frontend/src/icons/ArXiv/index.tsx | 3 +- src/frontend/src/icons/Arize/index.tsx | 3 +- src/frontend/src/icons/AssemblyAI/index.tsx | 3 +- src/frontend/src/icons/AstraDB/index.tsx | 3 +- src/frontend/src/icons/AzLogo/index.tsx | 3 +- src/frontend/src/icons/Azure/index.tsx | 3 +- src/frontend/src/icons/BW python/index.tsx | 3 +- src/frontend/src/icons/Bing/index.tsx | 3 +- .../src/icons/BotMessageSquare/index.tsx | 3 +- src/frontend/src/icons/Cassandra/index.tsx | 3 +- src/frontend/src/icons/ChromaIcon/index.tsx | 3 +- src/frontend/src/icons/Claude/index.tsx | 3 +- src/frontend/src/icons/Cleanlab/index.tsx | 3 +- src/frontend/src/icons/Clickhouse/index.tsx | 3 +- src/frontend/src/icons/Cloudflare/index.tsx | 3 +- src/frontend/src/icons/Cohere/index.tsx | 3 +- src/frontend/src/icons/Composio/index.tsx | 3 +- src/frontend/src/icons/Confluence/index.tsx | 3 +- src/frontend/src/icons/Couchbase/index.tsx | 3 +- src/frontend/src/icons/CrewAI/index.tsx | 3 +- src/frontend/src/icons/Cursor/index.tsx | 3 +- src/frontend/src/icons/DeepSeek/index.tsx | 3 +- src/frontend/src/icons/Docling/index.tsx | 3 +- src/frontend/src/icons/Dropbox/index.tsx | 3 +- src/frontend/src/icons/DuckDuckGo/index.tsx | 3 +- .../src/icons/ElasticsearchStore/index.tsx | 3 +- src/frontend/src/icons/Evernote/index.tsx | 3 +- src/frontend/src/icons/Exa/index.tsx | 3 +- .../src/icons/FacebookMessenger/index.tsx | 3 +- src/frontend/src/icons/Firecrawl/index.tsx | 3 +- src/frontend/src/icons/GitBook/index.tsx | 3 +- src/frontend/src/icons/GitLoader/index.tsx | 3 +- src/frontend/src/icons/Glean/index.tsx | 3 +- src/frontend/src/icons/Google/index.tsx | 3 +- src/frontend/src/icons/GoogleDrive/index.tsx | 3 +- .../src/icons/GoogleGenerativeAI/index.tsx | 3 +- src/frontend/src/icons/Groq/index.tsx | 3 +- src/frontend/src/icons/HCD/index.tsx | 3 +- .../src/icons/HomeAssistant/index.tsx | 3 +- src/frontend/src/icons/HuggingFace/index.tsx | 3 +- src/frontend/src/icons/IBMWatsonx/index.tsx | 3 +- src/frontend/src/icons/IFixIt/index.tsx | 3 +- src/frontend/src/icons/Icosa/index.tsx | 3 +- src/frontend/src/icons/JSicon/index.tsx | 3 +- src/frontend/src/icons/JigsawStack/index.tsx | 2 +- src/frontend/src/icons/LMStudio/index.tsx | 3 +- src/frontend/src/icons/LangChain/index.tsx | 3 +- src/frontend/src/icons/Langwatch/index.tsx | 3 +- src/frontend/src/icons/MCP/index.tsx | 3 +- src/frontend/src/icons/Maritalk/index.tsx | 3 +- src/frontend/src/icons/Mem0/index.tsx | 3 +- src/frontend/src/icons/Meta/index.tsx | 3 +- src/frontend/src/icons/Midjorney/index.tsx | 3 +- src/frontend/src/icons/Milvus/index.tsx | 3 +- src/frontend/src/icons/MongoDB/index.tsx | 3 +- src/frontend/src/icons/Needle/index.tsx | 3 +- src/frontend/src/icons/NotDiamond/index.tsx | 3 +- src/frontend/src/icons/Notion/index.tsx | 3 +- src/frontend/src/icons/Novita/index.tsx | 3 +- src/frontend/src/icons/Nvidia/index.tsx | 3 +- src/frontend/src/icons/Olivya/index.tsx | 3 +- src/frontend/src/icons/Ollama/index.tsx | 3 +- src/frontend/src/icons/OneDrive/index.tsx | 3 +- src/frontend/src/icons/OpenAi/index.tsx | 3 +- src/frontend/src/icons/OpenRouter/index.tsx | 3 +- src/frontend/src/icons/OpenSearch/index.tsx | 3 +- src/frontend/src/icons/Perplexity/index.tsx | 3 +- src/frontend/src/icons/Pinecone/index.tsx | 3 +- src/frontend/src/icons/Postgres/index.tsx | 3 +- src/frontend/src/icons/PowerPoint/index.tsx | 3 +- src/frontend/src/icons/Python/index.tsx | 3 +- src/frontend/src/icons/QDrant/index.tsx | 3 +- src/frontend/src/icons/QianFanChat/index.tsx | 3 +- src/frontend/src/icons/ReadTheDocs/index.tsx | 3 +- src/frontend/src/icons/Redis/index.tsx | 3 +- src/frontend/src/icons/SambaNova/index.tsx | 3 +- .../src/icons/ScrapeGraphAI/index.tsx | 3 +- src/frontend/src/icons/SearchAPI/index.tsx | 3 +- src/frontend/src/icons/SearchHybrid/index.tsx | 3 +- .../src/icons/SearchLexical/index.tsx | 3 +- src/frontend/src/icons/SearchVector/index.tsx | 3 +- src/frontend/src/icons/Searx/index.tsx | 3 +- src/frontend/src/icons/SerpSearch/index.tsx | 3 +- src/frontend/src/icons/Serper/index.tsx | 3 +- src/frontend/src/icons/Share/index.tsx | 3 +- src/frontend/src/icons/Share2/index.tsx | 3 +- src/frontend/src/icons/Slack/index.tsx | 3 +- src/frontend/src/icons/Spider/index.tsx | 3 +- src/frontend/src/icons/Streamlit/index.tsx | 3 +- src/frontend/src/icons/Tavily/index.tsx | 3 +- src/frontend/src/icons/TwelveLabs/index.tsx | 3 +- src/frontend/src/icons/Twitter X/index.tsx | 3 +- src/frontend/src/icons/Unstructured/index.tsx | 3 +- src/frontend/src/icons/Upstash/index.tsx | 3 +- src/frontend/src/icons/VectaraIcon/index.tsx | 3 +- src/frontend/src/icons/VertexAI/index.tsx | 3 +- src/frontend/src/icons/Weaviate/index.tsx | 3 +- src/frontend/src/icons/Wikipedia/index.tsx | 3 +- src/frontend/src/icons/Windsurf/index.tsx | 3 +- src/frontend/src/icons/Wolfram/index.tsx | 3 +- src/frontend/src/icons/Word/index.tsx | 3 +- src/frontend/src/icons/Youtube/index.tsx | 3 +- src/frontend/src/icons/ZepMemory/index.tsx | 3 +- src/frontend/src/icons/athena/index.tsx | 3 +- src/frontend/src/icons/eagerIconImports.ts | 12 +- src/frontend/src/icons/freezeAll/index.tsx | 4 +- src/frontend/src/icons/github/index.tsx | 3 +- src/frontend/src/icons/globe-ok/index.tsx | 3 +- src/frontend/src/icons/gmail/index.tsx | 3 +- .../src/icons/googlecalendar/index.tsx | 3 +- src/frontend/src/icons/hackerNews/index.tsx | 3 +- src/frontend/src/icons/mistral/index.tsx | 3 +- src/frontend/src/icons/outlook/index.tsx | 3 +- src/frontend/src/icons/supabase/index.tsx | 3 +- src/frontend/src/icons/thumbs/index.tsx | 3 +- src/frontend/src/icons/xAI/index.tsx | 3 +- .../src/modals/EmbedModal/embed-modal.tsx | 2 +- .../IOFieldView/components/file-input.tsx | 6 +- .../IOFieldView/components/json-input.tsx | 6 +- .../IOFieldView/components/key-pair-input.tsx | 4 +- .../components/session-selector.tsx | 11 +- .../components/IOFieldView/io-field-view.tsx | 26 +- .../IOModal/components/chat-view-wrapper.tsx | 2 +- .../chatView/chatInput/chat-input.tsx | 10 +- .../components/button-send-wrapper.tsx | 2 +- .../chatInput/components/input-wrapper.tsx | 4 +- .../chatInput/components/no-input.tsx | 4 +- .../components/text-area-wrapper.tsx | 2 +- .../audio-settings/audio-settings-dialog.tsx | 15 +- .../hooks/use-handle-websocket-message.ts | 6 +- .../hooks/use-initialize-audio.ts | 7 +- .../hooks/use-interrupt-playback.ts | 2 +- .../hooks/use-play-next-audio-chunk.ts | 2 +- .../hooks/use-start-conversation.ts | 2 +- .../hooks/use-start-recording.ts | 4 +- .../voice-assistant/voice-assistant.tsx | 10 +- .../chatInput/hooks/use-file-handler.ts | 8 +- .../chatView/chatMessage/chat-message.tsx | 12 +- .../chatMessage/components/content-view.tsx | 6 +- .../components/edit-message-field.tsx | 4 +- .../chatMessage/components/edit-message.tsx | 6 +- .../components/file-card-wrapper.tsx | 2 +- .../components/message-options.tsx | 2 +- .../components/chat-scroll-anchor.tsx | 4 +- .../chatView/components/chat-view.tsx | 20 +- .../fileComponent/components/file-card.tsx | 4 +- .../fileComponent/utils/get-classes.tsx | 4 +- .../components/selected-view-field.tsx | 2 +- .../IOModal/components/session-view.tsx | 8 +- .../IOModal/components/sidebar-open-view.tsx | 2 +- .../src/modals/IOModal/playground-modal.tsx | 12 +- .../IOModal/types/selected-view-field.ts | 2 +- .../src/modals/addMcpServerModal/index.tsx | 13 +- .../modals/apiModal/codeTabs/code-tabs.tsx | 17 +- src/frontend/src/modals/apiModal/index.tsx | 6 +- .../apiModal/utils/get-changes-types.ts | 2 +- .../modals/apiModal/utils/get-curl-code.tsx | 2 +- .../modals/apiModal/utils/get-js-api-code.tsx | 2 +- .../utils/get-nodes-with-default-value.ts | 2 +- .../modals/apiModal/utils/get-widget-code.tsx | 2 +- src/frontend/src/modals/baseModal/index.tsx | 16 +- .../src/modals/codeAreaModal/index.tsx | 10 +- .../src/modals/confirmationModal/index.tsx | 4 +- .../src/modals/dictAreaModal/index.tsx | 4 +- .../components/editNodeComponent/index.tsx | 6 +- .../editNodeModal/hooks/use-column-defs.ts | 4 +- .../hooks/use-handle-change-advanced.ts | 4 +- .../editNodeModal/hooks/use-row-data.ts | 4 +- .../src/modals/editNodeModal/index.tsx | 6 +- src/frontend/src/modals/exportModal/index.tsx | 4 +- .../components/dragFilesComponent/index.tsx | 2 +- .../filesContextMenuComponent/index.tsx | 7 +- .../fileRendererComponent/index.tsx | 4 +- .../filesRendererComponent/index.tsx | 2 +- .../components/recentFilesComponent/index.tsx | 6 +- .../src/modals/fileManagerModal/index.tsx | 6 +- .../src/modals/flowLogsModal/index.tsx | 6 +- .../src/modals/flowSettingsModal/index.tsx | 2 +- src/frontend/src/modals/promptModal/index.tsx | 29 +- .../promptModal/utils/var-highlight-html.tsx | 2 +- src/frontend/src/modals/queryModal/index.tsx | 2 +- .../src/modals/saveChangesModal/index.tsx | 5 +- .../components/form-key-render.tsx | 2 +- .../src/modals/secretKeyModal/index.tsx | 4 +- src/frontend/src/modals/shareModal/index.tsx | 8 +- src/frontend/src/modals/tableModal/index.tsx | 8 +- .../components/GetStartedComponent/index.tsx | 2 +- .../TemplateCardComponent/index.tsx | 2 +- .../TemplateCategoryComponent/index.tsx | 2 +- .../TemplateContentComponent/index.tsx | 10 +- .../TemplateGetStartedCardComponent/index.tsx | 4 +- .../components/navComponent/index.tsx | 5 +- .../src/modals/templatesModal/index.tsx | 10 +- .../src/modals/textAreaModal/index.tsx | 2 +- .../components/toolsTable/index.tsx | 10 +- src/frontend/src/modals/toolsModal/index.tsx | 8 +- .../src/modals/updateComponentModal/index.tsx | 8 +- .../src/modals/userManagementModal/index.tsx | 6 +- .../src/pages/AdminPage/LoginPage/index.tsx | 6 +- src/frontend/src/pages/AdminPage/index.tsx | 8 +- .../src/pages/AppAuthenticatedPage/index.tsx | 2 +- src/frontend/src/pages/AppInitPage/index.tsx | 4 +- .../AppWrapperPage/hooks/use-health-check.ts | 12 +- .../src/pages/AppWrapperPage/index.tsx | 4 +- .../src/pages/DashboardWrapperPage/index.tsx | 2 +- .../src/pages/DeleteAccountPage/index.tsx | 2 +- .../ConnectionLineComponent/index.tsx | 2 +- .../PageComponent/MemoizedComponents.tsx | 4 +- .../components/PageComponent/index.tsx | 69 +- .../PageComponent/utils/get-random-name.tsx | 2 +- .../components/UpdateAllComponents/index.tsx | 26 +- .../flowBuildingComponent/index.tsx | 12 +- .../components/bundleItems/index.tsx | 4 +- .../components/categoryDisclouse/index.tsx | 4 +- .../components/categoryGroup/index.tsx | 4 +- .../components/searchInput/index.tsx | 2 +- .../components/sidebarBundles/index.tsx | 4 +- .../sidebarDraggableComponent/index.tsx | 10 +- .../components/sidebarHeader/index.tsx | 12 +- .../components/sidebarItemsList/index.tsx | 4 +- .../helpers/apply-beta-filter.ts | 2 +- .../helpers/apply-edge-filter.ts | 2 +- .../helpers/apply-legacy-filter.ts | 2 +- .../helpers/combined-results.ts | 4 +- .../helpers/disable-item.ts | 2 +- .../helpers/filtered-data.ts | 2 +- .../helpers/get-disabled-tooltip.ts | 2 +- .../helpers/traditional-search-metadata.ts | 2 +- .../components/flowSidebarComponent/index.tsx | 12 +- .../flowSidebarComponent/types/index.ts | 4 +- .../components/toolbar-button.tsx | 3 +- .../components/toolbar-modals.tsx | 6 +- .../hooks/use-shortcuts.ts | 2 +- .../components/nodeToolbarComponent/index.tsx | 15 +- .../toolbarSelectItem/index.tsx | 2 +- src/frontend/src/pages/FlowPage/index.tsx | 9 +- src/frontend/src/pages/LoginPage/index.tsx | 10 +- .../MainPage/components/dropdown/index.tsx | 2 +- .../MainPage/components/header/index.tsx | 4 +- .../components/inputSearchComponent/index.tsx | 2 +- .../pages/MainPage/components/list/index.tsx | 6 +- .../src/pages/MainPage/entities/index.tsx | 2 +- .../MainPage/hooks/use-handle-duplicate.ts | 4 +- .../pages/MainPage/hooks/use-on-file-drop.ts | 4 +- .../src/pages/MainPage/pages/empty-page.tsx | 6 +- .../MainPage/pages/enchanced-beam-effect.tsx | 2 +- .../components/dragWrapComponent/index.tsx | 2 +- .../pages/MainPage/pages/filesPage/index.tsx | 14 +- .../homePage/components/McpServerTab.tsx | 8 +- .../pages/MainPage/pages/homePage/index.tsx | 4 +- .../src/pages/MainPage/pages/main-page.tsx | 6 +- .../MainPage/utils/get-template-style.ts | 2 +- .../src/pages/MainPage/utils/time-elapse.ts | 2 +- src/frontend/src/pages/Playground/index.tsx | 10 +- src/frontend/src/pages/SettingsPage/index.tsx | 2 +- .../SettingsPage/pages/ApiKeysPage/index.tsx | 6 +- .../hooks/use-preload-images.ts | 2 +- .../profilePictureChooserComponent/index.tsx | 4 +- .../components/ProfilePictureForm/index.tsx | 6 +- .../SettingsPage/pages/GeneralPage/index.tsx | 12 +- .../pages/GlobalVariablesPage/index.tsx | 22 +- .../pages/MCPServersPage/index.tsx | 4 +- .../ShortcutsPage/CellRenderWrapper/index.tsx | 2 +- .../EditShortcutButton/index.tsx | 7 +- .../pages/ShortcutsPage/index.tsx | 4 +- .../components/StoreApiKeyForm.tsx | 1 + .../pages/StoreApiKeyPage/index.tsx | 6 +- src/frontend/src/pages/SignUpPage/index.tsx | 10 +- src/frontend/src/pages/StorePage/index.tsx | 15 +- src/frontend/src/pages/ViewPage/index.tsx | 2 +- src/frontend/src/reportWebVitals.ts | 2 +- .../components/global-variable-modal.tsx | 4 +- .../shared/hooks/use-change-on-unfocus.tsx | 2 +- .../shared/hooks/use-file-size-validator.ts | 1 + src/frontend/src/stores/alertStore.ts | 4 +- src/frontend/src/stores/authStore.ts | 5 +- src/frontend/src/stores/darkStore.ts | 4 +- src/frontend/src/stores/flowStore.ts | 84 +- src/frontend/src/stores/flowsManagerStore.ts | 6 +- src/frontend/src/stores/foldersStore.tsx | 2 +- .../globalVariablesStore/globalVariables.ts | 2 +- .../utils/get-unavailable-fields.tsx | 2 +- src/frontend/src/stores/locationStore.ts | 4 +- src/frontend/src/stores/messagesStore.ts | 2 +- src/frontend/src/stores/shortcuts.ts | 6 +- src/frontend/src/stores/storeStore.ts | 6 +- src/frontend/src/stores/tweaksStore.ts | 11 +- src/frontend/src/stores/typesStore.ts | 7 +- src/frontend/src/stores/utilityStore.ts | 6 +- src/frontend/src/stores/voiceStore.ts | 4 +- src/frontend/src/style/applies.css | 7 +- src/frontend/src/style/classes.css | 13 +- src/frontend/src/types/api/index.ts | 6 +- src/frontend/src/types/chat/index.ts | 2 +- src/frontend/src/types/components/index.ts | 24 +- src/frontend/src/types/contexts/auth.ts | 2 +- src/frontend/src/types/flow/index.ts | 6 +- src/frontend/src/types/messages/index.ts | 2 +- src/frontend/src/types/tabs/index.ts | 12 +- src/frontend/src/types/templates/types.ts | 2 +- .../src/types/utils/reactflowUtils.ts | 4 +- .../src/types/utils/typeCheckingUtils.ts | 2 +- src/frontend/src/types/zustand/alert/index.ts | 2 +- src/frontend/src/types/zustand/auth/index.ts | 2 +- src/frontend/src/types/zustand/flow/index.ts | 12 +- .../src/types/zustand/flowsManager/index.ts | 2 +- .../src/types/zustand/folders/index.ts | 2 +- .../types/zustand/globalVariables/index.ts | 2 +- .../src/types/zustand/messages/index.ts | 2 +- .../src/types/zustand/tweaks/index.ts | 2 +- src/frontend/src/types/zustand/types/index.ts | 2 +- .../src/types/zustand/utility/index.ts | 4 +- src/frontend/src/utils/buildUtils.ts | 30 +- src/frontend/src/utils/layoutUtils.ts | 6 +- src/frontend/src/utils/mcpUtils.ts | 4 +- src/frontend/src/utils/reactflowUtils.ts | 141 +-- src/frontend/src/utils/storeUtils.ts | 10 +- src/frontend/src/utils/stringManipulation.ts | 6 +- src/frontend/src/utils/styleUtils.ts | 8 +- src/frontend/src/utils/utils.ts | 40 +- src/frontend/tailwind.config.mjs | 10 +- .../tests/core/features/freeze-path.spec.ts | 4 +- .../tests/core/features/publish-flow.spec.ts | 2 +- .../core/features/saveComponents.spec.ts | 1 + .../tests/core/features/stop-building.spec.ts | 1 + .../features/user-flow-state-cleanup.spec.ts | 2 +- .../core/features/voice-assistant.spec.ts | 2 +- .../Custom Component Generator.spec.ts | 4 +- .../Financial Report Parser.spec.ts | 4 +- .../integrations/Price Deal Finder.spec.ts | 4 +- .../Travel Planning Agent.spec.ts | 4 +- .../core/integrations/decisionFlow.spec.ts | 5 +- .../regression/generalBugs-shard-9.spec.ts | 1 + .../core/unit/fileUploadComponent.spec.ts | 4 +- .../tests/core/unit/inputComponent.spec.ts | 6 +- .../tests/core/unit/linkComponent.spec.ts | 4 +- .../core/unit/promptModalComponent.spec.ts | 4 +- .../core/unit/queryInputComponent.spec.ts | 6 +- .../tests/core/unit/sliderComponent.spec.ts | 6 +- .../tests/core/unit/tabComponent.spec.ts | 4 +- .../core/unit/textAreaModalComponent.spec.ts | 2 +- .../tests/core/unit/webhookComponent.spec.ts | 4 +- .../extended/features/auto-save-off.spec.ts | 4 +- .../tests/extended/features/autoLogin.spec.ts | 1 + .../extended/features/deleteFlows.spec.ts | 4 +- .../extended/features/dragAndDrop.spec.ts | 1 + .../extended/features/edit-flow-name.spec.ts | 9 +- .../extended/features/edit-tools.spec.ts | 1 + .../tests/extended/features/lock-flow.spec.ts | 6 +- .../extended/features/loop-component.spec.ts | 2 +- .../extended/features/mcp-server-tab.spec.ts | 18 +- .../extended/features/mcp-server.spec.ts | 8 +- .../features/outdated-actions.spec.ts | 8 +- .../features/starter-projects.spec.ts | 2 +- .../extended/features/store-shard-3.spec.ts | 8 +- .../chatInputOutputUser-shard-1.spec.ts | 2 +- ...al-bugs-component-as-tool-shortcut.spec.ts | 4 +- .../general-bugs-minimize-state-error.spec.ts | 2 +- .../general-bugs-save-changes-on-node.spec.ts | 2 +- .../regression/generalBugs-shard-7.spec.ts | 1 + src/frontend/tests/globalTeardown.ts | 8 +- .../tests/utils/add-custom-component.ts | 2 +- .../add-flow-to-test-on-empty-langflow.ts | 2 +- .../tests/utils/add-legacy-components.ts | 2 +- src/frontend/tests/utils/add-new-api-keys.ts | 2 +- .../tests/utils/add-new-user-and-loggin.ts | 2 +- .../tests/utils/adjust-screen-view.ts | 2 +- .../tests/utils/await-bootstrap-test.ts | 4 +- .../tests/utils/build-data-transfer.ts | 2 +- .../evaluate-input-react-state-changes.ts | 2 +- .../tests/utils/extract-and-clean-code.ts | 4 +- .../tests/utils/get-all-response-message.ts | 2 +- src/frontend/tests/utils/initialGPTsetup.ts | 2 +- src/frontend/tests/utils/login-langflow.ts | 2 +- .../tests/utils/remove-old-api-keys.ts | 2 +- src/frontend/tests/utils/rename-flow.ts | 2 +- src/frontend/tests/utils/run-chat-output.ts | 4 +- src/frontend/tests/utils/select-gpt-model.ts | 2 +- .../tests/utils/simulate-drag-and-drop.ts | 2 +- .../tests/utils/update-old-components.ts | 2 +- src/frontend/tests/utils/upload-file.ts | 5 +- .../tests/utils/wait-for-open-modal.ts | 2 +- .../tests/utils/withEventDeliveryModes.ts | 2 +- src/frontend/tests/utils/zoom-out.ts | 2 +- 680 files changed, 2232 insertions(+), 2671 deletions(-) delete mode 100644 eslint.config.js create mode 100644 src/frontend/.biomeignore delete mode 100644 src/frontend/.eslintrc.json create mode 100644 src/frontend/.husky/pre-commit delete mode 100644 src/frontend/.prettierignore delete mode 100644 src/frontend/.prettierrc.mjs create mode 100644 src/frontend/biome.json delete mode 100644 src/frontend/src/boilerplate/raw-component/index.tsx diff --git a/.github/workflows/js_autofix.yml b/.github/workflows/js_autofix.yml index ab18e01df..4292e4e02 100644 --- a/.github/workflows/js_autofix.yml +++ b/.github/workflows/js_autofix.yml @@ -37,7 +37,7 @@ jobs: cd src/frontend npm ci if: ${{ steps.setup-node.outputs.cache-hit != 'true' }} - - name: Run Prettier + - name: Run Biome run: | cd src/frontend npm run format diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 892347312..7ddcfd173 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -15,7 +15,7 @@ env: jobs: run-linters: - name: Run Prettier + name: Run Biome runs-on: ubuntu-latest permissions: contents: write @@ -47,7 +47,7 @@ jobs: npm install if: ${{ steps.setup-node.outputs.cache-hit != 'true' }} - - name: Run Prettier + - name: Run Biome run: | cd src/frontend - npm run check-format + npx @biomejs/biome check --changed diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf1c05b75..4857d7977 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,3 +25,11 @@ repos: language: system types_or: [python, pyi] args: [--config, pyproject.toml] + - repo: local + hooks: + - id: local-biome-check + name: biome check + entry: bash -c 'cd src/frontend && npx @biomejs/biome check --write --files-ignore-unknown=true --no-errors-on-unmatched' + language: system + types: [text] + files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$" diff --git a/Makefile b/Makefile index fe556f9d7..1ed5f764f 100644 --- a/Makefile +++ b/Makefile @@ -177,6 +177,14 @@ format_backend: ## backend code formatters format: format_backend format_frontend ## run code formatters +format_frontend: ## run biome check and format on frontend code + @echo 'Running Biome check and format on frontend...' + @cd src/frontend && npx @biomejs/biome check --write + +format_frontend_check: ## run biome check without formatting + @echo 'Running Biome check on frontend...' + @cd src/frontend && npx @biomejs/biome check + unsafe_fix: @uv run ruff check . --fix --unsafe-fixes diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/frontend/.biomeignore b/src/frontend/.biomeignore new file mode 100644 index 000000000..a5c2218f3 --- /dev/null +++ b/src/frontend/.biomeignore @@ -0,0 +1,13 @@ +# Build outputs +build/ +dist/ + +# Dependencies +node_modules/ + +# Test outputs +coverage/ +test-results/ +playwright-report/ +blob-report/ +playwright/.cache/ \ No newline at end of file diff --git a/src/frontend/.eslintrc.json b/src/frontend/.eslintrc.json deleted file mode 100644 index 1b09f8c18..000000000 --- a/src/frontend/.eslintrc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "extends": [ - "eslint:recommended", - "plugin:react/recommended", - "plugin:prettier/recommended" - ], - "plugins": ["react", "import-helpers", "prettier"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": ["./tsconfig.node.json", "./tsconfig.json"], - "extraFileExtensions:": [".mdx"], - "extensions:": [".mdx"] - }, - "env": { - "browser": true, - "es2021": true - }, - "settings": { - "react": { - "version": "detect" - } - }, - "rules": { - "no-console": "warn", - "no-self-assign": "warn", - "no-self-compare": "warn", - "complexity": ["error", { "max": 15 }], - "indent": ["error", 2, { "SwitchCase": 1 }], - "no-dupe-keys": "error", - "no-invalid-regexp": "error", - "no-undef": "error", - "no-return-assign": "error", - "no-redeclare": "error", - "no-empty": "error", - "no-await-in-loop": "error", - "react/react-in-jsx-scope": 0, - "node/exports-style": ["error", "module.exports"], - "node/file-extension-in-import": ["error", "always"], - "node/prefer-global/buffer": ["error", "always"], - "node/prefer-global/console": ["error", "always"], - "node/prefer-global/process": ["error", "always"], - "node/prefer-global/url-search-params": ["error", "always"], - "node/prefer-global/url": ["error", "always"], - "node/prefer-promises/dns": "error", - "node/prefer-promises/fs": "error" - } -} diff --git a/src/frontend/.husky/pre-commit b/src/frontend/.husky/pre-commit new file mode 100644 index 000000000..72c4429bc --- /dev/null +++ b/src/frontend/.husky/pre-commit @@ -0,0 +1 @@ +npm test diff --git a/src/frontend/.prettierignore b/src/frontend/.prettierignore deleted file mode 100644 index a007feab0..000000000 --- a/src/frontend/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -build/* diff --git a/src/frontend/.prettierrc.mjs b/src/frontend/.prettierrc.mjs deleted file mode 100644 index c7636f876..000000000 --- a/src/frontend/.prettierrc.mjs +++ /dev/null @@ -1,7 +0,0 @@ -const config = { - plugins: ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"], - tailwindConfig: "./tailwind.config.mjs", - organizeImportsSkipDestructiveCodeActions: true, -}; - -export default config; diff --git a/src/frontend/biome.json b/src/frontend/biome.json new file mode 100644 index 000000000..ff59e3d25 --- /dev/null +++ b/src/frontend/biome.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.1.1/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true, + "defaultBranch": "main" + }, + "files": { "ignoreUnknown": false }, + "formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2 }, + "linter": { + "domains": { + "test": "recommended" + }, + "enabled": true, + "rules": { + "recommended": false, + "a11y": { "noStaticElementInteractions": "warn" }, + "complexity": { + "noAdjacentSpacesInRegex": "error", + "noExtraBooleanCast": "error", + "noUselessEscapeInRegex": "error" + }, + "correctness": { + "noConstAssign": "error", + "noConstantCondition": "error", + "noEmptyCharacterClassInRegex": "error", + "noEmptyPattern": "warn", + "noGlobalObjectCalls": "error", + "noInvalidBuiltinInstantiation": "error", + "noInvalidConstructorSuper": "error", + "noNonoctalDecimalEscape": "error", + "noPrecisionLoss": "error", + "noSelfAssign": "warn", + "noSetterReturn": "error", + "noSwitchDeclarations": "error", + "noUnreachable": "error", + "noUnreachableSuper": "error", + "noUnsafeFinally": "error", + "noUnusedLabels": "error", + "noUnusedPrivateClassMembers": "error", + "noUnusedVariables": "warn", + "useExhaustiveDependencies": "off", + "useIsNan": "error", + "useValidForDirection": "error", + "useValidTypeof": "error", + "useYield": "error" + }, + "suspicious": { + "noAssignInExpressions": "error", + "noAsyncPromiseExecutor": "warn", + "noCatchAssign": "error", + "noClassAssign": "error", + "noCompareNegZero": "error", + "noConsole": { + "level": "warn", + "options": { + "allow": ["error", "warn"] + } + }, + "noControlCharactersInRegex": "error", + "noDebugger": "error", + "noDuplicateCase": "error", + "noDuplicateClassMembers": "error", + "noDuplicateElseIf": "error", + "noDuplicateObjectKeys": "error", + "noDuplicateParameters": "error", + "noFallthroughSwitchClause": "error", + "noFunctionAssign": "error", + "noGlobalAssign": "error", + "noImportAssign": "error", + "noIrregularWhitespace": "error", + "noMisleadingCharacterClass": "error", + "noPrototypeBuiltins": "error", + "noRedeclare": "error", + "noSelfCompare": "warn", + "noShadowRestrictedNames": "error", + "noSparseArray": "error", + "noUnsafeNegation": "error", + "noWith": "error", + "useGetterReturn": "error" + } + } + }, + "javascript": { "formatter": { "quoteStyle": "double" } }, + "assist": { + "enabled": true, + "actions": { "source": { "organizeImports": "on" } } + } +} diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index d4b58fdb1..9a424fe19 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -95,6 +95,7 @@ "zustand": "^4.5.2" }, "devDependencies": { + "@biomejs/biome": "2.1.1", "@jest/types": "^30.0.1", "@playwright/test": "^1.52.0", "@swc/cli": "^0.5.2", @@ -112,15 +113,10 @@ "@types/uuid": "^9.0.8", "@vitejs/plugin-react-swc": "^3.7.0", "autoprefixer": "^10.4.19", - "eslint": "^9.5.0", "jest": "^30.0.3", "jest-environment-jsdom": "^30.0.2", "jest-junit": "^16.0.0", "postcss": "^8.4.38", - "prettier": "^3.3.2", - "prettier-plugin-organize-imports": "^3.2.4", - "prettier-plugin-tailwindcss": "^0.6.5", - "simple-git-hooks": "^2.11.1", "tailwindcss": "^3.4.4", "tailwindcss-dotted-background": "^1.1.0", "ts-jest": "^29.4.0", @@ -702,6 +698,169 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@biomejs/biome": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.1.tgz", + "integrity": "sha512-HFGYkxG714KzG+8tvtXCJ1t1qXQMzgWzfvQaUjxN6UeKv+KvMEuliInnbZLJm6DXFXwqVi6446EGI0sGBLIYng==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.1.1", + "@biomejs/cli-darwin-x64": "2.1.1", + "@biomejs/cli-linux-arm64": "2.1.1", + "@biomejs/cli-linux-arm64-musl": "2.1.1", + "@biomejs/cli-linux-x64": "2.1.1", + "@biomejs/cli-linux-x64-musl": "2.1.1", + "@biomejs/cli-win32-arm64": "2.1.1", + "@biomejs/cli-win32-x64": "2.1.1" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.1.tgz", + "integrity": "sha512-2Muinu5ok4tWxq4nu5l19el48cwCY/vzvI7Vjbkf3CYIQkjxZLyj0Ad37Jv2OtlXYaLvv+Sfu1hFeXt/JwRRXQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.1.tgz", + "integrity": "sha512-cC8HM5lrgKQXLAK+6Iz2FrYW5A62pAAX6KAnRlEyLb+Q3+Kr6ur/sSuoIacqlp1yvmjHJqjYfZjPvHWnqxoEIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.1.tgz", + "integrity": "sha512-tw4BEbhAUkWPe4WBr6IX04DJo+2jz5qpPzpW/SWvqMjb9QuHY8+J0M23V8EPY/zWU4IG8Ui0XESapR1CB49Q7g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.1.tgz", + "integrity": "sha512-/7FBLnTswu4jgV9ttI3AMIdDGqVEPIZd8I5u2D4tfCoj8rl9dnjrEQbAIDlWhUXdyWlFSz8JypH3swU9h9P+2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.1.tgz", + "integrity": "sha512-3WJ1GKjU7NzZb6RTbwLB59v9cTIlzjbiFLDB0z4376TkDqoNYilJaC37IomCr/aXwuU8QKkrYoHrgpSq5ffJ4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.1.tgz", + "integrity": "sha512-kUu+loNI3OCD2c12cUt7M5yaaSjDnGIksZwKnueubX6c/HWUyi/0mPbTBHR49Me3F0KKjWiKM+ZOjsmC+lUt9g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.1.tgz", + "integrity": "sha512-vEHK0v0oW+E6RUWLoxb2isI3rZo57OX9ZNyyGH701fZPj6Il0Rn1f5DMNyCmyflMwTnIQstEbs7n2BxYSqQx4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.1.tgz", + "integrity": "sha512-i2PKdn70kY++KEF/zkQFvQfX1e8SkA8hq4BgC+yE9dZqyLzB/XStY2MvwI3qswlRgnGpgncgqe0QYKVS1blksg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@chakra-ui/anatomy": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@chakra-ui/anatomy/-/anatomy-2.2.2.tgz", @@ -1816,208 +1975,6 @@ "node": ">=18" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", - "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", - "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", - "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", - "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.14.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@floating-ui/core": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.1.tgz", @@ -2145,72 +2102,6 @@ "react-hook-form": "^7.0.0" } }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -7449,13 +7340,6 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/katex": { "version": "0.16.7", "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", @@ -8132,16 +8016,6 @@ "acorn-walk": "^8.0.2" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/acorn-walk": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", @@ -8195,23 +8069,6 @@ "node": ">= 6.0.0" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/ansi-align": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", @@ -9879,13 +9736,6 @@ "node": ">=4.0.0" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -10378,6 +10228,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -10416,121 +10267,6 @@ "node": ">=0.10.0" } }, - "node_modules/eslint": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", - "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", - "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.14.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.28.0", - "@eslint/plugin-kit": "^0.3.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", - "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/esm": { "version": "3.2.25", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", @@ -10546,24 +10282,6 @@ "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", "license": "MIT" }, - "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.14.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -10577,19 +10295,6 @@ "node": ">=4" } }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/esrap": { "version": "1.4.7", "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.4.7.tgz", @@ -10599,19 +10304,6 @@ "@jridgewell/sourcemap-codec": "^1.4.15" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -10799,13 +10491,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, "node_modules/fast-uri": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", @@ -10883,19 +10568,6 @@ "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==", "license": "MIT" }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/file-saver": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", @@ -11020,23 +10692,6 @@ "license": "MIT", "peer": true }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/find-versions": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-5.1.0.tgz", @@ -11053,27 +10708,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" - }, "node_modules/follow-redirects": { "version": "1.15.9", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", @@ -12031,16 +11665,6 @@ ], "license": "BSD-3-Clause" }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/immutable-json-patch": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/immutable-json-patch/-/immutable-json-patch-6.0.1.tgz", @@ -14578,26 +14202,12 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "license": "MIT" }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, "node_modules/json-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/json-source-map/-/json-source-map-0.6.1.tgz", "integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==", "license": "MIT" }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -14691,20 +14301,6 @@ "node": ">=6" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", @@ -14729,22 +14325,6 @@ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", "license": "MIT" }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -17076,24 +16656,6 @@ "url": "https://opencollective.com/openseadragon" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/p-cancelable": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", @@ -17129,22 +16691,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -17701,132 +17247,6 @@ "node": ">=10" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-plugin-organize-imports": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz", - "integrity": "sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@volar/vue-language-plugin-pug": "^1.0.4", - "@volar/vue-typescript": "^1.0.4", - "prettier": ">=2.0", - "typescript": ">=2.9" - }, - "peerDependenciesMeta": { - "@volar/vue-language-plugin-pug": { - "optional": true - }, - "@volar/vue-typescript": { - "optional": true - } - } - }, - "node_modules/prettier-plugin-tailwindcss": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.12.tgz", - "integrity": "sha512-OuTQKoqNwV7RnxTPwXWzOFXy6Jc4z8oeRZYGuMpRyG3WbuR3jjXdQFK8qFBMBx8UHWdHrddARz2fgUenild6aw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.21.3" - }, - "peerDependencies": { - "@ianvs/prettier-plugin-sort-imports": "*", - "@prettier/plugin-pug": "*", - "@shopify/prettier-plugin-liquid": "*", - "@trivago/prettier-plugin-sort-imports": "*", - "@zackad/prettier-plugin-twig": "*", - "prettier": "^3.0", - "prettier-plugin-astro": "*", - "prettier-plugin-css-order": "*", - "prettier-plugin-import-sort": "*", - "prettier-plugin-jsdoc": "*", - "prettier-plugin-marko": "*", - "prettier-plugin-multiline-arrays": "*", - "prettier-plugin-organize-attributes": "*", - "prettier-plugin-organize-imports": "*", - "prettier-plugin-sort-imports": "*", - "prettier-plugin-style-order": "*", - "prettier-plugin-svelte": "*" - }, - "peerDependenciesMeta": { - "@ianvs/prettier-plugin-sort-imports": { - "optional": true - }, - "@prettier/plugin-pug": { - "optional": true - }, - "@shopify/prettier-plugin-liquid": { - "optional": true - }, - "@trivago/prettier-plugin-sort-imports": { - "optional": true - }, - "@zackad/prettier-plugin-twig": { - "optional": true - }, - "prettier-plugin-astro": { - "optional": true - }, - "prettier-plugin-css-order": { - "optional": true - }, - "prettier-plugin-import-sort": { - "optional": true - }, - "prettier-plugin-jsdoc": { - "optional": true - }, - "prettier-plugin-marko": { - "optional": true - }, - "prettier-plugin-multiline-arrays": { - "optional": true - }, - "prettier-plugin-organize-attributes": { - "optional": true - }, - "prettier-plugin-organize-imports": { - "optional": true - }, - "prettier-plugin-sort-imports": { - "optional": true - }, - "prettier-plugin-style-order": { - "optional": true - }, - "prettier-plugin-svelte": { - "optional": true - } - } - }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", @@ -19472,17 +18892,6 @@ "simple-concat": "^1.0.0" } }, - "node_modules/simple-git-hooks": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/simple-git-hooks/-/simple-git-hooks-2.13.0.tgz", - "integrity": "sha512-N+goiLxlkHJlyaYEglFypzVNMaNplPAk5syu0+OPp/Bk6dwVoXF6FfOw2vO0Dp+JHsBaI+w6cm8TnFl2Hw6tDA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "simple-git-hooks": "cli.js" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -20624,19 +20033,6 @@ "node": "*" } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -21067,16 +20463,6 @@ "node": ">=14" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -22041,16 +21427,6 @@ "node": ">=8" } }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", diff --git a/src/frontend/package.json b/src/frontend/package.json index 6a99b7b6b..84f435556 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -96,16 +96,10 @@ "test": "jest", "test:watch": "jest --watch", "serve": "vite preview", - "format": "npx prettier --write \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore", - "check-format": "npx prettier --check \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore", + "format": "npx @biomejs/biome check --write", + "check-format": "npx @biomejs/biome check", "type-check": "tsc --noEmit --pretty --project tsconfig.json && vite" }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, "browserslist": { "production": [ ">0.2%", @@ -120,6 +114,7 @@ }, "proxy": "http://localhost:7860", "devDependencies": { + "@biomejs/biome": "2.1.1", "@jest/types": "^30.0.1", "@playwright/test": "^1.52.0", "@swc/cli": "^0.5.2", @@ -137,15 +132,10 @@ "@types/uuid": "^9.0.8", "@vitejs/plugin-react-swc": "^3.7.0", "autoprefixer": "^10.4.19", - "eslint": "^9.5.0", "jest": "^30.0.3", "jest-environment-jsdom": "^30.0.2", "jest-junit": "^16.0.0", "postcss": "^8.4.38", - "prettier": "^3.3.2", - "prettier-plugin-organize-imports": "^3.2.4", - "prettier-plugin-tailwindcss": "^0.6.5", - "simple-git-hooks": "^2.11.1", "tailwindcss": "^3.4.4", "tailwindcss-dotted-background": "^1.1.0", "ts-jest": "^29.4.0", diff --git a/src/frontend/playwright.config.ts b/src/frontend/playwright.config.ts index eb285a140..0ffd8d777 100644 --- a/src/frontend/playwright.config.ts +++ b/src/frontend/playwright.config.ts @@ -2,6 +2,7 @@ import { defineConfig, devices } from "@playwright/test"; import * as dotenv from "dotenv"; import path from "path"; import { PORT } from "./src/customization/config-constants"; + dotenv.config(); dotenv.config({ path: path.resolve(__dirname, "../../.env") }); diff --git a/src/frontend/src/App.css b/src/frontend/src/App.css index 167ee66ba..3587b406f 100644 --- a/src/frontend/src/App.css +++ b/src/frontend/src/App.css @@ -112,12 +112,7 @@ body { } .custom-hover:hover { - background-color: rgba( - 99, - 102, - 241, - 0.1 - ); /* Medium indigo color with 20% opacity */ + background-color: rgba(99, 102, 241, 0.1); /* Medium indigo color with 20% opacity */ } /* This CSS is to not apply the border for the column having 'no-border' class */ diff --git a/src/frontend/src/CustomEdges/index.tsx b/src/frontend/src/CustomEdges/index.tsx index 32866d8bd..edbb0f6ad 100644 --- a/src/frontend/src/CustomEdges/index.tsx +++ b/src/frontend/src/CustomEdges/index.tsx @@ -1,6 +1,11 @@ +import { + BaseEdge, + type EdgeProps, + getBezierPath, + Position, +} from "@xyflow/react"; import useFlowStore from "@/stores/flowStore"; import { scapeJSONParse } from "@/utils/reactflowUtils"; -import { BaseEdge, EdgeProps, getBezierPath, Position } from "@xyflow/react"; export function DefaultEdge({ sourceHandleId, @@ -56,16 +61,7 @@ export function DefaultEdge({ targetY: targetYNew, }); - const { - animated, - selectable, - deletable, - sourcePosition, - targetPosition, - pathOptions, - selected, - ...domSafeProps - } = props; + const { animated, selectable, deletable, selected, ...domSafeProps } = props; return ( ( { setNode(data.id, (oldNode) => { if (oldNode.type !== "genericNode") return oldNode; - let newNode = cloneDeep(oldNode); + const newNode = cloneDeep(oldNode); newNode.data = { ...newNode.data, node: { diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx index 060b7f332..296356c2d 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx @@ -1,3 +1,10 @@ +import { useEffect, useRef, useState } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; +import { getSpecificClassFromBuildStatus } from "@/CustomNodes/helpers/get-class-from-build-status"; +import { mutateTemplate } from "@/CustomNodes/helpers/mutate-template"; +import useIconStatus from "@/CustomNodes/hooks/use-icons-status"; +import useUpdateValidationStatus from "@/CustomNodes/hooks/use-update-validation-status"; +import useValidationStatusString from "@/CustomNodes/hooks/use-validation-status-string"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { Button } from "@/components/ui/button"; import { ICON_STROKE_WIDTH } from "@/constants/constants"; @@ -5,25 +12,19 @@ import { BuildStatus } from "@/constants/enums"; import { usePostTemplateValue } from "@/controllers/API/queries/nodes/use-post-template-value"; import { track } from "@/customization/utils/analytics"; import { customOpenNewTab } from "@/customization/utils/custom-open-new-tab"; -import { getSpecificClassFromBuildStatus } from "@/CustomNodes/helpers/get-class-from-build-status"; -import { mutateTemplate } from "@/CustomNodes/helpers/mutate-template"; -import useIconStatus from "@/CustomNodes/hooks/use-icons-status"; -import useUpdateValidationStatus from "@/CustomNodes/hooks/use-update-validation-status"; -import useValidationStatusString from "@/CustomNodes/hooks/use-validation-status-string"; import useAlertStore from "@/stores/alertStore"; import { useDarkStore } from "@/stores/darkStore"; import useFlowStore from "@/stores/flowStore"; import { useShortcutsStore } from "@/stores/shortcuts"; import { useUtilityStore } from "@/stores/utilityStore"; -import { VertexBuildTypeAPI } from "@/types/api"; -import { NodeDataType } from "@/types/flow"; +import type { VertexBuildTypeAPI } from "@/types/api"; +import type { NodeDataType } from "@/types/flow"; import { findLastNode } from "@/utils/reactflowUtils"; import { classNames, cn } from "@/utils/utils"; -import { useEffect, useRef, useState } from "react"; -import { useHotkeys } from "react-hotkeys-hook"; import IconComponent from "../../../../components/common/genericIconComponent"; import BuildStatusDisplay from "./components/build-status-display"; import { normalizeTimeString } from "./utils/format-run-time"; + const POLLING_TIMEOUT = 21000; const POLLING_INTERVAL = 3000; @@ -188,12 +189,12 @@ export default function NodeStatus({ ); const getBaseBorderClass = (selected) => { - let className = + const className = selected && !isBuilding ? " border ring-[0.75px] ring-muted-foreground border-muted-foreground hover:shadow-node" : "border ring-[0.5px] hover:shadow-node ring-border"; - let frozenClass = selected ? "border-ring-frozen" : "border-frozen"; - let updateClass = + const frozenClass = selected ? "border-ring-frozen" : "border-frozen"; + const updateClass = isOutdated && !isUserEdited && !dismissAll && isBreakingChange ? "border-warning" : ""; diff --git a/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx index 3bc98ab02..15a180439 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx @@ -1,3 +1,4 @@ +import { useRef } from "react"; import { ForwardedIconComponent } from "@/components/common/genericIconComponent"; import { Button } from "@/components/ui/button"; import { @@ -6,16 +7,14 @@ import { CommandItem, CommandList, } from "@/components/ui/command"; - import { Popover, PopoverContentWithoutPortal, PopoverTrigger, } from "@/components/ui/popover"; import useFlowStore from "@/stores/flowStore"; -import { useRef } from "react"; import ShadTooltip from "../../../../components/common/shadTooltipComponent"; -import { outputComponentType } from "../../../../types/components"; +import type { outputComponentType } from "../../../../types/components"; import { cn } from "../../../../utils/utils"; export default function OutputComponent({ diff --git a/src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx index 72e718888..d21972216 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx @@ -1,9 +1,9 @@ +import { useMemo } from "react"; import { getNodeInputColors } from "@/CustomNodes/helpers/get-node-input-colors"; import { getNodeInputColorsName } from "@/CustomNodes/helpers/get-node-input-colors-name"; import { sortToolModeFields } from "@/CustomNodes/helpers/sort-tool-mode-field"; import getFieldTitle from "@/CustomNodes/utils/get-field-title"; import { scapedJSONStringfy } from "@/utils/reactflowUtils"; -import { useMemo } from "react"; import NodeInputField from "../NodeInputField"; const RenderInputParameters = ({ diff --git a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx index 23463a500..ce375a7bc 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx @@ -1,9 +1,9 @@ +import { type Connection, Handle, Position } from "@xyflow/react"; +import { memo, useCallback, useEffect, useMemo, useState } from "react"; +import { useShallow } from "zustand/react/shallow"; import { useDarkStore } from "@/stores/darkStore"; import useFlowStore from "@/stores/flowStore"; import { nodeColorsName } from "@/utils/styleUtils"; -import { Connection, Handle, Position } from "@xyflow/react"; -import { memo, useCallback, useEffect, useMemo, useState } from "react"; -import { useShallow } from "zustand/react/shallow"; import ShadTooltip from "../../../../components/common/shadTooltipComponent"; import { isValidConnection, diff --git a/src/frontend/src/CustomNodes/GenericNode/components/nodeIcon/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/nodeIcon/index.tsx index e0343b786..b21231bee 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/nodeIcon/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/nodeIcon/index.tsx @@ -1,10 +1,9 @@ -import { useTypesStore } from "@/stores/typesStore"; -import { iconExists, nodeColors } from "@/utils/styleUtils"; import emojiRegex from "emoji-regex"; import { useEffect, useState } from "react"; - -import { ICON_STROKE_WIDTH } from "@/constants/constants"; import { checkLucideIcons } from "@/CustomNodes/helpers/check-lucide-icons"; +import { ICON_STROKE_WIDTH } from "@/constants/constants"; +import { useTypesStore } from "@/stores/typesStore"; +import { iconExists, nodeColors } from "@/utils/styleUtils"; import IconComponent from "../../../../components/common/genericIconComponent"; export function NodeIcon({ diff --git a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx index d070e0bf9..119567b88 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx @@ -1,7 +1,7 @@ +import { useMemo } from "react"; import JsonOutputViewComponent from "@/components/core/jsonOutputComponent/json-output-view"; import { MAX_TEXT_LENGTH } from "@/constants/constants"; -import { LogsLogType, OutputLogType } from "@/types/api"; -import { useMemo } from "react"; +import type { LogsLogType, OutputLogType } from "@/types/api"; import ForwardedIconComponent from "../../../../../../components/common/genericIconComponent"; import DataOutputComponent from "../../../../../../components/core/dataOutputComponent"; import { @@ -13,6 +13,7 @@ import { Case } from "../../../../../../shared/components/caseComponent"; import TextOutputView from "../../../../../../shared/components/textOutputView"; import useFlowStore from "../../../../../../stores/flowStore"; import ErrorOutput from "./components"; + // Define the props type interface SwitchOutputViewProps { nodeId: string; @@ -31,7 +32,7 @@ const SwitchOutputView: React.FC = ({ (flowPool[nodeId]?.length ?? 1) - 1 ]; - let results: OutputLogType | LogsLogType = + const results: OutputLogType | LogsLogType = (type === "Outputs" ? flowPoolNode?.data?.outputs?.[outputName] : flowPoolNode?.data?.logs?.[outputName]) ?? {}; diff --git a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx index 601a7f4c0..67439b280 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/outputModal/index.tsx @@ -1,5 +1,5 @@ -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { useState } from "react"; +import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import BaseModal from "../../../../modals/baseModal"; import SwitchOutputView from "./components/switchOutputView"; diff --git a/src/frontend/src/CustomNodes/GenericNode/hooks/use-get-build-status.ts b/src/frontend/src/CustomNodes/GenericNode/hooks/use-get-build-status.ts index ab52e9228..d0e3ff8ab 100644 --- a/src/frontend/src/CustomNodes/GenericNode/hooks/use-get-build-status.ts +++ b/src/frontend/src/CustomNodes/GenericNode/hooks/use-get-build-status.ts @@ -1,6 +1,6 @@ import { BuildStatus } from "@/constants/enums"; import useFlowStore from "@/stores/flowStore"; -import { NodeDataType } from "@/types/flow"; +import type { NodeDataType } from "@/types/flow"; export const useBuildStatus = (data: NodeDataType, nodeId: string) => { return useFlowStore((state) => { diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index b48f6a3b2..b2eb1eeed 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -1,15 +1,15 @@ +import { useUpdateNodeInternals } from "@xyflow/react"; +import { cloneDeep } from "lodash"; +import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; +import { useShallow } from "zustand/react/shallow"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { usePostValidateComponentCode } from "@/controllers/API/queries/nodes/use-post-validate-component-code"; import { CustomNodeStatus } from "@/customization/components/custom-NodeStatus"; import UpdateComponentModal from "@/modals/updateComponentModal"; import { useAlternate } from "@/shared/hooks/use-alternate"; -import { FlowStoreType } from "@/types/zustand/flow"; -import { useUpdateNodeInternals } from "@xyflow/react"; -import { cloneDeep } from "lodash"; -import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { useHotkeys } from "react-hotkeys-hook"; -import { useShallow } from "zustand/react/shallow"; +import type { FlowStoreType } from "@/types/zustand/flow"; import { Button } from "../../components/ui/button"; import { ICON_STROKE_WIDTH, @@ -23,8 +23,8 @@ import useFlowStore from "../../stores/flowStore"; import useFlowsManagerStore from "../../stores/flowsManagerStore"; import { useShortcutsStore } from "../../stores/shortcuts"; import { useTypesStore } from "../../stores/typesStore"; -import { OutputFieldType, VertexBuildTypeAPI } from "../../types/api"; -import { NodeDataType } from "../../types/flow"; +import type { OutputFieldType, VertexBuildTypeAPI } from "../../types/api"; +import type { NodeDataType } from "../../types/flow"; import { scapedJSONStringfy } from "../../utils/reactflowUtils"; import { classNames, cn } from "../../utils/utils"; import { processNodeAdvancedFields } from "../helpers/process-node-advanced-fields"; @@ -33,8 +33,8 @@ import NodeDescription from "./components/NodeDescription"; import NodeName from "./components/NodeName"; import NodeOutputs from "./components/NodeOutputParameter/NodeOutputs"; import NodeUpdateComponent from "./components/NodeUpdateComponent"; -import RenderInputParameters from "./components/RenderInputParameters"; import { NodeIcon } from "./components/nodeIcon"; +import RenderInputParameters from "./components/RenderInputParameters"; import { useBuildStatus } from "./hooks/use-get-build-status"; const MemoizedRenderInputParameters = memo(RenderInputParameters); @@ -44,7 +44,7 @@ const MemoizedNodeStatus = memo(CustomNodeStatus); const MemoizedNodeDescription = memo(NodeDescription); const MemoizedNodeOutputs = memo(NodeOutputs); -const HiddenOutputsButton = memo( +const _HiddenOutputsButton = memo( ({ showHiddenOutputs, onClick, @@ -77,7 +77,7 @@ function GenericNode({ const [borderColor, setBorderColor] = useState(""); const [loadingUpdate, setLoadingUpdate] = useState(false); const [showHiddenOutputs, setShowHiddenOutputs] = useState(false); - const [validationStatus, setValidationStatus] = + const [_validationStatus, setValidationStatus] = useState(null); const [openUpdateModal, setOpenUpdateModal] = useState(false); diff --git a/src/frontend/src/CustomNodes/NoteNode/NoteToolbarComponent/index.tsx b/src/frontend/src/CustomNodes/NoteNode/NoteToolbarComponent/index.tsx index a255f79e9..9f63793bd 100644 --- a/src/frontend/src/CustomNodes/NoteNode/NoteToolbarComponent/index.tsx +++ b/src/frontend/src/CustomNodes/NoteNode/NoteToolbarComponent/index.tsx @@ -1,3 +1,5 @@ +import { cloneDeep } from "lodash"; +import { memo, useCallback, useMemo } from "react"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { Popover, @@ -11,10 +13,8 @@ import useAlertStore from "@/stores/alertStore"; import useFlowStore from "@/stores/flowStore"; import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useShortcutsStore } from "@/stores/shortcuts"; -import { NoteDataType } from "@/types/flow"; +import type { NoteDataType } from "@/types/flow"; import { classNames, cn } from "@/utils/utils"; -import { cloneDeep } from "lodash"; -import { memo, useCallback, useMemo } from "react"; import IconComponent from "../../../components/common/genericIconComponent"; import { ColorPickerButtons } from "../components/color-picker-buttons"; import { SelectItems } from "../components/select-items"; @@ -65,10 +65,11 @@ const NoteToolbarComponent = memo(function NoteToolbarComponent({ takeSnapshot(); deleteNode(data.id); break; - case "copy": + case "copy": { const node = nodes.filter((node) => node.id === data.id); setLastCopiedSelection({ nodes: cloneDeep(node), edges: [] }); break; + } case "duplicate": paste( { diff --git a/src/frontend/src/CustomNodes/NoteNode/components/color-picker-buttons.tsx b/src/frontend/src/CustomNodes/NoteNode/components/color-picker-buttons.tsx index 5d9ede580..4de8bb9e9 100644 --- a/src/frontend/src/CustomNodes/NoteNode/components/color-picker-buttons.tsx +++ b/src/frontend/src/CustomNodes/NoteNode/components/color-picker-buttons.tsx @@ -1,10 +1,9 @@ +import { memo } from "react"; import { Button } from "@/components/ui/button"; import { COLOR_OPTIONS } from "@/constants/constants"; -import { noteDataType } from "@/types/flow"; +import type { noteDataType } from "@/types/flow"; import { cn } from "@/utils/utils"; -import { memo } from "react"; - export const ColorPickerButtons = memo( ({ bgColor, diff --git a/src/frontend/src/CustomNodes/NoteNode/components/select-items.tsx b/src/frontend/src/CustomNodes/NoteNode/components/select-items.tsx index 2d82bd53e..3e610a5e4 100644 --- a/src/frontend/src/CustomNodes/NoteNode/components/select-items.tsx +++ b/src/frontend/src/CustomNodes/NoteNode/components/select-items.tsx @@ -1,12 +1,11 @@ +import { memo } from "react"; import { ForwardedIconComponent } from "@/components/common/genericIconComponent"; import { SelectContentWithoutPortal, SelectItem, } from "@/components/ui/select-custom"; import ToolbarSelectItem from "@/pages/FlowPage/components/nodeToolbarComponent/toolbarSelectItem"; -import { NoteDataType } from "@/types/flow"; - -import { memo } from "react"; +import type { NoteDataType } from "@/types/flow"; export const SelectItems = memo( ({ shortcuts, data }: { shortcuts: any[]; data: NoteDataType }) => ( diff --git a/src/frontend/src/CustomNodes/NoteNode/index.tsx b/src/frontend/src/CustomNodes/NoteNode/index.tsx index 49abbc42c..8dcef1189 100644 --- a/src/frontend/src/CustomNodes/NoteNode/index.tsx +++ b/src/frontend/src/CustomNodes/NoteNode/index.tsx @@ -1,3 +1,6 @@ +import { NodeResizer } from "@xyflow/react"; +import { debounce } from "lodash"; +import { useMemo, useRef, useState } from "react"; import { COLOR_OPTIONS, NOTE_NODE_MAX_HEIGHT, @@ -7,15 +10,11 @@ import { } from "@/constants/constants"; import { useAlternate } from "@/shared/hooks/use-alternate"; import useFlowStore from "@/stores/flowStore"; -import { NoteDataType } from "@/types/flow"; +import type { NoteDataType } from "@/types/flow"; import { cn } from "@/utils/utils"; -import { NodeResizer } from "@xyflow/react"; -import { debounce } from "lodash"; -import { useEffect, useMemo, useRef, useState } from "react"; import NodeDescription from "../GenericNode/components/NodeDescription"; import NoteToolbarComponent from "./NoteToolbarComponent"; -const NOTE_NODE_PADDING = 25; const CHAR_LIMIT = 2500; const DEFAULT_WIDTH = 324; const DEFAULT_HEIGHT = 324; @@ -32,7 +31,7 @@ function NoteNode({ (key) => key === data.node?.template.backgroundColor, ) ?? Object.keys(COLOR_OPTIONS)[0]; const nodeDiv = useRef(null); - const [resizedNote, setResizedNote] = useState(false); + const [_resizedNote, setResizedNote] = useState(false); const currentFlow = useFlowStore((state) => state.currentFlow); const setNode = useFlowStore((state) => state.setNode); const [isResizing, setIsResizing] = useState(false); diff --git a/src/frontend/src/CustomNodes/helpers/check-code-validity.ts b/src/frontend/src/CustomNodes/helpers/check-code-validity.ts index 895821505..a0019b81d 100644 --- a/src/frontend/src/CustomNodes/helpers/check-code-validity.ts +++ b/src/frontend/src/CustomNodes/helpers/check-code-validity.ts @@ -1,6 +1,6 @@ import { componentsToIgnoreUpdate } from "@/constants/constants"; -import { OutputFieldType } from "@/types/api"; -import { NodeDataType } from "../../types/flow"; +import type { OutputFieldType } from "@/types/api"; +import type { NodeDataType } from "../../types/flow"; // Returns true if the code is outdated (code string changed and not ignored) const codeIsOutdated = ( diff --git a/src/frontend/src/CustomNodes/helpers/check-lucide-icons.ts b/src/frontend/src/CustomNodes/helpers/check-lucide-icons.ts index 293a1f255..f1f3b1b61 100644 --- a/src/frontend/src/CustomNodes/helpers/check-lucide-icons.ts +++ b/src/frontend/src/CustomNodes/helpers/check-lucide-icons.ts @@ -1,6 +1,6 @@ -import { categoryIcons } from "@/utils/styleUtils"; import * as lucideIcons from "lucide-react"; import dynamicIconImports from "lucide-react/dynamicIconImports"; +import { categoryIcons } from "@/utils/styleUtils"; export const checkLucideIcons = (iconName: string): boolean => { return ( diff --git a/src/frontend/src/CustomNodes/helpers/count-handles.ts b/src/frontend/src/CustomNodes/helpers/count-handles.ts index 257c76798..70ba38f5c 100644 --- a/src/frontend/src/CustomNodes/helpers/count-handles.ts +++ b/src/frontend/src/CustomNodes/helpers/count-handles.ts @@ -1,7 +1,7 @@ -import { NodeDataType } from "../../types/flow"; +import type { NodeDataType } from "../../types/flow"; export function countHandlesFn(data: NodeDataType): number { - let count = Object.keys(data.node!.template) + const count = Object.keys(data.node!.template) .filter( (templateField) => templateField.charAt(0) !== "_" && diff --git a/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts b/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts index 48f06cfdc..b905b35d8 100644 --- a/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts +++ b/src/frontend/src/CustomNodes/helpers/get-class-from-build-status.ts @@ -1,12 +1,12 @@ import { BuildStatus } from "../../constants/enums"; -import { VertexBuildTypeAPI } from "../../types/api"; +import type { VertexBuildTypeAPI } from "../../types/api"; export const getSpecificClassFromBuildStatus = ( buildStatus: BuildStatus | undefined, validationStatus: VertexBuildTypeAPI | null, isBuilding: boolean, ): string => { - let isInvalid = validationStatus && !validationStatus.valid; + const isInvalid = validationStatus && !validationStatus.valid; if (BuildStatus.BUILDING === buildStatus) { return "border-foreground border-[1px] ring-[0.75px] ring-foreground"; diff --git a/src/frontend/src/CustomNodes/helpers/get-node-output-colors-name.ts b/src/frontend/src/CustomNodes/helpers/get-node-output-colors-name.ts index d89dd7727..c332afb68 100644 --- a/src/frontend/src/CustomNodes/helpers/get-node-output-colors-name.ts +++ b/src/frontend/src/CustomNodes/helpers/get-node-output-colors-name.ts @@ -1,5 +1,5 @@ -import { OutputFieldType } from "../../types/api"; -import { NodeDataType } from "../../types/flow"; +import type { OutputFieldType } from "../../types/api"; +import type { NodeDataType } from "../../types/flow"; import { nodeColorsName } from "../../utils/styleUtils"; export function getNodeOutputColorsName( diff --git a/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts b/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts index 59e9035d6..caa72c05a 100644 --- a/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts +++ b/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts @@ -1,5 +1,5 @@ -import { OutputFieldType } from "../../types/api"; -import { NodeDataType } from "../../types/flow"; +import type { OutputFieldType } from "../../types/api"; +import type { NodeDataType } from "../../types/flow"; import { nodeColors } from "../../utils/styleUtils"; export function getNodeOutputColors( diff --git a/src/frontend/src/CustomNodes/helpers/mutate-template.ts b/src/frontend/src/CustomNodes/helpers/mutate-template.ts index 220dc97ff..9a2faaf77 100644 --- a/src/frontend/src/CustomNodes/helpers/mutate-template.ts +++ b/src/frontend/src/CustomNodes/helpers/mutate-template.ts @@ -1,11 +1,11 @@ +import type { UseMutationResult } from "@tanstack/react-query"; +import { cloneDeep, debounce } from "lodash"; import { ERROR_UPDATING_COMPONENT, SAVE_DEBOUNCE_TIME, TITLE_ERROR_UPDATING_COMPONENT, } from "@/constants/constants"; -import { APIClassType, ResponseErrorDetailAPI } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; -import { cloneDeep, debounce } from "lodash"; +import type { APIClassType, ResponseErrorDetailAPI } from "@/types/api"; import { updateHiddenOutputs } from "./update-hidden-outputs"; // Map to store debounced functions for each node ID @@ -64,7 +64,7 @@ export const mutateTemplate = async ( setNodeClass(newNode); } catch (e) { if (e instanceof Error && e.message === "Node not found") { - console.log("Node not found"); + console.error("Node not found"); } else { throw e; } diff --git a/src/frontend/src/CustomNodes/helpers/process-node-advanced-fields.ts b/src/frontend/src/CustomNodes/helpers/process-node-advanced-fields.ts index ad64a091b..f0271b6d5 100644 --- a/src/frontend/src/CustomNodes/helpers/process-node-advanced-fields.ts +++ b/src/frontend/src/CustomNodes/helpers/process-node-advanced-fields.ts @@ -1,13 +1,13 @@ -import { APIClassType } from "@/types/api"; -import { EdgeType } from "@/types/flow"; import { cloneDeep } from "lodash"; +import type { APIClassType } from "@/types/api"; +import type { EdgeType } from "@/types/flow"; export function processNodeAdvancedFields( resData: APIClassType, edges: EdgeType[], nodeId: string, ) { - let newNode = cloneDeep(resData); + const newNode = cloneDeep(resData); const relevantEdges = edges.filter( (edge) => edge.source !== nodeId || edge.target !== nodeId, diff --git a/src/frontend/src/CustomNodes/helpers/update-hidden-outputs.ts b/src/frontend/src/CustomNodes/helpers/update-hidden-outputs.ts index d2122f869..47d787ba9 100644 --- a/src/frontend/src/CustomNodes/helpers/update-hidden-outputs.ts +++ b/src/frontend/src/CustomNodes/helpers/update-hidden-outputs.ts @@ -1,4 +1,4 @@ -import { OutputFieldType } from "@/types/api"; +import type { OutputFieldType } from "@/types/api"; export const updateHiddenOutputs = ( outputs: OutputFieldType[], diff --git a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts index 832f306c0..73dcb3b59 100644 --- a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts +++ b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts @@ -1,6 +1,6 @@ -import { APIClassType, ResponseErrorDetailAPI } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; import { useEffect } from "react"; +import type { APIClassType, ResponseErrorDetailAPI } from "@/types/api"; import useAlertStore from "../../stores/alertStore"; import { mutateTemplate } from "../helpers/mutate-template"; diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts index c58b29159..b9dfa5b18 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts @@ -1,14 +1,14 @@ +import { useUpdateNodeInternals } from "@xyflow/react"; +import { cloneDeep, debounce } from "lodash"; +import { useCallback, useMemo, useRef } from "react"; import { DEBOUNCE_FIELD_LIST } from "@/constants/constants"; import { usePostTemplateValue } from "@/controllers/API/queries/nodes/use-post-template-value"; import { track } from "@/customization/utils/analytics"; import useAlertStore from "@/stores/alertStore"; import useFlowStore from "@/stores/flowStore"; import useFlowsManagerStore from "@/stores/flowsManagerStore"; -import { APIClassType, InputFieldType } from "@/types/api"; -import { AllNodeType } from "@/types/flow"; -import { useUpdateNodeInternals } from "@xyflow/react"; -import { cloneDeep, debounce } from "lodash"; -import { useCallback, useMemo, useRef } from "react"; +import type { APIClassType, InputFieldType } from "@/types/api"; +import type { AllNodeType } from "@/types/flow"; import { mutateTemplate } from "../helpers/mutate-template"; const DEBOUNCE_TIME_1_SECOND = 1000; diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.ts b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.ts index 829da1857..1f5eea768 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.ts +++ b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.ts @@ -1,7 +1,7 @@ -import useFlowStore from "@/stores/flowStore"; -import { AllNodeType } from "@/types/flow"; import { useUpdateNodeInternals } from "@xyflow/react"; import { cloneDeep } from "lodash"; +import useFlowStore from "@/stores/flowStore"; +import type { AllNodeType } from "@/types/flow"; const useHandleNodeClass = ( nodeId: string, @@ -15,7 +15,7 @@ const useHandleNodeClass = ( const handleNodeClass = (newNodeClass, type?: string) => { setNode(nodeId, (oldNode) => { - let newNode = cloneDeep(oldNode); + const newNode = cloneDeep(oldNode); newNode.data = { ...newNode.data, diff --git a/src/frontend/src/CustomNodes/hooks/use-merge-refs.ts b/src/frontend/src/CustomNodes/hooks/use-merge-refs.ts index 383fe5c01..607dd1990 100644 --- a/src/frontend/src/CustomNodes/hooks/use-merge-refs.ts +++ b/src/frontend/src/CustomNodes/hooks/use-merge-refs.ts @@ -1,4 +1,4 @@ -import { MutableRefObject, useEffect, useRef } from "react"; +import { type MutableRefObject, useEffect, useRef } from "react"; type Ref = MutableRefObject | ((instance: T | null) => void); diff --git a/src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts b/src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts index 4740897d1..e2862d90a 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts +++ b/src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts @@ -1,7 +1,7 @@ -import { AllNodeType } from "@/types/flow"; import { cloneDeep } from "lodash"; import { useCallback } from "react"; -import { APIClassType, OutputFieldType } from "../../types/api"; +import type { AllNodeType } from "@/types/flow"; +import { type APIClassType, OutputFieldType } from "../../types/api"; import { updateHiddenOutputs } from "../helpers/update-hidden-outputs"; export type UpdateNodesType = { diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.ts b/src/frontend/src/CustomNodes/hooks/use-update-node-code.ts index 2e1a2b74c..b1bc26307 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.ts +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.ts @@ -1,7 +1,7 @@ -import useFlowStore from "@/stores/flowStore"; import { cloneDeep } from "lodash"; // or any other deep cloning library you prefer import { useCallback } from "react"; -import { APIClassType } from "../../types/api"; +import useFlowStore from "@/stores/flowStore"; +import type { APIClassType } from "../../types/api"; import { updateHiddenOutputs } from "../helpers/update-hidden-outputs"; const useUpdateNodeCode = ( @@ -15,7 +15,7 @@ const useUpdateNodeCode = ( const updateNodeCode = useCallback( (newNodeClass: APIClassType, code: string, name: string, type: string) => { setNode(dataId, (oldNode) => { - let newNode = cloneDeep(oldNode); + const newNode = cloneDeep(oldNode); newNode.data = { ...newNode.data, diff --git a/src/frontend/src/CustomNodes/hooks/use-update-validation-status.ts b/src/frontend/src/CustomNodes/hooks/use-update-validation-status.ts index 28005337a..a14543559 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-validation-status.ts +++ b/src/frontend/src/CustomNodes/hooks/use-update-validation-status.ts @@ -1,6 +1,6 @@ -import { VertexBuildTypeAPI } from "@/types/api"; import { useEffect } from "react"; -import { FlowPoolType } from "../../types/zustand/flow"; +import type { VertexBuildTypeAPI } from "@/types/api"; +import type { FlowPoolType } from "../../types/zustand/flow"; const useUpdateValidationStatus = ( dataId: string, diff --git a/src/frontend/src/CustomNodes/hooks/use-validation-status-string.ts b/src/frontend/src/CustomNodes/hooks/use-validation-status-string.ts index 3ad905dc8..e8036e74d 100644 --- a/src/frontend/src/CustomNodes/hooks/use-validation-status-string.ts +++ b/src/frontend/src/CustomNodes/hooks/use-validation-status-string.ts @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { VertexBuildTypeAPI } from "../../types/api"; +import type { VertexBuildTypeAPI } from "../../types/api"; import { isErrorLog } from "../../types/utils/typeCheckingUtils"; const useValidationStatusString = ( diff --git a/src/frontend/src/CustomNodes/utils/get-field-title.tsx b/src/frontend/src/CustomNodes/utils/get-field-title.tsx index eb0df6a21..4ac6c297c 100644 --- a/src/frontend/src/CustomNodes/utils/get-field-title.tsx +++ b/src/frontend/src/CustomNodes/utils/get-field-title.tsx @@ -1,4 +1,4 @@ -import { APITemplateType } from "../../types/api"; +import type { APITemplateType } from "../../types/api"; export default function getFieldTitle( template: APITemplateType, diff --git a/src/frontend/src/CustomNodes/utils/get-handle-id.tsx b/src/frontend/src/CustomNodes/utils/get-handle-id.tsx index 934efe2f2..5117923ff 100644 --- a/src/frontend/src/CustomNodes/utils/get-handle-id.tsx +++ b/src/frontend/src/CustomNodes/utils/get-handle-id.tsx @@ -1,4 +1,4 @@ -import { sourceHandleType, targetHandleType } from "@/types/flow"; +import type { sourceHandleType, targetHandleType } from "@/types/flow"; import { scapedJSONStringfy } from "@/utils/reactflowUtils"; export function getRightHandleId({ diff --git a/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx b/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx index 7d9ca1c7a..ddb55aa6b 100644 --- a/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/components/singleAlertComponent/index.tsx @@ -1,15 +1,15 @@ -import { CustomLink } from "@/customization/components/custom-link"; import { useState } from "react"; import Markdown from "react-markdown"; import remarkGfm from "remark-gfm"; +import { CustomLink } from "@/customization/components/custom-link"; import IconComponent from "../../../../components/common/genericIconComponent"; -import { SingleAlertComponentType } from "../../../../types/alerts"; +import type { SingleAlertComponentType } from "../../../../types/alerts"; export default function SingleAlert({ dropItem, removeAlert, }: SingleAlertComponentType): JSX.Element { - const [show, setShow] = useState(true); + const [_show, setShow] = useState(true); const type = dropItem.type; return type === "error" ? ( diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index a985a7e97..275df200f 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -8,7 +8,7 @@ import { } from "../../components/ui/popover"; import { ZERO_NOTIFICATIONS } from "../../constants/constants"; import useAlertStore from "../../stores/alertStore"; -import { AlertDropdownType } from "../../types/alerts"; +import type { AlertDropdownType } from "../../types/alerts"; import SingleAlert from "./components/singleAlertComponent"; const AlertDropdown = forwardRef( diff --git a/src/frontend/src/alerts/error/index.tsx b/src/frontend/src/alerts/error/index.tsx index c3c2f3925..dfc3e7e56 100644 --- a/src/frontend/src/alerts/error/index.tsx +++ b/src/frontend/src/alerts/error/index.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import Markdown from "react-markdown"; import remarkGfm from "remark-gfm"; import IconComponent from "../../components/common/genericIconComponent"; -import { ErrorAlertType } from "../../types/alerts"; +import type { ErrorAlertType } from "../../types/alerts"; export default function ErrorAlert({ title, diff --git a/src/frontend/src/alerts/notice/index.tsx b/src/frontend/src/alerts/notice/index.tsx index 8f4353280..e024308f4 100644 --- a/src/frontend/src/alerts/notice/index.tsx +++ b/src/frontend/src/alerts/notice/index.tsx @@ -1,10 +1,10 @@ -import { CustomLink } from "@/customization/components/custom-link"; import { Transition } from "@headlessui/react"; import { useEffect, useState } from "react"; import Markdown from "react-markdown"; import remarkGfm from "remark-gfm"; +import { CustomLink } from "@/customization/components/custom-link"; import IconComponent from "../../components/common/genericIconComponent"; -import { NoticeAlertType } from "../../types/alerts"; +import type { NoticeAlertType } from "../../types/alerts"; export default function NoticeAlert({ title, diff --git a/src/frontend/src/alerts/success/index.tsx b/src/frontend/src/alerts/success/index.tsx index 7fa95e9c3..2b6a88dee 100644 --- a/src/frontend/src/alerts/success/index.tsx +++ b/src/frontend/src/alerts/success/index.tsx @@ -1,7 +1,7 @@ import { Transition } from "@headlessui/react"; import { useEffect, useState } from "react"; import IconComponent from "../../components/common/genericIconComponent"; -import { SuccessAlertType } from "../../types/alerts"; +import type { SuccessAlertType } from "../../types/alerts"; export default function SuccessAlert({ title, diff --git a/src/frontend/src/boilerplate/raw-component/index.tsx b/src/frontend/src/boilerplate/raw-component/index.tsx deleted file mode 100644 index 0595c1808..000000000 --- a/src/frontend/src/boilerplate/raw-component/index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -type RawComponentProps = {}; -const RawComponent = ({}: RawComponentProps) => { - return ( - <> -
RawComponent
- - ); -}; -export default RawComponent; diff --git a/src/frontend/src/components/authorization/authAdminGuard/index.tsx b/src/frontend/src/components/authorization/authAdminGuard/index.tsx index 0478e8bf0..8cd9ee783 100644 --- a/src/frontend/src/components/authorization/authAdminGuard/index.tsx +++ b/src/frontend/src/components/authorization/authAdminGuard/index.tsx @@ -1,8 +1,8 @@ +import { useContext } from "react"; import { AuthContext } from "@/contexts/authContext"; import { CustomNavigate } from "@/customization/components/custom-navigate"; import { LoadingPage } from "@/pages/LoadingPage"; import useAuthStore from "@/stores/authStore"; -import { useContext } from "react"; export const ProtectedAdminRoute = ({ children }) => { const { userData } = useContext(AuthContext); diff --git a/src/frontend/src/components/authorization/authGuard/index.tsx b/src/frontend/src/components/authorization/authGuard/index.tsx index aca0cf796..3a6a2b466 100644 --- a/src/frontend/src/components/authorization/authGuard/index.tsx +++ b/src/frontend/src/components/authorization/authGuard/index.tsx @@ -1,3 +1,4 @@ +import { useEffect } from "react"; import { IS_AUTO_LOGIN, LANGFLOW_ACCESS_TOKEN_EXPIRE_SECONDS, @@ -6,7 +7,6 @@ import { import { useRefreshAccessToken } from "@/controllers/API/queries/auth"; import { CustomNavigate } from "@/customization/components/custom-navigate"; import useAuthStore from "@/stores/authStore"; -import { useEffect } from "react"; export const ProtectedRoute = ({ children }) => { const isAuthenticated = useAuthStore((state) => state.isAuthenticated); diff --git a/src/frontend/src/components/common/GradientWrapper/index.tsx b/src/frontend/src/components/common/GradientWrapper/index.tsx index bca3b0022..7f7ab5566 100644 --- a/src/frontend/src/components/common/GradientWrapper/index.tsx +++ b/src/frontend/src/components/common/GradientWrapper/index.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from "react"; +import type { ReactNode } from "react"; export function GradientWrapper({ children }: { children: ReactNode }) { return ( diff --git a/src/frontend/src/components/common/ImageViewer/index.tsx b/src/frontend/src/components/common/ImageViewer/index.tsx index 0923d7633..3513b881c 100644 --- a/src/frontend/src/components/common/ImageViewer/index.tsx +++ b/src/frontend/src/components/common/ImageViewer/index.tsx @@ -11,9 +11,9 @@ import ForwardedIconComponent from "../genericIconComponent"; export default function ImageViewer({ image }: { image: string }) { const viewerRef = useRef(null); - const [errorDownloading, setErrordownloading] = useState(false); + const [_errorDownloading, _setErrordownloading] = useState(false); const setErrorList = useAlertStore((state) => state.setErrorData); - const [initialMsg, setInicialMsg] = useState("Please build your flow"); + const [_initialMsg, _setInicialMsg] = useState("Please build your flow"); useEffect(() => { try { diff --git a/src/frontend/src/components/common/accordionComponent/index.tsx b/src/frontend/src/components/common/accordionComponent/index.tsx index 3cdeb7496..15c0294b7 100644 --- a/src/frontend/src/components/common/accordionComponent/index.tsx +++ b/src/frontend/src/components/common/accordionComponent/index.tsx @@ -1,12 +1,12 @@ +import { useState } from "react"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@/components/ui/accordion"; -import { AccordionComponentType } from "@/types/components"; +import type { AccordionComponentType } from "@/types/components"; import { cn } from "@/utils/utils"; -import { useState } from "react"; export default function AccordionComponent({ trigger, diff --git a/src/frontend/src/components/common/animatedNumbers/index.tsx b/src/frontend/src/components/common/animatedNumbers/index.tsx index daf97f0cc..ad4b36ed3 100644 --- a/src/frontend/src/components/common/animatedNumbers/index.tsx +++ b/src/frontend/src/components/common/animatedNumbers/index.tsx @@ -1,6 +1,11 @@ -import { cn } from "@/utils/utils"; -import { motion, SpringOptions, useSpring, useTransform } from "framer-motion"; +import { + motion, + type SpringOptions, + useSpring, + useTransform, +} from "framer-motion"; import { useEffect, useState } from "react"; +import { cn } from "@/utils/utils"; type AnimatedNumberProps = { value: number; diff --git a/src/frontend/src/components/common/crashErrorComponent/index.tsx b/src/frontend/src/components/common/crashErrorComponent/index.tsx index 75ee8cefe..cd6476f92 100644 --- a/src/frontend/src/components/common/crashErrorComponent/index.tsx +++ b/src/frontend/src/components/common/crashErrorComponent/index.tsx @@ -1,5 +1,5 @@ import { XCircle } from "lucide-react"; -import { crashComponentPropsType } from "../../../types/components"; +import type { crashComponentPropsType } from "../../../types/components"; import { Button } from "../../ui/button"; import { Card, CardContent, CardFooter, CardHeader } from "../../ui/card"; diff --git a/src/frontend/src/components/common/fetchErrorComponent/index.tsx b/src/frontend/src/components/common/fetchErrorComponent/index.tsx index 15b32b938..bdbbf5476 100644 --- a/src/frontend/src/components/common/fetchErrorComponent/index.tsx +++ b/src/frontend/src/components/common/fetchErrorComponent/index.tsx @@ -1,5 +1,5 @@ import BaseModal from "../../../modals/baseModal"; -import { fetchErrorComponentType } from "../../../types/components"; +import type { fetchErrorComponentType } from "../../../types/components"; import IconComponent from "../genericIconComponent"; export default function FetchErrorComponent({ diff --git a/src/frontend/src/components/common/genericIconComponent/index.tsx b/src/frontend/src/components/common/genericIconComponent/index.tsx index a15fec43d..edb613662 100644 --- a/src/frontend/src/components/common/genericIconComponent/index.tsx +++ b/src/frontend/src/components/common/genericIconComponent/index.tsx @@ -1,11 +1,16 @@ -import React, { Suspense, forwardRef, memo } from "react"; -import { IconComponentProps } from "../../../types/components"; +import React, { + forwardRef, + memo, + Suspense, + useCallback, + useEffect, + useState, +} from "react"; +import { Skeleton } from "@/components/ui/skeleton"; +import type { IconComponentProps } from "../../../types/components"; import { getCachedIcon, getNodeIcon } from "../../../utils/styleUtils"; import { cn } from "../../../utils/utils"; -import { Skeleton } from "@/components/ui/skeleton"; -import { useCallback, useEffect, useState } from "react"; - export const ForwardedIconComponent = memo( forwardRef( ( diff --git a/src/frontend/src/components/common/loadingComponent/index.tsx b/src/frontend/src/components/common/loadingComponent/index.tsx index 0d803205f..f3e63c874 100644 --- a/src/frontend/src/components/common/loadingComponent/index.tsx +++ b/src/frontend/src/components/common/loadingComponent/index.tsx @@ -1,4 +1,4 @@ -import { LoadingComponentProps } from "../../../types/components"; +import type { LoadingComponentProps } from "../../../types/components"; export default function LoadingComponent({ remSize, diff --git a/src/frontend/src/components/common/objectRender/index.tsx b/src/frontend/src/components/common/objectRender/index.tsx index 75b542f00..da3c540ee 100644 --- a/src/frontend/src/components/common/objectRender/index.tsx +++ b/src/frontend/src/components/common/objectRender/index.tsx @@ -11,11 +11,11 @@ export default function ObjectRender({ if (typeof object === "string") { try { newObject = JSON.parse(object); - } catch (e) { + } catch (_e) { newObject = object; } } - let preview = + const preview = newObject === null || newObject === undefined ? "‎" : JSON.stringify(newObject); diff --git a/src/frontend/src/components/common/pageLayout/index.tsx b/src/frontend/src/components/common/pageLayout/index.tsx index fd8622145..a077eadb3 100644 --- a/src/frontend/src/components/common/pageLayout/index.tsx +++ b/src/frontend/src/components/common/pageLayout/index.tsx @@ -1,6 +1,6 @@ +import type { To } from "react-router-dom"; import { CustomBanner } from "@/customization/components/custom-banner"; import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; -import { To } from "react-router-dom"; import { Button } from "../../ui/button"; import { Separator } from "../../ui/separator"; import ForwardedIconComponent from "../genericIconComponent"; diff --git a/src/frontend/src/components/common/paginatorComponent/index.tsx b/src/frontend/src/components/common/paginatorComponent/index.tsx index dc0017521..57a1be4bb 100644 --- a/src/frontend/src/components/common/paginatorComponent/index.tsx +++ b/src/frontend/src/components/common/paginatorComponent/index.tsx @@ -1,10 +1,10 @@ +import { useEffect, useState } from "react"; import { PAGINATION_PAGE, PAGINATION_ROWS_COUNT, PAGINATION_SIZE, } from "@/constants/constants"; -import { useEffect, useState } from "react"; -import { PaginatorComponentType } from "../../../types/components"; +import type { PaginatorComponentType } from "../../../types/components"; import IconComponent from "../../common/genericIconComponent"; import { Button } from "../../ui/button"; import { @@ -36,7 +36,7 @@ export default function PaginatorComponent({ const disableFirstPage = pageIndex <= 1; const disableLastPage = pageIndex === maxIndex; - const handleValueChange = (pageSize: string) => { + const _handleValueChange = (pageSize: string) => { setPageSize(Number(pageSize)); setMaxPageIndex(pages ?? Math.ceil(totalRowsCount / Number(pageSize))); paginate(1, Number(pageSize)); diff --git a/src/frontend/src/components/common/sanitizedHTMLWrapper/index.tsx b/src/frontend/src/components/common/sanitizedHTMLWrapper/index.tsx index 5271627f7..1fd9eac60 100644 --- a/src/frontend/src/components/common/sanitizedHTMLWrapper/index.tsx +++ b/src/frontend/src/components/common/sanitizedHTMLWrapper/index.tsx @@ -1,7 +1,7 @@ -import { cn } from "@/utils/utils"; import DOMPurify from "dompurify"; import { forwardRef } from "react"; -import { SanitizedHTMLWrapperType } from "../../../types/components"; +import { cn } from "@/utils/utils"; +import type { SanitizedHTMLWrapperType } from "../../../types/components"; const SanitizedHTMLWrapper = forwardRef< HTMLDivElement, diff --git a/src/frontend/src/components/common/shadTooltipComponent/index.tsx b/src/frontend/src/components/common/shadTooltipComponent/index.tsx index 75c4c32d8..5c20c386d 100644 --- a/src/frontend/src/components/common/shadTooltipComponent/index.tsx +++ b/src/frontend/src/components/common/shadTooltipComponent/index.tsx @@ -1,5 +1,6 @@ -import React, { forwardRef, memo, useMemo } from "react"; -import { ShadToolTipType } from "../../../types/components"; +import type React from "react"; +import { forwardRef, memo, useMemo } from "react"; +import type { ShadToolTipType } from "../../../types/components"; import { cn } from "../../../utils/utils"; import { Tooltip, TooltipContent, TooltipTrigger } from "../../ui/tooltip"; diff --git a/src/frontend/src/components/common/storeCardComponent/hooks/use-data-effect.ts b/src/frontend/src/components/common/storeCardComponent/hooks/use-data-effect.ts index f3b0380a8..3bb1420f1 100644 --- a/src/frontend/src/components/common/storeCardComponent/hooks/use-data-effect.ts +++ b/src/frontend/src/components/common/storeCardComponent/hooks/use-data-effect.ts @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { storeComponent } from "../../../../types/store"; +import type { storeComponent } from "../../../../types/store"; const useDataEffect = ( data: storeComponent, diff --git a/src/frontend/src/components/common/storeCardComponent/hooks/use-handle-install.ts b/src/frontend/src/components/common/storeCardComponent/hooks/use-handle-install.ts index 3d05e6379..975a16330 100644 --- a/src/frontend/src/components/common/storeCardComponent/hooks/use-handle-install.ts +++ b/src/frontend/src/components/common/storeCardComponent/hooks/use-handle-install.ts @@ -1,6 +1,6 @@ import useAddFlow from "@/hooks/flows/use-add-flow"; import { getComponent } from "../../../../controllers/API"; -import { storeComponent } from "../../../../types/store"; +import type { storeComponent } from "../../../../types/store"; import cloneFlowWithParent from "../../../../utils/storeUtils"; const useInstallComponent = ( diff --git a/src/frontend/src/components/common/storeCardComponent/index.tsx b/src/frontend/src/components/common/storeCardComponent/index.tsx index 85bb6ce22..82f2b5238 100644 --- a/src/frontend/src/components/common/storeCardComponent/index.tsx +++ b/src/frontend/src/components/common/storeCardComponent/index.tsx @@ -1,10 +1,10 @@ -import { usePostLikeComponent } from "@/controllers/API/queries/store"; import { useState } from "react"; +import { usePostLikeComponent } from "@/controllers/API/queries/store"; import { getComponent } from "../../../controllers/API"; import useAlertStore from "../../../stores/alertStore"; import { useStoreStore } from "../../../stores/storeStore"; -import { FlowType } from "../../../types/flow"; -import { storeComponent } from "../../../types/store"; +import type { FlowType } from "../../../types/flow"; +import type { storeComponent } from "../../../types/store"; import cloneFLowWithParent, { getInputsAndOutputs, } from "../../../utils/storeUtils"; @@ -44,13 +44,13 @@ export default function StoreCardComponent({ const name = data.is_component ? "Component" : "Flow"; - async function getFlowData() { + async function _getFlowData() { const res = await getComponent(data.id); const newFlow = cloneFLowWithParent(res, res.id, data.is_component, true); return newFlow; } - function hasPlayground(flow?: FlowType) { + function _hasPlayground(flow?: FlowType) { if (!flow) { return false; } diff --git a/src/frontend/src/components/common/tagsSelectorComponent/index.tsx b/src/frontend/src/components/common/tagsSelectorComponent/index.tsx index d4307c6a7..3e2f93c11 100644 --- a/src/frontend/src/components/common/tagsSelectorComponent/index.tsx +++ b/src/frontend/src/components/common/tagsSelectorComponent/index.tsx @@ -17,7 +17,7 @@ export function TagsSelector({ }) { const updateTags = (tagName: string) => { const index = selectedTags.indexOf(tagName); - let newArray = + const newArray = index === -1 ? [...selectedTags, tagName] : selectedTags.filter((_, i) => i !== index); diff --git a/src/frontend/src/components/common/timeoutErrorComponent/index.tsx b/src/frontend/src/components/common/timeoutErrorComponent/index.tsx index 856e3df39..0e8a259f1 100644 --- a/src/frontend/src/components/common/timeoutErrorComponent/index.tsx +++ b/src/frontend/src/components/common/timeoutErrorComponent/index.tsx @@ -1,5 +1,5 @@ import BaseModal from "../../../modals/baseModal"; -import { fetchErrorComponentType } from "../../../types/components"; +import type { fetchErrorComponentType } from "../../../types/components"; import Loading from "../../ui/loading"; export default function TimeoutErrorComponent({ diff --git a/src/frontend/src/components/core/GlobalVariableModal/GlobalVariableModal.tsx b/src/frontend/src/components/core/GlobalVariableModal/GlobalVariableModal.tsx index 68ec23d0d..fe10e3a2f 100644 --- a/src/frontend/src/components/core/GlobalVariableModal/GlobalVariableModal.tsx +++ b/src/frontend/src/components/core/GlobalVariableModal/GlobalVariableModal.tsx @@ -1,21 +1,20 @@ -import { - useGetGlobalVariables, - usePatchGlobalVariables, - usePostGlobalVariables, -} from "@/controllers/API/queries/variables"; -import getUnavailableFields from "@/stores/globalVariablesStore/utils/get-unavailable-fields"; -import { GlobalVariable } from "@/types/global_variables"; import { useEffect, useState } from "react"; - import { ForwardedIconComponent } from "@/components/common/genericIconComponent"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs-button"; import { useGetTypes } from "@/controllers/API/queries/flows/use-get-types"; +import { + useGetGlobalVariables, + usePatchGlobalVariables, + usePostGlobalVariables, +} from "@/controllers/API/queries/variables"; import BaseModal from "@/modals/baseModal"; import useAlertStore from "@/stores/alertStore"; +import getUnavailableFields from "@/stores/globalVariablesStore/utils/get-unavailable-fields"; import { useTypesStore } from "@/stores/typesStore"; -import { ResponseErrorDetailAPI } from "@/types/api"; +import type { ResponseErrorDetailAPI } from "@/types/api"; +import type { GlobalVariable } from "@/types/global_variables"; import InputComponent from "../parameterRenderComponent/components/inputComponent"; import sortByName from "./utils/sort-by-name"; @@ -60,7 +59,7 @@ export default function GlobalVariableModal({ if (globalVariables && componentFields.size > 0) { const unavailableFields = getUnavailableFields(globalVariables); const fields = Array.from(componentFields).filter( - (field) => !unavailableFields.hasOwnProperty(field.trim()), + (field) => !Object.hasOwn(unavailableFields, field.trim()), ); setAvailableFields( sortByName(fields.concat(initialData?.default_fields ?? [])), @@ -76,7 +75,7 @@ export default function GlobalVariableModal({ const setSuccessData = useAlertStore((state) => state.setSuccessData); function handleSaveVariable() { - let data: { + const data: { name: string; value: string; type?: string; @@ -102,7 +101,7 @@ export default function GlobalVariableModal({ }); }, onError: (error) => { - let responseError = error as ResponseErrorDetailAPI; + const responseError = error as ResponseErrorDetailAPI; setErrorData({ title: `Error ${initialData ? "updating" : "creating"} variable`, list: [ diff --git a/src/frontend/src/components/core/appHeaderComponent/components/AccountMenu/index.tsx b/src/frontend/src/components/core/appHeaderComponent/components/AccountMenu/index.tsx index be5367531..64ed46d0b 100644 --- a/src/frontend/src/components/core/appHeaderComponent/components/AccountMenu/index.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/components/AccountMenu/index.tsx @@ -1,3 +1,4 @@ +import { FaDiscord, FaGithub } from "react-icons/fa"; import { ForwardedIconComponent } from "@/components/common/genericIconComponent"; import { DATASTAX_DOCS_URL, @@ -13,8 +14,6 @@ import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; import useAuthStore from "@/stores/authStore"; import { useDarkStore } from "@/stores/darkStore"; import { cn } from "@/utils/utils"; -import { FaDiscord, FaGithub, FaTwitter } from "react-icons/fa"; -import { useParams } from "react-router-dom"; import { HeaderMenu, HeaderMenuItemButton, @@ -22,11 +21,9 @@ import { HeaderMenuItems, HeaderMenuToggle, } from "../HeaderMenu"; -import { ProfileIcon } from "../ProfileIcon"; import ThemeButtons from "../ThemeButtons"; export const AccountMenu = () => { - const { customParam: id } = useParams(); const version = useDarkStore((state) => state.version); const latestVersion = useDarkStore((state) => state.latestVersion); const navigate = useCustomNavigate(); @@ -44,136 +41,134 @@ export const AccountMenu = () => { const isLatestVersion = version === latestVersion; return ( - <> - - -
- + + +
+ +
+
+ +
+
+
+
+ + Version + +
+ {version}{" "} + {isLatestVersion ? "(latest)" : "(update available)"} +
+
+
- - -
-
-
-
- - Version - -
- {version}{" "} - {isLatestVersion ? "(latest)" : "(update available)"} -
-
-
-
-
- { - navigate("/settings"); - }} +
+ { + navigate("/settings"); + }} + > + - - Settings - - + Settings + + - {isAdmin && !autoLogin && ( -
- { - navigate("/admin"); - }} - > - - Admin Page - - -
- )} - - - Docs - - -
- -
- - - - GitHub - - - - - - Discord - - - - - - X - - -
- -
- Theme -
- -
-
- - {!autoLogin && ( + {isAdmin && !autoLogin && (
- - Logout + { + navigate("/admin"); + }} + > + + Admin Page +
)} + + + Docs + +
- - - + +
+ + + + GitHub + + + + + + Discord + + + + + + X + + +
+ +
+ Theme +
+ +
+
+ + {!autoLogin && ( +
+ + Logout + +
+ )} +
+
+ ); }; diff --git a/src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx b/src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx index c65cbe1aa..15ab90fad 100644 --- a/src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx @@ -1,5 +1,6 @@ import { memo, useMemo, useRef, useState } from "react"; - +import { useHotkeys } from "react-hotkeys-hook"; +import { useShallow } from "zustand/react/shallow"; import IconComponent from "@/components/common/genericIconComponent"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import FlowSettingsComponent from "@/components/core/flowSettingsComponent"; @@ -17,13 +18,11 @@ import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; import useSaveFlow from "@/hooks/flows/use-save-flow"; import { useUnsavedChanges } from "@/hooks/use-unsaved-changes"; import useAlertStore from "@/stores/alertStore"; -import useFlowsManagerStore from "@/stores/flowsManagerStore"; import useFlowStore from "@/stores/flowStore"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useShortcutsStore } from "@/stores/shortcuts"; import { swatchColors } from "@/utils/styleUtils"; import { cn, getNumberFromString } from "@/utils/utils"; -import { useHotkeys } from "react-hotkeys-hook"; -import { useShallow } from "zustand/react/shallow"; export const MenuBar = memo((): JSX.Element => { const setSuccessData = useAlertStore((state) => state.setSuccessData); diff --git a/src/frontend/src/components/core/appHeaderComponent/components/HeaderMenu/index.tsx b/src/frontend/src/components/core/appHeaderComponent/components/HeaderMenu/index.tsx index 451df44bd..ca990ece5 100644 --- a/src/frontend/src/components/core/appHeaderComponent/components/HeaderMenu/index.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/components/HeaderMenu/index.tsx @@ -1,3 +1,5 @@ +import { ChevronsUpDown } from "lucide-react"; +import type React from "react"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { DropdownMenu, @@ -7,8 +9,6 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { cn } from "@/utils/utils"; -import { ChevronsUpDown } from "lucide-react"; -import React from "react"; export const HeaderMenu = ({ children }) => ( {children} diff --git a/src/frontend/src/components/core/appHeaderComponent/components/ProfileIcon/index.tsx b/src/frontend/src/components/core/appHeaderComponent/components/ProfileIcon/index.tsx index f387f9b41..d5c12cede 100644 --- a/src/frontend/src/components/core/appHeaderComponent/components/ProfileIcon/index.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/components/ProfileIcon/index.tsx @@ -1,6 +1,6 @@ +import { useContext } from "react"; import { AuthContext } from "@/contexts/authContext"; import { BASE_URL_API } from "@/customization/config-constants"; -import { useContext } from "react"; export function ProfileIcon() { const { userData } = useContext(AuthContext); diff --git a/src/frontend/src/components/core/appHeaderComponent/components/ThemeButtons/index.tsx b/src/frontend/src/components/core/appHeaderComponent/components/ThemeButtons/index.tsx index ec6282ed1..909103df1 100644 --- a/src/frontend/src/components/core/appHeaderComponent/components/ThemeButtons/index.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/components/ThemeButtons/index.tsx @@ -1,7 +1,7 @@ +import { useEffect, useState } from "react"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Button } from "@/components/ui/button"; import useTheme from "@/customization/hooks/use-custom-theme"; -import { useEffect, useState } from "react"; export const ThemeButtons = () => { const { systemTheme, dark, setThemePreference } = useTheme(); diff --git a/src/frontend/src/components/core/appHeaderComponent/components/langflow-counts.tsx b/src/frontend/src/components/core/appHeaderComponent/components/langflow-counts.tsx index 432dae925..8658800e2 100644 --- a/src/frontend/src/components/core/appHeaderComponent/components/langflow-counts.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/components/langflow-counts.tsx @@ -1,8 +1,8 @@ +import { FaDiscord, FaGithub } from "react-icons/fa"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { DISCORD_URL, GITHUB_URL } from "@/constants/constants"; import { useDarkStore } from "@/stores/darkStore"; import { formatNumber } from "@/utils/utils"; -import { FaDiscord, FaGithub } from "react-icons/fa"; export const LangflowCounts = () => { const stars: number | undefined = useDarkStore((state) => state.stars); diff --git a/src/frontend/src/components/core/appHeaderComponent/index.tsx b/src/frontend/src/components/core/appHeaderComponent/index.tsx index e461af252..005b56320 100644 --- a/src/frontend/src/components/core/appHeaderComponent/index.tsx +++ b/src/frontend/src/components/core/appHeaderComponent/index.tsx @@ -1,3 +1,4 @@ +import { useEffect, useRef, useState } from "react"; import AlertDropdown from "@/alerts/alertDropDown"; import DataStaxLogo from "@/assets/DataStaxLogo.svg?react"; import LangflowLogo from "@/assets/LangflowLogo.svg?react"; @@ -13,7 +14,6 @@ import { ENABLE_DATASTAX_LANGFLOW } from "@/customization/feature-flags"; import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; import useTheme from "@/customization/hooks/use-custom-theme"; import useAlertStore from "@/stores/alertStore"; -import { useEffect, useRef, useState } from "react"; import FlowMenu from "./components/FlowMenu"; export default function AppHeader(): JSX.Element { diff --git a/src/frontend/src/components/core/border-trail.tsx b/src/frontend/src/components/core/border-trail.tsx index 3a7683fa1..6625ca405 100644 --- a/src/frontend/src/components/core/border-trail.tsx +++ b/src/frontend/src/components/core/border-trail.tsx @@ -1,5 +1,5 @@ +import { motion, type Transition } from "framer-motion"; import { cn } from "@/utils/utils"; -import { motion, Transition } from "framer-motion"; type BorderTrailProps = { className?: string; diff --git a/src/frontend/src/components/core/canvasControlsComponent/index.tsx b/src/frontend/src/components/core/canvasControlsComponent/index.tsx index a818c3243..e4129a994 100644 --- a/src/frontend/src/components/core/canvasControlsComponent/index.tsx +++ b/src/frontend/src/components/core/canvasControlsComponent/index.tsx @@ -1,21 +1,21 @@ -import IconComponent from "@/components/common/genericIconComponent"; -import ShadTooltip from "@/components/common/shadTooltipComponent"; -import useSaveFlow from "@/hooks/flows/use-save-flow"; -import useFlowsManagerStore from "@/stores/flowsManagerStore"; -import useFlowStore from "@/stores/flowStore"; -import { cn } from "@/utils/utils"; import { ControlButton, Panel, + type ReactFlowState, useReactFlow, useStore, useStoreApi, - type ReactFlowState, } from "@xyflow/react"; import { cloneDeep } from "lodash"; import { useCallback, useEffect } from "react"; import { useShallow } from "zustand/react/shallow"; import { shallow } from "zustand/shallow"; +import IconComponent from "@/components/common/genericIconComponent"; +import ShadTooltip from "@/components/common/shadTooltipComponent"; +import useSaveFlow from "@/hooks/flows/use-save-flow"; +import useFlowStore from "@/stores/flowStore"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; +import { cn } from "@/utils/utils"; type CustomControlButtonProps = { iconName: string; diff --git a/src/frontend/src/components/core/cardComponent/components/dragCardComponent/index.tsx b/src/frontend/src/components/core/cardComponent/components/dragCardComponent/index.tsx index 22ff60aef..d7f4ae32d 100644 --- a/src/frontend/src/components/core/cardComponent/components/dragCardComponent/index.tsx +++ b/src/frontend/src/components/core/cardComponent/components/dragCardComponent/index.tsx @@ -1,4 +1,4 @@ -import { FlowType } from "@/types/flow"; +import type { FlowType } from "@/types/flow"; import { cn } from "../../../../../utils/utils"; import ForwardedIconComponent from "../../../../common/genericIconComponent"; import { Card, CardHeader, CardTitle } from "../../../../ui/card"; diff --git a/src/frontend/src/components/core/cardComponent/hooks/use-on-drag-start.tsx b/src/frontend/src/components/core/cardComponent/hooks/use-on-drag-start.tsx index 4b47d6a40..b35552199 100644 --- a/src/frontend/src/components/core/cardComponent/hooks/use-on-drag-start.tsx +++ b/src/frontend/src/components/core/cardComponent/hooks/use-on-drag-start.tsx @@ -1,6 +1,6 @@ -import { FlowType } from "@/types/flow"; import { useCallback } from "react"; import { createRoot } from "react-dom/client"; +import type { FlowType } from "@/types/flow"; import useFlowsManagerStore from "../../../../stores/flowsManagerStore"; import DragCardComponent from "../components/dragCardComponent"; @@ -9,7 +9,7 @@ const useDragStart = (data: FlowType) => { const onDragStart = useCallback( (event) => { - let image = ; // Replace with whatever you want here + const image = ; // Replace with whatever you want here const ghost = document.createElement("div"); ghost.style.transform = "translate(-10000px, -10000px)"; diff --git a/src/frontend/src/components/core/cardsWrapComponent/index.tsx b/src/frontend/src/components/core/cardsWrapComponent/index.tsx index 18d149259..fcff4c785 100644 --- a/src/frontend/src/components/core/cardsWrapComponent/index.tsx +++ b/src/frontend/src/components/core/cardsWrapComponent/index.tsx @@ -1,5 +1,5 @@ -import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useEffect, useState } from "react"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { cn } from "../../../utils/utils"; import IconComponent from "../../common/genericIconComponent"; diff --git a/src/frontend/src/components/core/chatComponents/ContentBlockDisplay.tsx b/src/frontend/src/components/core/chatComponents/ContentBlockDisplay.tsx index 52442a22d..245da3800 100644 --- a/src/frontend/src/components/core/chatComponents/ContentBlockDisplay.tsx +++ b/src/frontend/src/components/core/chatComponents/ContentBlockDisplay.tsx @@ -1,13 +1,13 @@ "use client"; -import { BorderTrail } from "@/components/core/border-trail"; -import { ContentBlock } from "@/types/chat"; -import { cn } from "@/utils/utils"; import { AnimatePresence, motion } from "framer-motion"; import { ChevronDown } from "lucide-react"; import { useState } from "react"; import Markdown from "react-markdown"; import rehypeMathjax from "rehype-mathjax"; import remarkGfm from "remark-gfm"; +import { BorderTrail } from "@/components/core/border-trail"; +import type { ContentBlock } from "@/types/chat"; +import { cn } from "@/utils/utils"; import ForwardedIconComponent from "../../common/genericIconComponent"; import { Separator } from "../../ui/separator"; import ContentDisplay from "./ContentDisplay"; diff --git a/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx b/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx index d875e4b71..0a542dc40 100644 --- a/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx +++ b/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx @@ -1,8 +1,8 @@ -import { ContentType } from "@/types/chat"; -import { ReactNode } from "react"; +import type { ReactNode } from "react"; import Markdown from "react-markdown"; import rehypeMathjax from "rehype-mathjax"; import remarkGfm from "remark-gfm"; +import type { ContentType } from "@/types/chat"; import ForwardedIconComponent from "../../common/genericIconComponent"; import SimplifiedCodeTabComponent from "../codeTabsComponent"; import DurationDisplay from "./DurationDisplay"; @@ -144,7 +144,7 @@ export default function ContentDisplay({ ); break; - case "tool_use": + case "tool_use": { const formatToolOutput = (output: any) => { if (output === null || output === undefined) return ""; @@ -241,6 +241,7 @@ export default function ContentDisplay({
); break; + } case "media": contentData = ( diff --git a/src/frontend/src/components/core/chatComponents/DurationDisplay.tsx b/src/frontend/src/components/core/chatComponents/DurationDisplay.tsx index f8b4f11d4..11c1a088d 100644 --- a/src/frontend/src/components/core/chatComponents/DurationDisplay.tsx +++ b/src/frontend/src/components/core/chatComponents/DurationDisplay.tsx @@ -1,5 +1,5 @@ -import { useDurationStore } from "@/stores/durationStore"; import { useEffect } from "react"; +import { useDurationStore } from "@/stores/durationStore"; import { AnimatedNumber } from "../../common/animatedNumbers"; import ForwardedIconComponent from "../../common/genericIconComponent"; import Loading from "../../ui/loading"; diff --git a/src/frontend/src/components/core/codeTabsComponent/components/tweakComponent/index.tsx b/src/frontend/src/components/core/codeTabsComponent/components/tweakComponent/index.tsx index 2c743fcea..8ea418eae 100644 --- a/src/frontend/src/components/core/codeTabsComponent/components/tweakComponent/index.tsx +++ b/src/frontend/src/components/core/codeTabsComponent/components/tweakComponent/index.tsx @@ -1,10 +1,10 @@ +import { useEffect, useState } from "react"; import AccordionComponent from "@/components/common/accordionComponent"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { EditNodeComponent } from "@/modals/editNodeModal/components/editNodeComponent"; -import { APIClassType } from "@/types/api"; -import { AllNodeType } from "@/types/flow"; +import type { APIClassType } from "@/types/api"; +import type { AllNodeType } from "@/types/flow"; import { customStringify } from "@/utils/reactflowUtils"; -import { useEffect, useState } from "react"; export function TweakComponent({ open, diff --git a/src/frontend/src/components/core/codeTabsComponent/components/tweaksComponent/index.tsx b/src/frontend/src/components/core/codeTabsComponent/components/tweaksComponent/index.tsx index 1f3ac3fd5..e724af996 100644 --- a/src/frontend/src/components/core/codeTabsComponent/components/tweaksComponent/index.tsx +++ b/src/frontend/src/components/core/codeTabsComponent/components/tweaksComponent/index.tsx @@ -1,5 +1,5 @@ import { useTweaksStore } from "@/stores/tweaksStore"; -import { AllNodeType } from "@/types/flow"; +import type { AllNodeType } from "@/types/flow"; import { TweakComponent } from "../tweakComponent"; export function TweaksComponent({ open }: { open: boolean }) { diff --git a/src/frontend/src/components/core/csvOutputComponent/index.tsx b/src/frontend/src/components/core/csvOutputComponent/index.tsx index 2b2cd213a..6b661defa 100644 --- a/src/frontend/src/components/core/csvOutputComponent/index.tsx +++ b/src/frontend/src/components/core/csvOutputComponent/index.tsx @@ -1,4 +1,4 @@ -import { AllNodeType } from "@/types/flow"; +import type { AllNodeType } from "@/types/flow"; import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied to the grid import { useEffect, useMemo, useState } from "react"; @@ -8,7 +8,7 @@ import { CSVViewErrorTitle, } from "../../../constants/constants"; import { useDarkStore } from "../../../stores/darkStore"; -import { VertexBuildTypeAPI } from "../../../types/api"; +import type { VertexBuildTypeAPI } from "../../../types/api"; import ForwardedIconComponent from "../../common/genericIconComponent"; import Loading from "../../ui/loading"; import TableComponent from "../parameterRenderComponent/components/tableComponent"; @@ -26,8 +26,8 @@ function CsvOutputComponent({ let file = null; try { file = JSON?.parse(jsonString) || ""; - } catch (e) { - console.log("Error parsing JSON"); + } catch (_e) { + console.error("Error parsing JSON"); } if (!file) { diff --git a/src/frontend/src/components/core/dataOutputComponent/index.tsx b/src/frontend/src/components/core/dataOutputComponent/index.tsx index 1b9d6be91..2541d81da 100644 --- a/src/frontend/src/components/core/dataOutputComponent/index.tsx +++ b/src/frontend/src/components/core/dataOutputComponent/index.tsx @@ -1,6 +1,6 @@ +import type { ColDef, ColGroupDef } from "ag-grid-community"; import TableComponent from "@/components/core/parameterRenderComponent/components/tableComponent"; import { useUtilityStore } from "@/stores/utilityStore"; -import { ColDef, ColGroupDef } from "ag-grid-community"; import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid import "ag-grid-community/styles/ag-theme-balham.css"; // Optional Theme applied to the grid import { useEffect, useState } from "react"; diff --git a/src/frontend/src/components/core/dropdownComponent/index.tsx b/src/frontend/src/components/core/dropdownComponent/index.tsx index d007dc83b..114289103 100644 --- a/src/frontend/src/components/core/dropdownComponent/index.tsx +++ b/src/frontend/src/components/core/dropdownComponent/index.tsx @@ -1,18 +1,18 @@ +import { PopoverAnchor } from "@radix-ui/react-popover"; +import Fuse from "fuse.js"; +import { cloneDeep } from "lodash"; +import { type ChangeEvent, useEffect, useMemo, useRef, useState } from "react"; +import NodeDialog from "@/CustomNodes/GenericNode/components/NodeDialogComponent"; +import { mutateTemplate } from "@/CustomNodes/helpers/mutate-template"; import LoadingTextComponent from "@/components/common/loadingTextComponent"; import { RECEIVING_INPUT_VALUE, SELECT_AN_OPTION } from "@/constants/constants"; import { usePostTemplateValue } from "@/controllers/API/queries/nodes/use-post-template-value"; -import NodeDialog from "@/CustomNodes/GenericNode/components/NodeDialogComponent"; -import { mutateTemplate } from "@/CustomNodes/helpers/mutate-template"; import useAlertStore from "@/stores/alertStore"; import { convertStringToHTML, getStatusColor, } from "@/utils/stringManipulation"; -import { PopoverAnchor } from "@radix-ui/react-popover"; -import Fuse from "fuse.js"; -import { cloneDeep } from "lodash"; -import { ChangeEvent, useEffect, useMemo, useRef, useState } from "react"; -import { DropDownComponent } from "../../../types/components"; +import type { DropDownComponent } from "../../../types/components"; import { cn, filterNullOptions, @@ -35,7 +35,7 @@ import { PopoverContentWithoutPortal, PopoverTrigger, } from "../../ui/popover"; -import { BaseInputProps } from "../parameterRenderComponent/types"; +import type { BaseInputProps } from "../parameterRenderComponent/types"; export default function Dropdown({ disabled, @@ -89,7 +89,7 @@ export default function Dropdown({ }, [value, options, filteredOptions]); // Initialize utilities and constants - const placeholderName = name + const _placeholderName = name ? formatPlaceholderName(name) : "Choose an option..."; const { firstWord } = formatName(name); diff --git a/src/frontend/src/components/core/editFlowSettingsComponent/index.tsx b/src/frontend/src/components/core/editFlowSettingsComponent/index.tsx index 130674d7a..13a386038 100644 --- a/src/frontend/src/components/core/editFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/core/editFlowSettingsComponent/index.tsx @@ -1,6 +1,7 @@ import * as Form from "@radix-ui/react-form"; -import React, { useState } from "react"; -import { InputProps } from "../../../types/components"; +import type React from "react"; +import { useState } from "react"; +import type { InputProps } from "../../../types/components"; import { cn } from "../../../utils/utils"; import { Input } from "../../ui/input"; import { Textarea } from "../../ui/textarea"; diff --git a/src/frontend/src/components/core/flowSettingsComponent/index.tsx b/src/frontend/src/components/core/flowSettingsComponent/index.tsx index 0f67085c2..8c3975ed8 100644 --- a/src/frontend/src/components/core/flowSettingsComponent/index.tsx +++ b/src/frontend/src/components/core/flowSettingsComponent/index.tsx @@ -1,12 +1,12 @@ -import { Button } from "@/components/ui/button"; -import useSaveFlow from "@/hooks/flows/use-save-flow"; -import useAlertStore from "@/stores/alertStore"; -import useFlowsManagerStore from "@/stores/flowsManagerStore"; -import useFlowStore from "@/stores/flowStore"; -import { FlowType } from "@/types/flow"; import * as Form from "@radix-ui/react-form"; import { cloneDeep } from "lodash"; import { useEffect, useRef, useState } from "react"; +import { Button } from "@/components/ui/button"; +import useSaveFlow from "@/hooks/flows/use-save-flow"; +import useAlertStore from "@/stores/alertStore"; +import useFlowStore from "@/stores/flowStore"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; +import type { FlowType } from "@/types/flow"; import EditFlowSettings from "../editFlowSettingsComponent"; export default function FlowSettingsComponent({ diff --git a/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx b/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx index d911c4015..4540e3483 100644 --- a/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx +++ b/src/frontend/src/components/core/flowToolbarComponent/components/deploy-dropdown.tsx @@ -1,3 +1,5 @@ +import { useState } from "react"; +import { useHref } from "react-router-dom"; import IconComponent from "@/components/common/genericIconComponent"; import ShadTooltipComponent from "@/components/common/shadTooltipComponent"; import { Button } from "@/components/ui/button"; @@ -17,11 +19,9 @@ import EmbedModal from "@/modals/EmbedModal/embed-modal"; import ExportModal from "@/modals/exportModal"; import useAlertStore from "@/stores/alertStore"; import useAuthStore from "@/stores/authStore"; -import useFlowsManagerStore from "@/stores/flowsManagerStore"; import useFlowStore from "@/stores/flowStore"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { cn } from "@/utils/utils"; -import { useState } from "react"; -import { useHref } from "react-router-dom"; export default function PublishDropdown() { const location = useHref("/"); diff --git a/src/frontend/src/components/core/flowToolbarComponent/components/flow-toolbar-options.tsx b/src/frontend/src/components/core/flowToolbarComponent/components/flow-toolbar-options.tsx index c9e6cf724..32c2f8f6b 100644 --- a/src/frontend/src/components/core/flowToolbarComponent/components/flow-toolbar-options.tsx +++ b/src/frontend/src/components/core/flowToolbarComponent/components/flow-toolbar-options.tsx @@ -1,5 +1,5 @@ -import useFlowStore from "@/stores/flowStore"; import { useState } from "react"; +import useFlowStore from "@/stores/flowStore"; import PublishDropdown from "./deploy-dropdown"; import PlaygroundButton from "./playground-button"; diff --git a/src/frontend/src/components/core/flowToolbarComponent/index.tsx b/src/frontend/src/components/core/flowToolbarComponent/index.tsx index 5dc24c9f5..7e8fb43c2 100644 --- a/src/frontend/src/components/core/flowToolbarComponent/index.tsx +++ b/src/frontend/src/components/core/flowToolbarComponent/index.tsx @@ -1,8 +1,8 @@ -import ShadTooltip from "@/components/common/shadTooltipComponent"; -import { track } from "@/customization/utils/analytics"; import { Panel } from "@xyflow/react"; import { memo, useEffect, useMemo, useState } from "react"; import { useHotkeys } from "react-hotkeys-hook"; +import ShadTooltip from "@/components/common/shadTooltipComponent"; +import { track } from "@/customization/utils/analytics"; import ShareModal from "../../../modals/shareModal"; import useFlowStore from "../../../stores/flowStore"; import { useShortcutsStore } from "../../../stores/shortcuts"; diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/get-started-progress.tsx b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/get-started-progress.tsx index 057170707..0376ca5ff 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/get-started-progress.tsx +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/get-started-progress.tsx @@ -1,13 +1,13 @@ +import { type FC, useEffect, useMemo, useState } from "react"; +import { FaDiscord, FaGithub } from "react-icons/fa"; import IconComponent from "@/components/common/genericIconComponent"; import { Button } from "@/components/ui/button"; import { DISCORD_URL, GITHUB_URL } from "@/constants/constants"; import { useGetUserData, useUpdateUser } from "@/controllers/API/queries/auth"; import ModalsComponent from "@/pages/MainPage/components/modalsComponent"; import useFlowsManagerStore from "@/stores/flowsManagerStore"; -import { Users } from "@/types/api"; +import type { Users } from "@/types/api"; import { cn } from "@/utils/utils"; -import { FC, useEffect, useMemo, useState } from "react"; -import { FaDiscord, FaGithub } from "react-icons/fa"; export const GetStartedProgress: FC<{ userData: Users; diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/header-buttons.tsx b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/header-buttons.tsx index c80c0e393..9d8c1e228 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/header-buttons.tsx +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/header-buttons.tsx @@ -1,11 +1,9 @@ +import { useEffect, useState } from "react"; import IconComponent from "@/components/common/genericIconComponent"; -import { GetStartedProgress } from "@/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/get-started-progress"; import { SidebarTrigger } from "@/components/ui/sidebar"; import { useUpdateUser } from "@/controllers/API/queries/auth"; import CustomGetStartedProgress from "@/customization/components/custom-get-started-progress"; import useAuthStore from "@/stores/authStore"; -import { Separator } from "@radix-ui/react-separator"; -import { useEffect, useState } from "react"; import { AddFolderButton } from "./add-folder-button"; import { UploadFolderButton } from "./upload-folder-button"; diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/input-edit-folder-name.tsx b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/input-edit-folder-name.tsx index 0c02bec49..2f9ef7e6a 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/input-edit-folder-name.tsx +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/input-edit-folder-name.tsx @@ -1,5 +1,5 @@ import { Input } from "@/components/ui/input"; -import { FolderType } from "@/pages/MainPage/entities"; +import type { FolderType } from "@/pages/MainPage/entities"; export const InputEditFolderName = ({ handleEditFolderName, diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/mcp-server-notice.tsx b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/mcp-server-notice.tsx index 4df206faa..c0533b882 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/mcp-server-notice.tsx +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/mcp-server-notice.tsx @@ -1,8 +1,8 @@ +import type { FC } from "react"; import MCPLangflow from "@/assets/MCPLangflow.png"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Button } from "@/components/ui/button"; import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; -import { FC } from "react"; export const MCPServerNotice: FC<{ handleDismissDialog: () => void; diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/select-options.tsx b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/select-options.tsx index 12afd4344..c6877f17c 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/select-options.tsx +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/select-options.tsx @@ -7,7 +7,7 @@ import { SelectTrigger, } from "@/components/ui/select-custom"; import { DEFAULT_FOLDER } from "@/constants/constants"; -import { FolderType } from "@/pages/MainPage/entities"; +import type { FolderType } from "@/pages/MainPage/entities"; import { cn } from "@/utils/utils"; import { handleSelectChange } from "../helpers/handle-select-change"; import { FolderSelectItem } from "./folder-select-item"; diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/helpers/handle-select-change.ts b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/helpers/handle-select-change.ts index cbc06e781..9fcd72a08 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/helpers/handle-select-change.ts +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/helpers/handle-select-change.ts @@ -1,4 +1,4 @@ -import { FolderType } from "@/pages/MainPage/entities"; +import type { FolderType } from "@/pages/MainPage/entities"; export const handleSelectChange = ( option: string, diff --git a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx index 18a4adbf4..bd5cb7879 100644 --- a/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx +++ b/src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx @@ -1,3 +1,6 @@ +import { useIsFetching, useIsMutating } from "@tanstack/react-query"; +import { useEffect, useRef, useState } from "react"; +import { useLocation, useParams } from "react-router-dom"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Sidebar, @@ -33,10 +36,7 @@ import { getObjectsFromFilelist } from "@/helpers/get-objects-from-filelist"; import useUploadFlow from "@/hooks/flows/use-upload-flow"; import { useIsMobile } from "@/hooks/use-mobile"; import useAuthStore from "@/stores/authStore"; -import { useIsFetching, useIsMutating } from "@tanstack/react-query"; -import { useEffect, useRef, useState } from "react"; -import { useLocation, useParams } from "react-router-dom"; -import { FolderType } from "../../../../../pages/MainPage/entities"; +import type { FolderType } from "../../../../../pages/MainPage/entities"; import useAlertStore from "../../../../../stores/alertStore"; import useFlowsManagerStore from "../../../../../stores/flowsManagerStore"; import { useFolderStore } from "../../../../../stores/foldersStore"; @@ -65,7 +65,7 @@ const SideBarFoldersButtonsComponent = ({ const loading = !folders; const refInput = useRef(null); - const navigate = useCustomNavigate(); + const _navigate = useCustomNavigate(); const currentFolder = pathname.split("/"); const urlWithoutPath = @@ -153,7 +153,7 @@ const SideBarFoldersButtonsComponent = ({ }); }, onError: (err) => { - console.log(err); + console.error(err); setErrorData({ title: `Error on uploading your project, try dragging it into an existing project.`, list: [err["response"]["data"]["message"]], diff --git a/src/frontend/src/components/core/jsonEditor/index.tsx b/src/frontend/src/components/core/jsonEditor/index.tsx index 8e55b9119..f8703e73c 100644 --- a/src/frontend/src/components/core/jsonEditor/index.tsx +++ b/src/frontend/src/components/core/jsonEditor/index.tsx @@ -1,11 +1,11 @@ import { jsonquery } from "@jsonquerylang/jsonquery"; -import { KeyboardEvent, useEffect, useRef, useState } from "react"; +import { type KeyboardEvent, useEffect, useRef, useState } from "react"; import { - Content, + type Content, createJSONEditor, - MenuItem, - Mode, - JsonEditor as VanillaJsonEditor, + type MenuItem, + type Mode, + type JsonEditor as VanillaJsonEditor, } from "vanilla-jsoneditor"; import useAlertStore from "../../../stores/alertStore"; import { cn } from "../../../utils/utils"; @@ -45,7 +45,7 @@ const JsonEditor = ({ const [transformQuery, setTransformQuery] = useState(initialFilter ?? ""); const [originalData, setOriginalData] = useState(data); const [isFiltered, setIsFiltered] = useState(false); - const [showSuccess, setShowSuccess] = useState(false); + const [_showSuccess, setShowSuccess] = useState(false); const setSuccessData = useAlertStore((state) => state.setSuccessData); const { customizeMenu } = useMenuCustomization(setSuccessData, setErrorData); @@ -110,7 +110,7 @@ const JsonEditor = ({ setIsFiltered(true); } return; - } catch (jsonError) { + } catch (_jsonError) { setErrorData({ title: "Invalid Result", list: [ @@ -131,7 +131,7 @@ const JsonEditor = ({ } } catch (jsonQueryError) { // If JSONQuery fails, continue with our path-based method - console.debug( + console.error( "JSONQuery parsing failed, falling back to path-based method:", jsonQueryError, ); @@ -208,7 +208,7 @@ const JsonEditor = ({ setIsFiltered(true); } return; - } catch (jsonError) { + } catch (_jsonError) { setErrorData({ title: "Invalid Result", list: [ @@ -249,7 +249,7 @@ const JsonEditor = ({ setShowSuccess(false); }; - const handleKeyDown = (e: KeyboardEvent) => { + const _handleKeyDown = (e: KeyboardEvent) => { if (e.key === "Enter") { e.preventDefault(); handleTransform(); @@ -272,7 +272,7 @@ const JsonEditor = ({ } } } catch (jsonQueryError) { - console.debug( + console.error( "JSONQuery parsing failed, falling back to path-based method:", jsonQueryError, ); diff --git a/src/frontend/src/components/core/jsonEditor/menuUtils.ts b/src/frontend/src/components/core/jsonEditor/menuUtils.ts index 18906e726..0fba721e2 100644 --- a/src/frontend/src/components/core/jsonEditor/menuUtils.ts +++ b/src/frontend/src/components/core/jsonEditor/menuUtils.ts @@ -1,5 +1,5 @@ import { faCopy } from "@fortawesome/free-solid-svg-icons"; -import { MenuItem, Mode } from "vanilla-jsoneditor"; +import { type MenuItem, Mode } from "vanilla-jsoneditor"; export const filterTextModeItems = (items: MenuItem[]): MenuItem[] => { return items.filter((item) => { diff --git a/src/frontend/src/components/core/jsonEditor/useMenuCustomization.ts b/src/frontend/src/components/core/jsonEditor/useMenuCustomization.ts index 9b3f6aab6..4d5b748a1 100644 --- a/src/frontend/src/components/core/jsonEditor/useMenuCustomization.ts +++ b/src/frontend/src/components/core/jsonEditor/useMenuCustomization.ts @@ -1,4 +1,4 @@ -import { MenuItem, Mode } from "vanilla-jsoneditor"; +import type { MenuItem, Mode } from "vanilla-jsoneditor"; import { processTextModeItems, processTreeModeItems } from "./menuUtils"; export const useMenuCustomization = ( diff --git a/src/frontend/src/components/core/jsonOutputComponent/json-output-view.tsx b/src/frontend/src/components/core/jsonOutputComponent/json-output-view.tsx index 5a039d74f..fcfd61ce8 100644 --- a/src/frontend/src/components/core/jsonOutputComponent/json-output-view.tsx +++ b/src/frontend/src/components/core/jsonOutputComponent/json-output-view.tsx @@ -1,6 +1,6 @@ +import type React from "react"; import useFlowStore from "@/stores/flowStore"; -import { APIClassType } from "@/types/api"; -import React from "react"; +import type { APIClassType } from "@/types/api"; import JsonEditor from "../jsonEditor"; interface JsonOutputViewComponentProps { diff --git a/src/frontend/src/components/core/logCanvasControlsComponent/index.tsx b/src/frontend/src/components/core/logCanvasControlsComponent/index.tsx index d4aba2cd1..2aca124ed 100644 --- a/src/frontend/src/components/core/logCanvasControlsComponent/index.tsx +++ b/src/frontend/src/components/core/logCanvasControlsComponent/index.tsx @@ -1,7 +1,7 @@ +import { Panel } from "@xyflow/react"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Button } from "@/components/ui/button"; import FlowLogsModal from "@/modals/flowLogsModal"; -import { Panel } from "@xyflow/react"; const LogCanvasControls = () => { return ( diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/TableNodeComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/TableNodeComponent/index.tsx index 79aec74d9..62de27763 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/TableNodeComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/TableNodeComponent/index.tsx @@ -1,14 +1,17 @@ +import type { + DataTypeDefinition, + SelectionChangedEvent, +} from "ag-grid-community"; +import type { AgGridReact } from "ag-grid-react"; +import { cloneDeep } from "lodash"; +import { useEffect, useMemo, useRef, useState } from "react"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import TableModal from "@/modals/tableModal"; import { isMarkdownTable } from "@/utils/markdownUtils"; import { FormatColumns, generateBackendColumnsFromValue } from "@/utils/utils"; -import { DataTypeDefinition, SelectionChangedEvent } from "ag-grid-community"; -import { AgGridReact } from "ag-grid-react"; -import { cloneDeep } from "lodash"; -import { useEffect, useMemo, useRef, useState } from "react"; import { ForwardedIconComponent } from "../../../../common/genericIconComponent"; import { Button } from "../../../../ui/button"; -import { InputProps, TableComponentType } from "../../types"; +import type { InputProps, TableComponentType } from "../../types"; export default function TableNodeComponent({ tableTitle, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/ToolsComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/ToolsComponent/index.tsx index b22512d40..5fcbe726f 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/ToolsComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/ToolsComponent/index.tsx @@ -1,12 +1,12 @@ +import { useState } from "react"; import { ICON_STROKE_WIDTH } from "@/constants/constants"; import ToolsModal from "@/modals/toolsModal"; import { cn, testIdCase } from "@/utils/utils"; -import { useState } from "react"; import { ForwardedIconComponent } from "../../../../common/genericIconComponent"; import { Badge } from "../../../../ui/badge"; import { Button } from "../../../../ui/button"; import { Skeleton } from "../../../../ui/skeleton"; -import { InputProps, ToolsComponentType } from "../../types"; +import type { InputProps, ToolsComponentType } from "../../types"; export default function ToolsComponent({ description, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/codeAreaComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/codeAreaComponent/index.tsx index 068202291..d5b29d853 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/codeAreaComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/codeAreaComponent/index.tsx @@ -4,7 +4,7 @@ import { cn } from "../../../../../utils/utils"; import IconComponent from "../../../../common/genericIconComponent"; import { Button } from "../../../../ui/button"; import { getPlaceholder } from "../../helpers/get-placeholder-disabled"; -import { InputProps } from "../../types"; +import type { InputProps } from "../../types"; const codeContentClasses = { base: "overflow-hidden text-clip whitespace-nowrap", diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx index ed82f3702..4427ddc8c 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx @@ -1,14 +1,14 @@ +import { memo, useEffect, useRef, useState } from "react"; +import ListSelectionComponent from "@/CustomNodes/GenericNode/components/ListSelectionComponent"; +import { mutateTemplate } from "@/CustomNodes/helpers/mutate-template"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Button } from "@/components/ui/button"; import { usePostTemplateValue } from "@/controllers/API/queries/nodes/use-post-template-value"; import { customOpenNewTab } from "@/customization/utils/custom-open-new-tab"; -import ListSelectionComponent from "@/CustomNodes/GenericNode/components/ListSelectionComponent"; -import { mutateTemplate } from "@/CustomNodes/helpers/mutate-template"; import useAlertStore from "@/stores/alertStore"; -import { APIClassType } from "@/types/api"; +import type { APIClassType } from "@/types/api"; import { cn } from "@/utils/utils"; -import { memo, useEffect, useRef, useState } from "react"; -import { InputProps } from "../../types"; +import type { InputProps } from "../../types"; import HelperTextComponent from "../helperTextComponent"; export type ConnectionComponentProps = { diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/copyFieldAreaComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/copyFieldAreaComponent/index.tsx index 285c6a4b2..2d7f16f43 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/copyFieldAreaComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/copyFieldAreaComponent/index.tsx @@ -1,12 +1,12 @@ +import { useMemo, useRef, useState } from "react"; import { GRADIENT_CLASS_DISABLED } from "@/constants/constants"; import { customGetHostProtocol } from "@/customization/utils/custom-get-host-protocol"; import useAlertStore from "@/stores/alertStore"; import useFlowStore from "@/stores/flowStore"; -import { useMemo, useRef, useState } from "react"; import { cn } from "../../../../../utils/utils"; import IconComponent from "../../../../common/genericIconComponent"; import { Input } from "../../../../ui/input"; -import { InputProps, TextAreaComponentType } from "../../types"; +import type { InputProps, TextAreaComponentType } from "../../types"; const BACKEND_URL = "BACKEND_URL"; const MCP_SSE_VALUE = "MCP_SSE"; diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/dictComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/dictComponent/index.tsx index 2f6c8ab04..bcc67b7bc 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/dictComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/dictComponent/index.tsx @@ -5,7 +5,7 @@ import DictAreaModal from "../../../../../modals/dictAreaModal"; import { classNames, cn, toTitleCase } from "../../../../../utils/utils"; import ForwardedIconComponent from "../../../../common/genericIconComponent"; import { Button } from "../../../../ui/button"; -import { InputProps } from "../../types"; +import type { InputProps } from "../../types"; export default function DictComponent({ value, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/dropdownComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/dropdownComponent/index.tsx index 26c561775..0a01a4339 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/dropdownComponent/index.tsx @@ -1,5 +1,5 @@ import Dropdown from "../../../dropdownComponent"; -import { DropDownComponentType, InputProps } from "../../types"; +import type { DropDownComponentType, InputProps } from "../../types"; import ToggleShadComponent from "../toggleShadComponent"; export default function DropdownComponent({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/emptyParameterComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/emptyParameterComponent/index.tsx index 4720b8b3e..527d89f58 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/emptyParameterComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/emptyParameterComponent/index.tsx @@ -1,4 +1,4 @@ -import { InputProps } from "../../types"; +import type { InputProps } from "../../types"; export function EmptyParameterComponent({ id, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/floatComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/floatComponent/index.tsx index 085ed2c97..dcff3fe36 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/floatComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/floatComponent/index.tsx @@ -1,4 +1,3 @@ -import { cn } from "@/utils/utils"; import { NumberDecrementStepper, NumberIncrementStepper, @@ -8,8 +7,9 @@ import { } from "@chakra-ui/number-input"; import { MinusIcon, PlusIcon } from "lucide-react"; import { useEffect, useRef, useState } from "react"; +import { cn } from "@/utils/utils"; import { handleKeyDown } from "../../../../../utils/reactflowUtils"; -import { FloatComponentType, InputProps } from "../../types"; +import type { FloatComponentType, InputProps } from "../../types"; export default function FloatComponent({ value, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popover/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popover/index.tsx index 37dc13b4b..4613275dd 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popover/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popover/index.tsx @@ -1,3 +1,7 @@ +import { PopoverAnchor } from "@radix-ui/react-popover"; +import { uniqueId } from "lodash"; +import { X } from "lucide-react"; +import { type ReactNode, useMemo, useState } from "react"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { Badge } from "@/components/ui/badge"; @@ -14,10 +18,6 @@ import { PopoverContentWithoutPortal, } from "@/components/ui/popover"; import { cn } from "@/utils/utils"; -import { PopoverAnchor } from "@radix-ui/react-popover"; -import { uniqueId } from "lodash"; -import { X } from "lucide-react"; -import { ReactNode, useMemo, useState } from "react"; const OptionBadge = ({ option, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popoverObject/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popoverObject/index.tsx index 75a4f21d7..191c76085 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popoverObject/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/components/popoverObject/index.tsx @@ -1,3 +1,4 @@ +import { PopoverAnchor } from "@radix-ui/react-popover"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Command, @@ -13,7 +14,7 @@ import { PopoverContentWithoutPortal, } from "@/components/ui/popover"; import { classNames, cn } from "@/utils/utils"; -import { PopoverAnchor } from "@radix-ui/react-popover"; + const CustomInputPopoverObject = ({ id, refInput, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/index.tsx index b774164c5..11889f12d 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/inputComponent/index.tsx @@ -1,11 +1,11 @@ +import * as Form from "@radix-ui/react-form"; +import { useEffect, useRef, useState } from "react"; import ForwardedIconComponent from "@/components/common/genericIconComponent"; import { Input } from "@/components/ui/input"; import { ICON_STROKE_WIDTH } from "@/constants/constants"; -import { InputComponentType } from "@/types/components"; +import type { InputComponentType } from "@/types/components"; import { handleKeyDown } from "@/utils/reactflowUtils"; import { classNames, cn } from "@/utils/utils"; -import * as Form from "@radix-ui/react-form"; -import { useEffect, useRef, useState } from "react"; import { getIconName } from "./components/helpers/get-icon-name"; import CustomInputPopover from "./components/popover"; import CustomInputPopoverObject from "./components/popoverObject"; diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx index c8c7f7c57..61dfc0a0d 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx @@ -1,3 +1,4 @@ +import { useEffect } from "react"; import { ICON_STROKE_WIDTH } from "@/constants/constants"; import { useGetFilesV2 } from "@/controllers/API/queries/file-management"; import { usePostUploadFile } from "@/controllers/API/queries/files/use-post-upload-file"; @@ -7,7 +8,6 @@ import FileManagerModal from "@/modals/fileManagerModal"; import FilesRendererComponent from "@/modals/fileManagerModal/components/filesRendererComponent"; import useFileSizeValidator from "@/shared/hooks/use-file-size-validator"; import { cn } from "@/utils/utils"; -import { useEffect } from "react"; import { CONSOLE_ERROR_MSG, INVALID_FILE_ALERT, @@ -18,7 +18,7 @@ import IconComponent, { ForwardedIconComponent, } from "../../../../common/genericIconComponent"; import { Button } from "../../../../ui/button"; -import { FileComponentType, InputProps } from "../../types"; +import type { FileComponentType, InputProps } from "../../types"; export default function InputFileComponent({ value, @@ -111,7 +111,7 @@ export default function InputFileComponent({ ), ) .then((results) => { - console.log(results); + console.warn(results); // Filter out any failed uploads const successfulUploads = results.filter( (r): r is { file_name: string; file_path: string } => r !== null, @@ -134,7 +134,7 @@ export default function InputFileComponent({ } }) .catch((e) => { - console.log(e); + console.error(e); // Error handling is done in the onError callback above }); }, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/inputGlobalComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/inputGlobalComponent/index.tsx index 7f88eb2c8..8861931a6 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/inputGlobalComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/inputGlobalComponent/index.tsx @@ -1,14 +1,14 @@ +import { useEffect, useMemo, useRef } from "react"; import { useGetGlobalVariables } from "@/controllers/API/queries/variables"; import GeneralDeleteConfirmationModal from "@/shared/components/delete-confirmation-modal"; import { useGlobalVariablesStore } from "@/stores/globalVariablesStore/globalVariables"; -import { useEffect, useMemo, useRef } from "react"; import { cn } from "../../../../../utils/utils"; import ForwardedIconComponent from "../../../../common/genericIconComponent"; import { CommandItem } from "../../../../ui/command"; import GlobalVariableModal from "../../../GlobalVariableModal/GlobalVariableModal"; import { getPlaceholder } from "../../helpers/get-placeholder-disabled"; -import { InputGlobalComponentType, InputProps } from "../../types"; +import type { InputGlobalComponentType, InputProps } from "../../types"; import InputComponent from "../inputComponent"; export default function InputGlobalComponent({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/inputListComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/inputListComponent/index.tsx index 65558651a..5d1bbe57c 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/inputListComponent/index.tsx @@ -2,12 +2,11 @@ import _ from "lodash"; import { useCallback, useEffect, useRef, useState } from "react"; import { Button } from "@/components/ui/button"; -import { Input } from "../../../../ui/input"; -import { ButtonInputList } from "./components/button-input-list"; - import { cn } from "../../../../../utils/utils"; +import { Input } from "../../../../ui/input"; import { getPlaceholder } from "../../helpers/get-placeholder-disabled"; -import { InputListComponentType, InputProps } from "../../types"; +import type { InputListComponentType, InputProps } from "../../types"; +import { ButtonInputList } from "./components/button-input-list"; import { DeleteButtonInputList } from "./components/delete-button-input-list"; export default function InputListComponent({ @@ -20,7 +19,7 @@ export default function InputListComponent({ placeholder, listAddLabel, }: InputProps): JSX.Element { - const [dropdownOpen, setDropdownOpen] = useState(null); + const [_dropdownOpen, setDropdownOpen] = useState(null); const [focusedIndex, setFocusedIndex] = useState(null); const inputRef = useRef(null); diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/intComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/intComponent/index.tsx index ea9b6eed1..8fd7424f1 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/intComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/intComponent/index.tsx @@ -1,5 +1,3 @@ -import { ICON_STROKE_WIDTH } from "@/constants/constants"; -import { cn } from "@/utils/utils"; import { NumberDecrementStepper, NumberIncrementStepper, @@ -9,8 +7,10 @@ import { } from "@chakra-ui/number-input"; import { MinusIcon, PlusIcon } from "lucide-react"; import { useEffect, useRef, useState } from "react"; +import { ICON_STROKE_WIDTH } from "@/constants/constants"; +import { cn } from "@/utils/utils"; import { handleKeyDown } from "../../../../../utils/reactflowUtils"; -import { InputProps, IntComponentType } from "../../types"; +import type { InputProps, IntComponentType } from "../../types"; export default function IntComponent({ value, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/keypairListComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/keypairListComponent/index.tsx index ea225d757..410833a69 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/keypairListComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/keypairListComponent/index.tsx @@ -1,3 +1,5 @@ +import { cloneDeep } from "lodash"; +import { useEffect, useState } from "react"; import { Input } from "@/components/ui/input"; import { ICON_STROKE_WIDTH } from "@/constants/constants"; import { @@ -6,8 +8,6 @@ import { hasDuplicateKeys, } from "@/utils/reactflowUtils"; import { cn } from "@/utils/utils"; -import { cloneDeep } from "lodash"; -import { useEffect, useState } from "react"; import IconComponent from "../../../../common/genericIconComponent"; const KeypairListComponent = ({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/linkComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/linkComponent/index.tsx index 312562cb1..a31f1b400 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/linkComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/linkComponent/index.tsx @@ -2,7 +2,8 @@ import { customOpenNewTab } from "@/customization/utils/custom-open-new-tab"; import { classNames } from "../../../../../utils/utils"; import IconComponent from "../../../../common/genericIconComponent"; import { Button } from "../../../../ui/button"; -import { InputProps, LinkComponentType } from "../../types"; +import type { InputProps, LinkComponentType } from "../../types"; + const DEFAULT_ICON = "ExternalLink"; export default function LinkComponent({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/mcpComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/mcpComponent/index.tsx index d2c4ed24b..6be5062bb 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/mcpComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/mcpComponent/index.tsx @@ -1,13 +1,13 @@ +import { useEffect, useMemo, useRef, useState } from "react"; import { useAddMCPServer } from "@/controllers/API/queries/mcp/use-add-mcp-server"; import { useGetMCPServers } from "@/controllers/API/queries/mcp/use-get-mcp-servers"; import AddMcpServerModal from "@/modals/addMcpServerModal"; import useAlertStore from "@/stores/alertStore"; -import { useEffect, useMemo, useRef, useState } from "react"; import ListSelectionComponent from "../../../../../CustomNodes/GenericNode/components/ListSelectionComponent"; import { cn } from "../../../../../utils/utils"; import { default as ForwardedIconComponent } from "../../../../common/genericIconComponent"; import { Button } from "../../../../ui/button"; -import { InputProps } from "../../types"; +import type { InputProps } from "../../types"; export default function McpComponent({ value, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/multiselectComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/multiselectComponent/index.tsx index 17fc754a9..0b4289b89 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/multiselectComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/multiselectComponent/index.tsx @@ -17,7 +17,7 @@ import { PopoverContentWithoutPortal, PopoverTrigger, } from "../../../../ui/popover"; -import { InputProps, MultiselectComponentType } from "../../types"; +import type { InputProps, MultiselectComponentType } from "../../types"; export default function MultiselectComponent({ disabled, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/promptComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/promptComponent/index.tsx index e19cdff77..18b5af26b 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/promptComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/promptComponent/index.tsx @@ -5,7 +5,7 @@ import PromptModal from "@/modals/promptModal"; import { cn } from "../../../../../utils/utils"; import { Button } from "../../../../ui/button"; import { getPlaceholder } from "../../helpers/get-placeholder-disabled"; -import { InputProps, PromptAreaComponentType } from "../../types"; +import type { InputProps, PromptAreaComponentType } from "../../types"; const promptContentClasses = { base: "overflow-hidden text-clip whitespace-nowrap bg-background h-fit max-h-28", diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/queryComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/queryComponent/index.tsx index 22110d81a..8edcd1b79 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/queryComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/queryComponent/index.tsx @@ -1,11 +1,11 @@ +import { useRef, useState } from "react"; import { GRADIENT_CLASS } from "@/constants/constants"; import QueryModal from "@/modals/queryModal"; -import { useRef, useState } from "react"; import { cn } from "../../../../../utils/utils"; import IconComponent from "../../../../common/genericIconComponent"; import { Input } from "../../../../ui/input"; import { getPlaceholder } from "../../helpers/get-placeholder-disabled"; -import { InputProps, QueryComponentType } from "../../types"; +import type { InputProps, QueryComponentType } from "../../types"; import { getIconName } from "../inputComponent/components/helpers/get-icon-name"; const inputClasses = { diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/searchBarComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/searchBarComponent/index.tsx index 662511727..4af22f067 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/searchBarComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/searchBarComponent/index.tsx @@ -1,3 +1,4 @@ +import { useState } from "react"; import { ForwardedIconComponent } from "@/components/common/genericIconComponent"; import { DropdownMenu, @@ -6,7 +7,6 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Input } from "@/components/ui/input"; -import { useState } from "react"; interface SearchBarComponentProps { searchCategories?: string[]; diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/sliderComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/sliderComponent/index.tsx index 9216708fc..69cf295d5 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/sliderComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/sliderComponent/index.tsx @@ -1,12 +1,12 @@ -import { getMinOrMaxValue } from "@/components/core/parameterRenderComponent/components/sliderComponent/helpers/get-min-max-value"; -import { InputProps } from "@/components/core/parameterRenderComponent/types"; -import { Case } from "@/shared/components/caseComponent"; -import { useDarkStore } from "@/stores/darkStore"; -import { SliderComponentType } from "@/types/components"; -import { cn } from "@/utils/utils"; import * as SliderPrimitive from "@radix-ui/react-slider"; import clsx from "clsx"; import { useEffect, useState } from "react"; +import { getMinOrMaxValue } from "@/components/core/parameterRenderComponent/components/sliderComponent/helpers/get-min-max-value"; +import type { InputProps } from "@/components/core/parameterRenderComponent/types"; +import { Case } from "@/shared/components/caseComponent"; +import { useDarkStore } from "@/stores/darkStore"; +import type { SliderComponentType } from "@/types/components"; +import { cn } from "@/utils/utils"; import { SliderLabels } from "./components/slider-labels"; import { buildColorByName } from "./helpers/build-color-by-name"; diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/sortableListComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/sortableListComponent/index.tsx index 34c3e1f44..9b1a7fb85 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/sortableListComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/sortableListComponent/index.tsx @@ -1,10 +1,10 @@ -import ForwardedIconComponent from "@/components/common/genericIconComponent"; -import { Button } from "@/components/ui/button"; -import ListSelectionComponent from "@/CustomNodes/GenericNode/components/ListSelectionComponent"; -import { cn } from "@/utils/utils"; import { memo, useCallback, useEffect, useMemo, useState } from "react"; import { ReactSortable } from "react-sortablejs"; -import { InputProps } from "../../types"; +import ListSelectionComponent from "@/CustomNodes/GenericNode/components/ListSelectionComponent"; +import ForwardedIconComponent from "@/components/common/genericIconComponent"; +import { Button } from "@/components/ui/button"; +import { cn } from "@/utils/utils"; +import type { InputProps } from "../../types"; import HelperTextComponent from "../helperTextComponent"; type SortableListComponentProps = { diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/strRenderComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/strRenderComponent/index.tsx index b150c8c95..090a9bbb9 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/strRenderComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/strRenderComponent/index.tsx @@ -1,4 +1,4 @@ -import { InputProps, StrRenderComponentType } from "../../types"; +import type { InputProps, StrRenderComponentType } from "../../types"; import CopyFieldAreaComponent from "../copyFieldAreaComponent"; import DropdownComponent from "../dropdownComponent"; import InputGlobalComponent from "../inputGlobalComponent"; diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tabComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tabComponent/index.tsx index 6e5b0f712..84113f57e 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tabComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tabComponent/index.tsx @@ -1,7 +1,7 @@ +import { useEffect, useState } from "react"; import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs-button"; import { testIdCase } from "@/utils/utils"; -import { useEffect, useState } from "react"; -import { InputProps, TabComponentType } from "../../types"; +import type { InputProps, TabComponentType } from "../../types"; export default function TabComponent({ id, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/TableOptions/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/TableOptions/index.tsx index a7e42e37d..a9be54de8 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/TableOptions/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/TableOptions/index.tsx @@ -1,7 +1,7 @@ import IconComponent from "@/components/common/genericIconComponent"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import { Button } from "@/components/ui/button"; -import { TableOptionsTypeAPI } from "@/types/api"; +import type { TableOptionsTypeAPI } from "@/types/api"; import { cn } from "@/utils/utils"; export default function TableOptions({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAdvancedToggleCellRender/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAdvancedToggleCellRender/index.tsx index e4bacfab6..8821e59ec 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAdvancedToggleCellRender/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAdvancedToggleCellRender/index.tsx @@ -1,10 +1,10 @@ +import type { CustomCellRendererProps } from "ag-grid-react"; import useHandleOnNewValue from "@/CustomNodes/hooks/use-handle-new-value"; import ShadTooltip from "@/components/common/shadTooltipComponent"; import useFlowStore from "@/stores/flowStore"; import { useTweaksStore } from "@/stores/tweaksStore"; -import { APIClassType } from "@/types/api"; +import type { APIClassType } from "@/types/api"; import { isTargetHandleConnected } from "@/utils/reactflowUtils"; -import { CustomCellRendererProps } from "ag-grid-react"; import ToggleShadComponent from "../../../toggleShadComponent"; export default function TableAdvancedToggleCellRender({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAutoCellRender/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAutoCellRender/index.tsx index 16a9be4c3..500ecca1a 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAutoCellRender/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableAutoCellRender/index.tsx @@ -1,11 +1,11 @@ +import type { CustomCellRendererProps } from "ag-grid-react"; +import { uniqueId } from "lodash"; import NumberReader from "@/components/common/numberReader"; import ObjectRender from "@/components/common/objectRender"; import StringReader from "@/components/common/stringReaderComponent"; import DateReader from "@/components/core/dateReaderComponent"; import { Badge } from "@/components/ui/badge"; import { cn, isTimeStampString } from "@/utils/utils"; -import { CustomCellRendererProps } from "ag-grid-react"; -import { uniqueId } from "lodash"; import ToggleShadComponent from "../../../toggleShadComponent"; interface CustomCellRender extends CustomCellRendererProps { @@ -29,7 +29,7 @@ export default function TableAutoCellRender({ case "object": return ( ); diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableDropdownCellEditor/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableDropdownCellEditor/index.tsx index bf6994345..0e37d05c4 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableDropdownCellEditor/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableDropdownCellEditor/index.tsx @@ -1,4 +1,4 @@ -import { CustomCellEditorProps } from "ag-grid-react"; +import type { CustomCellEditorProps } from "ag-grid-react"; import InputComponent from "../../../inputComponent"; export default function TableDropdownCellEditor({ diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableNodeCellRender/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableNodeCellRender/index.tsx index 35dcde3fb..b24f0f3fc 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableNodeCellRender/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/components/tableNodeCellRender/index.tsx @@ -1,16 +1,16 @@ +import type { CustomCellRendererProps } from "ag-grid-react"; +import { useMemo } from "react"; import useHandleOnNewValue from "@/CustomNodes/hooks/use-handle-new-value"; import useHandleNodeClass from "@/CustomNodes/hooks/use-handle-node-class"; import { ParameterRenderComponent } from "@/components/core/parameterRenderComponent"; -import { NodeInfoType } from "@/components/core/parameterRenderComponent/types"; +import type { NodeInfoType } from "@/components/core/parameterRenderComponent/types"; import { IS_AUTO_LOGIN } from "@/constants/constants"; import { useIsAutoLogin } from "@/hooks/use-is-auto-login"; import useAuthStore from "@/stores/authStore"; import useFlowStore from "@/stores/flowStore"; -import { APIClassType } from "@/types/api"; +import type { APIClassType } from "@/types/api"; import { isTargetHandleConnected } from "@/utils/reactflowUtils"; import { cn } from "@/utils/utils"; -import { CustomCellRendererProps } from "ag-grid-react"; -import { useMemo } from "react"; export default function TableNodeCellRender({ value: { nodeId, parameterId, isTweaks }, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/index.tsx index cf7daa8c5..58ce5a526 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/tableComponent/index.tsx @@ -8,14 +8,14 @@ import { } from "@/constants/constants"; import { useDarkStore } from "@/stores/darkStore"; import "@/style/ag-theme-shadcn.css"; // Custom CSS applied to the grid -import { TableOptionsTypeAPI } from "@/types/api"; +import type { ColDef } from "ag-grid-community"; +import type { TableOptionsTypeAPI } from "@/types/api"; import { cn } from "@/utils/utils"; -import { ColDef } from "ag-grid-community"; import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the grid import "ag-grid-community/styles/ag-theme-quartz.css"; // Optional Theme applied to the grid -import { AgGridReact, AgGridReactProps } from "ag-grid-react"; +import { AgGridReact, type AgGridReactProps } from "ag-grid-react"; import cloneDeep from "lodash"; -import { ElementRef, forwardRef, useRef, useState } from "react"; +import { type ElementRef, forwardRef, useRef, useState } from "react"; import TableOptions from "./components/TableOptions"; import resetGrid from "./utils/reset-grid-columns"; @@ -54,7 +54,7 @@ const TableComponent = forwardRef< }, ref, ) => { - let colDef = props.columnDefs + const colDef = props.columnDefs .filter((col) => !col.hide) .map((col, index, filteredArray) => { let newCol = { @@ -205,22 +205,20 @@ const TableComponent = forwardRef< } if (colDef.length === 0) { - { - return ( -
- - - {NO_COLUMN_DEFINITION_ALERT_TITLE} - - {NO_COLUMN_DEFINITION_ALERT_DESCRIPTION} - - -
- ); - } + return ( +
+ + + {NO_COLUMN_DEFINITION_ALERT_TITLE} + + {NO_COLUMN_DEFINITION_ALERT_DESCRIPTION} + + +
+ ); } return (
nodeInformationMetadata?.nodeType === "mcp_sse", [nodeInformationMetadata?.nodeType], ); diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/toggleShadComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/toggleShadComponent/index.tsx index e17c33613..dcfa963c0 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/toggleShadComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/toggleShadComponent/index.tsx @@ -1,5 +1,5 @@ import { Switch } from "../../../../ui/switch"; -import { InputProps, ToggleComponentType } from "../../types"; +import type { InputProps, ToggleComponentType } from "../../types"; export default function ToggleShadComponent({ value, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/webhookFieldComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/webhookFieldComponent/index.tsx index a30620059..da076d260 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/webhookFieldComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/webhookFieldComponent/index.tsx @@ -1,10 +1,10 @@ +import { useContext, useEffect, useRef, useState } from "react"; import { AuthContext } from "@/contexts/authContext"; import { useGetBuildsMutation } from "@/controllers/API/queries/_builds/use-get-builds-polling-mutation"; import SecretKeyModalButton from "@/customization/components/custom-secret-key-modal-button"; import { ENABLE_DATASTAX_LANGFLOW } from "@/customization/feature-flags"; import { getModalPropsApiKey } from "@/customization/utils/get-modal-props"; -import { useContext, useEffect, useRef, useState } from "react"; -import { InputProps, TextAreaComponentType } from "../../types"; +import type { InputProps, TextAreaComponentType } from "../../types"; import CopyFieldAreaComponent from "../copyFieldAreaComponent"; import TextAreaComponent from "../textAreaComponent"; diff --git a/src/frontend/src/components/core/parameterRenderComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/index.tsx index ac58be58c..e6bc612dc 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/index.tsx @@ -1,14 +1,13 @@ -import { handleOnNewValueType } from "@/CustomNodes/hooks/use-handle-new-value"; -import TableNodeComponent from "@/components/core/parameterRenderComponent/components/TableNodeComponent"; +import { useMemo } from "react"; +import type { handleOnNewValueType } from "@/CustomNodes/hooks/use-handle-new-value"; import CodeAreaComponent from "@/components/core/parameterRenderComponent/components/codeAreaComponent"; import SliderComponent from "@/components/core/parameterRenderComponent/components/sliderComponent"; +import TableNodeComponent from "@/components/core/parameterRenderComponent/components/TableNodeComponent"; import TabComponent from "@/components/core/parameterRenderComponent/components/tabComponent"; import { TEXT_FIELD_TYPES } from "@/constants/constants"; import CustomConnectionComponent from "@/customization/components/custom-connectionComponent"; import CustomLinkComponent from "@/customization/components/custom-linkComponent"; -import { APIClassType, InputFieldType } from "@/types/api"; -import { useMemo } from "react"; -import ToolsComponent from "./components/ToolsComponent"; +import type { APIClassType, InputFieldType } from "@/types/api"; import DictComponent from "./components/dictComponent"; import { EmptyParameterComponent } from "./components/emptyParameterComponent"; import FloatComponent from "./components/floatComponent"; @@ -22,8 +21,9 @@ import PromptAreaComponent from "./components/promptComponent"; import QueryComponent from "./components/queryComponent"; import SortableListComponent from "./components/sortableListComponent"; import { StrRenderComponent } from "./components/strRenderComponent"; +import ToolsComponent from "./components/ToolsComponent"; import ToggleShadComponent from "./components/toggleShadComponent"; -import { InputProps, NodeInfoType } from "./types"; +import type { InputProps, NodeInfoType } from "./types"; export function ParameterRenderComponent({ handleOnNewValue, @@ -91,7 +91,7 @@ export function ParameterRenderComponent({ /> ); } - if (!!templateData.options) { + if (templateData.options) { return ( ); - case "connect": + case "connect": { const link = templateData?.options?.find( (option: any) => option?.name === templateValue, @@ -261,6 +261,7 @@ export function ParameterRenderComponent({ connectionLink={link as string} /> ); + } case "tab": return ( = { @@ -37,7 +37,7 @@ export type BaseInputProps = { export type InputProps< valueType = any, T = {}, - U extends object = object, + _U extends object = object, > = BaseInputProps & T & { placeholder?: string }; export type TableComponentType = { diff --git a/src/frontend/src/components/core/pdfViewer/Error/index.tsx b/src/frontend/src/components/core/pdfViewer/Error/index.tsx index 4b28fbcf2..ea0a4fd8a 100644 --- a/src/frontend/src/components/core/pdfViewer/Error/index.tsx +++ b/src/frontend/src/components/core/pdfViewer/Error/index.tsx @@ -4,7 +4,7 @@ import { } from "../../../../constants/constants"; import IconComponent from "../../../common/genericIconComponent"; -export default function Error(): JSX.Element { +export default function ErrorComponent(): JSX.Element { return (
diff --git a/src/frontend/src/components/core/pdfViewer/index.tsx b/src/frontend/src/components/core/pdfViewer/index.tsx index 044a15247..2602aa083 100644 --- a/src/frontend/src/components/core/pdfViewer/index.tsx +++ b/src/frontend/src/components/core/pdfViewer/index.tsx @@ -4,7 +4,7 @@ import "react-pdf/dist/esm/Page/AnnotationLayer.css"; import "react-pdf/dist/esm/Page/TextLayer.css"; import IconComponent from "../../common/genericIconComponent"; import Loading from "../../ui/loading"; -import Error from "./Error"; +import ErrorComponent from "./Error"; import NoDataPdf from "./noData"; pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`; @@ -92,7 +92,7 @@ export default function PdfViewer({ pdf }: { pdf: string }): JSX.Element { onLoadSuccess={onDocumentLoadSuccess} file={pdf} noData={} - error={} + error={} className="h-full w-full" > & { size?: number; diff --git a/src/frontend/src/components/ui/sidebar.tsx b/src/frontend/src/components/ui/sidebar.tsx index a2a1eab30..34aa82357 100644 --- a/src/frontend/src/components/ui/sidebar.tsx +++ b/src/frontend/src/components/ui/sidebar.tsx @@ -1,12 +1,11 @@ "use client"; import { Slot } from "@radix-ui/react-slot"; -import { VariantProps, cva } from "class-variance-authority"; +import { cva, type VariantProps } from "class-variance-authority"; import { PanelLeft } from "lucide-react"; import * as React from "react"; - -import { useIsMobile } from "@/hooks/use-mobile"; import { useHotkeys } from "react-hotkeys-hook"; +import { useIsMobile } from "@/hooks/use-mobile"; import isWrappedWithClass from "../../pages/FlowPage/components/PageComponent/utils/is-wrapped-with-class"; import { useShortcutsStore } from "../../stores/shortcuts"; import { cn } from "../../utils/utils"; diff --git a/src/frontend/src/components/ui/switch.tsx b/src/frontend/src/components/ui/switch.tsx index c9f0f1533..0ff4443af 100644 --- a/src/frontend/src/components/ui/switch.tsx +++ b/src/frontend/src/components/ui/switch.tsx @@ -1,8 +1,8 @@ "use client"; -import { cn } from "@/utils/utils"; import * as SwitchPrimitives from "@radix-ui/react-switch"; import * as React from "react"; +import { cn } from "@/utils/utils"; const Switch = React.forwardRef< React.ElementRef, diff --git a/src/frontend/src/components/ui/tabs-button.tsx b/src/frontend/src/components/ui/tabs-button.tsx index 3c2ed84d8..5fb403a2c 100644 --- a/src/frontend/src/components/ui/tabs-button.tsx +++ b/src/frontend/src/components/ui/tabs-button.tsx @@ -1,8 +1,8 @@ "use client"; -import { cn } from "@/utils/utils"; import * as TabsPrimitive from "@radix-ui/react-tabs"; import * as React from "react"; +import { cn } from "@/utils/utils"; const Tabs = TabsPrimitive.Root; diff --git a/src/frontend/src/components/ui/text-loop.tsx b/src/frontend/src/components/ui/text-loop.tsx index db8b91700..9e7bea68f 100644 --- a/src/frontend/src/components/ui/text-loop.tsx +++ b/src/frontend/src/components/ui/text-loop.tsx @@ -1,14 +1,14 @@ "use client"; -import { cn } from "@/utils/utils"; import { AnimatePresence, - AnimatePresenceProps, + type AnimatePresenceProps, motion, - Transition, - Variants, + type Transition, + type Variants, } from "framer-motion"; import { Children, useCallback, useEffect, useRef, useState } from "react"; +import { cn } from "@/utils/utils"; export type TextLoopProps = { children: React.ReactNode | React.ReactNode[]; diff --git a/src/frontend/src/components/ui/textAnimation.tsx b/src/frontend/src/components/ui/textAnimation.tsx index bcc5686b5..ef3a8235f 100644 --- a/src/frontend/src/components/ui/textAnimation.tsx +++ b/src/frontend/src/components/ui/textAnimation.tsx @@ -1,12 +1,12 @@ "use client"; -import { cn } from "@/utils/utils"; import { AnimatePresence, motion, - TargetAndTransition, - Variants, + type TargetAndTransition, + type Variants, } from "framer-motion"; import React from "react"; +import { cn } from "@/utils/utils"; type PresetType = "blur" | "shake" | "scale" | "fade" | "slide"; diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index 162562dae..0f589d7e4 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -1,7 +1,7 @@ // src/constants/constants.ts import custom from "../customization/config-constants"; -import { languageMap } from "../types/components"; +import type { languageMap } from "../types/components"; /** * invalid characters for flow name diff --git a/src/frontend/src/contexts/authContext.tsx b/src/frontend/src/contexts/authContext.tsx index 2411c09be..fbe7372d9 100644 --- a/src/frontend/src/contexts/authContext.tsx +++ b/src/frontend/src/contexts/authContext.tsx @@ -1,3 +1,5 @@ +import { createContext, useEffect, useState } from "react"; +import { Cookies } from "react-cookie"; import { LANGFLOW_ACCESS_TOKEN, LANGFLOW_API_TOKEN, @@ -8,11 +10,9 @@ import { useGetUserData } from "@/controllers/API/queries/auth"; import { useGetGlobalVariablesMutation } from "@/controllers/API/queries/variables/use-get-mutation-global-variables"; import useAuthStore from "@/stores/authStore"; import { setLocalStorage } from "@/utils/local-storage-util"; -import { createContext, useEffect, useState } from "react"; -import { Cookies } from "react-cookie"; import { useStoreStore } from "../stores/storeStore"; -import { Users } from "../types/api"; -import { AuthContextType } from "../types/contexts/auth"; +import type { Users } from "../types/api"; +import type { AuthContextType } from "../types/contexts/auth"; const initialValue: AuthContextType = { accessToken: null, diff --git a/src/frontend/src/contexts/index.tsx b/src/frontend/src/contexts/index.tsx index b935fb0ed..7cafb3110 100644 --- a/src/frontend/src/contexts/index.tsx +++ b/src/frontend/src/contexts/index.tsx @@ -1,8 +1,8 @@ -import { GradientWrapper } from "@/components/common/GradientWrapper"; -import { CustomWrapper } from "@/customization/custom-wrapper"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { ReactFlowProvider } from "@xyflow/react"; -import { ReactNode } from "react"; +import type { ReactNode } from "react"; +import { GradientWrapper } from "@/components/common/GradientWrapper"; +import { CustomWrapper } from "@/customization/custom-wrapper"; import { TooltipProvider } from "../components/ui/tooltip"; import { ApiInterceptor } from "../controllers/API/api"; import { AuthProvider } from "./authContext"; diff --git a/src/frontend/src/controllers/API/api.tsx b/src/frontend/src/controllers/API/api.tsx index b38105938..2edede810 100644 --- a/src/frontend/src/controllers/API/api.tsx +++ b/src/frontend/src/controllers/API/api.tsx @@ -1,14 +1,18 @@ +import axios, { + type AxiosError, + type AxiosInstance, + type AxiosRequestConfig, +} from "axios"; +import * as fetchIntercept from "fetch-intercept"; +import { useEffect } from "react"; +import { Cookies } from "react-cookie"; import { IS_AUTO_LOGIN } from "@/constants/constants"; import { baseURL } from "@/customization/constants"; import { useCustomApiHeaders } from "@/customization/hooks/use-custom-api-headers"; import { customGetAccessToken } from "@/customization/utils/custom-get-access-token"; import useAuthStore from "@/stores/authStore"; import { useUtilityStore } from "@/stores/utilityStore"; -import axios, { AxiosError, AxiosInstance, AxiosRequestConfig } from "axios"; -import * as fetchIntercept from "fetch-intercept"; -import { useEffect } from "react"; -import { Cookies } from "react-cookie"; -import { BuildStatus, EventDeliveryType } from "../../constants/enums"; +import { BuildStatus, type EventDeliveryType } from "../../constants/enums"; import useAlertStore from "../../stores/alertStore"; import useFlowStore from "../../stores/flowStore"; import { checkDuplicateRequestAndStoreRequest } from "./helpers/check-duplicate-requests"; @@ -19,7 +23,7 @@ const api: AxiosInstance = axios.create({ baseURL: baseURL, }); -const cookies = new Cookies(); +const _cookies = new Cookies(); function ApiInterceptor() { const autoLogin = useAuthStore((state) => state.autoLogin); const setErrorData = useAlertStore((state) => state.setErrorData); @@ -42,7 +46,7 @@ function ApiInterceptor() { useEffect(() => { const unregister = fetchIntercept.register({ - request: function (url, config) { + request: (url, config) => { const accessToken = customGetAccessToken(); if (accessToken && !isAuthorizedURL(config?.url)) { @@ -121,7 +125,7 @@ function ApiInterceptor() { ); return isDomainAllowed || isEndpointAllowed; - } catch (e) { + } catch (_e) { // Invalid URL return false; } @@ -139,7 +143,7 @@ function ApiInterceptor() { try { const parsedURL = new URL(url); return EXTERNAL_DOMAINS.some((domain) => parsedURL.origin === domain); - } catch (e) { + } catch (_e) { return false; } }; @@ -291,7 +295,7 @@ async function performStreamingRequest({ onNetworkError, buildController, }: StreamingRequestParams) { - let headers = { + const headers = { "Content-Type": "application/json", // this flag is fundamental to ensure server stops tasks when client disconnects Connection: "close", @@ -306,7 +310,7 @@ async function performStreamingRequest({ params["body"] = JSON.stringify(body); } let current: string[] = []; - let textDecoder = new TextDecoder(); + const textDecoder = new TextDecoder(); try { const response = await fetch(url, params); @@ -327,7 +331,7 @@ async function performStreamingRequest({ break; } const decodedChunk = textDecoder.decode(value); - let all = decodedChunk.split("\n\n"); + const all = decodedChunk.split("\n\n"); for (const string of all) { if (string.endsWith("}")) { const allString = current.join("") + string; @@ -336,7 +340,7 @@ async function performStreamingRequest({ const sanitizedJson = sanitizeJsonString(allString); data = JSON.parse(sanitizedJson); current = []; - } catch (e) { + } catch (_e) { current.push(string); continue; } diff --git a/src/frontend/src/controllers/API/helpers/constants.ts b/src/frontend/src/controllers/API/helpers/constants.ts index 627480595..083b198fd 100644 --- a/src/frontend/src/controllers/API/helpers/constants.ts +++ b/src/frontend/src/controllers/API/helpers/constants.ts @@ -39,8 +39,10 @@ export function getURL( v2: boolean = false, ) { let url = URLs[key]; - Object.keys(params).forEach((key) => (url += `/${params[key]}`)); - return `${v2 ? BASE_URL_API_V2 : BASE_URL_API}${url.toString()}`; + for (const paramKey of Object.keys(params)) { + url += `/${params[paramKey]}`; + } + return `${v2 ? BASE_URL_API_V2 : BASE_URL_API}${url}`; } export type URLsType = typeof URLs; diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index 28f17c183..17187b57c 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -1,17 +1,17 @@ +import type { Edge, Node, ReactFlowJsonObject } from "@xyflow/react"; +import type { AxiosRequestConfig, AxiosResponse } from "axios"; import { customGetAppVersions, customGetLatestVersion, } from "@/customization/utils/custom-get-app-latest-version"; -import { Edge, Node, ReactFlowJsonObject } from "@xyflow/react"; -import { AxiosRequestConfig, AxiosResponse } from "axios"; import { BASE_URL_API } from "../../constants/constants"; import { api } from "../../controllers/API/api"; -import { +import type { VertexBuildTypeAPI, VerticesOrderTypeAPI, } from "../../types/api/index"; -import { FlowStyleType, FlowType } from "../../types/flow"; -import { StoreComponentResponse } from "../../types/store"; +import type { FlowStyleType, FlowType } from "../../types/flow"; +import type { StoreComponentResponse } from "../../types/store"; const GITHUB_API_URL = "https://api.github.com"; const DISCORD_API_URL = @@ -289,7 +289,7 @@ export async function postBuildVertex( files?: string[], ): Promise> { // input_value is optional and is a query parameter - let data = {}; + const data = {}; if (typeof input_value !== "undefined") { data["inputs"] = { input_value: input_value }; } diff --git a/src/frontend/src/controllers/API/queries/_builds/use-delete-builds.ts b/src/frontend/src/controllers/API/queries/_builds/use-delete-builds.ts index 4ab6522e0..9fd3c8f43 100644 --- a/src/frontend/src/controllers/API/queries/_builds/use-delete-builds.ts +++ b/src/frontend/src/controllers/API/queries/_builds/use-delete-builds.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/_builds/use-get-builds-polling-mutation.ts b/src/frontend/src/controllers/API/queries/_builds/use-get-builds-polling-mutation.ts index 926fb9900..d589af9ae 100644 --- a/src/frontend/src/controllers/API/queries/_builds/use-get-builds-polling-mutation.ts +++ b/src/frontend/src/controllers/API/queries/_builds/use-get-builds-polling-mutation.ts @@ -1,15 +1,15 @@ +import { useEffect, useRef } from "react"; import useAlertStore from "@/stores/alertStore"; import useFlowStore from "@/stores/flowStore"; import { useUtilityStore } from "@/stores/utilityStore"; -import { useMutationFunctionType } from "@/types/api"; -import { FlowPoolType } from "@/types/zustand/flow"; -import { useEffect, useRef } from "react"; +import type { useMutationFunctionType } from "@/types/api"; +import type { FlowPoolType } from "@/types/zustand/flow"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; -const ERROR_DISPLAY_INTERVAL = 10000; -const ERROR_DISPLAY_COUNT = 1; +const _ERROR_DISPLAY_INTERVAL = 10000; +const _ERROR_DISPLAY_COUNT = 1; interface PollingItem { interval: NodeJS.Timeout; diff --git a/src/frontend/src/controllers/API/queries/_builds/use-get-builds.ts b/src/frontend/src/controllers/API/queries/_builds/use-get-builds.ts index 94b120b7e..e10bd6404 100644 --- a/src/frontend/src/controllers/API/queries/_builds/use-get-builds.ts +++ b/src/frontend/src/controllers/API/queries/_builds/use-get-builds.ts @@ -1,9 +1,9 @@ -import useFlowStore from "@/stores/flowStore"; -import { FlowPoolType } from "@/types/zustand/flow"; import { keepPreviousData } from "@tanstack/react-query"; -import { AxiosResponse } from "axios"; +import type { AxiosResponse } from "axios"; import { useParams } from "react-router-dom"; -import { useQueryFunctionType } from "../../../../types/api"; +import useFlowStore from "@/stores/flowStore"; +import type { FlowPoolType } from "@/types/zustand/flow"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/api-keys/use-delete-api-key.ts b/src/frontend/src/controllers/API/queries/api-keys/use-delete-api-key.ts index b70914318..bd478aa99 100644 --- a/src/frontend/src/controllers/API/queries/api-keys/use-delete-api-key.ts +++ b/src/frontend/src/controllers/API/queries/api-keys/use-delete-api-key.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/api-keys/use-get-api-keys.ts b/src/frontend/src/controllers/API/queries/api-keys/use-get-api-keys.ts index 5fbeb775f..3362e1c24 100644 --- a/src/frontend/src/controllers/API/queries/api-keys/use-get-api-keys.ts +++ b/src/frontend/src/controllers/API/queries/api-keys/use-get-api-keys.ts @@ -1,4 +1,4 @@ -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/api-keys/use-post-add-api-key.ts b/src/frontend/src/controllers/API/queries/api-keys/use-post-add-api-key.ts index adc6c5fc1..ef634371b 100644 --- a/src/frontend/src/controllers/API/queries/api-keys/use-post-add-api-key.ts +++ b/src/frontend/src/controllers/API/queries/api-keys/use-post-add-api-key.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-delete-users.ts b/src/frontend/src/controllers/API/queries/auth/use-delete-users.ts index 29ff378cb..4db841aa0 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-delete-users.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-delete-users.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-get-autologin.ts b/src/frontend/src/controllers/API/queries/auth/use-get-autologin.ts index 4d2e799e6..ab24d5712 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-get-autologin.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-get-autologin.ts @@ -1,3 +1,5 @@ +import type { AxiosError } from "axios"; +import { useContext, useRef } from "react"; import { AUTO_LOGIN_MAX_RETRY_DELAY, AUTO_LOGIN_RETRY_DELAY, @@ -6,9 +8,7 @@ import { import { AuthContext } from "@/contexts/authContext"; import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; import useAuthStore from "@/stores/authStore"; -import { AxiosError } from "axios"; -import { useContext, useRef } from "react"; -import { useQueryFunctionType, Users } from "../../../../types/api"; +import type { Users, useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; @@ -87,7 +87,7 @@ export const useGetAutoLogin: useQueryFunctionType = ( } else if (autoLoginNotAuthenticated) { const retryCount = retryCountRef.current; const delay = Math.min( - AUTO_LOGIN_RETRY_DELAY * Math.pow(2, retryCount), + AUTO_LOGIN_RETRY_DELAY * 2 ** retryCount, AUTO_LOGIN_MAX_RETRY_DELAY, ); diff --git a/src/frontend/src/controllers/API/queries/auth/use-get-user.ts b/src/frontend/src/controllers/API/queries/auth/use-get-user.ts index cf7bb1866..fec0eef94 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-get-user.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-get-user.ts @@ -1,6 +1,6 @@ +import type { UseMutationResult } from "@tanstack/react-query"; import useAuthStore from "@/stores/authStore"; -import { UseMutationResult } from "@tanstack/react-query"; -import { useMutationFunctionType, Users } from "../../../../types/api"; +import type { Users, useMutationFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-get-users-page.ts b/src/frontend/src/controllers/API/queries/auth/use-get-users-page.ts index 628adf3a0..688019807 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-get-users-page.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-get-users-page.ts @@ -1,5 +1,5 @@ -import { UseMutationResult } from "@tanstack/react-query"; -import { useMutationFunctionType, Users } from "../../../../types/api"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { Users, useMutationFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-patch-reset-password.ts b/src/frontend/src/controllers/API/queries/auth/use-patch-reset-password.ts index ac97dee60..2977c102d 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-patch-reset-password.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-patch-reset-password.ts @@ -1,5 +1,5 @@ -import { resetPasswordType, useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { resetPasswordType, useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-patch-update-user.ts b/src/frontend/src/controllers/API/queries/auth/use-patch-update-user.ts index 8193018eb..82e349bca 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-patch-update-user.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-patch-update-user.ts @@ -1,5 +1,5 @@ -import { changeUser, useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { changeUser, useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-post-add-user.ts b/src/frontend/src/controllers/API/queries/auth/use-post-add-user.ts index babed66db..5acd5cd5c 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-post-add-user.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-post-add-user.ts @@ -1,6 +1,6 @@ -import { Users, useMutationFunctionType } from "@/types/api"; -import { UserInputType } from "@/types/components"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { Users, useMutationFunctionType } from "@/types/api"; +import type { UserInputType } from "@/types/components"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-post-login-user.ts b/src/frontend/src/controllers/API/queries/auth/use-post-login-user.ts index 821c93b3a..2deb0b925 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-post-login-user.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-post-login-user.ts @@ -1,5 +1,5 @@ -import { LoginType, useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { LoginType, useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-post-logout.ts b/src/frontend/src/controllers/API/queries/auth/use-post-logout.ts index a26de63ba..0b5ce0014 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-post-logout.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-post-logout.ts @@ -1,14 +1,13 @@ -import useAuthStore from "@/stores/authStore"; -import { useMutationFunctionType } from "@/types/api"; - +import { Cookies } from "react-cookie"; import { IS_AUTO_LOGIN, LANGFLOW_AUTO_LOGIN_OPTION, } from "@/constants/constants"; +import useAuthStore from "@/stores/authStore"; import useFlowStore from "@/stores/flowStore"; import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useFolderStore } from "@/stores/foldersStore"; -import { Cookies } from "react-cookie"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/auth/use-post-refresh-access.ts b/src/frontend/src/controllers/API/queries/auth/use-post-refresh-access.ts index 5b3568aed..01843d01c 100644 --- a/src/frontend/src/controllers/API/queries/auth/use-post-refresh-access.ts +++ b/src/frontend/src/controllers/API/queries/auth/use-post-refresh-access.ts @@ -1,10 +1,11 @@ +import { Cookies } from "react-cookie"; import { IS_AUTO_LOGIN, LANGFLOW_REFRESH_TOKEN } from "@/constants/constants"; import useAuthStore from "@/stores/authStore"; -import { useMutationFunctionType } from "@/types/api"; -import { Cookies } from "react-cookie"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; + interface IRefreshAccessToken { access_token: string; refresh_token: string; diff --git a/src/frontend/src/controllers/API/queries/config/use-get-config.ts b/src/frontend/src/controllers/API/queries/config/use-get-config.ts index 53c66064f..baa072e04 100644 --- a/src/frontend/src/controllers/API/queries/config/use-get-config.ts +++ b/src/frontend/src/controllers/API/queries/config/use-get-config.ts @@ -1,3 +1,4 @@ +import axios from "axios"; import { DEFAULT_POLLING_INTERVAL, DEFAULT_TIMEOUT, @@ -5,8 +6,7 @@ import { import { EventDeliveryType } from "@/constants/enums"; import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useUtilityStore } from "@/stores/utilityStore"; -import axios from "axios"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-delete-file.ts b/src/frontend/src/controllers/API/queries/file-management/use-delete-file.ts index 2a2743390..cc7dceff1 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-delete-file.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-delete-file.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-delete-files.ts b/src/frontend/src/controllers/API/queries/file-management/use-delete-files.ts index d2128782c..cf7dcf0d4 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-delete-files.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-delete-files.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-duplicate-file.ts b/src/frontend/src/controllers/API/queries/file-management/use-duplicate-file.ts index 7f5cf491b..b743f035a 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-duplicate-file.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-duplicate-file.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-get-download-file.ts b/src/frontend/src/controllers/API/queries/file-management/use-get-download-file.ts index a791bd562..cb53d1b36 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-get-download-file.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-get-download-file.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "../../../../types/api"; +import type { useMutationFunctionType } from "../../../../types/api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts b/src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts index 468fa90a6..4de074796 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "../../../../types/api"; +import type { useMutationFunctionType } from "../../../../types/api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-get-files.ts b/src/frontend/src/controllers/API/queries/file-management/use-get-files.ts index ec2d9e1db..bbd0f45ee 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-get-files.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-get-files.ts @@ -1,6 +1,6 @@ -import { FileType } from "@/types/file_management"; import { keepPreviousData } from "@tanstack/react-query"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { FileType } from "@/types/file_management"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-post-upload-file.ts b/src/frontend/src/controllers/API/queries/file-management/use-post-upload-file.ts index bed6b4ec5..247ffa855 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-post-upload-file.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-post-upload-file.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { FileType } from "@/types/file_management"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { FileType } from "@/types/file_management"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/file-management/use-put-rename-file.ts b/src/frontend/src/controllers/API/queries/file-management/use-put-rename-file.ts index 9aa10606c..a2f523478 100644 --- a/src/frontend/src/controllers/API/queries/file-management/use-put-rename-file.ts +++ b/src/frontend/src/controllers/API/queries/file-management/use-put-rename-file.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/files/use-download-files.ts b/src/frontend/src/controllers/API/queries/files/use-download-files.ts index 7766637ee..1c352c386 100644 --- a/src/frontend/src/controllers/API/queries/files/use-download-files.ts +++ b/src/frontend/src/controllers/API/queries/files/use-download-files.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "../../../../types/api"; +import type { useMutationFunctionType } from "../../../../types/api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/files/use-get-download-images.ts b/src/frontend/src/controllers/API/queries/files/use-get-download-images.ts index d255b8d38..2bcc037b8 100644 --- a/src/frontend/src/controllers/API/queries/files/use-get-download-images.ts +++ b/src/frontend/src/controllers/API/queries/files/use-get-download-images.ts @@ -1,5 +1,5 @@ import { keepPreviousData } from "@tanstack/react-query"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/files/use-get-profile-pictures.ts b/src/frontend/src/controllers/API/queries/files/use-get-profile-pictures.ts index e2488c0f1..8506a6229 100644 --- a/src/frontend/src/controllers/API/queries/files/use-get-profile-pictures.ts +++ b/src/frontend/src/controllers/API/queries/files/use-get-profile-pictures.ts @@ -1,5 +1,5 @@ import { keepPreviousData } from "@tanstack/react-query"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/files/use-post-upload-file.ts b/src/frontend/src/controllers/API/queries/files/use-post-upload-file.ts index 21bca9bac..fcdc9018f 100644 --- a/src/frontend/src/controllers/API/queries/files/use-post-upload-file.ts +++ b/src/frontend/src/controllers/API/queries/files/use-post-upload-file.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-delete-delete-flows.ts b/src/frontend/src/controllers/API/queries/flows/use-delete-delete-flows.ts index 650f2caec..8571c3546 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-delete-delete-flows.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-delete-delete-flows.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-get-basic-examples.ts b/src/frontend/src/controllers/API/queries/flows/use-get-basic-examples.ts index 45066c22f..30777294f 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-get-basic-examples.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-get-basic-examples.ts @@ -1,6 +1,6 @@ import useFlowsManagerStore from "@/stores/flowsManagerStore"; -import { useQueryFunctionType } from "@/types/api"; -import { FlowType } from "@/types/flow"; +import type { useQueryFunctionType } from "@/types/api"; +import type { FlowType } from "@/types/flow"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-get-download-flows.ts b/src/frontend/src/controllers/API/queries/flows/use-get-download-flows.ts index ae1def61e..33f053ea6 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-get-download-flows.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-get-download-flows.ts @@ -1,6 +1,6 @@ -import { FlowType } from "@/types/flow"; +import type { FlowType } from "@/types/flow"; import { downloadFlow, processFlows } from "@/utils/reactflowUtils"; -import { useMutationFunctionType } from "../../../../types/api"; +import type { useMutationFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-get-flow.ts b/src/frontend/src/controllers/API/queries/flows/use-get-flow.ts index 85334fd2e..952729bad 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-get-flow.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-get-flow.ts @@ -1,7 +1,7 @@ -import { useMutationFunctionType } from "@/types/api"; -import { FlowType } from "@/types/flow"; -import { processFlows } from "@/utils/reactflowUtils"; import { useQueryClient } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { FlowType } from "@/types/flow"; +import { processFlows } from "@/utils/reactflowUtils"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-get-refresh-flows-query.ts b/src/frontend/src/controllers/API/queries/flows/use-get-refresh-flows-query.ts index b01bf8df3..1bbca7636 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-get-refresh-flows-query.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-get-refresh-flows-query.ts @@ -1,15 +1,15 @@ +import type { UseQueryOptions } from "@tanstack/react-query"; +import { AxiosError } from "axios"; import buildQueryStringUrl from "@/controllers/utils/create-query-param-string"; import useAlertStore from "@/stores/alertStore"; import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useTypesStore } from "@/stores/typesStore"; -import { useQueryFunctionType } from "@/types/api"; -import { FlowType, PaginatedFlowsType } from "@/types/flow"; +import type { useQueryFunctionType } from "@/types/api"; +import type { FlowType, PaginatedFlowsType } from "@/types/flow"; import { extractFieldsFromComponenents, processFlows, } from "@/utils/reactflowUtils"; -import { UseQueryOptions } from "@tanstack/react-query"; -import { AxiosError } from "axios"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-get-types.ts b/src/frontend/src/controllers/API/queries/flows/use-get-types.ts index fa4999570..b1d498ef2 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-get-types.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-get-types.ts @@ -1,6 +1,9 @@ import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useTypesStore } from "@/stores/typesStore"; -import { APIObjectType, useQueryFunctionType } from "../../../../types/api"; +import type { + APIObjectType, + useQueryFunctionType, +} from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts b/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts index 2e4e8b8e0..ee870b991 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; -import { ReactFlowJsonObject } from "@xyflow/react"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { ReactFlowJsonObject } from "@xyflow/react"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/flows/use-post-add-flow.ts b/src/frontend/src/controllers/API/queries/flows/use-post-add-flow.ts index 40b8bfb58..4273d0d6e 100644 --- a/src/frontend/src/controllers/API/queries/flows/use-post-add-flow.ts +++ b/src/frontend/src/controllers/API/queries/flows/use-post-add-flow.ts @@ -1,7 +1,7 @@ +import type { UseMutationResult } from "@tanstack/react-query"; +import type { ReactFlowJsonObject } from "@xyflow/react"; import { useFolderStore } from "@/stores/foldersStore"; -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; -import { ReactFlowJsonObject } from "@xyflow/react"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-delete-folders.ts b/src/frontend/src/controllers/API/queries/folders/use-delete-folders.ts index 7ef2af8eb..d4397b74b 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-delete-folders.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-delete-folders.ts @@ -1,6 +1,6 @@ +import type { UseMutationResult } from "@tanstack/react-query"; import { useFolderStore } from "@/stores/foldersStore"; -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-get-download-folders.ts b/src/frontend/src/controllers/API/queries/folders/use-get-download-folders.ts index 4b3eec975..573477790 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-get-download-folders.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-get-download-folders.ts @@ -1,9 +1,10 @@ +import type { UseMutationResult } from "@tanstack/react-query"; import { customGetDownloadTypeFolders } from "@/customization/utils/custom-get-download-folders"; -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; + interface IGetDownloadFolders { folderId: string; } diff --git a/src/frontend/src/controllers/API/queries/folders/use-get-folder.ts b/src/frontend/src/controllers/API/queries/folders/use-get-folder.ts index 944b0fe00..9f9177fe1 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-get-folder.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-get-folder.ts @@ -1,10 +1,10 @@ -import buildQueryStringUrl from "@/controllers/utils/create-query-param-string"; -import { PaginatedFolderType } from "@/pages/MainPage/entities"; -import { useFolderStore } from "@/stores/foldersStore"; -import { useQueryFunctionType } from "@/types/api"; -import { processFlows } from "@/utils/reactflowUtils"; import { cloneDeep } from "lodash"; import { useRef } from "react"; +import buildQueryStringUrl from "@/controllers/utils/create-query-param-string"; +import type { PaginatedFolderType } from "@/pages/MainPage/entities"; +import { useFolderStore } from "@/stores/foldersStore"; +import type { useQueryFunctionType } from "@/types/api"; +import { processFlows } from "@/utils/reactflowUtils"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-get-folders.ts b/src/frontend/src/controllers/API/queries/folders/use-get-folders.ts index 61151242a..1a0b28456 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-get-folders.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-get-folders.ts @@ -1,8 +1,8 @@ import { DEFAULT_FOLDER } from "@/constants/constants"; -import { FolderType } from "@/pages/MainPage/entities"; +import type { FolderType } from "@/pages/MainPage/entities"; import useAuthStore from "@/stores/authStore"; import { useFolderStore } from "@/stores/foldersStore"; -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-patch-folders.ts b/src/frontend/src/controllers/API/queries/folders/use-patch-folders.ts index bc57341ff..ce5325d18 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-patch-folders.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-patch-folders.ts @@ -1,5 +1,5 @@ -import { AddFolderType } from "@/pages/MainPage/entities"; -import { useMutationFunctionType } from "@/types/api"; +import type { AddFolderType } from "@/pages/MainPage/entities"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-post-folders.ts b/src/frontend/src/controllers/API/queries/folders/use-post-folders.ts index 22652e728..2d689b8f7 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-post-folders.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-post-folders.ts @@ -1,5 +1,5 @@ -import { AddFolderType } from "@/pages/MainPage/entities"; -import { useMutationFunctionType } from "@/types/api"; +import type { AddFolderType } from "@/pages/MainPage/entities"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-post-upload-folders.ts b/src/frontend/src/controllers/API/queries/folders/use-post-upload-folders.ts index 539fab220..410185b14 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-post-upload-folders.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-post-upload-folders.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/folders/use-post-upload-to-folder.ts b/src/frontend/src/controllers/API/queries/folders/use-post-upload-to-folder.ts index 25e60bf0c..71beb6fa0 100644 --- a/src/frontend/src/controllers/API/queries/folders/use-post-upload-to-folder.ts +++ b/src/frontend/src/controllers/API/queries/folders/use-post-upload-to-folder.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/health/use-get-health.ts b/src/frontend/src/controllers/API/queries/health/use-get-health.ts index 11fc1af06..bb43e4381 100644 --- a/src/frontend/src/controllers/API/queries/health/use-get-health.ts +++ b/src/frontend/src/controllers/API/queries/health/use-get-health.ts @@ -1,3 +1,5 @@ +import { keepPreviousData } from "@tanstack/react-query"; +import type { AxiosError } from "axios"; import { REFETCH_SERVER_HEALTH_INTERVAL, SERVER_HEALTH_INTERVAL, @@ -5,9 +7,7 @@ import { import { HEALTH_CHECK_URL } from "@/customization/config-constants"; import { useUtilityStore } from "@/stores/utilityStore"; import { createNewError503 } from "@/types/factory/axios-error-503"; -import { keepPreviousData } from "@tanstack/react-query"; -import { AxiosError } from "axios"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-add-mcp-server.ts b/src/frontend/src/controllers/API/queries/mcp/use-add-mcp-server.ts index cb5997e20..3bf5b34c2 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-add-mcp-server.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-add-mcp-server.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { MCPServerType } from "@/types/mcp"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { MCPServerType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; @@ -20,7 +20,7 @@ export const useAddMCPServer: useMutationFunctionType< body: MCPServerType, ): Promise { try { - let payload: Omit = {}; + const payload: Omit = {}; if (body.url) { payload.url = body.url; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-delete-mcp-server.ts b/src/frontend/src/controllers/API/queries/mcp/use-delete-mcp-server.ts index 6b15a9a13..a3e0f1cad 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-delete-mcp-server.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-delete-mcp-server.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { MCPServerType } from "@/types/mcp"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { MCPServerType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-get-flows-mcp.ts b/src/frontend/src/controllers/API/queries/mcp/use-get-flows-mcp.ts index b7945b97c..939e33e5f 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-get-flows-mcp.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-get-flows-mcp.ts @@ -1,5 +1,5 @@ -import { useQueryFunctionType } from "@/types/api"; -import { MCPSettingsType } from "@/types/mcp"; +import type { useQueryFunctionType } from "@/types/api"; +import type { MCPSettingsType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-get-installed-mcp.ts b/src/frontend/src/controllers/API/queries/mcp/use-get-installed-mcp.ts index 3bdfaf7c2..67acf56b9 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-get-installed-mcp.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-get-installed-mcp.ts @@ -1,4 +1,4 @@ -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-server.ts b/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-server.ts index 7b2af0844..4cbcd2ce9 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-server.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-server.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { MCPServerType } from "@/types/mcp"; +import type { useMutationFunctionType } from "@/types/api"; +import type { MCPServerType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-servers.ts b/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-servers.ts index 1aa9e850b..f63d6bfd7 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-servers.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-get-mcp-servers.ts @@ -1,6 +1,6 @@ -import { useQueryFunctionType } from "@/types/api"; -import { MCPServerInfoType } from "@/types/mcp"; import { useEffect } from "react"; +import type { useQueryFunctionType } from "@/types/api"; +import type { MCPServerInfoType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-patch-flows-mcp.ts b/src/frontend/src/controllers/API/queries/mcp/use-patch-flows-mcp.ts index e218dccc8..a4457f7e1 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-patch-flows-mcp.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-patch-flows-mcp.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { MCPSettingsType } from "@/types/mcp"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { MCPSettingsType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-patch-install-mcp.ts b/src/frontend/src/controllers/API/queries/mcp/use-patch-install-mcp.ts index 6d349c944..da5b21786 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-patch-install-mcp.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-patch-install-mcp.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/mcp/use-patch-mcp-server.ts b/src/frontend/src/controllers/API/queries/mcp/use-patch-mcp-server.ts index a00c2f4c5..8eff3eae8 100644 --- a/src/frontend/src/controllers/API/queries/mcp/use-patch-mcp-server.ts +++ b/src/frontend/src/controllers/API/queries/mcp/use-patch-mcp-server.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { MCPServerType } from "@/types/mcp"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { MCPServerType } from "@/types/mcp"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; @@ -20,7 +20,7 @@ export const usePatchMCPServer: useMutationFunctionType< body: MCPServerType, ): Promise { try { - let payload: Omit = {}; + const payload: Omit = {}; if (body.url) { payload.url = body.url; diff --git a/src/frontend/src/controllers/API/queries/messages/use-delete-messages.ts b/src/frontend/src/controllers/API/queries/messages/use-delete-messages.ts index ad5bcbffd..b58a3c4a9 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-delete-messages.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-delete-messages.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/messages/use-delete-sessions.ts b/src/frontend/src/controllers/API/queries/messages/use-delete-sessions.ts index 8f778a662..bf18e53d8 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-delete-sessions.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-delete-sessions.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/messages/use-get-messages-polling.ts b/src/frontend/src/controllers/API/queries/messages/use-get-messages-polling.ts index 6e78fd333..cc3dd6123 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-get-messages-polling.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-get-messages-polling.ts @@ -1,7 +1,7 @@ -import { useMessagesStore } from "@/stores/messagesStore"; -import { UseMutationResult } from "@tanstack/react-query"; -import { ColDef, ColGroupDef } from "ag-grid-community"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { ColDef, ColGroupDef } from "ag-grid-community"; import { useEffect, useRef } from "react"; +import { useMessagesStore } from "@/stores/messagesStore"; import { extractColumnsFromRows, prepareSessionIdForAPI, @@ -96,7 +96,7 @@ export const useGetMessagesPollingMutation = ( payload: MessagesQueryParams, ): Promise => { const requestId = payload.id || "default"; - const sessionId = payload.session_id; + const _sessionId = payload.session_id; if (requestInProgressRef.current[requestId]) { return Promise.reject("Request already in progress"); diff --git a/src/frontend/src/controllers/API/queries/messages/use-get-messages.ts b/src/frontend/src/controllers/API/queries/messages/use-get-messages.ts index 07a049758..440b20f4f 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-get-messages.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-get-messages.ts @@ -1,8 +1,8 @@ +import { keepPreviousData } from "@tanstack/react-query"; +import type { ColDef, ColGroupDef } from "ag-grid-community"; import useFlowStore from "@/stores/flowStore"; import { useMessagesStore } from "@/stores/messagesStore"; -import { keepPreviousData } from "@tanstack/react-query"; -import { ColDef, ColGroupDef } from "ag-grid-community"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { useQueryFunctionType } from "../../../../types/api"; import { extractColumnsFromRows, prepareSessionIdForAPI, diff --git a/src/frontend/src/controllers/API/queries/messages/use-get-sessions-from-flow.ts b/src/frontend/src/controllers/API/queries/messages/use-get-sessions-from-flow.ts index f203f2f1c..b9deb81f3 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-get-sessions-from-flow.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-get-sessions-from-flow.ts @@ -1,6 +1,6 @@ -import useFlowStore from "@/stores/flowStore"; import { keepPreviousData } from "@tanstack/react-query"; -import { useQueryFunctionType } from "../../../../types/api"; +import useFlowStore from "@/stores/flowStore"; +import type { useQueryFunctionType } from "../../../../types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/messages/use-put-update-messages.ts b/src/frontend/src/controllers/API/queries/messages/use-put-update-messages.ts index 229210d20..20499917e 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-put-update-messages.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-put-update-messages.ts @@ -1,8 +1,8 @@ -import useFlowsManagerStore from "@/stores/flowsManagerStore"; +import type { UseMutationResult } from "@tanstack/react-query"; import useFlowStore from "@/stores/flowStore"; -import { useMutationFunctionType } from "@/types/api"; -import { Message } from "@/types/messages"; -import { UseMutationResult } from "@tanstack/react-query"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; +import type { useMutationFunctionType } from "@/types/api"; +import type { Message } from "@/types/messages"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/messages/use-rename-session.ts b/src/frontend/src/controllers/API/queries/messages/use-rename-session.ts index f9df9fa0c..1e925acb1 100644 --- a/src/frontend/src/controllers/API/queries/messages/use-rename-session.ts +++ b/src/frontend/src/controllers/API/queries/messages/use-rename-session.ts @@ -1,7 +1,7 @@ +import type { UseMutationResult } from "@tanstack/react-query"; import useFlowStore from "@/stores/flowStore"; -import { useMutationFunctionType } from "@/types/api"; -import { Message } from "@/types/messages"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { Message } from "@/types/messages"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/nodes/use-post-template-value.ts b/src/frontend/src/controllers/API/queries/nodes/use-post-template-value.ts index 20302a1cd..e92ff418d 100644 --- a/src/frontend/src/controllers/API/queries/nodes/use-post-template-value.ts +++ b/src/frontend/src/controllers/API/queries/nodes/use-post-template-value.ts @@ -1,10 +1,10 @@ +import type { UseMutationResult } from "@tanstack/react-query"; import useFlowStore from "@/stores/flowStore"; -import { +import type { APIClassType, ResponseErrorDetailAPI, useMutationFunctionType, } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/nodes/use-post-validate-code.ts b/src/frontend/src/controllers/API/queries/nodes/use-post-validate-code.ts index 5dfca96b2..dc0210909 100644 --- a/src/frontend/src/controllers/API/queries/nodes/use-post-validate-code.ts +++ b/src/frontend/src/controllers/API/queries/nodes/use-post-validate-code.ts @@ -1,9 +1,9 @@ -import { +import type { UseMutationResult } from "@tanstack/react-query"; +import type { APICodeValidateType, ResponseErrorDetailAPI, useMutationFunctionType, } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/nodes/use-post-validate-component-code.ts b/src/frontend/src/controllers/API/queries/nodes/use-post-validate-component-code.ts index 55ceaf0f5..e41b854cb 100644 --- a/src/frontend/src/controllers/API/queries/nodes/use-post-validate-component-code.ts +++ b/src/frontend/src/controllers/API/queries/nodes/use-post-validate-component-code.ts @@ -1,10 +1,10 @@ -import { +import type { UseMutationResult } from "@tanstack/react-query"; +import type { APIClassType, CustomComponentRequest, ResponseErrorTypeAPI, useMutationFunctionType, } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/nodes/use-post-validate-prompt.ts b/src/frontend/src/controllers/API/queries/nodes/use-post-validate-prompt.ts index ce16ea6cc..867770ba8 100644 --- a/src/frontend/src/controllers/API/queries/nodes/use-post-validate-prompt.ts +++ b/src/frontend/src/controllers/API/queries/nodes/use-post-validate-prompt.ts @@ -1,10 +1,10 @@ -import { +import type { UseMutationResult } from "@tanstack/react-query"; +import type { APIClassType, PromptTypeAPI, ResponseErrorDetailAPI, useMutationFunctionType, } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/store/use-get-tags.ts b/src/frontend/src/controllers/API/queries/store/use-get-tags.ts index 23208412e..f0ad9579c 100644 --- a/src/frontend/src/controllers/API/queries/store/use-get-tags.ts +++ b/src/frontend/src/controllers/API/queries/store/use-get-tags.ts @@ -1,5 +1,5 @@ import { useUtilityStore } from "@/stores/utilityStore"; -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/store/use-post-like-component.ts b/src/frontend/src/controllers/API/queries/store/use-post-like-component.ts index 1fca6b4bd..784c29c65 100644 --- a/src/frontend/src/controllers/API/queries/store/use-post-like-component.ts +++ b/src/frontend/src/controllers/API/queries/store/use-post-like-component.ts @@ -1,4 +1,4 @@ -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/transactions/use-get-transactions.ts b/src/frontend/src/controllers/API/queries/transactions/use-get-transactions.ts index 041f633f1..97221d0c9 100644 --- a/src/frontend/src/controllers/API/queries/transactions/use-get-transactions.ts +++ b/src/frontend/src/controllers/API/queries/transactions/use-get-transactions.ts @@ -1,6 +1,6 @@ import { keepPreviousData } from "@tanstack/react-query"; -import { ColDef, ColGroupDef } from "ag-grid-community"; -import { useQueryFunctionType } from "../../../../types/api"; +import type { ColDef, ColGroupDef } from "ag-grid-community"; +import type { useQueryFunctionType } from "../../../../types/api"; import { extractColumnsFromRows } from "../../../../utils/utils"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; diff --git a/src/frontend/src/controllers/API/queries/variables/use-delete-global-variables.ts b/src/frontend/src/controllers/API/queries/variables/use-delete-global-variables.ts index 82af42242..4de820a88 100644 --- a/src/frontend/src/controllers/API/queries/variables/use-delete-global-variables.ts +++ b/src/frontend/src/controllers/API/queries/variables/use-delete-global-variables.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/variables/use-get-global-variables.ts b/src/frontend/src/controllers/API/queries/variables/use-get-global-variables.ts index d939e2970..7991a4e45 100644 --- a/src/frontend/src/controllers/API/queries/variables/use-get-global-variables.ts +++ b/src/frontend/src/controllers/API/queries/variables/use-get-global-variables.ts @@ -1,9 +1,9 @@ +import type { UseQueryResult } from "@tanstack/react-query"; import useAuthStore from "@/stores/authStore"; import { useGlobalVariablesStore } from "@/stores/globalVariablesStore/globalVariables"; import getUnavailableFields from "@/stores/globalVariablesStore/utils/get-unavailable-fields"; -import { useQueryFunctionType } from "@/types/api"; -import { GlobalVariable } from "@/types/global_variables"; -import { UseQueryResult } from "@tanstack/react-query"; +import type { useQueryFunctionType } from "@/types/api"; +import type { GlobalVariable } from "@/types/global_variables"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/variables/use-get-mutation-global-variables.ts b/src/frontend/src/controllers/API/queries/variables/use-get-mutation-global-variables.ts index b60e67e3a..46d18a019 100644 --- a/src/frontend/src/controllers/API/queries/variables/use-get-mutation-global-variables.ts +++ b/src/frontend/src/controllers/API/queries/variables/use-get-mutation-global-variables.ts @@ -1,8 +1,8 @@ +import type { UseMutationResult } from "@tanstack/react-query"; import { useGlobalVariablesStore } from "@/stores/globalVariablesStore/globalVariables"; import getUnavailableFields from "@/stores/globalVariablesStore/utils/get-unavailable-fields"; -import { useMutationFunctionType } from "@/types/api"; -import { GlobalVariable } from "@/types/global_variables"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; +import type { GlobalVariable } from "@/types/global_variables"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/variables/use-patch-global-variables.ts b/src/frontend/src/controllers/API/queries/variables/use-patch-global-variables.ts index 3530ce4ec..deebaea7f 100644 --- a/src/frontend/src/controllers/API/queries/variables/use-patch-global-variables.ts +++ b/src/frontend/src/controllers/API/queries/variables/use-patch-global-variables.ts @@ -1,5 +1,5 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/variables/use-post-global-variables.ts b/src/frontend/src/controllers/API/queries/variables/use-post-global-variables.ts index 90bdc21de..4e9007cd2 100644 --- a/src/frontend/src/controllers/API/queries/variables/use-post-global-variables.ts +++ b/src/frontend/src/controllers/API/queries/variables/use-post-global-variables.ts @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { UseMutationResult } from "@tanstack/react-query"; -import { AxiosResponse } from "axios"; +import type { UseMutationResult } from "@tanstack/react-query"; +import type { AxiosResponse } from "axios"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/version/use-get-version.ts b/src/frontend/src/controllers/API/queries/version/use-get-version.ts index bf72fa9a7..f3839d018 100644 --- a/src/frontend/src/controllers/API/queries/version/use-get-version.ts +++ b/src/frontend/src/controllers/API/queries/version/use-get-version.ts @@ -1,6 +1,6 @@ import { customRefreshLatestVersion } from "@/customization/utils/custom-refresh-latest-version"; import { useDarkStore } from "@/stores/darkStore"; -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/queries/vertex/use-post-retrieve-vertex-order.tsx b/src/frontend/src/controllers/API/queries/vertex/use-post-retrieve-vertex-order.tsx index 07e75a7d9..356ce94ba 100644 --- a/src/frontend/src/controllers/API/queries/vertex/use-post-retrieve-vertex-order.tsx +++ b/src/frontend/src/controllers/API/queries/vertex/use-post-retrieve-vertex-order.tsx @@ -1,6 +1,6 @@ -import { useMutationFunctionType } from "@/types/api"; -import { ReactFlowJsonObject } from "@xyflow/react"; -import { AxiosRequestConfig } from "axios"; +import type { ReactFlowJsonObject } from "@xyflow/react"; +import type { AxiosRequestConfig } from "axios"; +import type { useMutationFunctionType } from "@/types/api"; import { api } from "../../api"; import { getURL } from "../../helpers/constants"; import { UseRequestProcessor } from "../../services/request-processor"; diff --git a/src/frontend/src/controllers/API/services/request-processor.ts b/src/frontend/src/controllers/API/services/request-processor.ts index c54f445f1..41e9c19a8 100644 --- a/src/frontend/src/controllers/API/services/request-processor.ts +++ b/src/frontend/src/controllers/API/services/request-processor.ts @@ -1,12 +1,15 @@ import { - QueryClient, + type QueryClient, + type UseMutationOptions, + type UseQueryOptions, useMutation, - UseMutationOptions, useQuery, useQueryClient, - UseQueryOptions, } from "@tanstack/react-query"; -import { MutationFunctionType, QueryFunctionType } from "../../../types/api"; +import type { + MutationFunctionType, + QueryFunctionType, +} from "../../../types/api"; export function UseRequestProcessor(): { query: QueryFunctionType; diff --git a/src/frontend/src/customization/components/custom-NodeStatus.tsx b/src/frontend/src/customization/components/custom-NodeStatus.tsx index 943f7ebfc..16833c5f0 100644 --- a/src/frontend/src/customization/components/custom-NodeStatus.tsx +++ b/src/frontend/src/customization/components/custom-NodeStatus.tsx @@ -1,7 +1,7 @@ -import { BuildStatus } from "@/constants/enums"; import NodeStatus from "@/CustomNodes/GenericNode/components/NodeStatus"; -import { VertexBuildTypeAPI } from "@/types/api"; -import { NodeDataType } from "@/types/flow"; +import type { BuildStatus } from "@/constants/enums"; +import type { VertexBuildTypeAPI } from "@/types/api"; +import type { NodeDataType } from "@/types/flow"; export function CustomNodeStatus({ nodeId, diff --git a/src/frontend/src/customization/components/custom-chat-input.tsx b/src/frontend/src/customization/components/custom-chat-input.tsx index ce415a4af..88cea44e1 100644 --- a/src/frontend/src/customization/components/custom-chat-input.tsx +++ b/src/frontend/src/customization/components/custom-chat-input.tsx @@ -1,5 +1,5 @@ import ChatInput from "@/modals/IOModal/components/chatView/chatInput/chat-input"; -import { ChatInputType } from "@/types/components"; +import type { ChatInputType } from "@/types/components"; export const CustomChatInput = ({ sendMessage, diff --git a/src/frontend/src/customization/components/custom-connectionComponent.tsx b/src/frontend/src/customization/components/custom-connectionComponent.tsx index 45676398c..bcf192363 100644 --- a/src/frontend/src/customization/components/custom-connectionComponent.tsx +++ b/src/frontend/src/customization/components/custom-connectionComponent.tsx @@ -1,7 +1,7 @@ import ConnectionComponent, { - ConnectionComponentProps, + type ConnectionComponentProps, } from "@/components/core/parameterRenderComponent/components/connectionComponent"; -import { InputProps } from "@/components/core/parameterRenderComponent/types"; +import type { InputProps } from "@/components/core/parameterRenderComponent/types"; const CustomConnectionComponent = ({ tooltip = "", diff --git a/src/frontend/src/customization/components/custom-fetch-error-component.tsx b/src/frontend/src/customization/components/custom-fetch-error-component.tsx index e560a5fde..42a6901b9 100644 --- a/src/frontend/src/customization/components/custom-fetch-error-component.tsx +++ b/src/frontend/src/customization/components/custom-fetch-error-component.tsx @@ -1,5 +1,5 @@ import FetchErrorComponent from "@/components/common/fetchErrorComponent"; -import { fetchErrorComponentType } from "@/types/components"; +import type { fetchErrorComponentType } from "@/types/components"; export function CustomFetchErrorComponent({ message, diff --git a/src/frontend/src/customization/components/custom-file-card.tsx b/src/frontend/src/customization/components/custom-file-card.tsx index adc5e9e8f..bd1aac2c9 100644 --- a/src/frontend/src/customization/components/custom-file-card.tsx +++ b/src/frontend/src/customization/components/custom-file-card.tsx @@ -1,5 +1,5 @@ import FileCard from "@/modals/IOModal/components/chatView/fileComponent/components/file-card"; -import { fileCardPropsType } from "@/types/components"; +import type { fileCardPropsType } from "@/types/components"; export function CustomFileCard({ fileName, diff --git a/src/frontend/src/customization/components/custom-file-input.tsx b/src/frontend/src/customization/components/custom-file-input.tsx index 5172cff47..ca03eef6d 100644 --- a/src/frontend/src/customization/components/custom-file-input.tsx +++ b/src/frontend/src/customization/components/custom-file-input.tsx @@ -1,5 +1,5 @@ import IOFileInput from "@/modals/IOModal/components/IOFieldView/components/file-input"; -import { IOFileInputProps } from "@/types/components"; +import type { IOFileInputProps } from "@/types/components"; export function CustomIOFileInput({ field, updateValue }: IOFileInputProps) { return ; diff --git a/src/frontend/src/customization/components/custom-get-started-progress.tsx b/src/frontend/src/customization/components/custom-get-started-progress.tsx index 58998b2f7..f0bdb1b72 100644 --- a/src/frontend/src/customization/components/custom-get-started-progress.tsx +++ b/src/frontend/src/customization/components/custom-get-started-progress.tsx @@ -1,5 +1,5 @@ import { GetStartedProgress } from "@/components/core/folderSidebarComponent/components/sideBarFolderButtons/components/get-started-progress"; -import { Users } from "@/types/api"; +import type { Users } from "@/types/api"; export function CustomGetStartedProgress({ userData, diff --git a/src/frontend/src/customization/components/custom-link.tsx b/src/frontend/src/customization/components/custom-link.tsx index 68e97ac8b..4474c5493 100644 --- a/src/frontend/src/customization/components/custom-link.tsx +++ b/src/frontend/src/customization/components/custom-link.tsx @@ -1,4 +1,4 @@ -import { Link, LinkProps, useParams } from "react-router-dom"; +import { Link, type LinkProps, useParams } from "react-router-dom"; import { ENABLE_CUSTOM_PARAM } from "../feature-flags"; export function CustomLink({ to, ...props }: LinkProps) { diff --git a/src/frontend/src/customization/components/custom-linkComponent.tsx b/src/frontend/src/customization/components/custom-linkComponent.tsx index a2fd7d553..4c472749a 100644 --- a/src/frontend/src/customization/components/custom-linkComponent.tsx +++ b/src/frontend/src/customization/components/custom-linkComponent.tsx @@ -1,5 +1,5 @@ import LinkComponent from "@/components/core/parameterRenderComponent/components/linkComponent"; -import { +import type { InputProps, LinkComponentType, } from "@/components/core/parameterRenderComponent/types"; diff --git a/src/frontend/src/customization/components/custom-navigate.tsx b/src/frontend/src/customization/components/custom-navigate.tsx index 6493bd5c9..f701ee501 100644 --- a/src/frontend/src/customization/components/custom-navigate.tsx +++ b/src/frontend/src/customization/components/custom-navigate.tsx @@ -1,4 +1,4 @@ -import { Navigate, NavigateProps, useParams } from "react-router-dom"; +import { Navigate, type NavigateProps, useParams } from "react-router-dom"; import { ENABLE_CUSTOM_PARAM } from "../feature-flags"; export function CustomNavigate({ to, ...props }: NavigateProps) { diff --git a/src/frontend/src/customization/components/custom-new-modal.tsx b/src/frontend/src/customization/components/custom-new-modal.tsx index 781baf143..38e81dc3c 100644 --- a/src/frontend/src/customization/components/custom-new-modal.tsx +++ b/src/frontend/src/customization/components/custom-new-modal.tsx @@ -1,5 +1,5 @@ import IOModal from "@/modals/IOModal/playground-modal"; -import { IOModalPropsType } from "@/types/components"; +import type { IOModalPropsType } from "@/types/components"; export function CustomIOModal({ children, diff --git a/src/frontend/src/customization/components/custom-parameter.tsx b/src/frontend/src/customization/components/custom-parameter.tsx index c2f8e55c5..40f838503 100644 --- a/src/frontend/src/customization/components/custom-parameter.tsx +++ b/src/frontend/src/customization/components/custom-parameter.tsx @@ -1,9 +1,9 @@ +import type { handleOnNewValueType } from "@/CustomNodes/hooks/use-handle-new-value"; import { ParameterRenderComponent } from "@/components/core/parameterRenderComponent"; -import { NodeInfoType } from "@/components/core/parameterRenderComponent/types"; -import { handleOnNewValueType } from "@/CustomNodes/hooks/use-handle-new-value"; +import type { NodeInfoType } from "@/components/core/parameterRenderComponent/types"; import useFlowStore from "@/stores/flowStore"; -import { APIClassType, InputFieldType } from "@/types/api"; -import { targetHandleType } from "@/types/flow"; +import type { APIClassType, InputFieldType } from "@/types/api"; +import type { targetHandleType } from "@/types/flow"; import { scapedJSONStringfy } from "@/utils/reactflowUtils"; import { cn } from "@/utils/utils"; @@ -38,7 +38,7 @@ export function CustomParameterComponent({ }) { const edges = useFlowStore((state) => state.edges); - let disabled = + const disabled = edges.some( (edge) => edge.targetHandle === diff --git a/src/frontend/src/customization/components/custom-profile-picture-chooser.tsx b/src/frontend/src/customization/components/custom-profile-picture-chooser.tsx index ac9ec05bd..d645c7d93 100644 --- a/src/frontend/src/customization/components/custom-profile-picture-chooser.tsx +++ b/src/frontend/src/customization/components/custom-profile-picture-chooser.tsx @@ -1,5 +1,5 @@ import ProfilePictureChooserComponent, { - ProfilePictureChooserComponentProps, + type ProfilePictureChooserComponentProps, } from "@/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent"; export function CustomProfilePictureChooserComponent({ profilePictures, diff --git a/src/frontend/src/customization/components/custom-voice-assistant.tsx b/src/frontend/src/customization/components/custom-voice-assistant.tsx index f7d581165..b92e70c72 100644 --- a/src/frontend/src/customization/components/custom-voice-assistant.tsx +++ b/src/frontend/src/customization/components/custom-voice-assistant.tsx @@ -1,6 +1,6 @@ import { VoiceAssistant, - VoiceAssistantProps, + type VoiceAssistantProps, } from "@/modals/IOModal/components/chatView/chatInput/components/voice-assistant/voice-assistant"; export function CustomVoiceAssistant({ diff --git a/src/frontend/src/customization/hooks/use-custom-handle-single-file-download.ts b/src/frontend/src/customization/hooks/use-custom-handle-single-file-download.ts index 53725525b..247599dac 100644 --- a/src/frontend/src/customization/hooks/use-custom-handle-single-file-download.ts +++ b/src/frontend/src/customization/hooks/use-custom-handle-single-file-download.ts @@ -1,5 +1,5 @@ import { useGetDownloadFileV2 } from "@/controllers/API/queries/file-management"; -import { FileType } from "@/types/file_management"; +import type { FileType } from "@/types/file_management"; interface SingleFileDownloadParams { id: string; diff --git a/src/frontend/src/customization/hooks/use-custom-navigate.ts b/src/frontend/src/customization/hooks/use-custom-navigate.ts index cd32efefd..371005226 100644 --- a/src/frontend/src/customization/hooks/use-custom-navigate.ts +++ b/src/frontend/src/customization/hooks/use-custom-navigate.ts @@ -1,7 +1,7 @@ import { - NavigateFunction, - NavigateOptions, - To, + type NavigateFunction, + type NavigateOptions, + type To, useNavigate, useParams, } from "react-router-dom"; diff --git a/src/frontend/src/customization/hooks/use-custom-post-auth.ts b/src/frontend/src/customization/hooks/use-custom-post-auth.ts index 72d0f2dbc..a9a72c77d 100644 --- a/src/frontend/src/customization/hooks/use-custom-post-auth.ts +++ b/src/frontend/src/customization/hooks/use-custom-post-auth.ts @@ -1,5 +1,5 @@ import { UseRequestProcessor } from "@/controllers/API/services/request-processor"; -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; export const useCustomPostAuth: useQueryFunctionType = ( options, diff --git a/src/frontend/src/customization/hooks/use-custom-post-upload-file.ts b/src/frontend/src/customization/hooks/use-custom-post-upload-file.ts index 8a6c70ab3..f9c0af81f 100644 --- a/src/frontend/src/customization/hooks/use-custom-post-upload-file.ts +++ b/src/frontend/src/customization/hooks/use-custom-post-upload-file.ts @@ -1,5 +1,5 @@ import { usePostUploadFileV2 } from "@/controllers/API/queries/file-management"; -import { useMutationFunctionType } from "@/types/api"; +import type { useMutationFunctionType } from "@/types/api"; interface IPostUploadFile { file: File; diff --git a/src/frontend/src/customization/hooks/use-custom-primary-loading.ts b/src/frontend/src/customization/hooks/use-custom-primary-loading.ts index 95564a078..837869cf0 100644 --- a/src/frontend/src/customization/hooks/use-custom-primary-loading.ts +++ b/src/frontend/src/customization/hooks/use-custom-primary-loading.ts @@ -1,5 +1,5 @@ import { UseRequestProcessor } from "@/controllers/API/services/request-processor"; -import { useQueryFunctionType } from "@/types/api"; +import type { useQueryFunctionType } from "@/types/api"; export const useCustomPrimaryLoading: useQueryFunctionType = ( options, diff --git a/src/frontend/src/customization/hooks/use-custom-start-recording.ts b/src/frontend/src/customization/hooks/use-custom-start-recording.ts index 0c87ac0d2..9af82b9d7 100644 --- a/src/frontend/src/customization/hooks/use-custom-start-recording.ts +++ b/src/frontend/src/customization/hooks/use-custom-start-recording.ts @@ -1,5 +1,5 @@ +import type { MutableRefObject } from "react"; import { useStartRecording } from "@/modals/IOModal/components/chatView/chatInput/components/voice-assistant/hooks/use-start-recording"; -import { MutableRefObject } from "react"; export const customUseStartRecording = ( audioContextRef: React.MutableRefObject, diff --git a/src/frontend/src/customization/hooks/use-custom-theme.ts b/src/frontend/src/customization/hooks/use-custom-theme.ts index 200367daf..e71d19f3f 100644 --- a/src/frontend/src/customization/hooks/use-custom-theme.ts +++ b/src/frontend/src/customization/hooks/use-custom-theme.ts @@ -1,6 +1,7 @@ // Custom Hook to manage theme logic -import { useDarkStore } from "@/stores/darkStore"; + import { useEffect, useState } from "react"; +import { useDarkStore } from "@/stores/darkStore"; const useTheme = () => { const [systemTheme, setSystemTheme] = useState(false); diff --git a/src/frontend/src/customization/utils/custom-get-access-token.ts b/src/frontend/src/customization/utils/custom-get-access-token.ts index d71551804..79a0e6f8e 100644 --- a/src/frontend/src/customization/utils/custom-get-access-token.ts +++ b/src/frontend/src/customization/utils/custom-get-access-token.ts @@ -1,5 +1,5 @@ -import { LANGFLOW_ACCESS_TOKEN } from "@/constants/constants"; import { Cookies } from "react-cookie"; +import { LANGFLOW_ACCESS_TOKEN } from "@/constants/constants"; export const customGetAccessToken = () => { const cookies = new Cookies(); diff --git a/src/frontend/src/customization/utils/custom-get-download-folders.ts b/src/frontend/src/customization/utils/custom-get-download-folders.ts index 6ab782b3e..36ba9f1a8 100644 --- a/src/frontend/src/customization/utils/custom-get-download-folders.ts +++ b/src/frontend/src/customization/utils/custom-get-download-folders.ts @@ -1,4 +1,4 @@ -import { AxiosRequestConfig, ResponseType } from "axios"; +import type { AxiosRequestConfig, ResponseType } from "axios"; import { track } from "./analytics"; export const customGetDownloadTypeFolders = (): AxiosRequestConfig => { diff --git a/src/frontend/src/customization/utils/custom-reactFlowUtils.ts b/src/frontend/src/customization/utils/custom-reactFlowUtils.ts index 8746c57cc..d2a90d0b5 100644 --- a/src/frontend/src/customization/utils/custom-reactFlowUtils.ts +++ b/src/frontend/src/customization/utils/custom-reactFlowUtils.ts @@ -1,4 +1,4 @@ -import { FlowType } from "@/types/flow"; +import type { FlowType } from "@/types/flow"; export const customDownloadFlow = ( flow: FlowType, diff --git a/src/frontend/src/customization/utils/custom-routes-store-pages.tsx b/src/frontend/src/customization/utils/custom-routes-store-pages.tsx index ead6da8d2..61bc4273a 100644 --- a/src/frontend/src/customization/utils/custom-routes-store-pages.tsx +++ b/src/frontend/src/customization/utils/custom-routes-store-pages.tsx @@ -1,7 +1,7 @@ +import { Route } from "react-router-dom"; import { StoreGuard } from "@/components/authorization/storeGuard"; import StoreApiKeyPage from "@/pages/SettingsPage/pages/StoreApiKeyPage"; import StorePage from "@/pages/StorePage"; -import { Route } from "react-router-dom"; export const CustomRoutesStorePages = () => { return ( diff --git a/src/frontend/src/customization/utils/custom-routes-store.tsx b/src/frontend/src/customization/utils/custom-routes-store.tsx index b640932b9..bda534812 100644 --- a/src/frontend/src/customization/utils/custom-routes-store.tsx +++ b/src/frontend/src/customization/utils/custom-routes-store.tsx @@ -1,7 +1,7 @@ +import { Route } from "react-router-dom"; import { StoreGuard } from "@/components/authorization/storeGuard"; import StoreApiKeyPage from "@/pages/SettingsPage/pages/StoreApiKeyPage"; import StorePage from "@/pages/StorePage"; -import { Route } from "react-router-dom"; export const CustomRoutesStore = () => { return ( diff --git a/src/frontend/src/helpers/get-objects-from-filelist.ts b/src/frontend/src/helpers/get-objects-from-filelist.ts index 3cc486286..1e939758f 100644 --- a/src/frontend/src/helpers/get-objects-from-filelist.ts +++ b/src/frontend/src/helpers/get-objects-from-filelist.ts @@ -1,8 +1,8 @@ export async function getObjectsFromFilelist(files: File[]): Promise { - let objects: T[] = []; + const objects: T[] = []; for (const file of files) { - let text = await file.text(); - let fileData = await JSON.parse(text); + const text = await file.text(); + const fileData = await JSON.parse(text); objects.push(fileData as T); } return objects; diff --git a/src/frontend/src/hooks/flows/use-add-flow.ts b/src/frontend/src/hooks/flows/use-add-flow.ts index 81bc8bb80..2ae12c811 100644 --- a/src/frontend/src/hooks/flows/use-add-flow.ts +++ b/src/frontend/src/hooks/flows/use-add-flow.ts @@ -1,3 +1,5 @@ +import { cloneDeep } from "lodash"; +import { useParams } from "react-router-dom"; import { UUID_PARSING_ERROR } from "@/constants/constants"; import { usePostAddFlow } from "@/controllers/API/queries/flows/use-post-add-flow"; import useAlertStore from "@/stores/alertStore"; @@ -5,7 +7,7 @@ import useFlowsManagerStore from "@/stores/flowsManagerStore"; import { useFolderStore } from "@/stores/foldersStore"; import { useGlobalVariablesStore } from "@/stores/globalVariablesStore/globalVariables"; import { useTypesStore } from "@/stores/typesStore"; -import { FlowType } from "@/types/flow"; +import type { FlowType } from "@/types/flow"; import { addVersionToDuplicates, createNewFlow, @@ -14,8 +16,6 @@ import { processFlows, updateGroupRecursion, } from "@/utils/reactflowUtils"; -import { cloneDeep } from "lodash"; -import { useParams } from "react-router-dom"; import useDeleteFlow from "./use-delete-flow"; const FLOW_CREATION_ERROR = "Flow creation error"; @@ -48,7 +48,7 @@ const useAddFlow = () => { }) => { return new Promise(async (resolve, reject) => { const flow = cloneDeep(params?.flow) ?? undefined; - let flowData = flow + const flowData = flow ? await processDataFromFlow(flow) : { nodes: [], edges: [], viewport: { zoom: 1, x: 0, y: 0 } }; flowData?.nodes.forEach((node) => { diff --git a/src/frontend/src/hooks/flows/use-autosave-flow.ts b/src/frontend/src/hooks/flows/use-autosave-flow.ts index ef5cc70f9..cd52c6dd0 100644 --- a/src/frontend/src/hooks/flows/use-autosave-flow.ts +++ b/src/frontend/src/hooks/flows/use-autosave-flow.ts @@ -1,5 +1,5 @@ import useFlowsManagerStore from "@/stores/flowsManagerStore"; -import { FlowType } from "@/types/flow"; +import type { FlowType } from "@/types/flow"; import { useDebounce } from "../use-debounce"; import useSaveFlow from "./use-save-flow"; diff --git a/src/frontend/src/hooks/flows/use-save-flow.ts b/src/frontend/src/hooks/flows/use-save-flow.ts index aa3120ce5..a9b2cfff9 100644 --- a/src/frontend/src/hooks/flows/use-save-flow.ts +++ b/src/frontend/src/hooks/flows/use-save-flow.ts @@ -1,11 +1,12 @@ +import type { ReactFlowJsonObject } from "@xyflow/react"; import { useGetFlow } from "@/controllers/API/queries/flows/use-get-flow"; import { usePatchUpdateFlow } from "@/controllers/API/queries/flows/use-patch-update-flow"; import useAlertStore from "@/stores/alertStore"; -import useFlowsManagerStore from "@/stores/flowsManagerStore"; import useFlowStore from "@/stores/flowStore"; -import { AllNodeType, EdgeType, FlowType } from "@/types/flow"; +import useFlowsManagerStore from "@/stores/flowsManagerStore"; +import type { AllNodeType, EdgeType, FlowType } from "@/types/flow"; import { customStringify } from "@/utils/reactflowUtils"; -import { ReactFlowJsonObject } from "@xyflow/react"; + const useSaveFlow = () => { const setFlows = useFlowsManagerStore((state) => state.setFlows); const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/hooks/flows/use-upload-flow.ts b/src/frontend/src/hooks/flows/use-upload-flow.ts index 462b8420c..74f2deb97 100644 --- a/src/frontend/src/hooks/flows/use-upload-flow.ts +++ b/src/frontend/src/hooks/flows/use-upload-flow.ts @@ -1,7 +1,7 @@ import { createFileUpload } from "@/helpers/create-file-upload"; import { getObjectsFromFilelist } from "@/helpers/get-objects-from-filelist"; import useFlowStore from "@/stores/flowStore"; -import { FlowType } from "@/types/flow"; +import type { FlowType } from "@/types/flow"; import { processDataFromFlow } from "@/utils/reactflowUtils"; import useAddFlow from "./use-add-flow"; @@ -54,7 +54,7 @@ const useUploadFlow = () => { position?: { x: number; y: number }; }): Promise => { try { - let flows = await getFlowsToUpload({ files }); + const flows = await getFlowsToUpload({ files }); for (const flow of flows) { await processDataFromFlow(flow); } diff --git a/src/frontend/src/hooks/use-add-component.ts b/src/frontend/src/hooks/use-add-component.ts index a4e006742..ba4becb3c 100644 --- a/src/frontend/src/hooks/use-add-component.ts +++ b/src/frontend/src/hooks/use-add-component.ts @@ -1,12 +1,12 @@ +import { useStoreApi } from "@xyflow/react"; +import { useCallback } from "react"; import { NODE_WIDTH } from "@/constants/constants"; import { track } from "@/customization/utils/analytics"; import useFlowStore from "@/stores/flowStore"; -import { APIClassType } from "@/types/api"; -import { AllNodeType } from "@/types/flow"; +import type { APIClassType } from "@/types/api"; +import type { AllNodeType } from "@/types/flow"; import { getNodeId } from "@/utils/reactflowUtils"; import { getNodeRenderType } from "@/utils/utils"; -import { useStoreApi } from "@xyflow/react"; -import { useCallback } from "react"; export function useAddComponent() { const store = useStoreApi(); diff --git a/src/frontend/src/icons/AIML/index.tsx b/src/frontend/src/icons/AIML/index.tsx index 59d66bd99..df82857d2 100644 --- a/src/frontend/src/icons/AIML/index.tsx +++ b/src/frontend/src/icons/AIML/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import { AIMLComponent } from "./AI-ML"; export const AIMLIcon = forwardRef>( diff --git a/src/frontend/src/icons/AWS/index.tsx b/src/frontend/src/icons/AWS/index.tsx index 39063ea26..2795461b0 100644 --- a/src/frontend/src/icons/AWS/index.tsx +++ b/src/frontend/src/icons/AWS/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgAWS from "./AWS"; export const AWSIcon = forwardRef>( diff --git a/src/frontend/src/icons/AWSInverted/index.tsx b/src/frontend/src/icons/AWSInverted/index.tsx index be8fa0507..a8d6ac434 100644 --- a/src/frontend/src/icons/AWSInverted/index.tsx +++ b/src/frontend/src/icons/AWSInverted/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgAWS from "./AWS"; export const AWSInvertedIcon = forwardRef< diff --git a/src/frontend/src/icons/AgentQL/index.tsx b/src/frontend/src/icons/AgentQL/index.tsx index d84547949..87574e0ba 100644 --- a/src/frontend/src/icons/AgentQL/index.tsx +++ b/src/frontend/src/icons/AgentQL/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgAgentQL from "./AgentQL"; export const AgentQLIcon = forwardRef< diff --git a/src/frontend/src/icons/Airbyte/index.tsx b/src/frontend/src/icons/Airbyte/index.tsx index 30f68bf7d..19fe447d5 100644 --- a/src/frontend/src/icons/Airbyte/index.tsx +++ b/src/frontend/src/icons/Airbyte/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgAirbyte from "./Airbyte"; export const AirbyteIcon = forwardRef< diff --git a/src/frontend/src/icons/Anthropic/index.tsx b/src/frontend/src/icons/Anthropic/index.tsx index 2ee064190..dc1ccdb38 100644 --- a/src/frontend/src/icons/Anthropic/index.tsx +++ b/src/frontend/src/icons/Anthropic/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgAnthropicBox from "./Anthropic"; export const AnthropicIcon = forwardRef< diff --git a/src/frontend/src/icons/Apify/index.tsx b/src/frontend/src/icons/Apify/index.tsx index 62e719710..a39389ecc 100644 --- a/src/frontend/src/icons/Apify/index.tsx +++ b/src/frontend/src/icons/Apify/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgApifyLogo from "./Apify"; import ApifyWhiteImage from "./apify_white.png"; diff --git a/src/frontend/src/icons/ArXiv/index.tsx b/src/frontend/src/icons/ArXiv/index.tsx index 2d004361c..5b4f68123 100644 --- a/src/frontend/src/icons/ArXiv/index.tsx +++ b/src/frontend/src/icons/ArXiv/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgArXivIcon from "./ArXivIcon"; export const ArXivIcon = forwardRef>( diff --git a/src/frontend/src/icons/Arize/index.tsx b/src/frontend/src/icons/Arize/index.tsx index c47357430..327040fbf 100644 --- a/src/frontend/src/icons/Arize/index.tsx +++ b/src/frontend/src/icons/Arize/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgArize from "./Arize"; export const ArizeIcon = forwardRef>( diff --git a/src/frontend/src/icons/AssemblyAI/index.tsx b/src/frontend/src/icons/AssemblyAI/index.tsx index 99b0f8fb8..e1d77fc54 100644 --- a/src/frontend/src/icons/AssemblyAI/index.tsx +++ b/src/frontend/src/icons/AssemblyAI/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import AssemblyAISVG from "./AssemblyAI"; export const AssemblyAIIcon = forwardRef< diff --git a/src/frontend/src/icons/AstraDB/index.tsx b/src/frontend/src/icons/AstraDB/index.tsx index a35786cee..3252422a3 100644 --- a/src/frontend/src/icons/AstraDB/index.tsx +++ b/src/frontend/src/icons/AstraDB/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import AstraSVG from "./AstraDB"; export const AstraDBIcon = forwardRef< diff --git a/src/frontend/src/icons/AzLogo/index.tsx b/src/frontend/src/icons/AzLogo/index.tsx index fa8f5605e..0c5951959 100644 --- a/src/frontend/src/icons/AzLogo/index.tsx +++ b/src/frontend/src/icons/AzLogo/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgAzLogo from "./AzLogo"; export const AzIcon = forwardRef>( diff --git a/src/frontend/src/icons/Azure/index.tsx b/src/frontend/src/icons/Azure/index.tsx index cde247d1b..58a666023 100644 --- a/src/frontend/src/icons/Azure/index.tsx +++ b/src/frontend/src/icons/Azure/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgAzure from "./Azure"; export const AzureIcon = forwardRef>( diff --git a/src/frontend/src/icons/BW python/index.tsx b/src/frontend/src/icons/BW python/index.tsx index 25c2a9c4b..55a6dba0c 100644 --- a/src/frontend/src/icons/BW python/index.tsx +++ b/src/frontend/src/icons/BW python/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import BWSvgPython from "./Python"; export const BWPythonIcon = forwardRef< diff --git a/src/frontend/src/icons/Bing/index.tsx b/src/frontend/src/icons/Bing/index.tsx index 60e70d6a6..1428569ec 100644 --- a/src/frontend/src/icons/Bing/index.tsx +++ b/src/frontend/src/icons/Bing/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgBing from "./Bing"; export const BingIcon = forwardRef>( diff --git a/src/frontend/src/icons/BotMessageSquare/index.tsx b/src/frontend/src/icons/BotMessageSquare/index.tsx index c3b4b04a5..2ebdad3b9 100644 --- a/src/frontend/src/icons/BotMessageSquare/index.tsx +++ b/src/frontend/src/icons/BotMessageSquare/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgChroma from "./BotMessageSquare"; export const BotMessageSquareIcon = forwardRef< diff --git a/src/frontend/src/icons/Cassandra/index.tsx b/src/frontend/src/icons/Cassandra/index.tsx index 7fe917b72..50850986e 100644 --- a/src/frontend/src/icons/Cassandra/index.tsx +++ b/src/frontend/src/icons/Cassandra/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import CassandraSVG from "./Cassandra"; export const CassandraIcon = forwardRef< diff --git a/src/frontend/src/icons/ChromaIcon/index.tsx b/src/frontend/src/icons/ChromaIcon/index.tsx index 657d479e6..71d5f4fe9 100644 --- a/src/frontend/src/icons/ChromaIcon/index.tsx +++ b/src/frontend/src/icons/ChromaIcon/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgChroma from "./Chroma"; export const ChromaIcon = forwardRef< diff --git a/src/frontend/src/icons/Claude/index.tsx b/src/frontend/src/icons/Claude/index.tsx index 3d8ea865c..2e594e140 100644 --- a/src/frontend/src/icons/Claude/index.tsx +++ b/src/frontend/src/icons/Claude/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import ClaudeSVG from "./Claude"; export const ClaudeIcon = forwardRef< diff --git a/src/frontend/src/icons/Cleanlab/index.tsx b/src/frontend/src/icons/Cleanlab/index.tsx index c0b36e69f..86044e936 100644 --- a/src/frontend/src/icons/Cleanlab/index.tsx +++ b/src/frontend/src/icons/Cleanlab/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgCleanlab from "./Cleanlab"; export const CleanlabIcon = forwardRef< diff --git a/src/frontend/src/icons/Clickhouse/index.tsx b/src/frontend/src/icons/Clickhouse/index.tsx index 7038b83fc..5c6d6336e 100644 --- a/src/frontend/src/icons/Clickhouse/index.tsx +++ b/src/frontend/src/icons/Clickhouse/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgClickhouseIcon from "./Clickhouse"; export const ClickhouseIcon = forwardRef< diff --git a/src/frontend/src/icons/Cloudflare/index.tsx b/src/frontend/src/icons/Cloudflare/index.tsx index 529badd4a..0123c2143 100644 --- a/src/frontend/src/icons/Cloudflare/index.tsx +++ b/src/frontend/src/icons/Cloudflare/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgCloudflareIcon from "./Cloudflare"; export const CloudflareIcon = forwardRef< diff --git a/src/frontend/src/icons/Cohere/index.tsx b/src/frontend/src/icons/Cohere/index.tsx index 58b53b097..5353a33c6 100644 --- a/src/frontend/src/icons/Cohere/index.tsx +++ b/src/frontend/src/icons/Cohere/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgCohere from "./Cohere"; export const CohereIcon = forwardRef< diff --git a/src/frontend/src/icons/Composio/index.tsx b/src/frontend/src/icons/Composio/index.tsx index 553c8bcd0..494d7de83 100644 --- a/src/frontend/src/icons/Composio/index.tsx +++ b/src/frontend/src/icons/Composio/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import ComposioIconSVG from "./composio"; export const ComposioIcon = forwardRef< diff --git a/src/frontend/src/icons/Confluence/index.tsx b/src/frontend/src/icons/Confluence/index.tsx index fc695ad47..5129225c2 100644 --- a/src/frontend/src/icons/Confluence/index.tsx +++ b/src/frontend/src/icons/Confluence/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgConfluence from "./Confluence"; export const ConfluenceIcon = forwardRef< diff --git a/src/frontend/src/icons/Couchbase/index.tsx b/src/frontend/src/icons/Couchbase/index.tsx index 85149c204..b63dcd672 100644 --- a/src/frontend/src/icons/Couchbase/index.tsx +++ b/src/frontend/src/icons/Couchbase/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgCouchbaseIcon from "./Couchbase"; export const CouchbaseIcon = forwardRef< diff --git a/src/frontend/src/icons/CrewAI/index.tsx b/src/frontend/src/icons/CrewAI/index.tsx index b3afaf3fc..6e7a0d748 100644 --- a/src/frontend/src/icons/CrewAI/index.tsx +++ b/src/frontend/src/icons/CrewAI/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgCrewAiIcon from "./CrewAiIcon"; export const CrewAiIcon = forwardRef< diff --git a/src/frontend/src/icons/Cursor/index.tsx b/src/frontend/src/icons/Cursor/index.tsx index 95b8b9bfc..2602cfd8a 100644 --- a/src/frontend/src/icons/Cursor/index.tsx +++ b/src/frontend/src/icons/Cursor/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import CursorSVG from "./Cursor"; export const CursorIcon = forwardRef< diff --git a/src/frontend/src/icons/DeepSeek/index.tsx b/src/frontend/src/icons/DeepSeek/index.tsx index 48c612fda..75ef71b17 100644 --- a/src/frontend/src/icons/DeepSeek/index.tsx +++ b/src/frontend/src/icons/DeepSeek/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import DeepSeekSVG from "./DeepSeekIcon"; export const DeepSeekIcon = forwardRef< diff --git a/src/frontend/src/icons/Docling/index.tsx b/src/frontend/src/icons/Docling/index.tsx index 9a29e0fe4..c28fe8969 100644 --- a/src/frontend/src/icons/Docling/index.tsx +++ b/src/frontend/src/icons/Docling/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgDocling from "./Docling"; export const DoclingIcon = forwardRef< diff --git a/src/frontend/src/icons/Dropbox/index.tsx b/src/frontend/src/icons/Dropbox/index.tsx index 12b40ddaf..acc91136c 100644 --- a/src/frontend/src/icons/Dropbox/index.tsx +++ b/src/frontend/src/icons/Dropbox/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgDropbox from "./Dropbox"; export const DropboxIcon = forwardRef< diff --git a/src/frontend/src/icons/DuckDuckGo/index.tsx b/src/frontend/src/icons/DuckDuckGo/index.tsx index 9bca0851f..6afe43c31 100644 --- a/src/frontend/src/icons/DuckDuckGo/index.tsx +++ b/src/frontend/src/icons/DuckDuckGo/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgDuckDuckGo from "./DuckDuckGo"; export const DuckDuckGoIcon = forwardRef< diff --git a/src/frontend/src/icons/ElasticsearchStore/index.tsx b/src/frontend/src/icons/ElasticsearchStore/index.tsx index 12f2b95d7..edf826f96 100644 --- a/src/frontend/src/icons/ElasticsearchStore/index.tsx +++ b/src/frontend/src/icons/ElasticsearchStore/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgElasticsearchLogo from "./ElasticsearchLogo"; export const ElasticsearchIcon = forwardRef< diff --git a/src/frontend/src/icons/Evernote/index.tsx b/src/frontend/src/icons/Evernote/index.tsx index b2460d7e7..a996ba14a 100644 --- a/src/frontend/src/icons/Evernote/index.tsx +++ b/src/frontend/src/icons/Evernote/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgEvernoteIcon from "./EvernoteIcon"; export const EvernoteIcon = forwardRef< diff --git a/src/frontend/src/icons/Exa/index.tsx b/src/frontend/src/icons/Exa/index.tsx index 31f3c0888..06ba6e571 100644 --- a/src/frontend/src/icons/Exa/index.tsx +++ b/src/frontend/src/icons/Exa/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgExa from "./Exa"; export const ExaIcon = forwardRef>( diff --git a/src/frontend/src/icons/FacebookMessenger/index.tsx b/src/frontend/src/icons/FacebookMessenger/index.tsx index 5264b376d..688354304 100644 --- a/src/frontend/src/icons/FacebookMessenger/index.tsx +++ b/src/frontend/src/icons/FacebookMessenger/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgFacebookMessengerLogo2020 from "./FacebookMessengerLogo2020"; export const FBIcon = forwardRef>( diff --git a/src/frontend/src/icons/Firecrawl/index.tsx b/src/frontend/src/icons/Firecrawl/index.tsx index 060d053bb..0cea6a3cf 100644 --- a/src/frontend/src/icons/Firecrawl/index.tsx +++ b/src/frontend/src/icons/Firecrawl/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgFirecrawlLogo from "./FirecrawlLogo"; export const FirecrawlIcon = forwardRef< diff --git a/src/frontend/src/icons/GitBook/index.tsx b/src/frontend/src/icons/GitBook/index.tsx index a9ba12cb0..bba219c9b 100644 --- a/src/frontend/src/icons/GitBook/index.tsx +++ b/src/frontend/src/icons/GitBook/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGitbookSvgrepoCom from "./GitbookSvgrepoCom"; export const GitBookIcon = forwardRef< diff --git a/src/frontend/src/icons/GitLoader/index.tsx b/src/frontend/src/icons/GitLoader/index.tsx index 51e82f4f8..30c88cc9d 100644 --- a/src/frontend/src/icons/GitLoader/index.tsx +++ b/src/frontend/src/icons/GitLoader/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGitLoader from "./GitLoader"; export const GitLoaderIcon = forwardRef< diff --git a/src/frontend/src/icons/Glean/index.tsx b/src/frontend/src/icons/Glean/index.tsx index c74b9b0f4..0f2730ca1 100644 --- a/src/frontend/src/icons/Glean/index.tsx +++ b/src/frontend/src/icons/Glean/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGlean from "./Glean"; export const GleanIcon = forwardRef>( diff --git a/src/frontend/src/icons/Google/index.tsx b/src/frontend/src/icons/Google/index.tsx index 89bd546ef..e7d7b80a5 100644 --- a/src/frontend/src/icons/Google/index.tsx +++ b/src/frontend/src/icons/Google/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGoogle from "./Google"; export const GoogleIcon = forwardRef< diff --git a/src/frontend/src/icons/GoogleDrive/index.tsx b/src/frontend/src/icons/GoogleDrive/index.tsx index 2772b23a7..a595b8840 100644 --- a/src/frontend/src/icons/GoogleDrive/index.tsx +++ b/src/frontend/src/icons/GoogleDrive/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGoogleDrive from "./GoogleDrive"; export const GoogleDriveIcon = forwardRef< diff --git a/src/frontend/src/icons/GoogleGenerativeAI/index.tsx b/src/frontend/src/icons/GoogleGenerativeAI/index.tsx index 2123f129d..f53b34bbf 100644 --- a/src/frontend/src/icons/GoogleGenerativeAI/index.tsx +++ b/src/frontend/src/icons/GoogleGenerativeAI/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGoogleGenerativeAI from "./GoogleGemini"; export const GoogleGenerativeAIIcon = forwardRef< diff --git a/src/frontend/src/icons/Groq/index.tsx b/src/frontend/src/icons/Groq/index.tsx index 6c4283d29..4e149a1e8 100644 --- a/src/frontend/src/icons/Groq/index.tsx +++ b/src/frontend/src/icons/Groq/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGroqLogo from "./GroqLogo"; export const GroqIcon = forwardRef>( diff --git a/src/frontend/src/icons/HCD/index.tsx b/src/frontend/src/icons/HCD/index.tsx index 312f12ca6..595678c34 100644 --- a/src/frontend/src/icons/HCD/index.tsx +++ b/src/frontend/src/icons/HCD/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import HCDSVG from "./HCD"; export const HCDIcon = forwardRef>( diff --git a/src/frontend/src/icons/HomeAssistant/index.tsx b/src/frontend/src/icons/HomeAssistant/index.tsx index b76154306..063e16454 100644 --- a/src/frontend/src/icons/HomeAssistant/index.tsx +++ b/src/frontend/src/icons/HomeAssistant/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgHomeAssistant from "./HomeAssistant"; export const HomeAssistantIcon = forwardRef< diff --git a/src/frontend/src/icons/HuggingFace/index.tsx b/src/frontend/src/icons/HuggingFace/index.tsx index 3f7ccdeca..529a0a1c9 100644 --- a/src/frontend/src/icons/HuggingFace/index.tsx +++ b/src/frontend/src/icons/HuggingFace/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgHfLogo from "./HfLogo"; export const HuggingFaceIcon = forwardRef< diff --git a/src/frontend/src/icons/IBMWatsonx/index.tsx b/src/frontend/src/icons/IBMWatsonx/index.tsx index f1330747c..d227709f1 100644 --- a/src/frontend/src/icons/IBMWatsonx/index.tsx +++ b/src/frontend/src/icons/IBMWatsonx/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgWatsonxAI from "./WatsonxAI"; export const WatsonxAiIcon = forwardRef< diff --git a/src/frontend/src/icons/IFixIt/index.tsx b/src/frontend/src/icons/IFixIt/index.tsx index 318ae72a6..b55e4946e 100644 --- a/src/frontend/src/icons/IFixIt/index.tsx +++ b/src/frontend/src/icons/IFixIt/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgIfixitSeeklogocom from "./IfixitSeeklogoCom"; export const IFixIcon = forwardRef>( diff --git a/src/frontend/src/icons/Icosa/index.tsx b/src/frontend/src/icons/Icosa/index.tsx index 4d29d0027..a505c1281 100644 --- a/src/frontend/src/icons/Icosa/index.tsx +++ b/src/frontend/src/icons/Icosa/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgIcosa from "./Icosa"; export const IcosaIcon = forwardRef>( diff --git a/src/frontend/src/icons/JSicon/index.tsx b/src/frontend/src/icons/JSicon/index.tsx index a66fd867b..3b9963dc0 100644 --- a/src/frontend/src/icons/JSicon/index.tsx +++ b/src/frontend/src/icons/JSicon/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgJSIcon from "./JSIcon"; export const JSIcon = forwardRef>( diff --git a/src/frontend/src/icons/JigsawStack/index.tsx b/src/frontend/src/icons/JigsawStack/index.tsx index f7af942aa..fc648b470 100644 --- a/src/frontend/src/icons/JigsawStack/index.tsx +++ b/src/frontend/src/icons/JigsawStack/index.tsx @@ -1,5 +1,5 @@ -import { useDarkStore } from "@/stores/darkStore"; import React, { forwardRef } from "react"; +import { useDarkStore } from "@/stores/darkStore"; import JigsawStackIconSVG from "./JigsawStackIcon"; export const JigsawStackIcon = forwardRef< diff --git a/src/frontend/src/icons/LMStudio/index.tsx b/src/frontend/src/icons/LMStudio/index.tsx index 07475bfdc..fb9f0b86a 100644 --- a/src/frontend/src/icons/LMStudio/index.tsx +++ b/src/frontend/src/icons/LMStudio/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgLMStudio from "./LMStudioIcon"; export const LMStudioIcon = forwardRef< diff --git a/src/frontend/src/icons/LangChain/index.tsx b/src/frontend/src/icons/LangChain/index.tsx index 48b8566e1..54a70d1b4 100644 --- a/src/frontend/src/icons/LangChain/index.tsx +++ b/src/frontend/src/icons/LangChain/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgLangChainIcon from "./LangChainIcon"; export const LangChainIcon = forwardRef< diff --git a/src/frontend/src/icons/Langwatch/index.tsx b/src/frontend/src/icons/Langwatch/index.tsx index 211d22d86..48ff64795 100644 --- a/src/frontend/src/icons/Langwatch/index.tsx +++ b/src/frontend/src/icons/Langwatch/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgLangwatch from "./langwatch"; export const LangwatchIcon = forwardRef< diff --git a/src/frontend/src/icons/MCP/index.tsx b/src/frontend/src/icons/MCP/index.tsx index ed55ad5ac..7a82927af 100644 --- a/src/frontend/src/icons/MCP/index.tsx +++ b/src/frontend/src/icons/MCP/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgMcpIcon from "./McpIcon"; export const McpIcon = forwardRef>( diff --git a/src/frontend/src/icons/Maritalk/index.tsx b/src/frontend/src/icons/Maritalk/index.tsx index 8137e4a0f..4b305cf72 100644 --- a/src/frontend/src/icons/Maritalk/index.tsx +++ b/src/frontend/src/icons/Maritalk/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgMaritalkIcon from "./MaritalkIcon"; export const MaritalkIcon = forwardRef< diff --git a/src/frontend/src/icons/Mem0/index.tsx b/src/frontend/src/icons/Mem0/index.tsx index 858123218..e54941d45 100644 --- a/src/frontend/src/icons/Mem0/index.tsx +++ b/src/frontend/src/icons/Mem0/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgMem from "./SvgMem"; export const Mem0 = forwardRef>( diff --git a/src/frontend/src/icons/Meta/index.tsx b/src/frontend/src/icons/Meta/index.tsx index 9fb123e86..0276a9d54 100644 --- a/src/frontend/src/icons/Meta/index.tsx +++ b/src/frontend/src/icons/Meta/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgMetaIcon from "./MetaIcon"; export const MetaIcon = forwardRef>( diff --git a/src/frontend/src/icons/Midjorney/index.tsx b/src/frontend/src/icons/Midjorney/index.tsx index f691abeb8..5f3ca1a43 100644 --- a/src/frontend/src/icons/Midjorney/index.tsx +++ b/src/frontend/src/icons/Midjorney/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgMidjourneyEmblem from "./MidjourneyEmblem"; export const MidjourneyIcon = forwardRef< diff --git a/src/frontend/src/icons/Milvus/index.tsx b/src/frontend/src/icons/Milvus/index.tsx index 5e12857b3..d1749f3ee 100644 --- a/src/frontend/src/icons/Milvus/index.tsx +++ b/src/frontend/src/icons/Milvus/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgMilvus from "./Milvus"; export const MilvusIcon = forwardRef< diff --git a/src/frontend/src/icons/MongoDB/index.tsx b/src/frontend/src/icons/MongoDB/index.tsx index d39169c89..e31f0c80a 100644 --- a/src/frontend/src/icons/MongoDB/index.tsx +++ b/src/frontend/src/icons/MongoDB/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgMongodbIcon from "./MongodbIcon"; export const MongoDBIcon = forwardRef< diff --git a/src/frontend/src/icons/Needle/index.tsx b/src/frontend/src/icons/Needle/index.tsx index 641b780da..7b0d40b09 100644 --- a/src/frontend/src/icons/Needle/index.tsx +++ b/src/frontend/src/icons/Needle/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import NeedleSvg from "./needle-icon.svg?react"; export const NeedleIcon = forwardRef< diff --git a/src/frontend/src/icons/NotDiamond/index.tsx b/src/frontend/src/icons/NotDiamond/index.tsx index 2556b5447..efa8d7881 100644 --- a/src/frontend/src/icons/NotDiamond/index.tsx +++ b/src/frontend/src/icons/NotDiamond/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgNotDiamondIcon from "./NotDiamondIcon"; export const NotDiamondIcon = forwardRef< diff --git a/src/frontend/src/icons/Notion/index.tsx b/src/frontend/src/icons/Notion/index.tsx index cf3e3f48b..080e24bfb 100644 --- a/src/frontend/src/icons/Notion/index.tsx +++ b/src/frontend/src/icons/Notion/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgNotionLogo from "./NotionLogo"; export const NotionIcon = forwardRef< diff --git a/src/frontend/src/icons/Novita/index.tsx b/src/frontend/src/icons/Novita/index.tsx index 958b0637a..b67a50930 100644 --- a/src/frontend/src/icons/Novita/index.tsx +++ b/src/frontend/src/icons/Novita/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgNovita from "./novita"; export const NovitaIcon = forwardRef< diff --git a/src/frontend/src/icons/Nvidia/index.tsx b/src/frontend/src/icons/Nvidia/index.tsx index 1fb6b3713..65528eaec 100644 --- a/src/frontend/src/icons/Nvidia/index.tsx +++ b/src/frontend/src/icons/Nvidia/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import NvidiaSVG from "./nvidia"; export const NvidiaIcon = forwardRef< diff --git a/src/frontend/src/icons/Olivya/index.tsx b/src/frontend/src/icons/Olivya/index.tsx index 705f3f4f4..17461e1c5 100644 --- a/src/frontend/src/icons/Olivya/index.tsx +++ b/src/frontend/src/icons/Olivya/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import OlivyaSVG from "./olivya"; export const OlivyaIcon = forwardRef< diff --git a/src/frontend/src/icons/Ollama/index.tsx b/src/frontend/src/icons/Ollama/index.tsx index a889d0f45..1952e5f5e 100644 --- a/src/frontend/src/icons/Ollama/index.tsx +++ b/src/frontend/src/icons/Ollama/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgOllama from "./Ollama"; export const OllamaIcon = forwardRef< diff --git a/src/frontend/src/icons/OneDrive/index.tsx b/src/frontend/src/icons/OneDrive/index.tsx index 8cd35c533..2468b6957 100644 --- a/src/frontend/src/icons/OneDrive/index.tsx +++ b/src/frontend/src/icons/OneDrive/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgOneDrive from "./OneDrive"; export const OneDriveIcon = forwardRef< diff --git a/src/frontend/src/icons/OpenAi/index.tsx b/src/frontend/src/icons/OpenAi/index.tsx index a1b7545d4..dd28d9f91 100644 --- a/src/frontend/src/icons/OpenAi/index.tsx +++ b/src/frontend/src/icons/OpenAi/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgOpenAi from "./OpenAi"; export const OpenAiIcon = forwardRef< diff --git a/src/frontend/src/icons/OpenRouter/index.tsx b/src/frontend/src/icons/OpenRouter/index.tsx index fc79d74a5..00f00cd12 100644 --- a/src/frontend/src/icons/OpenRouter/index.tsx +++ b/src/frontend/src/icons/OpenRouter/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgOpenRouter from "./OpenRouterIcon"; export const OpenRouterIcon = forwardRef< diff --git a/src/frontend/src/icons/OpenSearch/index.tsx b/src/frontend/src/icons/OpenSearch/index.tsx index 0cdb3a980..23ad0cd23 100644 --- a/src/frontend/src/icons/OpenSearch/index.tsx +++ b/src/frontend/src/icons/OpenSearch/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import OpenSearchSVG from "./OpenSearch"; export const OpenSearch = forwardRef< diff --git a/src/frontend/src/icons/Perplexity/index.tsx b/src/frontend/src/icons/Perplexity/index.tsx index 74b7dcbe1..7d57a8119 100644 --- a/src/frontend/src/icons/Perplexity/index.tsx +++ b/src/frontend/src/icons/Perplexity/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import PerplexitySVG from "./Perplexity"; export const PerplexityIcon = forwardRef< diff --git a/src/frontend/src/icons/Pinecone/index.tsx b/src/frontend/src/icons/Pinecone/index.tsx index bc7cebd00..3ad6381d6 100644 --- a/src/frontend/src/icons/Pinecone/index.tsx +++ b/src/frontend/src/icons/Pinecone/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgPineconeLogo from "./PineconeLogo"; export const PineconeIcon = forwardRef< diff --git a/src/frontend/src/icons/Postgres/index.tsx b/src/frontend/src/icons/Postgres/index.tsx index 0bd7cdaef..a5c7e5d1e 100644 --- a/src/frontend/src/icons/Postgres/index.tsx +++ b/src/frontend/src/icons/Postgres/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgPostgres from "./Postgres"; export const PostgresIcon = forwardRef< diff --git a/src/frontend/src/icons/PowerPoint/index.tsx b/src/frontend/src/icons/PowerPoint/index.tsx index 19dae1e6e..47bb6a968 100644 --- a/src/frontend/src/icons/PowerPoint/index.tsx +++ b/src/frontend/src/icons/PowerPoint/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgPowerPoint from "./PowerPoint"; export const PowerPointIcon = forwardRef< diff --git a/src/frontend/src/icons/Python/index.tsx b/src/frontend/src/icons/Python/index.tsx index 2a6fc1fc0..25787b2a3 100644 --- a/src/frontend/src/icons/Python/index.tsx +++ b/src/frontend/src/icons/Python/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgPython from "./Python"; export const PythonIcon = forwardRef< diff --git a/src/frontend/src/icons/QDrant/index.tsx b/src/frontend/src/icons/QDrant/index.tsx index 48fde5ad4..f0354ffda 100644 --- a/src/frontend/src/icons/QDrant/index.tsx +++ b/src/frontend/src/icons/QDrant/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgQDrant from "./QDrant"; export const QDrantIcon = forwardRef< diff --git a/src/frontend/src/icons/QianFanChat/index.tsx b/src/frontend/src/icons/QianFanChat/index.tsx index 3b45e0ce4..af0118794 100644 --- a/src/frontend/src/icons/QianFanChat/index.tsx +++ b/src/frontend/src/icons/QianFanChat/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgQianFanChat from "./QianFanChat"; export const QianFanChatIcon = forwardRef< diff --git a/src/frontend/src/icons/ReadTheDocs/index.tsx b/src/frontend/src/icons/ReadTheDocs/index.tsx index bb9860986..06919a6d4 100644 --- a/src/frontend/src/icons/ReadTheDocs/index.tsx +++ b/src/frontend/src/icons/ReadTheDocs/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgReadthedocsioIcon from "./ReadthedocsioIcon"; export const ReadTheDocsIcon = forwardRef< diff --git a/src/frontend/src/icons/Redis/index.tsx b/src/frontend/src/icons/Redis/index.tsx index 80f94bd85..3b790535a 100644 --- a/src/frontend/src/icons/Redis/index.tsx +++ b/src/frontend/src/icons/Redis/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import { SvgRedis } from "./Redis"; export const RedisIcon = forwardRef>( diff --git a/src/frontend/src/icons/SambaNova/index.tsx b/src/frontend/src/icons/SambaNova/index.tsx index 59fe8cde3..70a5b3a9e 100644 --- a/src/frontend/src/icons/SambaNova/index.tsx +++ b/src/frontend/src/icons/SambaNova/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSambaNovaLogo from "./SambaNovaLogo"; export const SambaNovaIcon = forwardRef< diff --git a/src/frontend/src/icons/ScrapeGraphAI/index.tsx b/src/frontend/src/icons/ScrapeGraphAI/index.tsx index 3961827fd..53ae7ca4b 100644 --- a/src/frontend/src/icons/ScrapeGraphAI/index.tsx +++ b/src/frontend/src/icons/ScrapeGraphAI/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import ScrapeGraphAI from "./ScrapeGraphAI"; export const ScrapeGraph = forwardRef< diff --git a/src/frontend/src/icons/SearchAPI/index.tsx b/src/frontend/src/icons/SearchAPI/index.tsx index 8122c7272..68987762d 100644 --- a/src/frontend/src/icons/SearchAPI/index.tsx +++ b/src/frontend/src/icons/SearchAPI/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSearchApi from "./SearchAPI"; export const SearchAPIIcon = forwardRef< diff --git a/src/frontend/src/icons/SearchHybrid/index.tsx b/src/frontend/src/icons/SearchHybrid/index.tsx index 3bce1a60c..2f5fc8738 100644 --- a/src/frontend/src/icons/SearchHybrid/index.tsx +++ b/src/frontend/src/icons/SearchHybrid/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSearchHybridIcon from "./SearchHybridIcon"; export const SearchHybridIcon = forwardRef< diff --git a/src/frontend/src/icons/SearchLexical/index.tsx b/src/frontend/src/icons/SearchLexical/index.tsx index 2d7daaaf8..5350c13d2 100644 --- a/src/frontend/src/icons/SearchLexical/index.tsx +++ b/src/frontend/src/icons/SearchLexical/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSearchLexicalIcon from "./SearchLexicalIcon"; export const SearchLexicalIcon = forwardRef< diff --git a/src/frontend/src/icons/SearchVector/index.tsx b/src/frontend/src/icons/SearchVector/index.tsx index 4b2b48eea..a48396719 100644 --- a/src/frontend/src/icons/SearchVector/index.tsx +++ b/src/frontend/src/icons/SearchVector/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSearchVectorIcon from "./SearchVectorIcon"; export const SearchVectorIcon = forwardRef< diff --git a/src/frontend/src/icons/Searx/index.tsx b/src/frontend/src/icons/Searx/index.tsx index d1e07c3b4..46d7acdcb 100644 --- a/src/frontend/src/icons/Searx/index.tsx +++ b/src/frontend/src/icons/Searx/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSearxLogo from "./SearxLogo"; export const SearxIcon = forwardRef>( diff --git a/src/frontend/src/icons/SerpSearch/index.tsx b/src/frontend/src/icons/SerpSearch/index.tsx index 35b3c278f..c7d3cb814 100644 --- a/src/frontend/src/icons/SerpSearch/index.tsx +++ b/src/frontend/src/icons/SerpSearch/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSerpSearchAPI from "./SerpSearch"; export const SerpSearchIcon = forwardRef< diff --git a/src/frontend/src/icons/Serper/index.tsx b/src/frontend/src/icons/Serper/index.tsx index 35abc4b44..d07f08d28 100644 --- a/src/frontend/src/icons/Serper/index.tsx +++ b/src/frontend/src/icons/Serper/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSerper from "./Serper"; export const SerperIcon = forwardRef< diff --git a/src/frontend/src/icons/Share/index.tsx b/src/frontend/src/icons/Share/index.tsx index 2a68b6c19..87237a7e5 100644 --- a/src/frontend/src/icons/Share/index.tsx +++ b/src/frontend/src/icons/Share/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgShare from "./Share"; export const ShareIcon = forwardRef>( diff --git a/src/frontend/src/icons/Share2/index.tsx b/src/frontend/src/icons/Share2/index.tsx index c0384e295..86a75a96b 100644 --- a/src/frontend/src/icons/Share2/index.tsx +++ b/src/frontend/src/icons/Share2/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgShare2 from "./Share2"; export const Share2Icon = forwardRef< diff --git a/src/frontend/src/icons/Slack/index.tsx b/src/frontend/src/icons/Slack/index.tsx index d37a8ce1a..e3134c642 100644 --- a/src/frontend/src/icons/Slack/index.tsx +++ b/src/frontend/src/icons/Slack/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSlackIcon from "./SlackIcon"; export const SlackIcon = forwardRef>( diff --git a/src/frontend/src/icons/Spider/index.tsx b/src/frontend/src/icons/Spider/index.tsx index 65e41c364..0db6221c4 100644 --- a/src/frontend/src/icons/Spider/index.tsx +++ b/src/frontend/src/icons/Spider/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSpiderIcon from "./SpiderIcon"; export const SpiderIcon = forwardRef< diff --git a/src/frontend/src/icons/Streamlit/index.tsx b/src/frontend/src/icons/Streamlit/index.tsx index 1a4c55119..65c1a8d73 100644 --- a/src/frontend/src/icons/Streamlit/index.tsx +++ b/src/frontend/src/icons/Streamlit/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgStreamlit from "./SvgStreamlit"; export const Streamlit = forwardRef>( diff --git a/src/frontend/src/icons/Tavily/index.tsx b/src/frontend/src/icons/Tavily/index.tsx index a945ef43e..c6e5a2892 100644 --- a/src/frontend/src/icons/Tavily/index.tsx +++ b/src/frontend/src/icons/Tavily/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import Tavily from "./Tavily"; export const TavilyIcon = forwardRef< diff --git a/src/frontend/src/icons/TwelveLabs/index.tsx b/src/frontend/src/icons/TwelveLabs/index.tsx index 8105dfcc0..b1905a6a2 100644 --- a/src/frontend/src/icons/TwelveLabs/index.tsx +++ b/src/frontend/src/icons/TwelveLabs/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgTwelveLogo from "./TwelveLabsLogo"; export const TwelveLabsIcon = forwardRef< diff --git a/src/frontend/src/icons/Twitter X/index.tsx b/src/frontend/src/icons/Twitter X/index.tsx index 57c9b7e43..a739ad805 100644 --- a/src/frontend/src/icons/Twitter X/index.tsx +++ b/src/frontend/src/icons/Twitter X/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import TwitterXSVG from "./TwitterX.jsx"; export const TwitterXIcon = forwardRef< diff --git a/src/frontend/src/icons/Unstructured/index.tsx b/src/frontend/src/icons/Unstructured/index.tsx index f9e434a90..a362c2ac1 100644 --- a/src/frontend/src/icons/Unstructured/index.tsx +++ b/src/frontend/src/icons/Unstructured/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgUnstructured from "./Unstructured"; export const UnstructuredIcon = forwardRef< diff --git a/src/frontend/src/icons/Upstash/index.tsx b/src/frontend/src/icons/Upstash/index.tsx index b76110168..4acfeb427 100644 --- a/src/frontend/src/icons/Upstash/index.tsx +++ b/src/frontend/src/icons/Upstash/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import UpstashIcon from "./UpstashIcon"; export const UpstashSvgIcon = forwardRef< diff --git a/src/frontend/src/icons/VectaraIcon/index.tsx b/src/frontend/src/icons/VectaraIcon/index.tsx index 5adc2d7e7..5cce2be67 100644 --- a/src/frontend/src/icons/VectaraIcon/index.tsx +++ b/src/frontend/src/icons/VectaraIcon/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgVectara from "./Vectara"; export const VectaraIcon = forwardRef< diff --git a/src/frontend/src/icons/VertexAI/index.tsx b/src/frontend/src/icons/VertexAI/index.tsx index 48f193146..8e52d362d 100644 --- a/src/frontend/src/icons/VertexAI/index.tsx +++ b/src/frontend/src/icons/VertexAI/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgVertexAi from "./VertexAi"; export const VertexAIIcon = forwardRef< diff --git a/src/frontend/src/icons/Weaviate/index.tsx b/src/frontend/src/icons/Weaviate/index.tsx index 0b242f8f8..cd9f1ea69 100644 --- a/src/frontend/src/icons/Weaviate/index.tsx +++ b/src/frontend/src/icons/Weaviate/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgWeaviate from "./Weaviate"; export const WeaviateIcon = forwardRef< diff --git a/src/frontend/src/icons/Wikipedia/index.tsx b/src/frontend/src/icons/Wikipedia/index.tsx index 20525b70d..dcf1d719a 100644 --- a/src/frontend/src/icons/Wikipedia/index.tsx +++ b/src/frontend/src/icons/Wikipedia/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgWikipedia from "./Wikipedia"; export const WikipediaIcon = forwardRef< diff --git a/src/frontend/src/icons/Windsurf/index.tsx b/src/frontend/src/icons/Windsurf/index.tsx index 9ac43757f..a8394bc48 100644 --- a/src/frontend/src/icons/Windsurf/index.tsx +++ b/src/frontend/src/icons/Windsurf/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import SvgWindsurf from "./Windsurf"; export const WindsurfIcon = forwardRef< diff --git a/src/frontend/src/icons/Wolfram/index.tsx b/src/frontend/src/icons/Wolfram/index.tsx index 1d49b96fc..562e65b71 100644 --- a/src/frontend/src/icons/Wolfram/index.tsx +++ b/src/frontend/src/icons/Wolfram/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgWolfram from "./Wolfram"; export const WolframIcon = forwardRef< diff --git a/src/frontend/src/icons/Word/index.tsx b/src/frontend/src/icons/Word/index.tsx index 9df0d60cc..06681497e 100644 --- a/src/frontend/src/icons/Word/index.tsx +++ b/src/frontend/src/icons/Word/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgWord from "./Word"; export const WordIcon = forwardRef>( diff --git a/src/frontend/src/icons/Youtube/index.tsx b/src/frontend/src/icons/Youtube/index.tsx index 6e49c4dd2..8d4f458a5 100644 --- a/src/frontend/src/icons/Youtube/index.tsx +++ b/src/frontend/src/icons/Youtube/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import YouTubeIcon from "./youtube"; export const YouTubeSvgIcon = forwardRef< diff --git a/src/frontend/src/icons/ZepMemory/index.tsx b/src/frontend/src/icons/ZepMemory/index.tsx index 15c990aba..90d624122 100644 --- a/src/frontend/src/icons/ZepMemory/index.tsx +++ b/src/frontend/src/icons/ZepMemory/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgZepMemory from "./ZepMemory"; export const ZepMemoryIcon = forwardRef< diff --git a/src/frontend/src/icons/athena/index.tsx b/src/frontend/src/icons/athena/index.tsx index 20445251e..fbe7af560 100644 --- a/src/frontend/src/icons/athena/index.tsx +++ b/src/frontend/src/icons/athena/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; //@ts-ignore import { AthenaComponent } from "./athena"; diff --git a/src/frontend/src/icons/eagerIconImports.ts b/src/frontend/src/icons/eagerIconImports.ts index 9160c9876..4a502b9e9 100644 --- a/src/frontend/src/icons/eagerIconImports.ts +++ b/src/frontend/src/icons/eagerIconImports.ts @@ -7,10 +7,10 @@ import { ArizeIcon } from "@/icons/Arize"; import { ArXivIcon } from "@/icons/ArXiv"; import { AssemblyAIIcon } from "@/icons/AssemblyAI"; import { AstraDBIcon } from "@/icons/AstraDB"; -import { AthenaIcon } from "@/icons/athena/index"; import { AWSIcon } from "@/icons/AWS"; import { AWSInvertedIcon } from "@/icons/AWSInverted"; import { AzureIcon } from "@/icons/Azure"; +import { AthenaIcon } from "@/icons/athena/index"; import { BingIcon } from "@/icons/Bing"; import { BotMessageSquareIcon } from "@/icons/BotMessageSquare"; import { BWPythonIcon } from "@/icons/BW python"; @@ -36,8 +36,6 @@ import { freezeAllIcon } from "@/icons/freezeAll"; import { GitBookIcon } from "@/icons/GitBook"; import { GitLoaderIcon } from "@/icons/GitLoader"; import { GleanIcon } from "@/icons/Glean"; -import { GlobeOkIcon } from "@/icons/globe-ok"; -import { GmailIcon } from "@/icons/gmail"; import { GoogleIcon } from "@/icons/Google"; import { GoogleDriveIcon } from "@/icons/GoogleDrive"; import { GoogleGenerativeAIIcon } from "@/icons/GoogleGenerativeAI"; @@ -48,10 +46,12 @@ import { } from "@/icons/GradientSparkles"; import { GridHorizontalIcon } from "@/icons/GridHorizontal"; import { GroqIcon } from "@/icons/Groq"; -import { HackerNewsIcon } from "@/icons/hackerNews"; +import { GlobeOkIcon } from "@/icons/globe-ok"; +import { GmailIcon } from "@/icons/gmail"; import { HCDIcon } from "@/icons/HCD"; import { HomeAssistantIcon } from "@/icons/HomeAssistant"; import { HuggingFaceIcon } from "@/icons/HuggingFace"; +import { HackerNewsIcon } from "@/icons/hackerNews"; import { WatsonxAiIcon } from "@/icons/IBMWatsonx"; import { IcosaIcon } from "@/icons/Icosa"; import { IFixIcon } from "@/icons/IFixIt"; @@ -64,8 +64,8 @@ import { Mem0 } from "@/icons/Mem0"; import { MetaIcon } from "@/icons/Meta"; import { MidjourneyIcon } from "@/icons/Midjorney"; import { MilvusIcon } from "@/icons/Milvus"; -import { MistralIcon } from "@/icons/mistral"; import { MongoDBIcon } from "@/icons/MongoDB"; +import { MistralIcon } from "@/icons/mistral"; import { NeedleIcon } from "@/icons/Needle"; import { NotDiamondIcon } from "@/icons/NotDiamond"; import { NotionIcon } from "@/icons/Notion"; @@ -100,8 +100,8 @@ import { SpiderIcon } from "@/icons/Spider"; import { Streamlit } from "@/icons/Streamlit"; import { SupabaseIcon } from "@/icons/supabase"; import { TavilyIcon } from "@/icons/Tavily"; -import { ThumbDownIconCustom, ThumbUpIconCustom } from "@/icons/thumbs"; import { TwelveLabsIcon } from "@/icons/TwelveLabs"; +import { ThumbDownIconCustom, ThumbUpIconCustom } from "@/icons/thumbs"; import { UnstructuredIcon } from "@/icons/Unstructured"; import { UpstashSvgIcon } from "@/icons/Upstash"; import { VectaraIcon } from "@/icons/VectaraIcon"; diff --git a/src/frontend/src/icons/freezeAll/index.tsx b/src/frontend/src/icons/freezeAll/index.tsx index 62f5b53de..f839029e9 100644 --- a/src/frontend/src/icons/freezeAll/index.tsx +++ b/src/frontend/src/icons/freezeAll/index.tsx @@ -1,5 +1,7 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgFreezeAll from "./freezeAll"; + ("./freezeAll.jsx"); export const freezeAllIcon = forwardRef< diff --git a/src/frontend/src/icons/github/index.tsx b/src/frontend/src/icons/github/index.tsx index 9d5c56ad4..b8ab70f5b 100644 --- a/src/frontend/src/icons/github/index.tsx +++ b/src/frontend/src/icons/github/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import GithubIconSVG from "./github"; export const GithubIcon = forwardRef< diff --git a/src/frontend/src/icons/globe-ok/index.tsx b/src/frontend/src/icons/globe-ok/index.tsx index 9984bdc5c..ff99fd1e5 100644 --- a/src/frontend/src/icons/globe-ok/index.tsx +++ b/src/frontend/src/icons/globe-ok/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgGlobeOkIcon from "./globe-ok"; export const GlobeOkIcon = forwardRef< diff --git a/src/frontend/src/icons/gmail/index.tsx b/src/frontend/src/icons/gmail/index.tsx index 87ea0c519..801ed4a47 100644 --- a/src/frontend/src/icons/gmail/index.tsx +++ b/src/frontend/src/icons/gmail/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import GmailIconSVG from "./gmail"; export const GmailIcon = forwardRef>( diff --git a/src/frontend/src/icons/googlecalendar/index.tsx b/src/frontend/src/icons/googlecalendar/index.tsx index 65a801aa8..39c9eb97b 100644 --- a/src/frontend/src/icons/googlecalendar/index.tsx +++ b/src/frontend/src/icons/googlecalendar/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import GooglecalendarIconSVG from "./googlecalendar"; export const GooglecalendarIcon = forwardRef< diff --git a/src/frontend/src/icons/hackerNews/index.tsx b/src/frontend/src/icons/hackerNews/index.tsx index 14e916c93..a4f2cc2ba 100644 --- a/src/frontend/src/icons/hackerNews/index.tsx +++ b/src/frontend/src/icons/hackerNews/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgYCombinatorLogo from "./YCombinatorLogo"; export const HackerNewsIcon = forwardRef< diff --git a/src/frontend/src/icons/mistral/index.tsx b/src/frontend/src/icons/mistral/index.tsx index 6125953aa..7636650fc 100644 --- a/src/frontend/src/icons/mistral/index.tsx +++ b/src/frontend/src/icons/mistral/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgMistralIcon from "./mistralIcon"; export const MistralIcon = forwardRef< diff --git a/src/frontend/src/icons/outlook/index.tsx b/src/frontend/src/icons/outlook/index.tsx index add0e2324..126fab191 100644 --- a/src/frontend/src/icons/outlook/index.tsx +++ b/src/frontend/src/icons/outlook/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import OutlookIconSVG from "./outlook"; export const OutlookIcon = forwardRef< diff --git a/src/frontend/src/icons/supabase/index.tsx b/src/frontend/src/icons/supabase/index.tsx index 644f22b3f..f043fb261 100644 --- a/src/frontend/src/icons/supabase/index.tsx +++ b/src/frontend/src/icons/supabase/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import SvgSupabaseIcon from "./SupabaseIcon"; export const SupabaseIcon = forwardRef< diff --git a/src/frontend/src/icons/thumbs/index.tsx b/src/frontend/src/icons/thumbs/index.tsx index 6e99822ae..591bad17d 100644 --- a/src/frontend/src/icons/thumbs/index.tsx +++ b/src/frontend/src/icons/thumbs/index.tsx @@ -1,4 +1,5 @@ -import React, { forwardRef } from "react"; +import type React from "react"; +import { forwardRef } from "react"; import ThumbDownFilled from "./thumbDown"; import ThumbUpFilled from "./thumbUp"; diff --git a/src/frontend/src/icons/xAI/index.tsx b/src/frontend/src/icons/xAI/index.tsx index 219e33b94..96d44a85e 100644 --- a/src/frontend/src/icons/xAI/index.tsx +++ b/src/frontend/src/icons/xAI/index.tsx @@ -1,5 +1,6 @@ +import type React from "react"; +import { forwardRef } from "react"; import { useDarkStore } from "@/stores/darkStore"; -import React, { forwardRef } from "react"; import XAISVG from "./xAIIcon.jsx"; export const XAIIcon = forwardRef>( diff --git a/src/frontend/src/modals/EmbedModal/embed-modal.tsx b/src/frontend/src/modals/EmbedModal/embed-modal.tsx index dc5e7ca28..009a9f7f5 100644 --- a/src/frontend/src/modals/EmbedModal/embed-modal.tsx +++ b/src/frontend/src/modals/EmbedModal/embed-modal.tsx @@ -1,10 +1,10 @@ -import { useDarkStore } from "@/stores/darkStore"; import { useState } from "react"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { oneDark, oneLight, } from "react-syntax-highlighter/dist/cjs/styles/prism"; +import { useDarkStore } from "@/stores/darkStore"; import IconComponent from "../../components/common/genericIconComponent"; import { Button } from "../../components/ui/button"; import getWidgetCode from "../apiModal/utils/get-widget-code"; diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/components/file-input.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/components/file-input.tsx index 3b66f4474..af48ebaa8 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/components/file-input.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/components/file-input.tsx @@ -1,17 +1,17 @@ -import { Button } from "../../../../../components/ui/button"; +import { useEffect, useState } from "react"; import { usePostUploadFile } from "@/controllers/API/queries/files/use-post-upload-file"; import { createFileUpload } from "@/helpers/create-file-upload"; import useFileSizeValidator from "@/shared/hooks/use-file-size-validator"; import useAlertStore from "@/stores/alertStore"; -import { useEffect, useState } from "react"; import IconComponent from "../../../../../components/common/genericIconComponent"; +import { Button } from "../../../../../components/ui/button"; import { ALLOWED_IMAGE_INPUT_EXTENSIONS, BASE_URL_API, } from "../../../../../constants/constants"; import useFlowsManagerStore from "../../../../../stores/flowsManagerStore"; -import { IOFileInputProps } from "../../../../../types/components"; +import type { IOFileInputProps } from "../../../../../types/components"; export default function IOFileInput({ field, updateValue }: IOFileInputProps) { //component to handle file upload from chatIO diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/components/json-input.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/components/json-input.tsx index 4eea3f583..f13fc3ca4 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/components/json-input.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/components/json-input.tsx @@ -1,7 +1,7 @@ -import JsonEditor from "@/components/core/jsonEditor"; -import { IOJSONInputComponentType } from "@/types/components"; import { useEffect, useRef } from "react"; -import { JsonEditor as VanillaJsonEditor } from "vanilla-jsoneditor"; +import type { JsonEditor as VanillaJsonEditor } from "vanilla-jsoneditor"; +import JsonEditor from "@/components/core/jsonEditor"; +import type { IOJSONInputComponentType } from "@/types/components"; export default function IoJsonInput({ value = [], onChange, diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/components/key-pair-input.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/components/key-pair-input.tsx index 702b4f5e2..476259092 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/components/key-pair-input.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/components/key-pair-input.tsx @@ -81,7 +81,7 @@ const IOKeyPairInput = ({