victory-tooltip 36.3.2 → 36.5.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/dist/victory-tooltip.js +694 -509
- package/dist/victory-tooltip.min.js +1 -1
- package/es/flyout.js +8 -5
- package/es/victory-tooltip.js +165 -176
- package/lib/flyout.js +9 -4
- package/lib/index.js +4 -4
- package/lib/victory-tooltip.js +164 -176
- package/package.json +5 -5
- package/src/flyout.js +3 -1
package/lib/victory-tooltip.js
CHANGED
|
@@ -25,25 +25,37 @@ var _flyout = _interopRequireDefault(require("./flyout"));
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
28
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
29
29
|
|
|
30
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
30
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
35
|
+
|
|
36
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
37
|
+
|
|
38
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
39
|
|
|
36
40
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
37
41
|
|
|
38
42
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
39
43
|
|
|
40
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
44
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
45
|
+
|
|
46
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
47
|
+
|
|
48
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
49
|
|
|
42
|
-
function
|
|
50
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
51
|
+
|
|
52
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
43
53
|
|
|
44
54
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
45
55
|
|
|
46
|
-
function
|
|
56
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
57
|
+
|
|
58
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
59
|
|
|
48
60
|
var fallbackProps = {
|
|
49
61
|
cornerRadius: 5,
|
|
@@ -51,17 +63,17 @@ var fallbackProps = {
|
|
|
51
63
|
pointerWidth: 10
|
|
52
64
|
};
|
|
53
65
|
|
|
54
|
-
var VictoryTooltip =
|
|
55
|
-
/*#__PURE__*/
|
|
56
|
-
function (_React$Component) {
|
|
66
|
+
var VictoryTooltip = /*#__PURE__*/function (_React$Component) {
|
|
57
67
|
_inherits(VictoryTooltip, _React$Component);
|
|
58
68
|
|
|
69
|
+
var _super = _createSuper(VictoryTooltip);
|
|
70
|
+
|
|
59
71
|
function VictoryTooltip(props) {
|
|
60
72
|
var _this;
|
|
61
73
|
|
|
62
74
|
_classCallCheck(this, VictoryTooltip);
|
|
63
75
|
|
|
64
|
-
_this =
|
|
76
|
+
_this = _super.call(this, props);
|
|
65
77
|
_this.id = props.id === undefined ? (0, _uniqueId2.default)("tooltip-") : props.id;
|
|
66
78
|
return _this;
|
|
67
79
|
}
|
|
@@ -147,12 +159,12 @@ function (_React$Component) {
|
|
|
147
159
|
active: active
|
|
148
160
|
}));
|
|
149
161
|
|
|
150
|
-
var
|
|
162
|
+
var _this$getStyles = this.getStyles((0, _assign2.default)({}, props, {
|
|
151
163
|
active: active,
|
|
152
164
|
text: text
|
|
153
165
|
})),
|
|
154
|
-
style =
|
|
155
|
-
flyoutStyle =
|
|
166
|
+
style = _this$getStyles.style,
|
|
167
|
+
flyoutStyle = _this$getStyles.flyoutStyle;
|
|
156
168
|
|
|
157
169
|
var orientation = _victoryCore.Helpers.evaluateProp(props.orientation, (0, _assign2.default)({}, props, {
|
|
158
170
|
active: active,
|
|
@@ -190,7 +202,7 @@ function (_React$Component) {
|
|
|
190
202
|
|
|
191
203
|
var labelSize = _victoryCore.TextSize.approximateTextSize(text, style);
|
|
192
204
|
|
|
193
|
-
var
|
|
205
|
+
var _this$getDimensions = this.getDimensions((0, _assign2.default)({}, props, {
|
|
194
206
|
style: style,
|
|
195
207
|
flyoutStyle: flyoutStyle,
|
|
196
208
|
active: active,
|
|
@@ -200,8 +212,8 @@ function (_React$Component) {
|
|
|
200
212
|
pointerWidth: pointerWidth,
|
|
201
213
|
pointerLength: pointerLength
|
|
202
214
|
}), labelSize),
|
|
203
|
-
flyoutHeight =
|
|
204
|
-
flyoutWidth =
|
|
215
|
+
flyoutHeight = _this$getDimensions.flyoutHeight,
|
|
216
|
+
flyoutWidth = _this$getDimensions.flyoutWidth;
|
|
205
217
|
|
|
206
218
|
var evaluatedProps = (0, _assign2.default)({}, props, {
|
|
207
219
|
active: active,
|
|
@@ -506,7 +518,7 @@ function (_React$Component) {
|
|
|
506
518
|
var renderInPortal = props.renderInPortal;
|
|
507
519
|
|
|
508
520
|
if (!active) {
|
|
509
|
-
return renderInPortal ? _react.default.createElement(_victoryCore.VictoryPortal, null, null) : null;
|
|
521
|
+
return renderInPortal ? /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryPortal, null, null) : null;
|
|
510
522
|
}
|
|
511
523
|
|
|
512
524
|
var evaluatedProps = this.getEvaluatedProps(props);
|
|
@@ -514,14 +526,14 @@ function (_React$Component) {
|
|
|
514
526
|
labelComponent = evaluatedProps.labelComponent,
|
|
515
527
|
groupComponent = evaluatedProps.groupComponent;
|
|
516
528
|
var calculatedValues = this.getCalculatedValues(evaluatedProps);
|
|
517
|
-
var children = [_react.default.cloneElement(flyoutComponent, this.getFlyoutProps(evaluatedProps, calculatedValues)), _react.default.cloneElement(labelComponent, this.getLabelProps(evaluatedProps, calculatedValues))];
|
|
529
|
+
var children = [/*#__PURE__*/_react.default.cloneElement(flyoutComponent, this.getFlyoutProps(evaluatedProps, calculatedValues)), /*#__PURE__*/_react.default.cloneElement(labelComponent, this.getLabelProps(evaluatedProps, calculatedValues))];
|
|
518
530
|
|
|
519
|
-
var tooltip = _react.default.cloneElement(groupComponent, {
|
|
531
|
+
var tooltip = /*#__PURE__*/_react.default.cloneElement(groupComponent, {
|
|
520
532
|
role: "presentation",
|
|
521
533
|
transform: calculatedValues.transform
|
|
522
534
|
}, children);
|
|
523
535
|
|
|
524
|
-
return renderInPortal ? _react.default.createElement(_victoryCore.VictoryPortal, null, tooltip) : tooltip;
|
|
536
|
+
return renderInPortal ? /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryPortal, null, tooltip) : tooltip;
|
|
525
537
|
}
|
|
526
538
|
}, {
|
|
527
539
|
key: "render",
|
|
@@ -536,159 +548,135 @@ function (_React$Component) {
|
|
|
536
548
|
}(_react.default.Component);
|
|
537
549
|
|
|
538
550
|
exports.default = VictoryTooltip;
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
return
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
};
|
|
668
|
-
}
|
|
669
|
-
}];
|
|
670
|
-
return [{
|
|
671
|
-
target: "data",
|
|
672
|
-
eventHandlers: {
|
|
673
|
-
onMouseOver: function () {
|
|
674
|
-
return activate;
|
|
675
|
-
},
|
|
676
|
-
onFocus: function () {
|
|
677
|
-
return activate;
|
|
678
|
-
},
|
|
679
|
-
onTouchStart: function () {
|
|
680
|
-
return activate;
|
|
681
|
-
},
|
|
682
|
-
onMouseOut: function () {
|
|
683
|
-
return deactivate;
|
|
684
|
-
},
|
|
685
|
-
onBlur: function () {
|
|
686
|
-
return deactivate;
|
|
687
|
-
},
|
|
688
|
-
onTouchEnd: function () {
|
|
689
|
-
return deactivate;
|
|
690
|
-
}
|
|
551
|
+
VictoryTooltip.displayName = "VictoryTooltip";
|
|
552
|
+
VictoryTooltip.role = "tooltip";
|
|
553
|
+
VictoryTooltip.propTypes = {
|
|
554
|
+
activateData: _propTypes.default.bool,
|
|
555
|
+
active: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.func]),
|
|
556
|
+
activePoints: _propTypes.default.array,
|
|
557
|
+
angle: _propTypes.default.number,
|
|
558
|
+
center: _propTypes.default.shape({
|
|
559
|
+
x: _victoryCore.PropTypes.nonNegative,
|
|
560
|
+
y: _victoryCore.PropTypes.nonNegative
|
|
561
|
+
}),
|
|
562
|
+
centerOffset: _propTypes.default.shape({
|
|
563
|
+
x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.func]),
|
|
564
|
+
y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.func])
|
|
565
|
+
}),
|
|
566
|
+
constrainToVisibleArea: _propTypes.default.bool,
|
|
567
|
+
cornerRadius: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
568
|
+
data: _propTypes.default.array,
|
|
569
|
+
datum: _propTypes.default.object,
|
|
570
|
+
dx: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.func]),
|
|
571
|
+
dy: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.func]),
|
|
572
|
+
events: _propTypes.default.object,
|
|
573
|
+
flyoutComponent: _propTypes.default.element,
|
|
574
|
+
flyoutHeight: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
575
|
+
flyoutPadding: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.number, _propTypes.default.shape({
|
|
576
|
+
top: _propTypes.default.number,
|
|
577
|
+
bottom: _propTypes.default.number,
|
|
578
|
+
left: _propTypes.default.number,
|
|
579
|
+
right: _propTypes.default.number
|
|
580
|
+
})]),
|
|
581
|
+
flyoutStyle: _propTypes.default.object,
|
|
582
|
+
flyoutWidth: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
583
|
+
groupComponent: _propTypes.default.element,
|
|
584
|
+
height: _propTypes.default.number,
|
|
585
|
+
horizontal: _propTypes.default.bool,
|
|
586
|
+
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
587
|
+
index: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
588
|
+
labelComponent: _propTypes.default.element,
|
|
589
|
+
orientation: _propTypes.default.oneOfType([_propTypes.default.oneOf(["top", "bottom", "left", "right"]), _propTypes.default.func]),
|
|
590
|
+
pointerLength: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
591
|
+
pointerOrientation: _propTypes.default.oneOfType([_propTypes.default.oneOf(["top", "bottom", "left", "right"]), _propTypes.default.func]),
|
|
592
|
+
pointerWidth: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
593
|
+
polar: _propTypes.default.bool,
|
|
594
|
+
renderInPortal: _propTypes.default.bool,
|
|
595
|
+
scale: _propTypes.default.shape({
|
|
596
|
+
x: _victoryCore.PropTypes.scale,
|
|
597
|
+
y: _victoryCore.PropTypes.scale
|
|
598
|
+
}),
|
|
599
|
+
style: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array]),
|
|
600
|
+
text: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.func, _propTypes.default.array]),
|
|
601
|
+
theme: _propTypes.default.object,
|
|
602
|
+
width: _propTypes.default.number,
|
|
603
|
+
x: _propTypes.default.number,
|
|
604
|
+
y: _propTypes.default.number
|
|
605
|
+
};
|
|
606
|
+
VictoryTooltip.defaultProps = {
|
|
607
|
+
active: false,
|
|
608
|
+
renderInPortal: true,
|
|
609
|
+
labelComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryLabel, null),
|
|
610
|
+
flyoutComponent: /*#__PURE__*/_react.default.createElement(_flyout.default, null),
|
|
611
|
+
groupComponent: /*#__PURE__*/_react.default.createElement("g", null)
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
VictoryTooltip.defaultEvents = function (props) {
|
|
615
|
+
var activate = props.activateData ? [{
|
|
616
|
+
target: "labels",
|
|
617
|
+
mutation: function () {
|
|
618
|
+
return {
|
|
619
|
+
active: true
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
}, {
|
|
623
|
+
target: "data",
|
|
624
|
+
mutation: function () {
|
|
625
|
+
return {
|
|
626
|
+
active: true
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
}] : [{
|
|
630
|
+
target: "labels",
|
|
631
|
+
mutation: function () {
|
|
632
|
+
return {
|
|
633
|
+
active: true
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
}];
|
|
637
|
+
var deactivate = props.activateData ? [{
|
|
638
|
+
target: "labels",
|
|
639
|
+
mutation: function () {
|
|
640
|
+
return {
|
|
641
|
+
active: undefined
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
}, {
|
|
645
|
+
target: "data",
|
|
646
|
+
mutation: function () {
|
|
647
|
+
return {
|
|
648
|
+
active: undefined
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
}] : [{
|
|
652
|
+
target: "labels",
|
|
653
|
+
mutation: function () {
|
|
654
|
+
return {
|
|
655
|
+
active: undefined
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
}];
|
|
659
|
+
return [{
|
|
660
|
+
target: "data",
|
|
661
|
+
eventHandlers: {
|
|
662
|
+
onMouseOver: function () {
|
|
663
|
+
return activate;
|
|
664
|
+
},
|
|
665
|
+
onFocus: function () {
|
|
666
|
+
return activate;
|
|
667
|
+
},
|
|
668
|
+
onTouchStart: function () {
|
|
669
|
+
return activate;
|
|
670
|
+
},
|
|
671
|
+
onMouseOut: function () {
|
|
672
|
+
return deactivate;
|
|
673
|
+
},
|
|
674
|
+
onBlur: function () {
|
|
675
|
+
return deactivate;
|
|
676
|
+
},
|
|
677
|
+
onTouchEnd: function () {
|
|
678
|
+
return deactivate;
|
|
691
679
|
}
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
680
|
+
}
|
|
681
|
+
}];
|
|
682
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-tooltip",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.5.0",
|
|
4
4
|
"description": "Tooltip Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.19",
|
|
23
|
-
"prop-types": "^15.
|
|
24
|
-
"victory-core": "^36.
|
|
23
|
+
"prop-types": "^15.8.1",
|
|
24
|
+
"victory-core": "^36.5.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"react": "
|
|
27
|
+
"react": ">=16.6.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
31
31
|
},
|
|
32
32
|
"sideEffects": false,
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "7cecba921f751c3decc8215f7e866f51d11203c1"
|
|
34
34
|
}
|
package/src/flyout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import { Helpers, CommonProps, Path } from "victory-core";
|
|
4
|
+
import { Helpers, CommonProps, Path, UserProps } from "victory-core";
|
|
5
5
|
import { isPlainObject, assign } from "lodash";
|
|
6
6
|
|
|
7
7
|
const getVerticalPath = (props) => {
|
|
@@ -87,9 +87,11 @@ const evaluateProps = (props) => {
|
|
|
87
87
|
|
|
88
88
|
const Flyout = (props) => {
|
|
89
89
|
props = evaluateProps(props);
|
|
90
|
+
const userProps = UserProps.getSafeUserProps(props);
|
|
90
91
|
|
|
91
92
|
return React.cloneElement(props.pathComponent, {
|
|
92
93
|
...props.events,
|
|
94
|
+
...userProps,
|
|
93
95
|
style: props.style,
|
|
94
96
|
d: getFlyoutPath(props),
|
|
95
97
|
className: props.className,
|