Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 33x 221x 221x 221x 221x | import {
SimulationObjectRetrieveRead
} from "@/api/apiStore.gen";
import objects from "@/data/objects.json";
import {
useCurrentObject,
useObjectsPortsMap
} from "@/hooks/flowsheetObjects";
import { ObjectType } from "../../../../../data/ObjectTypes.gen";
import { AddPortButtons } from "./AddPortButtons";
import { PortsMap } from "./PortsMap";
objects as Record<string, ObjectType>;
export function UnitopConnectionList({
selectedObj: propSelectedObj,
}: {
selectedObj?: SimulationObjectRetrieveRead;
}) {
const currentObject = useCurrentObject();
const selectedObj = propSelectedObj || currentObject!;
const unitConfig = objects[selectedObj.objectType as keyof typeof objects];
return (
<div className="w-full flex flex-col items-start gap-2">
<PortsMap selectedObj={selectedObj} unitConfig={unitConfig} />
<AddPortButtons
selectedObj={selectedObj}
unitConfig={unitConfig}
/>
</div>
);
} |