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

victory-zoom-container

Package Overview
Dependencies
Maintainers
26
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-zoom-container - npm Package Compare versions

Comparing version 36.5.3 to 36.6.0

CHANGELOG.md

8

es/victory-zoom-container.js

@@ -86,7 +86,7 @@ import _isFunction from "lodash/isFunction";

return child;
} else {
return /*#__PURE__*/React.cloneElement(child, {
groupComponent: groupComponent
});
}
return /*#__PURE__*/React.cloneElement(child, {
groupComponent: groupComponent
});
});

@@ -93,0 +93,0 @@ }

@@ -20,3 +20,3 @@ import _delay from "lodash/delay";

/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/
import { Children } from "react";

@@ -36,3 +36,3 @@ import { Selection, Collection, Wrapper } from "victory-core";

return +val1[0] === +val2[0] && +val1[1] === +val2[1];
return Number(val1[0]) === Number(val2[0]) && Number(val1[1]) === Number(val2[1]);
};

@@ -89,4 +89,4 @@

var diff = range - range * factor;
var newMin = +from + diff * percent;
var newMax = +to - diff * (1 - percent);
var newMin = Number(from) + diff * percent;
var newMax = Number(to) - diff * (1 - percent);
return [Math.min(newMin, newMax), Math.max(newMin, newMax)];

@@ -106,3 +106,3 @@ },

var maxExtent = point + extent / 2;
return [minExtent > from && minExtent < to ? minExtent : from, maxExtent < to && maxExtent > from ? maxExtent : +from + extent / 2];
return [minExtent > from && minExtent < to ? minExtent : from, maxExtent < to && maxExtent > from ? maxExtent : Number(from) + extent / 2];
},

@@ -150,3 +150,3 @@ zoommingOut: function (evt) {

var _currentDomain$map = currentDomain.map(function (val) {
return +val;
return Number(val);
}),

@@ -158,3 +158,3 @@ _currentDomain$map2 = _slicedToArray(_currentDomain$map, 2),

var _originalDomain$map = originalDomain.map(function (val) {
return +val;
return Number(val);
}),

@@ -161,0 +161,0 @@ _originalDomain$map2 = _slicedToArray(_originalDomain$map, 2),

@@ -103,7 +103,7 @@ "use strict";

return child;
} else {
return /*#__PURE__*/_react.default.cloneElement(child, {
groupComponent: groupComponent
});
}
return /*#__PURE__*/_react.default.cloneElement(child, {
groupComponent: groupComponent
});
});

@@ -110,0 +110,0 @@ }

@@ -48,3 +48,3 @@ "use strict";

return +val1[0] === +val2[0] && +val1[1] === +val2[1];
return Number(val1[0]) === Number(val2[0]) && Number(val1[1]) === Number(val2[1]);
};

@@ -101,4 +101,4 @@

var diff = range - range * factor;
var newMin = +from + diff * percent;
var newMax = +to - diff * (1 - percent);
var newMin = Number(from) + diff * percent;
var newMax = Number(to) - diff * (1 - percent);
return [Math.min(newMin, newMax), Math.max(newMin, newMax)];

@@ -118,3 +118,3 @@ },

var maxExtent = point + extent / 2;
return [minExtent > from && minExtent < to ? minExtent : from, maxExtent < to && maxExtent > from ? maxExtent : +from + extent / 2];
return [minExtent > from && minExtent < to ? minExtent : from, maxExtent < to && maxExtent > from ? maxExtent : Number(from) + extent / 2];
},

@@ -162,3 +162,3 @@ zoommingOut: function (evt) {

var _currentDomain$map = currentDomain.map(function (val) {
return +val;
return Number(val);
}),

@@ -170,3 +170,3 @@ _currentDomain$map2 = _slicedToArray(_currentDomain$map, 2),

var _originalDomain$map = originalDomain.map(function (val) {
return +val;
return Number(val);
}),

@@ -173,0 +173,0 @@ _originalDomain$map2 = _slicedToArray(_originalDomain$map, 2),

{
"name": "victory-zoom-container",
"version": "36.5.3",
"version": "36.6.0",
"description": "Interactive Zoom Component for Victory",

@@ -16,2 +16,3 @@ "keywords": [

"homepage": "https://formidable.com/open-source/victory",
"sideEffects": false,
"main": "lib/index.js",

@@ -25,3 +26,3 @@ "module": "es/index.js",

"prop-types": "^15.8.1",
"victory-core": "^36.5.3"
"victory-core": "^36.6.0"
},

@@ -31,7 +32,234 @@ "peerDependencies": {

},
"wireit": {
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
"### DO NOT MODIFY THESE MANUALLY ####": {},
"build": {
"dependencies": [
"build:lib",
"build:dist",
"types:create"
]
},
"build:lib": {
"dependencies": [
"build:lib:esm",
"build:lib:cjs"
]
},
"build:lib:esm": {
"command": "nps build:lib:esm",
"files": [
"src/**",
"!src/**/*.test.*",
"../../.babelrc.build.js"
],
"output": [
"es/**/*.js",
"es/**/*.js.map"
],
"dependencies": [
"../victory-core:build:lib:esm"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"build:lib:cjs": {
"command": "nps build:lib:cjs",
"files": [
"src/**",
"!src/**/*.test.*",
"../../.babelrc.build.js"
],
"output": [
"lib/**/*.js",
"lib/**/*.js.map"
],
"dependencies": [
"../victory-core:build:lib:cjs"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"build:dist": {
"dependencies": [
"build:dist:dev",
"build:dist:min"
]
},
"build:dist:dev": {
"command": "nps build:dist:dev",
"files": [
"src/**",
"!src/**/*.test.*",
"../../.babelrc.build.js",
"../../config/webpack.config.js",
"../../config/webpack.config.dev.js"
],
"output": [
"dist/victory*.js",
"!dist/victory*.min.js*"
],
"dependencies": [
"../victory-core:build:lib:esm"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"build:dist:min": {
"command": "nps build:dist:min",
"files": [
"src/**",
"!src/**/*.test.*",
"../../.babelrc.build.js",
"../../config/webpack.config.js"
],
"output": [
"dist/victory*.min.js*"
],
"dependencies": [
"../victory-core:build:lib:esm"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"types:check": {
"command": "nps types:pkg:check",
"files": [
"src/**/*.{ts,tsx}",
"../../tsconfig.base.json",
"tsconfig.json"
],
"dependencies": [
"types:create",
"../victory-core:types:create",
"../victory-vendor:types:create",
"../victory-voronoi:types:create"
],
"output": [],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"types:create": {
"command": "nps types:pkg:create",
"files": [
"src/**",
"!src/**/*.test.*",
"../../tsconfig.base.json",
"tsconfig.build.json"
],
"output": [
"es/**/*.d.ts",
"es/**/*.d.ts.map",
"lib/**/*.d.ts",
"lib/**/*.d.ts.map"
],
"dependencies": [
"../victory-core:types:create"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"format": {
"command": "nps format:pkg",
"files": [
"src/**",
"*.json",
"../../.prettierignore",
"../../.prettierrc.json"
],
"output": [],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"lint": {
"command": "nps lint:pkg",
"files": [
"src/**",
"../../.eslintignore",
"../../.eslintrc.js"
],
"output": [],
"dependencies": [
"../victory-core:types:create",
"../victory-vendor:types:create",
"../victory-voronoi:types:create"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"format:fix": {
"command": "pnpm run format || nps format:pkg:fix",
"files": [
"src/**",
"*.json",
"../../.prettierignore",
"../../.prettierrc.json"
],
"output": [],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"lint:fix": {
"command": "pnpm run lint || nps lint:pkg:fix",
"files": [
"src/**",
"../../.eslintignore",
"../../.eslintrc.js"
],
"output": [],
"dependencies": [
"../victory-core:types:create",
"../victory-vendor:types:create",
"../victory-voronoi:types:create"
],
"packageLocks": [
"pnpm-lock.yaml"
]
},
"jest": {
"command": "nps jest:pkg",
"files": [
"src/**/*.test.*",
"../../.babelrc.js",
"../../test/jest-config.js",
"../../test/jest-setup.ts"
],
"output": [],
"dependencies": [
"build:lib:cjs",
"../victory-vendor:build:lib:cjs",
"../victory-voronoi:build:lib:cjs"
],
"packageLocks": [
"pnpm-lock.yaml"
]
}
},
"scripts": {
"version": "yarn run nps build-libs && nps build-dists"
},
"sideEffects": false,
"gitHead": "55338af3c57eacca5956e53c08a58e47ba41d01e"
}
"### THESE SCRIPTS ARE GENERATED ###": "true",
"### DO NOT MODIFY THESE MANUALLY ###": "true",
"build": "wireit",
"build:lib": "wireit",
"build:lib:esm": "wireit",
"build:lib:cjs": "wireit",
"build:dist": "wireit",
"build:dist:dev": "wireit",
"build:dist:min": "wireit",
"types:check": "wireit",
"types:create": "wireit",
"format": "wireit",
"format:fix": "wireit",
"lint": "wireit",
"lint:fix": "wireit",
"jest": "wireit"
}
}

@@ -124,5 +124,4 @@ import PropTypes from "prop-types";

return child;
} else {
return React.cloneElement(child, { groupComponent });
}
return React.cloneElement(child, { groupComponent });
});

@@ -129,0 +128,0 @@ }

@@ -1,2 +0,2 @@

/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/
import { Children } from "react";

@@ -16,3 +16,6 @@ import { Selection, Collection, Wrapper } from "victory-core";

}
return +val1[0] === +val2[0] && +val1[1] === +val2[1];
return (
Number(val1[0]) === Number(val2[0]) &&
Number(val1[1]) === Number(val2[1])
);
};

@@ -65,4 +68,4 @@ return checkDimension("x") && checkDimension("y");

const diff = range - range * factor;
const newMin = +from + diff * percent;
const newMax = +to - diff * (1 - percent);
const newMin = Number(from) + diff * percent;
const newMax = Number(to) - diff * (1 - percent);
return [Math.min(newMin, newMax), Math.max(newMin, newMax)];

@@ -81,3 +84,5 @@ },

minExtent > from && minExtent < to ? minExtent : from,
maxExtent < to && maxExtent > from ? maxExtent : +from + extent / 2,
maxExtent < to && maxExtent > from
? maxExtent
: Number(from) + extent / 2,
];

@@ -121,4 +126,4 @@ },

pan(currentDomain, originalDomain, delta) {
const [fromCurrent, toCurrent] = currentDomain.map((val) => +val);
const [fromOriginal, toOriginal] = originalDomain.map((val) => +val);
const [fromCurrent, toCurrent] = currentDomain.map((val) => Number(val));
const [fromOriginal, toOriginal] = originalDomain.map((val) => Number(val));
const lowerBound = fromCurrent + delta;

@@ -125,0 +130,0 @@ const upperBound = toCurrent + delta;

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