victory-chart 36.0.0 → 36.2.2
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.
- package/dist/victory-chart.js +381 -294
- package/dist/victory-chart.min.js +1 -1
- package/es/victory-chart.js +6 -6
- package/lib/victory-chart.js +5 -5
- package/package.json +6 -6
- package/src/victory-chart.js +3 -4
package/es/victory-chart.js
CHANGED
|
@@ -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,
|
|
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
|
|
27
|
-
getAnimationProps =
|
|
28
|
-
setAnimationState =
|
|
29
|
-
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 () {
|
package/lib/victory-chart.js
CHANGED
|
@@ -42,10 +42,10 @@ var fallbackProps = {
|
|
|
42
42
|
var VictoryChart = function (initialProps) {
|
|
43
43
|
var role = "chart";
|
|
44
44
|
|
|
45
|
-
var
|
|
46
|
-
getAnimationProps =
|
|
47
|
-
setAnimationState =
|
|
48
|
-
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 =
|
|
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.
|
|
3
|
+
"version": "36.2.2",
|
|
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.
|
|
26
|
-
"victory-core": "^36.
|
|
27
|
-
"victory-polar-axis": "^36.
|
|
28
|
-
"victory-shared-events": "^36.
|
|
25
|
+
"victory-axis": "^36.2.2",
|
|
26
|
+
"victory-core": "^36.2.2",
|
|
27
|
+
"victory-polar-axis": "^36.2.2",
|
|
28
|
+
"victory-shared-events": "^36.2.2"
|
|
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": "
|
|
37
|
+
"gitHead": "e09146d4bede80e27ed095fcd7e1167c00fba864"
|
|
38
38
|
}
|
package/src/victory-chart.js
CHANGED
|
@@ -9,8 +9,7 @@ import {
|
|
|
9
9
|
CommonProps,
|
|
10
10
|
PropTypes as CustomPropTypes,
|
|
11
11
|
Wrapper,
|
|
12
|
-
|
|
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
|