////////// PROJECT FILE SEPARATION LINE ////////// CODE AFTER THIS LINE ARE FROM: /Data/WebUI/src/Node_Sidebar.jsx import React from "react"; import { Accordion, AccordionSummary, AccordionDetails, Button, Divider, Tooltip, Typography } from "@mui/material"; import { ExpandMore as ExpandMoreIcon, Save as SaveIcon, FileOpen as FileOpenIcon, DeleteForever as DeleteForeverIcon, DragIndicator as DragIndicatorIcon, Polyline as PolylineIcon } from "@mui/icons-material"; /** * Left sidebar for managing workflows and node categories. * * Props: * - categorizedNodes (object of arrays, e.g. { "Category": [{...}, ...], ... }) * - handleExportFlow() => void * - handleImportFlow() => void * - handleOpenCloseAllDialog() => void * - fileInputRef (ref to hidden file input) * - onFileInputChange(event) => void */ export default function NodeSidebar({ categorizedNodes, handleExportFlow, handleImportFlow, handleOpenCloseAllDialog, fileInputRef, onFileInputChange }) { return (
} sx={{ backgroundColor: "#2c2c2c", minHeight: "36px", "& .MuiAccordionSummary-content": { margin: 0 } }} > Workflows } sx={{ backgroundColor: "#2c2c2c", minHeight: "36px", "& .MuiAccordionSummary-content": { margin: 0 } }} > Nodes {Object.entries(categorizedNodes).map(([category, items]) => (
{category} {items.map((nodeDef) => ( {nodeDef.description || "Drag & Drop into Editor"} } placement="right" arrow > ))}
))}
{/* Hidden file input fallback for older browsers */}
); }