victory-core 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/CHANGELOG.md +4 -2
- package/dist/victory-core.js +104 -107
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +17 -17
- package/es/types/callbacks.d.ts +36 -36
- package/es/types/prop-types.d.ts +129 -129
- package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/es/victory-animation/util.d.ts +66 -66
- package/es/victory-animation/victory-animation.d.ts +34 -34
- package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/es/victory-container/victory-container.d.ts +68 -68
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-label/victory-label.js +1 -4
- package/es/victory-portal/portal-context.d.ts +11 -11
- package/es/victory-portal/portal.d.ts +20 -20
- package/es/victory-portal/victory-portal.d.ts +26 -26
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/arc.js +2 -4
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/background.js +2 -4
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/border.js +2 -4
- package/es/victory-primitives/circle.d.ts +3 -3
- package/es/victory-primitives/clip-path.d.ts +7 -7
- package/es/victory-primitives/index.d.ts +14 -14
- package/es/victory-primitives/line-segment.d.ts +11 -11
- package/es/victory-primitives/line-segment.js +2 -4
- package/es/victory-primitives/line.d.ts +3 -3
- package/es/victory-primitives/path.d.ts +3 -3
- package/es/victory-primitives/point.d.ts +13 -13
- package/es/victory-primitives/point.js +2 -4
- package/es/victory-primitives/rect.d.ts +3 -3
- package/es/victory-primitives/text.d.ts +8 -8
- package/es/victory-primitives/tspan.d.ts +3 -3
- package/es/victory-primitives/types.d.ts +7 -7
- package/es/victory-primitives/whisker.d.ts +15 -15
- package/es/victory-primitives/whisker.js +2 -4
- package/es/victory-theme/grayscale.d.ts +2 -2
- package/es/victory-theme/material.d.ts +2 -2
- package/es/victory-theme/types.d.ts +238 -238
- package/es/victory-theme/victory-theme.d.ts +5 -5
- package/es/victory-transition/victory-transition.d.ts +53 -53
- package/es/victory-util/add-events.d.ts +126 -126
- package/es/victory-util/axis.d.ts +50 -50
- package/es/victory-util/collection.d.ts +15 -15
- package/es/victory-util/common-props.d.ts +79 -79
- package/es/victory-util/data.d.ts +74 -74
- package/es/victory-util/default-transitions.d.ts +4 -4
- package/es/victory-util/domain.d.ts +90 -90
- package/es/victory-util/events.d.ts +64 -64
- package/es/victory-util/helpers.d.ts +96 -96
- package/es/victory-util/hooks/index.d.ts +2 -2
- package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/es/victory-util/immutable.d.ts +11 -11
- package/es/victory-util/index.d.ts +26 -26
- package/es/victory-util/label-helpers.d.ts +26 -26
- package/es/victory-util/line-helpers.d.ts +4 -4
- package/es/victory-util/log.d.ts +1 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -9
- package/es/victory-util/scale.d.ts +9 -9
- package/es/victory-util/selection.d.ts +28 -28
- package/es/victory-util/style.d.ts +18 -18
- package/es/victory-util/textsize.d.ts +35 -35
- package/es/victory-util/timer-context.d.ts +11 -11
- package/es/victory-util/timer.d.ts +16 -16
- package/es/victory-util/transitions.d.ts +48 -48
- package/es/victory-util/type-helpers.d.ts +9 -9
- package/es/victory-util/user-props.d.ts +26 -26
- package/es/victory-util/wrapper.d.ts +33 -33
- package/lib/index.d.ts +17 -17
- package/lib/types/callbacks.d.ts +36 -36
- package/lib/types/prop-types.d.ts +129 -129
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/lib/victory-animation/util.d.ts +66 -66
- package/lib/victory-animation/victory-animation.d.ts +34 -34
- package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/lib/victory-container/victory-container.d.ts +68 -68
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-label/victory-label.js +1 -4
- package/lib/victory-portal/portal-context.d.ts +11 -11
- package/lib/victory-portal/portal.d.ts +20 -20
- package/lib/victory-portal/victory-portal.d.ts +26 -26
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/arc.js +2 -4
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/background.js +2 -4
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/border.js +2 -4
- package/lib/victory-primitives/circle.d.ts +3 -3
- package/lib/victory-primitives/clip-path.d.ts +7 -7
- package/lib/victory-primitives/index.d.ts +14 -14
- package/lib/victory-primitives/line-segment.d.ts +11 -11
- package/lib/victory-primitives/line-segment.js +2 -4
- package/lib/victory-primitives/line.d.ts +3 -3
- package/lib/victory-primitives/path.d.ts +3 -3
- package/lib/victory-primitives/point.d.ts +13 -13
- package/lib/victory-primitives/point.js +2 -4
- package/lib/victory-primitives/rect.d.ts +3 -3
- package/lib/victory-primitives/text.d.ts +8 -8
- package/lib/victory-primitives/tspan.d.ts +3 -3
- package/lib/victory-primitives/types.d.ts +7 -7
- package/lib/victory-primitives/whisker.d.ts +15 -15
- package/lib/victory-primitives/whisker.js +2 -4
- package/lib/victory-theme/grayscale.d.ts +2 -2
- package/lib/victory-theme/material.d.ts +2 -2
- package/lib/victory-theme/types.d.ts +238 -238
- package/lib/victory-theme/victory-theme.d.ts +5 -5
- package/lib/victory-transition/victory-transition.d.ts +53 -53
- package/lib/victory-util/add-events.d.ts +126 -126
- package/lib/victory-util/axis.d.ts +50 -50
- package/lib/victory-util/collection.d.ts +15 -15
- package/lib/victory-util/common-props.d.ts +79 -79
- package/lib/victory-util/data.d.ts +74 -74
- package/lib/victory-util/default-transitions.d.ts +4 -4
- package/lib/victory-util/domain.d.ts +90 -90
- package/lib/victory-util/events.d.ts +64 -64
- package/lib/victory-util/helpers.d.ts +96 -96
- package/lib/victory-util/hooks/index.d.ts +2 -2
- package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/lib/victory-util/immutable.d.ts +11 -11
- package/lib/victory-util/index.d.ts +26 -26
- package/lib/victory-util/label-helpers.d.ts +26 -26
- package/lib/victory-util/line-helpers.d.ts +4 -4
- package/lib/victory-util/log.d.ts +1 -1
- package/lib/victory-util/point-path-helpers.d.ts +9 -9
- package/lib/victory-util/scale.d.ts +9 -9
- package/lib/victory-util/selection.d.ts +28 -28
- package/lib/victory-util/style.d.ts +18 -18
- package/lib/victory-util/textsize.d.ts +35 -35
- package/lib/victory-util/timer-context.d.ts +11 -11
- package/lib/victory-util/timer.d.ts +16 -16
- package/lib/victory-util/transitions.d.ts +48 -48
- package/lib/victory-util/type-helpers.d.ts +9 -9
- package/lib/victory-util/user-props.d.ts +26 -26
- package/lib/victory-util/wrapper.d.ts +33 -33
- package/package.json +5 -2
- package/src/victory-label/victory-label.tsx +1 -1
- package/src/victory-primitives/arc.tsx +3 -1
- package/src/victory-primitives/background.tsx +3 -1
- package/src/victory-primitives/border.tsx +3 -1
- package/src/victory-primitives/line-segment.tsx +3 -1
- package/src/victory-primitives/point.tsx +3 -1
- package/src/victory-primitives/whisker.tsx +3 -1
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
export declare function formatDataFromDomain(dataset: any, domain: any, defaultBaseline?: any): any;
|
|
2
|
-
/**
|
|
3
|
-
* Returns an object mapping string data to numeric data
|
|
4
|
-
* @param {Object} props: the props object
|
|
5
|
-
* @param {String} axis: the current axis
|
|
6
|
-
* @returns {Object} an object mapping string data to numeric data
|
|
7
|
-
*/
|
|
8
|
-
export declare function createStringMap(props: any, axis: any): any;
|
|
9
|
-
/**
|
|
10
|
-
* Reduces the size of a data array, such that it is <= maxPoints.
|
|
11
|
-
* @param {Array} data: an array of data; must be sorted
|
|
12
|
-
* @param {Number} maxPoints: maximum number of data points to return
|
|
13
|
-
* @param {Number} startingIndex: the index of the data[0] *in the entire dataset*; this function
|
|
14
|
-
assumes `data` param is a subset of larger dataset that has been zoommed
|
|
15
|
-
* @returns {Array} an array of data, a subset of data param
|
|
16
|
-
*/
|
|
17
|
-
export declare function downsample(data: any, maxPoints: any, startingIndex?: number): any;
|
|
18
|
-
/**
|
|
19
|
-
* Returns formatted data. Data accessors are applied, and string values are replaced.
|
|
20
|
-
* @param {Array} dataset: the original domain
|
|
21
|
-
* @param {Object} props: the props object
|
|
22
|
-
* @param {Array} expectedKeys: an array of expected data keys
|
|
23
|
-
* @returns {Array} the formatted data
|
|
24
|
-
*/
|
|
25
|
-
export declare function formatData(dataset: any[], props: any, expectedKeys?: string[]): any;
|
|
26
|
-
/**
|
|
27
|
-
* Returns generated x and y data based on domain and sample from props
|
|
28
|
-
* @param {Object} props: the props object
|
|
29
|
-
* @returns {Array} an array of data
|
|
30
|
-
*/
|
|
31
|
-
export declare function generateData(props: any): {
|
|
32
|
-
x: number;
|
|
33
|
-
y: number;
|
|
34
|
-
}[];
|
|
35
|
-
/**
|
|
36
|
-
* Returns an array of categories for a given axis
|
|
37
|
-
* @param {Object} props: the props object
|
|
38
|
-
* @param {String} axis: the current axis
|
|
39
|
-
* @returns {Array} an array of categories
|
|
40
|
-
*/
|
|
41
|
-
export declare function getCategories(props: any, axis: any): any;
|
|
42
|
-
/**
|
|
43
|
-
* Returns an array of formatted data
|
|
44
|
-
* @param {Object} props: the props object
|
|
45
|
-
* @returns {Array} an array of data
|
|
46
|
-
*/
|
|
47
|
-
export declare function getData(props: any): any;
|
|
48
|
-
/**
|
|
49
|
-
* Returns an array of strings from axis tickValues for a given axis
|
|
50
|
-
* @param {Object} props: the props object
|
|
51
|
-
* @param {String} axis: the current axis
|
|
52
|
-
* @returns {Array} an array of strings
|
|
53
|
-
*/
|
|
54
|
-
export declare function getStringsFromAxes(props: any, axis: any): any;
|
|
55
|
-
/**
|
|
56
|
-
* Returns an array of strings from categories for a given axis
|
|
57
|
-
* @param {Object} props: the props object
|
|
58
|
-
* @param {String} axis: the current axis
|
|
59
|
-
* @returns {Array} an array of strings
|
|
60
|
-
*/
|
|
61
|
-
export declare function getStringsFromCategories(props: any, axis: any): any;
|
|
62
|
-
/**
|
|
63
|
-
* Returns an array of strings from data
|
|
64
|
-
* @param {Object} props: the props object
|
|
65
|
-
* @param {String} axis: the current axis
|
|
66
|
-
* @returns {Array} an array of strings
|
|
67
|
-
*/
|
|
68
|
-
export declare function getStringsFromData(props: any, axis: any): any;
|
|
69
|
-
/**
|
|
70
|
-
* Checks whether a given component can be used to calculate data
|
|
71
|
-
* @param {Component} component: a React component instance
|
|
72
|
-
* @returns {Boolean} Returns true if the given component has a role included in the whitelist
|
|
73
|
-
*/
|
|
74
|
-
export declare function isDataComponent(component: any): boolean;
|
|
1
|
+
export declare function formatDataFromDomain(dataset: any, domain: any, defaultBaseline?: any): any;
|
|
2
|
+
/**
|
|
3
|
+
* Returns an object mapping string data to numeric data
|
|
4
|
+
* @param {Object} props: the props object
|
|
5
|
+
* @param {String} axis: the current axis
|
|
6
|
+
* @returns {Object} an object mapping string data to numeric data
|
|
7
|
+
*/
|
|
8
|
+
export declare function createStringMap(props: any, axis: any): any;
|
|
9
|
+
/**
|
|
10
|
+
* Reduces the size of a data array, such that it is <= maxPoints.
|
|
11
|
+
* @param {Array} data: an array of data; must be sorted
|
|
12
|
+
* @param {Number} maxPoints: maximum number of data points to return
|
|
13
|
+
* @param {Number} startingIndex: the index of the data[0] *in the entire dataset*; this function
|
|
14
|
+
assumes `data` param is a subset of larger dataset that has been zoommed
|
|
15
|
+
* @returns {Array} an array of data, a subset of data param
|
|
16
|
+
*/
|
|
17
|
+
export declare function downsample(data: any, maxPoints: any, startingIndex?: number): any;
|
|
18
|
+
/**
|
|
19
|
+
* Returns formatted data. Data accessors are applied, and string values are replaced.
|
|
20
|
+
* @param {Array} dataset: the original domain
|
|
21
|
+
* @param {Object} props: the props object
|
|
22
|
+
* @param {Array} expectedKeys: an array of expected data keys
|
|
23
|
+
* @returns {Array} the formatted data
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatData(dataset: any[], props: any, expectedKeys?: string[]): any;
|
|
26
|
+
/**
|
|
27
|
+
* Returns generated x and y data based on domain and sample from props
|
|
28
|
+
* @param {Object} props: the props object
|
|
29
|
+
* @returns {Array} an array of data
|
|
30
|
+
*/
|
|
31
|
+
export declare function generateData(props: any): {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
}[];
|
|
35
|
+
/**
|
|
36
|
+
* Returns an array of categories for a given axis
|
|
37
|
+
* @param {Object} props: the props object
|
|
38
|
+
* @param {String} axis: the current axis
|
|
39
|
+
* @returns {Array} an array of categories
|
|
40
|
+
*/
|
|
41
|
+
export declare function getCategories(props: any, axis: any): any;
|
|
42
|
+
/**
|
|
43
|
+
* Returns an array of formatted data
|
|
44
|
+
* @param {Object} props: the props object
|
|
45
|
+
* @returns {Array} an array of data
|
|
46
|
+
*/
|
|
47
|
+
export declare function getData(props: any): any;
|
|
48
|
+
/**
|
|
49
|
+
* Returns an array of strings from axis tickValues for a given axis
|
|
50
|
+
* @param {Object} props: the props object
|
|
51
|
+
* @param {String} axis: the current axis
|
|
52
|
+
* @returns {Array} an array of strings
|
|
53
|
+
*/
|
|
54
|
+
export declare function getStringsFromAxes(props: any, axis: any): any;
|
|
55
|
+
/**
|
|
56
|
+
* Returns an array of strings from categories for a given axis
|
|
57
|
+
* @param {Object} props: the props object
|
|
58
|
+
* @param {String} axis: the current axis
|
|
59
|
+
* @returns {Array} an array of strings
|
|
60
|
+
*/
|
|
61
|
+
export declare function getStringsFromCategories(props: any, axis: any): any;
|
|
62
|
+
/**
|
|
63
|
+
* Returns an array of strings from data
|
|
64
|
+
* @param {Object} props: the props object
|
|
65
|
+
* @param {String} axis: the current axis
|
|
66
|
+
* @returns {Array} an array of strings
|
|
67
|
+
*/
|
|
68
|
+
export declare function getStringsFromData(props: any, axis: any): any;
|
|
69
|
+
/**
|
|
70
|
+
* Checks whether a given component can be used to calculate data
|
|
71
|
+
* @param {Component} component: a React component instance
|
|
72
|
+
* @returns {Boolean} Returns true if the given component has a role included in the whitelist
|
|
73
|
+
*/
|
|
74
|
+
export declare function isDataComponent(component: any): boolean;
|
|
75
75
|
//# sourceMappingURL=data.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnimatePropTypeInterface } from "../types/prop-types";
|
|
2
|
-
export declare function continuousTransitions(): AnimatePropTypeInterface;
|
|
3
|
-
export declare function continuousPolarTransitions(): AnimatePropTypeInterface;
|
|
4
|
-
export declare function discreteTransitions(): AnimatePropTypeInterface;
|
|
1
|
+
import { AnimatePropTypeInterface } from "../types/prop-types";
|
|
2
|
+
export declare function continuousTransitions(): AnimatePropTypeInterface;
|
|
3
|
+
export declare function continuousPolarTransitions(): AnimatePropTypeInterface;
|
|
4
|
+
export declare function discreteTransitions(): AnimatePropTypeInterface;
|
|
5
5
|
//# sourceMappingURL=default-transitions.d.ts.map
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a getDomain function
|
|
3
|
-
* @param {Function} getDomainFromDataFunction: a function that takes props and axis and
|
|
4
|
-
* returns a domain based on data
|
|
5
|
-
* @param {Function} formatDomainFunction: a function that takes domain, props, and axis and
|
|
6
|
-
* returns a formatted domain
|
|
7
|
-
* @returns {Function} a function that takes props and axis and returns a formatted domain
|
|
8
|
-
*/
|
|
9
|
-
export declare function createDomainFunction(getDomainFromDataFunction?: any, formatDomainFunction?: any): (props: any, axis: any) => any;
|
|
10
|
-
/**
|
|
11
|
-
* Returns a formatted domain.
|
|
12
|
-
* @param {Array} domain: a domain in the form of a two element array
|
|
13
|
-
* @param {Object} props: the props object
|
|
14
|
-
* @param {String} axis: the current axis
|
|
15
|
-
* @returns {Array} a domain in the form of a two element array
|
|
16
|
-
*/
|
|
17
|
-
export declare function formatDomain(domain: any, props: any, axis: any): any;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a domain for a given axis based on props, category, or data
|
|
20
|
-
* @param {Object} props: the props object
|
|
21
|
-
* @param {String} axis: the current axis
|
|
22
|
-
* @returns {Array} the domain for the given axis
|
|
23
|
-
*/
|
|
24
|
-
export declare function getDomain(props: any, axis: any): any;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a domain based on categories if they exist
|
|
27
|
-
* @param {Object} props: the props object
|
|
28
|
-
* @param {String} axis: the current axis
|
|
29
|
-
* @param {Array} categories: an array of categories corresponding to a given axis
|
|
30
|
-
* @returns {Array|undefined} returns a domain from categories or undefined
|
|
31
|
-
*/
|
|
32
|
-
export declare function getDomainFromCategories(props: any, axis: any, categories?: any): any[] | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Returns a domain from a dataset for a given axis
|
|
35
|
-
* @param {Object} props: the props object
|
|
36
|
-
* @param {String} axis: the current axis
|
|
37
|
-
* @param {Array} dataset: an array of data
|
|
38
|
-
* @returns {Array} the domain based on data
|
|
39
|
-
*/
|
|
40
|
-
export declare function getDomainFromData(props: any, axis: any, dataset: any): any[] | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Returns a domain in the form of a two element array given a min and max value.
|
|
43
|
-
* @param {Number|Date} min: the props object
|
|
44
|
-
* @param {Number|Date} max: the current axis
|
|
45
|
-
* @returns {Array} the minDomain based on props
|
|
46
|
-
*/
|
|
47
|
-
export declare function getDomainFromMinMax(min: any, max: any): any[];
|
|
48
|
-
/**
|
|
49
|
-
* Returns a the domain for a given axis if domain is given in props
|
|
50
|
-
* @param {Object} props: the props object
|
|
51
|
-
* @param {String} axis: the current axis
|
|
52
|
-
* @returns {Array|undefined} the domain based on props
|
|
53
|
-
*/
|
|
54
|
-
export declare function getDomainFromProps(props: any, axis: any): any;
|
|
55
|
-
/**
|
|
56
|
-
* Returns a domain for a given axis. This method forces the domain to include
|
|
57
|
-
* zero unless the domain is explicitly specified in props.
|
|
58
|
-
* @param {Object} props: the props object
|
|
59
|
-
* @param {String} axis: the current axis
|
|
60
|
-
* @returns {Array} the domain for the given axis
|
|
61
|
-
*/
|
|
62
|
-
export declare function getDomainWithZero(props: any, axis: any): any;
|
|
63
|
-
/**
|
|
64
|
-
* Returns the maxDomain from props if it exists
|
|
65
|
-
* @param {Object} props: the props object
|
|
66
|
-
* @param {String} axis: the current axis
|
|
67
|
-
* @returns {Number|Date|undefined} the maxDomain based on props
|
|
68
|
-
*/
|
|
69
|
-
export declare function getMaxFromProps(props: any, axis: any): any;
|
|
70
|
-
/**
|
|
71
|
-
* Returns the minDomain from props if it exists
|
|
72
|
-
* @param {Object} props: the props object
|
|
73
|
-
* @param {String} axis: the current axis
|
|
74
|
-
* @returns {Number|Date|undefined} the minDomain based on props
|
|
75
|
-
*/
|
|
76
|
-
export declare function getMinFromProps(props: any, axis: any): any;
|
|
77
|
-
/**
|
|
78
|
-
* Returns a symmetrically padded domain for polar charts
|
|
79
|
-
* @param {Array} domain: the original domain
|
|
80
|
-
* @param {Array} values: a flat array of values corresponding to either tickValues, or data values
|
|
81
|
-
* for a given dimension i.e. only x values.
|
|
82
|
-
* @returns {Array} the symmetric domain
|
|
83
|
-
*/
|
|
84
|
-
export declare function getSymmetricDomain(domain: any, values: number[]): any[];
|
|
85
|
-
/**
|
|
86
|
-
* Checks whether a given component can be used to calculate domain
|
|
87
|
-
* @param {Component} component: a React component instance
|
|
88
|
-
* @returns {Boolean} Returns true if the given component has a role included in the whitelist
|
|
89
|
-
*/
|
|
90
|
-
export declare function isDomainComponent(component: any): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Returns a getDomain function
|
|
3
|
+
* @param {Function} getDomainFromDataFunction: a function that takes props and axis and
|
|
4
|
+
* returns a domain based on data
|
|
5
|
+
* @param {Function} formatDomainFunction: a function that takes domain, props, and axis and
|
|
6
|
+
* returns a formatted domain
|
|
7
|
+
* @returns {Function} a function that takes props and axis and returns a formatted domain
|
|
8
|
+
*/
|
|
9
|
+
export declare function createDomainFunction(getDomainFromDataFunction?: any, formatDomainFunction?: any): (props: any, axis: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a formatted domain.
|
|
12
|
+
* @param {Array} domain: a domain in the form of a two element array
|
|
13
|
+
* @param {Object} props: the props object
|
|
14
|
+
* @param {String} axis: the current axis
|
|
15
|
+
* @returns {Array} a domain in the form of a two element array
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatDomain(domain: any, props: any, axis: any): any;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a domain for a given axis based on props, category, or data
|
|
20
|
+
* @param {Object} props: the props object
|
|
21
|
+
* @param {String} axis: the current axis
|
|
22
|
+
* @returns {Array} the domain for the given axis
|
|
23
|
+
*/
|
|
24
|
+
export declare function getDomain(props: any, axis: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* Returns a domain based on categories if they exist
|
|
27
|
+
* @param {Object} props: the props object
|
|
28
|
+
* @param {String} axis: the current axis
|
|
29
|
+
* @param {Array} categories: an array of categories corresponding to a given axis
|
|
30
|
+
* @returns {Array|undefined} returns a domain from categories or undefined
|
|
31
|
+
*/
|
|
32
|
+
export declare function getDomainFromCategories(props: any, axis: any, categories?: any): any[] | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Returns a domain from a dataset for a given axis
|
|
35
|
+
* @param {Object} props: the props object
|
|
36
|
+
* @param {String} axis: the current axis
|
|
37
|
+
* @param {Array} dataset: an array of data
|
|
38
|
+
* @returns {Array} the domain based on data
|
|
39
|
+
*/
|
|
40
|
+
export declare function getDomainFromData(props: any, axis: any, dataset: any): any[] | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a domain in the form of a two element array given a min and max value.
|
|
43
|
+
* @param {Number|Date} min: the props object
|
|
44
|
+
* @param {Number|Date} max: the current axis
|
|
45
|
+
* @returns {Array} the minDomain based on props
|
|
46
|
+
*/
|
|
47
|
+
export declare function getDomainFromMinMax(min: any, max: any): any[];
|
|
48
|
+
/**
|
|
49
|
+
* Returns a the domain for a given axis if domain is given in props
|
|
50
|
+
* @param {Object} props: the props object
|
|
51
|
+
* @param {String} axis: the current axis
|
|
52
|
+
* @returns {Array|undefined} the domain based on props
|
|
53
|
+
*/
|
|
54
|
+
export declare function getDomainFromProps(props: any, axis: any): any;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a domain for a given axis. This method forces the domain to include
|
|
57
|
+
* zero unless the domain is explicitly specified in props.
|
|
58
|
+
* @param {Object} props: the props object
|
|
59
|
+
* @param {String} axis: the current axis
|
|
60
|
+
* @returns {Array} the domain for the given axis
|
|
61
|
+
*/
|
|
62
|
+
export declare function getDomainWithZero(props: any, axis: any): any;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the maxDomain from props if it exists
|
|
65
|
+
* @param {Object} props: the props object
|
|
66
|
+
* @param {String} axis: the current axis
|
|
67
|
+
* @returns {Number|Date|undefined} the maxDomain based on props
|
|
68
|
+
*/
|
|
69
|
+
export declare function getMaxFromProps(props: any, axis: any): any;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the minDomain from props if it exists
|
|
72
|
+
* @param {Object} props: the props object
|
|
73
|
+
* @param {String} axis: the current axis
|
|
74
|
+
* @returns {Number|Date|undefined} the minDomain based on props
|
|
75
|
+
*/
|
|
76
|
+
export declare function getMinFromProps(props: any, axis: any): any;
|
|
77
|
+
/**
|
|
78
|
+
* Returns a symmetrically padded domain for polar charts
|
|
79
|
+
* @param {Array} domain: the original domain
|
|
80
|
+
* @param {Array} values: a flat array of values corresponding to either tickValues, or data values
|
|
81
|
+
* for a given dimension i.e. only x values.
|
|
82
|
+
* @returns {Array} the symmetric domain
|
|
83
|
+
*/
|
|
84
|
+
export declare function getSymmetricDomain(domain: any, values: number[]): any[];
|
|
85
|
+
/**
|
|
86
|
+
* Checks whether a given component can be used to calculate domain
|
|
87
|
+
* @param {Component} component: a React component instance
|
|
88
|
+
* @returns {Boolean} Returns true if the given component has a role included in the whitelist
|
|
89
|
+
*/
|
|
90
|
+
export declare function isDomainComponent(component: any): boolean;
|
|
91
91
|
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { EventMixinCalculatedValues } from "./add-events";
|
|
3
|
-
declare type ComponentEventKey = string | number;
|
|
4
|
-
export interface ComponentEvent {
|
|
5
|
-
target?: "parent" | string;
|
|
6
|
-
eventKey?: ComponentEventKey | ComponentEventKey[];
|
|
7
|
-
eventHandlers: ComponentEventHandlers;
|
|
8
|
-
}
|
|
9
|
-
export declare type ComponentEventName = string;
|
|
10
|
-
export interface ComponentEventHandlers {
|
|
11
|
-
[k: ComponentEventName]: ComponentEventHandler;
|
|
12
|
-
}
|
|
13
|
-
export declare type ComponentEventHandler = (evt: React.SyntheticEvent, childProps: unknown, eventKey: ComponentEventKey, eventName: ComponentEventName) => UpdatedProps;
|
|
14
|
-
export declare type UpdatedProps = any;
|
|
15
|
-
interface ComponentWithEvents extends EventMixinCalculatedValues {
|
|
16
|
-
state: any;
|
|
17
|
-
setState: any;
|
|
18
|
-
}
|
|
19
|
-
export declare function getEvents(this: ComponentWithEvents, props: any, target?: any, eventKey?: any, getScopedEvents?: any): any;
|
|
20
|
-
export declare function getScopedEvents(this: ComponentWithEvents, events: any, namespace: any, childType: any, baseProps: any): {};
|
|
21
|
-
export declare function getPartialEvents(events: ComponentEventHandlers, eventKey: ComponentEventKey, childProps: unknown): PartialEvents;
|
|
22
|
-
export interface PartialEvents {
|
|
23
|
-
[eventName: ComponentEventName]: (evt: React.SyntheticEvent) => UpdatedProps;
|
|
24
|
-
}
|
|
25
|
-
export declare function getEventState(this: ComponentWithEvents, eventKey: ComponentEventKey, namespace: string, childType?: string): any;
|
|
26
|
-
/**
|
|
27
|
-
* Returns a set of all mutations for shared events
|
|
28
|
-
*
|
|
29
|
-
* @param {Array} mutations an array of mutations objects
|
|
30
|
-
* @param {Object} baseProps an object that describes all props for children of VictorySharedEvents
|
|
31
|
-
* @param {Object} baseState an object that describes state for children of VictorySharedEvents
|
|
32
|
-
* @param {Array} childNames an array of childNames
|
|
33
|
-
*
|
|
34
|
-
* @return {Object} a object describing all mutations for VictorySharedEvents
|
|
35
|
-
*/
|
|
36
|
-
export declare function getExternalMutationsWithChildren(mutations: any, baseProps: {} | undefined, baseState: {} | undefined, childNames: any): any;
|
|
37
|
-
/**
|
|
38
|
-
* Returns a set of all mutations for a component
|
|
39
|
-
*
|
|
40
|
-
* @param {Array} mutations an array of mutations objects
|
|
41
|
-
* @param {Object} baseProps a props object (scoped to a childName when used by shared events)
|
|
42
|
-
* @param {Object} baseState a state object (scoped to a childName when used by shared events)
|
|
43
|
-
* @param {String} childName an optional childName
|
|
44
|
-
*
|
|
45
|
-
* @return {Object} a object describing mutations for a given component
|
|
46
|
-
*/
|
|
47
|
-
export declare function getExternalMutations(mutations: any, baseProps?: {}, baseState?: {}, childName?: any): {};
|
|
48
|
-
/**
|
|
49
|
-
* Returns a set of mutations for a particular element given scoped baseProps and baseState
|
|
50
|
-
*
|
|
51
|
-
* @param {Array} mutations an array of mutations objects
|
|
52
|
-
* @param {Object} baseProps a props object (scoped the element specified by the identifier)
|
|
53
|
-
* @param {Object} baseState a state object (scoped the element specified by the identifier)
|
|
54
|
-
* @param {Object} identifier { eventKey, target, childName }
|
|
55
|
-
*
|
|
56
|
-
* @return {Object | undefined} a object describing mutations for a given element, or undefined
|
|
57
|
-
*/
|
|
58
|
-
export declare function getExternalMutation(mutations: any, baseProps: any, baseState: any, identifier: any): any;
|
|
59
|
-
export declare function getComponentEvents(props: any, components: any): any;
|
|
60
|
-
export declare function getGlobalEventNameFromKey(key: any): any;
|
|
61
|
-
export declare const getGlobalEvents: (events: any) => Partial<any>;
|
|
62
|
-
export declare const omitGlobalEvents: (events: any) => Partial<any>;
|
|
63
|
-
export declare const emulateReactEvent: (event: any) => any;
|
|
64
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EventMixinCalculatedValues } from "./add-events";
|
|
3
|
+
declare type ComponentEventKey = string | number;
|
|
4
|
+
export interface ComponentEvent {
|
|
5
|
+
target?: "parent" | string;
|
|
6
|
+
eventKey?: ComponentEventKey | ComponentEventKey[];
|
|
7
|
+
eventHandlers: ComponentEventHandlers;
|
|
8
|
+
}
|
|
9
|
+
export declare type ComponentEventName = string;
|
|
10
|
+
export interface ComponentEventHandlers {
|
|
11
|
+
[k: ComponentEventName]: ComponentEventHandler;
|
|
12
|
+
}
|
|
13
|
+
export declare type ComponentEventHandler = (evt: React.SyntheticEvent, childProps: unknown, eventKey: ComponentEventKey, eventName: ComponentEventName) => UpdatedProps;
|
|
14
|
+
export declare type UpdatedProps = any;
|
|
15
|
+
interface ComponentWithEvents extends EventMixinCalculatedValues {
|
|
16
|
+
state: any;
|
|
17
|
+
setState: any;
|
|
18
|
+
}
|
|
19
|
+
export declare function getEvents(this: ComponentWithEvents, props: any, target?: any, eventKey?: any, getScopedEvents?: any): any;
|
|
20
|
+
export declare function getScopedEvents(this: ComponentWithEvents, events: any, namespace: any, childType: any, baseProps: any): {};
|
|
21
|
+
export declare function getPartialEvents(events: ComponentEventHandlers, eventKey: ComponentEventKey, childProps: unknown): PartialEvents;
|
|
22
|
+
export interface PartialEvents {
|
|
23
|
+
[eventName: ComponentEventName]: (evt: React.SyntheticEvent) => UpdatedProps;
|
|
24
|
+
}
|
|
25
|
+
export declare function getEventState(this: ComponentWithEvents, eventKey: ComponentEventKey, namespace: string, childType?: string): any;
|
|
26
|
+
/**
|
|
27
|
+
* Returns a set of all mutations for shared events
|
|
28
|
+
*
|
|
29
|
+
* @param {Array} mutations an array of mutations objects
|
|
30
|
+
* @param {Object} baseProps an object that describes all props for children of VictorySharedEvents
|
|
31
|
+
* @param {Object} baseState an object that describes state for children of VictorySharedEvents
|
|
32
|
+
* @param {Array} childNames an array of childNames
|
|
33
|
+
*
|
|
34
|
+
* @return {Object} a object describing all mutations for VictorySharedEvents
|
|
35
|
+
*/
|
|
36
|
+
export declare function getExternalMutationsWithChildren(mutations: any, baseProps: {} | undefined, baseState: {} | undefined, childNames: any): any;
|
|
37
|
+
/**
|
|
38
|
+
* Returns a set of all mutations for a component
|
|
39
|
+
*
|
|
40
|
+
* @param {Array} mutations an array of mutations objects
|
|
41
|
+
* @param {Object} baseProps a props object (scoped to a childName when used by shared events)
|
|
42
|
+
* @param {Object} baseState a state object (scoped to a childName when used by shared events)
|
|
43
|
+
* @param {String} childName an optional childName
|
|
44
|
+
*
|
|
45
|
+
* @return {Object} a object describing mutations for a given component
|
|
46
|
+
*/
|
|
47
|
+
export declare function getExternalMutations(mutations: any, baseProps?: {}, baseState?: {}, childName?: any): {};
|
|
48
|
+
/**
|
|
49
|
+
* Returns a set of mutations for a particular element given scoped baseProps and baseState
|
|
50
|
+
*
|
|
51
|
+
* @param {Array} mutations an array of mutations objects
|
|
52
|
+
* @param {Object} baseProps a props object (scoped the element specified by the identifier)
|
|
53
|
+
* @param {Object} baseState a state object (scoped the element specified by the identifier)
|
|
54
|
+
* @param {Object} identifier { eventKey, target, childName }
|
|
55
|
+
*
|
|
56
|
+
* @return {Object | undefined} a object describing mutations for a given element, or undefined
|
|
57
|
+
*/
|
|
58
|
+
export declare function getExternalMutation(mutations: any, baseProps: any, baseState: any, identifier: any): any;
|
|
59
|
+
export declare function getComponentEvents(props: any, components: any): any;
|
|
60
|
+
export declare function getGlobalEventNameFromKey(key: any): any;
|
|
61
|
+
export declare const getGlobalEvents: (events: any) => Partial<any>;
|
|
62
|
+
export declare const omitGlobalEvents: (events: any) => Partial<any>;
|
|
63
|
+
export declare const emulateReactEvent: (event: any) => any;
|
|
64
|
+
export {};
|
|
65
65
|
//# sourceMappingURL=events.d.ts.map
|