diff --git a/docs/docs/integrations/notion/list-users.md b/docs/docs/integrations/notion/list-users.md index a85642214..0eb8236f5 100644 --- a/docs/docs/integrations/notion/list-users.md +++ b/docs/docs/integrations/notion/list-users.md @@ -9,7 +9,7 @@ The `NotionUserList` component retrieves users from Notion. It provides a conven [Notion Reference](https://developers.notion.com/reference/get-users) - The `NotionUserList` component enables you to: +The `NotionUserList` component enables you to: - Retrieve user data from Notion - Access user information such as ID, type, name, and avatar URL diff --git a/src/backend/base/langflow/api/v1/login.py b/src/backend/base/langflow/api/v1/login.py index cde6bd28b..2637cc865 100644 --- a/src/backend/base/langflow/api/v1/login.py +++ b/src/backend/base/langflow/api/v1/login.py @@ -71,9 +71,7 @@ async def login_to_get_access_token( @router.get("/auto_login") async def auto_login( - response: Response, - db: Session = Depends(get_session), - settings_service=Depends(get_settings_service) + response: Response, db: Session = Depends(get_session), settings_service=Depends(get_settings_service) ): auth_settings = settings_service.auth_settings if settings_service.auth_settings.AUTO_LOGIN: diff --git a/src/backend/base/langflow/api/v1/monitor.py b/src/backend/base/langflow/api/v1/monitor.py index e419ed5bf..ffd01b470 100644 --- a/src/backend/base/langflow/api/v1/monitor.py +++ b/src/backend/base/langflow/api/v1/monitor.py @@ -1,5 +1,4 @@ from typing import List, Optional -from uuid import UUID from fastapi import APIRouter, Depends, HTTPException, Query from langflow.services.deps import get_monitor_service diff --git a/src/backend/base/langflow/base/data/utils.py b/src/backend/base/langflow/base/data/utils.py index 2aaf3b23d..c72c9b5b8 100644 --- a/src/backend/base/langflow/base/data/utils.py +++ b/src/backend/base/langflow/base/data/utils.py @@ -92,7 +92,7 @@ def read_text_file(file_path: str) -> str: with open(file_path, "rb") as f: raw_data = f.read() result = chardet.detect(raw_data) - encoding = result['encoding'] + encoding = result["encoding"] with open(file_path, "r", encoding=encoding) as f: return f.read() diff --git a/src/backend/base/langflow/helpers/flow.py b/src/backend/base/langflow/helpers/flow.py index 9a8a7c3b5..7eb901274 100644 --- a/src/backend/base/langflow/helpers/flow.py +++ b/src/backend/base/langflow/helpers/flow.py @@ -90,7 +90,9 @@ async def run_flow( fallback_to_env_vars = get_settings_service().settings.fallback_to_env_var - return await graph.arun(inputs_list, inputs_components=inputs_components, types=types, fallback_to_env_vars=fallback_to_env_vars) + return await graph.arun( + inputs_list, inputs_components=inputs_components, types=types, fallback_to_env_vars=fallback_to_env_vars + ) def generate_function_for_flow( diff --git a/src/backend/base/langflow/initial_setup/setup.py b/src/backend/base/langflow/initial_setup/setup.py index 27574950c..83408d8b9 100644 --- a/src/backend/base/langflow/initial_setup/setup.py +++ b/src/backend/base/langflow/initial_setup/setup.py @@ -20,7 +20,7 @@ from langflow.services.database.models.user.crud import get_user_by_username from langflow.services.deps import get_settings_service, session_scope from langflow.services.database.models.folder.utils import create_default_folder_if_it_doesnt_exist -from langflow.services.deps import get_settings_service, session_scope, get_variable_service +from langflow.services.deps import get_variable_service STARTER_FOLDER_NAME = "Starter Projects" @@ -221,6 +221,7 @@ def _is_valid_uuid(val): return False return str(uuid_obj) == val + def load_flows_from_directory(): settings_service = get_settings_service() flows_path = settings_service.settings.load_flows_path @@ -262,6 +263,7 @@ def load_flows_from_directory(): session.add(flow) session.commit() + def find_existing_flow(session, flow_id, flow_endpoint_name): if flow_endpoint_name: stmt = select(Flow).where(Flow.endpoint_name == flow_endpoint_name) @@ -271,6 +273,8 @@ def find_existing_flow(session, flow_id, flow_endpoint_name): if existing := session.exec(stmt).first(): return existing return None + + def create_or_update_starter_projects(): components_paths = get_settings_service().settings.components_path try: diff --git a/src/backend/base/langflow/processing/process.py b/src/backend/base/langflow/processing/process.py index aeff0f1a4..1b54d3f08 100644 --- a/src/backend/base/langflow/processing/process.py +++ b/src/backend/base/langflow/processing/process.py @@ -59,7 +59,7 @@ async def run_graph_internal( outputs or [], stream=stream, session_id=session_id_str or "", - fallback_to_env_vars=fallback_to_env_vars + fallback_to_env_vars=fallback_to_env_vars, ) if session_id_str and session_service: await session_service.update_session(session_id_str, (graph, artifacts)) diff --git a/src/backend/base/langflow/services/auth/utils.py b/src/backend/base/langflow/services/auth/utils.py index 0e0aead88..f62d3ce4f 100644 --- a/src/backend/base/langflow/services/auth/utils.py +++ b/src/backend/base/langflow/services/auth/utils.py @@ -215,10 +215,7 @@ def create_user_longterm_token(db: Session = Depends(get_session)) -> tuple[UUID username = settings_service.auth_settings.SUPERUSER super_user = get_user_by_username(db, username) if not super_user: - raise HTTPException( - status_code=status.HTTP_400_BAD_REQUEST, - detail="Super user hasn't been created" - ) + raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Super user hasn't been created") access_token_expires_longterm = timedelta(days=365) access_token = create_token( data={"sub": str(super_user.id)}, diff --git a/src/backend/base/langflow/services/database/models/api_key/model.py b/src/backend/base/langflow/services/database/models/api_key/model.py index cb216d9ae..157b08b32 100644 --- a/src/backend/base/langflow/services/database/models/api_key/model.py +++ b/src/backend/base/langflow/services/database/models/api_key/model.py @@ -55,6 +55,7 @@ class ApiKeyRead(ApiKeyBase): id: UUID api_key: str = Field(schema_extra={"validate_default": True}) user_id: UUID = Field() + created_at: datetime = Field() @field_validator("api_key") @classmethod diff --git a/src/backend/base/langflow/services/monitor/service.py b/src/backend/base/langflow/services/monitor/service.py index ab5a87f08..02bc59cc2 100644 --- a/src/backend/base/langflow/services/monitor/service.py +++ b/src/backend/base/langflow/services/monitor/service.py @@ -115,7 +115,9 @@ class MonitorService(Service): return self.exec_query(query) def update_message(self, message_id: int, **kwargs): - query = f"""UPDATE messages SET {', '.join(f"{k} = '{v}'" for k, v in kwargs.items())} WHERE index = {message_id}""" + query = ( + f"""UPDATE messages SET {', '.join(f"{k} = '{v}'" for k, v in kwargs.items())} WHERE index = {message_id}""" + ) return self.exec_query(query) diff --git a/src/backend/base/langflow/services/settings/base.py b/src/backend/base/langflow/services/settings/base.py index 259e10170..4f50cb756 100644 --- a/src/backend/base/langflow/services/settings/base.py +++ b/src/backend/base/langflow/services/settings/base.py @@ -78,7 +78,6 @@ class Settings(BaseSettings): langchain_cache: str = "InMemoryCache" load_flows_path: Optional[str] = None - # Redis redis_host: str = "localhost" redis_port: int = 6379 diff --git a/src/backend/base/langflow/services/settings/service.py b/src/backend/base/langflow/services/settings/service.py index 95088e829..3ecdb683d 100644 --- a/src/backend/base/langflow/services/settings/service.py +++ b/src/backend/base/langflow/services/settings/service.py @@ -1,5 +1,4 @@ import os -from typing import Optional import yaml from loguru import logger @@ -8,6 +7,7 @@ from langflow.services.base import Service from langflow.services.settings.auth import AuthSettings from langflow.services.settings.base import Settings + class SettingsService(Service): name = "settings_service" diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index ef33cb95d..42eec6f76 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -44,6 +44,7 @@ "debounce-promise": "^3.1.2", "dompurify": "^3.0.5", "dotenv": "^16.4.5", + "emoji-regex": "^10.3.0", "esbuild": "^0.17.19", "file-saver": "^2.0.5", "framer-motion": "^11.0.6", @@ -479,6 +480,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -5997,9 +5999,9 @@ "integrity": "sha512-C6q/xcUJf/2yODRxAVCfIk4j3y3LMsD0ehiE2RQNV2cxc8XU62gR6vvYh3+etSUzlgTfil+qDHI1vubpdf0TOA==" }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" }, "node_modules/end-of-stream": { "version": "1.4.4", @@ -12204,6 +12206,16 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", diff --git a/src/frontend/package.json b/src/frontend/package.json index 7a56d080e..a33d73e08 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -39,6 +39,7 @@ "debounce-promise": "^3.1.2", "dompurify": "^3.0.5", "dotenv": "^16.4.5", + "emoji-regex": "^10.3.0", "esbuild": "^0.17.19", "file-saver": "^2.0.5", "framer-motion": "^11.0.6", diff --git a/src/frontend/src/App.css b/src/frontend/src/App.css index a4ff01961..809959757 100644 --- a/src/frontend/src/App.css +++ b/src/frontend/src/App.css @@ -164,3 +164,13 @@ body { .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:hover { background-color: #bbb; } + +/* This CSS is to not apply the border for the column having 'no-border' class */ +.no-border.ag-cell:focus { + border: none !important; + outline: none; +} +.no-border.ag-cell { + border: none !important; + outline: none; +} diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index b9e02a27d..36f2ad9f9 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -1,4 +1,3 @@ -import axios from "axios"; import { useContext, useEffect, useState } from "react"; import { ErrorBoundary } from "react-error-boundary"; import { useNavigate } from "react-router-dom"; @@ -30,10 +29,10 @@ export default function App() { useTrackLastVisitedPath(); const removeFromTempNotificationList = useAlertStore( - (state) => state.removeFromTempNotificationList, + (state) => state.removeFromTempNotificationList ); const tempNotificationList = useAlertStore( - (state) => state.tempNotificationList, + (state) => state.tempNotificationList ); const [fetchError, setFetchError] = useState(false); const isLoading = useFlowsManagerStore((state) => state.isLoading); @@ -51,7 +50,7 @@ export default function App() { const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshStars = useDarkStore((state) => state.refreshStars); const setGlobalVariables = useGlobalVariablesStore( - (state) => state.setGlobalVariables, + (state) => state.setGlobalVariables ); const checkHasStore = useStoreStore((state) => state.checkHasStore); const navigate = useNavigate(); diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index 05f42922d..6eff32fe2 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -16,13 +16,13 @@ export default function AlertDropdown({ }: AlertDropdownType): JSX.Element { const notificationList = useAlertStore((state) => state.notificationList); const clearNotificationList = useAlertStore( - (state) => state.clearNotificationList, + (state) => state.clearNotificationList ); const removeFromNotificationList = useAlertStore( - (state) => state.removeFromNotificationList, + (state) => state.removeFromNotificationList ); const setNotificationCenter = useAlertStore( - (state) => state.setNotificationCenter, + (state) => state.setNotificationCenter ); const [open, setOpen] = useState(false); diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index 8433962a7..dc7f41ad7 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -31,14 +31,14 @@ export default function ImageViewer({ image }) { const fullPageButton = document.getElementById("full-page-button"); zoomInButton!.addEventListener("click", () => - viewer.viewport.zoomBy(1.2), + viewer.viewport.zoomBy(1.2) ); zoomOutButton!.addEventListener("click", () => - viewer.viewport.zoomBy(0.8), + viewer.viewport.zoomBy(0.8) ); homeButton!.addEventListener("click", () => viewer.viewport.goHome()); fullPageButton!.addEventListener("click", () => - viewer.setFullScreen(true), + viewer.setFullScreen(true) ); // Optionally, you can set additional viewer options here @@ -47,16 +47,16 @@ export default function ImageViewer({ image }) { return () => { viewer.destroy(); zoomInButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(1.2), + viewer.viewport.zoomBy(1.2) ); zoomOutButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(0.8), + viewer.viewport.zoomBy(0.8) ); homeButton!.removeEventListener("click", () => - viewer.viewport.goHome(), + viewer.viewport.goHome() ); fullPageButton!.removeEventListener("click", () => - viewer.setFullScreen(true), + viewer.setFullScreen(true) ); }; } diff --git a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx index d4fb95b5c..212a03fa2 100644 --- a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx @@ -15,7 +15,7 @@ export default function FolderAccordionComponent({ options, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion(), + open.length === 0 ? "" : getOpenAccordion() ); function getOpenAccordion(): string { diff --git a/src/frontend/src/components/accordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/index.tsx index 7c5562e7f..43a0aef79 100644 --- a/src/frontend/src/components/accordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/index.tsx @@ -7,7 +7,6 @@ import { } from "../../components/ui/accordion"; import { AccordionComponentType } from "../../types/components"; import { cn } from "../../utils/utils"; -import ShadTooltip from "../shadTooltipComponent"; export default function AccordionComponent({ trigger, @@ -18,7 +17,7 @@ export default function AccordionComponent({ sideBar, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion(), + open.length === 0 ? "" : getOpenAccordion() ); function getOpenAccordion(): string { @@ -53,7 +52,7 @@ export default function AccordionComponent({ disabled={disabled} className={cn( sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3", - disabled ? "cursor-not-allowed" : "cursor-pointer", + disabled ? "cursor-not-allowed" : "cursor-pointer" )} > {trigger} diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index 36b68a7e8..61dada650 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -23,19 +23,19 @@ export default function AddNewVariableButton({ children }): JSX.Element { const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); const unavaliableFields = new Set( - Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)), + Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) ); const availableFields = () => { const fields = Array.from(componentFields).filter( - (field) => !unavaliableFields.has(field), + (field) => !unavaliableFields.has(field) ); return sortByName(fields); }; const addGlobalVariable = useGlobalVariablesStore( - (state) => state.addGlobalVariable, + (state) => state.addGlobalVariable ); function handleSaveVariable() { diff --git a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx index 28674f3bc..54dbf4846 100644 --- a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx @@ -10,7 +10,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { draggable //TODO check color schema className={cn( - "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]", + "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]" )} >
@@ -22,7 +22,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon", + : "h-7 w-7 flex-shrink-0 text-flow-icon" )} name={data.is_component ? "ToyBrick" : "Group"} /> diff --git a/src/frontend/src/components/cardComponent/index.tsx b/src/frontend/src/components/cardComponent/index.tsx index 09b8ff833..a5d671aa0 100644 --- a/src/frontend/src/components/cardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/index.tsx @@ -27,8 +27,8 @@ import { import { Checkbox } from "../ui/checkbox"; import { FormControl, FormField } from "../ui/form"; import Loading from "../ui/loading"; -import { convertTestName } from "./utils/convert-test-name"; import DragCardComponent from "./components/dragCardComponent"; +import { convertTestName } from "./utils/convert-test-name"; export default function CollectionCardComponent({ data, @@ -60,11 +60,11 @@ export default function CollectionCardComponent({ const [loading, setLoading] = useState(false); const [loadingLike, setLoadingLike] = useState(false); const [liked_by_user, setLiked_by_user] = useState( - data?.liked_by_user ?? false, + data?.liked_by_user ?? false ); const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0); const [downloads_count, setDownloads_count] = useState( - data?.downloads_count ?? 0, + data?.downloads_count ?? 0 ); const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow); @@ -75,12 +75,12 @@ export default function CollectionCardComponent({ const [openPlayground, setOpenPlayground] = useState(false); const [openDelete, setOpenDelete] = useState(false); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId, + (state) => state.setCurrentFlowId ); const [loadingPlayground, setLoadingPlayground] = useState(false); const selectedFlowsComponentsCards = useFlowsManagerStore( - (state) => state.selectedFlowsComponentsCards, + (state) => state.selectedFlowsComponentsCards ); const name = data.is_component ? "Component" : "Flow"; @@ -220,7 +220,7 @@ export default function CollectionCardComponent({ "group relative flex min-h-[11rem] flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]", disabled ? "pointer-events-none opacity-50" : "", onClick ? "cursor-pointer" : "", - isSelectedCard ? "border border-selected" : "", + isSelectedCard ? "border border-selected" : "" )} onClick={onClick} > @@ -233,7 +233,7 @@ export default function CollectionCardComponent({ "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon", + : "h-7 w-7 flex-shrink-0 text-flow-icon" )} name={data.is_component ? "ToyBrick" : "Group"} /> @@ -428,7 +428,7 @@ export default function CollectionCardComponent({ name="Trash2" className={cn( "h-5 w-5", - !authorized ? " text-ring" : "", + !authorized ? " text-ring" : "" )} /> @@ -463,7 +463,7 @@ export default function CollectionCardComponent({ liked_by_user ? "fill-destructive stroke-destructive" : "", - !authorized ? " text-ring" : "", + !authorized ? " text-ring" : "" )} /> @@ -501,7 +501,7 @@ export default function CollectionCardComponent({ } className={cn( loading ? "h-5 w-5 animate-spin" : "h-5 w-5", - !authorized ? " text-ring" : "", + !authorized ? " text-ring" : "" )} /> diff --git a/src/frontend/src/components/cardsWrapComponent/index.tsx b/src/frontend/src/components/cardsWrapComponent/index.tsx index c7ca01588..0de3f1a2f 100644 --- a/src/frontend/src/components/cardsWrapComponent/index.tsx +++ b/src/frontend/src/components/cardsWrapComponent/index.tsx @@ -65,7 +65,7 @@ export default function CardsWrapComponent({ "h-full w-full", isDragging ? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light" - : "", + : "" )} > {isDragging ? ( diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 81dade485..1fa82e9dd 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -50,7 +50,7 @@ export default function FlowToolbar(): JSX.Element { "relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover ", !hasApiKey || !validApiKey || !hasStore ? " button-disable text-muted-foreground " - : "", + : "" )} > Share ), - [hasApiKey, validApiKey, currentFlow, hasStore], + [hasApiKey, validApiKey, currentFlow, hasStore] ); return ( @@ -118,7 +118,7 @@ export default function FlowToolbar(): JSX.Element {
{ if (disabled && myValue !== "") { diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 0a0b691c8..9f1fc99b6 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -236,7 +236,7 @@ export default function CodeTabsComponent({
{data?.map((node: any, i) => ( @@ -275,8 +275,8 @@ export default function CodeTabsComponent({ .show && LANGFLOW_SUPPORTED_TYPES.has( node.data.node.template[templateField] - .type, - ), + .type + ) ) .map((templateField, indx) => { return ( @@ -334,7 +334,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -380,7 +380,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -433,7 +433,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -470,7 +470,7 @@ export default function CodeTabsComponent({ e, node.data.node.template[ templateField - ], + ] ); }} size="small" @@ -501,7 +501,7 @@ export default function CodeTabsComponent({ ].fileTypes } onFileChange={( - value: any, + value: any ) => { node.data.node.template[ templateField @@ -554,7 +554,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -594,7 +594,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} value={ @@ -656,7 +656,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -702,7 +702,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -748,7 +748,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> @@ -780,8 +780,8 @@ export default function CodeTabsComponent({ ].value, type( node, - templateField, - ), + templateField + ) ) } duplicateKey={ @@ -790,15 +790,15 @@ export default function CodeTabsComponent({ onChange={(target) => { const valueToNumbers = convertValuesToNumbers( - target, + target ); node.data.node!.template[ templateField ].value = valueToNumbers; setErrorDuplicateKey( hasDuplicateKeys( - valueToNumbers, - ), + valueToNumbers + ) ); setData((old) => { let newInputList = @@ -815,7 +815,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} isList={ @@ -863,7 +863,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ], + ] ); }} /> diff --git a/src/frontend/src/components/csvOutputComponent/index.tsx b/src/frontend/src/components/csvOutputComponent/index.tsx index a98d9c028..a25cfb679 100644 --- a/src/frontend/src/components/csvOutputComponent/index.tsx +++ b/src/frontend/src/components/csvOutputComponent/index.tsx @@ -67,7 +67,7 @@ function CsvOutputComponent({ if (file) { const { rowData: data, colDefs: columns } = convertCSVToData( file, - separator, + separator ); setRowData(data); setColDefs(columns); diff --git a/src/frontend/src/components/dictComponent/index.tsx b/src/frontend/src/components/dictComponent/index.tsx index 39850e6e3..5161135ed 100644 --- a/src/frontend/src/components/dictComponent/index.tsx +++ b/src/frontend/src/components/dictComponent/index.tsx @@ -29,7 +29,7 @@ export default function DictComponent({
1 && editNode ? "my-1" : "", - "flex flex-col gap-3", + "flex flex-col gap-3" )} > { diff --git a/src/frontend/src/components/dropdownComponent/index.tsx b/src/frontend/src/components/dropdownComponent/index.tsx index 8402d166e..0fd981603 100644 --- a/src/frontend/src/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/dropdownComponent/index.tsx @@ -33,9 +33,8 @@ export default function Dropdown({ const refButton = useRef(null); - const PopoverContentDropdown = children - ? PopoverContent - : PopoverContentWithoutPortal; + const PopoverContentDropdown = + children || editNode ? PopoverContent : PopoverContentWithoutPortal; return ( <> @@ -59,7 +58,7 @@ export default function Dropdown({ ? "dropdown-component-outline" : "dropdown-component-false-outline", "w-full justify-between font-normal", - editNode ? "input-edit-node" : "py-2", + editNode ? "input-edit-node" : "py-2" )} > @@ -107,7 +106,7 @@ export default function Dropdown({ name="Check" className={cn( "ml-auto h-4 w-4 text-primary", - value === option ? "opacity-100" : "opacity-0", + value === option ? "opacity-100" : "opacity-0" )} /> diff --git a/src/frontend/src/components/editFlowSettingsComponent/index.tsx b/src/frontend/src/components/editFlowSettingsComponent/index.tsx index 26bc138e3..3dd813965 100644 --- a/src/frontend/src/components/editFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/editFlowSettingsComponent/index.tsx @@ -99,7 +99,7 @@ export const EditFlowSettings: React.FC = ({ {description === "" ? "No description" : description} diff --git a/src/frontend/src/components/genericIconComponent/index.tsx b/src/frontend/src/components/genericIconComponent/index.tsx index 9f7c687a1..398ae6e7f 100644 --- a/src/frontend/src/components/genericIconComponent/index.tsx +++ b/src/frontend/src/components/genericIconComponent/index.tsx @@ -18,7 +18,7 @@ export const ForwardedIconComponent = memo( strokeWidth, id = "", }: IconComponentProps, - ref, + ref ) => { const [showFallback, setShowFallback] = useState(false); @@ -65,8 +65,8 @@ export const ForwardedIconComponent = memo( /> ); - }, - ), + } + ) ); export default ForwardedIconComponent; diff --git a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx index 35542ca2a..78a21113a 100644 --- a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx +++ b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx @@ -113,7 +113,7 @@ export const MenuBar = ({}: {}): JSX.Element => { title: UPLOAD_ERROR_ALERT, list: [error], }); - }, + } ); }} > @@ -195,7 +195,7 @@ export const MenuBar = ({}: {}): JSX.Element => { name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"} className={cn( "h-4 w-4", - isBuilding || saveLoading ? "animate-spin" : "animate-wiggle", + isBuilding || saveLoading ? "animate-spin" : "animate-wiggle" )} /> {printByBuildStatus()} diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx index 0abd16d3d..50a0c8cf8 100644 --- a/src/frontend/src/components/headerComponent/index.tsx +++ b/src/frontend/src/components/headerComponent/index.tsx @@ -56,7 +56,7 @@ export default function Header(): JSX.Element { const lastFlowVisitedIndex = routeHistory .reverse() .findIndex( - (path) => path.includes("/flow/") && path !== location.pathname, + (path) => path.includes("/flow/") && path !== location.pathname ); const lastFlowVisited = routeHistory[lastFlowVisitedIndex]; @@ -181,18 +181,6 @@ export default function Header(): JSX.Element { />
- {autoLogin && ( - - )} <> diff --git a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx index e0bf48917..7e0c788a6 100644 --- a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx +++ b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx @@ -32,11 +32,11 @@ export default function HorizontalScrollFadeComponent({ fadeContainerRef.current.classList.toggle( "fade-left", - isScrollable && !atStart, + isScrollable && !atStart ); fadeContainerRef.current.classList.toggle( "fade-right", - isScrollable && !atEnd, + isScrollable && !atEnd ); }; diff --git a/src/frontend/src/components/inputComponent/components/popover/index.tsx b/src/frontend/src/components/inputComponent/components/popover/index.tsx index 78fc5bd3d..06be89d91 100644 --- a/src/frontend/src/components/inputComponent/components/popover/index.tsx +++ b/src/frontend/src/components/inputComponent/components/popover/index.tsx @@ -10,7 +10,11 @@ import { CommandList, } from "../../../ui/command"; import { Input } from "../../../ui/input"; -import { Popover, PopoverContentWithoutPortal } from "../../../ui/popover"; +import { + Popover, + PopoverContent, + PopoverContentWithoutPortal, +} from "../../../ui/popover"; const CustomInputPopover = ({ id, refInput, @@ -39,6 +43,9 @@ const CustomInputPopover = ({ showOptions, }) => { const setErrorData = useAlertStore.getState().setErrorData; + const PopoverContentInput = editNode + ? PopoverContent + : PopoverContentWithoutPortal; const handleInputChange = (e) => { if (password) { @@ -68,9 +75,9 @@ const CustomInputPopover = ({ (selectedOption !== "" || !onChange) && setSelectedOption ? selectedOption : (selectedOptions?.length !== 0 || !onChange) && - setSelectedOptions - ? selectedOptions?.join(", ") - : value + setSelectedOptions + ? selectedOptions?.join(", ") + : value } autoFocus={autoFocus} disabled={disabled} @@ -96,7 +103,7 @@ const CustomInputPopover = ({ (password && !(setSelectedOption || setSelectedOptions)) ? "pr-8" : "", - className!, + className! )} placeholder={password && editNode ? "Key" : placeholder} onChange={handleInputChange} @@ -107,7 +114,7 @@ const CustomInputPopover = ({ data-testid={editNode ? id + "-edit" : id} /> - { setSelectedOption && setSelectedOption( - currentValue === selectedOption ? "" : currentValue, + currentValue === selectedOption ? "" : currentValue ); setSelectedOptions && setSelectedOptions( selectedOptions?.includes(currentValue) ? selectedOptions.filter( - (item) => item !== currentValue, + (item) => item !== currentValue ) - : [...selectedOptions, currentValue], + : [...selectedOptions, currentValue] ); !setSelectedOptions && setShowOptions(false); }} @@ -155,7 +162,7 @@ const CustomInputPopover = ({ selectedOption === option || selectedOptions?.includes(option) ? "opacity-100" - : "opacity-0", + : "opacity-0" )} >
@@ -184,7 +191,7 @@ const CustomInputPopover = ({ - + ); }; diff --git a/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx b/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx index 7b30ac897..d43022845 100644 --- a/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx +++ b/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx @@ -9,7 +9,11 @@ import { CommandList, } from "../../../ui/command"; import { Input } from "../../../ui/input"; -import { Popover, PopoverContentWithoutPortal } from "../../../ui/popover"; +import { + Popover, + PopoverContent, + PopoverContentWithoutPortal, +} from "../../../ui/popover"; const CustomInputPopoverObject = ({ id, refInput, @@ -23,6 +27,7 @@ const CustomInputPopoverObject = ({ disabled, setShowOptions, required, + editNode, className, placeholder, onChange, @@ -34,6 +39,10 @@ const CustomInputPopoverObject = ({ handleKeyDown, showOptions, }) => { + const PopoverContentInput = editNode + ? PopoverContent + : PopoverContentWithoutPortal; + const handleInputChange = (e) => { onChange && onChange(e.target.value); }; @@ -51,14 +60,14 @@ const CustomInputPopoverObject = ({ ? options.find((option) => option.id === selectedOption)?.name || "" : (selectedOptions?.length !== 0 || !onChange) && - setSelectedOptions - ? selectedOptions - .map( - (optionId) => - options.find((option) => option.id === optionId)?.name, - ) - .join(", ") - : value + setSelectedOptions + ? selectedOptions + .map( + (optionId) => + options.find((option) => option.id === optionId)?.name + ) + .join(", ") + : value } autoFocus={autoFocus} disabled={disabled} @@ -79,7 +88,7 @@ const CustomInputPopoverObject = ({ data-testid={id} /> - { setSelectedOption && setSelectedOption( - currentValue === selectedOption ? "" : currentValue, + currentValue === selectedOption ? "" : currentValue ); setSelectedOptions && setSelectedOptions( selectedOptions?.includes(currentValue) ? selectedOptions.filter( - (item) => item !== currentValue, + (item) => item !== currentValue ) - : [...selectedOptions, currentValue], + : [...selectedOptions, currentValue] ); !setSelectedOptions && setShowOptions(false); }} @@ -127,7 +136,7 @@ const CustomInputPopoverObject = ({ selectedOption === option.id || selectedOptions?.includes(option.id) ? "opacity-100" - : "opacity-0", + : "opacity-0" )} >
@@ -159,7 +168,7 @@ const CustomInputPopoverObject = ({ - + ); }; diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 8fb749279..b361f48ab 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -71,7 +71,7 @@ export default function InputComponent({ editNode ? " input-edit-node " : "", password && editNode ? "pr-8" : "", password && !editNode ? "pr-10" : "", - className!, + className! )} placeholder={password && editNode ? "Key" : placeholder} onChange={(e) => { @@ -108,6 +108,7 @@ export default function InputComponent({ setSelectedOptions={setSelectedOptions} options={objectOptions} value={value} + editNode={editNode} autoFocus={autoFocus} disabled={disabled} setShowOptions={setShowOptions} @@ -153,7 +154,7 @@ export default function InputComponent({