in src/components/defs.js [38:54]
export function generateGraphConfigDefs(typesObj: any) {
const newGraphConfigDefs = [];
Object.keys(typesObj).forEach(type => {
const safeId = typesObj[type].shapeId
? typesObj[type].shapeId.replace('#', '')
: 'graphdef';
newGraphConfigDefs.push(
React.cloneElement(typesObj[type].shape, {
key: `${safeId}-${newGraphConfigDefs.length + 1}`,
})
);
});
return newGraphConfigDefs;
}