victory-core 36.3.2 → 36.5.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/dist/victory-core.js +15084 -15018
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +38 -941
- package/es/index.js +19 -28
- package/es/types.d.ts +33 -0
- package/es/types.js +1 -0
- package/es/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/es/victory-accessible-group/victory-accessible-group.js +35 -45
- package/es/victory-animation/util.d.ts +66 -0
- package/es/victory-animation/util.js +3 -2
- package/es/victory-animation/victory-animation.d.ts +69 -0
- package/es/victory-animation/victory-animation.js +92 -102
- package/es/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/es/victory-clip-container/victory-clip-container.js +75 -82
- package/es/victory-container/victory-container.d.ts +99 -0
- package/es/victory-container/victory-container.js +97 -107
- package/es/victory-label/victory-label.d.ts +61 -0
- package/es/victory-label/victory-label.js +43 -31
- package/es/victory-portal/portal-context.d.ts +11 -0
- package/es/victory-portal/portal-context.js +3 -4
- package/es/victory-portal/portal.d.ts +28 -0
- package/es/victory-portal/portal.js +44 -50
- package/es/victory-portal/victory-portal.d.ts +31 -0
- package/es/victory-portal/victory-portal.js +38 -47
- package/es/victory-primitives/arc.d.ts +21 -0
- package/es/victory-primitives/arc.js +9 -9
- package/es/victory-primitives/background.d.ts +22 -0
- package/es/victory-primitives/background.js +12 -12
- package/es/victory-primitives/border.d.ts +18 -0
- package/es/victory-primitives/border.js +9 -9
- package/es/victory-primitives/circle.d.ts +2 -0
- package/es/victory-primitives/circle.js +17 -10
- package/es/victory-primitives/clip-path.d.ts +14 -0
- package/es/victory-primitives/clip-path.js +6 -6
- package/es/victory-primitives/index.d.ts +14 -0
- package/es/victory-primitives/index.js +14 -0
- package/es/victory-primitives/line-segment.d.ts +19 -0
- package/es/victory-primitives/line-segment.js +9 -9
- package/es/victory-primitives/line.d.ts +2 -0
- package/es/victory-primitives/line.js +17 -10
- package/es/victory-primitives/path.d.ts +2 -0
- package/es/victory-primitives/path.js +15 -8
- package/es/victory-primitives/point.d.ts +21 -0
- package/es/victory-primitives/point.js +15 -23
- package/es/victory-primitives/rect.d.ts +2 -0
- package/es/victory-primitives/rect.js +17 -10
- package/es/victory-primitives/text.d.ts +16 -0
- package/es/victory-primitives/text.js +13 -8
- package/es/victory-primitives/tspan.d.ts +2 -0
- package/es/victory-primitives/tspan.js +7 -6
- package/es/victory-primitives/types.d.ts +7 -0
- package/es/victory-primitives/types.js +1 -0
- package/es/victory-primitives/whisker.d.ts +24 -0
- package/es/victory-primitives/whisker.js +12 -12
- package/es/victory-theme/grayscale.d.ts +2 -0
- package/es/victory-theme/grayscale.js +1 -1
- package/es/victory-theme/material.d.ts +2 -0
- package/es/victory-theme/material.js +1 -1
- package/es/victory-theme/victory-theme-definition.d.ts +244 -0
- package/es/victory-theme/victory-theme-definition.js +1 -0
- package/es/victory-theme/victory-theme.d.ts +5 -0
- package/es/victory-theme/victory-theme.js +6 -5
- package/es/victory-transition/victory-transition.d.ts +59 -0
- package/es/victory-transition/victory-transition.js +38 -44
- package/es/victory-util/add-events.js +328 -319
- package/es/victory-util/axis.js +12 -6
- package/es/victory-util/collection.js +7 -5
- package/es/victory-util/common-props.js +2 -2
- package/es/victory-util/data.js +8 -6
- package/es/victory-util/default-transitions.js +0 -1
- package/es/victory-util/domain.js +7 -5
- package/es/victory-util/events.js +8 -4
- package/es/victory-util/helpers.js +1 -3
- package/es/victory-util/hooks/use-animation-state.js +11 -5
- package/es/victory-util/immutable.js +0 -1
- package/es/victory-util/label-helpers.js +0 -2
- package/es/victory-util/line-helpers.js +1 -1
- package/es/victory-util/log.js +0 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -0
- package/es/victory-util/point-path-helpers.js +59 -61
- package/es/victory-util/scale.js +19 -19
- package/es/victory-util/selection.d.ts +23 -0
- package/es/victory-util/selection.js +0 -2
- package/es/victory-util/style.js +0 -2
- package/es/victory-util/textsize.d.ts +8 -0
- package/es/victory-util/textsize.js +11 -7
- package/es/victory-util/timer-context.d.ts +11 -0
- package/es/victory-util/timer-context.js +1 -1
- package/es/victory-util/timer.d.ts +16 -0
- package/es/victory-util/timer.js +16 -13
- package/es/victory-util/types.d.ts +188 -0
- package/es/victory-util/types.js +1 -0
- package/es/victory-util/user-props.js +44 -4
- package/es/victory-util/wrapper.js +18 -12
- package/lib/index.d.ts +38 -941
- package/lib/index.js +201 -189
- package/lib/types.d.ts +33 -0
- package/lib/types.js +1 -0
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/lib/victory-accessible-group/victory-accessible-group.js +37 -45
- package/lib/victory-animation/util.d.ts +66 -0
- package/lib/victory-animation/util.js +4 -3
- package/lib/victory-animation/victory-animation.d.ts +69 -0
- package/lib/victory-animation/victory-animation.js +97 -102
- package/lib/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/lib/victory-clip-container/victory-clip-container.js +81 -82
- package/lib/victory-container/victory-container.d.ts +99 -0
- package/lib/victory-container/victory-container.js +102 -107
- package/lib/victory-label/victory-label.d.ts +61 -0
- package/lib/victory-label/victory-label.js +49 -32
- package/lib/victory-portal/portal-context.d.ts +11 -0
- package/lib/victory-portal/portal-context.js +4 -5
- package/lib/victory-portal/portal.d.ts +28 -0
- package/lib/victory-portal/portal.js +49 -50
- package/lib/victory-portal/victory-portal.d.ts +31 -0
- package/lib/victory-portal/victory-portal.js +43 -47
- package/lib/victory-primitives/arc.d.ts +21 -0
- package/lib/victory-primitives/arc.js +13 -10
- package/lib/victory-primitives/background.d.ts +22 -0
- package/lib/victory-primitives/background.js +16 -13
- package/lib/victory-primitives/border.d.ts +18 -0
- package/lib/victory-primitives/border.js +13 -10
- package/lib/victory-primitives/circle.d.ts +2 -0
- package/lib/victory-primitives/circle.js +17 -8
- package/lib/victory-primitives/clip-path.d.ts +14 -0
- package/lib/victory-primitives/clip-path.js +7 -5
- package/lib/victory-primitives/index.d.ts +14 -0
- package/lib/victory-primitives/index.js +187 -0
- package/lib/victory-primitives/line-segment.d.ts +19 -0
- package/lib/victory-primitives/line-segment.js +13 -10
- package/lib/victory-primitives/line.d.ts +2 -0
- package/lib/victory-primitives/line.js +17 -8
- package/lib/victory-primitives/path.d.ts +2 -0
- package/lib/victory-primitives/path.js +15 -6
- package/lib/victory-primitives/point.d.ts +21 -0
- package/lib/victory-primitives/point.js +21 -25
- package/lib/victory-primitives/rect.d.ts +2 -0
- package/lib/victory-primitives/rect.js +17 -8
- package/lib/victory-primitives/text.d.ts +16 -0
- package/lib/victory-primitives/text.js +14 -7
- package/lib/victory-primitives/tspan.d.ts +2 -0
- package/lib/victory-primitives/tspan.js +7 -4
- package/lib/victory-primitives/types.d.ts +7 -0
- package/lib/victory-primitives/types.js +1 -0
- package/lib/victory-primitives/whisker.d.ts +24 -0
- package/lib/victory-primitives/whisker.js +16 -13
- package/lib/victory-theme/grayscale.d.ts +2 -0
- package/lib/victory-theme/grayscale.js +3 -3
- package/lib/victory-theme/material.d.ts +2 -0
- package/lib/victory-theme/material.js +3 -3
- package/lib/victory-theme/victory-theme-definition.d.ts +244 -0
- package/lib/victory-theme/victory-theme-definition.js +1 -0
- package/lib/victory-theme/victory-theme.d.ts +5 -0
- package/lib/victory-theme/victory-theme.js +22 -8
- package/lib/victory-transition/victory-transition.d.ts +59 -0
- package/lib/victory-transition/victory-transition.js +43 -45
- package/lib/victory-util/add-events.js +326 -316
- package/lib/victory-util/axis.js +20 -11
- package/lib/victory-util/collection.js +10 -8
- package/lib/victory-util/common-props.js +6 -4
- package/lib/victory-util/data.js +13 -7
- package/lib/victory-util/default-transitions.js +1 -2
- package/lib/victory-util/domain.js +11 -5
- package/lib/victory-util/events.js +17 -11
- package/lib/victory-util/helpers.js +14 -16
- package/lib/victory-util/hooks/index.js +4 -4
- package/lib/victory-util/hooks/use-animation-state.js +14 -6
- package/lib/victory-util/immutable.js +3 -5
- package/lib/victory-util/label-helpers.js +6 -6
- package/lib/victory-util/line-helpers.js +4 -2
- package/lib/victory-util/log.js +0 -1
- package/lib/victory-util/point-path-helpers.d.ts +9 -0
- package/lib/victory-util/point-path-helpers.js +86 -73
- package/lib/victory-util/prop-types.js +5 -3
- package/lib/victory-util/scale.js +24 -21
- package/lib/victory-util/selection.d.ts +23 -0
- package/lib/victory-util/selection.js +5 -5
- package/lib/victory-util/style.js +0 -2
- package/lib/victory-util/textsize.d.ts +8 -0
- package/lib/victory-util/textsize.js +12 -8
- package/lib/victory-util/timer-context.d.ts +11 -0
- package/lib/victory-util/timer-context.js +1 -1
- package/lib/victory-util/timer.d.ts +16 -0
- package/lib/victory-util/timer.js +16 -13
- package/lib/victory-util/types.d.ts +188 -0
- package/lib/victory-util/types.js +1 -0
- package/lib/victory-util/user-props.js +53 -6
- package/lib/victory-util/wrapper.js +31 -23
- package/package.json +6 -13
- package/src/index.ts +42 -0
- package/src/types.ts +45 -0
- package/src/victory-accessible-group/{victory-accessible-group.js → victory-accessible-group.tsx} +10 -3
- package/src/victory-animation/{util.js → util.ts} +5 -4
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +90 -13
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +32 -6
- package/src/victory-container/{victory-container.js → victory-container.tsx} +70 -26
- package/src/victory-label/{victory-label.js → victory-label.tsx} +80 -19
- package/src/victory-portal/portal-context.ts +14 -0
- package/src/victory-portal/{portal.js → portal.tsx} +23 -12
- package/src/victory-portal/{victory-portal.js → victory-portal.tsx} +21 -6
- package/src/victory-primitives/{arc.js → arc.tsx} +15 -5
- package/src/victory-primitives/{background.js → background.tsx} +17 -7
- package/src/victory-primitives/{border.js → border.tsx} +12 -5
- 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} +13 -5
- 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} +25 -20
- package/src/victory-primitives/{rect.js → rect.tsx} +4 -2
- package/src/victory-primitives/{text.js → text.tsx} +9 -3
- package/src/victory-primitives/tspan.tsx +7 -0
- package/src/victory-primitives/types.ts +19 -0
- package/src/victory-primitives/{whisker.js → whisker.tsx} +20 -7
- package/src/victory-theme/{grayscale.js → grayscale.tsx} +2 -1
- package/src/victory-theme/{material.js → material.tsx} +2 -1
- package/src/victory-theme/victory-theme-definition.ts +261 -0
- package/src/victory-theme/victory-theme.tsx +5 -0
- package/src/victory-transition/{victory-transition.js → victory-transition.tsx} +68 -19
- package/src/victory-util/add-events.js +7 -5
- package/src/victory-util/axis.js +3 -1
- package/src/victory-util/collection.js +0 -1
- package/src/victory-util/common-props.js +2 -2
- package/src/victory-util/data.js +0 -1
- package/src/victory-util/default-transitions.js +0 -1
- package/src/victory-util/domain.js +0 -1
- package/src/victory-util/events.js +1 -1
- package/src/victory-util/helpers.js +0 -1
- package/src/victory-util/immutable.js +0 -1
- package/src/victory-util/label-helpers.js +0 -1
- package/src/victory-util/line-helpers.js +1 -1
- package/src/victory-util/log.js +0 -1
- package/src/victory-util/point-path-helpers.ts +119 -0
- package/src/victory-util/prop-types.js +0 -1
- package/src/victory-util/scale.js +18 -10
- package/src/victory-util/selection.d.ts +23 -0
- package/src/victory-util/selection.js +0 -1
- package/src/victory-util/style.js +0 -1
- package/src/victory-util/textsize.d.ts +8 -0
- package/src/victory-util/{timer-context.js → timer-context.ts} +0 -0
- package/src/victory-util/{timer.js → timer.ts} +20 -5
- package/src/victory-util/transitions.js +0 -1
- package/src/victory-util/types.ts +247 -0
- package/src/victory-util/user-props.js +31 -1
- package/src/victory-util/wrapper.js +0 -1
- 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/point-path-helpers.js +0 -121
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.VictoryClipContainer = void 0;
|
|
7
7
|
|
|
8
8
|
var _uniqueId2 = _interopRequireDefault(require("lodash/uniqueId"));
|
|
9
9
|
|
|
@@ -21,25 +21,35 @@ var CustomPropTypes = _interopRequireWildcard(require("../victory-util/prop-type
|
|
|
21
21
|
|
|
22
22
|
var Helpers = _interopRequireWildcard(require("../victory-util/helpers"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var UserProps = _interopRequireWildcard(require("../victory-util/user-props"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _clipPath = require("../victory-primitives/clip-path");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _circle = require("../victory-primitives/circle");
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
var _rect = require("../victory-primitives/rect");
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
31
35
|
|
|
32
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
37
|
|
|
34
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
38
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
39
|
+
|
|
40
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
41
|
+
|
|
42
|
+
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); }
|
|
35
43
|
|
|
36
|
-
function
|
|
44
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
37
45
|
|
|
38
|
-
function
|
|
46
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
39
47
|
|
|
40
|
-
function
|
|
48
|
+
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; }
|
|
41
49
|
|
|
42
|
-
function
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
43
53
|
|
|
44
54
|
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; }
|
|
45
55
|
|
|
@@ -47,25 +57,34 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
47
57
|
|
|
48
58
|
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); } }
|
|
49
59
|
|
|
50
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
60
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
61
|
+
|
|
62
|
+
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); }
|
|
63
|
+
|
|
64
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
65
|
+
|
|
66
|
+
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); }; }
|
|
51
67
|
|
|
52
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
68
|
+
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); }
|
|
53
69
|
|
|
54
70
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
55
71
|
|
|
56
|
-
function
|
|
72
|
+
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; } }
|
|
57
73
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
function (_React$Component) {
|
|
74
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
75
|
+
|
|
76
|
+
var VictoryClipContainer = /*#__PURE__*/function (_React$Component) {
|
|
61
77
|
_inherits(VictoryClipContainer, _React$Component);
|
|
62
78
|
|
|
79
|
+
var _super = _createSuper(VictoryClipContainer);
|
|
80
|
+
|
|
63
81
|
function VictoryClipContainer(props) {
|
|
64
82
|
var _this;
|
|
65
83
|
|
|
66
84
|
_classCallCheck(this, VictoryClipContainer);
|
|
67
85
|
|
|
68
|
-
_this =
|
|
86
|
+
_this = _super.call(this, props);
|
|
87
|
+
_this.clipId = void 0;
|
|
69
88
|
_this.clipId = !(0, _isObject2.default)(props) || props.clipId === undefined ? (0, _uniqueId2.default)("victory-clip-") : props.clipId;
|
|
70
89
|
return _this;
|
|
71
90
|
}
|
|
@@ -97,6 +116,7 @@ function (_React$Component) {
|
|
|
97
116
|
}, {
|
|
98
117
|
key: "renderClippedGroup",
|
|
99
118
|
value: function renderClippedGroup(props, clipId) {
|
|
119
|
+
var userProps = UserProps.getSafeUserProps(props);
|
|
100
120
|
var style = props.style,
|
|
101
121
|
events = props.events,
|
|
102
122
|
transform = props.transform,
|
|
@@ -112,10 +132,9 @@ function (_React$Component) {
|
|
|
112
132
|
key: "clipped-group-".concat(clipId),
|
|
113
133
|
clipPath: "url(#".concat(clipId, ")")
|
|
114
134
|
}, events);
|
|
115
|
-
return _react.default.cloneElement(groupComponent, _objectSpread({}, groupProps, {
|
|
116
|
-
"aria-label": props["aria-label"],
|
|
135
|
+
return /*#__PURE__*/_react.default.cloneElement(groupComponent, _objectSpread(_objectSpread({}, groupProps), {}, {
|
|
117
136
|
tabIndex: tabIndex
|
|
118
|
-
}), [clipComponent].concat(_toConsumableArray(_react.default.Children.toArray(children))));
|
|
137
|
+
}, userProps), [clipComponent].concat(_toConsumableArray(_react.default.Children.toArray(children))));
|
|
119
138
|
}
|
|
120
139
|
}, {
|
|
121
140
|
key: "renderGroup",
|
|
@@ -127,7 +146,7 @@ function (_React$Component) {
|
|
|
127
146
|
className = props.className,
|
|
128
147
|
groupComponent = props.groupComponent,
|
|
129
148
|
tabIndex = props.tabIndex;
|
|
130
|
-
return _react.default.cloneElement(groupComponent, (0, _assign2.default)({
|
|
149
|
+
return /*#__PURE__*/_react.default.cloneElement(groupComponent, (0, _assign2.default)({
|
|
131
150
|
className: className,
|
|
132
151
|
style: style,
|
|
133
152
|
transform: transform,
|
|
@@ -169,7 +188,7 @@ function (_React$Component) {
|
|
|
169
188
|
cx: origin.x - left,
|
|
170
189
|
cy: origin.y - top
|
|
171
190
|
};
|
|
172
|
-
child = _react.default.cloneElement(circleComponent, circleProps);
|
|
191
|
+
child = /*#__PURE__*/_react.default.cloneElement(circleComponent, circleProps);
|
|
173
192
|
} else {
|
|
174
193
|
var rectProps = {
|
|
175
194
|
x: translateX - left,
|
|
@@ -177,10 +196,10 @@ function (_React$Component) {
|
|
|
177
196
|
width: Math.max(clipWidth + left + right, 0),
|
|
178
197
|
height: Math.max(clipHeight + top + bottom, 0)
|
|
179
198
|
};
|
|
180
|
-
child = _react.default.cloneElement(rectComponent, rectProps);
|
|
199
|
+
child = /*#__PURE__*/_react.default.cloneElement(rectComponent, rectProps);
|
|
181
200
|
}
|
|
182
201
|
|
|
183
|
-
return _react.default.cloneElement(clipPathComponent, (0, _assign2.default)({
|
|
202
|
+
return /*#__PURE__*/_react.default.cloneElement(clipPathComponent, (0, _assign2.default)({
|
|
184
203
|
key: "clip-path-".concat(clipId)
|
|
185
204
|
}, props, {
|
|
186
205
|
clipId: clipId
|
|
@@ -241,61 +260,41 @@ function (_React$Component) {
|
|
|
241
260
|
return VictoryClipContainer;
|
|
242
261
|
}(_react.default.Component);
|
|
243
262
|
|
|
244
|
-
exports.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
polar: _propTypes.default.bool,
|
|
283
|
-
radius: CustomPropTypes.nonNegative,
|
|
284
|
-
style: _propTypes.default.object,
|
|
285
|
-
tabIndex: _propTypes.default.number,
|
|
286
|
-
transform: _propTypes.default.string,
|
|
287
|
-
translateX: _propTypes.default.number,
|
|
288
|
-
translateY: _propTypes.default.number
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
Object.defineProperty(VictoryClipContainer, "defaultProps", {
|
|
292
|
-
configurable: true,
|
|
293
|
-
enumerable: true,
|
|
294
|
-
writable: true,
|
|
295
|
-
value: {
|
|
296
|
-
circleComponent: _react.default.createElement(_circle.default, null),
|
|
297
|
-
rectComponent: _react.default.createElement(_rect.default, null),
|
|
298
|
-
clipPathComponent: _react.default.createElement(_clipPath.default, null),
|
|
299
|
-
groupComponent: _react.default.createElement("g", null)
|
|
300
|
-
}
|
|
301
|
-
});
|
|
263
|
+
exports.VictoryClipContainer = VictoryClipContainer;
|
|
264
|
+
VictoryClipContainer.displayName = "VictoryClipContainer";
|
|
265
|
+
VictoryClipContainer.role = "container";
|
|
266
|
+
VictoryClipContainer.propTypes = {
|
|
267
|
+
"aria-label": _propTypes.default.string,
|
|
268
|
+
children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node]),
|
|
269
|
+
circleComponent: _propTypes.default.element,
|
|
270
|
+
className: _propTypes.default.string,
|
|
271
|
+
clipHeight: CustomPropTypes.nonNegative,
|
|
272
|
+
clipId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
273
|
+
clipPadding: _propTypes.default.shape({
|
|
274
|
+
top: _propTypes.default.number,
|
|
275
|
+
bottom: _propTypes.default.number,
|
|
276
|
+
left: _propTypes.default.number,
|
|
277
|
+
right: _propTypes.default.number
|
|
278
|
+
}),
|
|
279
|
+
clipPathComponent: _propTypes.default.element,
|
|
280
|
+
clipWidth: CustomPropTypes.nonNegative,
|
|
281
|
+
events: _propTypes.default.object,
|
|
282
|
+
groupComponent: _propTypes.default.element,
|
|
283
|
+
origin: _propTypes.default.shape({
|
|
284
|
+
x: CustomPropTypes.nonNegative,
|
|
285
|
+
y: CustomPropTypes.nonNegative
|
|
286
|
+
}),
|
|
287
|
+
polar: _propTypes.default.bool,
|
|
288
|
+
radius: CustomPropTypes.nonNegative,
|
|
289
|
+
style: _propTypes.default.object,
|
|
290
|
+
tabIndex: _propTypes.default.number,
|
|
291
|
+
transform: _propTypes.default.string,
|
|
292
|
+
translateX: _propTypes.default.number,
|
|
293
|
+
translateY: _propTypes.default.number
|
|
294
|
+
};
|
|
295
|
+
VictoryClipContainer.defaultProps = {
|
|
296
|
+
circleComponent: /*#__PURE__*/_react.default.createElement(_circle.Circle, null),
|
|
297
|
+
rectComponent: /*#__PURE__*/_react.default.createElement(_rect.Rect, null),
|
|
298
|
+
clipPathComponent: /*#__PURE__*/_react.default.createElement(_clipPath.ClipPath, null),
|
|
299
|
+
groupComponent: /*#__PURE__*/_react.default.createElement("g", null)
|
|
300
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { OriginType } from "../victory-label/victory-label";
|
|
4
|
+
import { D3Scale } from "../victory-util/types";
|
|
5
|
+
import { VictoryThemeDefinition } from "../victory-theme/victory-theme-definition";
|
|
6
|
+
export interface VictoryContainerProps {
|
|
7
|
+
"aria-describedby"?: string;
|
|
8
|
+
"aria-labelledby"?: string;
|
|
9
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
10
|
+
className?: string;
|
|
11
|
+
containerId?: number | string;
|
|
12
|
+
containerRef?: React.Ref<HTMLElement>;
|
|
13
|
+
desc?: string;
|
|
14
|
+
events?: React.DOMAttributes<any>;
|
|
15
|
+
height?: number;
|
|
16
|
+
name?: string;
|
|
17
|
+
origin?: OriginType;
|
|
18
|
+
ouiaId?: number | string;
|
|
19
|
+
ouiaSafe?: boolean;
|
|
20
|
+
ouiaType?: string;
|
|
21
|
+
polar?: boolean;
|
|
22
|
+
portalComponent?: React.ReactElement;
|
|
23
|
+
portalZIndex?: number;
|
|
24
|
+
preserveAspectRatio?: string;
|
|
25
|
+
responsive?: boolean;
|
|
26
|
+
role?: string;
|
|
27
|
+
scale?: {
|
|
28
|
+
x?: D3Scale;
|
|
29
|
+
y?: D3Scale;
|
|
30
|
+
};
|
|
31
|
+
style?: React.CSSProperties;
|
|
32
|
+
tabIndex?: number;
|
|
33
|
+
theme?: VictoryThemeDefinition;
|
|
34
|
+
title?: string;
|
|
35
|
+
width?: number;
|
|
36
|
+
}
|
|
37
|
+
export declare class VictoryContainer extends React.Component<VictoryContainerProps> {
|
|
38
|
+
static displayName: string;
|
|
39
|
+
static role: string;
|
|
40
|
+
static propTypes: {
|
|
41
|
+
"aria-describedby": PropTypes.Requireable<string>;
|
|
42
|
+
"aria-labelledby": PropTypes.Requireable<string>;
|
|
43
|
+
children: PropTypes.Requireable<string | number | boolean | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
44
|
+
className: PropTypes.Requireable<string>;
|
|
45
|
+
containerId: PropTypes.Requireable<string | number>;
|
|
46
|
+
containerRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
+
desc: PropTypes.Requireable<string>;
|
|
48
|
+
events: PropTypes.Requireable<object>;
|
|
49
|
+
height: any;
|
|
50
|
+
name: PropTypes.Requireable<string>;
|
|
51
|
+
origin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
52
|
+
x: any;
|
|
53
|
+
y: any;
|
|
54
|
+
}>>;
|
|
55
|
+
ouiaId: PropTypes.Requireable<string | number>;
|
|
56
|
+
ouiaSafe: PropTypes.Requireable<boolean>;
|
|
57
|
+
ouiaType: PropTypes.Requireable<string>;
|
|
58
|
+
polar: PropTypes.Requireable<boolean>;
|
|
59
|
+
portalComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
60
|
+
portalZIndex: any;
|
|
61
|
+
preserveAspectRatio: PropTypes.Requireable<string>;
|
|
62
|
+
responsive: PropTypes.Requireable<boolean>;
|
|
63
|
+
role: PropTypes.Requireable<string>;
|
|
64
|
+
style: PropTypes.Requireable<object>;
|
|
65
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
66
|
+
theme: PropTypes.Requireable<object>;
|
|
67
|
+
title: PropTypes.Requireable<string>;
|
|
68
|
+
width: any;
|
|
69
|
+
};
|
|
70
|
+
static defaultProps: {
|
|
71
|
+
className: string;
|
|
72
|
+
portalComponent: JSX.Element;
|
|
73
|
+
portalZIndex: number;
|
|
74
|
+
responsive: boolean;
|
|
75
|
+
role: string;
|
|
76
|
+
};
|
|
77
|
+
static contextType: React.Context<{
|
|
78
|
+
transitionTimer: import("..").Timer;
|
|
79
|
+
animationTimer: import("..").Timer;
|
|
80
|
+
}>;
|
|
81
|
+
private containerId;
|
|
82
|
+
private portalRef;
|
|
83
|
+
private containerRef;
|
|
84
|
+
private shouldHandleWheel;
|
|
85
|
+
constructor(props: VictoryContainerProps);
|
|
86
|
+
savePortalRef: (portal: any) => any;
|
|
87
|
+
portalUpdate: (key: any, el: any) => void;
|
|
88
|
+
portalRegister: () => number;
|
|
89
|
+
portalDeregister: (key: any) => void;
|
|
90
|
+
saveContainerRef: (container: HTMLElement) => HTMLElement;
|
|
91
|
+
handleWheel: (e: any) => any;
|
|
92
|
+
componentDidMount(): void;
|
|
93
|
+
componentWillUnmount(): void;
|
|
94
|
+
getIdForElement(elementName: any): string;
|
|
95
|
+
getChildren(props: any): any;
|
|
96
|
+
getOUIAProps(props: any): any;
|
|
97
|
+
renderContainer(props: any, svgProps: any, style: any): JSX.Element;
|
|
98
|
+
render(): JSX.Element;
|
|
99
|
+
}
|