diff --git a/src/backend/base/langflow/base/memory/memory.py b/src/backend/base/langflow/base/memory/memory.py index 836752509..1bb2e22ff 100644 --- a/src/backend/base/langflow/base/memory/memory.py +++ b/src/backend/base/langflow/base/memory/memory.py @@ -1,7 +1,5 @@ from typing import Optional -from langflow.field_typing import Text -from langflow.helpers.record import records_to_text from langflow.interface.custom.custom_component import CustomComponent from langflow.schema.schema import Record diff --git a/src/backend/base/langflow/interface/initialize/vector_store.py b/src/backend/base/langflow/interface/initialize/vector_store.py index 619baa3f0..8e596298c 100644 --- a/src/backend/base/langflow/interface/initialize/vector_store.py +++ b/src/backend/base/langflow/interface/initialize/vector_store.py @@ -5,7 +5,6 @@ import orjson from langchain_community.vectorstores import ( FAISS, Chroma, - ElasticsearchStore, MongoDBAtlasVectorSearch, Pinecone, Qdrant, diff --git a/src/backend/base/langflow/schema/schema.py b/src/backend/base/langflow/schema/schema.py index 29ab15ede..1474c24ee 100644 --- a/src/backend/base/langflow/schema/schema.py +++ b/src/backend/base/langflow/schema/schema.py @@ -4,7 +4,6 @@ from typing import Literal, Optional, cast from langchain_core.documents import Document from langchain_core.messages import AIMessage, BaseMessage, HumanMessage from pydantic import BaseModel, model_validator -from langchain_core.messages import HumanMessage, AIMessage class Record(BaseModel): diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index 6adda4e3e..dc7f41ad7 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -1,141 +1,162 @@ +import { saveAs } from "file-saver"; +import OpenSeadragon from "openseadragon"; import { useEffect, useRef, useState } from "react"; -import ForwardedIconComponent from "../genericIconComponent"; -import useFlowStore from "../../stores/flowStore"; -import OpenSeadragon from 'openseadragon'; -import { Separator } from "../ui/separator"; -import { saveAs } from 'file-saver' -import useAlertStore from "../../stores/alertStore"; import { IMGViewErrorMSG, IMGViewErrorTitle } from "../../constants/constants"; +import useAlertStore from "../../stores/alertStore"; +import ForwardedIconComponent from "../genericIconComponent"; +import { Separator } from "../ui/separator"; -export default function ImageViewer({image }) { +export default function ImageViewer({ image }) { const viewerRef = useRef(null); - const [errorDownloading, setErrordownloading] = useState(false) - const setErrorList = useAlertStore(state => state.setErrorData); + const [errorDownloading, setErrordownloading] = useState(false); + const setErrorList = useAlertStore((state) => state.setErrorData); const [initialMsg, setInicialMsg] = useState("Please build your flow"); + useEffect(() => { + try { + if (viewerRef.current) { + // Initialize OpenSeadragon viewer + const viewer = OpenSeadragon({ + element: viewerRef.current, + prefixUrl: + "https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/images/", // Optional: Set the path to OpenSeadragon images + tileSources: { type: "image", url: image }, + defaultZoomLevel: 1, + maxZoomPixelRatio: 4, + showNavigationControl: false, + }); + const zoomInButton = document.getElementById("zoom-in-button"); + const zoomOutButton = document.getElementById("zoom-out-button"); + const homeButton = document.getElementById("home-button"); + const fullPageButton = document.getElementById("full-page-button"); - useEffect(() => { - try { - if (viewerRef.current) { - // Initialize OpenSeadragon viewer - const viewer = OpenSeadragon({ - element: viewerRef.current, - prefixUrl: 'https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.4.2/images/', // Optional: Set the path to OpenSeadragon images - tileSources: {type: 'image', url: image}, - defaultZoomLevel: 1, - maxZoomPixelRatio: 4, - showNavigationControl: false, - }); - const zoomInButton = document.getElementById('zoom-in-button'); - const zoomOutButton = document.getElementById('zoom-out-button'); - const homeButton = document.getElementById('home-button'); - const fullPageButton = document.getElementById('full-page-button'); - - zoomInButton!.addEventListener('click', () => viewer.viewport.zoomBy(1.2)); - zoomOutButton!.addEventListener('click', () => viewer.viewport.zoomBy(0.8)); - homeButton!.addEventListener('click', () => viewer.viewport.goHome()); - fullPageButton!.addEventListener('click', () => viewer.setFullScreen(true)); - - // Optionally, you can set additional viewer options here - - // Cleanup function - return () => { - viewer.destroy(); - zoomInButton!.removeEventListener('click', () => viewer.viewport.zoomBy(1.2)); - zoomOutButton!.removeEventListener('click', () => viewer.viewport.zoomBy(0.8)); - homeButton!.removeEventListener('click', () => viewer.viewport.goHome()); - fullPageButton!.removeEventListener('click', () => viewer.setFullScreen(true)); - }; - } - } catch (error) { - console.error('Error initializing OpenSeadragon:', error); - } - }, [image]); + zoomInButton!.addEventListener("click", () => + viewer.viewport.zoomBy(1.2) + ); + zoomOutButton!.addEventListener("click", () => + viewer.viewport.zoomBy(0.8) + ); + homeButton!.addEventListener("click", () => viewer.viewport.goHome()); + fullPageButton!.addEventListener("click", () => + viewer.setFullScreen(true) + ); - function download() { - const imageUrl = image; - // Fetch the image data - fetch(imageUrl) - .then(response => response.blob()) - .then(blob => { - // Save the image using FileSaver.js - saveAs(blob, 'image.jpg'); - }) - .catch(error => { - setErrorList({title: "There was an error downloading your image"}) - console.error('Error downloading image:', error) - }); + // Optionally, you can set additional viewer options here + + // Cleanup function + return () => { + viewer.destroy(); + zoomInButton!.removeEventListener("click", () => + viewer.viewport.zoomBy(1.2) + ); + zoomOutButton!.removeEventListener("click", () => + viewer.viewport.zoomBy(0.8) + ); + homeButton!.removeEventListener("click", () => + viewer.viewport.goHome() + ); + fullPageButton!.removeEventListener("click", () => + viewer.setFullScreen(true) + ); + }; } + } catch (error) { + console.error("Error initializing OpenSeadragon:", error); + } + }, [image]); - return ( - image === "" ? ( -
-
- - {IMGViewErrorTitle} -
-
-
-
- {IMGViewErrorMSG} -
-
-
+ function download() { + const imageUrl = image; + // Fetch the image data + fetch(imageUrl) + .then((response) => response.blob()) + .then((blob) => { + // Save the image using FileSaver.js + saveAs(blob, "image.jpg"); + }) + .catch((error) => { + setErrorList({ title: "There was an error downloading your image" }); + console.error("Error downloading image:", error); + }); + } + + return image === "" ? ( +
+
+ + {IMGViewErrorTitle} +
+
+
+
{IMGViewErrorMSG}
+
+
+
+ ) : ( + <> +
+
+ +
+
- ) : ( - <> -
-
- -
- -
- -
- -
- -
- -
- -
- -
- - - -
+ +
+
-
- - ) - ); -} \ No newline at end of file + +
+ +
+ +
+ +
+ + +
+
+
+ + ); +} diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index e5e8dd488..2e738cd6b 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -22,9 +22,9 @@ export default function AddNewVariableButton({ children }): JSX.Element { const [open, setOpen] = useState(false); const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); - const unavaliableFields =new Set(Object.keys(useGlobalVariablesStore( - (state) => state.unavaliableFields - ))); + const unavaliableFields = new Set( + Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) + ); const availableFields = Array.from(componentFields).filter( (field) => !unavaliableFields.has(field) diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 5bec5b1fd..bd92220d4 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -1,21 +1,21 @@ import { Transition } from "@headlessui/react"; -import { useEffect, useMemo, useRef, useState } from "react"; +import { useMemo, useRef, useState } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; import ApiModal from "../../modals/ApiModal"; import IOModal from "../../modals/IOModal"; import ShareModal from "../../modals/shareModal"; import useFlowStore from "../../stores/flowStore"; import useFlowsManagerStore from "../../stores/flowsManagerStore"; +import { useShortcutsStore } from "../../stores/shortcuts"; import { useStoreStore } from "../../stores/storeStore"; import { classNames } from "../../utils/utils"; import ForwardedIconComponent from "../genericIconComponent"; import { Separator } from "../ui/separator"; -import { useHotkeys } from "react-hotkeys-hook"; -import { useShortcutsStore } from "../../stores/shortcuts"; export default function FlowToolbar(): JSX.Element { function handleAPIWShortcut(e: KeyboardEvent) { e.preventDefault(); - setOpenCodeModal((oldOpen) => !oldOpen) + setOpenCodeModal((oldOpen) => !oldOpen); } function handleChatWShortcut(e: KeyboardEvent) { @@ -25,8 +25,8 @@ export default function FlowToolbar(): JSX.Element { } } - const openPlayground = useShortcutsStore(state => state.open); - const api = useShortcutsStore(state => state.api); + const openPlayground = useShortcutsStore((state) => state.open); + const api = useShortcutsStore((state) => state.api); useHotkeys(openPlayground, handleChatWShortcut); useHotkeys(api, handleAPIWShortcut); @@ -121,7 +121,11 @@ export default function FlowToolbar(): JSX.Element {
{currentFlow && currentFlow.data && ( - +
{ const lines = csvFile.data.trim().split("\n"); const headers = lines[0].trim().split(csvSeparator); - const initialRowData: any = []; const initialColDefs = headers.map((header) => ({ diff --git a/src/frontend/src/components/inputGlobalComponent/index.tsx b/src/frontend/src/components/inputGlobalComponent/index.tsx index f3b5b3b29..1b0d2d804 100644 --- a/src/frontend/src/components/inputGlobalComponent/index.tsx +++ b/src/frontend/src/components/inputGlobalComponent/index.tsx @@ -49,7 +49,10 @@ export default function InputGlobalComponent({ !data.node?.template[name].value && data.node?.template[name].display_name ) { - if (unavaliableFields[data.node?.template[name].display_name!] && !disabled) { + if ( + unavaliableFields[data.node?.template[name].display_name!] && + !disabled + ) { setTimeout(() => { setDb(true); onChange(unavaliableFields[data.node?.template[name].display_name!]); diff --git a/src/frontend/src/components/pdfViewer/Error/index.tsx b/src/frontend/src/components/pdfViewer/Error/index.tsx index 76c35bcd0..c0a621664 100644 --- a/src/frontend/src/components/pdfViewer/Error/index.tsx +++ b/src/frontend/src/components/pdfViewer/Error/index.tsx @@ -1,23 +1,19 @@ -import { CHAT_FIRST_INITIAL_TEXT, CHAT_SECOND_INITIAL_TEXT, PDFCheckFlow, PDFLoadErrorTitle } from "../../../constants/constants"; +import { PDFCheckFlow, PDFLoadErrorTitle } from "../../../constants/constants"; import IconComponent from "../../genericIconComponent"; - export default function Error(): JSX.Element { - return ( -
-
- - - {PDFLoadErrorTitle} - -
-
- - {PDFCheckFlow}{" "} - -
-
- + return ( +
+
+ + + {PDFLoadErrorTitle} + +
+
+ {PDFCheckFlow}
- ); -} \ No newline at end of file +
+
+ ); +} diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index 992f5f897..a2ab5a43e 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -787,68 +787,85 @@ export const SAVE_DEBOUNCE_TIME = 300; export const defaultShortcuts = [ { name: "Advanced Settings", - shortcut: "Ctrl + Shift + a" + shortcut: "Ctrl + Shift + a", }, { name: "Minimize", - shortcut: "Ctrl + q" + shortcut: "Ctrl + q", }, { name: "Code", - shortcut: "Ctrl + Shift + u" + shortcut: "Ctrl + Shift + u", }, { name: "Copy", - shortcut: "Ctrl + c" + shortcut: "Ctrl + c", }, { name: "Duplicate", - shortcut: "Ctrl + d" + shortcut: "Ctrl + d", }, { name: "Share", - shortcut: "Ctrl + Shift + s" + shortcut: "Ctrl + Shift + s", }, { name: "Docs", - shortcut: "Ctrl + Shift + d" + shortcut: "Ctrl + Shift + d", }, { name: "Save", - shortcut: "Ctrl + s" + shortcut: "Ctrl + s", }, { name: "Delete", - shortcut: "Backspace" + shortcut: "Backspace", }, { name: "Open playground", - shortcut: "Ctrl + k" + shortcut: "Ctrl + k", }, { name: "Undo", - shortcut: "Ctrl + z" + shortcut: "Ctrl + z", }, { name: "Redo", - shortcut: "Ctrl + y" + shortcut: "Ctrl + y", }, { name: "Group", - shortcut: "Ctrl + g" + shortcut: "Ctrl + g", }, { name: "Cut", - shortcut: "Ctrl + x" + shortcut: "Ctrl + x", }, { name: "Paste", - shortcut: "Ctrl + v" + shortcut: "Ctrl + v", }, { name: "API", - shortcut: "Ctrl + r" + shortcut: "Ctrl + r", }, ]; -export const unavailableShortcutss = ["CTRL + R","CTRL + V", "CTRL + X", "CTRL + G", "CTRL + SHIFT + A", "CTRL + Q", "CTRL + SHIFT + U", "CTRL + C", "CTRL + D", "CTRL + SHIFT + S", "CTRL + SHIFT + D", "CTRL + S", "BACKSPACE", "CTRL + K", "CTRL + Z", "CTRL + Y"]; +export const unavailableShortcutss = [ + "CTRL + R", + "CTRL + V", + "CTRL + X", + "CTRL + G", + "CTRL + SHIFT + A", + "CTRL + Q", + "CTRL + SHIFT + U", + "CTRL + C", + "CTRL + D", + "CTRL + SHIFT + S", + "CTRL + SHIFT + D", + "CTRL + S", + "BACKSPACE", + "CTRL + K", + "CTRL + Z", + "CTRL + Y", +]; diff --git a/src/frontend/src/modals/ApiModal/index.tsx b/src/frontend/src/modals/ApiModal/index.tsx index c80e5ce52..874e93f5b 100644 --- a/src/frontend/src/modals/ApiModal/index.tsx +++ b/src/frontend/src/modals/ApiModal/index.tsx @@ -49,9 +49,9 @@ const ApiModal = forwardRef( ) => { const { autoLogin } = useContext(AuthContext); const [open, setOpen] = - mySetOpen !== undefined && myOpen !== undefined - ? [myOpen, mySetOpen] - : useState(false); + mySetOpen !== undefined && myOpen !== undefined + ? [myOpen, mySetOpen] + : useState(false); const [activeTab, setActiveTab] = useState("0"); const tweak = useRef([]); const tweaksList = useRef([]); diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 1e90cacce..cda819c86 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -86,9 +86,9 @@ const EditNodeModal = forwardRef( useEffect(() => { return () => { - setOpenWDoubleClick(false) - } - }, []) + setOpenWDoubleClick(false); + }; + }, []); const [errorDuplicateKey, setErrorDuplicateKey] = useState(false); diff --git a/src/frontend/src/modals/shareModal/index.tsx b/src/frontend/src/modals/shareModal/index.tsx index 89f1f2569..0614b2504 100644 --- a/src/frontend/src/modals/shareModal/index.tsx +++ b/src/frontend/src/modals/shareModal/index.tsx @@ -1,5 +1,6 @@ import { Loader2 } from "lucide-react"; import { ReactNode, useEffect, useMemo, useState } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; import EditFlowSettings from "../../components/EditFlowSettingsComponent"; import IconComponent from "../../components/genericIconComponent"; import { TagsSelector } from "../../components/tagsSelectorComponent"; @@ -25,7 +26,6 @@ import { import { getTagsIds } from "../../utils/storeUtils"; import ConfirmationModal from "../ConfirmationModal"; import BaseModal from "../baseModal"; -import { useHotkeys } from "react-hotkeys-hook"; import ExportModal from "../exportModal"; export default function ShareModal({ @@ -45,8 +45,8 @@ export default function ShareModal({ }): JSX.Element { function handleOpenWShortcut(e: KeyboardEvent) { if (hasApiKey || hasStore) { - e.preventDefault() - internalSetOpen(state => !state); + e.preventDefault(); + internalSetOpen((state) => !state); } } const version = useDarkStore((state) => state.version); @@ -59,7 +59,7 @@ export default function ShareModal({ const [openConfirmationModal, setOpenConfirmationModal] = useState(false); const nameComponent = is_component ? "component" : "workflow"; - useHotkeys("mod+alt+s", handleOpenWShortcut) + useHotkeys("mod+alt+s", handleOpenWShortcut); const [tags, setTags] = useState<{ id: string; name: string }[]>([]); const [loadingTags, setLoadingTags] = useState(false); @@ -216,8 +216,9 @@ export default function ShareModal({ {children ? children : <>} Share
- {!is_component && + {!is_component && ( + + + + )} + {is_component && ( - - } - {is_component && - - } + )} - + + ); diff --git a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx index 77e293672..768f92e6c 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx @@ -2,22 +2,18 @@ import { ColDef, ColGroupDef } from "ag-grid-community"; import { useEffect, useState } from "react"; import ForwardedIconComponent from "../../../../components/genericIconComponent"; import TableComponent from "../../../../components/tableComponent"; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "../../../../components/ui/card"; import { Button } from "../../../../components/ui/button"; -import EditShortcutButton from "./EditShortcutButton"; +import { + defaultShortcuts, + unavailableShortcutss, +} from "../../../../constants/constants"; import { useShortcutsStore } from "../../../../stores/shortcuts"; -import { defaultShortcuts, unavailableShortcutss } from "../../../../constants/constants"; +import EditShortcutButton from "./EditShortcutButton"; export default function ShortcutsPage() { const [selectedRows, setSelectedRows] = useState([]); - const shortcuts = useShortcutsStore(state => state.shortcuts); - const setShortcuts = useShortcutsStore(state => state.setShortcuts); + const shortcuts = useShortcutsStore((state) => state.shortcuts); + const setShortcuts = useShortcutsStore((state) => state.setShortcuts); // Column Definitions: Defines the columns to be displayed. const [colDefs, setColDefs] = useState<(ColDef | ColGroupDef)[]>([ @@ -37,23 +33,27 @@ export default function ShortcutsPage() { }, ]); - const [nodesRowData, setNodesRowData] = useState>([]); + const [nodesRowData, setNodesRowData] = useState< + Array<{ name: string; shortcut: string }> + >([]); useEffect(() => { - setNodesRowData(shortcuts) - }, [shortcuts]) + setNodesRowData(shortcuts); + }, [shortcuts]); - const combinationToEdit = shortcuts.filter((s) => s.name === selectedRows[0]) + const combinationToEdit = shortcuts.filter((s) => s.name === selectedRows[0]); const [open, setOpen] = useState(false); - const unavaliableShortcuts = useShortcutsStore(state => state.unavailableShortcuts); + const unavaliableShortcuts = useShortcutsStore( + (state) => state.unavailableShortcuts + ); useEffect(() => { if (localStorage.getItem("langflow-shortcuts")) { const savedShortcuts = localStorage.getItem("langflow-shortcuts"); const savedUShortcuts = localStorage.getItem("langflow-UShortcuts"); setShortcuts(JSON.parse(savedShortcuts!), JSON.parse(savedUShortcuts!)); } - }, []) + }, []); function handleRestore() { setShortcuts(defaultShortcuts, unavailableShortcutss); @@ -73,13 +73,12 @@ export default function ShortcutsPage() { />

- Manage Shortcuts for quick access to - frequently used actions. + Manage Shortcuts for quick access to frequently used actions.

-
-
+
+
- @@ -105,7 +108,9 @@ export default function ShortcutsPage() {
{ - setSelectedRows(event.api.getSelectedRows().map((row) => row.name)); + setSelectedRows( + event.api.getSelectedRows().map((row) => row.name) + ); }} suppressRowClickSelection={true} domLayout="autoHeight" diff --git a/src/frontend/src/stores/shortcuts.ts b/src/frontend/src/stores/shortcuts.ts index f2389359d..7b817c3f3 100644 --- a/src/frontend/src/stores/shortcuts.ts +++ b/src/frontend/src/stores/shortcuts.ts @@ -1,12 +1,15 @@ import { create } from "zustand"; +import { + defaultShortcuts, + unavailableShortcutss, +} from "../constants/constants"; import { shortcutsStoreType } from "../types/store"; -import { defaultShortcuts, unavailableShortcutss } from "../constants/constants"; export const useShortcutsStore = create((set, get) => ({ unavailableShortcuts: unavailableShortcutss, shortcuts: defaultShortcuts, setShortcuts: (newShortcuts, unavailable) => { - set({shortcuts: newShortcuts, unavailableShortcuts: unavailable} ); + set({ shortcuts: newShortcuts, unavailableShortcuts: unavailable }); }, undo: "mod+z", redo: "mod+y", @@ -26,7 +29,7 @@ export const useShortcutsStore = create((set, get) => ({ api: "mod+r", updateUniqueShortcut: (name, combination) => { set({ - [name]: combination - }) - } + [name]: combination, + }); + }, })); diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 9c58121c6..2b973ccd7 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -735,7 +735,7 @@ export type toolbarSelectItemProps = { isMac: boolean; shift: boolean; keyboardKey: string; - mod?:boolean; + mod?: boolean; value: string; icon: string; styleObj?: { diff --git a/src/frontend/src/types/store/index.ts b/src/frontend/src/types/store/index.ts index 676d927b7..fd847c165 100644 --- a/src/frontend/src/types/store/index.ts +++ b/src/frontend/src/types/store/index.ts @@ -34,13 +34,16 @@ export type shortcutsStoreType = { copy: string; duplicate: string; share: string; - docs:string; - save:string; + docs: string; + save: string; delete: string; shortcuts: Array<{ name: string; shortcut: string; - }> + }>; unavailableShortcuts: string[]; - setShortcuts: (newShortcuts: Array<{name: string; shortcut: string;}>, unavailable: string[]) => void; + setShortcuts: ( + newShortcuts: Array<{ name: string; shortcut: string }>, + unavailable: string[] + ) => void; }; diff --git a/src/frontend/src/types/zustand/globalVariables/index.ts b/src/frontend/src/types/zustand/globalVariables/index.ts index 752336c19..de7c5543e 100644 --- a/src/frontend/src/types/zustand/globalVariables/index.ts +++ b/src/frontend/src/types/zustand/globalVariables/index.ts @@ -25,7 +25,7 @@ export type GlobalVariablesStore = { ) => void; removeGlobalVariable: (name: string) => Promise; getVariableId: (name: string) => string | undefined; - unavaliableFields: {[name: string]: string}; - setUnavaliableFields: (fields: {[name: string]: string}) => void; + unavaliableFields: { [name: string]: string }; + setUnavaliableFields: (fields: { [name: string]: string }) => void; removeUnavaliableField: (field: string) => void; }; diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 8437c802b..aeb1e66ae 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -101,6 +101,7 @@ import { Redo, RefreshCcw, Repeat, + RotateCcw, Save, SaveAll, Scissors, @@ -140,7 +141,6 @@ import { X, XCircle, Zap, - RotateCcw, } from "lucide-react"; import { FaApple, FaGithub } from "react-icons/fa"; import { AWSIcon } from "../icons/AWS"; @@ -515,5 +515,5 @@ export const nodeIconsLucide: iconsType = { Command, ArrowBigUp, Dot, - RotateCcw + RotateCcw, }; diff --git a/src/frontend/src/utils/utils.ts b/src/frontend/src/utils/utils.ts index 1c580fa4b..47324133d 100644 --- a/src/frontend/src/utils/utils.ts +++ b/src/frontend/src/utils/utils.ts @@ -93,8 +93,8 @@ export function toTitleCase( export function getUnavailableFields(variables: { [key: string]: { default_fields?: string[] }; -}): {[name: string]: string} { - const unVariables:{[name: string]: string} = {}; +}): { [name: string]: string } { + const unVariables: { [name: string]: string } = {}; Object.keys(variables).forEach((key) => { if (variables[key].default_fields) { variables[key].default_fields!.forEach((field) => {