victory-cursor-container 36.9.2-next.1 → 36.9.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.
@@ -1,33 +1,33 @@
1
- /// <reference types="lodash" />
2
- import { Selection } from "victory-core";
3
- declare class CursorHelpersClass {
4
- getDimension(props: any): any;
5
- withinBounds(point: any, bounds: any): boolean;
6
- private handleMouseMove;
7
- onMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {
8
- target: string;
9
- eventKey: string;
10
- mutation: () => {
11
- cursorValue: Selection.SVGCoordinateType | null;
12
- parentSVG: any;
13
- };
14
- }[]>;
15
- onMouseLeave: (evt: any, targetProps: any) => {
16
- target: string;
17
- eventKey: string;
18
- mutation: () => {
19
- cursorValue: Selection.SVGCoordinateType | null;
20
- parentSVG: any;
21
- };
22
- }[];
23
- onTouchEnd: (evt: any, targetProps: any) => {
24
- target: string;
25
- eventKey: string;
26
- mutation: () => {
27
- cursorValue: null;
28
- };
29
- }[];
30
- }
31
- export declare const CursorHelpers: CursorHelpersClass;
32
- export {};
1
+ /// <reference types="lodash" />
2
+ import { Selection } from "victory-core";
3
+ declare class CursorHelpersClass {
4
+ getDimension(props: any): any;
5
+ withinBounds(point: any, bounds: any): boolean;
6
+ private handleMouseMove;
7
+ onMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {
8
+ target: string;
9
+ eventKey: string;
10
+ mutation: () => {
11
+ cursorValue: Selection.SVGCoordinateType | null;
12
+ parentSVG: any;
13
+ };
14
+ }[]>;
15
+ onMouseLeave: (evt: any, targetProps: any) => {
16
+ target: string;
17
+ eventKey: string;
18
+ mutation: () => {
19
+ cursorValue: Selection.SVGCoordinateType | null;
20
+ parentSVG: any;
21
+ };
22
+ }[];
23
+ onTouchEnd: (evt: any, targetProps: any) => {
24
+ target: string;
25
+ eventKey: string;
26
+ mutation: () => {
27
+ cursorValue: null;
28
+ };
29
+ }[];
30
+ }
31
+ export declare const CursorHelpers: CursorHelpersClass;
32
+ export {};
33
33
  //# sourceMappingURL=cursor-helpers.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./cursor-helpers";
2
- export * from "./victory-cursor-container";
1
+ export * from "./cursor-helpers";
2
+ export * from "./victory-cursor-container";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,85 +1,134 @@
1
- import React from "react";
2
- import { VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor, VictoryEventHandler, DomainTuple, PaddingProps } from "victory-core";
3
- export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
4
- export interface VictoryCursorContainerProps extends VictoryContainerProps {
5
- cursorComponent?: React.ReactElement;
6
- cursorDimension?: "x" | "y";
7
- cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
8
- cursorLabelComponent?: React.ReactElement;
9
- cursorLabelOffset?: CursorCoordinatesPropType;
10
- defaultCursorValue?: CursorCoordinatesPropType;
11
- disable?: boolean;
12
- horizontal?: boolean;
13
- padding?: PaddingProps;
14
- onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
15
- }
16
- export declare const VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS: {
17
- cursorLabelComponent: JSX.Element;
18
- cursorLabelOffset: {
19
- x: number;
20
- y: number;
21
- };
22
- cursorComponent: JSX.Element;
23
- };
24
- export declare const useVictoryCursorContainer: (initialProps: VictoryCursorContainerProps) => {
25
- props: {
26
- cursorValue: CoordinatesPropType | null;
27
- domain: {
28
- x: DomainTuple;
29
- y: DomainTuple;
30
- };
31
- cursorComponent: JSX.Element;
32
- cursorDimension?: "x" | "y" | undefined;
33
- cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
34
- cursorLabelComponent: JSX.Element;
35
- cursorLabelOffset: CursorCoordinatesPropType;
36
- defaultCursorValue?: CursorCoordinatesPropType | undefined;
37
- disable?: boolean | undefined;
38
- horizontal?: boolean | undefined;
39
- padding?: PaddingProps | undefined;
40
- onCursorChange?: ((value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void) | undefined;
41
- "aria-describedby"?: string | undefined;
42
- "aria-labelledby"?: string | undefined;
43
- children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
44
- className?: string | undefined;
45
- containerId?: string | number | undefined;
46
- containerRef?: React.Ref<HTMLElement> | undefined;
47
- desc?: string | undefined;
48
- events?: React.DOMAttributes<any> | undefined;
49
- height?: number | undefined;
50
- name?: string | undefined;
51
- origin?: import("victory-core").OriginType | undefined;
52
- polar?: boolean | undefined;
53
- portalComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
54
- portalZIndex?: number | undefined;
55
- preserveAspectRatio?: string | undefined;
56
- responsive?: boolean | undefined;
57
- role?: string | undefined;
58
- scale?: {
59
- x?: import("victory-core").D3Scale<any> | undefined;
60
- y?: import("victory-core").D3Scale<any> | undefined;
61
- } | undefined;
62
- style?: React.CSSProperties | undefined;
63
- tabIndex?: number | undefined;
64
- theme?: import("victory-core").VictoryThemeDefinition | undefined;
65
- title?: string | undefined;
66
- width?: number | undefined;
67
- ouiaId?: string | number | undefined;
68
- ouiaSafe?: boolean | undefined;
69
- ouiaType?: string | undefined;
70
- };
71
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
72
- };
73
- export declare const VictoryCursorContainer: {
74
- (initialProps: VictoryCursorContainerProps): JSX.Element;
75
- role: string;
76
- defaultEvents(initialProps: VictoryCursorContainerProps): {
77
- target: string;
78
- eventHandlers: {
79
- onMouseLeave: VictoryEventHandler;
80
- onMouseMove: VictoryEventHandler;
81
- onTouchMove: VictoryEventHandler;
82
- };
83
- }[];
84
- };
1
+ import React from "react";
2
+ import { VictoryContainer, VictoryContainerProps, CoordinatesPropType, VictoryLabelProps, ValueOrAccessor } from "victory-core";
3
+ export declare type CursorCoordinatesPropType = CoordinatesPropType | number;
4
+ export interface VictoryCursorContainerProps extends VictoryContainerProps {
5
+ cursorComponent?: React.ReactElement;
6
+ cursorDimension?: "x" | "y";
7
+ cursorLabel?: ValueOrAccessor<VictoryLabelProps["text"]>;
8
+ cursorLabelComponent?: React.ReactElement;
9
+ cursorLabelOffset?: CursorCoordinatesPropType;
10
+ defaultCursorValue?: CursorCoordinatesPropType;
11
+ disable?: boolean;
12
+ onCursorChange?: (value: CursorCoordinatesPropType, props: VictoryCursorContainerProps) => void;
13
+ }
14
+ declare type ComponentClass<TProps> = {
15
+ new (props: TProps): React.Component<TProps>;
16
+ };
17
+ export declare function cursorContainerMixin<TBase extends ComponentClass<TProps>, TProps extends VictoryCursorContainerProps>(Base: TBase): {
18
+ new (props: TProps): {
19
+ getCursorPosition(props: any): any;
20
+ getCursorLabelOffset(props: any): any;
21
+ getPadding(props: any): {
22
+ top: any;
23
+ bottom: any;
24
+ left: any;
25
+ right: any;
26
+ };
27
+ getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
28
+ getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
29
+ context: unknown;
30
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
31
+ forceUpdate(callback?: (() => void) | undefined): void;
32
+ render(): React.ReactNode;
33
+ readonly props: Readonly<TProps>;
34
+ state: Readonly<{}>;
35
+ refs: {
36
+ [key: string]: React.ReactInstance;
37
+ };
38
+ componentDidMount?(): void;
39
+ shouldComponentUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): boolean;
40
+ componentWillUnmount?(): void;
41
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
42
+ getSnapshotBeforeUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>): any;
43
+ componentDidUpdate?(prevProps: Readonly<TProps>, prevState: Readonly<{}>, snapshot?: any): void;
44
+ componentWillMount?(): void;
45
+ UNSAFE_componentWillMount?(): void;
46
+ componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
47
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TProps>, nextContext: any): void;
48
+ componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
49
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<TProps>, nextState: Readonly<{}>, nextContext: any): void;
50
+ };
51
+ displayName: string;
52
+ defaultProps: {
53
+ cursorLabelComponent: JSX.Element;
54
+ cursorLabelOffset: {
55
+ x: number;
56
+ y: number;
57
+ };
58
+ cursorComponent: JSX.Element;
59
+ className: string;
60
+ portalComponent: JSX.Element;
61
+ portalZIndex: number;
62
+ responsive: boolean;
63
+ role: string;
64
+ };
65
+ defaultEvents: (props: any) => {
66
+ target: string;
67
+ eventHandlers: {
68
+ onMouseLeave: (evt: any, targetProps: any) => {};
69
+ onTouchCancel: () => never[];
70
+ onMouseMove: (evt: any, targetProps: any) => {} | undefined;
71
+ onTouchMove: (evt: any, targetProps: any) => {} | undefined;
72
+ };
73
+ }[];
74
+ } & TBase;
75
+ export declare const VictoryCursorContainer: {
76
+ new (props: VictoryCursorContainerProps): {
77
+ getCursorPosition(props: any): any;
78
+ getCursorLabelOffset(props: any): any;
79
+ getPadding(props: any): {
80
+ top: any;
81
+ bottom: any;
82
+ left: any;
83
+ right: any;
84
+ };
85
+ getCursorElements(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
86
+ getChildren(props: any): (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment)[];
87
+ context: unknown;
88
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<VictoryCursorContainerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
89
+ forceUpdate(callback?: (() => void) | undefined): void;
90
+ render(): React.ReactNode;
91
+ readonly props: Readonly<VictoryCursorContainerProps>;
92
+ state: Readonly<{}>;
93
+ refs: {
94
+ [key: string]: React.ReactInstance;
95
+ };
96
+ componentDidMount?(): void;
97
+ shouldComponentUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
98
+ componentWillUnmount?(): void;
99
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
100
+ getSnapshotBeforeUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>): any;
101
+ componentDidUpdate?(prevProps: Readonly<VictoryCursorContainerProps>, prevState: Readonly<{}>, snapshot?: any): void;
102
+ componentWillMount?(): void;
103
+ UNSAFE_componentWillMount?(): void;
104
+ componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
105
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<VictoryCursorContainerProps>, nextContext: any): void;
106
+ componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
107
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<VictoryCursorContainerProps>, nextState: Readonly<{}>, nextContext: any): void;
108
+ };
109
+ displayName: string;
110
+ defaultProps: {
111
+ cursorLabelComponent: JSX.Element;
112
+ cursorLabelOffset: {
113
+ x: number;
114
+ y: number;
115
+ };
116
+ cursorComponent: JSX.Element;
117
+ className: string;
118
+ portalComponent: JSX.Element;
119
+ portalZIndex: number;
120
+ responsive: boolean;
121
+ role: string;
122
+ };
123
+ defaultEvents: (props: any) => {
124
+ target: string;
125
+ eventHandlers: {
126
+ onMouseLeave: (evt: any, targetProps: any) => {};
127
+ onTouchCancel: () => never[];
128
+ onMouseMove: (evt: any, targetProps: any) => {} | undefined;
129
+ onTouchMove: (evt: any, targetProps: any) => {} | undefined;
130
+ };
131
+ }[];
132
+ } & typeof VictoryContainer;
133
+ export {};
85
134
  //# sourceMappingURL=victory-cursor-container.d.ts.map