victory-box-plot 36.2.1 → 36.3.2
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/LICENSE.txt +30 -0
- package/dist/victory-box-plot.js +156 -50
- package/dist/victory-box-plot.min.js +1 -1
- package/es/victory-box-plot.js +3 -2
- package/lib/victory-box-plot.js +4 -1
- package/package.json +4 -3
- package/src/victory-box-plot.js +7 -2
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-2020 Formidable Labs.
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2016-2020 Alexey Svetliakov <https://github.com/asvetliakov>,
|
|
6
|
+
snerks <https://github.com/snerks>, Krzysztof Cebula <https://github.com
|
|
7
|
+
Havret>, Vitaliy Polyanskiy <https://github.com/alreadyExisted>, James Lismore
|
|
8
|
+
<https://github.com/jlismore>, Stack Builders <https://github.com
|
|
9
|
+
stackbuilders>, Esteban Ibarra <https://github.com/ibarrae>, Dominic Lee
|
|
10
|
+
<https://github.com/dominictwlee>, Dave Vedder <https://github.com
|
|
11
|
+
veddermatic>, Alec Flett <https://github.com/alecf> and potentially other
|
|
12
|
+
DefinitelyTyped contributors.
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
The above copyright notice and this permission notice shall be included in all
|
|
30
|
+
copies or substantial portions of the Software.
|
package/dist/victory-box-plot.js
CHANGED
|
@@ -604,17 +604,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
604
604
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
605
605
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
606
606
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
607
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/
|
|
608
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/
|
|
609
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/
|
|
610
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
611
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
612
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/
|
|
613
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
614
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
615
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
616
|
-
/* harmony import */ var
|
|
617
|
-
/* harmony import */ var
|
|
607
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
608
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/default-transitions.js");
|
|
609
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
|
|
610
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/prop-types.js");
|
|
611
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
612
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/border.js");
|
|
613
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/whisker.js");
|
|
614
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
|
|
615
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line-segment.js");
|
|
616
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
|
|
617
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
|
|
618
|
+
/* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.js");
|
|
618
619
|
|
|
619
620
|
|
|
620
621
|
|
|
@@ -777,7 +778,8 @@ function (_React$Component) {
|
|
|
777
778
|
}
|
|
778
779
|
|
|
779
780
|
var children = this.renderBoxPlot(props);
|
|
780
|
-
|
|
781
|
+
var container = react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(props.containerComponent, victory_core__WEBPACK_IMPORTED_MODULE_5__.getSafeUserProps(props));
|
|
782
|
+
return props.standalone ? this.renderContainer(container, children) : children;
|
|
781
783
|
}
|
|
782
784
|
}]);
|
|
783
785
|
|
|
@@ -806,17 +808,17 @@ Object.defineProperty(VictoryBoxPlot, "defaultTransitions", {
|
|
|
806
808
|
configurable: true,
|
|
807
809
|
enumerable: true,
|
|
808
810
|
writable: true,
|
|
809
|
-
value:
|
|
811
|
+
value: victory_core__WEBPACK_IMPORTED_MODULE_6__.discreteTransitions()
|
|
810
812
|
});
|
|
811
813
|
Object.defineProperty(VictoryBoxPlot, "propTypes", {
|
|
812
814
|
configurable: true,
|
|
813
815
|
enumerable: true,
|
|
814
816
|
writable: true,
|
|
815
|
-
value: _objectSpread({},
|
|
817
|
+
value: _objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_7__.baseProps, victory_core__WEBPACK_IMPORTED_MODULE_7__.dataProps, {
|
|
816
818
|
boxWidth: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number),
|
|
817
819
|
events: prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape({
|
|
818
820
|
target: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(["max", "maxLabels", "median", "medianLabels", "min", "minLabels", "q1", "q1Labels", "q3", "q3Labels", "parent"]),
|
|
819
|
-
eventKey: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().array),
|
|
821
|
+
eventKey: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().array), victory_core__WEBPACK_IMPORTED_MODULE_8__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_8__.integer, victory_core__WEBPACK_IMPORTED_MODULE_8__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string)]),
|
|
820
822
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object)
|
|
821
823
|
})),
|
|
822
824
|
horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),
|
|
@@ -828,23 +830,23 @@ Object.defineProperty(VictoryBoxPlot, "propTypes", {
|
|
|
828
830
|
median: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(["top", "bottom", "left", "right"])
|
|
829
831
|
})]),
|
|
830
832
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),
|
|
831
|
-
max: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func),
|
|
833
|
+
max: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), victory_core__WEBPACK_IMPORTED_MODULE_8__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_8__.integer, victory_core__WEBPACK_IMPORTED_MODULE_8__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_3___default().string))]),
|
|
832
834
|
maxComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
833
835
|
maxLabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
834
836
|
maxLabels: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)]),
|
|
835
|
-
median: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func),
|
|
837
|
+
median: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), victory_core__WEBPACK_IMPORTED_MODULE_8__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_8__.integer, victory_core__WEBPACK_IMPORTED_MODULE_8__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_3___default().string))]),
|
|
836
838
|
medianComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
837
839
|
medianLabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
838
840
|
medianLabels: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)]),
|
|
839
|
-
min: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func),
|
|
841
|
+
min: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), victory_core__WEBPACK_IMPORTED_MODULE_8__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_8__.integer, victory_core__WEBPACK_IMPORTED_MODULE_8__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_3___default().string))]),
|
|
840
842
|
minComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
841
843
|
minLabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
842
844
|
minLabels: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)]),
|
|
843
|
-
q1: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func),
|
|
845
|
+
q1: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), victory_core__WEBPACK_IMPORTED_MODULE_8__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_8__.integer, victory_core__WEBPACK_IMPORTED_MODULE_8__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_3___default().string))]),
|
|
844
846
|
q1Component: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
845
847
|
q1LabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
846
848
|
q1Labels: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)]),
|
|
847
|
-
q3: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func),
|
|
849
|
+
q3: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), victory_core__WEBPACK_IMPORTED_MODULE_8__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_8__.integer, victory_core__WEBPACK_IMPORTED_MODULE_8__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_3___default().string))]),
|
|
848
850
|
q3Component: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
849
851
|
q3LabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
|
|
850
852
|
q3Labels: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)]),
|
|
@@ -872,47 +874,47 @@ Object.defineProperty(VictoryBoxPlot, "defaultProps", {
|
|
|
872
874
|
enumerable: true,
|
|
873
875
|
writable: true,
|
|
874
876
|
value: {
|
|
875
|
-
containerComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
877
|
+
containerComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_9__["default"], null),
|
|
876
878
|
data: defaultData,
|
|
877
|
-
dataComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
879
|
+
dataComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_10__["default"], null),
|
|
878
880
|
groupComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", {
|
|
879
881
|
role: "presentation"
|
|
880
882
|
}),
|
|
881
|
-
maxComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
882
|
-
maxLabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
883
|
-
medianComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
884
|
-
medianLabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
885
|
-
minComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
886
|
-
minLabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
887
|
-
q1Component: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
888
|
-
q1LabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
889
|
-
q3Component: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
890
|
-
q3LabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
|
|
883
|
+
maxComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_11__["default"], null),
|
|
884
|
+
maxLabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_12__["default"], null),
|
|
885
|
+
medianComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_13__["default"], null),
|
|
886
|
+
medianLabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_12__["default"], null),
|
|
887
|
+
minComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_11__["default"], null),
|
|
888
|
+
minLabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_12__["default"], null),
|
|
889
|
+
q1Component: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_10__["default"], null),
|
|
890
|
+
q1LabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_12__["default"], null),
|
|
891
|
+
q3Component: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_10__["default"], null),
|
|
892
|
+
q3LabelComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_12__["default"], null),
|
|
891
893
|
samples: 50,
|
|
892
894
|
sortKey: "x",
|
|
893
895
|
sortOrder: "ascending",
|
|
894
896
|
standalone: true,
|
|
895
|
-
theme:
|
|
897
|
+
theme: victory_core__WEBPACK_IMPORTED_MODULE_14__["default"].grayscale
|
|
896
898
|
}
|
|
897
899
|
});
|
|
898
900
|
Object.defineProperty(VictoryBoxPlot, "getDomain", {
|
|
899
901
|
configurable: true,
|
|
900
902
|
enumerable: true,
|
|
901
903
|
writable: true,
|
|
902
|
-
value:
|
|
904
|
+
value: _helper_methods__WEBPACK_IMPORTED_MODULE_15__.getDomain
|
|
903
905
|
});
|
|
904
906
|
Object.defineProperty(VictoryBoxPlot, "getData", {
|
|
905
907
|
configurable: true,
|
|
906
908
|
enumerable: true,
|
|
907
909
|
writable: true,
|
|
908
|
-
value:
|
|
910
|
+
value: _helper_methods__WEBPACK_IMPORTED_MODULE_15__.getData
|
|
909
911
|
});
|
|
910
912
|
Object.defineProperty(VictoryBoxPlot, "getBaseProps", {
|
|
911
913
|
configurable: true,
|
|
912
914
|
enumerable: true,
|
|
913
915
|
writable: true,
|
|
914
916
|
value: function (props) {
|
|
915
|
-
return (0,
|
|
917
|
+
return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_15__.getBaseProps)(props, fallbackProps);
|
|
916
918
|
}
|
|
917
919
|
});
|
|
918
920
|
Object.defineProperty(VictoryBoxPlot, "expectedComponents", {
|
|
@@ -921,7 +923,7 @@ Object.defineProperty(VictoryBoxPlot, "expectedComponents", {
|
|
|
921
923
|
writable: true,
|
|
922
924
|
value: ["maxComponent", "maxLabelComponent", "medianComponent", "medianLabelComponent", "minComponent", "minLabelComponent", "q1Component", "q1LabelComponent", "q3Component", "q3LabelComponent", "groupComponent", "containerComponent"]
|
|
923
925
|
});
|
|
924
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,
|
|
926
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_16__["default"])(VictoryBoxPlot, options));
|
|
925
927
|
|
|
926
928
|
/***/ }),
|
|
927
929
|
|
|
@@ -14739,11 +14741,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14739
14741
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
|
|
14740
14742
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
14741
14743
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
|
|
14742
|
-
/* harmony import */ var
|
|
14743
|
-
/* harmony import */ var
|
|
14744
|
+
/* harmony import */ var _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../victory-util/prop-types */ "../../victory-core/es/victory-util/prop-types.js");
|
|
14745
|
+
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
14744
14746
|
/* 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");
|
|
14745
|
-
/* harmony import */ var
|
|
14747
|
+
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../victory-util/timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
14746
14748
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
14749
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
14747
14750
|
|
|
14748
14751
|
|
|
14749
14752
|
|
|
@@ -14776,6 +14779,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
14776
14779
|
|
|
14777
14780
|
|
|
14778
14781
|
|
|
14782
|
+
|
|
14779
14783
|
var VictoryContainer =
|
|
14780
14784
|
/*#__PURE__*/
|
|
14781
14785
|
function (_React$Component) {
|
|
@@ -14946,8 +14950,9 @@ function (_React$Component) {
|
|
|
14946
14950
|
preserveAspectRatio = _props.preserveAspectRatio,
|
|
14947
14951
|
role = _props.role;
|
|
14948
14952
|
var style = responsive ? this.props.style : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_8__.omit(this.props.style, ["height", "width"]);
|
|
14953
|
+
var userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_9__.getSafeUserProps(this.props);
|
|
14949
14954
|
|
|
14950
|
-
var svgProps = lodash_assign__WEBPACK_IMPORTED_MODULE_4___default()({
|
|
14955
|
+
var svgProps = lodash_assign__WEBPACK_IMPORTED_MODULE_4___default()(_objectSpread({
|
|
14951
14956
|
width: width,
|
|
14952
14957
|
height: height,
|
|
14953
14958
|
tabIndex: tabIndex,
|
|
@@ -14956,7 +14961,7 @@ function (_React$Component) {
|
|
|
14956
14961
|
"aria-describedby": [desc && this.getIdForElement("desc"), this.props["aria-describedby"]].filter(Boolean).join(" ") || undefined,
|
|
14957
14962
|
viewBox: responsive ? "0 0 ".concat(width, " ").concat(height) : undefined,
|
|
14958
14963
|
preserveAspectRatio: responsive ? preserveAspectRatio : undefined
|
|
14959
|
-
}, events);
|
|
14964
|
+
}, userProps), events);
|
|
14960
14965
|
|
|
14961
14966
|
return this.renderContainer(this.props, svgProps, style);
|
|
14962
14967
|
}
|
|
@@ -14990,18 +14995,18 @@ Object.defineProperty(VictoryContainer, "propTypes", {
|
|
|
14990
14995
|
containerRef: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),
|
|
14991
14996
|
desc: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
|
|
14992
14997
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),
|
|
14993
|
-
height:
|
|
14998
|
+
height: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_10__.nonNegative,
|
|
14994
14999
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
|
|
14995
15000
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
|
|
14996
|
-
x:
|
|
14997
|
-
y:
|
|
15001
|
+
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_10__.nonNegative,
|
|
15002
|
+
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_10__.nonNegative
|
|
14998
15003
|
}),
|
|
14999
15004
|
ouiaId: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string)]),
|
|
15000
15005
|
ouiaSafe: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),
|
|
15001
15006
|
ouiaType: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
|
|
15002
15007
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),
|
|
15003
15008
|
portalComponent: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().element),
|
|
15004
|
-
portalZIndex:
|
|
15009
|
+
portalZIndex: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_10__.integer,
|
|
15005
15010
|
preserveAspectRatio: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
|
|
15006
15011
|
responsive: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),
|
|
15007
15012
|
role: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
|
|
@@ -15009,7 +15014,7 @@ Object.defineProperty(VictoryContainer, "propTypes", {
|
|
|
15009
15014
|
tabIndex: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number),
|
|
15010
15015
|
theme: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),
|
|
15011
15016
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
|
|
15012
|
-
width:
|
|
15017
|
+
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_10__.nonNegative
|
|
15013
15018
|
}
|
|
15014
15019
|
});
|
|
15015
15020
|
Object.defineProperty(VictoryContainer, "defaultProps", {
|
|
@@ -15018,7 +15023,7 @@ Object.defineProperty(VictoryContainer, "defaultProps", {
|
|
|
15018
15023
|
writable: true,
|
|
15019
15024
|
value: {
|
|
15020
15025
|
className: "VictoryContainer",
|
|
15021
|
-
portalComponent: react__WEBPACK_IMPORTED_MODULE_5___default().createElement(
|
|
15026
|
+
portalComponent: react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_11__["default"], null),
|
|
15022
15027
|
portalZIndex: 99,
|
|
15023
15028
|
responsive: true,
|
|
15024
15029
|
role: "img"
|
|
@@ -15028,7 +15033,7 @@ Object.defineProperty(VictoryContainer, "contextType", {
|
|
|
15028
15033
|
configurable: true,
|
|
15029
15034
|
enumerable: true,
|
|
15030
15035
|
writable: true,
|
|
15031
|
-
value:
|
|
15036
|
+
value: _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"]
|
|
15032
15037
|
});
|
|
15033
15038
|
|
|
15034
15039
|
|
|
@@ -17302,6 +17307,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17302
17307
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/react-fast-compare/index.js");
|
|
17303
17308
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_10__);
|
|
17304
17309
|
/* harmony import */ var _victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../victory-transition/victory-transition */ "../../victory-core/es/victory-transition/victory-transition.js");
|
|
17310
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
17305
17311
|
|
|
17306
17312
|
|
|
17307
17313
|
|
|
@@ -17338,6 +17344,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
17338
17344
|
|
|
17339
17345
|
|
|
17340
17346
|
|
|
17347
|
+
|
|
17341
17348
|
var datumHasXandY = function (datum) {
|
|
17342
17349
|
return !lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(datum._x) && !lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(datum._y);
|
|
17343
17350
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
@@ -17683,6 +17690,7 @@ var defaultComponents = [{
|
|
|
17683
17690
|
var dataComponent = props.dataComponent,
|
|
17684
17691
|
labelComponent = props.labelComponent,
|
|
17685
17692
|
groupComponent = props.groupComponent;
|
|
17693
|
+
var userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_13__.getSafeUserProps(props);
|
|
17686
17694
|
var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
|
|
17687
17695
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
17688
17696
|
|
|
@@ -17704,7 +17712,8 @@ var defaultComponents = [{
|
|
|
17704
17712
|
|
|
17705
17713
|
var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
|
|
17706
17714
|
|
|
17707
|
-
|
|
17715
|
+
var group = react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(groupComponent, userProps, children);
|
|
17716
|
+
return this.renderContainer(group, children);
|
|
17708
17717
|
}
|
|
17709
17718
|
}]);
|
|
17710
17719
|
|
|
@@ -21627,6 +21636,103 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
21627
21636
|
|
|
21628
21637
|
/***/ }),
|
|
21629
21638
|
|
|
21639
|
+
/***/ "../../victory-core/es/victory-util/user-props.js":
|
|
21640
|
+
/*!********************************************************!*\
|
|
21641
|
+
!*** ../../victory-core/es/victory-util/user-props.js ***!
|
|
21642
|
+
\********************************************************/
|
|
21643
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21644
|
+
|
|
21645
|
+
"use strict";
|
|
21646
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21647
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21648
|
+
/* harmony export */ "getSafeUserProps": () => (/* binding */ getSafeUserProps)
|
|
21649
|
+
/* harmony export */ });
|
|
21650
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
21651
|
+
|
|
21652
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
21653
|
+
|
|
21654
|
+
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
21655
|
+
|
|
21656
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21657
|
+
|
|
21658
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
21659
|
+
|
|
21660
|
+
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; }
|
|
21661
|
+
|
|
21662
|
+
/*
|
|
21663
|
+
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
21664
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
21665
|
+
starts with these characters.
|
|
21666
|
+
The exactMatch will contain a list of exact prop names that are accepted.
|
|
21667
|
+
*/
|
|
21668
|
+
var USER_PROPS_SAFELIST = {
|
|
21669
|
+
startsWith: ["data-", "aria-"],
|
|
21670
|
+
exactMatch: []
|
|
21671
|
+
};
|
|
21672
|
+
/**
|
|
21673
|
+
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
21674
|
+
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
21675
|
+
* of those options.
|
|
21676
|
+
* @param {string} key: prop key to be tested against whitelist
|
|
21677
|
+
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
21678
|
+
* otherwise
|
|
21679
|
+
*/
|
|
21680
|
+
|
|
21681
|
+
var doesPropStartWith = function (key) {
|
|
21682
|
+
var startsWith = false;
|
|
21683
|
+
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
21684
|
+
var regex = new RegExp("\\b(".concat(starterString, ")(\\w|-)+"), "g");
|
|
21685
|
+
if (regex.test(key)) startsWith = true;
|
|
21686
|
+
});
|
|
21687
|
+
return startsWith;
|
|
21688
|
+
};
|
|
21689
|
+
/**
|
|
21690
|
+
* isExactMatch: checks to see if the given key matches any of the 'exactMatch'
|
|
21691
|
+
* items in the whitelist
|
|
21692
|
+
* @param {String} key: prop key to be tested against the whitelist-exact match
|
|
21693
|
+
* array.
|
|
21694
|
+
* @returns {Boolean}: return true if whitelist contains that key, otherwise
|
|
21695
|
+
* returns false.
|
|
21696
|
+
*/
|
|
21697
|
+
|
|
21698
|
+
|
|
21699
|
+
var isExactMatch = function (key) {
|
|
21700
|
+
return USER_PROPS_SAFELIST.exactMatch.includes(key);
|
|
21701
|
+
};
|
|
21702
|
+
/**
|
|
21703
|
+
* testIfSafeProp: tests prop's key against both startsWith and exactMatch values
|
|
21704
|
+
* @param {String} key: prop key to be tested against the whitelist
|
|
21705
|
+
* @returns {Boolean}: returns true if found in whitelist, otherwise returns false
|
|
21706
|
+
*/
|
|
21707
|
+
|
|
21708
|
+
|
|
21709
|
+
var testIfSafeProp = function (key) {
|
|
21710
|
+
if (doesPropStartWith(key) || isExactMatch(key)) return true;
|
|
21711
|
+
return false;
|
|
21712
|
+
};
|
|
21713
|
+
/**
|
|
21714
|
+
* getSafeUserProps - function that takes in a props object and removes any
|
|
21715
|
+
* key-value entries that do not match filter strings in the USER_PROPS_SAFELIST
|
|
21716
|
+
* object.
|
|
21717
|
+
*
|
|
21718
|
+
* @param {Object} props: props to be filtered against USER_PROPS_SAFELIST
|
|
21719
|
+
* @returns {Object}: object containing remaining acceptable props
|
|
21720
|
+
*/
|
|
21721
|
+
|
|
21722
|
+
|
|
21723
|
+
var getSafeUserProps = function (props) {
|
|
21724
|
+
var propsToFilter = _objectSpread({}, props);
|
|
21725
|
+
|
|
21726
|
+
return Object.fromEntries(Object.entries(propsToFilter).filter(function (_ref) {
|
|
21727
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
21728
|
+
key = _ref2[0];
|
|
21729
|
+
|
|
21730
|
+
return testIfSafeProp(key);
|
|
21731
|
+
}));
|
|
21732
|
+
};
|
|
21733
|
+
|
|
21734
|
+
/***/ }),
|
|
21735
|
+
|
|
21630
21736
|
/***/ "react":
|
|
21631
21737
|
/*!**************************************************************************************!*\
|
|
21632
21738
|
!*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
|