victory-chart 36.3.0 → 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/es/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export interface VictoryChartProps extends VictoryCommonProps {
18
18
  backgroundComponent?: React.ReactElement;
19
19
  categories?: CategoryPropType;
20
20
  children?: React.ReactNode | React.ReactNode[];
21
+ desc?: string;
21
22
  defaultAxes?: AxesType;
22
23
  defaultPolarAxes?: AxesType;
23
24
  domain?: DomainPropType;
@@ -33,6 +34,7 @@ export interface VictoryChartProps extends VictoryCommonProps {
33
34
  style?: Pick<VictoryStyleInterface, "parent"> & {
34
35
  background?: VictoryStyleObject;
35
36
  };
37
+ title?: string;
36
38
  }
37
39
 
38
40
  export class VictoryChart extends React.Component<VictoryChartProps, any> {}
@@ -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, Hooks } from "victory-core";
11
+ import { Background, CommonProps, Helpers, Hooks, PropTypes as CustomPropTypes, UserProps, VictoryContainer, VictoryTheme, Wrapper } 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";
@@ -92,13 +92,13 @@ var VictoryChart = function (initialProps) {
92
92
  }, [domain, scale, width, height, standalone, theme, style, horizontal, name, polar, radius, origin]);
93
93
  var container = React.useMemo(function () {
94
94
  if (standalone) {
95
- var defaultContainerProps = _defaults({}, containerComponent.props, containerProps);
95
+ var defaultContainerProps = _defaults({}, containerComponent.props, containerProps, UserProps.getSafeUserProps(initialProps));
96
96
 
97
97
  return React.cloneElement(containerComponent, defaultContainerProps);
98
98
  }
99
99
 
100
100
  return groupComponent;
101
- }, [groupComponent, standalone, containerComponent, containerProps]);
101
+ }, [groupComponent, standalone, containerComponent, containerProps, initialProps]);
102
102
  var events = React.useMemo(function () {
103
103
  return Wrapper.getAllEvents(props);
104
104
  }, [props]);
package/lib/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export interface VictoryChartProps extends VictoryCommonProps {
18
18
  backgroundComponent?: React.ReactElement;
19
19
  categories?: CategoryPropType;
20
20
  children?: React.ReactNode | React.ReactNode[];
21
+ desc?: string;
21
22
  defaultAxes?: AxesType;
22
23
  defaultPolarAxes?: AxesType;
23
24
  domain?: DomainPropType;
@@ -33,6 +34,7 @@ export interface VictoryChartProps extends VictoryCommonProps {
33
34
  style?: Pick<VictoryStyleInterface, "parent"> & {
34
35
  background?: VictoryStyleObject;
35
36
  };
37
+ title?: string;
36
38
  }
37
39
 
38
40
  export class VictoryChart extends React.Component<VictoryChartProps, any> {}
@@ -118,12 +118,12 @@ var VictoryChart = function (initialProps) {
118
118
 
119
119
  var container = _react.default.useMemo(function () {
120
120
  if (standalone) {
121
- var defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps);
121
+ var defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps, _victoryCore.UserProps.getSafeUserProps(initialProps));
122
122
  return _react.default.cloneElement(containerComponent, defaultContainerProps);
123
123
  }
124
124
 
125
125
  return groupComponent;
126
- }, [groupComponent, standalone, containerComponent, containerProps]);
126
+ }, [groupComponent, standalone, containerComponent, containerProps, initialProps]);
127
127
 
128
128
  var events = _react.default.useMemo(function () {
129
129
  return _victoryCore.Wrapper.getAllEvents(props);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-chart",
3
- "version": "36.3.0",
3
+ "version": "36.3.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.3.0",
26
- "victory-core": "^36.3.0",
27
- "victory-polar-axis": "^36.3.0",
28
- "victory-shared-events": "^36.3.0"
25
+ "victory-axis": "^36.3.2",
26
+ "victory-core": "^36.3.2",
27
+ "victory-polar-axis": "^36.3.2",
28
+ "victory-shared-events": "^36.3.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": "ebafd849d2ded3f1d2aabf0d6e64dcbd48e4c9d6"
37
+ "gitHead": "18895d1290245732d14332bbbda10336032c9aab"
38
38
  }
package/src/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export interface VictoryChartProps extends VictoryCommonProps {
18
18
  backgroundComponent?: React.ReactElement;
19
19
  categories?: CategoryPropType;
20
20
  children?: React.ReactNode | React.ReactNode[];
21
+ desc?: string;
21
22
  defaultAxes?: AxesType;
22
23
  defaultPolarAxes?: AxesType;
23
24
  domain?: DomainPropType;
@@ -33,6 +34,7 @@ export interface VictoryChartProps extends VictoryCommonProps {
33
34
  style?: Pick<VictoryStyleInterface, "parent"> & {
34
35
  background?: VictoryStyleObject;
35
36
  };
37
+ title?: string;
36
38
  }
37
39
 
38
40
  export class VictoryChart extends React.Component<VictoryChartProps, any> {}
@@ -3,13 +3,14 @@ import PropTypes from "prop-types";
3
3
  import React from "react";
4
4
  import {
5
5
  Background,
6
+ CommonProps,
6
7
  Helpers,
8
+ Hooks,
9
+ PropTypes as CustomPropTypes,
10
+ UserProps,
7
11
  VictoryContainer,
8
12
  VictoryTheme,
9
- CommonProps,
10
- PropTypes as CustomPropTypes,
11
- Wrapper,
12
- Hooks
13
+ Wrapper
13
14
  } from "victory-core";
14
15
  import { VictorySharedEvents } from "victory-shared-events";
15
16
  import { VictoryAxis } from "victory-axis";
@@ -124,12 +125,19 @@ const VictoryChart = (initialProps) => {
124
125
  const defaultContainerProps = defaults(
125
126
  {},
126
127
  containerComponent.props,
127
- containerProps
128
+ containerProps,
129
+ UserProps.getSafeUserProps(initialProps)
128
130
  );
129
131
  return React.cloneElement(containerComponent, defaultContainerProps);
130
132
  }
131
133
  return groupComponent;
132
- }, [groupComponent, standalone, containerComponent, containerProps]);
134
+ }, [
135
+ groupComponent,
136
+ standalone,
137
+ containerComponent,
138
+ containerProps,
139
+ initialProps
140
+ ]);
133
141
 
134
142
  const events = React.useMemo(() => {
135
143
  return Wrapper.getAllEvents(props);