victory-pie 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 +5 -5
- package/dist/victory-pie.js +25 -28
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.d.ts +13 -13
- package/es/index.d.ts +2 -2
- package/es/slice.d.ts +28 -28
- package/es/victory-pie.d.ts +116 -116
- package/lib/helper-methods.d.ts +13 -13
- package/lib/index.d.ts +2 -2
- package/lib/slice.d.ts +28 -28
- package/lib/victory-pie.d.ts +116 -116
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# victory-pie
|
|
2
2
|
|
|
3
|
-
## 37.
|
|
3
|
+
## 37.1.1
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 37.1.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
6
8
|
|
|
7
|
-
-
|
|
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
|
|
package/dist/victory-pie.js
CHANGED
|
@@ -5307,9 +5307,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5307
5307
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
5308
5308
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5309
5309
|
/* 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");
|
|
5310
|
-
/* harmony import */ var
|
|
5310
|
+
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
5311
5311
|
/* 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");
|
|
5312
|
-
/* harmony import */ var
|
|
5312
|
+
/* 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");
|
|
5313
5313
|
|
|
5314
5314
|
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); }
|
|
5315
5315
|
|
|
@@ -5409,7 +5409,7 @@ const VictoryContainer = initialProps => {
|
|
|
5409
5409
|
};
|
|
5410
5410
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5411
5411
|
}, []);
|
|
5412
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
5412
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
|
5413
5413
|
className: className,
|
|
5414
5414
|
style: {
|
|
5415
5415
|
...style,
|
|
@@ -5422,8 +5422,8 @@ const VictoryContainer = initialProps => {
|
|
|
5422
5422
|
"data-ouia-component-id": ouiaId,
|
|
5423
5423
|
"data-ouia-component-type": ouiaType,
|
|
5424
5424
|
"data-ouia-safe": ouiaSafe,
|
|
5425
|
-
ref: (0,
|
|
5426
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
|
5425
|
+
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
5426
|
+
}, /*#__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({
|
|
5427
5427
|
width: width,
|
|
5428
5428
|
height: height,
|
|
5429
5429
|
tabIndex: tabIndex,
|
|
@@ -5984,9 +5984,6 @@ const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().
|
|
|
5984
5984
|
PortalContext.displayName = "PortalContext";
|
|
5985
5985
|
const usePortalContext = () => {
|
|
5986
5986
|
const context = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(PortalContext);
|
|
5987
|
-
if (!context) {
|
|
5988
|
-
throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");
|
|
5989
|
-
}
|
|
5990
5987
|
return context;
|
|
5991
5988
|
};
|
|
5992
5989
|
const PortalProvider = _ref => {
|
|
@@ -6042,12 +6039,10 @@ const PortalOutlet = _ref => {
|
|
|
6042
6039
|
...props
|
|
6043
6040
|
} = _ref;
|
|
6044
6041
|
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_1__.usePortalContext)();
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
}) : node;
|
|
6050
|
-
});
|
|
6042
|
+
if (!portalContext) {
|
|
6043
|
+
return null;
|
|
6044
|
+
}
|
|
6045
|
+
const children = Array.from(portalContext.children.values());
|
|
6051
6046
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(portalComponent, props, children);
|
|
6052
6047
|
};
|
|
6053
6048
|
|
|
@@ -6113,26 +6108,28 @@ const VictoryPortal = initialProps => {
|
|
|
6113
6108
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
6114
6109
|
_victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
|
|
6115
6110
|
}
|
|
6111
|
+
const children = Array.isArray(props.children) ? props.children[0] : props.children;
|
|
6112
|
+
const {
|
|
6113
|
+
groupComponent
|
|
6114
|
+
} = props;
|
|
6115
|
+
const childProps = children && children.props || {};
|
|
6116
|
+
const standardProps = childProps.groupComponent ? {
|
|
6117
|
+
groupComponent,
|
|
6118
|
+
standalone: false
|
|
6119
|
+
} : {};
|
|
6120
|
+
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]), {
|
|
6121
|
+
key: childProps.key ?? id
|
|
6122
|
+
});
|
|
6123
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
|
|
6116
6124
|
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
6117
|
-
|
|
6118
|
-
const {
|
|
6119
|
-
groupComponent
|
|
6120
|
-
} = props;
|
|
6121
|
-
const childProps = children && children.props || {};
|
|
6122
|
-
const standardProps = childProps.groupComponent ? {
|
|
6123
|
-
groupComponent,
|
|
6124
|
-
standalone: false
|
|
6125
|
-
} : {};
|
|
6126
|
-
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]));
|
|
6127
|
-
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
|
|
6128
|
-
portalContext.addChild(id, child);
|
|
6125
|
+
portalContext?.addChild(id, child);
|
|
6129
6126
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6130
6127
|
}, [props.children]);
|
|
6131
6128
|
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
6132
|
-
return () => portalContext
|
|
6129
|
+
return () => portalContext?.removeChild(id);
|
|
6133
6130
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6134
6131
|
}, []);
|
|
6135
|
-
return null;
|
|
6132
|
+
return portalContext ? null : child;
|
|
6136
6133
|
};
|
|
6137
6134
|
VictoryPortal.role = "portal";
|
|
6138
6135
|
|