react-simple-maps
Advanced tools
Comparing version 0.7.2 to 0.8.0
@@ -7,2 +7,4 @@ "use strict"; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -177,2 +179,4 @@ | ||
value: function render() { | ||
var _this2 = this; | ||
var _props9 = this.props, | ||
@@ -193,3 +197,12 @@ geography = _props9.geography, | ||
return _react2.default.createElement("path", { | ||
var excludeProps = ["geography", "projection", "round", "cacheId", "precision", "tabable", "style"]; | ||
var restProps = Object.keys(this.props).filter(function (key) { | ||
return !excludeProps.includes(key); | ||
}).reduce(function (obj, key) { | ||
obj[key] = _this2.props[key]; | ||
return obj; | ||
}, {}); | ||
return _react2.default.createElement("path", _extends({ | ||
d: pathString, | ||
@@ -207,3 +220,3 @@ className: "rsm-geography" + (pressed ? " rsm-geography--pressed" : "") + (hover ? " rsm-geography--hover" : ""), | ||
tabIndex: tabable ? 0 : -1 | ||
}); | ||
}, restProps)); | ||
} | ||
@@ -210,0 +223,0 @@ }]); |
{ | ||
"name": "react-simple-maps", | ||
"version": "0.7.2", | ||
"version": "0.8.0", | ||
"description": "An svg map component built with and for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -124,2 +124,11 @@ | ||
const excludeProps = ["geography", "projection", "round", "cacheId", "precision", "tabable", "style"] | ||
const restProps = Object.keys(this.props) | ||
.filter(key => !excludeProps.includes(key)) | ||
.reduce((obj, key) => { | ||
obj[key] = this.props[key] | ||
return obj | ||
}, {}) | ||
return ( | ||
@@ -139,2 +148,3 @@ <path | ||
tabIndex={ tabable ? 0 : -1 } | ||
{ ...restProps } | ||
/> | ||
@@ -141,0 +151,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
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
953385
4584