victory-errorbar 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,11 +1,12 @@
1
1
  # victory-errorbar
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
+ - Pin all internal victory package versions ([#2876](https://github.com/FormidableLabs/victory/pull/2876))
9
10
 
10
11
  ## 37.0.2
11
12
 
@@ -5517,9 +5517,9 @@ __webpack_require__.r(__webpack_exports__);
5517
5517
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
5518
5518
  /* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
5519
5519
  /* 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");
5520
- /* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
5520
+ /* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
5521
5521
  /* 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");
5522
- /* 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");
5522
+ /* 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");
5523
5523
 
5524
5524
  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); }
5525
5525
 
@@ -5619,7 +5619,7 @@ const VictoryContainer = initialProps => {
5619
5619
  };
5620
5620
  // eslint-disable-next-line react-hooks/exhaustive-deps
5621
5621
  }, []);
5622
- 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", {
5622
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
5623
5623
  className: className,
5624
5624
  style: {
5625
5625
  ...style,
@@ -5632,8 +5632,8 @@ const VictoryContainer = initialProps => {
5632
5632
  "data-ouia-component-id": ouiaId,
5633
5633
  "data-ouia-component-type": ouiaType,
5634
5634
  "data-ouia-safe": ouiaSafe,
5635
- ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_5__.mergeRefs)([localContainerRef, containerRef])
5636
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
5635
+ ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
5636
+ }, /*#__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({
5637
5637
  width: width,
5638
5638
  height: height,
5639
5639
  tabIndex: tabIndex,
@@ -6194,9 +6194,6 @@ const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().
6194
6194
  PortalContext.displayName = "PortalContext";
6195
6195
  const usePortalContext = () => {
6196
6196
  const context = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(PortalContext);
6197
- if (!context) {
6198
- throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");
6199
- }
6200
6197
  return context;
6201
6198
  };
6202
6199
  const PortalProvider = _ref => {
@@ -6252,12 +6249,10 @@ const PortalOutlet = _ref => {
6252
6249
  ...props
6253
6250
  } = _ref;
6254
6251
  const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_1__.usePortalContext)();
6255
- const children = Array.from(portalContext.children.entries()).map(_ref2 => {
6256
- let [key, node] = _ref2;
6257
- return !node.key ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(node, {
6258
- key
6259
- }) : node;
6260
- });
6252
+ if (!portalContext) {
6253
+ return null;
6254
+ }
6255
+ const children = Array.from(portalContext.children.values());
6261
6256
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(portalComponent, props, children);
6262
6257
  };
6263
6258
 
@@ -6323,26 +6318,28 @@ const VictoryPortal = initialProps => {
6323
6318
  const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
6324
6319
  _victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
6325
6320
  }
6321
+ const children = Array.isArray(props.children) ? props.children[0] : props.children;
6322
+ const {
6323
+ groupComponent
6324
+ } = props;
6325
+ const childProps = children && children.props || {};
6326
+ const standardProps = childProps.groupComponent ? {
6327
+ groupComponent,
6328
+ standalone: false
6329
+ } : {};
6330
+ const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]), {
6331
+ key: childProps.key ?? id
6332
+ });
6333
+ const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
6326
6334
  react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6327
- const children = Array.isArray(props.children) ? props.children[0] : props.children;
6328
- const {
6329
- groupComponent
6330
- } = props;
6331
- const childProps = children && children.props || {};
6332
- const standardProps = childProps.groupComponent ? {
6333
- groupComponent,
6334
- standalone: false
6335
- } : {};
6336
- const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]));
6337
- const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
6338
- portalContext.addChild(id, child);
6335
+ portalContext?.addChild(id, child);
6339
6336
  // eslint-disable-next-line react-hooks/exhaustive-deps
6340
6337
  }, [props.children]);
6341
6338
  react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6342
- return () => portalContext.removeChild(id);
6339
+ return () => portalContext?.removeChild(id);
6343
6340
  // eslint-disable-next-line react-hooks/exhaustive-deps
6344
6341
  }, []);
6345
- return null;
6342
+ return portalContext ? null : child;
6346
6343
  };
6347
6344
  VictoryPortal.role = "portal";
6348
6345