react-lazy-tree
Advanced tools
Comparing version 0.1.5 to 1.0.0
@@ -99,2 +99,3 @@ (function (global, factory) { | ||
/* istanbul ignore next */ | ||
function ReactLazyTree(props) { | ||
@@ -105,5 +106,5 @@ _classCallCheck(this, ReactLazyTree); | ||
var childrenPropertyName = props.childrenPropertyName; | ||
var data = props.data; | ||
var mapInitialActiveNode = props.mapInitialActiveNode; | ||
var childrenPropertyName = props.childrenPropertyName, | ||
data = props.data, | ||
mapInitialActiveNode = props.mapInitialActiveNode; | ||
@@ -145,7 +146,2 @@ var activePath = ''; | ||
}, { | ||
key: 'isActivePath', | ||
value: function isActivePath(path) { | ||
return path === this.state.activePath; | ||
} | ||
}, { | ||
key: 'isOnActivePath', | ||
@@ -152,0 +148,0 @@ value: function isOnActivePath(path, activePath, depth) { |
@@ -64,3 +64,3 @@ (function (global, factory) { | ||
if (!children) { | ||
console.warn('It looks like the property named ' + childrenProperyName + ' was not found in your data!'); | ||
throw new Error('Supplied value for prop `childrenPropertyName`, ' + childrenPropertyName + ', was not found in at least one node of your data!'); | ||
} | ||
@@ -67,0 +67,0 @@ |
@@ -97,2 +97,3 @@ (function (global, factory) { | ||
/* istanbul ignore next */ | ||
function TreeNode(props) { | ||
@@ -114,5 +115,5 @@ _classCallCheck(this, TreeNode); | ||
value: function _getInitialState() { | ||
var _props = this.props; | ||
var verticalAnimationConfig = _props.verticalAnimationConfig; | ||
var shouldShowAllNodes = _props.shouldShowAllNodes; | ||
var _props = this.props, | ||
verticalAnimationConfig = _props.verticalAnimationConfig, | ||
shouldShowAllNodes = _props.shouldShowAllNodes; | ||
@@ -164,7 +165,7 @@ var defaultConfig = TreeNode.defaultProps.verticalAnimationConfig; | ||
var _props2 = this.props; | ||
var currentPath = _props2.currentPath; | ||
var depth = _props2.depth; | ||
var index = _props2.index; | ||
var node = _props2.node; | ||
var _props2 = this.props, | ||
currentPath = _props2.currentPath, | ||
depth = _props2.depth, | ||
index = _props2.index, | ||
node = _props2.node; | ||
@@ -189,6 +190,6 @@ this.props.onActiveNodeChanged(e, node, depth, index, currentPath); | ||
value: function getRootNode() { | ||
var _props3 = this.props; | ||
var depth = _props3.depth; | ||
var mapListClassName = _props3.mapListClassName; | ||
var node = _props3.node; | ||
var _props3 = this.props, | ||
depth = _props3.depth, | ||
mapListClassName = _props3.mapListClassName, | ||
node = _props3.node; | ||
@@ -207,12 +208,12 @@ | ||
var _props4 = this.props; | ||
var childrenPropertyName = _props4.childrenPropertyName; | ||
var depth = _props4.depth; | ||
var index = _props4.index; | ||
var mapListClassName = _props4.mapListClassName; | ||
var mapListItemClassName = _props4.mapListItemClassName; | ||
var mapNodeContent = _props4.mapNodeContent; | ||
var node = _props4.node; | ||
var shouldLazyRender = _props4.shouldLazyRender; | ||
var shouldShowAllNodes = _props4.shouldShowAllNodes; | ||
var _props4 = this.props, | ||
childrenPropertyName = _props4.childrenPropertyName, | ||
depth = _props4.depth, | ||
index = _props4.index, | ||
mapListClassName = _props4.mapListClassName, | ||
mapListItemClassName = _props4.mapListItemClassName, | ||
mapNodeContent = _props4.mapNodeContent, | ||
node = _props4.node, | ||
shouldLazyRender = _props4.shouldLazyRender, | ||
shouldShowAllNodes = _props4.shouldShowAllNodes; | ||
@@ -269,8 +270,8 @@ | ||
value: function getLeafNode() { | ||
var _props5 = this.props; | ||
var depth = _props5.depth; | ||
var index = _props5.index; | ||
var mapListItemClassName = _props5.mapListItemClassName; | ||
var mapNodeContent = _props5.mapNodeContent; | ||
var node = _props5.node; | ||
var _props5 = this.props, | ||
depth = _props5.depth, | ||
index = _props5.index, | ||
mapListItemClassName = _props5.mapListItemClassName, | ||
mapNodeContent = _props5.mapNodeContent, | ||
node = _props5.node; | ||
@@ -309,4 +310,4 @@ | ||
var currentPath = props.currentPath; | ||
var nodes = props.nodes; | ||
var currentPath = props.currentPath, | ||
nodes = props.nodes; | ||
@@ -360,5 +361,5 @@ return nodes.map(function (node, index) { | ||
value: function isOnActivePath(props) { | ||
var activePath = props.activePath; | ||
var currentPath = props.currentPath; | ||
var depth = props.depth; | ||
var activePath = props.activePath, | ||
currentPath = props.currentPath, | ||
depth = props.depth; | ||
@@ -388,5 +389,5 @@ var ap = this.getPathAtDepth(activePath, depth); | ||
value: function isBranchNode() { | ||
var _props6 = this.props; | ||
var node = _props6.node; | ||
var childrenPropertyName = _props6.childrenPropertyName; | ||
var _props6 = this.props, | ||
node = _props6.node, | ||
childrenPropertyName = _props6.childrenPropertyName; | ||
@@ -398,4 +399,4 @@ return this.hasChildren(node, childrenPropertyName); | ||
value: function isActiveNode(props) { | ||
var activePath = props.activePath; | ||
var currentPath = props.currentPath; | ||
var activePath = props.activePath, | ||
currentPath = props.currentPath; | ||
@@ -402,0 +403,0 @@ |
{ | ||
"version": "0.1.5", | ||
"version": "1.0.0", | ||
"name": "react-lazy-tree", | ||
"description": "Recursively render tree data. Control markup, content and style.", | ||
"description": "Recursively render tree data. Control content, markup, and style. Specify animation, initial selection, and more.", | ||
"repository": { | ||
@@ -26,2 +26,3 @@ "type": "git", | ||
"modify", | ||
"react", | ||
"recursive", | ||
@@ -52,3 +53,4 @@ "tree", | ||
"test-watch": "npm run testonly -- --watch --watch-extensions js", | ||
"test-cov": "istanbul cover -hook-run-in-context _mocha --require scripts/mocha_runner test/**/*.spec.js" | ||
"test-cov": "gulp test:coverage", | ||
"test-coveralls": "gulp test:coveralls" | ||
}, | ||
@@ -58,3 +60,3 @@ "devDependencies": { | ||
"babel-core": "^6.7.4", | ||
"babel-eslint": "^6.0.2", | ||
"babel-eslint": "^7.1.1", | ||
"babel-plugin-transform-es2015-modules-umd": "^6.6.5", | ||
@@ -66,8 +68,16 @@ "babel-polyfill": "^6.7.4", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.15", | ||
"enzyme": "^2.2.0", | ||
"eslint": "^2.7.0", | ||
"eslint-plugin-babel": "^3.1.0", | ||
"eslint-plugin-react": "^4.2.3", | ||
"jsdom": "^8.1.0", | ||
"mocha": "^2.4.5", | ||
"eslint": "^3.14.0", | ||
"eslint-plugin-babel": "^4.0.1", | ||
"eslint-plugin-react": "^6.9.0", | ||
"gulp": "^3.9.1", | ||
"gulp-coveralls": "^0.1.4", | ||
"gulp-istanbul": "^1.1.1", | ||
"gulp-mocha": "^3.0.1", | ||
"gulp-util": "^3.0.8", | ||
"isparta": "^4.0.0", | ||
"istanbul": "^0.4.5", | ||
"jsdom": "^9.9.1", | ||
"mocha": "^3.2.0", | ||
"nodemon": "^1.9.1", | ||
@@ -77,2 +87,3 @@ "react": "^15.0.0", | ||
"react-dom": "^15.0.0", | ||
"run-sequence": "^1.2.2", | ||
"sinon": "^1.17.6" | ||
@@ -85,3 +96,3 @@ }, | ||
"dependencies": { | ||
"babel-runtime": "^6.6.1", | ||
"babel-runtime": "^6.22.0", | ||
"lodash.noop": "^3.0.1", | ||
@@ -88,0 +99,0 @@ "lodash.omit": "^4.5.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
0
29904
29
5
616
2
0
Updatedbabel-runtime@^6.22.0