victory-stack 37.0.1 → 37.0.3-next.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.
@@ -1,53 +1,53 @@
1
- export declare function getCalculatedProps(initialProps: any, childComponents: any): {
2
- datasets: any;
3
- categories: any;
4
- range: any;
5
- domain: {
6
- x: any;
7
- y: any;
8
- };
9
- horizontal: any;
10
- scale: {
11
- x: import("victory-core").D3Scale<any>;
12
- y: import("victory-core").D3Scale<any>;
13
- };
14
- style: any;
15
- colorScale: any;
16
- role: string;
17
- };
18
- export declare function useMemoizedProps(initialProps: any): {
19
- datasets: any;
20
- categories: any;
21
- range: any;
22
- domain: {
23
- x: any;
24
- y: any;
25
- };
26
- horizontal: any;
27
- scale: {
28
- x: import("victory-core").D3Scale<any>;
29
- y: import("victory-core").D3Scale<any>;
30
- };
31
- style: any;
32
- colorScale: any;
33
- role: string;
34
- };
35
- export declare function getChildProps(props: any, calculatedProps: any): {
36
- height: any;
37
- width: any;
38
- padding: {
39
- top: any;
40
- bottom: any;
41
- left: any;
42
- right: any;
43
- };
44
- standalone: boolean;
45
- theme: any;
46
- categories: any;
47
- domain: any;
48
- range: any;
49
- scale: any;
50
- horizontal: any;
51
- };
52
- export declare function getChildren(initialProps: any, childComponents: any, calculatedProps: any): any;
1
+ export declare function getCalculatedProps(initialProps: any, childComponents: any): {
2
+ datasets: any;
3
+ categories: any;
4
+ range: any;
5
+ domain: {
6
+ x: any;
7
+ y: any;
8
+ };
9
+ horizontal: any;
10
+ scale: {
11
+ x: import("victory-core").D3Scale<any>;
12
+ y: import("victory-core").D3Scale<any>;
13
+ };
14
+ style: any;
15
+ colorScale: any;
16
+ role: string;
17
+ };
18
+ export declare function useMemoizedProps(initialProps: any): {
19
+ datasets: any;
20
+ categories: any;
21
+ range: any;
22
+ domain: {
23
+ x: any;
24
+ y: any;
25
+ };
26
+ horizontal: any;
27
+ scale: {
28
+ x: import("victory-core").D3Scale<any>;
29
+ y: import("victory-core").D3Scale<any>;
30
+ };
31
+ style: any;
32
+ colorScale: any;
33
+ role: string;
34
+ };
35
+ export declare function getChildProps(props: any, calculatedProps: any): {
36
+ height: any;
37
+ width: any;
38
+ padding: {
39
+ top: any;
40
+ bottom: any;
41
+ left: any;
42
+ right: any;
43
+ };
44
+ standalone: boolean;
45
+ theme: any;
46
+ categories: any;
47
+ domain: any;
48
+ range: any;
49
+ scale: any;
50
+ horizontal: any;
51
+ };
52
+ export declare function getChildren(initialProps: any, childComponents: any, calculatedProps: any): any;
53
53
  //# sourceMappingURL=helper-methods.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./victory-stack";
1
+ export * from "./victory-stack";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,19 +1,19 @@
1
- import React from "react";
2
- import { CategoryPropType, ColorScalePropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
- export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
4
- export interface VictoryStackProps extends VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps {
5
- bins?: number | number[] | Date[];
6
- categories?: CategoryPropType;
7
- children?: React.ReactNode | React.ReactNode[];
8
- colorScale?: ColorScalePropType;
9
- domain?: DomainPropType;
10
- events?: EventPropTypeInterface<VictoryStackTTargetType, StringOrNumberOrCallback>[];
11
- eventKey?: StringOrNumberOrCallback;
12
- fillInMissingData?: boolean;
13
- style?: VictoryStyleInterface;
14
- xOffset?: number;
15
- }
16
- export declare const VictoryStack: React.NamedExoticComponent<VictoryStackProps> & {
17
- readonly type: (initialProps: VictoryStackProps) => JSX.Element;
18
- } & VictoryComponentConfiguration<VictoryStackProps>;
1
+ import React from "react";
2
+ import { CategoryPropType, ColorScalePropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
+ export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
4
+ export interface VictoryStackProps extends VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps {
5
+ bins?: number | number[] | Date[];
6
+ categories?: CategoryPropType;
7
+ children?: React.ReactNode | React.ReactNode[];
8
+ colorScale?: ColorScalePropType;
9
+ domain?: DomainPropType;
10
+ events?: EventPropTypeInterface<VictoryStackTTargetType, StringOrNumberOrCallback>[];
11
+ eventKey?: StringOrNumberOrCallback;
12
+ fillInMissingData?: boolean;
13
+ style?: VictoryStyleInterface;
14
+ xOffset?: number;
15
+ }
16
+ export declare const VictoryStack: React.NamedExoticComponent<VictoryStackProps> & {
17
+ readonly type: (initialProps: VictoryStackProps) => JSX.Element;
18
+ } & VictoryComponentConfiguration<VictoryStackProps>;
19
19
  //# sourceMappingURL=victory-stack.d.ts.map
@@ -21,10 +21,7 @@ const VictoryStackBase = initialProps => {
21
21
  const {
22
22
  role
23
23
  } = VictoryStack;
24
- const propsWithDefaults = React.useMemo(() => ({
25
- ...defaultProps,
26
- ...initialProps
27
- }), [initialProps]);
24
+ const propsWithDefaults = React.useMemo(() => _defaults({}, initialProps, defaultProps), [initialProps]);
28
25
  const {
29
26
  setAnimationState,
30
27
  getAnimationProps,
@@ -1,53 +1,53 @@
1
- export declare function getCalculatedProps(initialProps: any, childComponents: any): {
2
- datasets: any;
3
- categories: any;
4
- range: any;
5
- domain: {
6
- x: any;
7
- y: any;
8
- };
9
- horizontal: any;
10
- scale: {
11
- x: import("victory-core").D3Scale<any>;
12
- y: import("victory-core").D3Scale<any>;
13
- };
14
- style: any;
15
- colorScale: any;
16
- role: string;
17
- };
18
- export declare function useMemoizedProps(initialProps: any): {
19
- datasets: any;
20
- categories: any;
21
- range: any;
22
- domain: {
23
- x: any;
24
- y: any;
25
- };
26
- horizontal: any;
27
- scale: {
28
- x: import("victory-core").D3Scale<any>;
29
- y: import("victory-core").D3Scale<any>;
30
- };
31
- style: any;
32
- colorScale: any;
33
- role: string;
34
- };
35
- export declare function getChildProps(props: any, calculatedProps: any): {
36
- height: any;
37
- width: any;
38
- padding: {
39
- top: any;
40
- bottom: any;
41
- left: any;
42
- right: any;
43
- };
44
- standalone: boolean;
45
- theme: any;
46
- categories: any;
47
- domain: any;
48
- range: any;
49
- scale: any;
50
- horizontal: any;
51
- };
52
- export declare function getChildren(initialProps: any, childComponents: any, calculatedProps: any): any;
1
+ export declare function getCalculatedProps(initialProps: any, childComponents: any): {
2
+ datasets: any;
3
+ categories: any;
4
+ range: any;
5
+ domain: {
6
+ x: any;
7
+ y: any;
8
+ };
9
+ horizontal: any;
10
+ scale: {
11
+ x: import("victory-core").D3Scale<any>;
12
+ y: import("victory-core").D3Scale<any>;
13
+ };
14
+ style: any;
15
+ colorScale: any;
16
+ role: string;
17
+ };
18
+ export declare function useMemoizedProps(initialProps: any): {
19
+ datasets: any;
20
+ categories: any;
21
+ range: any;
22
+ domain: {
23
+ x: any;
24
+ y: any;
25
+ };
26
+ horizontal: any;
27
+ scale: {
28
+ x: import("victory-core").D3Scale<any>;
29
+ y: import("victory-core").D3Scale<any>;
30
+ };
31
+ style: any;
32
+ colorScale: any;
33
+ role: string;
34
+ };
35
+ export declare function getChildProps(props: any, calculatedProps: any): {
36
+ height: any;
37
+ width: any;
38
+ padding: {
39
+ top: any;
40
+ bottom: any;
41
+ left: any;
42
+ right: any;
43
+ };
44
+ standalone: boolean;
45
+ theme: any;
46
+ categories: any;
47
+ domain: any;
48
+ range: any;
49
+ scale: any;
50
+ horizontal: any;
51
+ };
52
+ export declare function getChildren(initialProps: any, childComponents: any, calculatedProps: any): any;
53
53
  //# sourceMappingURL=helper-methods.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./victory-stack";
1
+ export * from "./victory-stack";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,19 +1,19 @@
1
- import React from "react";
2
- import { CategoryPropType, ColorScalePropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
- export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
4
- export interface VictoryStackProps extends VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps {
5
- bins?: number | number[] | Date[];
6
- categories?: CategoryPropType;
7
- children?: React.ReactNode | React.ReactNode[];
8
- colorScale?: ColorScalePropType;
9
- domain?: DomainPropType;
10
- events?: EventPropTypeInterface<VictoryStackTTargetType, StringOrNumberOrCallback>[];
11
- eventKey?: StringOrNumberOrCallback;
12
- fillInMissingData?: boolean;
13
- style?: VictoryStyleInterface;
14
- xOffset?: number;
15
- }
16
- export declare const VictoryStack: React.NamedExoticComponent<VictoryStackProps> & {
17
- readonly type: (initialProps: VictoryStackProps) => JSX.Element;
18
- } & VictoryComponentConfiguration<VictoryStackProps>;
1
+ import React from "react";
2
+ import { CategoryPropType, ColorScalePropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
3
+ export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
4
+ export interface VictoryStackProps extends VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps {
5
+ bins?: number | number[] | Date[];
6
+ categories?: CategoryPropType;
7
+ children?: React.ReactNode | React.ReactNode[];
8
+ colorScale?: ColorScalePropType;
9
+ domain?: DomainPropType;
10
+ events?: EventPropTypeInterface<VictoryStackTTargetType, StringOrNumberOrCallback>[];
11
+ eventKey?: StringOrNumberOrCallback;
12
+ fillInMissingData?: boolean;
13
+ style?: VictoryStyleInterface;
14
+ xOffset?: number;
15
+ }
16
+ export declare const VictoryStack: React.NamedExoticComponent<VictoryStackProps> & {
17
+ readonly type: (initialProps: VictoryStackProps) => JSX.Element;
18
+ } & VictoryComponentConfiguration<VictoryStackProps>;
19
19
  //# sourceMappingURL=victory-stack.d.ts.map
@@ -28,10 +28,7 @@ const VictoryStackBase = initialProps => {
28
28
  const {
29
29
  role
30
30
  } = VictoryStack;
31
- const propsWithDefaults = _react.default.useMemo(() => ({
32
- ...defaultProps,
33
- ...initialProps
34
- }), [initialProps]);
31
+ const propsWithDefaults = _react.default.useMemo(() => (0, _defaults2.default)({}, initialProps, defaultProps), [initialProps]);
35
32
  const {
36
33
  setAnimationState,
37
34
  getAnimationProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-stack",
3
- "version": "37.0.1",
3
+ "version": "37.0.3-next.0",
4
4
  "description": "Stack Layout Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,18 +22,15 @@
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
24
  "react-fast-compare": "^3.2.0",
25
- "victory-core": "^37.0.1",
26
- "victory-shared-events": "^37.0.1"
25
+ "victory-core": "^37.0.3-next.0",
26
+ "victory-shared-events": "^37.0.3-next.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": ">=16.6.0"
30
30
  },
31
31
  "devDependencies": {
32
- "victory-bar": "*",
33
- "victory-histogram": "*"
34
- },
35
- "publishConfig": {
36
- "provenance": true
32
+ "victory-bar": "37.0.3-next.0",
33
+ "victory-histogram": "37.0.3-next.0"
37
34
  },
38
35
  "wireit": {
39
36
  "### THESE WIREIT CONFIGS ARE GENERATED ####": {},
@@ -60,7 +60,7 @@ const defaultProps = {
60
60
  const VictoryStackBase = (initialProps: VictoryStackProps) => {
61
61
  const { role } = VictoryStack;
62
62
  const propsWithDefaults = React.useMemo(
63
- () => ({ ...defaultProps, ...initialProps }),
63
+ () => defaults({}, initialProps, defaultProps),
64
64
  [initialProps],
65
65
  );
66
66
  const { setAnimationState, getAnimationProps, getProps } =