victory-box-plot 37.0.3-next.0 → 37.1.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/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # victory-box-plot
2
2
 
3
- ## 37.0.3-next.0
3
+ ## 37.1.1
4
4
 
5
- ### Patch Changes
5
+ ## 37.1.0
6
+
7
+ ### Minor Changes
6
8
 
7
- - Updated dependencies [65d02419f]
8
- - victory-core@37.0.3-next.0
9
- - victory-vendor@37.0.3-next.0
9
+ - Pin all internal victory package versions ([#2876](https://github.com/FormidableLabs/victory/pull/2876))
10
10
 
11
11
  ## 37.0.2
12
12
 
@@ -5681,9 +5681,9 @@ __webpack_require__.r(__webpack_exports__);
5681
5681
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
5682
5682
  /* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
5683
5683
  /* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
5684
- /* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
5684
+ /* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
5685
5685
  /* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-portal/portal-outlet */ "../../victory-core/es/victory-portal/portal-outlet.js");
5686
- /* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
5686
+ /* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
5687
5687
 
5688
5688
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5689
5689
 
@@ -5783,7 +5783,7 @@ const VictoryContainer = initialProps => {
5783
5783
  };
5784
5784
  // eslint-disable-next-line react-hooks/exhaustive-deps
5785
5785
  }, []);
5786
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_4__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
5786
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
5787
5787
  className: className,
5788
5788
  style: {
5789
5789
  ...style,
@@ -5796,8 +5796,8 @@ const VictoryContainer = initialProps => {
5796
5796
  "data-ouia-component-id": ouiaId,
5797
5797
  "data-ouia-component-type": ouiaType,
5798
5798
  "data-ouia-safe": ouiaSafe,
5799
- ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_5__.mergeRefs)([localContainerRef, containerRef])
5800
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
5799
+ ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
5800
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
5801
5801
  width: width,
5802
5802
  height: height,
5803
5803
  tabIndex: tabIndex,
@@ -6358,9 +6358,6 @@ const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().
6358
6358
  PortalContext.displayName = "PortalContext";
6359
6359
  const usePortalContext = () => {
6360
6360
  const context = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(PortalContext);
6361
- if (!context) {
6362
- throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");
6363
- }
6364
6361
  return context;
6365
6362
  };
6366
6363
  const PortalProvider = _ref => {
@@ -6416,12 +6413,10 @@ const PortalOutlet = _ref => {
6416
6413
  ...props
6417
6414
  } = _ref;
6418
6415
  const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_1__.usePortalContext)();
6419
- const children = Array.from(portalContext.children.entries()).map(_ref2 => {
6420
- let [key, node] = _ref2;
6421
- return !node.key ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(node, {
6422
- key
6423
- }) : node;
6424
- });
6416
+ if (!portalContext) {
6417
+ return null;
6418
+ }
6419
+ const children = Array.from(portalContext.children.values());
6425
6420
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(portalComponent, props, children);
6426
6421
  };
6427
6422
 
@@ -6487,26 +6482,28 @@ const VictoryPortal = initialProps => {
6487
6482
  const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
6488
6483
  _victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
6489
6484
  }
6485
+ const children = Array.isArray(props.children) ? props.children[0] : props.children;
6486
+ const {
6487
+ groupComponent
6488
+ } = props;
6489
+ const childProps = children && children.props || {};
6490
+ const standardProps = childProps.groupComponent ? {
6491
+ groupComponent,
6492
+ standalone: false
6493
+ } : {};
6494
+ const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]), {
6495
+ key: childProps.key ?? id
6496
+ });
6497
+ const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
6490
6498
  react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6491
- const children = Array.isArray(props.children) ? props.children[0] : props.children;
6492
- const {
6493
- groupComponent
6494
- } = props;
6495
- const childProps = children && children.props || {};
6496
- const standardProps = childProps.groupComponent ? {
6497
- groupComponent,
6498
- standalone: false
6499
- } : {};
6500
- const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]));
6501
- const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
6502
- portalContext.addChild(id, child);
6499
+ portalContext?.addChild(id, child);
6503
6500
  // eslint-disable-next-line react-hooks/exhaustive-deps
6504
6501
  }, [props.children]);
6505
6502
  react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6506
- return () => portalContext.removeChild(id);
6503
+ return () => portalContext?.removeChild(id);
6507
6504
  // eslint-disable-next-line react-hooks/exhaustive-deps
6508
6505
  }, []);
6509
- return null;
6506
+ return portalContext ? null : child;
6510
6507
  };
6511
6508
  VictoryPortal.role = "portal";
6512
6509