New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

victory-chart

Package Overview
Dependencies
Maintainers
7
Versions
290
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-chart - npm Package Compare versions

Comparing version 24.5.1 to 24.6.0

29

CHANGELOG.md
# VictoryChart Changelog
## 24.6.0 (2018-01-02)
- [544](https://github.com/FormidableLabs/victory-chart/pull/544)
- [victory-core/324](https://github.com/FormidableLabs/victory-core/pull/324) Adds support for external event mutations
- Adds `externalEventMutations` prop to `VictorySharedEvents` and all components enhanced with the `add-events` HOC
- `externalEventMutations` prop format:
```
externalEventMutations: PropTypes.arrayOf(PropTypes.shape({
callback: PropTypes.function,
childName: PropTypes.oneOfType([
PropTypes.string,
PropTypes.array
]),
eventKey: PropTypes.oneOfType([
PropTypes.array,
CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]),
PropTypes.string
]),
mutation: PropTypes.function,
target: PropTypes.oneOfType([
PropTypes.string,
PropTypes.array
])
}))
```
*Note:* `eventKey` and `target` must be specified for externalEventMutations. When using `extenalEventMutations` with shared events (_i.e._ events on VictoryChart etc), `childName` is also required.
*Note:* The `callback` supplied to `externalEventMutations` should be used for clearing mutations. This is crucial for animating charts
## 24.5.1 (2018-01-02)

@@ -4,0 +33,0 @@

10

es/components/victory-chart/victory-chart.js

@@ -237,3 +237,4 @@ import _defaults from "lodash/defaults";

groupComponent = modifiedProps.groupComponent,
standalone = modifiedProps.standalone;
standalone = modifiedProps.standalone,
externalEventMutations = modifiedProps.externalEventMutations;

@@ -249,3 +250,8 @@ var axes = props.polar ? modifiedProps.defaultPolarAxes : modifiedProps.defaultAxes;

VictorySharedEvents,
{ events: this.events, eventKey: eventKey, container: container },
{
container: container,
eventKey: eventKey,
events: this.events,
externalEventMutations: externalEventMutations
},
newChildren

@@ -252,0 +258,0 @@ );

@@ -269,3 +269,4 @@ import _defaults from "lodash/defaults";

standalone = modifiedProps.standalone,
groupComponent = modifiedProps.groupComponent;
groupComponent = modifiedProps.groupComponent,
externalEventMutations = modifiedProps.externalEventMutations;

@@ -280,3 +281,8 @@ var childComponents = React.Children.toArray(modifiedProps.children);

VictorySharedEvents,
{ events: this.events, eventKey: eventKey, container: container },
{
container: container,
eventKey: eventKey,
events: this.events,
externalEventMutations: externalEventMutations
},
newChildren

@@ -283,0 +289,0 @@ );

@@ -219,3 +219,4 @@ import _defaults from "lodash/defaults";

standalone = modifiedProps.standalone,
groupComponent = modifiedProps.groupComponent;
groupComponent = modifiedProps.groupComponent,
externalEventMutations = modifiedProps.externalEventMutations;

@@ -230,3 +231,8 @@ var childComponents = React.Children.toArray(modifiedProps.children);

VictorySharedEvents,
{ events: this.events, eventKey: eventKey, container: container },
{
container: container,
eventKey: eventKey,
events: this.events,
externalEventMutations: externalEventMutations
},
newChildren

@@ -233,0 +239,0 @@ );

@@ -37,2 +37,9 @@ import PropTypes from "prop-types";

})),
externalEventMutations: PropTypes.arrayOf(PropTypes.shape({
callback: PropTypes.function,
childName: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
eventKey: PropTypes.oneOfType([PropTypes.array, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string]),
mutation: PropTypes.function,
target: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
})),
groupComponent: PropTypes.element,

@@ -39,0 +46,0 @@ height: CustomPropTypes.nonNegative,

@@ -267,3 +267,4 @@ Object.defineProperty(exports, "__esModule", {

groupComponent = modifiedProps.groupComponent,
standalone = modifiedProps.standalone;
standalone = modifiedProps.standalone,
externalEventMutations = modifiedProps.externalEventMutations;

@@ -279,3 +280,8 @@ var axes = props.polar ? modifiedProps.defaultPolarAxes : modifiedProps.defaultAxes;

_victoryCore.VictorySharedEvents,
{ events: this.events, eventKey: eventKey, container: container },
{
container: container,
eventKey: eventKey,
events: this.events,
externalEventMutations: externalEventMutations
},
newChildren

@@ -282,0 +288,0 @@ );

@@ -290,3 +290,4 @@ Object.defineProperty(exports, "__esModule", {

standalone = modifiedProps.standalone,
groupComponent = modifiedProps.groupComponent;
groupComponent = modifiedProps.groupComponent,
externalEventMutations = modifiedProps.externalEventMutations;

@@ -301,3 +302,8 @@ var childComponents = _react2.default.Children.toArray(modifiedProps.children);

_victoryCore.VictorySharedEvents,
{ events: this.events, eventKey: eventKey, container: container },
{
container: container,
eventKey: eventKey,
events: this.events,
externalEventMutations: externalEventMutations
},
newChildren

@@ -304,0 +310,0 @@ );

@@ -240,3 +240,4 @@ Object.defineProperty(exports, "__esModule", {

standalone = modifiedProps.standalone,
groupComponent = modifiedProps.groupComponent;
groupComponent = modifiedProps.groupComponent,
externalEventMutations = modifiedProps.externalEventMutations;

@@ -251,3 +252,8 @@ var childComponents = _react2.default.Children.toArray(modifiedProps.children);

_victoryCore.VictorySharedEvents,
{ events: this.events, eventKey: eventKey, container: container },
{
container: container,
eventKey: eventKey,
events: this.events,
externalEventMutations: externalEventMutations
},
newChildren

@@ -254,0 +260,0 @@ );

@@ -47,2 +47,9 @@ Object.defineProperty(exports, "__esModule", {

})),
externalEventMutations: _propTypes2.default.arrayOf(_propTypes2.default.shape({
callback: _propTypes2.default.function,
childName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.array]),
eventKey: _propTypes2.default.oneOfType([_propTypes2.default.array, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes2.default.string]),
mutation: _propTypes2.default.function,
target: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.array])
})),
groupComponent: _propTypes2.default.element,

@@ -49,0 +56,0 @@ height: _victoryCore.PropTypes.nonNegative,

4

package.json
{
"name": "victory-chart",
"version": "24.5.1",
"version": "24.6.0",
"description": "Chart Component for Victory",

@@ -35,3 +35,3 @@ "main": "lib/index.js",

"lodash": "^4.17.4",
"victory-core": "^20.5.0"
"victory-core": "^20.6.0"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -234,3 +234,5 @@ import { defaults } from "lodash";

const modifiedProps = Helpers.modifyProps(props, fallbackProps, "chart");
const { eventKey, containerComponent, groupComponent, standalone } = modifiedProps;
const {
eventKey, containerComponent, groupComponent, standalone, externalEventMutations
} = modifiedProps;
const axes = props.polar ? modifiedProps.defaultPolarAxes : modifiedProps.defaultAxes;

@@ -245,3 +247,8 @@ const childComponents = ChartHelpers.getChildComponents(modifiedProps, axes);

return (
<VictorySharedEvents events={this.events} eventKey={eventKey} container={container}>
<VictorySharedEvents
container={container}
eventKey={eventKey}
events={this.events}
externalEventMutations={externalEventMutations}
>
{newChildren}

@@ -248,0 +255,0 @@ </VictorySharedEvents>

@@ -238,3 +238,5 @@ import { assign, defaults } from "lodash";

const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
const { eventKey, containerComponent, standalone, groupComponent } = modifiedProps;
const {
eventKey, containerComponent, standalone, groupComponent, externalEventMutations
} = modifiedProps;
const childComponents = React.Children.toArray(modifiedProps.children);

@@ -248,3 +250,8 @@ const calculatedProps = this.getCalculatedProps(modifiedProps, childComponents);

return (
<VictorySharedEvents events={this.events} eventKey={eventKey} container={container}>
<VictorySharedEvents
container={container}
eventKey={eventKey}
events={this.events}
externalEventMutations={externalEventMutations}
>
{newChildren}

@@ -251,0 +258,0 @@ </VictorySharedEvents>

@@ -212,3 +212,5 @@ import { assign, defaults } from "lodash";

const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
const { eventKey, containerComponent, standalone, groupComponent } = modifiedProps;
const {
eventKey, containerComponent, standalone, groupComponent, externalEventMutations
} = modifiedProps;
const childComponents = React.Children.toArray(modifiedProps.children);

@@ -222,3 +224,8 @@ const calculatedProps = this.getCalculatedProps(modifiedProps, childComponents);

return (
<VictorySharedEvents events={this.events} eventKey={eventKey} container={container}>
<VictorySharedEvents
container={container}
eventKey={eventKey}
events={this.events}
externalEventMutations={externalEventMutations}
>
{newChildren}

@@ -225,0 +232,0 @@ </VictorySharedEvents>

@@ -75,2 +75,19 @@ import PropTypes from "prop-types";

})),
externalEventMutations: PropTypes.arrayOf(PropTypes.shape({
callback: PropTypes.function,
childName: PropTypes.oneOfType([
PropTypes.string,
PropTypes.array
]),
eventKey: PropTypes.oneOfType([
PropTypes.array,
CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]),
PropTypes.string
]),
mutation: PropTypes.function,
target: PropTypes.oneOfType([
PropTypes.string,
PropTypes.array
])
})),
groupComponent: PropTypes.element,

@@ -77,0 +94,0 @@ height: CustomPropTypes.nonNegative,

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