victory-core 36.4.0 → 36.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/victory-core.js +45735 -12154
- package/dist/victory-core.min.js +2 -1
- package/dist/victory-core.min.js.LICENSE.txt +19 -0
- package/es/index.d.ts +18 -941
- package/es/index.js +18 -73
- package/es/types/callbacks.d.ts +37 -0
- package/es/types/callbacks.js +2 -0
- package/es/types/prop-types.d.ts +130 -0
- package/es/types/prop-types.js +2 -0
- package/es/victory-accessible-group/victory-accessible-group.d.ts +26 -0
- package/es/victory-accessible-group/victory-accessible-group.js +9 -16
- package/es/victory-animation/util.d.ts +67 -0
- package/es/victory-animation/util.js +7 -4
- package/es/victory-animation/victory-animation.d.ts +70 -0
- package/es/victory-animation/victory-animation.js +60 -67
- package/es/victory-clip-container/victory-clip-container.d.ts +77 -0
- package/es/victory-clip-container/victory-clip-container.js +19 -23
- package/es/victory-container/victory-container.d.ts +100 -0
- package/es/victory-container/victory-container.js +32 -31
- package/es/victory-label/victory-label.d.ts +62 -0
- package/es/victory-label/victory-label.js +17 -10
- package/es/victory-portal/portal-context.d.ts +12 -0
- package/es/victory-portal/portal-context.js +3 -3
- package/es/victory-portal/portal.d.ts +29 -0
- package/es/victory-portal/portal.js +26 -33
- package/es/victory-portal/victory-portal.d.ts +32 -0
- package/es/victory-portal/victory-portal.js +24 -22
- package/es/victory-primitives/arc.d.ts +50 -0
- package/es/victory-primitives/arc.js +4 -5
- package/es/victory-primitives/background.d.ts +51 -0
- package/es/victory-primitives/background.js +5 -6
- package/es/victory-primitives/border.d.ts +44 -0
- package/es/victory-primitives/border.js +4 -5
- package/es/victory-primitives/circle.d.ts +3 -0
- package/es/victory-primitives/circle.js +11 -7
- package/es/victory-primitives/clip-path.d.ts +15 -0
- package/es/victory-primitives/clip-path.js +6 -5
- package/es/victory-primitives/index.d.ts +15 -0
- package/es/victory-primitives/index.js +15 -0
- package/es/victory-primitives/line-segment.d.ts +46 -0
- package/es/victory-primitives/line-segment.js +4 -5
- package/es/victory-primitives/line.d.ts +3 -0
- package/es/victory-primitives/line.js +11 -7
- package/es/victory-primitives/path.d.ts +3 -0
- package/es/victory-primitives/path.js +9 -5
- package/es/victory-primitives/point.d.ts +49 -0
- package/es/victory-primitives/point.js +10 -19
- package/es/victory-primitives/rect.d.ts +3 -0
- package/es/victory-primitives/rect.js +11 -7
- package/es/victory-primitives/text.d.ts +17 -0
- package/es/victory-primitives/text.js +7 -5
- package/es/victory-primitives/tspan.d.ts +3 -0
- package/es/victory-primitives/tspan.js +7 -5
- package/es/victory-primitives/types.d.ts +8 -0
- package/es/victory-primitives/types.js +2 -0
- package/es/victory-primitives/whisker.d.ts +59 -0
- package/es/victory-primitives/whisker.js +4 -5
- package/es/victory-state/defaults.d.ts +3 -0
- package/es/victory-state/defaults.js +3 -0
- package/es/victory-state/helpers/get-axis-data.d.ts +3 -0
- package/es/victory-state/helpers/get-axis-data.js +15 -0
- package/es/victory-state/helpers/get-data.d.ts +15 -0
- package/es/victory-state/helpers/get-data.js +88 -0
- package/es/victory-state/helpers/get-domain.d.ts +6 -0
- package/es/victory-state/helpers/get-domain.js +68 -0
- package/es/victory-state/helpers/get-range.d.ts +6 -0
- package/es/victory-state/helpers/get-range.js +37 -0
- package/es/victory-state/helpers/get-scale.d.ts +6 -0
- package/es/victory-state/helpers/get-scale.js +59 -0
- package/es/victory-state/index.d.ts +3 -0
- package/es/victory-state/index.js +3 -0
- package/es/victory-state/types.d.ts +24 -0
- package/es/victory-state/types.js +2 -0
- package/es/victory-state/victory-provider.d.ts +19 -0
- package/es/victory-state/victory-provider.js +118 -0
- package/es/victory-theme/grayscale.d.ts +3 -0
- package/es/victory-theme/grayscale.js +3 -2
- package/es/victory-theme/material.d.ts +3 -0
- package/es/victory-theme/material.js +3 -2
- package/es/victory-theme/types.d.ts +239 -0
- package/es/victory-theme/types.js +2 -0
- package/es/victory-theme/victory-theme.d.ts +6 -0
- package/es/victory-theme/victory-theme.js +8 -6
- package/es/victory-transition/victory-transition.d.ts +60 -0
- package/es/victory-transition/victory-transition.js +20 -23
- package/es/victory-util/add-events.d.ts +106 -0
- package/es/victory-util/add-events.js +45 -38
- package/es/victory-util/axis.d.ts +51 -0
- package/es/victory-util/axis.js +9 -8
- package/es/victory-util/collection.d.ts +9 -0
- package/es/victory-util/collection.js +6 -6
- package/es/victory-util/common-props.d.ts +84 -0
- package/es/victory-util/common-props.js +31 -14
- package/es/victory-util/data.d.ts +75 -0
- package/es/victory-util/data.js +2 -3
- package/es/victory-util/default-transitions.d.ts +5 -0
- package/es/victory-util/default-transitions.js +2 -2
- package/es/victory-util/domain.d.ts +91 -0
- package/es/victory-util/domain.js +6 -4
- package/es/victory-util/events.d.ts +65 -0
- package/es/victory-util/events.js +13 -8
- package/es/victory-util/helpers.d.ts +61 -0
- package/es/victory-util/helpers.js +8 -6
- package/es/victory-util/hooks/index.d.ts +3 -0
- package/es/victory-util/hooks/index.js +2 -1
- package/es/victory-util/hooks/use-animation-state.js +2 -1
- package/es/victory-util/hooks/use-previous-props.d.ts +2 -0
- package/es/victory-util/hooks/use-previous-props.js +4 -3
- package/es/victory-util/immutable.d.ts +12 -0
- package/es/victory-util/immutable.js +5 -5
- package/es/victory-util/index.d.ts +29 -0
- package/es/victory-util/index.js +48 -0
- package/es/victory-util/label-helpers.d.ts +27 -0
- package/es/victory-util/label-helpers.js +2 -3
- package/es/victory-util/line-helpers.d.ts +5 -0
- package/es/victory-util/line-helpers.js +24 -6
- package/es/victory-util/log.d.ts +2 -0
- package/es/victory-util/log.js +2 -2
- package/es/victory-util/point-path-helpers.d.ts +10 -0
- package/es/victory-util/point-path-helpers.js +60 -61
- package/es/victory-util/prop-types.d.ts +51 -0
- package/es/victory-util/prop-types.js +35 -44
- package/es/victory-util/scale.d.ts +10 -0
- package/es/victory-util/scale.js +14 -6
- package/es/victory-util/selection.d.ts +25 -0
- package/es/victory-util/selection.js +25 -16
- package/es/victory-util/style.d.ts +19 -0
- package/es/victory-util/style.js +2 -3
- package/es/victory-util/textsize.d.ts +37 -0
- package/es/victory-util/textsize.js +9 -6
- package/es/victory-util/timer-context.d.ts +12 -0
- package/es/victory-util/timer-context.js +2 -1
- package/es/victory-util/timer.d.ts +17 -0
- package/es/victory-util/timer.js +15 -9
- package/es/victory-util/transitions.d.ts +49 -0
- package/es/victory-util/transitions.js +5 -4
- package/es/victory-util/type-helpers.d.ts +10 -0
- package/es/victory-util/type-helpers.js +28 -0
- package/es/victory-util/user-props.d.ts +21 -0
- package/es/victory-util/user-props.js +17 -3
- package/es/victory-util/with-container.d.ts +5 -0
- package/es/victory-util/with-container.js +32 -0
- package/es/victory-util/wrapper.d.ts +38 -0
- package/es/victory-util/wrapper.js +4 -3
- package/lib/index.d.ts +18 -941
- package/lib/index.js +224 -311
- package/lib/types/callbacks.d.ts +37 -0
- package/lib/types/callbacks.js +2 -0
- package/lib/types/prop-types.d.ts +130 -0
- package/lib/types/prop-types.js +2 -0
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +26 -0
- package/lib/victory-accessible-group/victory-accessible-group.js +10 -15
- package/lib/victory-animation/util.d.ts +67 -0
- package/lib/victory-animation/util.js +7 -4
- package/lib/victory-animation/victory-animation.d.ts +70 -0
- package/lib/victory-animation/victory-animation.js +61 -65
- package/lib/victory-clip-container/victory-clip-container.d.ts +77 -0
- package/lib/victory-clip-container/victory-clip-container.js +24 -24
- package/lib/victory-container/victory-container.d.ts +100 -0
- package/lib/victory-container/victory-container.js +35 -31
- package/lib/victory-label/victory-label.d.ts +62 -0
- package/lib/victory-label/victory-label.js +24 -15
- package/lib/victory-portal/portal-context.d.ts +12 -0
- package/lib/victory-portal/portal-context.js +3 -3
- package/lib/victory-portal/portal.d.ts +29 -0
- package/lib/victory-portal/portal.js +27 -31
- package/lib/victory-portal/victory-portal.d.ts +32 -0
- package/lib/victory-portal/victory-portal.js +25 -20
- package/lib/victory-primitives/arc.d.ts +50 -0
- package/lib/victory-primitives/arc.js +7 -7
- package/lib/victory-primitives/background.d.ts +51 -0
- package/lib/victory-primitives/background.js +9 -9
- package/lib/victory-primitives/border.d.ts +44 -0
- package/lib/victory-primitives/border.js +7 -7
- package/lib/victory-primitives/circle.d.ts +3 -0
- package/lib/victory-primitives/circle.js +12 -6
- package/lib/victory-primitives/clip-path.d.ts +15 -0
- package/lib/victory-primitives/clip-path.js +7 -4
- package/lib/victory-primitives/index.d.ts +15 -0
- package/lib/victory-primitives/index.js +188 -0
- package/lib/victory-primitives/line-segment.d.ts +46 -0
- package/lib/victory-primitives/line-segment.js +7 -7
- package/lib/victory-primitives/line.d.ts +3 -0
- package/lib/victory-primitives/line.js +12 -6
- package/lib/victory-primitives/path.d.ts +3 -0
- package/lib/victory-primitives/path.js +10 -4
- package/lib/victory-primitives/point.d.ts +49 -0
- package/lib/victory-primitives/point.js +15 -22
- package/lib/victory-primitives/rect.d.ts +3 -0
- package/lib/victory-primitives/rect.js +12 -6
- package/lib/victory-primitives/text.d.ts +17 -0
- package/lib/victory-primitives/text.js +8 -4
- package/lib/victory-primitives/tspan.d.ts +3 -0
- package/lib/victory-primitives/tspan.js +8 -4
- package/lib/victory-primitives/types.d.ts +8 -0
- package/lib/victory-primitives/types.js +2 -0
- package/lib/victory-primitives/whisker.d.ts +59 -0
- package/lib/victory-primitives/whisker.js +7 -7
- package/lib/victory-state/defaults.d.ts +3 -0
- package/lib/victory-state/defaults.js +11 -0
- package/lib/victory-state/helpers/get-axis-data.d.ts +3 -0
- package/lib/victory-state/helpers/get-axis-data.js +23 -0
- package/lib/victory-state/helpers/get-data.d.ts +15 -0
- package/lib/victory-state/helpers/get-data.js +99 -0
- package/lib/victory-state/helpers/get-domain.d.ts +6 -0
- package/lib/victory-state/helpers/get-domain.js +82 -0
- package/lib/victory-state/helpers/get-range.d.ts +6 -0
- package/lib/victory-state/helpers/get-range.js +46 -0
- package/lib/victory-state/helpers/get-scale.d.ts +6 -0
- package/lib/victory-state/helpers/get-scale.js +74 -0
- package/lib/victory-state/index.d.ts +3 -0
- package/lib/victory-state/index.js +32 -0
- package/lib/victory-state/types.d.ts +24 -0
- package/lib/victory-state/types.js +2 -0
- package/lib/victory-state/victory-provider.d.ts +19 -0
- package/lib/victory-state/victory-provider.js +146 -0
- package/lib/victory-theme/grayscale.d.ts +3 -0
- package/lib/victory-theme/grayscale.js +4 -3
- package/lib/victory-theme/material.d.ts +3 -0
- package/lib/victory-theme/material.js +4 -3
- package/lib/victory-theme/types.d.ts +239 -0
- package/lib/victory-theme/types.js +2 -0
- package/lib/victory-theme/victory-theme.d.ts +6 -0
- package/lib/victory-theme/victory-theme.js +23 -8
- package/lib/victory-transition/victory-transition.d.ts +60 -0
- package/lib/victory-transition/victory-transition.js +22 -23
- package/lib/victory-util/add-events.d.ts +106 -0
- package/lib/victory-util/add-events.js +49 -47
- package/lib/victory-util/axis.d.ts +51 -0
- package/lib/victory-util/axis.js +8 -6
- package/lib/victory-util/collection.d.ts +9 -0
- package/lib/victory-util/collection.js +6 -6
- package/lib/victory-util/common-props.d.ts +84 -0
- package/lib/victory-util/common-props.js +29 -14
- package/lib/victory-util/data.d.ts +75 -0
- package/lib/victory-util/data.js +2 -1
- package/lib/victory-util/default-transitions.d.ts +5 -0
- package/lib/victory-util/default-transitions.js +2 -2
- package/lib/victory-util/domain.d.ts +91 -0
- package/lib/victory-util/domain.js +6 -2
- package/lib/victory-util/events.d.ts +65 -0
- package/lib/victory-util/events.js +13 -9
- package/lib/victory-util/helpers.d.ts +61 -0
- package/lib/victory-util/helpers.js +8 -6
- package/lib/victory-util/hooks/index.d.ts +3 -0
- package/lib/victory-util/hooks/index.js +2 -1
- package/lib/victory-util/hooks/use-animation-state.js +2 -1
- package/lib/victory-util/hooks/use-previous-props.d.ts +2 -0
- package/lib/victory-util/hooks/use-previous-props.js +5 -6
- package/lib/victory-util/immutable.d.ts +12 -0
- package/lib/victory-util/immutable.js +5 -6
- package/lib/victory-util/index.d.ts +29 -0
- package/lib/victory-util/index.js +181 -0
- package/lib/victory-util/label-helpers.d.ts +27 -0
- package/lib/victory-util/label-helpers.js +2 -3
- package/lib/victory-util/line-helpers.d.ts +5 -0
- package/lib/victory-util/line-helpers.js +28 -7
- package/lib/victory-util/log.d.ts +2 -0
- package/lib/victory-util/log.js +2 -2
- package/lib/victory-util/point-path-helpers.d.ts +10 -0
- package/lib/victory-util/point-path-helpers.js +87 -73
- package/lib/victory-util/prop-types.d.ts +51 -0
- package/lib/victory-util/prop-types.js +36 -44
- package/lib/victory-util/scale.d.ts +10 -0
- package/lib/victory-util/scale.js +14 -5
- package/lib/victory-util/selection.d.ts +25 -0
- package/lib/victory-util/selection.js +25 -21
- package/lib/victory-util/style.d.ts +19 -0
- package/lib/victory-util/style.js +2 -3
- package/lib/victory-util/textsize.d.ts +37 -0
- package/lib/victory-util/textsize.js +9 -6
- package/lib/victory-util/timer-context.d.ts +12 -0
- package/lib/victory-util/timer-context.js +2 -1
- package/lib/victory-util/timer.d.ts +17 -0
- package/lib/victory-util/timer.js +15 -9
- package/lib/victory-util/transitions.d.ts +49 -0
- package/lib/victory-util/transitions.js +5 -4
- package/lib/victory-util/type-helpers.d.ts +10 -0
- package/lib/victory-util/type-helpers.js +45 -0
- package/lib/victory-util/user-props.d.ts +21 -0
- package/lib/victory-util/user-props.js +25 -4
- package/lib/victory-util/with-container.d.ts +5 -0
- package/lib/victory-util/with-container.js +44 -0
- package/lib/victory-util/wrapper.d.ts +38 -0
- package/lib/victory-util/wrapper.js +4 -3
- package/package.json +6 -6
- package/src/index.ts +17 -0
- package/src/types/callbacks.ts +53 -0
- package/src/types/prop-types.ts +195 -0
- package/src/victory-accessible-group/{victory-accessible-group.js → victory-accessible-group.tsx} +13 -6
- package/src/victory-animation/{util.js → util.ts} +6 -4
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +100 -23
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +55 -29
- package/src/victory-container/{victory-container.js → victory-container.tsx} +86 -42
- package/src/victory-label/{victory-label.js → victory-label.tsx} +112 -49
- package/src/victory-portal/portal-context.ts +14 -0
- package/src/victory-portal/{portal.js → portal.tsx} +24 -13
- package/src/victory-portal/{victory-portal.js → victory-portal.tsx} +24 -9
- package/src/victory-primitives/{arc.js → arc.tsx} +22 -10
- package/src/victory-primitives/{background.js → background.tsx} +24 -12
- package/src/victory-primitives/{border.js → border.tsx} +19 -10
- package/src/victory-primitives/{circle.js → circle.tsx} +4 -3
- package/src/victory-primitives/clip-path.tsx +25 -0
- package/src/victory-primitives/index.ts +14 -0
- package/src/victory-primitives/{line-segment.js → line-segment.tsx} +20 -10
- package/src/victory-primitives/{line.js → line.tsx} +4 -3
- package/src/victory-primitives/{path.js → path.tsx} +4 -3
- package/src/victory-primitives/{point.js → point.tsx} +33 -26
- package/src/victory-primitives/{rect.js → rect.tsx} +4 -2
- package/src/victory-primitives/{text.js → text.tsx} +10 -4
- package/src/victory-primitives/tspan.tsx +7 -0
- package/src/victory-primitives/types.ts +19 -0
- package/src/victory-primitives/{whisker.js → whisker.tsx} +34 -19
- package/src/victory-state/defaults.ts +2 -0
- package/src/victory-state/helpers/get-axis-data.ts +14 -0
- package/src/victory-state/helpers/get-data.ts +79 -0
- package/src/victory-state/helpers/get-domain.ts +62 -0
- package/src/victory-state/helpers/get-range.ts +39 -0
- package/src/victory-state/helpers/get-scale.ts +64 -0
- package/src/victory-state/index.ts +2 -0
- package/src/victory-state/types.ts +32 -0
- package/src/victory-state/victory-provider.tsx +121 -0
- package/src/victory-theme/{grayscale.js → grayscale.tsx} +63 -62
- package/src/victory-theme/{material.js → material.tsx} +68 -67
- package/src/victory-theme/types.ts +257 -0
- package/src/victory-theme/victory-theme.tsx +5 -0
- package/src/victory-transition/{victory-transition.js → victory-transition.tsx} +82 -33
- package/src/victory-util/{add-events.js → add-events.tsx} +143 -64
- package/src/victory-util/{axis.js → axis.tsx} +17 -19
- package/src/victory-util/{collection.js → collection.tsx} +14 -11
- package/src/victory-util/common-props.tsx +307 -0
- package/src/victory-util/{data.js → data.ts} +14 -11
- package/src/victory-util/{default-transitions.js → default-transitions.ts} +20 -19
- package/src/victory-util/{domain.js → domain.ts} +26 -24
- package/src/victory-util/{events.js → events.ts} +83 -32
- package/src/victory-util/{helpers.js → helpers.ts} +41 -23
- package/src/victory-util/hooks/{index.js → index.ts} +0 -0
- package/src/victory-util/hooks/use-animation-state.js +10 -10
- package/src/victory-util/hooks/use-previous-props.ts +9 -0
- package/src/victory-util/{immutable.js → immutable.ts} +14 -11
- package/src/victory-util/index.ts +28 -0
- package/src/victory-util/{label-helpers.js → label-helpers.ts} +7 -8
- package/src/victory-util/line-helpers.ts +104 -0
- package/src/victory-util/{log.js → log.ts} +1 -2
- package/src/victory-util/point-path-helpers.ts +119 -0
- package/src/victory-util/{prop-types.js → prop-types.ts} +103 -102
- package/src/victory-util/{scale.js → scale.ts} +29 -17
- package/src/victory-util/selection.ts +158 -0
- package/src/victory-util/{style.js → style.ts} +3 -4
- package/src/victory-util/{textsize.js → textsize.ts} +32 -17
- package/src/victory-util/{timer-context.js → timer-context.ts} +1 -1
- package/src/victory-util/{timer.js → timer.ts} +16 -6
- package/src/victory-util/{transitions.js → transitions.ts} +50 -23
- package/src/victory-util/type-helpers.ts +50 -0
- package/src/victory-util/{user-props.js → user-props.ts} +26 -8
- package/src/victory-util/with-container.tsx +41 -0
- package/src/victory-util/{wrapper.js → wrapper.tsx} +38 -34
- package/src/index.d.ts +0 -941
- package/src/index.js +0 -51
- package/src/victory-portal/portal-context.js +0 -10
- package/src/victory-primitives/clip-path.js +0 -18
- package/src/victory-primitives/tspan.js +0 -5
- package/src/victory-theme/victory-theme.js +0 -7
- package/src/victory-util/common-props.js +0 -197
- package/src/victory-util/hooks/use-previous-props.js +0 -9
- package/src/victory-util/line-helpers.js +0 -54
- package/src/victory-util/point-path-helpers.js +0 -121
- package/src/victory-util/selection.js +0 -99
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VictoryProvider = VictoryProvider;
|
|
7
|
+
exports.useData = useData;
|
|
8
|
+
exports.useDomain = useDomain;
|
|
9
|
+
exports.useScale = useScale;
|
|
10
|
+
exports.useVictoryContext = useVictoryContext;
|
|
11
|
+
exports.useVictoryProviderSync = useVictoryProviderSync;
|
|
12
|
+
|
|
13
|
+
var React = _interopRequireWildcard(require("react"));
|
|
14
|
+
|
|
15
|
+
var _useContextSelector = require("use-context-selector");
|
|
16
|
+
|
|
17
|
+
var _getData = require("./helpers/get-data");
|
|
18
|
+
|
|
19
|
+
var _getDomain = require("./helpers/get-domain");
|
|
20
|
+
|
|
21
|
+
var _getRange = require("./helpers/get-range");
|
|
22
|
+
|
|
23
|
+
var _getScale = require("./helpers/get-scale");
|
|
24
|
+
|
|
25
|
+
var _excluded = ["children"];
|
|
26
|
+
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
28
|
+
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
|
|
33
|
+
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; }
|
|
34
|
+
|
|
35
|
+
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; }
|
|
36
|
+
|
|
37
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
38
|
+
|
|
39
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40
|
+
|
|
41
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
42
|
+
|
|
43
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
44
|
+
|
|
45
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
46
|
+
|
|
47
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
48
|
+
|
|
49
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
50
|
+
|
|
51
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
52
|
+
|
|
53
|
+
var VictoryContext = (0, _useContextSelector.createContext)(null);
|
|
54
|
+
|
|
55
|
+
function VictoryProvider(_ref) {
|
|
56
|
+
var children = _ref.children,
|
|
57
|
+
initialProps = _objectWithoutProperties(_ref, _excluded);
|
|
58
|
+
|
|
59
|
+
// We need to store the props in state so they can be overwritten by child components
|
|
60
|
+
var _React$useState = React.useState(initialProps),
|
|
61
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
62
|
+
props = _React$useState2[0],
|
|
63
|
+
setProps = _React$useState2[1];
|
|
64
|
+
|
|
65
|
+
var setChildProps = React.useCallback(function (id, newProps) {
|
|
66
|
+
setProps(function (prevProps) {
|
|
67
|
+
return _objectSpread(_objectSpread({}, prevProps), newProps);
|
|
68
|
+
});
|
|
69
|
+
}, []);
|
|
70
|
+
var data = React.useMemo(function () {
|
|
71
|
+
return (0, _getData.getData)(props);
|
|
72
|
+
}, [props]);
|
|
73
|
+
var domain = React.useMemo(function () {
|
|
74
|
+
return {
|
|
75
|
+
x: (0, _getDomain.getDomain)(props, "x"),
|
|
76
|
+
y: (0, _getDomain.getDomain)(props, "y")
|
|
77
|
+
};
|
|
78
|
+
}, [props]);
|
|
79
|
+
var range = React.useMemo(function () {
|
|
80
|
+
return {
|
|
81
|
+
x: (0, _getRange.getRange)(props, "x"),
|
|
82
|
+
y: (0, _getRange.getRange)(props, "y")
|
|
83
|
+
};
|
|
84
|
+
}, [props]);
|
|
85
|
+
var scale = React.useMemo(function () {
|
|
86
|
+
var xBaseScaleFn = (0, _getScale.getScale)(props, "x");
|
|
87
|
+
var yBaseScaleFn = (0, _getScale.getScale)(props, "y"); // @ts-expect-error: This is a valid scale function
|
|
88
|
+
|
|
89
|
+
var xScaleFn = xBaseScaleFn().domain(domain.x).range(range.x); // @ts-expect-error: This is a valid scale function
|
|
90
|
+
|
|
91
|
+
var yScaleFn = yBaseScaleFn().domain(domain.y).range(range.y);
|
|
92
|
+
return {
|
|
93
|
+
x: xScaleFn,
|
|
94
|
+
y: yScaleFn
|
|
95
|
+
};
|
|
96
|
+
}, [props, domain, range]);
|
|
97
|
+
var value = {
|
|
98
|
+
scale: scale,
|
|
99
|
+
data: data,
|
|
100
|
+
domain: domain,
|
|
101
|
+
setChildProps: setChildProps
|
|
102
|
+
};
|
|
103
|
+
return /*#__PURE__*/React.createElement(VictoryContext.Provider, {
|
|
104
|
+
value: value
|
|
105
|
+
}, children);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function useVictoryContext(selector) {
|
|
109
|
+
return (0, _useContextSelector.useContextSelector)(VictoryContext, function (context) {
|
|
110
|
+
if (!context) {
|
|
111
|
+
throw new Error("useVictoryContext must be used within a VictoryProvider");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return selector(context);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function useScale() {
|
|
119
|
+
return useVictoryContext(function (value) {
|
|
120
|
+
return value.scale;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function useData() {
|
|
125
|
+
return useVictoryContext(function (value) {
|
|
126
|
+
return value.data;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function useDomain() {
|
|
131
|
+
return useVictoryContext(function (value) {
|
|
132
|
+
return value.domain;
|
|
133
|
+
});
|
|
134
|
+
} // This function keeps props in sync betwen the VictoryProvider and child components
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
function useVictoryProviderSync(id, props) {
|
|
138
|
+
var setChildProps = useVictoryContext(function (value) {
|
|
139
|
+
return value.setChildProps;
|
|
140
|
+
});
|
|
141
|
+
React.useEffect(function () {
|
|
142
|
+
setChildProps(id, props);
|
|
143
|
+
}, []);
|
|
144
|
+
return props;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=victory-provider.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.grayscale = void 0;
|
|
7
7
|
|
|
8
8
|
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
9
9
|
|
|
@@ -49,7 +49,7 @@ var centeredLabelStyles = (0, _assign2.default)({
|
|
|
49
49
|
|
|
50
50
|
var strokeLinecap = "round";
|
|
51
51
|
var strokeLinejoin = "round";
|
|
52
|
-
var
|
|
52
|
+
var grayscale = {
|
|
53
53
|
area: (0, _assign2.default)({
|
|
54
54
|
style: {
|
|
55
55
|
data: {
|
|
@@ -265,4 +265,5 @@ var _default = {
|
|
|
265
265
|
}
|
|
266
266
|
}, baseProps)
|
|
267
267
|
};
|
|
268
|
-
exports.
|
|
268
|
+
exports.grayscale = grayscale;
|
|
269
|
+
//# sourceMappingURL=grayscale.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.material = void 0;
|
|
7
7
|
|
|
8
8
|
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
9
9
|
|
|
@@ -59,7 +59,7 @@ var centeredLabelStyles = (0, _assign2.default)({
|
|
|
59
59
|
var strokeDasharray = "10, 5";
|
|
60
60
|
var strokeLinecap = "round";
|
|
61
61
|
var strokeLinejoin = "round";
|
|
62
|
-
var
|
|
62
|
+
var material = {
|
|
63
63
|
area: (0, _assign2.default)({
|
|
64
64
|
style: {
|
|
65
65
|
data: {
|
|
@@ -292,4 +292,5 @@ var _default = {
|
|
|
292
292
|
}
|
|
293
293
|
}, baseProps)
|
|
294
294
|
};
|
|
295
|
-
exports.
|
|
295
|
+
exports.material = material;
|
|
296
|
+
//# sourceMappingURL=material.js.map
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { VictoryCommonThemeProps, VictoryDatableProps } from "../victory-util/common-props";
|
|
3
|
+
import { NumberOrCallback, OrientationOrCallback, PaddingOrCallback, StringOrNumberOrCallback } from "../types/callbacks";
|
|
4
|
+
export declare type BlockProps = {
|
|
5
|
+
top?: number;
|
|
6
|
+
bottom?: number;
|
|
7
|
+
left?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare type PaddingProps = number | BlockProps;
|
|
11
|
+
export declare type OrientationTypes = "top" | "bottom" | "left" | "right";
|
|
12
|
+
export declare type VictoryStyleObject = {
|
|
13
|
+
[K in keyof React.CSSProperties]: StringOrNumberOrCallback;
|
|
14
|
+
};
|
|
15
|
+
export declare type LabelProps = React.CSSProperties & {
|
|
16
|
+
angle?: number;
|
|
17
|
+
verticalAnchor?: VerticalAnchorType;
|
|
18
|
+
};
|
|
19
|
+
export declare type VictoryLabelStyleObject = {
|
|
20
|
+
[K in keyof LabelProps]: StringOrNumberOrCallback;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Style interface used in components/themeing
|
|
24
|
+
*/
|
|
25
|
+
export interface VictoryStyleInterface {
|
|
26
|
+
parent?: VictoryStyleObject;
|
|
27
|
+
data?: VictoryStyleObject;
|
|
28
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
29
|
+
border?: VictoryStyleObject;
|
|
30
|
+
}
|
|
31
|
+
export declare type TickProps = React.CSSProperties & {
|
|
32
|
+
size?: number;
|
|
33
|
+
};
|
|
34
|
+
export declare type VictoryTickStyleObject = {
|
|
35
|
+
[K in keyof TickProps]: StringOrNumberOrCallback;
|
|
36
|
+
};
|
|
37
|
+
export interface VictoryAxisCommonProps {
|
|
38
|
+
axisComponent?: React.ReactElement;
|
|
39
|
+
axisLabelComponent?: React.ReactElement;
|
|
40
|
+
axisValue?: number | string | object | Date;
|
|
41
|
+
dependentAxis?: boolean;
|
|
42
|
+
disableInlineStyles?: boolean;
|
|
43
|
+
gridComponent?: React.ReactElement;
|
|
44
|
+
invertAxis?: boolean;
|
|
45
|
+
style?: {
|
|
46
|
+
parent?: VictoryStyleObject;
|
|
47
|
+
axis?: VictoryStyleObject;
|
|
48
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
49
|
+
grid?: VictoryStyleObject;
|
|
50
|
+
ticks?: VictoryTickStyleObject;
|
|
51
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
52
|
+
};
|
|
53
|
+
tickComponent?: React.ReactElement;
|
|
54
|
+
tickCount?: number;
|
|
55
|
+
tickLabelComponent?: React.ReactElement;
|
|
56
|
+
tickFormat?: any[] | {
|
|
57
|
+
(tick: any, index: number, ticks: any[]): string | number;
|
|
58
|
+
};
|
|
59
|
+
tickValues?: any[];
|
|
60
|
+
}
|
|
61
|
+
export declare type VerticalAnchorType = "start" | "middle" | "end";
|
|
62
|
+
export interface VictoryThemeDefinition {
|
|
63
|
+
area?: {
|
|
64
|
+
style?: {
|
|
65
|
+
data?: VictoryStyleObject;
|
|
66
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
67
|
+
};
|
|
68
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
69
|
+
axis?: {
|
|
70
|
+
style?: {
|
|
71
|
+
axis?: VictoryStyleObject;
|
|
72
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
73
|
+
grid?: VictoryStyleObject;
|
|
74
|
+
ticks?: VictoryTickStyleObject;
|
|
75
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
76
|
+
};
|
|
77
|
+
offsetX?: number;
|
|
78
|
+
offsetY?: number;
|
|
79
|
+
} & VictoryCommonThemeProps;
|
|
80
|
+
bar?: {
|
|
81
|
+
style?: {
|
|
82
|
+
data?: VictoryStyleObject;
|
|
83
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
84
|
+
};
|
|
85
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
86
|
+
boxplot?: {
|
|
87
|
+
style?: {
|
|
88
|
+
max?: VictoryStyleObject;
|
|
89
|
+
maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
90
|
+
median?: VictoryStyleObject;
|
|
91
|
+
medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
92
|
+
min?: VictoryStyleObject;
|
|
93
|
+
minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
94
|
+
q1?: VictoryStyleObject;
|
|
95
|
+
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
96
|
+
q3?: VictoryStyleObject;
|
|
97
|
+
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
98
|
+
};
|
|
99
|
+
boxWidth?: number;
|
|
100
|
+
} & VictoryCommonThemeProps;
|
|
101
|
+
candlestick?: {
|
|
102
|
+
style?: {
|
|
103
|
+
data?: VictoryStyleObject;
|
|
104
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
105
|
+
};
|
|
106
|
+
candleColors?: {
|
|
107
|
+
positive?: string;
|
|
108
|
+
negative?: string;
|
|
109
|
+
};
|
|
110
|
+
} & VictoryCommonThemeProps;
|
|
111
|
+
chart?: VictoryCommonThemeProps;
|
|
112
|
+
dependentAxis?: {
|
|
113
|
+
style?: {
|
|
114
|
+
axis?: VictoryStyleObject;
|
|
115
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
116
|
+
grid?: VictoryStyleObject;
|
|
117
|
+
ticks?: VictoryTickStyleObject;
|
|
118
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
119
|
+
};
|
|
120
|
+
offsetX?: number;
|
|
121
|
+
offsetY?: number;
|
|
122
|
+
orientation?: OrientationTypes;
|
|
123
|
+
} & VictoryCommonThemeProps;
|
|
124
|
+
errorbar?: {
|
|
125
|
+
borderWidth?: number;
|
|
126
|
+
style?: {
|
|
127
|
+
data?: VictoryStyleObject;
|
|
128
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
129
|
+
};
|
|
130
|
+
} & VictoryCommonThemeProps;
|
|
131
|
+
group?: {
|
|
132
|
+
style?: {
|
|
133
|
+
data?: VictoryStyleObject;
|
|
134
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
135
|
+
};
|
|
136
|
+
} & VictoryCommonThemeProps;
|
|
137
|
+
histogram?: {
|
|
138
|
+
style?: {
|
|
139
|
+
data?: VictoryStyleObject;
|
|
140
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
141
|
+
};
|
|
142
|
+
} & VictoryCommonThemeProps;
|
|
143
|
+
independentAxis?: {
|
|
144
|
+
style?: {
|
|
145
|
+
axis?: VictoryStyleObject;
|
|
146
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
147
|
+
grid?: VictoryStyleObject;
|
|
148
|
+
ticks?: VictoryTickStyleObject;
|
|
149
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
150
|
+
};
|
|
151
|
+
offsetX?: number;
|
|
152
|
+
offsetY?: number;
|
|
153
|
+
orientation?: OrientationTypes;
|
|
154
|
+
} & VictoryCommonThemeProps;
|
|
155
|
+
legend?: {
|
|
156
|
+
gutter?: number | BlockProps;
|
|
157
|
+
rowGutter?: number | BlockProps;
|
|
158
|
+
orientation?: string;
|
|
159
|
+
titleOrientation?: string;
|
|
160
|
+
style?: {
|
|
161
|
+
data?: VictoryStyleObject & {
|
|
162
|
+
type?: string;
|
|
163
|
+
};
|
|
164
|
+
border?: VictoryStyleObject;
|
|
165
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
166
|
+
title?: VictoryLabelStyleObject;
|
|
167
|
+
};
|
|
168
|
+
itemsPerRow?: number;
|
|
169
|
+
x?: number;
|
|
170
|
+
y?: number;
|
|
171
|
+
centerTitle?: boolean;
|
|
172
|
+
borderPadding?: number | BlockProps;
|
|
173
|
+
} & VictoryCommonThemeProps;
|
|
174
|
+
line?: {
|
|
175
|
+
style?: {
|
|
176
|
+
data?: VictoryStyleObject;
|
|
177
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
178
|
+
};
|
|
179
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
180
|
+
pie?: {
|
|
181
|
+
style?: {
|
|
182
|
+
data?: VictoryStyleObject;
|
|
183
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
184
|
+
};
|
|
185
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
186
|
+
polarAxis?: {
|
|
187
|
+
style?: {
|
|
188
|
+
axis?: VictoryStyleObject;
|
|
189
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
190
|
+
grid?: VictoryStyleObject;
|
|
191
|
+
ticks?: VictoryTickStyleObject;
|
|
192
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
193
|
+
};
|
|
194
|
+
} & VictoryCommonThemeProps;
|
|
195
|
+
polarDependentAxis?: {
|
|
196
|
+
style?: {
|
|
197
|
+
axis?: VictoryStyleObject;
|
|
198
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
199
|
+
grid?: VictoryStyleObject;
|
|
200
|
+
ticks?: VictoryTickStyleObject;
|
|
201
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
202
|
+
};
|
|
203
|
+
} & VictoryCommonThemeProps;
|
|
204
|
+
polarIndependentAxis?: {
|
|
205
|
+
style?: {
|
|
206
|
+
axis?: VictoryStyleObject;
|
|
207
|
+
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
208
|
+
grid?: VictoryStyleObject;
|
|
209
|
+
ticks?: VictoryTickStyleObject;
|
|
210
|
+
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
211
|
+
};
|
|
212
|
+
} & VictoryCommonThemeProps;
|
|
213
|
+
scatter?: {
|
|
214
|
+
style?: {
|
|
215
|
+
data?: VictoryStyleObject;
|
|
216
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
217
|
+
};
|
|
218
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
219
|
+
stack?: VictoryCommonThemeProps;
|
|
220
|
+
tooltip?: {
|
|
221
|
+
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
222
|
+
flyoutStyle?: VictoryStyleObject;
|
|
223
|
+
cornerRadius?: NumberOrCallback;
|
|
224
|
+
pointerLength?: NumberOrCallback;
|
|
225
|
+
flyoutPadding?: PaddingOrCallback;
|
|
226
|
+
flyoutWidth?: NumberOrCallback;
|
|
227
|
+
flyoutHeight?: NumberOrCallback;
|
|
228
|
+
orientation?: OrientationOrCallback;
|
|
229
|
+
pointerOrientation?: OrientationOrCallback;
|
|
230
|
+
};
|
|
231
|
+
voronoi?: {
|
|
232
|
+
style?: {
|
|
233
|
+
data?: VictoryStyleObject;
|
|
234
|
+
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
235
|
+
flyout?: VictoryStyleObject;
|
|
236
|
+
};
|
|
237
|
+
} & VictoryCommonThemeProps & VictoryDatableProps;
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -3,16 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
VictoryTheme: true
|
|
8
|
+
};
|
|
9
|
+
exports.VictoryTheme = void 0;
|
|
7
10
|
|
|
8
|
-
var
|
|
11
|
+
var _grayscale = require("./grayscale");
|
|
9
12
|
|
|
10
|
-
var
|
|
13
|
+
var _material = require("./material");
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
var _types = require("./types");
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
Object.keys(_types).forEach(function (key) {
|
|
18
|
+
if (key === "default" || key === "__esModule") return;
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _types[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var VictoryTheme = {
|
|
29
|
+
grayscale: _grayscale.grayscale,
|
|
30
|
+
material: _material.material
|
|
17
31
|
};
|
|
18
|
-
exports.
|
|
32
|
+
exports.VictoryTheme = VictoryTheme;
|
|
33
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import TimerContext from "../victory-util/timer-context";
|
|
4
|
+
import Timer from "../victory-util/timer";
|
|
5
|
+
declare type VictoryTransitionChild = React.ReactElement<{
|
|
6
|
+
polar?: boolean;
|
|
7
|
+
domain?: number[] | {
|
|
8
|
+
x: number[];
|
|
9
|
+
y: number[];
|
|
10
|
+
};
|
|
11
|
+
groupComponent?: React.ReactElement;
|
|
12
|
+
}, {
|
|
13
|
+
new (props: any): React.Component<any, any>;
|
|
14
|
+
continuous?: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
interface VictoryTransitionProps {
|
|
17
|
+
animate?: boolean | any;
|
|
18
|
+
animationWhitelist?: string[];
|
|
19
|
+
children: VictoryTransitionChild;
|
|
20
|
+
}
|
|
21
|
+
interface VictoryTransitionState {
|
|
22
|
+
oldProps?: VictoryTransitionProps | null;
|
|
23
|
+
nextProps?: VictoryTransitionProps;
|
|
24
|
+
nodesShouldLoad?: boolean;
|
|
25
|
+
nodesDoneLoad?: boolean;
|
|
26
|
+
nodesWillExit?: boolean;
|
|
27
|
+
nodesWillEnter?: boolean;
|
|
28
|
+
nodesShouldEnter?: boolean;
|
|
29
|
+
childrenTransitions?: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface VictoryTransition {
|
|
32
|
+
context: React.ContextType<typeof TimerContext>;
|
|
33
|
+
}
|
|
34
|
+
export declare class VictoryTransition extends React.Component<VictoryTransitionProps, VictoryTransitionState> {
|
|
35
|
+
static displayName: string;
|
|
36
|
+
static propTypes: {
|
|
37
|
+
animate: PropTypes.Requireable<boolean | object>;
|
|
38
|
+
animationWhitelist: PropTypes.Requireable<any[]>;
|
|
39
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
40
|
+
};
|
|
41
|
+
static contextType: React.Context<{
|
|
42
|
+
transitionTimer: Timer;
|
|
43
|
+
animationTimer: Timer;
|
|
44
|
+
}>;
|
|
45
|
+
private continuous;
|
|
46
|
+
private timer;
|
|
47
|
+
private transitionProps;
|
|
48
|
+
constructor(props: any, context: any);
|
|
49
|
+
componentDidMount(): void;
|
|
50
|
+
shouldComponentUpdate(nextProps: VictoryTransitionProps): boolean;
|
|
51
|
+
componentWillUnmount(): void;
|
|
52
|
+
private getTransitionState;
|
|
53
|
+
private getDomainFromChildren;
|
|
54
|
+
pickProps(): Readonly<VictoryTransitionProps>;
|
|
55
|
+
private pickDomainProps;
|
|
56
|
+
getClipWidth(props: any, child: any): any;
|
|
57
|
+
render(): JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=victory-transition.d.ts.map
|