victory-chart 36.1.0 → 36.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8
8
 
9
9
  import PropTypes from "prop-types";
10
10
  import React from "react";
11
- import { Background, Helpers, VictoryContainer, VictoryTheme, CommonProps, PropTypes as CustomPropTypes, Wrapper, usePreviousProps, useAnimationState } from "victory-core";
11
+ import { Background, Helpers, VictoryContainer, VictoryTheme, CommonProps, PropTypes as CustomPropTypes, Wrapper, Hooks } from "victory-core";
12
12
  import { VictorySharedEvents } from "victory-shared-events";
13
13
  import { VictoryAxis } from "victory-axis";
14
14
  import { VictoryPolarAxis } from "victory-polar-axis";
@@ -23,10 +23,10 @@ var fallbackProps = {
23
23
  var VictoryChart = function (initialProps) {
24
24
  var role = "chart";
25
25
 
26
- var _useAnimationState = useAnimationState(),
27
- getAnimationProps = _useAnimationState.getAnimationProps,
28
- setAnimationState = _useAnimationState.setAnimationState,
29
- getProps = _useAnimationState.getProps;
26
+ var _Hooks$useAnimationSt = Hooks.useAnimationState(),
27
+ getAnimationProps = _Hooks$useAnimationSt.getAnimationProps,
28
+ setAnimationState = _Hooks$useAnimationSt.setAnimationState,
29
+ getProps = _Hooks$useAnimationSt.getProps;
30
30
 
31
31
  var props = getProps(initialProps);
32
32
  var modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
@@ -102,7 +102,7 @@ var VictoryChart = function (initialProps) {
102
102
  var events = React.useMemo(function () {
103
103
  return Wrapper.getAllEvents(props);
104
104
  }, [props]);
105
- var previousProps = usePreviousProps(initialProps);
105
+ var previousProps = Hooks.usePreviousProps(initialProps);
106
106
  React.useEffect(function () {
107
107
  // This is called before dismount to keep state in sync
108
108
  return function () {
@@ -42,10 +42,10 @@ var fallbackProps = {
42
42
  var VictoryChart = function (initialProps) {
43
43
  var role = "chart";
44
44
 
45
- var _useAnimationState = (0, _victoryCore.useAnimationState)(),
46
- getAnimationProps = _useAnimationState.getAnimationProps,
47
- setAnimationState = _useAnimationState.setAnimationState,
48
- getProps = _useAnimationState.getProps;
45
+ var _Hooks$useAnimationSt = _victoryCore.Hooks.useAnimationState(),
46
+ getAnimationProps = _Hooks$useAnimationSt.getAnimationProps,
47
+ setAnimationState = _Hooks$useAnimationSt.setAnimationState,
48
+ getProps = _Hooks$useAnimationSt.getProps;
49
49
 
50
50
  var props = getProps(initialProps);
51
51
 
@@ -129,7 +129,7 @@ var VictoryChart = function (initialProps) {
129
129
  return _victoryCore.Wrapper.getAllEvents(props);
130
130
  }, [props]);
131
131
 
132
- var previousProps = (0, _victoryCore.usePreviousProps)(initialProps);
132
+ var previousProps = _victoryCore.Hooks.usePreviousProps(initialProps);
133
133
 
134
134
  _react.default.useEffect(function () {
135
135
  // This is called before dismount to keep state in sync
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-chart",
3
- "version": "36.1.0",
3
+ "version": "36.3.0",
4
4
  "description": "Chart Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,10 +22,10 @@
22
22
  "lodash": "^4.17.19",
23
23
  "prop-types": "^15.5.8",
24
24
  "react-fast-compare": "^2.0.0",
25
- "victory-axis": "^36.1.0",
26
- "victory-core": "^36.1.0",
27
- "victory-polar-axis": "^36.1.0",
28
- "victory-shared-events": "^36.1.0"
25
+ "victory-axis": "^36.3.0",
26
+ "victory-core": "^36.3.0",
27
+ "victory-polar-axis": "^36.3.0",
28
+ "victory-shared-events": "^36.3.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^16.6.0 || ^17.0.0"
@@ -34,5 +34,5 @@
34
34
  "version": "yarn run nps build-libs && nps build-dists"
35
35
  },
36
36
  "sideEffects": false,
37
- "gitHead": "038cd9b70d9ce54ac6b861014165583760734c99"
37
+ "gitHead": "ebafd849d2ded3f1d2aabf0d6e64dcbd48e4c9d6"
38
38
  }
@@ -9,8 +9,7 @@ import {
9
9
  CommonProps,
10
10
  PropTypes as CustomPropTypes,
11
11
  Wrapper,
12
- usePreviousProps,
13
- useAnimationState
12
+ Hooks
14
13
  } from "victory-core";
15
14
  import { VictorySharedEvents } from "victory-shared-events";
16
15
  import { VictoryAxis } from "victory-axis";
@@ -32,7 +31,7 @@ const fallbackProps = {
32
31
  const VictoryChart = (initialProps) => {
33
32
  const role = "chart";
34
33
  const { getAnimationProps, setAnimationState, getProps } =
35
- useAnimationState();
34
+ Hooks.useAnimationState();
36
35
  const props = getProps(initialProps);
37
36
 
38
37
  const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
@@ -136,7 +135,7 @@ const VictoryChart = (initialProps) => {
136
135
  return Wrapper.getAllEvents(props);
137
136
  }, [props]);
138
137
 
139
- const previousProps = usePreviousProps(initialProps);
138
+ const previousProps = Hooks.usePreviousProps(initialProps);
140
139
 
141
140
  React.useEffect(() => {
142
141
  // This is called before dismount to keep state in sync