Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

victory-line

Package Overview
Dependencies
Maintainers
8
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-line - npm Package Compare versions

Comparing version 34.3.6 to 34.3.7

28

es/curve.js

@@ -57,5 +57,24 @@ import _assign from "lodash/assign";

var evaluateProps = function (props) {
/**
* Potential evaluated props are:
* `id`
* `style`
*/
var id = Helpers.evaluateProp(props.id, props);
var style = Helpers.evaluateStyle(_assign({
fill: "none",
stroke: "black"
}, props.style), props);
return _assign({}, props, {
id: id,
style: style
});
};
var Curve = function (props) {
var polar = props.polar,
origin = props.origin;
props = evaluateProps(props);
var _props = props,
polar = _props.polar,
origin = _props.origin;
var lineFunction = getLineFunction(props);

@@ -65,6 +84,3 @@ var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;

d: lineFunction(props.data),
style: Helpers.evaluateStyle(_assign({
fill: "none",
stroke: "black"
}, props.style), props),
style: props.style,
transform: props.transform || defaultTransform,

@@ -71,0 +87,0 @@ className: props.className,

@@ -29,3 +29,3 @@ import * as React from "react";

export interface VictoryCurveProps extends VictoryCommonPrimitiveProps {
export interface CurveProps extends VictoryCommonPrimitiveProps {
interpolation?: string | Function;

@@ -36,4 +36,4 @@ openCurve?: boolean;

export class Curve extends React.Component<VictoryCurveProps> {}
export class Curve extends React.Component<CurveProps> {}
export class VictoryLine extends React.Component<VictoryLineProps, any> {}

@@ -70,5 +70,26 @@ "use strict";

var evaluateProps = function (props) {
/**
* Potential evaluated props are:
* `id`
* `style`
*/
var id = _victoryCore.Helpers.evaluateProp(props.id, props);
var style = _victoryCore.Helpers.evaluateStyle((0, _assign2.default)({
fill: "none",
stroke: "black"
}, props.style), props);
return (0, _assign2.default)({}, props, {
id: id,
style: style
});
};
var Curve = function (props) {
var polar = props.polar,
origin = props.origin;
props = evaluateProps(props);
var _props = props,
polar = _props.polar,
origin = _props.origin;
var lineFunction = getLineFunction(props);

@@ -78,6 +99,3 @@ var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;

d: lineFunction(props.data),
style: _victoryCore.Helpers.evaluateStyle((0, _assign2.default)({
fill: "none",
stroke: "black"
}, props.style), props),
style: props.style,
transform: props.transform || defaultTransform,

@@ -84,0 +102,0 @@ className: props.className,

@@ -29,3 +29,3 @@ import * as React from "react";

export interface VictoryCurveProps extends VictoryCommonPrimitiveProps {
export interface CurveProps extends VictoryCommonPrimitiveProps {
interpolation?: string | Function;

@@ -36,4 +36,4 @@ openCurve?: boolean;

export class Curve extends React.Component<VictoryCurveProps> {}
export class Curve extends React.Component<CurveProps> {}
export class VictoryLine extends React.Component<VictoryLineProps, any> {}
{
"name": "victory-line",
"version": "34.3.6",
"version": "34.3.7",
"description": "Line 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": {

@@ -57,10 +57,27 @@ /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/

const evaluateProps = (props) => {
/**
* Potential evaluated props are:
* `id`
* `style`
*/
const id = Helpers.evaluateProp(props.id, props);
const style = Helpers.evaluateStyle(
assign({ fill: "none", stroke: "black" }, props.style),
props
);
return assign({}, props, { id, style });
};
const Curve = (props) => {
props = evaluateProps(props);
const { polar, origin } = props;
const lineFunction = getLineFunction(props);
const defaultTransform = polar && origin ? `translate(${origin.x}, ${origin.y})` : undefined;
return React.cloneElement(props.pathComponent, {
...props.events,
d: lineFunction(props.data),
style: Helpers.evaluateStyle(assign({ fill: "none", stroke: "black" }, props.style), props),
style: props.style,
transform: props.transform || defaultTransform,

@@ -67,0 +84,0 @@ className: props.className,

@@ -29,3 +29,3 @@ import * as React from "react";

export interface VictoryCurveProps extends VictoryCommonPrimitiveProps {
export interface CurveProps extends VictoryCommonPrimitiveProps {
interpolation?: string | Function;

@@ -36,4 +36,4 @@ openCurve?: boolean;

export class Curve extends React.Component<VictoryCurveProps> {}
export class Curve extends React.Component<CurveProps> {}
export class VictoryLine extends React.Component<VictoryLineProps, any> {}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc