victory-core 36.9.2-next.3 → 37.0.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 +28 -10
- package/README.md +1 -1
- package/dist/victory-core.js +4449 -6196
- 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-accessible-group/victory-accessible-group.js +9 -15
- package/es/victory-animation/util.d.ts +66 -66
- package/es/victory-animation/util.js +28 -47
- package/es/victory-animation/victory-animation.d.ts +34 -34
- package/es/victory-animation/victory-animation.js +51 -67
- package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/es/victory-clip-container/victory-clip-container.js +153 -229
- package/es/victory-container/victory-container.d.ts +68 -68
- package/es/victory-container/victory-container.js +157 -216
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-label/victory-label.js +246 -323
- package/es/victory-portal/portal-context.d.ts +11 -11
- package/es/victory-portal/portal-context.js +1 -2
- package/es/victory-portal/portal.d.ts +20 -20
- package/es/victory-portal/portal.js +30 -76
- package/es/victory-portal/victory-portal.d.ts +26 -26
- package/es/victory-portal/victory-portal.js +47 -104
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/arc.js +44 -47
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/background.js +14 -17
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/border.js +20 -24
- package/es/victory-primitives/circle.d.ts +3 -3
- package/es/victory-primitives/circle.js +13 -27
- package/es/victory-primitives/clip-path.d.ts +7 -7
- package/es/victory-primitives/clip-path.js +3 -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 +20 -24
- package/es/victory-primitives/line.d.ts +3 -3
- package/es/victory-primitives/line.js +13 -27
- package/es/victory-primitives/path.d.ts +3 -3
- package/es/victory-primitives/path.js +13 -27
- package/es/victory-primitives/point.d.ts +13 -13
- package/es/victory-primitives/point.js +36 -40
- package/es/victory-primitives/rect.d.ts +3 -3
- package/es/victory-primitives/rect.js +13 -27
- package/es/victory-primitives/text.d.ts +8 -8
- package/es/victory-primitives/text.js +15 -28
- package/es/victory-primitives/tspan.d.ts +3 -3
- package/es/victory-primitives/tspan.js +13 -26
- package/es/victory-primitives/types.d.ts +7 -7
- package/es/victory-primitives/whisker.d.ts +15 -15
- package/es/victory-primitives/whisker.js +43 -47
- package/es/victory-theme/grayscale.d.ts +2 -2
- package/es/victory-theme/grayscale.js +22 -22
- package/es/victory-theme/material.d.ts +2 -2
- package/es/victory-theme/material.js +46 -46
- package/es/victory-theme/types.d.ts +238 -238
- package/es/victory-theme/victory-theme.d.ts +5 -5
- package/es/victory-theme/victory-theme.js +3 -3
- package/es/victory-transition/victory-transition.d.ts +53 -53
- package/es/victory-transition/victory-transition.js +126 -206
- package/es/victory-util/add-events.d.ts +126 -126
- package/es/victory-util/add-events.js +265 -380
- package/es/victory-util/axis.d.ts +50 -50
- package/es/victory-util/axis.js +133 -222
- package/es/victory-util/collection.d.ts +15 -8
- package/es/victory-util/collection.js +24 -36
- package/es/victory-util/common-props.d.ts +79 -79
- package/es/victory-util/data.d.ts +74 -74
- package/es/victory-util/data.js +159 -214
- package/es/victory-util/default-transitions.d.ts +4 -4
- package/es/victory-util/default-transitions.js +33 -51
- package/es/victory-util/domain.d.ts +90 -90
- package/es/victory-util/domain.js +122 -171
- package/es/victory-util/events.d.ts +64 -64
- package/es/victory-util/events.js +168 -258
- package/es/victory-util/helpers.d.ts +96 -91
- package/es/victory-util/helpers.js +162 -176
- 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-animation-state.js +61 -99
- package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/es/victory-util/hooks/use-previous-props.js +2 -2
- package/es/victory-util/immutable.d.ts +11 -11
- package/es/victory-util/immutable.js +6 -8
- package/es/victory-util/index.d.ts +26 -26
- package/es/victory-util/label-helpers.d.ts +26 -26
- package/es/victory-util/label-helpers.js +128 -130
- package/es/victory-util/line-helpers.d.ts +4 -4
- package/es/victory-util/line-helpers.js +29 -41
- package/es/victory-util/log.d.ts +1 -1
- package/es/victory-util/log.js +1 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -9
- package/es/victory-util/point-path-helpers.js +89 -49
- package/es/victory-util/scale.d.ts +9 -9
- package/es/victory-util/scale.js +24 -42
- package/es/victory-util/selection.d.ts +28 -28
- package/es/victory-util/selection.js +39 -40
- package/es/victory-util/style.d.ts +18 -18
- package/es/victory-util/style.js +8 -13
- package/es/victory-util/textsize.d.ts +35 -35
- package/es/victory-util/textsize.js +80 -154
- package/es/victory-util/timer-context.d.ts +11 -11
- package/es/victory-util/timer-context.js +2 -2
- package/es/victory-util/timer.d.ts +16 -16
- package/es/victory-util/timer.js +40 -76
- package/es/victory-util/transitions.d.ts +48 -48
- package/es/victory-util/transitions.js +110 -150
- package/es/victory-util/type-helpers.d.ts +9 -9
- package/es/victory-util/type-helpers.js +2 -3
- package/es/victory-util/user-props.d.ts +26 -26
- package/es/victory-util/user-props.js +24 -49
- package/es/victory-util/wrapper.d.ts +33 -37
- package/es/victory-util/wrapper.js +182 -245
- package/lib/index.d.ts +17 -17
- package/lib/index.js +0 -30
- 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-accessible-group/victory-accessible-group.js +9 -19
- package/lib/victory-animation/util.d.ts +66 -66
- package/lib/victory-animation/util.js +28 -63
- package/lib/victory-animation/victory-animation.d.ts +34 -34
- package/lib/victory-animation/victory-animation.js +54 -83
- package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/lib/victory-clip-container/victory-clip-container.js +156 -243
- package/lib/victory-container/victory-container.d.ts +68 -68
- package/lib/victory-container/victory-container.js +160 -232
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-label/victory-label.js +248 -344
- package/lib/victory-portal/portal-context.d.ts +11 -11
- package/lib/victory-portal/portal-context.js +1 -6
- package/lib/victory-portal/portal.d.ts +20 -20
- package/lib/victory-portal/portal.js +31 -81
- package/lib/victory-portal/victory-portal.d.ts +26 -26
- package/lib/victory-portal/victory-portal.js +50 -116
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/arc.js +48 -57
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/background.js +16 -28
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/border.js +22 -34
- package/lib/victory-primitives/circle.d.ts +3 -3
- package/lib/victory-primitives/circle.js +16 -36
- package/lib/victory-primitives/clip-path.d.ts +7 -7
- package/lib/victory-primitives/clip-path.js +3 -11
- package/lib/victory-primitives/index.d.ts +14 -14
- package/lib/victory-primitives/index.js +0 -28
- package/lib/victory-primitives/line-segment.d.ts +11 -11
- package/lib/victory-primitives/line-segment.js +22 -34
- package/lib/victory-primitives/line.d.ts +3 -3
- package/lib/victory-primitives/line.js +16 -36
- package/lib/victory-primitives/path.d.ts +3 -3
- package/lib/victory-primitives/path.js +16 -36
- package/lib/victory-primitives/point.d.ts +13 -13
- package/lib/victory-primitives/point.js +38 -52
- package/lib/victory-primitives/rect.d.ts +3 -3
- package/lib/victory-primitives/rect.js +16 -36
- package/lib/victory-primitives/text.d.ts +8 -8
- package/lib/victory-primitives/text.js +15 -33
- package/lib/victory-primitives/tspan.d.ts +3 -3
- package/lib/victory-primitives/tspan.js +13 -31
- package/lib/victory-primitives/types.d.ts +7 -7
- package/lib/victory-primitives/whisker.d.ts +15 -15
- package/lib/victory-primitives/whisker.js +45 -57
- package/lib/victory-theme/grayscale.d.ts +2 -2
- package/lib/victory-theme/grayscale.js +23 -24
- package/lib/victory-theme/material.d.ts +2 -2
- package/lib/victory-theme/material.js +47 -48
- package/lib/victory-theme/types.d.ts +238 -238
- package/lib/victory-theme/victory-theme.d.ts +5 -5
- package/lib/victory-theme/victory-theme.js +2 -7
- package/lib/victory-transition/victory-transition.d.ts +53 -53
- package/lib/victory-transition/victory-transition.js +129 -224
- package/lib/victory-util/add-events.d.ts +126 -126
- package/lib/victory-util/add-events.js +265 -382
- package/lib/victory-util/axis.d.ts +50 -50
- package/lib/victory-util/axis.js +135 -242
- package/lib/victory-util/collection.d.ts +15 -8
- package/lib/victory-util/collection.js +24 -43
- package/lib/victory-util/common-props.d.ts +79 -79
- package/lib/victory-util/data.d.ts +74 -74
- package/lib/victory-util/data.js +160 -239
- package/lib/victory-util/default-transitions.d.ts +4 -4
- package/lib/victory-util/default-transitions.js +33 -54
- package/lib/victory-util/domain.d.ts +90 -90
- package/lib/victory-util/domain.js +123 -193
- package/lib/victory-util/events.d.ts +64 -64
- package/lib/victory-util/events.js +167 -274
- package/lib/victory-util/helpers.d.ts +96 -91
- package/lib/victory-util/helpers.js +166 -204
- package/lib/victory-util/hooks/index.d.ts +2 -2
- package/lib/victory-util/hooks/index.js +0 -2
- package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/lib/victory-util/hooks/use-animation-state.js +63 -113
- package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/lib/victory-util/hooks/use-previous-props.js +2 -7
- package/lib/victory-util/immutable.d.ts +11 -11
- package/lib/victory-util/immutable.js +6 -18
- package/lib/victory-util/index.d.ts +26 -26
- package/lib/victory-util/index.js +2 -51
- package/lib/victory-util/label-helpers.d.ts +26 -26
- package/lib/victory-util/label-helpers.js +130 -141
- package/lib/victory-util/line-helpers.d.ts +4 -4
- package/lib/victory-util/line-helpers.js +31 -49
- package/lib/victory-util/log.d.ts +1 -1
- package/lib/victory-util/log.js +1 -2
- package/lib/victory-util/point-path-helpers.d.ts +9 -9
- package/lib/victory-util/point-path-helpers.js +91 -63
- package/lib/victory-util/scale.d.ts +9 -9
- package/lib/victory-util/scale.js +26 -57
- package/lib/victory-util/selection.d.ts +28 -28
- package/lib/victory-util/selection.js +41 -49
- package/lib/victory-util/style.d.ts +18 -18
- package/lib/victory-util/style.js +8 -16
- package/lib/victory-util/textsize.d.ts +35 -35
- package/lib/victory-util/textsize.js +80 -157
- package/lib/victory-util/timer-context.d.ts +11 -11
- package/lib/victory-util/timer-context.js +2 -8
- package/lib/victory-util/timer.d.ts +16 -16
- package/lib/victory-util/timer.js +40 -76
- package/lib/victory-util/transitions.d.ts +48 -48
- package/lib/victory-util/transitions.js +110 -152
- package/lib/victory-util/type-helpers.d.ts +9 -9
- package/lib/victory-util/type-helpers.js +2 -9
- package/lib/victory-util/user-props.d.ts +26 -26
- package/lib/victory-util/user-props.js +25 -59
- package/lib/victory-util/wrapper.d.ts +33 -37
- package/lib/victory-util/wrapper.js +184 -279
- package/package.json +6 -3
- package/src/types/prop-types.ts +0 -7
- package/src/victory-container/victory-container.tsx +195 -171
- package/src/victory-portal/portal-context.ts +4 -5
- package/src/victory-portal/portal.tsx +42 -5
- package/src/victory-portal/victory-portal.tsx +71 -34
- package/src/victory-util/add-events.tsx +6 -4
- package/src/victory-util/axis.tsx +12 -3
- package/src/victory-util/collection.tsx +13 -0
- package/src/victory-util/helpers.ts +11 -0
- package/src/victory-util/index.ts +0 -1
- package/src/victory-util/wrapper.tsx +1 -0
- package/src/victory-util/merge-refs.ts +0 -13
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BlockProps } from "../victory-theme/victory-theme";
|
|
3
|
-
import { OriginType } from "../victory-label/victory-label";
|
|
4
|
-
export interface VictoryClipContainerProps {
|
|
5
|
-
"aria-label"?: string;
|
|
6
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
7
|
-
circleComponent?: React.ReactElement;
|
|
8
|
-
className?: string;
|
|
9
|
-
clipHeight?: number;
|
|
10
|
-
clipId?: number | string;
|
|
11
|
-
clipPadding?: BlockProps;
|
|
12
|
-
clipPathComponent?: React.ReactElement;
|
|
13
|
-
clipWidth?: number;
|
|
14
|
-
events?: React.DOMAttributes<any>;
|
|
15
|
-
groupComponent?: React.ReactElement;
|
|
16
|
-
origin?: OriginType;
|
|
17
|
-
polar?: boolean;
|
|
18
|
-
radius?: number;
|
|
19
|
-
rectComponent?: React.ReactElement;
|
|
20
|
-
translateX?: number;
|
|
21
|
-
translateY?: number;
|
|
22
|
-
}
|
|
23
|
-
export declare class VictoryClipContainer extends React.Component<VictoryClipContainerProps> {
|
|
24
|
-
static displayName: string;
|
|
25
|
-
static role: string;
|
|
26
|
-
static defaultProps: {
|
|
27
|
-
circleComponent: JSX.Element;
|
|
28
|
-
rectComponent: JSX.Element;
|
|
29
|
-
clipPathComponent: JSX.Element;
|
|
30
|
-
groupComponent: JSX.Element;
|
|
31
|
-
};
|
|
32
|
-
clipId: VictoryClipContainerProps["clipId"];
|
|
33
|
-
constructor(props: VictoryClipContainerProps);
|
|
34
|
-
calculateAttributes(props: any): {
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
};
|
|
40
|
-
renderClippedGroup(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
41
|
-
renderGroup(props: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
42
|
-
renderClipComponent(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
43
|
-
getClipValue(props: any, axis: any): any;
|
|
44
|
-
getTranslateValue(props: any, axis: any): any;
|
|
45
|
-
render(): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
46
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BlockProps } from "../victory-theme/victory-theme";
|
|
3
|
+
import { OriginType } from "../victory-label/victory-label";
|
|
4
|
+
export interface VictoryClipContainerProps {
|
|
5
|
+
"aria-label"?: string;
|
|
6
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
7
|
+
circleComponent?: React.ReactElement;
|
|
8
|
+
className?: string;
|
|
9
|
+
clipHeight?: number;
|
|
10
|
+
clipId?: number | string;
|
|
11
|
+
clipPadding?: BlockProps;
|
|
12
|
+
clipPathComponent?: React.ReactElement;
|
|
13
|
+
clipWidth?: number;
|
|
14
|
+
events?: React.DOMAttributes<any>;
|
|
15
|
+
groupComponent?: React.ReactElement;
|
|
16
|
+
origin?: OriginType;
|
|
17
|
+
polar?: boolean;
|
|
18
|
+
radius?: number;
|
|
19
|
+
rectComponent?: React.ReactElement;
|
|
20
|
+
translateX?: number;
|
|
21
|
+
translateY?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare class VictoryClipContainer extends React.Component<VictoryClipContainerProps> {
|
|
24
|
+
static displayName: string;
|
|
25
|
+
static role: string;
|
|
26
|
+
static defaultProps: {
|
|
27
|
+
circleComponent: JSX.Element;
|
|
28
|
+
rectComponent: JSX.Element;
|
|
29
|
+
clipPathComponent: JSX.Element;
|
|
30
|
+
groupComponent: JSX.Element;
|
|
31
|
+
};
|
|
32
|
+
clipId: VictoryClipContainerProps["clipId"];
|
|
33
|
+
constructor(props: VictoryClipContainerProps);
|
|
34
|
+
calculateAttributes(props: any): {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
};
|
|
40
|
+
renderClippedGroup(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
41
|
+
renderGroup(props: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
42
|
+
renderClipComponent(props: any, clipId: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
43
|
+
getClipValue(props: any, axis: any): any;
|
|
44
|
+
getTranslateValue(props: any, axis: any): any;
|
|
45
|
+
render(): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
46
|
+
}
|
|
47
47
|
//# sourceMappingURL=victory-clip-container.d.ts.map
|
|
@@ -4,262 +4,175 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VictoryClipContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _uniqueId2 = _interopRequireDefault(require("lodash/uniqueId"));
|
|
9
|
-
|
|
10
8
|
var _isObject2 = _interopRequireDefault(require("lodash/isObject"));
|
|
11
|
-
|
|
12
9
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var Helpers = _interopRequireWildcard(require("../victory-util/helpers"));
|
|
17
|
-
|
|
18
12
|
var UserProps = _interopRequireWildcard(require("../victory-util/user-props"));
|
|
19
|
-
|
|
20
13
|
var _clipPath = require("../victory-primitives/clip-path");
|
|
21
|
-
|
|
22
14
|
var _circle = require("../victory-primitives/circle");
|
|
23
|
-
|
|
24
15
|
var _rect = require("../victory-primitives/rect");
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
49
|
-
|
|
50
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
51
|
-
|
|
52
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
53
|
-
|
|
54
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
55
|
-
|
|
56
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
57
|
-
|
|
58
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
59
|
-
|
|
60
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
61
|
-
|
|
62
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
63
|
-
|
|
64
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
65
|
-
|
|
66
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
67
|
-
|
|
68
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
69
|
-
|
|
70
|
-
var VictoryClipContainer = /*#__PURE__*/function (_React$Component) {
|
|
71
|
-
_inherits(VictoryClipContainer, _React$Component);
|
|
72
|
-
|
|
73
|
-
var _super = _createSuper(VictoryClipContainer);
|
|
74
|
-
|
|
75
|
-
function VictoryClipContainer(props) {
|
|
76
|
-
var _this;
|
|
77
|
-
|
|
78
|
-
_classCallCheck(this, VictoryClipContainer);
|
|
79
|
-
|
|
80
|
-
_this = _super.call(this, props);
|
|
81
|
-
_this.clipId = void 0;
|
|
82
|
-
_this.clipId = !(0, _isObject2.default)(props) || props.clipId === undefined ? (0, _uniqueId2.default)("victory-clip-") : props.clipId;
|
|
83
|
-
return _this;
|
|
19
|
+
class VictoryClipContainer extends _react.default.Component {
|
|
20
|
+
static displayName = "VictoryClipContainer";
|
|
21
|
+
static role = "container";
|
|
22
|
+
static defaultProps = {
|
|
23
|
+
circleComponent: /*#__PURE__*/_react.default.createElement(_circle.Circle, null),
|
|
24
|
+
rectComponent: /*#__PURE__*/_react.default.createElement(_rect.Rect, null),
|
|
25
|
+
clipPathComponent: /*#__PURE__*/_react.default.createElement(_clipPath.ClipPath, null),
|
|
26
|
+
groupComponent: /*#__PURE__*/_react.default.createElement("g", null)
|
|
27
|
+
};
|
|
28
|
+
constructor(props) {
|
|
29
|
+
super(props);
|
|
30
|
+
this.clipId = !(0, _isObject2.default)(props) || props.clipId === undefined ? (0, _uniqueId2.default)("victory-clip-") : props.clipId;
|
|
84
31
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
32
|
+
calculateAttributes(props) {
|
|
33
|
+
const {
|
|
34
|
+
polar,
|
|
35
|
+
origin,
|
|
36
|
+
clipWidth = 0,
|
|
37
|
+
clipHeight = 0,
|
|
38
|
+
translateX = 0,
|
|
39
|
+
translateY = 0
|
|
40
|
+
} = props;
|
|
41
|
+
const clipPadding = Helpers.getPadding({
|
|
42
|
+
padding: props.clipPadding
|
|
43
|
+
});
|
|
44
|
+
const radius = props.radius || Helpers.getRadius(props);
|
|
45
|
+
return {
|
|
46
|
+
x: (polar ? origin.x : translateX) - clipPadding.left,
|
|
47
|
+
y: (polar ? origin.y : translateY) - clipPadding.top,
|
|
48
|
+
width: Math.max((polar ? radius : clipWidth) + clipPadding.left + clipPadding.right, 0),
|
|
49
|
+
height: Math.max((polar ? radius : clipHeight) + clipPadding.top + clipPadding.bottom, 0)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
renderClippedGroup(props, clipId) {
|
|
53
|
+
const userProps = UserProps.getSafeUserProps(props);
|
|
54
|
+
const {
|
|
55
|
+
style,
|
|
56
|
+
events,
|
|
57
|
+
transform,
|
|
58
|
+
children,
|
|
59
|
+
className,
|
|
60
|
+
groupComponent,
|
|
61
|
+
tabIndex
|
|
62
|
+
} = props;
|
|
63
|
+
const clipComponent = this.renderClipComponent(props, clipId);
|
|
64
|
+
const groupProps = Object.assign({
|
|
65
|
+
className,
|
|
66
|
+
style,
|
|
67
|
+
transform,
|
|
68
|
+
key: `clipped-group-${clipId}`,
|
|
69
|
+
clipPath: `url(#${clipId})`
|
|
70
|
+
}, events);
|
|
71
|
+
return /*#__PURE__*/_react.default.cloneElement(groupComponent, {
|
|
72
|
+
...groupProps,
|
|
73
|
+
tabIndex,
|
|
74
|
+
...userProps
|
|
75
|
+
}, [clipComponent, ..._react.default.Children.toArray(children)]);
|
|
76
|
+
}
|
|
77
|
+
renderGroup(props) {
|
|
78
|
+
const {
|
|
79
|
+
style,
|
|
80
|
+
events,
|
|
81
|
+
transform,
|
|
82
|
+
children,
|
|
83
|
+
className,
|
|
84
|
+
groupComponent,
|
|
85
|
+
tabIndex
|
|
86
|
+
} = props;
|
|
87
|
+
return /*#__PURE__*/_react.default.cloneElement(groupComponent, Object.assign({
|
|
88
|
+
className,
|
|
89
|
+
style,
|
|
90
|
+
transform,
|
|
91
|
+
"aria-label": props["aria-label"],
|
|
92
|
+
tabIndex
|
|
93
|
+
}, events), children);
|
|
94
|
+
}
|
|
95
|
+
renderClipComponent(props, clipId) {
|
|
96
|
+
const {
|
|
97
|
+
polar,
|
|
98
|
+
origin,
|
|
99
|
+
clipWidth = 0,
|
|
100
|
+
clipHeight = 0,
|
|
101
|
+
translateX = 0,
|
|
102
|
+
translateY = 0,
|
|
103
|
+
circleComponent,
|
|
104
|
+
rectComponent,
|
|
105
|
+
clipPathComponent
|
|
106
|
+
} = props;
|
|
107
|
+
const {
|
|
108
|
+
top,
|
|
109
|
+
bottom,
|
|
110
|
+
left,
|
|
111
|
+
right
|
|
112
|
+
} = Helpers.getPadding({
|
|
113
|
+
padding: props.clipPadding
|
|
114
|
+
});
|
|
115
|
+
let child;
|
|
116
|
+
if (polar) {
|
|
117
|
+
const radius = props.radius || Helpers.getRadius(props);
|
|
118
|
+
const circleProps = {
|
|
119
|
+
r: Math.max(radius + left + right, radius + top + bottom, 0),
|
|
120
|
+
cx: origin.x - left,
|
|
121
|
+
cy: origin.y - top
|
|
108
122
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
transform = props.transform,
|
|
117
|
-
children = props.children,
|
|
118
|
-
className = props.className,
|
|
119
|
-
groupComponent = props.groupComponent,
|
|
120
|
-
tabIndex = props.tabIndex;
|
|
121
|
-
var clipComponent = this.renderClipComponent(props, clipId);
|
|
122
|
-
var groupProps = Object.assign({
|
|
123
|
-
className: className,
|
|
124
|
-
style: style,
|
|
125
|
-
transform: transform,
|
|
126
|
-
key: "clipped-group-".concat(clipId),
|
|
127
|
-
clipPath: "url(#".concat(clipId, ")")
|
|
128
|
-
}, events);
|
|
129
|
-
return /*#__PURE__*/_react.default.cloneElement(groupComponent, _objectSpread(_objectSpread({}, groupProps), {}, {
|
|
130
|
-
tabIndex: tabIndex
|
|
131
|
-
}, userProps), [clipComponent].concat(_toConsumableArray(_react.default.Children.toArray(children))));
|
|
132
|
-
}
|
|
133
|
-
}, {
|
|
134
|
-
key: "renderGroup",
|
|
135
|
-
value: function renderGroup(props) {
|
|
136
|
-
var style = props.style,
|
|
137
|
-
events = props.events,
|
|
138
|
-
transform = props.transform,
|
|
139
|
-
children = props.children,
|
|
140
|
-
className = props.className,
|
|
141
|
-
groupComponent = props.groupComponent,
|
|
142
|
-
tabIndex = props.tabIndex;
|
|
143
|
-
return /*#__PURE__*/_react.default.cloneElement(groupComponent, Object.assign({
|
|
144
|
-
className: className,
|
|
145
|
-
style: style,
|
|
146
|
-
transform: transform,
|
|
147
|
-
"aria-label": props["aria-label"],
|
|
148
|
-
tabIndex: tabIndex
|
|
149
|
-
}, events), children);
|
|
150
|
-
}
|
|
151
|
-
}, {
|
|
152
|
-
key: "renderClipComponent",
|
|
153
|
-
value: function renderClipComponent(props, clipId) {
|
|
154
|
-
var polar = props.polar,
|
|
155
|
-
origin = props.origin,
|
|
156
|
-
_props$clipWidth2 = props.clipWidth,
|
|
157
|
-
clipWidth = _props$clipWidth2 === void 0 ? 0 : _props$clipWidth2,
|
|
158
|
-
_props$clipHeight2 = props.clipHeight,
|
|
159
|
-
clipHeight = _props$clipHeight2 === void 0 ? 0 : _props$clipHeight2,
|
|
160
|
-
_props$translateX2 = props.translateX,
|
|
161
|
-
translateX = _props$translateX2 === void 0 ? 0 : _props$translateX2,
|
|
162
|
-
_props$translateY2 = props.translateY,
|
|
163
|
-
translateY = _props$translateY2 === void 0 ? 0 : _props$translateY2,
|
|
164
|
-
circleComponent = props.circleComponent,
|
|
165
|
-
rectComponent = props.rectComponent,
|
|
166
|
-
clipPathComponent = props.clipPathComponent;
|
|
167
|
-
|
|
168
|
-
var _Helpers$getPadding = Helpers.getPadding({
|
|
169
|
-
padding: props.clipPadding
|
|
170
|
-
}),
|
|
171
|
-
top = _Helpers$getPadding.top,
|
|
172
|
-
bottom = _Helpers$getPadding.bottom,
|
|
173
|
-
left = _Helpers$getPadding.left,
|
|
174
|
-
right = _Helpers$getPadding.right;
|
|
175
|
-
|
|
176
|
-
var child;
|
|
177
|
-
|
|
178
|
-
if (polar) {
|
|
179
|
-
var radius = props.radius || Helpers.getRadius(props);
|
|
180
|
-
var circleProps = {
|
|
181
|
-
r: Math.max(radius + left + right, radius + top + bottom, 0),
|
|
182
|
-
cx: origin.x - left,
|
|
183
|
-
cy: origin.y - top
|
|
184
|
-
};
|
|
185
|
-
child = /*#__PURE__*/_react.default.cloneElement(circleComponent, circleProps);
|
|
186
|
-
} else {
|
|
187
|
-
var rectProps = {
|
|
188
|
-
x: translateX - left,
|
|
189
|
-
y: translateY - top,
|
|
190
|
-
width: Math.max(clipWidth + left + right, 0),
|
|
191
|
-
height: Math.max(clipHeight + top + bottom, 0)
|
|
192
|
-
};
|
|
193
|
-
child = /*#__PURE__*/_react.default.cloneElement(rectComponent, rectProps);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return /*#__PURE__*/_react.default.cloneElement(clipPathComponent, Object.assign({
|
|
197
|
-
key: "clip-path-".concat(clipId)
|
|
198
|
-
}, props, {
|
|
199
|
-
clipId: clipId
|
|
200
|
-
}), child);
|
|
201
|
-
}
|
|
202
|
-
}, {
|
|
203
|
-
key: "getClipValue",
|
|
204
|
-
value: function getClipValue(props, axis) {
|
|
205
|
-
var clipValues = {
|
|
206
|
-
x: props.clipWidth,
|
|
207
|
-
y: props.clipHeight
|
|
123
|
+
child = /*#__PURE__*/_react.default.cloneElement(circleComponent, circleProps);
|
|
124
|
+
} else {
|
|
125
|
+
const rectProps = {
|
|
126
|
+
x: translateX - left,
|
|
127
|
+
y: translateY - top,
|
|
128
|
+
width: Math.max(clipWidth + left + right, 0),
|
|
129
|
+
height: Math.max(clipHeight + top + bottom, 0)
|
|
208
130
|
};
|
|
209
|
-
|
|
210
|
-
if (clipValues[axis] !== undefined) {
|
|
211
|
-
return clipValues[axis];
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
var range = Helpers.getRange(props, axis);
|
|
215
|
-
return range ? Math.abs(range[0] - range[1]) || undefined : undefined;
|
|
131
|
+
child = /*#__PURE__*/_react.default.cloneElement(rectComponent, rectProps);
|
|
216
132
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return range ? Math.min.apply(Math, _toConsumableArray(range)) : undefined;
|
|
133
|
+
return /*#__PURE__*/_react.default.cloneElement(clipPathComponent, Object.assign({
|
|
134
|
+
key: `clip-path-${clipId}`
|
|
135
|
+
}, props, {
|
|
136
|
+
clipId
|
|
137
|
+
}), child);
|
|
138
|
+
}
|
|
139
|
+
getClipValue(props, axis) {
|
|
140
|
+
const clipValues = {
|
|
141
|
+
x: props.clipWidth,
|
|
142
|
+
y: props.clipHeight
|
|
143
|
+
};
|
|
144
|
+
if (clipValues[axis] !== undefined) {
|
|
145
|
+
return clipValues[axis];
|
|
231
146
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
var translateX = this.getTranslateValue(this.props, "x");
|
|
243
|
-
var translateY = this.getTranslateValue(this.props, "y");
|
|
244
|
-
var clipProps = (0, _defaults2.default)({}, this.props, {
|
|
245
|
-
clipHeight: clipHeight,
|
|
246
|
-
clipWidth: clipWidth,
|
|
247
|
-
translateX: translateX,
|
|
248
|
-
translateY: translateY
|
|
249
|
-
});
|
|
250
|
-
return this.renderClippedGroup(clipProps, this.clipId);
|
|
147
|
+
const range = Helpers.getRange(props, axis);
|
|
148
|
+
return range ? Math.abs(range[0] - range[1]) || undefined : undefined;
|
|
149
|
+
}
|
|
150
|
+
getTranslateValue(props, axis) {
|
|
151
|
+
const translateValues = {
|
|
152
|
+
x: props.translateX,
|
|
153
|
+
y: props.translateY
|
|
154
|
+
};
|
|
155
|
+
if (translateValues[axis] !== undefined) {
|
|
156
|
+
return translateValues[axis];
|
|
251
157
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
158
|
+
const range = Helpers.getRange(props, axis);
|
|
159
|
+
return range ? Math.min(...range) : undefined;
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
const clipHeight = this.getClipValue(this.props, "y");
|
|
163
|
+
const clipWidth = this.getClipValue(this.props, "x");
|
|
164
|
+
if (clipWidth === undefined || clipHeight === undefined) {
|
|
165
|
+
return this.renderGroup(this.props);
|
|
166
|
+
}
|
|
167
|
+
const translateX = this.getTranslateValue(this.props, "x");
|
|
168
|
+
const translateY = this.getTranslateValue(this.props, "y");
|
|
169
|
+
const clipProps = (0, _defaults2.default)({}, this.props, {
|
|
170
|
+
clipHeight,
|
|
171
|
+
clipWidth,
|
|
172
|
+
translateX,
|
|
173
|
+
translateY
|
|
174
|
+
});
|
|
175
|
+
return this.renderClippedGroup(clipProps, this.clipId);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
exports.VictoryClipContainer = VictoryClipContainer;
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OriginType } from "../victory-label/victory-label";
|
|
3
|
-
import { D3Scale } from "../types/prop-types";
|
|
4
|
-
import { VictoryThemeDefinition } from "../victory-theme/types";
|
|
5
|
-
export interface VictoryContainerProps {
|
|
6
|
-
"aria-describedby"?: string;
|
|
7
|
-
"aria-labelledby"?: string;
|
|
8
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
-
className?: string;
|
|
10
|
-
containerId?: number | string;
|
|
11
|
-
containerRef?: React.Ref<HTMLElement>;
|
|
12
|
-
desc?: string;
|
|
13
|
-
events?: React.DOMAttributes<any>;
|
|
14
|
-
height?: number;
|
|
15
|
-
name?: string;
|
|
16
|
-
origin?: OriginType;
|
|
17
|
-
ouiaId?: number | string;
|
|
18
|
-
ouiaSafe?: boolean;
|
|
19
|
-
ouiaType?: string;
|
|
20
|
-
polar?: boolean;
|
|
21
|
-
portalComponent?: React.ReactElement;
|
|
22
|
-
portalZIndex?: number;
|
|
23
|
-
preserveAspectRatio?: string;
|
|
24
|
-
responsive?: boolean;
|
|
25
|
-
role?: string;
|
|
26
|
-
scale?: {
|
|
27
|
-
x?: D3Scale;
|
|
28
|
-
y?: D3Scale;
|
|
29
|
-
};
|
|
30
|
-
style?: React.CSSProperties;
|
|
31
|
-
tabIndex?: number;
|
|
32
|
-
theme?: VictoryThemeDefinition;
|
|
33
|
-
title?: string;
|
|
34
|
-
width?: number;
|
|
35
|
-
}
|
|
36
|
-
export declare class VictoryContainer<TProps extends VictoryContainerProps> extends React.Component<TProps> {
|
|
37
|
-
static displayName: string;
|
|
38
|
-
static role: string;
|
|
39
|
-
static defaultProps: {
|
|
40
|
-
className: string;
|
|
41
|
-
portalComponent: JSX.Element;
|
|
42
|
-
portalZIndex: number;
|
|
43
|
-
responsive: boolean;
|
|
44
|
-
role: string;
|
|
45
|
-
};
|
|
46
|
-
static contextType: React.Context<{
|
|
47
|
-
transitionTimer: import("..").Timer;
|
|
48
|
-
animationTimer: import("..").Timer;
|
|
49
|
-
}>;
|
|
50
|
-
private containerId;
|
|
51
|
-
private portalRef;
|
|
52
|
-
private containerRef;
|
|
53
|
-
private shouldHandleWheel;
|
|
54
|
-
constructor(props: TProps);
|
|
55
|
-
savePortalRef: (portal: any) => any;
|
|
56
|
-
portalUpdate: (key: any, el: any) => void;
|
|
57
|
-
portalRegister: () => number;
|
|
58
|
-
portalDeregister: (key: any) => void;
|
|
59
|
-
saveContainerRef: (container: HTMLElement) => HTMLElement;
|
|
60
|
-
handleWheel: (e: any) => any;
|
|
61
|
-
componentDidMount(): void;
|
|
62
|
-
componentWillUnmount(): void;
|
|
63
|
-
getIdForElement(elementName: any): string;
|
|
64
|
-
getChildren(props: any): any;
|
|
65
|
-
getOUIAProps(props: any): any;
|
|
66
|
-
renderContainer(props: any, svgProps: any, style: any): JSX.Element;
|
|
67
|
-
render(): JSX.Element;
|
|
68
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { OriginType } from "../victory-label/victory-label";
|
|
3
|
+
import { D3Scale } from "../types/prop-types";
|
|
4
|
+
import { VictoryThemeDefinition } from "../victory-theme/types";
|
|
5
|
+
export interface VictoryContainerProps {
|
|
6
|
+
"aria-describedby"?: string;
|
|
7
|
+
"aria-labelledby"?: string;
|
|
8
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
+
className?: string;
|
|
10
|
+
containerId?: number | string;
|
|
11
|
+
containerRef?: React.Ref<HTMLElement>;
|
|
12
|
+
desc?: string;
|
|
13
|
+
events?: React.DOMAttributes<any>;
|
|
14
|
+
height?: number;
|
|
15
|
+
name?: string;
|
|
16
|
+
origin?: OriginType;
|
|
17
|
+
ouiaId?: number | string;
|
|
18
|
+
ouiaSafe?: boolean;
|
|
19
|
+
ouiaType?: string;
|
|
20
|
+
polar?: boolean;
|
|
21
|
+
portalComponent?: React.ReactElement;
|
|
22
|
+
portalZIndex?: number;
|
|
23
|
+
preserveAspectRatio?: string;
|
|
24
|
+
responsive?: boolean;
|
|
25
|
+
role?: string;
|
|
26
|
+
scale?: {
|
|
27
|
+
x?: D3Scale;
|
|
28
|
+
y?: D3Scale;
|
|
29
|
+
};
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
tabIndex?: number;
|
|
32
|
+
theme?: VictoryThemeDefinition;
|
|
33
|
+
title?: string;
|
|
34
|
+
width?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare class VictoryContainer<TProps extends VictoryContainerProps> extends React.Component<TProps> {
|
|
37
|
+
static displayName: string;
|
|
38
|
+
static role: string;
|
|
39
|
+
static defaultProps: {
|
|
40
|
+
className: string;
|
|
41
|
+
portalComponent: JSX.Element;
|
|
42
|
+
portalZIndex: number;
|
|
43
|
+
responsive: boolean;
|
|
44
|
+
role: string;
|
|
45
|
+
};
|
|
46
|
+
static contextType: React.Context<{
|
|
47
|
+
transitionTimer: import("..").Timer;
|
|
48
|
+
animationTimer: import("..").Timer;
|
|
49
|
+
}>;
|
|
50
|
+
private containerId;
|
|
51
|
+
private portalRef;
|
|
52
|
+
private containerRef;
|
|
53
|
+
private shouldHandleWheel;
|
|
54
|
+
constructor(props: TProps);
|
|
55
|
+
savePortalRef: (portal: any) => any;
|
|
56
|
+
portalUpdate: (key: any, el: any) => void;
|
|
57
|
+
portalRegister: () => number;
|
|
58
|
+
portalDeregister: (key: any) => void;
|
|
59
|
+
saveContainerRef: (container: HTMLElement) => HTMLElement;
|
|
60
|
+
handleWheel: (e: any) => any;
|
|
61
|
+
componentDidMount(): void;
|
|
62
|
+
componentWillUnmount(): void;
|
|
63
|
+
getIdForElement(elementName: any): string;
|
|
64
|
+
getChildren(props: any): any;
|
|
65
|
+
getOUIAProps(props: any): any;
|
|
66
|
+
renderContainer(props: any, svgProps: any, style: any): JSX.Element;
|
|
67
|
+
render(): JSX.Element;
|
|
68
|
+
}
|
|
69
69
|
//# sourceMappingURL=victory-container.d.ts.map
|