UNPKG

@nodeject/ui-components

Version:

UI library for non-trivial components

33 lines (32 loc) 1.12 kB
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import * as React from 'react'; import { cytoscapeToSchedioTreeView } from '../CytoscapeToSchedioTreeView'; import { TreeView } from '../TreeView'; var Component = function (props) { return (React.createElement("div", { key: props.id }, props.wbsId, " ", props.title)); }; export var TreeViewCytoContainer = function (props) { var treeData = cytoscapeToSchedioTreeView({ cytoGraph: props.cytoGraph, NodeContainer: Component }); var schedioTreeProps = { cytoGraph: props.cytoGraph, NodeContainer: Component, options: { draggable: true }, }; return React.createElement(TreeView, __assign({}, schedioTreeProps)); };