victory-errorbar 36.2.1 → 36.3.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/LICENSE.txt +30 -0
- package/dist/victory-errorbar.js +141 -35
- package/dist/victory-errorbar.min.js +1 -1
- package/es/victory-errorbar.js +3 -2
- package/lib/victory-errorbar.js +4 -1
- package/package.json +4 -3
- package/src/victory-errorbar.js +7 -2
package/es/victory-errorbar.js
CHANGED
|
@@ -16,7 +16,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
16
16
|
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import React from "react";
|
|
19
|
-
import { PropTypes as CustomPropTypes, Helpers, VictoryLabel, addEvents, VictoryContainer, VictoryTheme, DefaultTransitions, CommonProps } from "victory-core";
|
|
19
|
+
import { PropTypes as CustomPropTypes, Helpers, VictoryLabel, addEvents, VictoryContainer, VictoryTheme, DefaultTransitions, CommonProps, UserProps } from "victory-core";
|
|
20
20
|
import ErrorBar from "./error-bar";
|
|
21
21
|
import { getBaseProps, getDomain, getData } from "./helper-methods";
|
|
22
22
|
var fallbackProps = {
|
|
@@ -75,7 +75,8 @@ function (_React$Component) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
var children = this.renderData(props);
|
|
78
|
-
|
|
78
|
+
var container = React.cloneElement(props.containerComponent, UserProps.getSafeUserProps(props));
|
|
79
|
+
return props.standalone ? this.renderContainer(container, children) : children;
|
|
79
80
|
}
|
|
80
81
|
}]);
|
|
81
82
|
|
package/lib/victory-errorbar.js
CHANGED
|
@@ -90,7 +90,10 @@ function (_React$Component) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
var children = this.renderData(props);
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
var container = _react.default.cloneElement(props.containerComponent, _victoryCore.UserProps.getSafeUserProps(props));
|
|
95
|
+
|
|
96
|
+
return props.standalone ? this.renderContainer(container, children) : children;
|
|
94
97
|
}
|
|
95
98
|
}]);
|
|
96
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-errorbar",
|
|
3
|
-
"version": "36.2
|
|
3
|
+
"version": "36.3.2",
|
|
4
4
|
"description": "Error Bar Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.19",
|
|
23
23
|
"prop-types": "^15.5.8",
|
|
24
|
-
"victory-core": "^36.2
|
|
24
|
+
"victory-core": "^36.3.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^16.6.0 || ^17.0.0"
|
|
@@ -29,5 +29,6 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
31
31
|
},
|
|
32
|
-
"sideEffects": false
|
|
32
|
+
"sideEffects": false,
|
|
33
|
+
"gitHead": "18895d1290245732d14332bbbda10336032c9aab"
|
|
33
34
|
}
|
package/src/victory-errorbar.js
CHANGED
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
VictoryContainer,
|
|
9
9
|
VictoryTheme,
|
|
10
10
|
DefaultTransitions,
|
|
11
|
-
CommonProps
|
|
11
|
+
CommonProps,
|
|
12
|
+
UserProps
|
|
12
13
|
} from "victory-core";
|
|
13
14
|
import ErrorBar from "./error-bar";
|
|
14
15
|
import { getBaseProps, getDomain, getData } from "./helper-methods";
|
|
@@ -105,8 +106,12 @@ class VictoryErrorBar extends React.Component {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
const children = this.renderData(props);
|
|
109
|
+
const container = React.cloneElement(
|
|
110
|
+
props.containerComponent,
|
|
111
|
+
UserProps.getSafeUserProps(props)
|
|
112
|
+
);
|
|
108
113
|
return props.standalone
|
|
109
|
-
? this.renderContainer(
|
|
114
|
+
? this.renderContainer(container, children)
|
|
110
115
|
: children;
|
|
111
116
|
}
|
|
112
117
|
}
|