victory-voronoi
Advanced tools
Comparing version 34.3.6 to 34.3.7
@@ -0,1 +1,3 @@ | ||
import _assign from "lodash/assign"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
@@ -15,11 +17,30 @@ | ||
var evaluateProps = function (props) { | ||
/** | ||
* Potential evaluated props are: | ||
* `id` | ||
* `size` | ||
* `style` | ||
*/ | ||
var id = Helpers.evaluateProp(props.id, props); | ||
var size = Helpers.evaluateProp(props.size, props); | ||
var style = Helpers.evaluateStyle(props.style, props); | ||
return _assign({}, props, { | ||
id: id, | ||
size: size, | ||
style: style | ||
}); | ||
}; | ||
var Voronoi = function (props) { | ||
var role = props.role, | ||
shapeRendering = props.shapeRendering, | ||
className = props.className, | ||
events = props.events, | ||
transform = props.transform; | ||
props = evaluateProps(props); | ||
var _props = props, | ||
role = _props.role, | ||
shapeRendering = _props.shapeRendering, | ||
className = _props.className, | ||
events = _props.events, | ||
transform = _props.transform, | ||
style = _props.style, | ||
size = _props.size; | ||
var voronoiPath = getVoronoiPath(props); | ||
var style = Helpers.evaluateStyle(props.style, props); | ||
var size = Helpers.evaluateProp(props.size, props); | ||
@@ -26,0 +47,0 @@ var sharedProps = _objectSpread({ |
@@ -8,2 +8,4 @@ "use strict"; | ||
var _assign2 = _interopRequireDefault(require("lodash/assign")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -26,14 +28,34 @@ | ||
var Voronoi = function (props) { | ||
var role = props.role, | ||
shapeRendering = props.shapeRendering, | ||
className = props.className, | ||
events = props.events, | ||
transform = props.transform; | ||
var voronoiPath = getVoronoiPath(props); | ||
var evaluateProps = function (props) { | ||
/** | ||
* Potential evaluated props are: | ||
* `id` | ||
* `size` | ||
* `style` | ||
*/ | ||
var id = _victoryCore.Helpers.evaluateProp(props.id, props); | ||
var size = _victoryCore.Helpers.evaluateProp(props.size, props); | ||
var style = _victoryCore.Helpers.evaluateStyle(props.style, props); | ||
var size = _victoryCore.Helpers.evaluateProp(props.size, props); | ||
return (0, _assign2.default)({}, props, { | ||
id: id, | ||
size: size, | ||
style: style | ||
}); | ||
}; | ||
var Voronoi = function (props) { | ||
props = evaluateProps(props); | ||
var _props = props, | ||
role = _props.role, | ||
shapeRendering = _props.shapeRendering, | ||
className = _props.className, | ||
events = _props.events, | ||
transform = _props.transform, | ||
style = _props.style, | ||
size = _props.size; | ||
var voronoiPath = getVoronoiPath(props); | ||
var sharedProps = _objectSpread({ | ||
@@ -40,0 +62,0 @@ className: className, |
{ | ||
"name": "victory-voronoi", | ||
"version": "34.3.6", | ||
"version": "34.3.7", | ||
"description": "Voronoi Component for Victory", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"prop-types": "^15.5.8", | ||
"victory-core": "^34.3.6" | ||
"victory-core": "^34.3.7" | ||
}, | ||
@@ -28,0 +28,0 @@ "scripts": { |
/*eslint no-magic-numbers: ["error", { "ignore": [2] }]*/ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { assign } from "lodash"; | ||
import { Helpers, CommonProps, ClipPath, Path, Circle } from "victory-core"; | ||
@@ -11,8 +12,21 @@ | ||
const evaluateProps = (props) => { | ||
/** | ||
* Potential evaluated props are: | ||
* `id` | ||
* `size` | ||
* `style` | ||
*/ | ||
const id = Helpers.evaluateProp(props.id, props); | ||
const size = Helpers.evaluateProp(props.size, props); | ||
const style = Helpers.evaluateStyle(props.style, props); | ||
return assign({}, props, { id, size, style }); | ||
}; | ||
const Voronoi = (props) => { | ||
const { role, shapeRendering, className, events, transform } = props; | ||
props = evaluateProps(props); | ||
const { role, shapeRendering, className, events, transform, style, size } = props; | ||
const voronoiPath = getVoronoiPath(props); | ||
const style = Helpers.evaluateStyle(props.style, props); | ||
const size = Helpers.evaluateProp(props.size, props); | ||
const sharedProps = { className, role, shapeRendering, style, transform, ...events }; | ||
@@ -19,0 +33,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1343583
8178
Updatedvictory-core@^34.3.7