victory-tooltip 36.8.2 → 36.8.4

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.
@@ -11,40 +11,28 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ "./flyout.js":
15
- /*!*******************!*\
16
- !*** ./flyout.js ***!
17
- \*******************/
14
+ /***/ "./flyout.tsx":
15
+ /*!********************!*\
16
+ !*** ./flyout.tsx ***!
17
+ \********************/
18
18
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19
19
 
20
20
  "use strict";
21
21
  __webpack_require__.r(__webpack_exports__);
22
22
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
23
+ /* harmony export */ "Flyout": () => (/* binding */ Flyout)
24
24
  /* harmony export */ });
25
- /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/assign.js");
26
- /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_0__);
27
- /* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
28
- /* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__);
29
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
30
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
31
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
32
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);
33
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
34
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
35
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
36
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
37
-
38
-
39
-
25
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
26
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
27
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
28
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
29
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
40
30
  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; }
41
31
 
42
32
  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
33
 
44
34
  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
35
 
46
- /* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
47
-
48
36
 
49
37
 
50
38
 
@@ -58,8 +46,8 @@ var getVerticalPath = function (props) {
58
46
  var sign = orientation === "bottom" ? 1 : -1;
59
47
  var x = props.x + (props.dx || 0);
60
48
  var y = props.y + (props.dy || 0);
61
- var centerX = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(center) && center.x;
62
- var centerY = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(center) && center.y;
49
+ var centerX = center.x;
50
+ var centerY = center.y;
63
51
  var pointerEdge = centerY + sign * (height / 2);
64
52
  var oppositeEdge = centerY - sign * (height / 2);
65
53
  var rightEdge = centerX + width / 2;
@@ -80,8 +68,8 @@ var getHorizontalPath = function (props) {
80
68
  var sign = orientation === "left" ? 1 : -1;
81
69
  var x = props.x + (props.dx || 0);
82
70
  var y = props.y + (props.dy || 0);
83
- var centerX = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(center) && center.x;
84
- var centerY = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(center) && center.y;
71
+ var centerX = center.x;
72
+ var centerY = center.y;
85
73
  var pointerEdge = centerX - sign * (width / 2);
86
74
  var oppositeEdge = centerX + sign * (width / 2);
87
75
  var bottomEdge = centerY + height / 2;
@@ -103,26 +91,47 @@ var evaluateProps = function (props) {
103
91
  * `id`
104
92
  * `style`
105
93
  */
106
- var id = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.id, props);
107
- var style = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(props.style, props);
108
- return lodash_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {
94
+ var id = victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateProp(props.id, props);
95
+ var style = victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateStyle(props.style, props);
96
+ return _objectSpread(_objectSpread({}, props), {}, {
109
97
  id: id,
110
98
  style: style
111
99
  });
112
100
  };
113
101
 
114
102
  var defaultProps = {
115
- pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Path, null),
103
+ pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_2__.Path, null),
116
104
  role: "presentation",
117
105
  shapeRendering: "auto"
118
106
  };
119
-
120
- var Flyout = function (props) {
121
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
122
- var userProps = victory_core__WEBPACK_IMPORTED_MODULE_5__.getSafeUserProps(props);
123
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(props.pathComponent, _objectSpread(_objectSpread(_objectSpread({}, props.events), userProps), {}, {
107
+ var Flyout = function (initialProps) {
108
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
109
+ var userProps = victory_core__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props); // check for required props for this subcomponent
110
+ // they should be passed in from the wrapper
111
+
112
+ victory_core__WEBPACK_IMPORTED_MODULE_3__.assert(props.height, "Flyout props[height] is undefined");
113
+ victory_core__WEBPACK_IMPORTED_MODULE_3__.assert(props.width, "Flyout props[width] is undefined");
114
+ victory_core__WEBPACK_IMPORTED_MODULE_3__.assert(props.x, "Flyout props[x] is undefined");
115
+ victory_core__WEBPACK_IMPORTED_MODULE_3__.assert(props.y, "Flyout props[y] is undefined");
116
+ var flyoutPathProps = {
117
+ center: props.center || {
118
+ x: 0,
119
+ y: 0
120
+ },
121
+ cornerRadius: props.cornerRadius || 0,
122
+ dx: props.dx,
123
+ dy: props.dy,
124
+ height: props.height,
125
+ orientation: props.orientation || "top",
126
+ pointerLength: props.pointerLength || 0,
127
+ pointerWidth: props.pointerWidth || 0,
128
+ width: props.width,
129
+ x: props.x,
130
+ y: props.y
131
+ };
132
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, _objectSpread(_objectSpread(_objectSpread({}, props.events), userProps), {}, {
124
133
  style: props.style,
125
- d: getFlyoutPath(props),
134
+ d: getFlyoutPath(flyoutPathProps),
126
135
  className: props.className,
127
136
  shapeRendering: props.shapeRendering,
128
137
  role: props.role,
@@ -131,38 +140,18 @@ var Flyout = function (props) {
131
140
  }));
132
141
  };
133
142
 
134
- Flyout.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.CommonProps.primitiveProps), {}, {
135
- center: prop_types__WEBPACK_IMPORTED_MODULE_7___default().shape({
136
- x: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
137
- y: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number)
138
- }),
139
- cornerRadius: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
140
- datum: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object),
141
- dx: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
142
- dy: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
143
- height: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
144
- orientation: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOf(["top", "bottom", "left", "right"]),
145
- pathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().element),
146
- pointerLength: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
147
- pointerWidth: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
148
- width: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
149
- x: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
150
- y: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number)
151
- });
152
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Flyout);
153
-
154
143
  /***/ }),
155
144
 
156
- /***/ "./victory-tooltip.js":
157
- /*!****************************!*\
158
- !*** ./victory-tooltip.js ***!
159
- \****************************/
145
+ /***/ "./victory-tooltip.tsx":
146
+ /*!*****************************!*\
147
+ !*** ./victory-tooltip.tsx ***!
148
+ \*****************************/
160
149
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
161
150
 
162
151
  "use strict";
163
152
  __webpack_require__.r(__webpack_exports__);
164
153
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
165
- /* harmony export */ "default": () => (/* binding */ VictoryTooltip)
154
+ /* harmony export */ "VictoryTooltip": () => (/* binding */ VictoryTooltip)
166
155
  /* harmony export */ });
167
156
  /* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
168
157
  /* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_0__);
@@ -176,16 +165,13 @@ __webpack_require__.r(__webpack_exports__);
176
165
  /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_4__);
177
166
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
178
167
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
179
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
180
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);
181
168
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/label-helpers.js");
182
169
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
183
170
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
184
171
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/textsize.js");
185
172
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-portal/victory-portal.js");
186
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/prop-types.js");
187
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
188
- /* harmony import */ var _flyout__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./flyout */ "./flyout.js");
173
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
174
+ /* harmony import */ var _flyout__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./flyout */ "./flyout.tsx");
189
175
 
190
176
 
191
177
 
@@ -204,6 +190,12 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
204
190
 
205
191
  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; }
206
192
 
193
+ 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; }
194
+
195
+ 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; }
196
+
197
+ 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; }
198
+
207
199
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
208
200
 
209
201
  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); } }
@@ -224,7 +216,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
224
216
 
225
217
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
226
218
 
227
-
219
+ /* eslint-disable react/prop-types */
228
220
 
229
221
 
230
222
 
@@ -233,7 +225,6 @@ var fallbackProps = {
233
225
  pointerLength: 10,
234
226
  pointerWidth: 10
235
227
  };
236
-
237
228
  var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
238
229
  _inherits(VictoryTooltip, _React$Component);
239
230
 
@@ -245,6 +236,7 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
245
236
  _classCallCheck(this, VictoryTooltip);
246
237
 
247
238
  _this = _super.call(this, props);
239
+ _this.id = void 0;
248
240
  _this.id = props.id === undefined ? lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()("tooltip-") : props.id;
249
241
  return _this;
250
242
  }
@@ -262,15 +254,15 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
262
254
  return datum && datum.y < 0 ? negative : positive;
263
255
  }
264
256
 
265
- return this.getPolarOrientation(props, datum);
257
+ return this.getPolarOrientation(props);
266
258
  }
267
259
  }, {
268
260
  key: "getPolarOrientation",
269
- value: function getPolarOrientation(props, datum) {
270
- var degrees = victory_core__WEBPACK_IMPORTED_MODULE_6__.getDegrees(props, datum);
261
+ value: function getPolarOrientation(props) {
262
+ var degrees = victory_core__WEBPACK_IMPORTED_MODULE_6__.getDegrees(props, props.datum);
271
263
  var placement = props.labelPlacement || "vertical";
272
264
 
273
- if (placement === " vertical") {
265
+ if (placement === "vertical") {
274
266
  return this.getVerticalOrientations(degrees);
275
267
  } else if (placement === "parallel") {
276
268
  return degrees < 90 || degrees > 270 ? "right" : "left";
@@ -325,6 +317,14 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
325
317
  active: active
326
318
  }));
327
319
 
320
+ if (text === undefined || text === null) {
321
+ text = "";
322
+ }
323
+
324
+ if (typeof text === "number") {
325
+ text = text.toString();
326
+ }
327
+
328
328
  var _this$getStyles = this.getStyles(lodash_assign__WEBPACK_IMPORTED_MODULE_4___default()({}, props, {
329
329
  active: active,
330
330
  text: text
@@ -390,9 +390,9 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
390
390
  pointerLength: pointerLength
391
391
  });
392
392
 
393
- var offsetX = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(centerOffset) && centerOffset.x !== undefined ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(centerOffset.x, evaluatedProps) : 0;
394
- var offsetY = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(centerOffset) && centerOffset.y !== undefined ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(centerOffset.y, evaluatedProps) : 0;
395
- return lodash_assign__WEBPACK_IMPORTED_MODULE_4___default()({}, evaluatedProps, {
393
+ var offsetX = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(centerOffset) && (centerOffset === null || centerOffset === void 0 ? void 0 : centerOffset.x) !== undefined ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(centerOffset.x, evaluatedProps) : 0;
394
+ var offsetY = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(centerOffset) && (centerOffset === null || centerOffset === void 0 ? void 0 : centerOffset.y) !== undefined ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(centerOffset.y, evaluatedProps) : 0;
395
+ return _objectSpread(_objectSpread({}, evaluatedProps), {}, {
396
396
  centerOffset: {
397
397
  x: offsetX,
398
398
  y: offsetY
@@ -435,8 +435,7 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
435
435
  var labelStyle = style || {};
436
436
  var angle = labelStyle.angle || props.angle || this.getDefaultAngle(props);
437
437
  return angle ? "rotate(".concat(angle, " ").concat(x, " ").concat(y, ")") : undefined;
438
- } // eslint-disable-next-line complexity
439
-
438
+ }
440
439
  }, {
441
440
  key: "getDefaultAngle",
442
441
  value: function getDefaultAngle(props) {
@@ -452,7 +451,7 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
452
451
  var degrees = victory_core__WEBPACK_IMPORTED_MODULE_6__.getDegrees(props, datum);
453
452
  var sign = degrees > 90 && degrees < 180 || degrees > 270 ? 1 : -1;
454
453
  var labelRotation = labelPlacement === "perpendicular" ? 0 : 90;
455
- var angle;
454
+ var angle = 0;
456
455
 
457
456
  if (degrees === 0 || degrees === 180) {
458
457
  angle = orientation === "top" && degrees === 180 ? 270 : 90;
@@ -554,8 +553,8 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
554
553
  };
555
554
 
556
555
  return {
557
- flyoutHeight: flyoutHeight ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(flyoutHeight, props) : getHeight(props, labelSize, orientation),
558
- flyoutWidth: flyoutWidth ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(flyoutWidth, props) : getWidth(props, labelSize, orientation)
556
+ flyoutHeight: flyoutHeight ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(flyoutHeight, props) : getHeight(),
557
+ flyoutWidth: flyoutWidth ? victory_core__WEBPACK_IMPORTED_MODULE_8__.evaluateProp(flyoutWidth, props) : getWidth()
559
558
  };
560
559
  }
561
560
  }, {
@@ -674,7 +673,7 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
674
673
  var renderInPortal = props.renderInPortal;
675
674
 
676
675
  if (!active) {
677
- return renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_10__.VictoryPortal, null, null) : null;
676
+ return renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_10__.VictoryPortal, null) : null;
678
677
  }
679
678
 
680
679
  var evaluatedProps = this.getEvaluatedProps(props);
@@ -699,67 +698,13 @@ var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
699
698
 
700
699
  return VictoryTooltip;
701
700
  }((react__WEBPACK_IMPORTED_MODULE_5___default().Component));
702
-
703
701
  VictoryTooltip.displayName = "VictoryTooltip";
704
702
  VictoryTooltip.role = "tooltip";
705
- VictoryTooltip.propTypes = {
706
- activateData: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
707
- active: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
708
- activePoints: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().array),
709
- angle: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
710
- center: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
711
- x: victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative,
712
- y: victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative
713
- }),
714
- centerOffset: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
715
- x: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
716
- y: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)])
717
- }),
718
- constrainToVisibleArea: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
719
- cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative, (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
720
- data: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().array),
721
- datum: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),
722
- dx: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
723
- dy: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
724
- events: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),
725
- flyoutComponent: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().element),
726
- flyoutHeight: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative, (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
727
- flyoutPadding: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
728
- top: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
729
- bottom: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
730
- left: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
731
- right: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number)
732
- })]),
733
- flyoutStyle: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),
734
- flyoutWidth: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative, (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
735
- groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().element),
736
- height: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
737
- horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
738
- id: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string)]),
739
- index: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string)]),
740
- labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().element),
741
- orientation: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["top", "bottom", "left", "right"]), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
742
- pointerLength: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative, (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
743
- pointerOrientation: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["top", "bottom", "left", "right"]), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
744
- pointerWidth: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([victory_core__WEBPACK_IMPORTED_MODULE_12__.nonNegative, (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func)]),
745
- polar: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
746
- renderInPortal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
747
- scale: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
748
- x: victory_core__WEBPACK_IMPORTED_MODULE_12__.scale,
749
- y: victory_core__WEBPACK_IMPORTED_MODULE_12__.scale
750
- }),
751
- style: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().array)]),
752
- text: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().array)]),
753
- theme: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),
754
- width: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
755
- x: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),
756
- y: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number)
757
- };
758
703
  VictoryTooltip.defaultProps = {
759
704
  active: false,
760
705
  renderInPortal: true,
761
- labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_13__.VictoryLabel, null),
762
- flyoutComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_flyout__WEBPACK_IMPORTED_MODULE_14__["default"], null),
706
+ labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_11__.VictoryLabel, null),
707
+ flyoutComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_flyout__WEBPACK_IMPORTED_MODULE_12__.Flyout, null),
763
708
  groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement("g", null)
764
709
  };
765
710
 
@@ -833,8 +778,6 @@ VictoryTooltip.defaultEvents = function (props) {
833
778
  }];
834
779
  };
835
780
 
836
-
837
-
838
781
  /***/ }),
839
782
 
840
783
  /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js":
@@ -6427,8 +6370,7 @@ var getStyles = function (style, props) {
6427
6370
  }
6428
6371
 
6429
6372
  var getSingleStyle = function (s) {
6430
- s = s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles;
6431
- var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s, props);
6373
+ var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles, props);
6432
6374
  return lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, baseStyles, {
6433
6375
  fontSize: getFontSize(baseStyles)
6434
6376
  });
@@ -6632,22 +6574,19 @@ var getInlineXOffset = function (calculatedProps, textElements, index) {
6632
6574
  switch (textAnchor) {
6633
6575
  case "start":
6634
6576
  return widths.reduce(function (memo, width, i) {
6635
- memo = i < index ? memo + width : memo;
6636
- return memo;
6577
+ return i < index ? memo + width : memo;
6637
6578
  }, 0);
6638
6579
 
6639
6580
  case "end":
6640
6581
  return widths.reduce(function (memo, width, i) {
6641
- memo = i > index ? memo - width : memo;
6642
- return memo;
6582
+ return i > index ? memo - width : memo;
6643
6583
  }, 0);
6644
6584
 
6645
6585
  default:
6646
6586
  // middle
6647
6587
  return widths.reduce(function (memo, width, i) {
6648
6588
  var offsetWidth = i < index ? width : 0;
6649
- memo = i === index ? memo + width / 2 : memo + offsetWidth;
6650
- return memo;
6589
+ return i === index ? memo + width / 2 : memo + offsetWidth;
6651
6590
  }, centerOffset);
6652
6591
  }
6653
6592
  };
@@ -6849,8 +6788,8 @@ var defaultProps = {
6849
6788
  // Magic number from d3.
6850
6789
  lineHeight: 1
6851
6790
  };
6852
- var VictoryLabel = function (props) {
6853
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
6791
+ var VictoryLabel = function (initialProps) {
6792
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
6854
6793
 
6855
6794
  if (props.text === null || props.text === undefined) {
6856
6795
  return null;
@@ -6871,7 +6810,7 @@ var VictoryLabel = function (props) {
6871
6810
  fontSize: currentStyle.fontSize || defaultStyles.fontSize,
6872
6811
  capHeight: capHeightPx,
6873
6812
  text: line,
6874
- // @ts-expect-error TODO: This looks like a bug:
6813
+ // TODO: This looks like a bug:
6875
6814
  textSize: _victory_util_textsize__WEBPACK_IMPORTED_MODULE_12__.approximateTextSize(line, currentStyle),
6876
6815
  lineHeight: currentLineHeight,
6877
6816
  backgroundPadding: getSingleValue(backgroundPadding, i)
@@ -8008,155 +7947,6 @@ function getMinValue(arr) {
8008
7947
 
8009
7948
  /***/ }),
8010
7949
 
8011
- /***/ "../../victory-core/es/victory-util/common-props.js":
8012
- /*!**********************************************************!*\
8013
- !*** ../../victory-core/es/victory-util/common-props.js ***!
8014
- \**********************************************************/
8015
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8016
-
8017
- "use strict";
8018
- __webpack_require__.r(__webpack_exports__);
8019
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8020
- /* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
8021
- /* harmony export */ });
8022
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
8023
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
8024
- /* harmony import */ var _prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prop-types */ "../../victory-core/es/victory-util/prop-types.js");
8025
-
8026
-
8027
- var dataProps = {
8028
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8029
- categories: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8030
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
8031
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
8032
- })]),
8033
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8034
- data: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)]),
8035
- dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
8036
- disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
8037
- labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
8038
- labels: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array)]),
8039
- samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
8040
- sortKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))]),
8041
- sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
8042
- style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8043
- parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
8044
- data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
8045
- labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
8046
- }),
8047
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))]),
8048
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))]),
8049
- y0: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))])
8050
- };
8051
- var baseProps = {
8052
- animate: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)]),
8053
- containerComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
8054
- domain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8055
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
8056
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
8057
- })]),
8058
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8059
- maxDomain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8060
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)]),
8061
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)])
8062
- })]),
8063
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8064
- minDomain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8065
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)]),
8066
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)])
8067
- })]),
8068
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8069
- domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8070
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))]),
8071
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))])
8072
- }), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))]),
8073
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)]),
8074
- events: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8075
- target: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["data", "labels", "parent"]),
8076
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().array), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)]),
8077
- eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
8078
- })),
8079
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8080
- externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8081
- callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
8082
- childName: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array)]),
8083
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().array), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)]),
8084
- mutation: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
8085
- target: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array)])
8086
- })),
8087
- groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
8088
- height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
8089
- name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
8090
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8091
- origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8092
- x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
8093
- y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
8094
- }),
8095
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8096
- padding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8097
- top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
8098
- bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
8099
- left: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
8100
- right: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
8101
- })]),
8102
- polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
8103
- range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8104
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
8105
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
8106
- })]),
8107
- scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8108
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
8109
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
8110
- })]),
8111
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8112
- sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8113
- events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
8114
- getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
8115
- }),
8116
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8117
- singleQuadrantDomainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8118
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
8119
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
8120
- })]),
8121
- standalone: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
8122
- theme: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
8123
- width: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative
8124
- };
8125
- var primitiveProps = {
8126
- active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
8127
- ariaLabel: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
8128
- className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
8129
- clipPath: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
8130
- data: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)]),
8131
- desc: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
8132
- disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
8133
- events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
8134
- id: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
8135
- index: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)]),
8136
- // @ts-expect-error TODO: synchronize the type with this PropTypes
8137
- origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8138
- x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
8139
- y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
8140
- }),
8141
- polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
8142
- role: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
8143
- scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
8144
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
8145
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
8146
- })]),
8147
- shapeRendering: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
8148
- style: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
8149
- tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
8150
- transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
8151
- };
8152
- var CommonProps = {
8153
- dataProps: dataProps,
8154
- baseProps: baseProps,
8155
- primitiveProps: primitiveProps
8156
- };
8157
-
8158
- /***/ }),
8159
-
8160
7950
  /***/ "../../victory-core/es/victory-util/helpers.js":
8161
7951
  /*!*****************************************************!*\
8162
7952
  !*** ../../victory-core/es/victory-util/helpers.js ***!
@@ -8489,6 +8279,7 @@ function reduceChildren(children, iteratee) {
8489
8279
 
8490
8280
  var traverseChildren = function (childArray, names, parent) {
8491
8281
  return childArray.reduce(function (memo, child, index) {
8282
+ var newMemo = memo;
8492
8283
  var childRole = child.type && child.type.role;
8493
8284
  var childName = child.props.name || "".concat(childRole, "-").concat(names[index]);
8494
8285
 
@@ -8506,16 +8297,16 @@ function reduceChildren(children, iteratee) {
8506
8297
  });
8507
8298
 
8508
8299
  var nestedResults = traverseChildren(nestedChildren, _childNames, child);
8509
- memo = combine(memo, nestedResults);
8300
+ newMemo = combine(newMemo, nestedResults);
8510
8301
  } else {
8511
8302
  var result = iteratee(child, childName, parent);
8512
8303
 
8513
8304
  if (result) {
8514
- memo = combine(memo, result);
8305
+ newMemo = combine(newMemo, result);
8515
8306
  }
8516
8307
  }
8517
8308
 
8518
- return memo;
8309
+ return newMemo;
8519
8310
  }, initialMemo);
8520
8311
  };
8521
8312
 
@@ -8541,8 +8332,7 @@ function isHorizontal(props) {
8541
8332
  var childProps = child.props || {};
8542
8333
 
8543
8334
  if (memo || childProps.horizontal || !childProps.children) {
8544
- memo = memo || childProps.horizontal;
8545
- return memo;
8335
+ return memo || childProps.horizontal;
8546
8336
  }
8547
8337
 
8548
8338
  return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(childProps.children));
@@ -8575,12 +8365,10 @@ __webpack_require__.r(__webpack_exports__);
8575
8365
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
8576
8366
 
8577
8367
 
8578
- /* eslint-disable no-use-before-define */
8579
-
8580
8368
 
8581
8369
  // Private Functions
8582
- function getVerticalAnchor(props, datum) {
8583
- datum = datum || {};
8370
+ function getVerticalAnchor(props) {
8371
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8584
8372
  var sign = datum._y >= 0 ? 1 : -1;
8585
8373
  var labelStyle = props.style && props.style.labels || {};
8586
8374
 
@@ -8593,8 +8381,8 @@ function getVerticalAnchor(props, datum) {
8593
8381
  return "middle";
8594
8382
  }
8595
8383
 
8596
- function getTextAnchor(props, datum) {
8597
- datum = datum || {};
8384
+ function getTextAnchor(props) {
8385
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8598
8386
  var style = props.style,
8599
8387
  horizontal = props.horizontal;
8600
8388
  var sign = datum._y >= 0 ? 1 : -1;
@@ -8609,14 +8397,14 @@ function getTextAnchor(props, datum) {
8609
8397
  return sign >= 0 ? "start" : "end";
8610
8398
  }
8611
8399
 
8612
- function getAngle(props, datum) {
8613
- datum = datum || {};
8400
+ function getAngle(props) {
8401
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8614
8402
  var labelStyle = props.style && props.style.labels || {};
8615
8403
  return datum.angle === undefined ? labelStyle.angle : datum.angle;
8616
8404
  }
8617
8405
 
8618
- function getPadding(props, datum) {
8619
- datum = datum || {};
8406
+ function getPadding(props) {
8407
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8620
8408
  var horizontal = props.horizontal,
8621
8409
  style = props.style;
8622
8410
  var labelStyle = style.labels || {};
@@ -8695,8 +8483,9 @@ function getPolarOrientation(degrees) {
8695
8483
  } // Exported Functions
8696
8484
 
8697
8485
 
8698
- function getText(props, datum, index) {
8699
- datum = datum || {};
8486
+ function getText(props) {
8487
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8488
+ var index = arguments.length > 2 ? arguments[2] : undefined;
8700
8489
 
8701
8490
  if (datum.label !== undefined) {
8702
8491
  return datum.label;
@@ -9764,6 +9553,7 @@ var approximateTextSize = function (text, style) {
9764
9553
  "use strict";
9765
9554
  __webpack_require__.r(__webpack_exports__);
9766
9555
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9556
+ /* harmony export */ "assert": () => (/* binding */ assert),
9767
9557
  /* harmony export */ "getSafeUserProps": () => (/* binding */ getSafeUserProps),
9768
9558
  /* harmony export */ "withSafeUserProps": () => (/* binding */ withSafeUserProps)
9769
9559
  /* harmony export */ });
@@ -9844,6 +9634,18 @@ var testIfSafeProp = function (key) {
9844
9634
  if (doesPropStartWith(key) || isExactMatch(key)) return true;
9845
9635
  return false;
9846
9636
  };
9637
+ /**
9638
+ * Asserts that value is not null or undefined, throwing an error if it is.
9639
+ * @param value The value to assert
9640
+ * @param message The error message to throw
9641
+ */
9642
+
9643
+
9644
+ function assert(value, message) {
9645
+ if (value === undefined || value === null) {
9646
+ throw new Error(message);
9647
+ }
9648
+ }
9847
9649
  /**
9848
9650
  * getSafeUserProps - function that takes in a props object and removes any
9849
9651
  * key-value entries that do not match filter strings in the USER_PROPS_SAFELIST
@@ -9853,7 +9655,6 @@ var testIfSafeProp = function (key) {
9853
9655
  * @returns {Object}: object containing remaining acceptable props
9854
9656
  */
9855
9657
 
9856
-
9857
9658
  var getSafeUserProps = function (props) {
9858
9659
  var propsToFilter = _objectSpread({}, props);
9859
9660
 
@@ -15473,15 +15274,15 @@ var __webpack_exports__ = {};
15473
15274
  (() => {
15474
15275
  "use strict";
15475
15276
  /*!******************!*\
15476
- !*** ./index.js ***!
15277
+ !*** ./index.ts ***!
15477
15278
  \******************/
15478
15279
  __webpack_require__.r(__webpack_exports__);
15479
15280
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15480
- /* harmony export */ "Flyout": () => (/* reexport safe */ _flyout__WEBPACK_IMPORTED_MODULE_1__["default"]),
15481
- /* harmony export */ "VictoryTooltip": () => (/* reexport safe */ _victory_tooltip__WEBPACK_IMPORTED_MODULE_0__["default"])
15281
+ /* harmony export */ "Flyout": () => (/* reexport safe */ _flyout__WEBPACK_IMPORTED_MODULE_1__.Flyout),
15282
+ /* harmony export */ "VictoryTooltip": () => (/* reexport safe */ _victory_tooltip__WEBPACK_IMPORTED_MODULE_0__.VictoryTooltip)
15482
15283
  /* harmony export */ });
15483
- /* harmony import */ var _victory_tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-tooltip */ "./victory-tooltip.js");
15484
- /* harmony import */ var _flyout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flyout */ "./flyout.js");
15284
+ /* harmony import */ var _victory_tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-tooltip */ "./victory-tooltip.tsx");
15285
+ /* harmony import */ var _flyout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flyout */ "./flyout.tsx");
15485
15286
 
15486
15287
 
15487
15288
  })();