victory-histogram 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-histogram.js +140 -34
- package/dist/victory-histogram.min.js +1 -1
- package/es/victory-histogram.js +3 -2
- package/lib/victory-histogram.js +4 -1
- package/package.json +5 -4
- package/src/victory-histogram.js +9 -2
package/es/victory-histogram.js
CHANGED
|
@@ -17,7 +17,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { Bar } from "victory-bar";
|
|
20
|
-
import { Helpers, VictoryLabel, VictoryContainer, VictoryTheme, CommonProps, addEvents, PropTypes as CustomPropTypes } from "victory-core";
|
|
20
|
+
import { Helpers, VictoryLabel, VictoryContainer, VictoryTheme, CommonProps, addEvents, PropTypes as CustomPropTypes, UserProps } from "victory-core";
|
|
21
21
|
import { getBaseProps, getData, getDomain, getFormattedData } from "./helper-methods";
|
|
22
22
|
var fallbackProps = {
|
|
23
23
|
width: 450,
|
|
@@ -54,7 +54,8 @@ function (_React$Component) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
var children = this.renderData(props);
|
|
57
|
-
|
|
57
|
+
var container = React.cloneElement(props.containerComponent, UserProps.getSafeUserProps(this.props));
|
|
58
|
+
return props.standalone ? this.renderContainer(container, children) : children;
|
|
58
59
|
}
|
|
59
60
|
}]);
|
|
60
61
|
|
package/lib/victory-histogram.js
CHANGED
|
@@ -70,7 +70,10 @@ function (_React$Component) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
var children = this.renderData(props);
|
|
73
|
-
|
|
73
|
+
|
|
74
|
+
var container = _react.default.cloneElement(props.containerComponent, _victoryCore.UserProps.getSafeUserProps(this.props));
|
|
75
|
+
|
|
76
|
+
return props.standalone ? this.renderContainer(container, children) : children;
|
|
74
77
|
}
|
|
75
78
|
}]);
|
|
76
79
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-histogram",
|
|
3
|
-
"version": "36.2
|
|
3
|
+
"version": "36.3.2",
|
|
4
4
|
"description": "Histogram Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"lodash": "^4.17.19",
|
|
25
25
|
"prop-types": "^15.5.8",
|
|
26
26
|
"react-fast-compare": "^2.0.0",
|
|
27
|
-
"victory-bar": "^36.2
|
|
28
|
-
"victory-core": "^36.2
|
|
27
|
+
"victory-bar": "^36.3.2",
|
|
28
|
+
"victory-core": "^36.3.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^16.6.0 || ^17.0.0"
|
|
@@ -33,5 +33,6 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
35
35
|
},
|
|
36
|
-
"sideEffects": false
|
|
36
|
+
"sideEffects": false,
|
|
37
|
+
"gitHead": "18895d1290245732d14332bbbda10336032c9aab"
|
|
37
38
|
}
|
package/src/victory-histogram.js
CHANGED
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
VictoryTheme,
|
|
9
9
|
CommonProps,
|
|
10
10
|
addEvents,
|
|
11
|
-
PropTypes as CustomPropTypes
|
|
11
|
+
PropTypes as CustomPropTypes,
|
|
12
|
+
UserProps
|
|
12
13
|
} from "victory-core";
|
|
13
14
|
import {
|
|
14
15
|
getBaseProps,
|
|
@@ -120,8 +121,14 @@ export class VictoryHistogram extends React.Component {
|
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
const children = this.renderData(props);
|
|
124
|
+
|
|
125
|
+
const container = React.cloneElement(
|
|
126
|
+
props.containerComponent,
|
|
127
|
+
UserProps.getSafeUserProps(this.props)
|
|
128
|
+
);
|
|
129
|
+
|
|
123
130
|
return props.standalone
|
|
124
|
-
? this.renderContainer(
|
|
131
|
+
? this.renderContainer(container, children)
|
|
125
132
|
: children;
|
|
126
133
|
}
|
|
127
134
|
}
|