victory-errorbar 37.0.1-next.2 → 37.0.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/error-bar.d.ts CHANGED
@@ -1,32 +1,32 @@
1
- import React from "react";
2
- import { VictoryCommonPrimitiveProps } from "victory-core";
3
- export interface ErrorBarProps extends VictoryCommonPrimitiveProps {
4
- borderWidth?: number;
5
- datum?: any;
6
- errorX?: number | any[] | boolean;
7
- errorY?: number | any[] | boolean;
8
- groupComponent?: React.ReactElement;
9
- lineComponent?: React.ReactElement;
10
- x?: number;
11
- y?: number;
12
- }
13
- export interface ErrorProps {
14
- right?: {
15
- error: any;
16
- errorIndex: number;
17
- };
18
- left?: {
19
- error: any;
20
- errorIndex: number;
21
- };
22
- bottom?: {
23
- error: any;
24
- errorIndex: number;
25
- };
26
- top?: {
27
- error: any;
28
- errorIndex: number;
29
- };
30
- }
31
- export declare const ErrorBar: any;
1
+ import React from "react";
2
+ import { VictoryCommonPrimitiveProps } from "victory-core";
3
+ export interface ErrorBarProps extends VictoryCommonPrimitiveProps {
4
+ borderWidth?: number;
5
+ datum?: any;
6
+ errorX?: number | any[] | boolean;
7
+ errorY?: number | any[] | boolean;
8
+ groupComponent?: React.ReactElement;
9
+ lineComponent?: React.ReactElement;
10
+ x?: number;
11
+ y?: number;
12
+ }
13
+ export interface ErrorProps {
14
+ right?: {
15
+ error: any;
16
+ errorIndex: number;
17
+ };
18
+ left?: {
19
+ error: any;
20
+ errorIndex: number;
21
+ };
22
+ bottom?: {
23
+ error: any;
24
+ errorIndex: number;
25
+ };
26
+ top?: {
27
+ error: any;
28
+ errorIndex: number;
29
+ };
30
+ }
31
+ export declare const ErrorBar: any;
32
32
  //# sourceMappingURL=error-bar.d.ts.map
package/es/error-bar.js CHANGED
@@ -1,3 +1,4 @@
1
+ import _defaults from "lodash/defaults";
1
2
  /* eslint-disable max-statements */
2
3
  import React from "react";
3
4
  import { Helpers, Line, UserProps } from "victory-core";
@@ -104,10 +105,7 @@ const defaultProps = {
104
105
  shapeRendering: "auto"
105
106
  };
106
107
  export const ErrorBar = initialProps => {
107
- const props = evaluateProps({
108
- ...defaultProps,
109
- ...initialProps
110
- });
108
+ const props = evaluateProps(_defaults({}, initialProps, defaultProps));
111
109
  const {
112
110
  groupComponent
113
111
  } = props;
@@ -1,4 +1,4 @@
1
- export declare const getData: (props: any) => any;
2
- export declare const getDomain: (props: any, axis: any) => any;
3
- export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
1
+ export declare const getData: (props: any) => any;
2
+ export declare const getDomain: (props: any, axis: any) => any;
3
+ export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
4
4
  //# sourceMappingURL=helper-methods.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./victory-errorbar";
2
- export * from "./error-bar";
1
+ export * from "./victory-errorbar";
2
+ export * from "./error-bar";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,86 +1,86 @@
1
- import React from "react";
2
- import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
3
- export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
4
- export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
5
- export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
6
- borderWidth?: number;
7
- errorX?: ErrorType;
8
- errorY?: ErrorType;
9
- events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
10
- style?: VictoryStyleInterface;
11
- }
12
- interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
13
- }
14
- declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
15
- static animationWhitelist: string[];
16
- static displayName: string;
17
- static role: string;
18
- static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
19
- static defaultProps: VictoryErrorBarProps;
20
- static getDomain(props: any, axis: any): any;
21
- static getData(props: any): any;
22
- static getBaseProps(props: any): any;
23
- static expectedComponents: string[];
24
- shouldAnimate(): boolean;
25
- render(): React.ReactElement;
26
- }
27
- export declare const VictoryErrorBar: {
28
- new (props: import("victory-core").EventMixinCommonProps): {
29
- state: {};
30
- getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
31
- getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
32
- getEvents: (p: any, target: any, eventKey: any) => any;
33
- externalMutations: {} | undefined;
34
- calculatedState: {};
35
- globalEvents: {};
36
- prevGlobalEventKeys: string[];
37
- boundGlobalEvents: {};
38
- shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
39
- componentDidMount(): void;
40
- componentDidUpdate(prevProps: any): void;
41
- componentWillUnmount(): void;
42
- addGlobalListener(key: any): void;
43
- removeGlobalListener(key: any): void;
44
- getStateChanges(props: any): {};
45
- applyExternalMutations(props: any, externalMutations: any): void;
46
- getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
47
- getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
48
- cacheValues(obj: any): void;
49
- getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
50
- getAllEvents(props: any): any;
51
- getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
52
- renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
53
- animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
54
- renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
55
- renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
56
- context: unknown;
57
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
58
- forceUpdate(callback?: (() => void) | undefined): void;
59
- render(): React.ReactNode;
60
- readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
61
- refs: {
62
- [key: string]: React.ReactInstance;
63
- };
64
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
65
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
66
- componentWillMount?(): void;
67
- UNSAFE_componentWillMount?(): void;
68
- componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
69
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
70
- componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
71
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
72
- componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
73
- getSharedEventState: (key: string, value: string) => unknown;
74
- baseProps: Record<string, object>;
75
- dataKeys: string[];
76
- hasEvents: unknown;
77
- events: unknown;
78
- };
79
- getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
80
- role?: string | undefined;
81
- expectedComponents?: string[] | undefined;
82
- getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
83
- animationWhitelist?: string[] | undefined;
84
- } & typeof VictoryErrorBarBase;
85
- export {};
1
+ import React from "react";
2
+ import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
3
+ export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
4
+ export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
5
+ export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
6
+ borderWidth?: number;
7
+ errorX?: ErrorType;
8
+ errorY?: ErrorType;
9
+ events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
10
+ style?: VictoryStyleInterface;
11
+ }
12
+ interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
13
+ }
14
+ declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
15
+ static animationWhitelist: string[];
16
+ static displayName: string;
17
+ static role: string;
18
+ static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
19
+ static defaultProps: VictoryErrorBarProps;
20
+ static getDomain(props: any, axis: any): any;
21
+ static getData(props: any): any;
22
+ static getBaseProps(props: any): any;
23
+ static expectedComponents: string[];
24
+ shouldAnimate(): boolean;
25
+ render(): React.ReactElement;
26
+ }
27
+ export declare const VictoryErrorBar: {
28
+ new (props: import("victory-core").EventMixinCommonProps): {
29
+ state: {};
30
+ getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
31
+ getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
32
+ getEvents: (p: any, target: any, eventKey: any) => any;
33
+ externalMutations: {} | undefined;
34
+ calculatedState: {};
35
+ globalEvents: {};
36
+ prevGlobalEventKeys: string[];
37
+ boundGlobalEvents: {};
38
+ shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
39
+ componentDidMount(): void;
40
+ componentDidUpdate(prevProps: any): void;
41
+ componentWillUnmount(): void;
42
+ addGlobalListener(key: any): void;
43
+ removeGlobalListener(key: any): void;
44
+ getStateChanges(props: any): {};
45
+ applyExternalMutations(props: any, externalMutations: any): void;
46
+ getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
47
+ getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
48
+ cacheValues(obj: any): void;
49
+ getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
50
+ getAllEvents(props: any): any;
51
+ getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
52
+ renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
53
+ animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
54
+ renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
55
+ renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
56
+ context: unknown;
57
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
58
+ forceUpdate(callback?: (() => void) | undefined): void;
59
+ render(): React.ReactNode;
60
+ readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
61
+ refs: {
62
+ [key: string]: React.ReactInstance;
63
+ };
64
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
65
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
66
+ componentWillMount?(): void;
67
+ UNSAFE_componentWillMount?(): void;
68
+ componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
69
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
70
+ componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
71
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
72
+ componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
73
+ getSharedEventState: (key: string, value: string) => unknown;
74
+ baseProps: Record<string, object>;
75
+ dataKeys: string[];
76
+ hasEvents: unknown;
77
+ events: unknown;
78
+ };
79
+ getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
80
+ role?: string | undefined;
81
+ expectedComponents?: string[] | undefined;
82
+ getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
83
+ animationWhitelist?: string[] | undefined;
84
+ } & typeof VictoryErrorBarBase;
85
+ export {};
86
86
  //# sourceMappingURL=victory-errorbar.d.ts.map
@@ -1,32 +1,32 @@
1
- import React from "react";
2
- import { VictoryCommonPrimitiveProps } from "victory-core";
3
- export interface ErrorBarProps extends VictoryCommonPrimitiveProps {
4
- borderWidth?: number;
5
- datum?: any;
6
- errorX?: number | any[] | boolean;
7
- errorY?: number | any[] | boolean;
8
- groupComponent?: React.ReactElement;
9
- lineComponent?: React.ReactElement;
10
- x?: number;
11
- y?: number;
12
- }
13
- export interface ErrorProps {
14
- right?: {
15
- error: any;
16
- errorIndex: number;
17
- };
18
- left?: {
19
- error: any;
20
- errorIndex: number;
21
- };
22
- bottom?: {
23
- error: any;
24
- errorIndex: number;
25
- };
26
- top?: {
27
- error: any;
28
- errorIndex: number;
29
- };
30
- }
31
- export declare const ErrorBar: any;
1
+ import React from "react";
2
+ import { VictoryCommonPrimitiveProps } from "victory-core";
3
+ export interface ErrorBarProps extends VictoryCommonPrimitiveProps {
4
+ borderWidth?: number;
5
+ datum?: any;
6
+ errorX?: number | any[] | boolean;
7
+ errorY?: number | any[] | boolean;
8
+ groupComponent?: React.ReactElement;
9
+ lineComponent?: React.ReactElement;
10
+ x?: number;
11
+ y?: number;
12
+ }
13
+ export interface ErrorProps {
14
+ right?: {
15
+ error: any;
16
+ errorIndex: number;
17
+ };
18
+ left?: {
19
+ error: any;
20
+ errorIndex: number;
21
+ };
22
+ bottom?: {
23
+ error: any;
24
+ errorIndex: number;
25
+ };
26
+ top?: {
27
+ error: any;
28
+ errorIndex: number;
29
+ };
30
+ }
31
+ export declare const ErrorBar: any;
32
32
  //# sourceMappingURL=error-bar.d.ts.map
package/lib/error-bar.js CHANGED
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ErrorBar = void 0;
7
+ var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
7
8
  var _react = _interopRequireDefault(require("react"));
8
9
  var _victoryCore = require("victory-core");
9
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -112,10 +113,7 @@ const defaultProps = {
112
113
  shapeRendering: "auto"
113
114
  };
114
115
  const ErrorBar = initialProps => {
115
- const props = evaluateProps({
116
- ...defaultProps,
117
- ...initialProps
118
- });
116
+ const props = evaluateProps((0, _defaults2.default)({}, initialProps, defaultProps));
119
117
  const {
120
118
  groupComponent
121
119
  } = props;
@@ -1,4 +1,4 @@
1
- export declare const getData: (props: any) => any;
2
- export declare const getDomain: (props: any, axis: any) => any;
3
- export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
1
+ export declare const getData: (props: any) => any;
2
+ export declare const getDomain: (props: any, axis: any) => any;
3
+ export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
4
4
  //# sourceMappingURL=helper-methods.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./victory-errorbar";
2
- export * from "./error-bar";
1
+ export * from "./victory-errorbar";
2
+ export * from "./error-bar";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,86 +1,86 @@
1
- import React from "react";
2
- import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
3
- export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
4
- export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
5
- export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
6
- borderWidth?: number;
7
- errorX?: ErrorType;
8
- errorY?: ErrorType;
9
- events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
10
- style?: VictoryStyleInterface;
11
- }
12
- interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
13
- }
14
- declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
15
- static animationWhitelist: string[];
16
- static displayName: string;
17
- static role: string;
18
- static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
19
- static defaultProps: VictoryErrorBarProps;
20
- static getDomain(props: any, axis: any): any;
21
- static getData(props: any): any;
22
- static getBaseProps(props: any): any;
23
- static expectedComponents: string[];
24
- shouldAnimate(): boolean;
25
- render(): React.ReactElement;
26
- }
27
- export declare const VictoryErrorBar: {
28
- new (props: import("victory-core").EventMixinCommonProps): {
29
- state: {};
30
- getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
31
- getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
32
- getEvents: (p: any, target: any, eventKey: any) => any;
33
- externalMutations: {} | undefined;
34
- calculatedState: {};
35
- globalEvents: {};
36
- prevGlobalEventKeys: string[];
37
- boundGlobalEvents: {};
38
- shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
39
- componentDidMount(): void;
40
- componentDidUpdate(prevProps: any): void;
41
- componentWillUnmount(): void;
42
- addGlobalListener(key: any): void;
43
- removeGlobalListener(key: any): void;
44
- getStateChanges(props: any): {};
45
- applyExternalMutations(props: any, externalMutations: any): void;
46
- getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
47
- getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
48
- cacheValues(obj: any): void;
49
- getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
50
- getAllEvents(props: any): any;
51
- getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
52
- renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
53
- animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
54
- renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
55
- renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
56
- context: unknown;
57
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
58
- forceUpdate(callback?: (() => void) | undefined): void;
59
- render(): React.ReactNode;
60
- readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
61
- refs: {
62
- [key: string]: React.ReactInstance;
63
- };
64
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
65
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
66
- componentWillMount?(): void;
67
- UNSAFE_componentWillMount?(): void;
68
- componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
69
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
70
- componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
71
- UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
72
- componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
73
- getSharedEventState: (key: string, value: string) => unknown;
74
- baseProps: Record<string, object>;
75
- dataKeys: string[];
76
- hasEvents: unknown;
77
- events: unknown;
78
- };
79
- getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
80
- role?: string | undefined;
81
- expectedComponents?: string[] | undefined;
82
- getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
83
- animationWhitelist?: string[] | undefined;
84
- } & typeof VictoryErrorBarBase;
85
- export {};
1
+ import React from "react";
2
+ import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
3
+ export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
4
+ export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
5
+ export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
6
+ borderWidth?: number;
7
+ errorX?: ErrorType;
8
+ errorY?: ErrorType;
9
+ events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
10
+ style?: VictoryStyleInterface;
11
+ }
12
+ interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
13
+ }
14
+ declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
15
+ static animationWhitelist: string[];
16
+ static displayName: string;
17
+ static role: string;
18
+ static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
19
+ static defaultProps: VictoryErrorBarProps;
20
+ static getDomain(props: any, axis: any): any;
21
+ static getData(props: any): any;
22
+ static getBaseProps(props: any): any;
23
+ static expectedComponents: string[];
24
+ shouldAnimate(): boolean;
25
+ render(): React.ReactElement;
26
+ }
27
+ export declare const VictoryErrorBar: {
28
+ new (props: import("victory-core").EventMixinCommonProps): {
29
+ state: {};
30
+ getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
31
+ getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
32
+ getEvents: (p: any, target: any, eventKey: any) => any;
33
+ externalMutations: {} | undefined;
34
+ calculatedState: {};
35
+ globalEvents: {};
36
+ prevGlobalEventKeys: string[];
37
+ boundGlobalEvents: {};
38
+ shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
39
+ componentDidMount(): void;
40
+ componentDidUpdate(prevProps: any): void;
41
+ componentWillUnmount(): void;
42
+ addGlobalListener(key: any): void;
43
+ removeGlobalListener(key: any): void;
44
+ getStateChanges(props: any): {};
45
+ applyExternalMutations(props: any, externalMutations: any): void;
46
+ getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
47
+ getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
48
+ cacheValues(obj: any): void;
49
+ getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
50
+ getAllEvents(props: any): any;
51
+ getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
52
+ renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
53
+ animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
54
+ renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
55
+ renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
56
+ context: unknown;
57
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
58
+ forceUpdate(callback?: (() => void) | undefined): void;
59
+ render(): React.ReactNode;
60
+ readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
61
+ refs: {
62
+ [key: string]: React.ReactInstance;
63
+ };
64
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
65
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
66
+ componentWillMount?(): void;
67
+ UNSAFE_componentWillMount?(): void;
68
+ componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
69
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
70
+ componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
71
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
72
+ componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
73
+ getSharedEventState: (key: string, value: string) => unknown;
74
+ baseProps: Record<string, object>;
75
+ dataKeys: string[];
76
+ hasEvents: unknown;
77
+ events: unknown;
78
+ };
79
+ getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
80
+ role?: string | undefined;
81
+ expectedComponents?: string[] | undefined;
82
+ getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
83
+ animationWhitelist?: string[] | undefined;
84
+ } & typeof VictoryErrorBarBase;
85
+ export {};
86
86
  //# sourceMappingURL=victory-errorbar.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-errorbar",
3
- "version": "37.0.1-next.2",
3
+ "version": "37.0.2",
4
4
  "description": "Error Bar Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -21,14 +21,17 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
- "victory-core": "^37.0.1-next.2"
24
+ "victory-core": "^37.0.2"
25
25
  },
26
26
  "devDependencies": {
27
- "victory-vendor": "37.0.1-next.2"
27
+ "victory-vendor": "*"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=16.6.0"
31
31
  },
32
+ "publishConfig": {
33
+ "provenance": true
34
+ },
32
35
  "wireit": {
33
36
  "### THESE WIREIT CONFIGS ARE GENERATED ####": {},
34
37
  "### DO NOT MODIFY THESE MANUALLY ####": {},
package/src/error-bar.tsx CHANGED
@@ -1,5 +1,7 @@
1
1
  /* eslint-disable max-statements */
2
2
  import React from "react";
3
+ import { defaults } from "lodash";
4
+
3
5
  import {
4
6
  Helpers,
5
7
  Line,
@@ -116,7 +118,7 @@ const defaultProps = {
116
118
  export const ErrorBar = (
117
119
  initialProps: ErrorBarProps & typeof ErrorBar.default,
118
120
  ) => {
119
- const props = evaluateProps({ ...defaultProps, ...initialProps });
121
+ const props = evaluateProps(defaults({}, initialProps, defaultProps));
120
122
  const { groupComponent } = props;
121
123
  const userProps = UserProps.getSafeUserProps(props);
122
124
  const { tabIndex, ariaLabel } = props;