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

victory-axis

Package Overview
Dependencies
Maintainers
39
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-axis - npm Package Compare versions

Comparing version 33.1.0 to 33.1.2

24

es/helper-methods.js

@@ -153,23 +153,2 @@ import _defaults from "lodash/defaults";

var getRole = function (props) {
if (props.dependentAxis) {
return props.theme && props.theme.dependentAxis ? "dependentAxis" : "axis";
}
return props.theme && props.theme.independentAxis ? "independentAxis" : "axis";
};
var getShallowMergedThemeProps = function (props, role) {
var axisTheme = props.theme.axis || {};
return _defaults({}, props.theme[role], axisTheme);
};
var modifyProps = function (props, fallbackProps, role) {
if (role !== "axis") {
props.theme[role] = getShallowMergedThemeProps(props, role);
}
return Helpers.modifyProps(props, fallbackProps, role);
};
var getAxisLabelProps = function (props, calculatedValues, globalTransform) {

@@ -399,4 +378,3 @@ var style = calculatedValues.style,

var getBaseProps = function (props, fallbackProps) {
var role = getRole(props);
props = modifyProps(props, fallbackProps, role);
props = Axis.modifyProps(props, fallbackProps);
var calculatedValues = getCalculatedValues(props);

@@ -403,0 +381,0 @@ var axis = calculatedValues.axis,

7

es/victory-axis.js

@@ -30,3 +30,3 @@ import _isEmpty from "lodash/isEmpty";

import React from "react";
import { PropTypes as CustomPropTypes, Helpers, VictoryLabel, CommonProps, VictoryContainer, VictoryTheme, LineSegment, TextSize, addEvents, Axis } from "victory-core";
import { PropTypes as CustomPropTypes, VictoryLabel, CommonProps, VictoryContainer, VictoryTheme, LineSegment, TextSize, addEvents, Axis } from "victory-core";
import { getBaseProps, getStyles } from "./helper-methods";

@@ -196,5 +196,4 @@ var fallbackProps = {

value: function render() {
var animationWhitelist = VictoryAxis.animationWhitelist,
role = VictoryAxis.role;
var props = Helpers.modifyProps(this.props, fallbackProps, role);
var animationWhitelist = VictoryAxis.animationWhitelist;
var props = Axis.modifyProps(this.props, fallbackProps);

@@ -201,0 +200,0 @@ if (this.shouldAnimate()) {

@@ -169,23 +169,2 @@ "use strict";

var getRole = function (props) {
if (props.dependentAxis) {
return props.theme && props.theme.dependentAxis ? "dependentAxis" : "axis";
}
return props.theme && props.theme.independentAxis ? "independentAxis" : "axis";
};
var getShallowMergedThemeProps = function (props, role) {
var axisTheme = props.theme.axis || {};
return (0, _defaults2.default)({}, props.theme[role], axisTheme);
};
var modifyProps = function (props, fallbackProps, role) {
if (role !== "axis") {
props.theme[role] = getShallowMergedThemeProps(props, role);
}
return _victoryCore.Helpers.modifyProps(props, fallbackProps, role);
};
var getAxisLabelProps = function (props, calculatedValues, globalTransform) {

@@ -429,4 +408,3 @@ var style = calculatedValues.style,

var getBaseProps = function (props, fallbackProps) {
var role = getRole(props);
props = modifyProps(props, fallbackProps, role);
props = _victoryCore.Axis.modifyProps(props, fallbackProps);
var calculatedValues = getCalculatedValues(props);

@@ -433,0 +411,0 @@ var axis = calculatedValues.axis,

@@ -215,6 +215,5 @@ "use strict";

value: function render() {
var animationWhitelist = VictoryAxis.animationWhitelist,
role = VictoryAxis.role;
var animationWhitelist = VictoryAxis.animationWhitelist;
var props = _victoryCore.Helpers.modifyProps(this.props, fallbackProps, role);
var props = _victoryCore.Axis.modifyProps(this.props, fallbackProps);

@@ -221,0 +220,0 @@ if (this.shouldAnimate()) {

{
"name": "victory-axis",
"version": "33.1.0",
"version": "33.1.2",
"description": "Axis Component for Victory",

@@ -24,3 +24,3 @@ "keywords": [

"prop-types": "^15.5.8",
"victory-core": "^33.1.0"
"victory-core": "^33.1.2"
},

@@ -27,0 +27,0 @@ "scripts": {

@@ -126,22 +126,2 @@ import { assign, defaults } from "lodash";

const getRole = (props) => {
if (props.dependentAxis) {
return props.theme && props.theme.dependentAxis ? "dependentAxis" : "axis";
}
return props.theme && props.theme.independentAxis ? "independentAxis" : "axis";
};
const getShallowMergedThemeProps = (props, role) => {
const axisTheme = props.theme.axis || {};
return defaults({}, props.theme[role], axisTheme);
};
const modifyProps = (props, fallbackProps, role) => {
if (role !== "axis") {
props.theme[role] = getShallowMergedThemeProps(props, role);
}
return Helpers.modifyProps(props, fallbackProps, role);
};
const getAxisLabelProps = (props, calculatedValues, globalTransform) => {

@@ -345,4 +325,3 @@ const { style, orientation, padding, labelPadding, isVertical } = calculatedValues;

const getBaseProps = (props, fallbackProps) => {
const role = getRole(props);
props = modifyProps(props, fallbackProps, role);
props = Axis.modifyProps(props, fallbackProps);
const calculatedValues = getCalculatedValues(props);

@@ -349,0 +328,0 @@ const {

@@ -6,3 +6,2 @@ import PropTypes from "prop-types";

PropTypes as CustomPropTypes,
Helpers,
VictoryLabel,

@@ -234,4 +233,4 @@ CommonProps,

render() {
const { animationWhitelist, role } = VictoryAxis;
const props = Helpers.modifyProps(this.props, fallbackProps, role);
const { animationWhitelist } = VictoryAxis;
const props = Axis.modifyProps(this.props, fallbackProps);

@@ -238,0 +237,0 @@ if (this.shouldAnimate()) {

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