victory-errorbar 36.8.3 → 36.8.5-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.
- package/CHANGELOG.md +12 -0
- package/dist/victory-errorbar.js +357 -412
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.d.ts +31 -31
- package/es/error-bar.js +2 -4
- package/es/helper-methods.d.ts +3 -3
- package/es/helper-methods.js +2 -4
- package/es/index.d.ts +2 -2
- package/es/victory-errorbar.d.ts +138 -153
- package/lib/error-bar.d.ts +31 -31
- package/lib/error-bar.js +2 -4
- package/lib/helper-methods.d.ts +3 -3
- package/lib/helper-methods.js +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/victory-errorbar.d.ts +138 -153
- package/package.json +4 -4
- package/src/error-bar.tsx +2 -3
- package/src/helper-methods.tsx +6 -2
- package/src/victory-errorbar.tsx +1 -1
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,5 +1,3 @@
|
|
|
1
|
-
import _assign from "lodash/assign";
|
|
2
|
-
|
|
3
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
2
|
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -91,11 +89,11 @@ var evaluateProps = function (props) {
|
|
|
91
89
|
*/
|
|
92
90
|
var ariaLabel = Helpers.evaluateProp(props.ariaLabel, props);
|
|
93
91
|
var id = Helpers.evaluateProp(props.id, props);
|
|
94
|
-
var style = Helpers.evaluateStyle(
|
|
92
|
+
var style = Helpers.evaluateStyle(Object.assign({
|
|
95
93
|
stroke: "black"
|
|
96
94
|
}, props.style), props);
|
|
97
95
|
var tabIndex = Helpers.evaluateProp(props.tabIndex, props);
|
|
98
|
-
return
|
|
96
|
+
return Object.assign({}, props, {
|
|
99
97
|
ariaLabel: ariaLabel,
|
|
100
98
|
id: id,
|
|
101
99
|
style: style,
|
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
|
@@ -158,9 +158,7 @@ var getLabelProps = function (dataProps, text, style) {
|
|
|
158
158
|
|
|
159
159
|
export var getBaseProps = function (initialProps, fallbackProps) {
|
|
160
160
|
var modifiedProps = Helpers.modifyProps(initialProps, fallbackProps, "errorbar");
|
|
161
|
-
|
|
162
|
-
var props = _assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
163
|
-
|
|
161
|
+
var props = Object.assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
164
162
|
var borderWidth = props.borderWidth,
|
|
165
163
|
data = props.data,
|
|
166
164
|
domain = props.domain,
|
|
@@ -230,7 +228,7 @@ export var getBaseProps = function (initialProps, fallbackProps) {
|
|
|
230
228
|
var text = LabelHelpers.getText(props, datum, index);
|
|
231
229
|
|
|
232
230
|
if (text !== undefined && text !== null || labels && (events || sharedEvents)) {
|
|
233
|
-
childProps[eventKey].labels = getLabelProps(
|
|
231
|
+
childProps[eventKey].labels = getLabelProps(Object.assign({}, props, dataProps), text, style);
|
|
234
232
|
}
|
|
235
233
|
|
|
236
234
|
return childProps;
|
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,154 +1,139 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
|
|
4
|
-
export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
|
|
5
|
-
export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
|
|
6
|
-
export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
|
|
7
|
-
borderWidth?: number;
|
|
8
|
-
errorX?: ErrorType;
|
|
9
|
-
errorY?: ErrorType;
|
|
10
|
-
events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
|
|
11
|
-
style?: VictoryStyleInterface;
|
|
12
|
-
}
|
|
13
|
-
interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
|
|
14
|
-
}
|
|
15
|
-
declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
|
|
16
|
-
static animationWhitelist: string[];
|
|
17
|
-
static displayName: string;
|
|
18
|
-
static role: string;
|
|
19
|
-
static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
|
|
20
|
-
static propTypes: {
|
|
21
|
-
borderWidth: PropTypes.Requireable<number>;
|
|
22
|
-
errorX: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
23
|
-
errorY: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
24
|
-
horizontal: PropTypes.Requireable<boolean>;
|
|
25
|
-
categories?: React.Validator<import("victory-core").CategoryPropType | null | undefined> | undefined;
|
|
26
|
-
data?: React.Validator<readonly any[] | null | undefined> | undefined;
|
|
27
|
-
dataComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
28
|
-
domain?: React.Validator<import("victory-core").ForAxes<import("victory-core").DomainTuple> | null | undefined> | undefined;
|
|
29
|
-
domainPadding?: React.Validator<import("victory-core").ForAxes<import("victory-core").PaddingType> | null | undefined> | undefined;
|
|
30
|
-
samples?: React.Validator<number | null | undefined> | undefined;
|
|
31
|
-
sortKey?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
32
|
-
sortOrder?: React.Validator<import("victory-core").SortOrderPropType | null | undefined> | undefined;
|
|
33
|
-
x?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
34
|
-
y?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
35
|
-
y0?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
36
|
-
theme?: React.Validator<import("victory-core").VictoryThemeDefinition | null | undefined> | undefined;
|
|
37
|
-
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
38
|
-
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
39
|
-
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
40
|
-
disableInlineStyles?: React.Validator<boolean | null | undefined> | undefined;
|
|
41
|
-
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
42
|
-
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
43
|
-
height?: React.Validator<number | null | undefined> | undefined;
|
|
44
|
-
maxDomain?: React.Validator<number | {
|
|
45
|
-
x?: number | undefined;
|
|
46
|
-
y?: number | undefined;
|
|
47
|
-
} | null | undefined> | undefined;
|
|
48
|
-
minDomain?: React.Validator<number | {
|
|
49
|
-
x?: number | undefined;
|
|
50
|
-
y?: number | undefined;
|
|
51
|
-
} | null | undefined> | undefined;
|
|
52
|
-
name?: React.Validator<string | null | undefined> | undefined;
|
|
53
|
-
origin?: React.Validator<import("victory-core").OriginType | null | undefined> | undefined;
|
|
54
|
-
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
55
|
-
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
56
|
-
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
57
|
-
scale?: React.Validator<import("victory-core").D3Scale<any> | import("victory-core").ScaleName | {
|
|
58
|
-
x?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
|
|
59
|
-
y?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
|
|
60
|
-
} | null | undefined> | undefined;
|
|
61
|
-
sharedEvents?: React.Validator<{
|
|
62
|
-
events: any[];
|
|
63
|
-
getEventState: Function;
|
|
64
|
-
} | null | undefined> | undefined;
|
|
65
|
-
singleQuadrantDomainPadding?: React.Validator<boolean | {
|
|
66
|
-
x?: boolean | undefined;
|
|
67
|
-
y?: boolean | undefined;
|
|
68
|
-
} | null | undefined> | undefined;
|
|
69
|
-
standalone?: React.Validator<boolean | null | undefined> | undefined;
|
|
70
|
-
width?: React.Validator<number | null | undefined> | undefined;
|
|
71
|
-
};
|
|
72
|
-
static defaultProps:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
140
|
-
componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
|
|
141
|
-
getSharedEventState: (key: string, value: string) => unknown;
|
|
142
|
-
baseProps: Record<string, object>;
|
|
143
|
-
dataKeys: string[];
|
|
144
|
-
hasEvents: unknown;
|
|
145
|
-
events: unknown;
|
|
146
|
-
};
|
|
147
|
-
getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
|
|
148
|
-
role?: string | undefined;
|
|
149
|
-
expectedComponents?: string[] | undefined;
|
|
150
|
-
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
151
|
-
animationWhitelist?: string[] | undefined;
|
|
152
|
-
} & typeof VictoryErrorBarBase;
|
|
153
|
-
export {};
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
|
|
4
|
+
export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
|
|
5
|
+
export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
|
|
6
|
+
export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
|
|
7
|
+
borderWidth?: number;
|
|
8
|
+
errorX?: ErrorType;
|
|
9
|
+
errorY?: ErrorType;
|
|
10
|
+
events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
|
|
11
|
+
style?: VictoryStyleInterface;
|
|
12
|
+
}
|
|
13
|
+
interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
|
|
14
|
+
}
|
|
15
|
+
declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
|
|
16
|
+
static animationWhitelist: string[];
|
|
17
|
+
static displayName: string;
|
|
18
|
+
static role: string;
|
|
19
|
+
static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
|
|
20
|
+
static propTypes: {
|
|
21
|
+
borderWidth: PropTypes.Requireable<number>;
|
|
22
|
+
errorX: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
23
|
+
errorY: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
24
|
+
horizontal: PropTypes.Requireable<boolean>;
|
|
25
|
+
categories?: React.Validator<import("victory-core").CategoryPropType | null | undefined> | undefined;
|
|
26
|
+
data?: React.Validator<readonly any[] | null | undefined> | undefined;
|
|
27
|
+
dataComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
28
|
+
domain?: React.Validator<import("victory-core").ForAxes<import("victory-core").DomainTuple> | null | undefined> | undefined;
|
|
29
|
+
domainPadding?: React.Validator<import("victory-core").ForAxes<import("victory-core").PaddingType> | null | undefined> | undefined;
|
|
30
|
+
samples?: React.Validator<number | null | undefined> | undefined;
|
|
31
|
+
sortKey?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
32
|
+
sortOrder?: React.Validator<import("victory-core").SortOrderPropType | null | undefined> | undefined;
|
|
33
|
+
x?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
34
|
+
y?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
35
|
+
y0?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
36
|
+
theme?: React.Validator<import("victory-core").VictoryThemeDefinition | null | undefined> | undefined;
|
|
37
|
+
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
38
|
+
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
39
|
+
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
40
|
+
disableInlineStyles?: React.Validator<boolean | null | undefined> | undefined;
|
|
41
|
+
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
42
|
+
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
43
|
+
height?: React.Validator<number | null | undefined> | undefined;
|
|
44
|
+
maxDomain?: React.Validator<number | {
|
|
45
|
+
x?: number | undefined;
|
|
46
|
+
y?: number | undefined;
|
|
47
|
+
} | null | undefined> | undefined;
|
|
48
|
+
minDomain?: React.Validator<number | {
|
|
49
|
+
x?: number | undefined;
|
|
50
|
+
y?: number | undefined;
|
|
51
|
+
} | null | undefined> | undefined;
|
|
52
|
+
name?: React.Validator<string | null | undefined> | undefined;
|
|
53
|
+
origin?: React.Validator<import("victory-core").OriginType | null | undefined> | undefined;
|
|
54
|
+
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
55
|
+
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
56
|
+
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
57
|
+
scale?: React.Validator<import("victory-core").D3Scale<any> | import("victory-core").ScaleName | {
|
|
58
|
+
x?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
|
|
59
|
+
y?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
|
|
60
|
+
} | null | undefined> | undefined;
|
|
61
|
+
sharedEvents?: React.Validator<{
|
|
62
|
+
events: any[];
|
|
63
|
+
getEventState: Function;
|
|
64
|
+
} | null | undefined> | undefined;
|
|
65
|
+
singleQuadrantDomainPadding?: React.Validator<boolean | {
|
|
66
|
+
x?: boolean | undefined;
|
|
67
|
+
y?: boolean | undefined;
|
|
68
|
+
} | null | undefined> | undefined;
|
|
69
|
+
standalone?: React.Validator<boolean | null | undefined> | undefined;
|
|
70
|
+
width?: React.Validator<number | null | undefined> | undefined;
|
|
71
|
+
};
|
|
72
|
+
static defaultProps: VictoryErrorBarProps;
|
|
73
|
+
static getDomain: (props: any, axis: any) => any;
|
|
74
|
+
static getData: (props: any) => any;
|
|
75
|
+
static getBaseProps: (props: any) => any;
|
|
76
|
+
static expectedComponents: string[];
|
|
77
|
+
shouldAnimate(): boolean;
|
|
78
|
+
render(): React.ReactElement;
|
|
79
|
+
}
|
|
80
|
+
export declare const VictoryErrorBar: {
|
|
81
|
+
new (props: import("victory-core").EventMixinCommonProps): {
|
|
82
|
+
state: {};
|
|
83
|
+
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
|
|
84
|
+
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
|
|
85
|
+
getEvents: (p: any, target: any, eventKey: any) => any;
|
|
86
|
+
externalMutations: {} | undefined;
|
|
87
|
+
calculatedState: {};
|
|
88
|
+
globalEvents: {};
|
|
89
|
+
prevGlobalEventKeys: string[];
|
|
90
|
+
boundGlobalEvents: {};
|
|
91
|
+
shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
|
|
92
|
+
componentDidMount(): void;
|
|
93
|
+
componentDidUpdate(prevProps: any): void;
|
|
94
|
+
componentWillUnmount(): void;
|
|
95
|
+
addGlobalListener(key: any): void;
|
|
96
|
+
removeGlobalListener(key: any): void;
|
|
97
|
+
getStateChanges(props: any): {};
|
|
98
|
+
applyExternalMutations(props: any, externalMutations: any): void;
|
|
99
|
+
getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
|
|
100
|
+
getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
|
|
101
|
+
cacheValues(obj: any): void;
|
|
102
|
+
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
|
|
103
|
+
getAllEvents(props: any): any;
|
|
104
|
+
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
105
|
+
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
106
|
+
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
107
|
+
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
108
|
+
renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
109
|
+
context: unknown;
|
|
110
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
111
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
112
|
+
render(): React.ReactNode;
|
|
113
|
+
readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
|
|
114
|
+
refs: {
|
|
115
|
+
[key: string]: React.ReactInstance;
|
|
116
|
+
};
|
|
117
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
118
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
|
|
119
|
+
componentWillMount?(): void;
|
|
120
|
+
UNSAFE_componentWillMount?(): void;
|
|
121
|
+
componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
122
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
123
|
+
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
124
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
125
|
+
componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
|
|
126
|
+
getSharedEventState: (key: string, value: string) => unknown;
|
|
127
|
+
baseProps: Record<string, object>;
|
|
128
|
+
dataKeys: string[];
|
|
129
|
+
hasEvents: unknown;
|
|
130
|
+
events: unknown;
|
|
131
|
+
};
|
|
132
|
+
getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
|
|
133
|
+
role?: string | undefined;
|
|
134
|
+
expectedComponents?: string[] | undefined;
|
|
135
|
+
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
136
|
+
animationWhitelist?: string[] | undefined;
|
|
137
|
+
} & typeof VictoryErrorBarBase;
|
|
138
|
+
export {};
|
|
154
139
|
//# 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/error-bar.js
CHANGED
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ErrorBar = void 0;
|
|
7
7
|
|
|
8
|
-
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -103,13 +101,13 @@ var evaluateProps = function (props) {
|
|
|
103
101
|
|
|
104
102
|
var id = _victoryCore.Helpers.evaluateProp(props.id, props);
|
|
105
103
|
|
|
106
|
-
var style = _victoryCore.Helpers.evaluateStyle(
|
|
104
|
+
var style = _victoryCore.Helpers.evaluateStyle(Object.assign({
|
|
107
105
|
stroke: "black"
|
|
108
106
|
}, props.style), props);
|
|
109
107
|
|
|
110
108
|
var tabIndex = _victoryCore.Helpers.evaluateProp(props.tabIndex, props);
|
|
111
109
|
|
|
112
|
-
return
|
|
110
|
+
return Object.assign({}, props, {
|
|
113
111
|
ariaLabel: ariaLabel,
|
|
114
112
|
id: id,
|
|
115
113
|
style: style,
|
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
|
@@ -183,7 +183,7 @@ var getLabelProps = function (dataProps, text, style) {
|
|
|
183
183
|
var getBaseProps = function (initialProps, fallbackProps) {
|
|
184
184
|
var modifiedProps = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "errorbar");
|
|
185
185
|
|
|
186
|
-
var props =
|
|
186
|
+
var props = Object.assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
187
187
|
var borderWidth = props.borderWidth,
|
|
188
188
|
data = props.data,
|
|
189
189
|
domain = props.domain,
|
|
@@ -254,7 +254,7 @@ var getBaseProps = function (initialProps, fallbackProps) {
|
|
|
254
254
|
var text = _victoryCore.LabelHelpers.getText(props, datum, index);
|
|
255
255
|
|
|
256
256
|
if (text !== undefined && text !== null || labels && (events || sharedEvents)) {
|
|
257
|
-
childProps[eventKey].labels = getLabelProps(
|
|
257
|
+
childProps[eventKey].labels = getLabelProps(Object.assign({}, props, dataProps), text, style);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
return childProps;
|
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
|