////////// PROJECT FILE SEPARATION LINE ////////// CODE AFTER THIS LINE ARE FROM: /Data/WebUI/src/Node_Sidebar.jsx import React, { useState } 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"; export default function NodeSidebar({ categorizedNodes, handleExportFlow, handleImportFlow, handleOpenCloseAllDialog, fileInputRef, onFileInputChange }) { const [expandedCategory, setExpandedCategory] = useState(null); const handleAccordionChange = (category) => (_, isExpanded) => { setExpandedCategory(isExpanded ? category : null); }; return (
{/* Workflows Section */} } sx={{ backgroundColor: "#2c2c2c", minHeight: "36px", "& .MuiAccordionSummary-content": { margin: 0 } }} > Workflows {/* Nodes Section */} } sx={{ backgroundColor: "#2c2c2c", minHeight: "36px", "& .MuiAccordionSummary-content": { margin: 0 } }} > Nodes {Object.entries(categorizedNodes).map(([category, items]) => ( } sx={{ bgcolor: "#1e1e1e", px: 2, minHeight: "32px", "& .MuiAccordionSummary-content": { margin: 0 } }} > {category} {items.map((nodeDef) => ( {nodeDef.description || "Drag & Drop into Editor"} } placement="right" arrow > ))} ))} {/* Hidden file input fallback for older browsers */}
); } const buttonStyle = { color: "#ccc", backgroundColor: "#232323", justifyContent: "flex-start", pl: 2, fontSize: "0.9rem", textTransform: "none", "&:hover": { backgroundColor: "#2a2a2a" } }; const nodeButtonStyle = { color: "#ccc", backgroundColor: "#232323", justifyContent: "space-between", pl: 2, pr: 1, fontSize: "0.9rem", textTransform: "none", "&:hover": { backgroundColor: "#2a2a2a" } };