react-hierarchy-chart
Advanced tools
Comparing version 0.0.3 to 1.0.1
/// <reference types="react" /> | ||
import "./HierarchyNode.scss"; | ||
export interface INode { | ||
key: string; | ||
cssClass: string | ""; | ||
@@ -5,0 +6,0 @@ childs?: INode[]; |
@@ -53,3 +53,3 @@ 'use strict'; | ||
(((_a = node.childs) === null || _a === void 0 ? void 0 : _a.length) || 0) - 1 === index; | ||
return (React__default["default"].createElement("div", { className: "children-container children-container-".concat(direction) }, | ||
return (React__default["default"].createElement("div", { className: "children-container children-container-".concat(direction), key: "HierarchyNodeChild".concat(child.key || Date.now) }, | ||
React__default["default"].createElement("div", { className: "lines-container lines-container-".concat(direction) }, | ||
@@ -68,5 +68,4 @@ React__default["default"].createElement("div", { className: "lines" }), | ||
var nodes = _a.nodes, direction = _a.direction, randerNode = _a.randerNode; | ||
return React__default["default"].createElement(React__default["default"].Fragment, null, | ||
React__default["default"].createElement("div", { className: "react-hierarchy-container" }, nodes.map(function (node) { return React__default["default"].createElement("div", { className: "react-hierarchy-root-".concat(direction) }, | ||
React__default["default"].createElement(HierarchyNode, { node: node, direction: direction, randerNode: randerNode })); }))); | ||
return (React__default["default"].createElement("div", { className: "react-hierarchy-container", key: Date.now() }, nodes.map(function (node, index) { return React__default["default"].createElement("div", { className: "react-hierarchy-root-".concat(direction), key: "HierarchyNodeP".concat(node.key || Date.now) }, | ||
React__default["default"].createElement(HierarchyNode, { node: node, direction: direction, randerNode: randerNode })); }))); | ||
}; | ||
@@ -73,0 +72,0 @@ |
/// <reference types="react" /> | ||
import "./HierarchyNode.scss"; | ||
export interface INode { | ||
key: string; | ||
cssClass: string | ""; | ||
@@ -5,0 +6,0 @@ childs?: INode[]; |
@@ -45,3 +45,3 @@ import React from 'react'; | ||
(((_a = node.childs) === null || _a === void 0 ? void 0 : _a.length) || 0) - 1 === index; | ||
return (React.createElement("div", { className: "children-container children-container-".concat(direction) }, | ||
return (React.createElement("div", { className: "children-container children-container-".concat(direction), key: "HierarchyNodeChild".concat(child.key || Date.now) }, | ||
React.createElement("div", { className: "lines-container lines-container-".concat(direction) }, | ||
@@ -60,5 +60,4 @@ React.createElement("div", { className: "lines" }), | ||
var nodes = _a.nodes, direction = _a.direction, randerNode = _a.randerNode; | ||
return React.createElement(React.Fragment, null, | ||
React.createElement("div", { className: "react-hierarchy-container" }, nodes.map(function (node) { return React.createElement("div", { className: "react-hierarchy-root-".concat(direction) }, | ||
React.createElement(HierarchyNode, { node: node, direction: direction, randerNode: randerNode })); }))); | ||
return (React.createElement("div", { className: "react-hierarchy-container", key: Date.now() }, nodes.map(function (node, index) { return React.createElement("div", { className: "react-hierarchy-root-".concat(direction), key: "HierarchyNodeP".concat(node.key || Date.now) }, | ||
React.createElement(HierarchyNode, { node: node, direction: direction, randerNode: randerNode })); }))); | ||
}; | ||
@@ -65,0 +64,0 @@ |
/// <reference types="react" /> | ||
interface INode { | ||
key: string; | ||
cssClass: string | ""; | ||
@@ -4,0 +5,0 @@ childs?: INode[]; |
{ | ||
"name": "react-hierarchy-chart", | ||
"version": "0.0.3", | ||
"version": "1.0.1", | ||
"description": "", | ||
"scripts": { | ||
"rollup": "rollup -c", | ||
"build-lib": "rollup -c", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -34,2 +35,10 @@ }, | ||
"types": "dist/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rushik1992/react-hierarchy-chart.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/rushik1992/react-hierarchy-chart/issues" | ||
}, | ||
"homepage": "https://github.com/rushik1992/react-hierarchy-chart", | ||
"keywords": [ | ||
@@ -36,0 +45,0 @@ "react-hierarchy", |
@@ -34,2 +34,3 @@ # ReactHierarchyChart | ||
|---|---|--- | ||
|key|`string`|(New) Need to be Unique value will be used for react element Key value | ||
|cssClass|`string`|Custom css class to override or change node style | ||
@@ -57,2 +58,3 @@ |childs|`INode[]`|The array of child nodes | ||
{ | ||
key:"122", | ||
name: 'Caleb Matthews', | ||
@@ -63,2 +65,3 @@ cssClass: 'level1', | ||
{ | ||
key:"132", | ||
name: 'Antonia Sancho', | ||
@@ -69,2 +72,3 @@ cssClass: 'level2', | ||
{ | ||
key:"123", | ||
name: 'Thoms Hilty', | ||
@@ -75,2 +79,3 @@ cssClass: 'level2', | ||
{ | ||
key:"124", | ||
name: 'Eyal Matthews', | ||
@@ -81,2 +86,3 @@ cssClass: 'level3', | ||
{ | ||
key:"125", | ||
name: 'Adam Mark', | ||
@@ -89,2 +95,3 @@ cssClass: 'level3', | ||
{ | ||
key:"162", | ||
name: 'Barry Roy', | ||
@@ -95,2 +102,3 @@ cssClass: 'level2', | ||
{ | ||
key:"127", | ||
name: 'Ligia Opera', | ||
@@ -101,2 +109,3 @@ cssClass: 'level3', | ||
{ | ||
key:"128", | ||
name: 'Moran Perry', | ||
@@ -112,2 +121,3 @@ cssClass: 'level3', | ||
return ( | ||
@@ -114,0 +124,0 @@ <div className="App"> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
31486
223
0
1
196
2