@nivo/heatmap
Advanced tools
Comparing version 0.36.0 to 0.37.0
@@ -64,2 +64,3 @@ 'use strict'; | ||
isInteractive: PropTypes.bool, | ||
onClick: PropTypes.func.isRequired, | ||
hoverTarget: PropTypes.oneOf(['cell', 'row', 'column', 'rowColumn']).isRequired, | ||
@@ -106,2 +107,3 @@ cellHoverOpacity: PropTypes.number.isRequired, | ||
isInteractive: true, | ||
onClick: core.noop, | ||
hoverTarget: 'rowColumn', | ||
@@ -309,3 +311,4 @@ cellHoverOpacity: 1, | ||
var HeatMapCellRect = function HeatMapCellRect(_ref) { | ||
var value = _ref.value, | ||
var data = _ref.data, | ||
value = _ref.value, | ||
x = _ref.x, | ||
@@ -321,3 +324,4 @@ y = _ref.y, | ||
onHover = _ref.onHover, | ||
onLeave = _ref.onLeave; | ||
onLeave = _ref.onLeave, | ||
_onClick = _ref.onClick; | ||
return React__default.createElement( | ||
@@ -330,2 +334,5 @@ 'g', | ||
onMouseLeave: onLeave, | ||
onClick: function onClick(e) { | ||
_onClick(data, e); | ||
}, | ||
style: style | ||
@@ -358,2 +365,3 @@ }, | ||
HeatMapCellRect.propTypes = { | ||
data: PropTypes.object.isRequired, | ||
value: PropTypes.number.isRequired, | ||
@@ -370,3 +378,4 @@ x: PropTypes.number.isRequired, | ||
onHover: PropTypes.func.isRequired, | ||
onLeave: PropTypes.func.isRequired | ||
onLeave: PropTypes.func.isRequired, | ||
onClick: PropTypes.func.isRequired | ||
}; | ||
@@ -379,3 +388,4 @@ | ||
var HeatMapCellCircle = function HeatMapCellCircle(_ref) { | ||
var value = _ref.value, | ||
var data = _ref.data, | ||
value = _ref.value, | ||
x = _ref.x, | ||
@@ -391,3 +401,4 @@ y = _ref.y, | ||
onHover = _ref.onHover, | ||
onLeave = _ref.onLeave; | ||
onLeave = _ref.onLeave, | ||
_onClick = _ref.onClick; | ||
return React__default.createElement( | ||
@@ -400,3 +411,6 @@ 'g', | ||
onMouseMove: onHover, | ||
onMouseLeave: onLeave | ||
onMouseLeave: onLeave, | ||
onClick: function onClick(e) { | ||
_onClick(data, e); | ||
} | ||
}, | ||
@@ -425,2 +439,3 @@ React__default.createElement('circle', { | ||
HeatMapCellCircle.propTypes = { | ||
data: PropTypes.object.isRequired, | ||
value: PropTypes.number.isRequired, | ||
@@ -437,3 +452,4 @@ x: PropTypes.number.isRequired, | ||
onHover: PropTypes.func.isRequired, | ||
onLeave: PropTypes.func.isRequired | ||
onLeave: PropTypes.func.isRequired, | ||
onClick: PropTypes.func.isRequired | ||
}; | ||
@@ -602,3 +618,4 @@ | ||
boundSpring = _props.boundSpring, | ||
isInteractive = _props.isInteractive; | ||
isInteractive = _props.isInteractive, | ||
onClick = _props.onClick; | ||
@@ -664,2 +681,3 @@ | ||
key: node.key, | ||
data: node, | ||
value: node.value, | ||
@@ -676,3 +694,4 @@ x: node.x, | ||
onHover: partial(onHover, node), | ||
onLeave: onLeave | ||
onLeave: onLeave, | ||
onClick: onClick | ||
}); | ||
@@ -713,2 +732,3 @@ }), | ||
key: key, | ||
data: node, | ||
value: node.value, | ||
@@ -729,3 +749,4 @@ x: style.x, | ||
onHover: partial(onHover, node), | ||
onLeave: onLeave | ||
onLeave: onLeave, | ||
onClick: onClick | ||
}); | ||
@@ -864,2 +885,6 @@ }) | ||
hideTooltip(); | ||
}, _this.handleClick = function (event) { | ||
if (!_this.props.currentNode) return; | ||
_this.props.onClick(_this.props.currentNode, event); | ||
}, _temp), possibleConstructorReturn(_this, _ret); | ||
@@ -966,3 +991,4 @@ } | ||
onMouseMove: partial(_this2.handleMouseHover, showTooltip, hideTooltip), | ||
onMouseLeave: partial(_this2.handleMouseLeave, hideTooltip) | ||
onMouseLeave: partial(_this2.handleMouseLeave, hideTooltip), | ||
onClick: _this2.handleClick | ||
}); | ||
@@ -969,0 +995,0 @@ } |
{ | ||
"name": "@nivo/heatmap", | ||
"version": "0.36.0", | ||
"version": "0.37.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
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
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
35774
871