victory-polar-axis
Advanced tools
Comparing version 36.8.4 to 36.8.5-next.0
# victory-polar-axis | ||
## 36.8.5-next.0 | ||
### Patch Changes | ||
- c8c2eb2f5: Replace instances of lodash.assign with Object.assign | ||
- 0f3abe234: Migrate victory-native to TypeScript | ||
- Updated dependencies [c8c2eb2f5] | ||
- Updated dependencies [0f3abe234] | ||
- victory-core@36.8.5-next.0 | ||
## 36.8.4 | ||
@@ -4,0 +14,0 @@ |
@@ -0,0 +0,0 @@ import { VictoryPolarAxisProps } from "./types"; |
import _defaults from "lodash/defaults"; | ||
import _uniqBy from "lodash/uniqBy"; | ||
import _assign from "lodash/assign"; | ||
import { Helpers, LabelHelpers, Scale, Axis } from "victory-core"; | ||
@@ -219,7 +218,7 @@ | ||
var labelAngle = axisType === "angular" ? Helpers.radiansToDegrees(scale(tickValue)) : axisAngle + angularPadding; | ||
var textAngle = labelStyle.angle === undefined ? LabelHelpers.getPolarAngle(_assign({}, props, { | ||
var textAngle = labelStyle.angle === undefined ? LabelHelpers.getPolarAngle(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
}), labelAngle) : labelStyle.angle; | ||
var labelRadius = axisType === "angular" ? radius + tickPadding : scale(tickValue); | ||
var textAnchor = labelStyle.textAnchor || LabelHelpers.getPolarTextAnchor(_assign({}, props, { | ||
var textAnchor = labelStyle.textAnchor || LabelHelpers.getPolarTextAnchor(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
@@ -304,10 +303,10 @@ }), labelAngle); | ||
var axisAngle = axisType === "radial" ? getAxisAngle(props) : undefined; | ||
var textAngle = labelStyle.angle === undefined ? LabelHelpers.getPolarAngle(_assign({}, props, { | ||
var textAngle = labelStyle.angle === undefined ? LabelHelpers.getPolarAngle(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
}), axisAngle) : labelStyle.angle; | ||
var labelRadius = radius + (labelStyle.padding || 0); | ||
var textAnchor = labelStyle.textAnchor || LabelHelpers.getPolarTextAnchor(_assign({}, props, { | ||
var textAnchor = labelStyle.textAnchor || LabelHelpers.getPolarTextAnchor(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
}), axisAngle); | ||
var verticalAnchor = labelStyle.verticalAnchor || LabelHelpers.getPolarVerticalAnchor(_assign({}, props, { | ||
var verticalAnchor = labelStyle.verticalAnchor || LabelHelpers.getPolarVerticalAnchor(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
@@ -353,6 +352,5 @@ }), axisAngle); | ||
var getCalculatedValues = function (initialProps) { | ||
var props = _assign({ | ||
var props = Object.assign({ | ||
polar: true | ||
}, initialProps); | ||
var defaultStyles = getStyleObject(props); | ||
@@ -359,0 +357,0 @@ var style = getStyles(props, defaultStyles); |
export * from "./types"; | ||
export * from "./victory-polar-axis"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -18,18 +18,3 @@ import React from "react"; | ||
}; | ||
static defaultProps: { | ||
axisComponent: JSX.Element; | ||
axisLabelComponent: JSX.Element; | ||
circularAxisComponent: JSX.Element; | ||
circularGridComponent: JSX.Element; | ||
containerComponent: JSX.Element; | ||
endAngle: number; | ||
gridComponent: JSX.Element; | ||
groupComponent: JSX.Element; | ||
labelPlacement: string; | ||
startAngle: number; | ||
standalone: boolean; | ||
theme: import("victory-core").VictoryThemeDefinition; | ||
tickComponent: JSX.Element; | ||
tickLabelComponent: JSX.Element; | ||
}; | ||
static defaultProps: VictoryPolarAxisProps; | ||
static getDomain: typeof Axis.getDomain; | ||
@@ -36,0 +21,0 @@ static getAxis: typeof Axis.getAxis; |
import _isEmpty from "lodash/isEmpty"; | ||
import _assign from "lodash/assign"; | ||
@@ -99,6 +98,5 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } | ||
var tickComponents = this.dataKeys.map(function (key, index) { | ||
var tickProps = _assign({ | ||
var tickProps = Object.assign({ | ||
key: "".concat(name, "-tick-").concat(key) | ||
}, _this.getComponentProps(tickComponent, "ticks", index)); | ||
var TickComponent = /*#__PURE__*/React.cloneElement(tickComponent, tickProps); | ||
@@ -108,6 +106,5 @@ return shouldRender(TickComponent.props) ? TickComponent : undefined; | ||
var gridComponents = this.dataKeys.map(function (key, index) { | ||
var gridProps = _assign({ | ||
var gridProps = Object.assign({ | ||
key: "".concat(name, "-grid-").concat(key) | ||
}, _this.getComponentProps(gridComponent, "grid", index)); | ||
var GridComponent = /*#__PURE__*/React.cloneElement(gridComponent, gridProps); | ||
@@ -117,6 +114,5 @@ return shouldRender(GridComponent.props) ? GridComponent : undefined; | ||
var tickLabelComponents = this.dataKeys.map(function (key, index) { | ||
var tickLabelProps = _assign({ | ||
var tickLabelProps = Object.assign({ | ||
key: "".concat(name, "-tick-").concat(key) | ||
}, _this.getComponentProps(tickLabelComponent, "tickLabels", index)); | ||
return /*#__PURE__*/React.cloneElement(tickLabelComponent, tickLabelProps); | ||
@@ -123,0 +119,0 @@ }); |
@@ -0,0 +0,0 @@ import { VictoryPolarAxisProps } from "./types"; |
@@ -12,4 +12,2 @@ "use strict"; | ||
var _assign2 = _interopRequireDefault(require("lodash/assign")); | ||
var _victoryCore = require("victory-core"); | ||
@@ -245,3 +243,3 @@ | ||
var labelAngle = axisType === "angular" ? _victoryCore.Helpers.radiansToDegrees(scale(tickValue)) : axisAngle + angularPadding; | ||
var textAngle = labelStyle.angle === undefined ? _victoryCore.LabelHelpers.getPolarAngle((0, _assign2.default)({}, props, { | ||
var textAngle = labelStyle.angle === undefined ? _victoryCore.LabelHelpers.getPolarAngle(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
@@ -251,3 +249,3 @@ }), labelAngle) : labelStyle.angle; | ||
var textAnchor = labelStyle.textAnchor || _victoryCore.LabelHelpers.getPolarTextAnchor((0, _assign2.default)({}, props, { | ||
var textAnchor = labelStyle.textAnchor || _victoryCore.LabelHelpers.getPolarTextAnchor(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
@@ -333,3 +331,3 @@ }), labelAngle); | ||
var axisAngle = axisType === "radial" ? getAxisAngle(props) : undefined; | ||
var textAngle = labelStyle.angle === undefined ? _victoryCore.LabelHelpers.getPolarAngle((0, _assign2.default)({}, props, { | ||
var textAngle = labelStyle.angle === undefined ? _victoryCore.LabelHelpers.getPolarAngle(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
@@ -339,7 +337,7 @@ }), axisAngle) : labelStyle.angle; | ||
var textAnchor = labelStyle.textAnchor || _victoryCore.LabelHelpers.getPolarTextAnchor((0, _assign2.default)({}, props, { | ||
var textAnchor = labelStyle.textAnchor || _victoryCore.LabelHelpers.getPolarTextAnchor(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
}), axisAngle); | ||
var verticalAnchor = labelStyle.verticalAnchor || _victoryCore.LabelHelpers.getPolarVerticalAnchor((0, _assign2.default)({}, props, { | ||
var verticalAnchor = labelStyle.verticalAnchor || _victoryCore.LabelHelpers.getPolarVerticalAnchor(Object.assign({}, props, { | ||
labelPlacement: labelPlacement | ||
@@ -386,3 +384,3 @@ }), axisAngle); | ||
var getCalculatedValues = function (initialProps) { | ||
var props = (0, _assign2.default)({ | ||
var props = Object.assign({ | ||
polar: true | ||
@@ -389,0 +387,0 @@ }, initialProps); |
export * from "./types"; | ||
export * from "./victory-polar-axis"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -18,18 +18,3 @@ import React from "react"; | ||
}; | ||
static defaultProps: { | ||
axisComponent: JSX.Element; | ||
axisLabelComponent: JSX.Element; | ||
circularAxisComponent: JSX.Element; | ||
circularGridComponent: JSX.Element; | ||
containerComponent: JSX.Element; | ||
endAngle: number; | ||
gridComponent: JSX.Element; | ||
groupComponent: JSX.Element; | ||
labelPlacement: string; | ||
startAngle: number; | ||
standalone: boolean; | ||
theme: import("victory-core").VictoryThemeDefinition; | ||
tickComponent: JSX.Element; | ||
tickLabelComponent: JSX.Element; | ||
}; | ||
static defaultProps: VictoryPolarAxisProps; | ||
static getDomain: typeof Axis.getDomain; | ||
@@ -36,0 +21,0 @@ static getAxis: typeof Axis.getAxis; |
@@ -10,4 +10,2 @@ "use strict"; | ||
var _assign2 = _interopRequireDefault(require("lodash/assign")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -113,3 +111,3 @@ | ||
var tickComponents = this.dataKeys.map(function (key, index) { | ||
var tickProps = (0, _assign2.default)({ | ||
var tickProps = Object.assign({ | ||
key: "".concat(name, "-tick-").concat(key) | ||
@@ -123,3 +121,3 @@ }, _this.getComponentProps(tickComponent, "ticks", index)); | ||
var gridComponents = this.dataKeys.map(function (key, index) { | ||
var gridProps = (0, _assign2.default)({ | ||
var gridProps = Object.assign({ | ||
key: "".concat(name, "-grid-").concat(key) | ||
@@ -133,3 +131,3 @@ }, _this.getComponentProps(gridComponent, "grid", index)); | ||
var tickLabelComponents = this.dataKeys.map(function (key, index) { | ||
var tickLabelProps = (0, _assign2.default)({ | ||
var tickLabelProps = Object.assign({ | ||
key: "".concat(name, "-tick-").concat(key) | ||
@@ -136,0 +134,0 @@ }, _this.getComponentProps(tickLabelComponent, "tickLabels", index)); |
{ | ||
"name": "victory-polar-axis", | ||
"version": "36.8.4", | ||
"version": "36.8.5-next.0", | ||
"description": "Polar Axis Component for Victory", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"prop-types": "^15.8.1", | ||
"victory-core": "^36.8.4" | ||
"victory-core": "^36.8.5-next.0" | ||
}, | ||
@@ -32,3 +32,3 @@ "peerDependencies": { | ||
"publishConfig": { | ||
"provenance": true | ||
"provenance": false | ||
}, | ||
@@ -35,0 +35,0 @@ "wireit": { |
@@ -1,2 +0,2 @@ | ||
import { assign, uniqBy, defaults } from "lodash"; | ||
import { uniqBy, defaults } from "lodash"; | ||
import { Helpers, LabelHelpers, Scale, Axis } from "victory-core"; | ||
@@ -271,3 +271,3 @@ import { VictoryPolarAxisProps } from "./types"; | ||
? LabelHelpers.getPolarAngle( | ||
assign({}, props, { labelPlacement }), | ||
Object.assign({}, props, { labelPlacement }), | ||
labelAngle, | ||
@@ -281,3 +281,3 @@ ) | ||
LabelHelpers.getPolarTextAnchor( | ||
assign({}, props, { labelPlacement }), | ||
Object.assign({}, props, { labelPlacement }), | ||
labelAngle, | ||
@@ -382,3 +382,3 @@ ); | ||
? LabelHelpers.getPolarAngle( | ||
assign({}, props, { labelPlacement }), | ||
Object.assign({}, props, { labelPlacement }), | ||
axisAngle, | ||
@@ -391,3 +391,3 @@ ) | ||
LabelHelpers.getPolarTextAnchor( | ||
assign({}, props, { labelPlacement }), | ||
Object.assign({}, props, { labelPlacement }), | ||
axisAngle, | ||
@@ -398,3 +398,3 @@ ); | ||
LabelHelpers.getPolarVerticalAnchor( | ||
assign({}, props, { labelPlacement }), | ||
Object.assign({}, props, { labelPlacement }), | ||
axisAngle, | ||
@@ -443,3 +443,3 @@ ); | ||
const getCalculatedValues = (initialProps: VictoryPolarAxisProps) => { | ||
const props = assign({ polar: true }, initialProps); | ||
const props = Object.assign({ polar: true }, initialProps); | ||
const defaultStyles = getStyleObject(props); | ||
@@ -446,0 +446,0 @@ const style = getStyles(props, defaultStyles); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
1303824
21969
2
4
Updatedvictory-core@^36.8.5-next.0