victory-errorbar 36.9.1 → 36.9.2-next.1
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/CHANGELOG.md +15 -0
- package/dist/victory-errorbar.js +31397 -1245
- package/dist/victory-errorbar.min.js +2 -1
- package/dist/victory-errorbar.min.js.LICENSE.txt +19 -0
- package/es/error-bar.d.ts +31 -31
- package/es/helper-methods.d.ts +3 -3
- package/es/helper-methods.js +1 -2
- package/es/index.d.ts +2 -2
- package/es/victory-errorbar.d.ts +85 -85
- package/lib/error-bar.d.ts +31 -31
- package/lib/helper-methods.d.ts +3 -3
- package/lib/helper-methods.js +1 -3
- package/lib/index.d.ts +2 -2
- package/lib/victory-errorbar.d.ts +85 -85
- package/package.json +9 -12
- package/src/helper-methods.tsx +2 -2
- package/LICENSE.txt +0 -30
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-dom.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @license React
|
|
13
|
+
* scheduler.production.min.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
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/helper-methods.d.ts
CHANGED
|
@@ -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/helper-methods.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _isNil from "lodash/isNil";
|
|
2
1
|
import _assign from "lodash/assign";
|
|
3
2
|
import _defaults from "lodash/defaults";
|
|
4
3
|
import { Helpers, LabelHelpers, Scale, Domain, Data, Collection } from "victory-core";
|
|
@@ -196,7 +195,7 @@ export var getBaseProps = function (initialProps, fallbackProps) {
|
|
|
196
195
|
}
|
|
197
196
|
};
|
|
198
197
|
return data.reduce(function (childProps, datum, index) {
|
|
199
|
-
var eventKey = !
|
|
198
|
+
var eventKey = !Helpers.isNil(datum.eventKey) ? datum.eventKey : index;
|
|
200
199
|
|
|
201
200
|
var _Helpers$scalePoint = Helpers.scalePoint(_assign({}, props, {
|
|
202
201
|
scale: scale
|
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
|
package/es/victory-errorbar.d.ts
CHANGED
|
@@ -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/lib/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/lib/helper-methods.d.ts
CHANGED
|
@@ -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/helper-methods.js
CHANGED
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getDomain = exports.getData = exports.getBaseProps = void 0;
|
|
7
7
|
|
|
8
|
-
var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
|
|
9
|
-
|
|
10
8
|
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
11
9
|
|
|
12
10
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
@@ -221,7 +219,7 @@ var getBaseProps = function (initialProps, fallbackProps) {
|
|
|
221
219
|
}
|
|
222
220
|
};
|
|
223
221
|
return data.reduce(function (childProps, datum, index) {
|
|
224
|
-
var eventKey = !
|
|
222
|
+
var eventKey = !_victoryCore.Helpers.isNil(datum.eventKey) ? datum.eventKey : index;
|
|
225
223
|
|
|
226
224
|
var _Helpers$scalePoint = _victoryCore.Helpers.scalePoint((0, _assign2.default)({}, props, {
|
|
227
225
|
scale: scale
|
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": "36.9.1",
|
|
3
|
+
"version": "36.9.2-next.1",
|
|
4
4
|
"description": "Error Bar Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,16 +21,13 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
|
-
"victory-core": "^36.9.1"
|
|
25
|
-
},
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"react": ">=16.6.0"
|
|
24
|
+
"victory-core": "^36.9.2-next.1"
|
|
28
25
|
},
|
|
29
26
|
"devDependencies": {
|
|
30
|
-
"victory-
|
|
27
|
+
"victory-vendor": "36.9.2-next.1"
|
|
31
28
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": ">=16.6.0"
|
|
34
31
|
},
|
|
35
32
|
"wireit": {
|
|
36
33
|
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
|
@@ -244,7 +241,7 @@
|
|
|
244
241
|
]
|
|
245
242
|
},
|
|
246
243
|
"jest": {
|
|
247
|
-
"command": "
|
|
244
|
+
"command": "jest --passWithNoTests",
|
|
248
245
|
"files": [
|
|
249
246
|
"src/**/*.test.*",
|
|
250
247
|
"../../.babelrc.js",
|
|
@@ -253,9 +250,9 @@
|
|
|
253
250
|
],
|
|
254
251
|
"output": [],
|
|
255
252
|
"dependencies": [
|
|
256
|
-
"build
|
|
257
|
-
"../victory-vendor:build
|
|
258
|
-
"../victory-voronoi:build
|
|
253
|
+
"../victory-core:build",
|
|
254
|
+
"../victory-vendor:build",
|
|
255
|
+
"../victory-voronoi:build"
|
|
259
256
|
],
|
|
260
257
|
"packageLocks": [
|
|
261
258
|
"pnpm-lock.yaml"
|
package/src/helper-methods.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaults, assign
|
|
1
|
+
import { defaults, assign } from "lodash";
|
|
2
2
|
import {
|
|
3
3
|
Helpers,
|
|
4
4
|
LabelHelpers,
|
|
@@ -216,7 +216,7 @@ export const getBaseProps = (initialProps, fallbackProps) => {
|
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
return data.reduce((childProps, datum, index) => {
|
|
219
|
-
const eventKey = !isNil(datum.eventKey) ? datum.eventKey : index;
|
|
219
|
+
const eventKey = !Helpers.isNil(datum.eventKey) ? datum.eventKey : index;
|
|
220
220
|
const { x, y } = Helpers.scalePoint(assign({}, props, { scale }), datum);
|
|
221
221
|
const formattedDatum = formatDataFromDomain(datum, domain);
|
|
222
222
|
const errorX = getErrors(props, formattedDatum, "x");
|