victory-cursor-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.
|
|
@@ -192,9 +192,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
192
192
|
var cursorContainerMixin = function (base) {
|
|
193
193
|
var _class, _temp;
|
|
194
194
|
|
|
195
|
-
return _temp = _class =
|
|
196
|
-
/*#__PURE__*/
|
|
197
|
-
function (_base) {
|
|
195
|
+
return _temp = _class = /*#__PURE__*/function (_base) {
|
|
198
196
|
_inherits(VictoryCursorContainer, _base);
|
|
199
197
|
|
|
200
198
|
function VictoryCursorContainer() {
|
|
@@ -5854,9 +5852,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
5854
5852
|
|
|
5855
5853
|
|
|
5856
5854
|
|
|
5857
|
-
var VictoryContainer =
|
|
5858
|
-
/*#__PURE__*/
|
|
5859
|
-
function (_React$Component) {
|
|
5855
|
+
var VictoryContainer = /*#__PURE__*/function (_React$Component) {
|
|
5860
5856
|
_inherits(VictoryContainer, _React$Component);
|
|
5861
5857
|
|
|
5862
5858
|
function VictoryContainer(props) {
|
|
@@ -6214,7 +6210,7 @@ var getSingleValue = function (prop) {
|
|
|
6214
6210
|
return Array.isArray(prop) ? prop[index] || prop[0] : prop;
|
|
6215
6211
|
};
|
|
6216
6212
|
|
|
6217
|
-
var
|
|
6213
|
+
var shouldUseMultilineBackgrounds = function (props) {
|
|
6218
6214
|
var backgroundStyle = props.backgroundStyle,
|
|
6219
6215
|
backgroundPadding = props.backgroundPadding;
|
|
6220
6216
|
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(backgroundPadding);
|
|
@@ -6506,7 +6502,7 @@ var getChildBackgrounds = function (calculatedProps, tspanValues) {
|
|
|
6506
6502
|
};
|
|
6507
6503
|
|
|
6508
6504
|
var getBackgroundElement = function (calculatedProps, tspanValues) {
|
|
6509
|
-
return
|
|
6505
|
+
return shouldUseMultilineBackgrounds(calculatedProps) ? getChildBackgrounds(calculatedProps, tspanValues) : getFullBackground(calculatedProps, tspanValues);
|
|
6510
6506
|
};
|
|
6511
6507
|
|
|
6512
6508
|
var calculateSpanDy = function (tspanValues, i, calculatedProps) {
|
|
@@ -6517,7 +6513,7 @@ var calculateSpanDy = function (tspanValues, i, calculatedProps) {
|
|
|
6517
6513
|
var previousCaps = previous.fontSize - previous.capHeight;
|
|
6518
6514
|
var currentCaps = current.fontSize - current.capHeight;
|
|
6519
6515
|
var textHeight = previousHeight - previous.fontSize / 2 + current.fontSize / 2 - previousHeight / 2 + currentHeight / 2 - currentCaps / 2 + previousCaps / 2;
|
|
6520
|
-
return
|
|
6516
|
+
return shouldUseMultilineBackgrounds(calculatedProps) ? textHeight + current.backgroundPadding.top + previous.backgroundPadding.bottom : textHeight;
|
|
6521
6517
|
};
|
|
6522
6518
|
|
|
6523
6519
|
var getTSpanDy = function (tspanValues, calculatedProps, i) {
|
|
@@ -6802,9 +6798,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
6802
6798
|
|
|
6803
6799
|
|
|
6804
6800
|
|
|
6805
|
-
var Portal =
|
|
6806
|
-
/*#__PURE__*/
|
|
6807
|
-
function (_React$Component) {
|
|
6801
|
+
var Portal = /*#__PURE__*/function (_React$Component) {
|
|
6808
6802
|
_inherits(Portal, _React$Component);
|
|
6809
6803
|
|
|
6810
6804
|
function Portal(props) {
|
|
@@ -6923,9 +6917,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
6923
6917
|
|
|
6924
6918
|
|
|
6925
6919
|
|
|
6926
|
-
var VictoryPortal =
|
|
6927
|
-
/*#__PURE__*/
|
|
6928
|
-
function (_React$Component) {
|
|
6920
|
+
var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
6929
6921
|
_inherits(VictoryPortal, _React$Component);
|
|
6930
6922
|
|
|
6931
6923
|
function VictoryPortal() {
|
|
@@ -8986,9 +8978,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
8986
8978
|
|
|
8987
8979
|
|
|
8988
8980
|
|
|
8989
|
-
var Timer =
|
|
8990
|
-
/*#__PURE__*/
|
|
8991
|
-
function () {
|
|
8981
|
+
var Timer = /*#__PURE__*/function () {
|
|
8992
8982
|
function Timer() {
|
|
8993
8983
|
_classCallCheck(this, Timer);
|
|
8994
8984
|
|
|
@@ -33,9 +33,7 @@ import CursorHelpers from "./cursor-helpers";
|
|
|
33
33
|
export var cursorContainerMixin = function (base) {
|
|
34
34
|
var _class, _temp;
|
|
35
35
|
|
|
36
|
-
return _temp = _class =
|
|
37
|
-
/*#__PURE__*/
|
|
38
|
-
function (_base) {
|
|
36
|
+
return _temp = _class = /*#__PURE__*/function (_base) {
|
|
39
37
|
_inherits(VictoryCursorContainer, _base);
|
|
40
38
|
|
|
41
39
|
function VictoryCursorContainer() {
|
|
@@ -48,9 +48,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
48
48
|
var cursorContainerMixin = function (base) {
|
|
49
49
|
var _class, _temp;
|
|
50
50
|
|
|
51
|
-
return _temp = _class =
|
|
52
|
-
/*#__PURE__*/
|
|
53
|
-
function (_base) {
|
|
51
|
+
return _temp = _class = /*#__PURE__*/function (_base) {
|
|
54
52
|
_inherits(VictoryCursorContainer, _base);
|
|
55
53
|
|
|
56
54
|
function VictoryCursorContainer() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-cursor-container",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.1.0",
|
|
4
4
|
"description": "Interactive Cursor Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.19",
|
|
23
23
|
"prop-types": "^15.5.8",
|
|
24
|
-
"victory-core": "^
|
|
24
|
+
"victory-core": "^36.1.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^16.6.0 || ^17.0.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"version": "nps build-libs && nps build-dists"
|
|
30
|
+
"version": "yarn run nps build-libs && nps build-dists"
|
|
31
31
|
},
|
|
32
|
-
"sideEffects": false
|
|
32
|
+
"sideEffects": false,
|
|
33
|
+
"gitHead": "038cd9b70d9ce54ac6b861014165583760734c99"
|
|
33
34
|
}
|