victory-voronoi-container 35.11.2 → 36.1.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/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.
|
|
@@ -76,9 +76,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
76
76
|
var voronoiContainerMixin = function (base) {
|
|
77
77
|
var _class, _temp;
|
|
78
78
|
|
|
79
|
-
return _temp = _class =
|
|
80
|
-
/*#__PURE__*/
|
|
81
|
-
function (_base) {
|
|
79
|
+
return _temp = _class = /*#__PURE__*/function (_base) {
|
|
82
80
|
_inherits(VictoryVoronoiContainer, _base);
|
|
83
81
|
|
|
84
82
|
function VictoryVoronoiContainer() {
|
|
@@ -13878,9 +13876,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
13878
13876
|
|
|
13879
13877
|
|
|
13880
13878
|
|
|
13881
|
-
var VictoryContainer =
|
|
13882
|
-
/*#__PURE__*/
|
|
13883
|
-
function (_React$Component) {
|
|
13879
|
+
var VictoryContainer = /*#__PURE__*/function (_React$Component) {
|
|
13884
13880
|
_inherits(VictoryContainer, _React$Component);
|
|
13885
13881
|
|
|
13886
13882
|
function VictoryContainer(props) {
|
|
@@ -14238,7 +14234,7 @@ var getSingleValue = function (prop) {
|
|
|
14238
14234
|
return Array.isArray(prop) ? prop[index] || prop[0] : prop;
|
|
14239
14235
|
};
|
|
14240
14236
|
|
|
14241
|
-
var
|
|
14237
|
+
var shouldUseMultilineBackgrounds = function (props) {
|
|
14242
14238
|
var backgroundStyle = props.backgroundStyle,
|
|
14243
14239
|
backgroundPadding = props.backgroundPadding;
|
|
14244
14240
|
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(backgroundPadding);
|
|
@@ -14530,7 +14526,7 @@ var getChildBackgrounds = function (calculatedProps, tspanValues) {
|
|
|
14530
14526
|
};
|
|
14531
14527
|
|
|
14532
14528
|
var getBackgroundElement = function (calculatedProps, tspanValues) {
|
|
14533
|
-
return
|
|
14529
|
+
return shouldUseMultilineBackgrounds(calculatedProps) ? getChildBackgrounds(calculatedProps, tspanValues) : getFullBackground(calculatedProps, tspanValues);
|
|
14534
14530
|
};
|
|
14535
14531
|
|
|
14536
14532
|
var calculateSpanDy = function (tspanValues, i, calculatedProps) {
|
|
@@ -14541,7 +14537,7 @@ var calculateSpanDy = function (tspanValues, i, calculatedProps) {
|
|
|
14541
14537
|
var previousCaps = previous.fontSize - previous.capHeight;
|
|
14542
14538
|
var currentCaps = current.fontSize - current.capHeight;
|
|
14543
14539
|
var textHeight = previousHeight - previous.fontSize / 2 + current.fontSize / 2 - previousHeight / 2 + currentHeight / 2 - currentCaps / 2 + previousCaps / 2;
|
|
14544
|
-
return
|
|
14540
|
+
return shouldUseMultilineBackgrounds(calculatedProps) ? textHeight + current.backgroundPadding.top + previous.backgroundPadding.bottom : textHeight;
|
|
14545
14541
|
};
|
|
14546
14542
|
|
|
14547
14543
|
var getTSpanDy = function (tspanValues, calculatedProps, i) {
|
|
@@ -14826,9 +14822,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
14826
14822
|
|
|
14827
14823
|
|
|
14828
14824
|
|
|
14829
|
-
var Portal =
|
|
14830
|
-
/*#__PURE__*/
|
|
14831
|
-
function (_React$Component) {
|
|
14825
|
+
var Portal = /*#__PURE__*/function (_React$Component) {
|
|
14832
14826
|
_inherits(Portal, _React$Component);
|
|
14833
14827
|
|
|
14834
14828
|
function Portal(props) {
|
|
@@ -14947,9 +14941,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
14947
14941
|
|
|
14948
14942
|
|
|
14949
14943
|
|
|
14950
|
-
var VictoryPortal =
|
|
14951
|
-
/*#__PURE__*/
|
|
14952
|
-
function (_React$Component) {
|
|
14944
|
+
var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
14953
14945
|
_inherits(VictoryPortal, _React$Component);
|
|
14954
14946
|
|
|
14955
14947
|
function VictoryPortal() {
|
|
@@ -18237,9 +18229,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
18237
18229
|
|
|
18238
18230
|
|
|
18239
18231
|
|
|
18240
|
-
var Timer =
|
|
18241
|
-
/*#__PURE__*/
|
|
18242
|
-
function () {
|
|
18232
|
+
var Timer = /*#__PURE__*/function () {
|
|
18243
18233
|
function Timer() {
|
|
18244
18234
|
_classCallCheck(this, Timer);
|
|
18245
18235
|
|
|
@@ -18522,9 +18512,7 @@ var fallbackProps = {
|
|
|
18522
18512
|
pointerWidth: 10
|
|
18523
18513
|
};
|
|
18524
18514
|
|
|
18525
|
-
var VictoryTooltip =
|
|
18526
|
-
/*#__PURE__*/
|
|
18527
|
-
function (_React$Component) {
|
|
18515
|
+
var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
|
|
18528
18516
|
_inherits(VictoryTooltip, _React$Component);
|
|
18529
18517
|
|
|
18530
18518
|
function VictoryTooltip(props) {
|
|
@@ -36,9 +36,7 @@ import VoronoiHelpers from "./voronoi-helpers";
|
|
|
36
36
|
export var voronoiContainerMixin = function (base) {
|
|
37
37
|
var _class, _temp;
|
|
38
38
|
|
|
39
|
-
return _temp = _class =
|
|
40
|
-
/*#__PURE__*/
|
|
41
|
-
function (_base) {
|
|
39
|
+
return _temp = _class = /*#__PURE__*/function (_base) {
|
|
42
40
|
_inherits(VictoryVoronoiContainer, _base);
|
|
43
41
|
|
|
44
42
|
function VictoryVoronoiContainer() {
|
|
@@ -52,9 +52,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
52
52
|
var voronoiContainerMixin = function (base) {
|
|
53
53
|
var _class, _temp;
|
|
54
54
|
|
|
55
|
-
return _temp = _class =
|
|
56
|
-
/*#__PURE__*/
|
|
57
|
-
function (_base) {
|
|
55
|
+
return _temp = _class = /*#__PURE__*/function (_base) {
|
|
58
56
|
_inherits(VictoryVoronoiContainer, _base);
|
|
59
57
|
|
|
60
58
|
function VictoryVoronoiContainer() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-voronoi-container",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.1.0",
|
|
4
4
|
"description": "Interactive Voronoi Mouseover Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"prop-types": "^15.5.8",
|
|
25
25
|
"react-fast-compare": "^2.0.0",
|
|
26
|
-
"victory-core": "^
|
|
27
|
-
"victory-tooltip": "^
|
|
26
|
+
"victory-core": "^36.1.0",
|
|
27
|
+
"victory-tooltip": "^36.1.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^16.6.0 || ^17.0.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"version": "nps build-libs && nps build-dists"
|
|
33
|
+
"version": "yarn run nps build-libs && nps build-dists"
|
|
34
34
|
},
|
|
35
|
-
"sideEffects": false
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"gitHead": "038cd9b70d9ce54ac6b861014165583760734c99"
|
|
36
37
|
}
|