victory-box-plot 37.0.1 → 37.0.3-next.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/CHANGELOG.md +10 -0
- package/dist/victory-box-plot.js +333 -306
- package/dist/victory-box-plot.min.js +1 -1
- package/es/helper-methods.d.ts +3 -3
- package/es/index.d.ts +1 -1
- package/es/victory-box-plot.d.ts +139 -139
- package/lib/helper-methods.d.ts +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/victory-box-plot.d.ts +139 -139
- package/package.json +4 -7
package/dist/victory-box-plot.js
CHANGED
|
@@ -5672,23 +5672,18 @@ const VictoryAnimation = _ref => {
|
|
|
5672
5672
|
"use strict";
|
|
5673
5673
|
__webpack_require__.r(__webpack_exports__);
|
|
5674
5674
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5675
|
-
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; }
|
|
5675
|
+
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
5676
|
+
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
5676
5677
|
/* harmony export */ });
|
|
5677
|
-
/* harmony import */ var
|
|
5678
|
-
/* harmony import */ var
|
|
5679
|
-
/* harmony import */ var
|
|
5680
|
-
/* harmony import */ var
|
|
5681
|
-
/* harmony import */ var
|
|
5682
|
-
/* harmony import */ var
|
|
5683
|
-
/* harmony import */ var
|
|
5684
|
-
/* harmony import */ var
|
|
5685
|
-
/* harmony import */ var
|
|
5686
|
-
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
5687
|
-
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
5688
|
-
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
5689
|
-
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
5690
|
-
|
|
5691
|
-
|
|
5678
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
5679
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__);
|
|
5680
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
5681
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
5682
|
+
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
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");
|
|
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");
|
|
5692
5687
|
|
|
5693
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); }
|
|
5694
5689
|
|
|
@@ -5697,175 +5692,149 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
5697
5692
|
|
|
5698
5693
|
|
|
5699
5694
|
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5695
|
+
const defaultProps = {
|
|
5696
|
+
className: "VictoryContainer",
|
|
5697
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5698
|
+
portalZIndex: 99,
|
|
5699
|
+
responsive: true,
|
|
5700
|
+
role: "img"
|
|
5701
|
+
};
|
|
5702
|
+
function useVictoryContainer(initialProps) {
|
|
5703
|
+
const props = {
|
|
5704
|
+
...defaultProps,
|
|
5705
|
+
...initialProps
|
|
5709
5706
|
};
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5707
|
+
const {
|
|
5708
|
+
title,
|
|
5709
|
+
desc,
|
|
5710
|
+
width,
|
|
5711
|
+
height,
|
|
5712
|
+
responsive
|
|
5713
|
+
} = props;
|
|
5714
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
5715
|
+
|
|
5716
|
+
// Generated ID stored in ref because it needs to persist across renders
|
|
5717
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default()("victory-container-"));
|
|
5718
|
+
const containerId = props.containerId ?? generatedId.current;
|
|
5719
|
+
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
5720
|
+
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
5721
|
+
const dimensions = responsive ? {
|
|
5722
|
+
width: "100%",
|
|
5723
|
+
height: "100%"
|
|
5724
|
+
} : {
|
|
5725
|
+
width,
|
|
5726
|
+
height
|
|
5724
5727
|
};
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5728
|
+
const viewBox = responsive ? `0 0 ${width} ${height}` : undefined;
|
|
5729
|
+
const preserveAspectRatio = responsive ? props.preserveAspectRatio : undefined;
|
|
5730
|
+
const ariaLabelledBy = [title && getIdForElement("title"), props["aria-labelledby"]].filter(Boolean).join(" ") || undefined;
|
|
5731
|
+
const ariaDescribedBy = [desc && getIdForElement("desc"), props["aria-describedby"]].filter(Boolean).join(" ") || undefined;
|
|
5732
|
+
const titleId = getIdForElement("title");
|
|
5733
|
+
const descId = getIdForElement("desc");
|
|
5734
|
+
return {
|
|
5735
|
+
...props,
|
|
5736
|
+
titleId,
|
|
5737
|
+
descId,
|
|
5738
|
+
dimensions,
|
|
5739
|
+
viewBox,
|
|
5740
|
+
preserveAspectRatio,
|
|
5741
|
+
ariaLabelledBy,
|
|
5742
|
+
ariaDescribedBy,
|
|
5743
|
+
userProps,
|
|
5744
|
+
localContainerRef
|
|
5734
5745
|
};
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
})
|
|
5773
|
-
};
|
|
5774
|
-
}
|
|
5775
|
-
renderContainer(props, svgProps, style) {
|
|
5776
|
-
const {
|
|
5777
|
-
title,
|
|
5778
|
-
desc,
|
|
5779
|
-
portalComponent,
|
|
5780
|
-
className,
|
|
5781
|
-
width,
|
|
5782
|
-
height,
|
|
5783
|
-
portalZIndex,
|
|
5784
|
-
responsive
|
|
5785
|
-
} = props;
|
|
5786
|
-
const children = this.getChildren(props);
|
|
5787
|
-
const dimensions = responsive ? {
|
|
5788
|
-
width: "100%",
|
|
5789
|
-
height: "100%"
|
|
5790
|
-
} : {
|
|
5791
|
-
width,
|
|
5792
|
-
height
|
|
5746
|
+
}
|
|
5747
|
+
const VictoryContainer = initialProps => {
|
|
5748
|
+
const {
|
|
5749
|
+
role,
|
|
5750
|
+
title,
|
|
5751
|
+
desc,
|
|
5752
|
+
children,
|
|
5753
|
+
className,
|
|
5754
|
+
portalZIndex,
|
|
5755
|
+
portalComponent,
|
|
5756
|
+
width,
|
|
5757
|
+
height,
|
|
5758
|
+
style,
|
|
5759
|
+
tabIndex,
|
|
5760
|
+
responsive,
|
|
5761
|
+
events,
|
|
5762
|
+
ouiaId,
|
|
5763
|
+
ouiaSafe,
|
|
5764
|
+
ouiaType,
|
|
5765
|
+
dimensions,
|
|
5766
|
+
ariaDescribedBy,
|
|
5767
|
+
ariaLabelledBy,
|
|
5768
|
+
viewBox,
|
|
5769
|
+
preserveAspectRatio,
|
|
5770
|
+
userProps,
|
|
5771
|
+
titleId,
|
|
5772
|
+
descId,
|
|
5773
|
+
containerRef,
|
|
5774
|
+
localContainerRef
|
|
5775
|
+
} = useVictoryContainer(initialProps);
|
|
5776
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
5777
|
+
if (!events?.onWheel) return;
|
|
5778
|
+
const handleWheel = e => e.preventDefault();
|
|
5779
|
+
const container = localContainerRef?.current;
|
|
5780
|
+
container?.addEventListener("wheel", handleWheel);
|
|
5781
|
+
return () => {
|
|
5782
|
+
container?.removeEventListener("wheel", handleWheel);
|
|
5793
5783
|
};
|
|
5794
|
-
|
|
5784
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
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", {
|
|
5787
|
+
className: className,
|
|
5788
|
+
style: {
|
|
5789
|
+
...style,
|
|
5790
|
+
width: responsive ? style?.width : dimensions.width,
|
|
5791
|
+
height: responsive ? style?.height : dimensions.height,
|
|
5795
5792
|
pointerEvents: "none",
|
|
5796
5793
|
touchAction: "none",
|
|
5797
5794
|
position: "relative"
|
|
5798
|
-
},
|
|
5799
|
-
|
|
5795
|
+
},
|
|
5796
|
+
"data-ouia-component-id": ouiaId,
|
|
5797
|
+
"data-ouia-component-type": ouiaType,
|
|
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({
|
|
5801
|
+
width: width,
|
|
5802
|
+
height: height,
|
|
5803
|
+
tabIndex: tabIndex,
|
|
5804
|
+
role: role,
|
|
5805
|
+
"aria-labelledby": ariaLabelledBy,
|
|
5806
|
+
"aria-describedby": ariaDescribedBy,
|
|
5807
|
+
viewBox: viewBox,
|
|
5808
|
+
preserveAspectRatio: preserveAspectRatio,
|
|
5809
|
+
style: {
|
|
5810
|
+
...dimensions,
|
|
5811
|
+
pointerEvents: "all"
|
|
5812
|
+
}
|
|
5813
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("title", {
|
|
5814
|
+
id: titleId
|
|
5815
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("desc", {
|
|
5816
|
+
id: descId
|
|
5817
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
|
5818
|
+
style: {
|
|
5819
|
+
...dimensions,
|
|
5800
5820
|
zIndex: portalZIndex,
|
|
5801
5821
|
position: "absolute",
|
|
5802
5822
|
top: 0,
|
|
5803
5823
|
left: 0
|
|
5804
|
-
}
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5824
|
+
}
|
|
5825
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
5826
|
+
as: portalComponent,
|
|
5827
|
+
width: width,
|
|
5828
|
+
height: height,
|
|
5829
|
+
viewBox: viewBox,
|
|
5830
|
+
preserveAspectRatio: preserveAspectRatio,
|
|
5831
|
+
style: {
|
|
5832
|
+
...dimensions,
|
|
5809
5833
|
overflow: "visible"
|
|
5810
|
-
}
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
viewBox: svgProps.viewBox,
|
|
5815
|
-
preserveAspectRatio: svgProps.preserveAspectRatio,
|
|
5816
|
-
style: portalSvgStyle
|
|
5817
|
-
};
|
|
5818
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_7__.PortalContext.Provider, {
|
|
5819
|
-
value: {
|
|
5820
|
-
portalUpdate: this.portalUpdate,
|
|
5821
|
-
portalRegister: this.portalRegister,
|
|
5822
|
-
portalDeregister: this.portalDeregister
|
|
5823
|
-
}
|
|
5824
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", _extends({
|
|
5825
|
-
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, style, divStyle),
|
|
5826
|
-
className: className,
|
|
5827
|
-
ref: this.saveContainerRef
|
|
5828
|
-
}, this.getOUIAProps(props)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("svg", _extends({}, svgProps, {
|
|
5829
|
-
style: svgStyle
|
|
5830
|
-
}), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("title", {
|
|
5831
|
-
id: this.getIdForElement("title")
|
|
5832
|
-
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("desc", {
|
|
5833
|
-
id: this.getIdForElement("desc")
|
|
5834
|
-
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
|
5835
|
-
style: portalDivStyle
|
|
5836
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(portalComponent, {
|
|
5837
|
-
...portalProps,
|
|
5838
|
-
ref: this.savePortalRef
|
|
5839
|
-
}))));
|
|
5840
|
-
}
|
|
5841
|
-
render() {
|
|
5842
|
-
const {
|
|
5843
|
-
width,
|
|
5844
|
-
height,
|
|
5845
|
-
responsive,
|
|
5846
|
-
events,
|
|
5847
|
-
title,
|
|
5848
|
-
desc,
|
|
5849
|
-
tabIndex,
|
|
5850
|
-
preserveAspectRatio,
|
|
5851
|
-
role
|
|
5852
|
-
} = this.props;
|
|
5853
|
-
const style = responsive ? this.props.style : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.omit(this.props.style, ["height", "width"]);
|
|
5854
|
-
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_8__.getSafeUserProps(this.props);
|
|
5855
|
-
const svgProps = Object.assign({
|
|
5856
|
-
width,
|
|
5857
|
-
height,
|
|
5858
|
-
tabIndex,
|
|
5859
|
-
role,
|
|
5860
|
-
"aria-labelledby": [title && this.getIdForElement("title"), this.props["aria-labelledby"]].filter(Boolean).join(" ") || undefined,
|
|
5861
|
-
"aria-describedby": [desc && this.getIdForElement("desc"), this.props["aria-describedby"]].filter(Boolean).join(" ") || undefined,
|
|
5862
|
-
viewBox: responsive ? `0 0 ${width} ${height}` : undefined,
|
|
5863
|
-
preserveAspectRatio: responsive ? preserveAspectRatio : undefined,
|
|
5864
|
-
...userProps
|
|
5865
|
-
}, events);
|
|
5866
|
-
return this.renderContainer(this.props, svgProps, style);
|
|
5867
|
-
}
|
|
5868
|
-
}
|
|
5834
|
+
}
|
|
5835
|
+
}))));
|
|
5836
|
+
};
|
|
5837
|
+
VictoryContainer.role = "container";
|
|
5869
5838
|
|
|
5870
5839
|
/***/ }),
|
|
5871
5840
|
|
|
@@ -6327,10 +6296,7 @@ const defaultProps = {
|
|
|
6327
6296
|
lineHeight: 1
|
|
6328
6297
|
};
|
|
6329
6298
|
const VictoryLabel = initialProps => {
|
|
6330
|
-
const props = evaluateProps({
|
|
6331
|
-
...defaultProps,
|
|
6332
|
-
...initialProps
|
|
6333
|
-
});
|
|
6299
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
6334
6300
|
if (props.text === null || props.text === undefined) {
|
|
6335
6301
|
return null;
|
|
6336
6302
|
}
|
|
@@ -6381,17 +6347,83 @@ VictoryLabel.defaultStyles = defaultStyles;
|
|
|
6381
6347
|
"use strict";
|
|
6382
6348
|
__webpack_require__.r(__webpack_exports__);
|
|
6383
6349
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6384
|
-
/* harmony export */ "PortalContext": function() { return /* binding */ PortalContext; }
|
|
6350
|
+
/* harmony export */ "PortalContext": function() { return /* binding */ PortalContext; },
|
|
6351
|
+
/* harmony export */ "PortalProvider": function() { return /* binding */ PortalProvider; },
|
|
6352
|
+
/* harmony export */ "usePortalContext": function() { return /* binding */ usePortalContext; }
|
|
6385
6353
|
/* harmony export */ });
|
|
6386
6354
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6387
6355
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6388
6356
|
|
|
6389
|
-
|
|
6390
|
-
* The React context object consumers may use to access the context of the
|
|
6391
|
-
* portal.
|
|
6392
|
-
*/
|
|
6393
|
-
const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
6357
|
+
const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(undefined);
|
|
6394
6358
|
PortalContext.displayName = "PortalContext";
|
|
6359
|
+
const usePortalContext = () => {
|
|
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
|
+
return context;
|
|
6365
|
+
};
|
|
6366
|
+
const PortalProvider = _ref => {
|
|
6367
|
+
let {
|
|
6368
|
+
children
|
|
6369
|
+
} = _ref;
|
|
6370
|
+
const [portalChildren, setPortalChildren] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(new Map());
|
|
6371
|
+
const addChild = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((id, element) => {
|
|
6372
|
+
setPortalChildren(prevChildren => {
|
|
6373
|
+
const nextChildren = new Map(prevChildren);
|
|
6374
|
+
nextChildren.set(id, element);
|
|
6375
|
+
return nextChildren;
|
|
6376
|
+
});
|
|
6377
|
+
}, [setPortalChildren]);
|
|
6378
|
+
const removeChild = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(id => {
|
|
6379
|
+
setPortalChildren(prevChildren => {
|
|
6380
|
+
const nextChildren = new Map(prevChildren);
|
|
6381
|
+
nextChildren.delete(id);
|
|
6382
|
+
return nextChildren;
|
|
6383
|
+
});
|
|
6384
|
+
}, [setPortalChildren]);
|
|
6385
|
+
const contextValue = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => ({
|
|
6386
|
+
addChild,
|
|
6387
|
+
removeChild,
|
|
6388
|
+
children: portalChildren
|
|
6389
|
+
}), [addChild, removeChild, portalChildren]);
|
|
6390
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PortalContext.Provider, {
|
|
6391
|
+
value: contextValue
|
|
6392
|
+
}, children);
|
|
6393
|
+
};
|
|
6394
|
+
|
|
6395
|
+
/***/ }),
|
|
6396
|
+
|
|
6397
|
+
/***/ "../../victory-core/es/victory-portal/portal-outlet.js":
|
|
6398
|
+
/*!*************************************************************!*\
|
|
6399
|
+
!*** ../../victory-core/es/victory-portal/portal-outlet.js ***!
|
|
6400
|
+
\*************************************************************/
|
|
6401
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6402
|
+
|
|
6403
|
+
"use strict";
|
|
6404
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6405
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6406
|
+
/* harmony export */ "PortalOutlet": function() { return /* binding */ PortalOutlet; }
|
|
6407
|
+
/* harmony export */ });
|
|
6408
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6409
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6410
|
+
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
6411
|
+
|
|
6412
|
+
|
|
6413
|
+
const PortalOutlet = _ref => {
|
|
6414
|
+
let {
|
|
6415
|
+
as: portalComponent,
|
|
6416
|
+
...props
|
|
6417
|
+
} = _ref;
|
|
6418
|
+
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
|
+
});
|
|
6425
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(portalComponent, props, children);
|
|
6426
|
+
};
|
|
6395
6427
|
|
|
6396
6428
|
/***/ }),
|
|
6397
6429
|
|
|
@@ -6408,39 +6440,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6408
6440
|
/* harmony export */ });
|
|
6409
6441
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6410
6442
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6443
|
+
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); }
|
|
6411
6444
|
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
this.index = 1;
|
|
6418
|
-
}
|
|
6419
|
-
portalRegister = () => {
|
|
6420
|
-
return ++this.index;
|
|
6421
|
-
};
|
|
6422
|
-
portalUpdate = (key, element) => {
|
|
6423
|
-
this.map[key] = element;
|
|
6424
|
-
this.forceUpdate();
|
|
6425
|
-
};
|
|
6426
|
-
portalDeregister = key => {
|
|
6427
|
-
delete this.map[key];
|
|
6428
|
-
this.forceUpdate();
|
|
6429
|
-
};
|
|
6430
|
-
getChildren() {
|
|
6431
|
-
return Object.keys(this.map).map(key => {
|
|
6432
|
-
const el = this.map[key];
|
|
6433
|
-
return el ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(el, {
|
|
6434
|
-
key
|
|
6435
|
-
}) : el;
|
|
6436
|
-
});
|
|
6437
|
-
}
|
|
6438
|
-
|
|
6439
|
-
// Overridden in victory-core-native
|
|
6440
|
-
render() {
|
|
6441
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", this.props, this.getChildren());
|
|
6442
|
-
}
|
|
6443
|
-
}
|
|
6445
|
+
const Portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef((props, ref) => {
|
|
6446
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
6447
|
+
ref: ref
|
|
6448
|
+
}, props));
|
|
6449
|
+
});
|
|
6444
6450
|
|
|
6445
6451
|
/***/ }),
|
|
6446
6452
|
|
|
@@ -6467,59 +6473,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6467
6473
|
|
|
6468
6474
|
|
|
6469
6475
|
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6476
|
+
const defaultProps = {
|
|
6477
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
6478
|
+
};
|
|
6479
|
+
const VictoryPortal = initialProps => {
|
|
6480
|
+
const props = {
|
|
6481
|
+
...defaultProps,
|
|
6482
|
+
...initialProps
|
|
6475
6483
|
};
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
this.checkedContext = true;
|
|
6485
|
-
}
|
|
6486
|
-
this.forceUpdate();
|
|
6487
|
-
}
|
|
6488
|
-
componentDidUpdate() {
|
|
6489
|
-
if (!this.renderInPlace) {
|
|
6490
|
-
this.portalKey = this.portalKey || this.context.portalRegister();
|
|
6491
|
-
this.context.portalUpdate(this.portalKey, this.element);
|
|
6492
|
-
}
|
|
6493
|
-
}
|
|
6494
|
-
componentWillUnmount() {
|
|
6495
|
-
if (this.context && this.context.portalDeregister) {
|
|
6496
|
-
this.context.portalDeregister(this.portalKey);
|
|
6497
|
-
}
|
|
6498
|
-
}
|
|
6499
|
-
|
|
6500
|
-
// Overridden in victory-core-native
|
|
6501
|
-
renderPortal(child) {
|
|
6502
|
-
if (this.renderInPlace) {
|
|
6503
|
-
return child;
|
|
6504
|
-
}
|
|
6505
|
-
this.element = child;
|
|
6506
|
-
return null;
|
|
6507
|
-
}
|
|
6508
|
-
render() {
|
|
6509
|
-
const children = Array.isArray(this.props.children) ? this.props.children[0] : this.props.children;
|
|
6484
|
+
const id = react__WEBPACK_IMPORTED_MODULE_1___default().useId();
|
|
6485
|
+
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_2__.usePortalContext)();
|
|
6486
|
+
if (!portalContext) {
|
|
6487
|
+
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
6488
|
+
_victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
|
|
6489
|
+
}
|
|
6490
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
6491
|
+
const children = Array.isArray(props.children) ? props.children[0] : props.children;
|
|
6510
6492
|
const {
|
|
6511
6493
|
groupComponent
|
|
6512
|
-
} =
|
|
6494
|
+
} = props;
|
|
6513
6495
|
const childProps = children && children.props || {};
|
|
6514
6496
|
const standardProps = childProps.groupComponent ? {
|
|
6515
6497
|
groupComponent,
|
|
6516
6498
|
standalone: false
|
|
6517
6499
|
} : {};
|
|
6518
|
-
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(
|
|
6500
|
+
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]));
|
|
6519
6501
|
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
}
|
|
6502
|
+
portalContext.addChild(id, child);
|
|
6503
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6504
|
+
}, [props.children]);
|
|
6505
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
6506
|
+
return () => portalContext.removeChild(id);
|
|
6507
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6508
|
+
}, []);
|
|
6509
|
+
return null;
|
|
6510
|
+
};
|
|
6511
|
+
VictoryPortal.role = "portal";
|
|
6523
6512
|
|
|
6524
6513
|
/***/ }),
|
|
6525
6514
|
|
|
@@ -6534,10 +6523,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6534
6523
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6535
6524
|
/* harmony export */ "Border": function() { return /* binding */ Border; }
|
|
6536
6525
|
/* harmony export */ });
|
|
6537
|
-
/* harmony import */ var
|
|
6538
|
-
/* harmony import */ var
|
|
6539
|
-
/* harmony import */ var
|
|
6540
|
-
/* harmony import */ var
|
|
6526
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6527
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
6528
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
6529
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
6530
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6531
|
+
/* harmony import */ var _rect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
6532
|
+
|
|
6541
6533
|
|
|
6542
6534
|
|
|
6543
6535
|
|
|
@@ -6550,13 +6542,13 @@ const evaluateProps = props => {
|
|
|
6550
6542
|
* `style`
|
|
6551
6543
|
* `tabIndex`
|
|
6552
6544
|
*/
|
|
6553
|
-
const ariaLabel =
|
|
6554
|
-
const desc =
|
|
6555
|
-
const id =
|
|
6556
|
-
const style =
|
|
6545
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
6546
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
6547
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
6548
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
6557
6549
|
fill: "none"
|
|
6558
6550
|
}, props.style), props);
|
|
6559
|
-
const tabIndex =
|
|
6551
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
6560
6552
|
return Object.assign({}, props, {
|
|
6561
6553
|
ariaLabel,
|
|
6562
6554
|
desc,
|
|
@@ -6566,16 +6558,13 @@ const evaluateProps = props => {
|
|
|
6566
6558
|
});
|
|
6567
6559
|
};
|
|
6568
6560
|
const defaultProps = {
|
|
6569
|
-
rectComponent: /*#__PURE__*/
|
|
6561
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_rect__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
6570
6562
|
role: "presentation",
|
|
6571
6563
|
shapeRendering: "auto"
|
|
6572
6564
|
};
|
|
6573
6565
|
const Border = initialProps => {
|
|
6574
|
-
const props = evaluateProps({
|
|
6575
|
-
|
|
6576
|
-
...initialProps
|
|
6577
|
-
});
|
|
6578
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.rectComponent, {
|
|
6566
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
6567
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.rectComponent, {
|
|
6579
6568
|
...props.events,
|
|
6580
6569
|
"aria-label": props.ariaLabel,
|
|
6581
6570
|
style: props.style,
|
|
@@ -6606,10 +6595,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6606
6595
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6607
6596
|
/* harmony export */ "LineSegment": function() { return /* binding */ LineSegment; }
|
|
6608
6597
|
/* harmony export */ });
|
|
6609
|
-
/* harmony import */ var
|
|
6610
|
-
/* harmony import */ var
|
|
6611
|
-
/* harmony import */ var
|
|
6612
|
-
/* harmony import */ var
|
|
6598
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6599
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
6600
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
6601
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
6602
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6603
|
+
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "../../victory-core/es/victory-primitives/line.js");
|
|
6604
|
+
|
|
6613
6605
|
|
|
6614
6606
|
|
|
6615
6607
|
|
|
@@ -6622,13 +6614,13 @@ const evaluateProps = props => {
|
|
|
6622
6614
|
* `style`
|
|
6623
6615
|
* `tabIndex`
|
|
6624
6616
|
*/
|
|
6625
|
-
const ariaLabel =
|
|
6626
|
-
const desc =
|
|
6627
|
-
const id =
|
|
6628
|
-
const style =
|
|
6617
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
6618
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
6619
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
6620
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
6629
6621
|
stroke: "black"
|
|
6630
6622
|
}, props.style), props);
|
|
6631
|
-
const tabIndex =
|
|
6623
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
6632
6624
|
return Object.assign({}, props, {
|
|
6633
6625
|
ariaLabel,
|
|
6634
6626
|
desc,
|
|
@@ -6638,16 +6630,13 @@ const evaluateProps = props => {
|
|
|
6638
6630
|
});
|
|
6639
6631
|
};
|
|
6640
6632
|
const defaultProps = {
|
|
6641
|
-
lineComponent: /*#__PURE__*/
|
|
6633
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
6642
6634
|
role: "presentation",
|
|
6643
6635
|
shapeRendering: "auto"
|
|
6644
6636
|
};
|
|
6645
6637
|
const LineSegment = initialProps => {
|
|
6646
|
-
const props = evaluateProps({
|
|
6647
|
-
|
|
6648
|
-
...initialProps
|
|
6649
|
-
});
|
|
6650
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.lineComponent, {
|
|
6638
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
6639
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, {
|
|
6651
6640
|
...props.events,
|
|
6652
6641
|
"aria-label": props.ariaLabel,
|
|
6653
6642
|
style: props.style,
|
|
@@ -6840,10 +6829,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6840
6829
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6841
6830
|
/* harmony export */ "Whisker": function() { return /* binding */ Whisker; }
|
|
6842
6831
|
/* harmony export */ });
|
|
6843
|
-
/* harmony import */ var
|
|
6844
|
-
/* harmony import */ var
|
|
6845
|
-
/* harmony import */ var
|
|
6846
|
-
/* harmony import */ var
|
|
6832
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6833
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
6834
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
6835
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
6836
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6837
|
+
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "../../victory-core/es/victory-primitives/line.js");
|
|
6838
|
+
|
|
6847
6839
|
|
|
6848
6840
|
|
|
6849
6841
|
|
|
@@ -6856,11 +6848,11 @@ const evaluateProps = props => {
|
|
|
6856
6848
|
* `style`
|
|
6857
6849
|
* `tabIndex`
|
|
6858
6850
|
*/
|
|
6859
|
-
const ariaLabel =
|
|
6860
|
-
const desc =
|
|
6861
|
-
const id =
|
|
6862
|
-
const style =
|
|
6863
|
-
const tabIndex =
|
|
6851
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
6852
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
6853
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
6854
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(props.style, props);
|
|
6855
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
6864
6856
|
return Object.assign({}, props, {
|
|
6865
6857
|
ariaLabel,
|
|
6866
6858
|
desc,
|
|
@@ -6870,16 +6862,13 @@ const evaluateProps = props => {
|
|
|
6870
6862
|
});
|
|
6871
6863
|
};
|
|
6872
6864
|
const defaultProps = {
|
|
6873
|
-
groupComponent: /*#__PURE__*/
|
|
6874
|
-
lineComponent: /*#__PURE__*/
|
|
6865
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
|
|
6866
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
6875
6867
|
role: "presentation",
|
|
6876
6868
|
shapeRendering: "auto"
|
|
6877
6869
|
};
|
|
6878
6870
|
const Whisker = initialProps => {
|
|
6879
|
-
const props = evaluateProps({
|
|
6880
|
-
...defaultProps,
|
|
6881
|
-
...initialProps
|
|
6882
|
-
});
|
|
6871
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
6883
6872
|
const {
|
|
6884
6873
|
ariaLabel,
|
|
6885
6874
|
groupComponent,
|
|
@@ -6907,10 +6896,10 @@ const Whisker = initialProps => {
|
|
|
6907
6896
|
role,
|
|
6908
6897
|
shapeRendering
|
|
6909
6898
|
};
|
|
6910
|
-
return /*#__PURE__*/
|
|
6899
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(groupComponent, {}, [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(lineComponent, Object.assign({
|
|
6911
6900
|
key: "major-whisker",
|
|
6912
6901
|
"aria-label": ariaLabel
|
|
6913
|
-
}, baseProps, majorWhisker)), /*#__PURE__*/
|
|
6902
|
+
}, baseProps, majorWhisker)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(lineComponent, Object.assign({
|
|
6914
6903
|
key: "minor-whisker",
|
|
6915
6904
|
"aria-label": ariaLabel
|
|
6916
6905
|
}, baseProps, minorWhisker))]);
|
|
@@ -10211,6 +10200,44 @@ function warn(message) {
|
|
|
10211
10200
|
|
|
10212
10201
|
/***/ }),
|
|
10213
10202
|
|
|
10203
|
+
/***/ "../../victory-core/es/victory-util/merge-refs.js":
|
|
10204
|
+
/*!********************************************************!*\
|
|
10205
|
+
!*** ../../victory-core/es/victory-util/merge-refs.js ***!
|
|
10206
|
+
\********************************************************/
|
|
10207
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10208
|
+
|
|
10209
|
+
"use strict";
|
|
10210
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10211
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10212
|
+
/* harmony export */ "mergeRefs": function() { return /* binding */ mergeRefs; }
|
|
10213
|
+
/* harmony export */ });
|
|
10214
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10215
|
+
|
|
10216
|
+
/**
|
|
10217
|
+
* Used to merge multiple React refs into a single callback ref.
|
|
10218
|
+
*
|
|
10219
|
+
* @example
|
|
10220
|
+
* ```tsx
|
|
10221
|
+
* <div ref={mergeRefs([ref, forwardedRef])} />
|
|
10222
|
+
* ```
|
|
10223
|
+
*/
|
|
10224
|
+
function mergeRefs(refs) {
|
|
10225
|
+
return value => {
|
|
10226
|
+
refs.forEach(ref => {
|
|
10227
|
+
// If the ref is a function, it's a callback ref and we call it with the value.
|
|
10228
|
+
if (_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction(ref)) {
|
|
10229
|
+
ref(value);
|
|
10230
|
+
} else if (ref !== null && ref !== undefined) {
|
|
10231
|
+
// If the ref is an object (not null and not undefined), it's an object ref.
|
|
10232
|
+
// We assign the value to its 'current' property.
|
|
10233
|
+
ref.current = value;
|
|
10234
|
+
}
|
|
10235
|
+
});
|
|
10236
|
+
};
|
|
10237
|
+
}
|
|
10238
|
+
|
|
10239
|
+
/***/ }),
|
|
10240
|
+
|
|
10214
10241
|
/***/ "../../victory-core/es/victory-util/scale.js":
|
|
10215
10242
|
/*!***************************************************!*\
|
|
10216
10243
|
!*** ../../victory-core/es/victory-util/scale.js ***!
|