victory-box-plot 36.0.0 → 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/dist/victory-box-plot.js +308 -325
- package/es/victory-box-plot.js +1 -3
- package/lib/victory-box-plot.js +1 -3
- package/package.json +3 -3
package/dist/victory-box-plot.js
CHANGED
|
@@ -698,9 +698,7 @@ var options = {
|
|
|
698
698
|
}]
|
|
699
699
|
};
|
|
700
700
|
|
|
701
|
-
var VictoryBoxPlot =
|
|
702
|
-
/*#__PURE__*/
|
|
703
|
-
function (_React$Component) {
|
|
701
|
+
var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
|
|
704
702
|
_inherits(VictoryBoxPlot, _React$Component);
|
|
705
703
|
|
|
706
704
|
function VictoryBoxPlot() {
|
|
@@ -14420,9 +14418,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
14420
14418
|
|
|
14421
14419
|
|
|
14422
14420
|
|
|
14423
|
-
var VictoryAnimation =
|
|
14424
|
-
/*#__PURE__*/
|
|
14425
|
-
function (_React$Component) {
|
|
14421
|
+
var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
|
|
14426
14422
|
_inherits(VictoryAnimation, _React$Component);
|
|
14427
14423
|
|
|
14428
14424
|
function VictoryAnimation(props, context) {
|
|
@@ -14706,9 +14702,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
14706
14702
|
|
|
14707
14703
|
|
|
14708
14704
|
|
|
14709
|
-
var VictoryContainer =
|
|
14710
|
-
/*#__PURE__*/
|
|
14711
|
-
function (_React$Component) {
|
|
14705
|
+
var VictoryContainer = /*#__PURE__*/function (_React$Component) {
|
|
14712
14706
|
_inherits(VictoryContainer, _React$Component);
|
|
14713
14707
|
|
|
14714
14708
|
function VictoryContainer(props) {
|
|
@@ -15654,9 +15648,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
15654
15648
|
|
|
15655
15649
|
|
|
15656
15650
|
|
|
15657
|
-
var Portal =
|
|
15658
|
-
/*#__PURE__*/
|
|
15659
|
-
function (_React$Component) {
|
|
15651
|
+
var Portal = /*#__PURE__*/function (_React$Component) {
|
|
15660
15652
|
_inherits(Portal, _React$Component);
|
|
15661
15653
|
|
|
15662
15654
|
function Portal(props) {
|
|
@@ -15775,9 +15767,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
15775
15767
|
|
|
15776
15768
|
|
|
15777
15769
|
|
|
15778
|
-
var VictoryPortal =
|
|
15779
|
-
/*#__PURE__*/
|
|
15780
|
-
function (_React$Component) {
|
|
15770
|
+
var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
15781
15771
|
_inherits(VictoryPortal, _React$Component);
|
|
15782
15772
|
|
|
15783
15773
|
function VictoryPortal() {
|
|
@@ -16979,9 +16969,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
16979
16969
|
|
|
16980
16970
|
|
|
16981
16971
|
|
|
16982
|
-
var VictoryTransition =
|
|
16983
|
-
/*#__PURE__*/
|
|
16984
|
-
function (_React$Component) {
|
|
16972
|
+
var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
16985
16973
|
_inherits(VictoryTransition, _React$Component);
|
|
16986
16974
|
|
|
16987
16975
|
function VictoryTransition(props, context) {
|
|
@@ -17282,365 +17270,362 @@ var defaultComponents = [{
|
|
|
17282
17270
|
name: "labels"
|
|
17283
17271
|
}];
|
|
17284
17272
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (WrappedComponent, options) {
|
|
17285
|
-
return (
|
|
17286
|
-
|
|
17287
|
-
function (_WrappedComponent) {
|
|
17288
|
-
_inherits(addEvents, _WrappedComponent);
|
|
17273
|
+
return /*#__PURE__*/function (_WrappedComponent) {
|
|
17274
|
+
_inherits(addEvents, _WrappedComponent);
|
|
17289
17275
|
|
|
17290
|
-
|
|
17291
|
-
|
|
17276
|
+
function addEvents(props) {
|
|
17277
|
+
var _this;
|
|
17292
17278
|
|
|
17293
|
-
|
|
17279
|
+
_classCallCheck(this, addEvents);
|
|
17294
17280
|
|
|
17295
|
-
|
|
17296
|
-
|
|
17297
|
-
|
|
17298
|
-
|
|
17281
|
+
_this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
|
|
17282
|
+
var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
17283
|
+
var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
|
|
17284
|
+
_this.state = {};
|
|
17299
17285
|
|
|
17300
|
-
|
|
17301
|
-
|
|
17302
|
-
|
|
17303
|
-
|
|
17304
|
-
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
17286
|
+
_this.getEvents = function (p, target, eventKey) {
|
|
17287
|
+
return boundGetEvents(p, target, eventKey, getScopedEvents);
|
|
17288
|
+
};
|
|
17305
17289
|
|
|
17306
|
-
|
|
17290
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
17307
17291
|
|
|
17308
|
-
|
|
17292
|
+
var calculatedValues = _this.getCalculatedValues(props);
|
|
17309
17293
|
|
|
17310
|
-
|
|
17311
|
-
_this.calculatedState = _this.getStateChanges(props);
|
|
17312
|
-
_this.globalEvents = {};
|
|
17313
|
-
_this.prevGlobalEventKeys = [];
|
|
17314
|
-
_this.boundGlobalEvents = {};
|
|
17315
|
-
return _this;
|
|
17316
|
-
}
|
|
17294
|
+
_this.cacheValues(calculatedValues);
|
|
17317
17295
|
|
|
17318
|
-
|
|
17319
|
-
|
|
17320
|
-
|
|
17321
|
-
|
|
17322
|
-
|
|
17323
|
-
|
|
17324
|
-
|
|
17325
|
-
if (animating || newMutation) {
|
|
17326
|
-
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17327
|
-
this.externalMutations = externalMutations;
|
|
17328
|
-
this.applyExternalMutations(nextProps, externalMutations);
|
|
17329
|
-
return true;
|
|
17330
|
-
}
|
|
17331
|
-
|
|
17332
|
-
var calculatedState = this.getStateChanges(nextProps);
|
|
17296
|
+
_this.externalMutations = _this.getExternalMutations(props);
|
|
17297
|
+
_this.calculatedState = _this.getStateChanges(props);
|
|
17298
|
+
_this.globalEvents = {};
|
|
17299
|
+
_this.prevGlobalEventKeys = [];
|
|
17300
|
+
_this.boundGlobalEvents = {};
|
|
17301
|
+
return _this;
|
|
17302
|
+
}
|
|
17333
17303
|
|
|
17334
|
-
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
|
|
17304
|
+
_createClass(addEvents, [{
|
|
17305
|
+
key: "shouldComponentUpdate",
|
|
17306
|
+
value: function shouldComponentUpdate(nextProps) {
|
|
17307
|
+
var externalMutations = this.getExternalMutations(nextProps);
|
|
17308
|
+
var animating = this.props.animating || this.props.animate;
|
|
17309
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
|
|
17310
|
+
|
|
17311
|
+
if (animating || newMutation) {
|
|
17312
|
+
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17313
|
+
this.externalMutations = externalMutations;
|
|
17314
|
+
this.applyExternalMutations(nextProps, externalMutations);
|
|
17315
|
+
return true;
|
|
17316
|
+
}
|
|
17338
17317
|
|
|
17339
|
-
|
|
17340
|
-
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17341
|
-
return true;
|
|
17342
|
-
}
|
|
17318
|
+
var calculatedState = this.getStateChanges(nextProps);
|
|
17343
17319
|
|
|
17344
|
-
|
|
17320
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
|
|
17321
|
+
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17322
|
+
return true;
|
|
17345
17323
|
}
|
|
17346
|
-
}, {
|
|
17347
|
-
key: "componentDidMount",
|
|
17348
|
-
value: function componentDidMount() {
|
|
17349
|
-
var _this2 = this;
|
|
17350
|
-
|
|
17351
|
-
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
|
|
17352
17324
|
|
|
17353
|
-
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
this.prevGlobalEventKeys = globalEventKeys;
|
|
17325
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
|
|
17326
|
+
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17327
|
+
return true;
|
|
17357
17328
|
}
|
|
17358
|
-
}, {
|
|
17359
|
-
key: "componentDidUpdate",
|
|
17360
|
-
value: function componentDidUpdate(prevProps) {
|
|
17361
|
-
var _this3 = this;
|
|
17362
17329
|
|
|
17363
|
-
|
|
17364
|
-
|
|
17330
|
+
return false;
|
|
17331
|
+
}
|
|
17332
|
+
}, {
|
|
17333
|
+
key: "componentDidMount",
|
|
17334
|
+
value: function componentDidMount() {
|
|
17335
|
+
var _this2 = this;
|
|
17365
17336
|
|
|
17366
|
-
|
|
17337
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
|
|
17367
17338
|
|
|
17368
|
-
|
|
17339
|
+
globalEventKeys.forEach(function (key) {
|
|
17340
|
+
return _this2.addGlobalListener(key);
|
|
17341
|
+
});
|
|
17342
|
+
this.prevGlobalEventKeys = globalEventKeys;
|
|
17343
|
+
}
|
|
17344
|
+
}, {
|
|
17345
|
+
key: "componentDidUpdate",
|
|
17346
|
+
value: function componentDidUpdate(prevProps) {
|
|
17347
|
+
var _this3 = this;
|
|
17369
17348
|
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
});
|
|
17349
|
+
var calculatedState = this.getStateChanges(prevProps);
|
|
17350
|
+
this.calculatedState = calculatedState;
|
|
17373
17351
|
|
|
17374
|
-
|
|
17352
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
|
|
17375
17353
|
|
|
17376
|
-
|
|
17377
|
-
return _this3.addGlobalListener(key);
|
|
17378
|
-
});
|
|
17379
|
-
this.prevGlobalEventKeys = globalEventKeys;
|
|
17380
|
-
}
|
|
17381
|
-
}, {
|
|
17382
|
-
key: "componentWillUnmount",
|
|
17383
|
-
value: function componentWillUnmount() {
|
|
17384
|
-
var _this4 = this;
|
|
17354
|
+
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
17385
17355
|
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
}
|
|
17390
|
-
}, {
|
|
17391
|
-
key: "addGlobalListener",
|
|
17392
|
-
value: function addGlobalListener(key) {
|
|
17393
|
-
var _this5 = this;
|
|
17394
|
-
|
|
17395
|
-
var boundListener = function (event) {
|
|
17396
|
-
var listener = _this5.globalEvents[key];
|
|
17397
|
-
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
|
|
17398
|
-
};
|
|
17356
|
+
removedGlobalEventKeys.forEach(function (key) {
|
|
17357
|
+
return _this3.removeGlobalListener(key);
|
|
17358
|
+
});
|
|
17399
17359
|
|
|
17400
|
-
|
|
17401
|
-
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
|
|
17402
|
-
}
|
|
17403
|
-
}, {
|
|
17404
|
-
key: "removeGlobalListener",
|
|
17405
|
-
value: function removeGlobalListener(key) {
|
|
17406
|
-
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
17407
|
-
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
17408
|
-
// state change should trigger a re-render
|
|
17409
|
-
|
|
17410
|
-
}, {
|
|
17411
|
-
key: "getStateChanges",
|
|
17412
|
-
value: function getStateChanges(props) {
|
|
17413
|
-
var _this6 = this;
|
|
17414
|
-
|
|
17415
|
-
if (!this.hasEvents) {
|
|
17416
|
-
return {};
|
|
17417
|
-
}
|
|
17360
|
+
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
17418
17361
|
|
|
17419
|
-
|
|
17420
|
-
|
|
17362
|
+
addedGlobalEventKeys.forEach(function (key) {
|
|
17363
|
+
return _this3.addGlobalListener(key);
|
|
17364
|
+
});
|
|
17365
|
+
this.prevGlobalEventKeys = globalEventKeys;
|
|
17366
|
+
}
|
|
17367
|
+
}, {
|
|
17368
|
+
key: "componentWillUnmount",
|
|
17369
|
+
value: function componentWillUnmount() {
|
|
17370
|
+
var _this4 = this;
|
|
17421
17371
|
|
|
17422
|
-
|
|
17423
|
-
|
|
17372
|
+
this.prevGlobalEventKeys.forEach(function (key) {
|
|
17373
|
+
return _this4.removeGlobalListener(key);
|
|
17374
|
+
});
|
|
17375
|
+
}
|
|
17376
|
+
}, {
|
|
17377
|
+
key: "addGlobalListener",
|
|
17378
|
+
value: function addGlobalListener(key) {
|
|
17379
|
+
var _this5 = this;
|
|
17380
|
+
|
|
17381
|
+
var boundListener = function (event) {
|
|
17382
|
+
var listener = _this5.globalEvents[key];
|
|
17383
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
|
|
17384
|
+
};
|
|
17424
17385
|
|
|
17425
|
-
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17442
|
-
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
17443
|
-
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
17444
|
-
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
17445
|
-
return memo;
|
|
17446
|
-
}, []);
|
|
17447
|
-
var compiledCallbacks = callbacks.length ? function () {
|
|
17448
|
-
callbacks.forEach(function (c) {
|
|
17449
|
-
return c();
|
|
17450
|
-
});
|
|
17451
|
-
} : undefined;
|
|
17452
|
-
this.setState(externalMutations, compiledCallbacks);
|
|
17453
|
-
}
|
|
17386
|
+
this.boundGlobalEvents[key] = boundListener;
|
|
17387
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
|
|
17388
|
+
}
|
|
17389
|
+
}, {
|
|
17390
|
+
key: "removeGlobalListener",
|
|
17391
|
+
value: function removeGlobalListener(key) {
|
|
17392
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
17393
|
+
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
17394
|
+
// state change should trigger a re-render
|
|
17395
|
+
|
|
17396
|
+
}, {
|
|
17397
|
+
key: "getStateChanges",
|
|
17398
|
+
value: function getStateChanges(props) {
|
|
17399
|
+
var _this6 = this;
|
|
17400
|
+
|
|
17401
|
+
if (!this.hasEvents) {
|
|
17402
|
+
return {};
|
|
17454
17403
|
}
|
|
17455
|
-
}, {
|
|
17456
|
-
key: "getCalculatedValues",
|
|
17457
|
-
value: function getCalculatedValues(props) {
|
|
17458
|
-
var sharedEvents = props.sharedEvents;
|
|
17459
|
-
var components = WrappedComponent.expectedComponents;
|
|
17460
|
-
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
17461
|
-
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
17462
|
-
return undefined;
|
|
17463
|
-
};
|
|
17464
|
-
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
17465
17404
|
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
});
|
|
17405
|
+
var getState = function (key, type) {
|
|
17406
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
17469
17407
|
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
return {
|
|
17473
|
-
componentEvents: componentEvents,
|
|
17474
|
-
getSharedEventState: getSharedEventState,
|
|
17475
|
-
baseProps: baseProps,
|
|
17476
|
-
dataKeys: dataKeys,
|
|
17477
|
-
hasEvents: hasEvents,
|
|
17478
|
-
events: events
|
|
17479
|
-
};
|
|
17480
|
-
}
|
|
17481
|
-
}, {
|
|
17482
|
-
key: "getExternalMutations",
|
|
17483
|
-
value: function getExternalMutations(props) {
|
|
17484
|
-
var sharedEvents = props.sharedEvents,
|
|
17485
|
-
externalEventMutations = props.externalEventMutations;
|
|
17486
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
17487
|
-
}
|
|
17488
|
-
}, {
|
|
17489
|
-
key: "cacheValues",
|
|
17490
|
-
value: function cacheValues(obj) {
|
|
17491
|
-
var _this7 = this;
|
|
17408
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
|
|
17409
|
+
};
|
|
17492
17410
|
|
|
17493
|
-
|
|
17494
|
-
|
|
17495
|
-
|
|
17411
|
+
options = options || {};
|
|
17412
|
+
var components = options.components || defaultComponents;
|
|
17413
|
+
var stateChanges = components.map(function (component) {
|
|
17414
|
+
if (!props.standalone && component.name === "parent") {
|
|
17415
|
+
// don't check for changes on parent props for non-standalone components
|
|
17416
|
+
return undefined;
|
|
17417
|
+
} else {
|
|
17418
|
+
return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
|
|
17419
|
+
return getState(key, component.name);
|
|
17420
|
+
}).filter(Boolean);
|
|
17421
|
+
}
|
|
17422
|
+
}).filter(Boolean);
|
|
17423
|
+
return stateChanges;
|
|
17424
|
+
}
|
|
17425
|
+
}, {
|
|
17426
|
+
key: "applyExternalMutations",
|
|
17427
|
+
value: function applyExternalMutations(props, externalMutations) {
|
|
17428
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
17429
|
+
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
17430
|
+
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
17431
|
+
return memo;
|
|
17432
|
+
}, []);
|
|
17433
|
+
var compiledCallbacks = callbacks.length ? function () {
|
|
17434
|
+
callbacks.forEach(function (c) {
|
|
17435
|
+
return c();
|
|
17436
|
+
});
|
|
17437
|
+
} : undefined;
|
|
17438
|
+
this.setState(externalMutations, compiledCallbacks);
|
|
17496
17439
|
}
|
|
17497
|
-
}
|
|
17498
|
-
|
|
17499
|
-
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17440
|
+
}
|
|
17441
|
+
}, {
|
|
17442
|
+
key: "getCalculatedValues",
|
|
17443
|
+
value: function getCalculatedValues(props) {
|
|
17444
|
+
var sharedEvents = props.sharedEvents;
|
|
17445
|
+
var components = WrappedComponent.expectedComponents;
|
|
17446
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
17447
|
+
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
17448
|
+
return undefined;
|
|
17449
|
+
};
|
|
17450
|
+
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
17503
17451
|
|
|
17504
|
-
|
|
17452
|
+
var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
|
|
17453
|
+
return key !== "parent";
|
|
17454
|
+
});
|
|
17505
17455
|
|
|
17506
|
-
|
|
17507
|
-
|
|
17456
|
+
var hasEvents = props.events || props.sharedEvents || componentEvents;
|
|
17457
|
+
var events = this.getAllEvents(props);
|
|
17458
|
+
return {
|
|
17459
|
+
componentEvents: componentEvents,
|
|
17460
|
+
getSharedEventState: getSharedEventState,
|
|
17461
|
+
baseProps: baseProps,
|
|
17462
|
+
dataKeys: dataKeys,
|
|
17463
|
+
hasEvents: hasEvents,
|
|
17464
|
+
events: events
|
|
17465
|
+
};
|
|
17466
|
+
}
|
|
17467
|
+
}, {
|
|
17468
|
+
key: "getExternalMutations",
|
|
17469
|
+
value: function getExternalMutations(props) {
|
|
17470
|
+
var sharedEvents = props.sharedEvents,
|
|
17471
|
+
externalEventMutations = props.externalEventMutations;
|
|
17472
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
17473
|
+
}
|
|
17474
|
+
}, {
|
|
17475
|
+
key: "cacheValues",
|
|
17476
|
+
value: function cacheValues(obj) {
|
|
17477
|
+
var _this7 = this;
|
|
17508
17478
|
|
|
17509
|
-
|
|
17479
|
+
lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
|
|
17480
|
+
_this7[key] = obj[key];
|
|
17481
|
+
});
|
|
17482
|
+
}
|
|
17483
|
+
}, {
|
|
17484
|
+
key: "getBaseProps",
|
|
17485
|
+
value: function getBaseProps(props, getSharedEventState) {
|
|
17486
|
+
getSharedEventState = getSharedEventState || this.getSharedEventState;
|
|
17487
|
+
var sharedParentState = getSharedEventState("parent", "parent");
|
|
17488
|
+
var parentState = this.getEventState("parent", "parent");
|
|
17510
17489
|
|
|
17511
|
-
|
|
17512
|
-
}
|
|
17513
|
-
}, {
|
|
17514
|
-
key: "getAllEvents",
|
|
17515
|
-
value: function getAllEvents(props) {
|
|
17516
|
-
if (Array.isArray(this.componentEvents)) {
|
|
17517
|
-
var _componentEvents;
|
|
17490
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
|
|
17518
17491
|
|
|
17519
|
-
|
|
17520
|
-
|
|
17492
|
+
var parentPropsList = baseParentProps.parentControlledProps;
|
|
17493
|
+
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
|
|
17521
17494
|
|
|
17522
|
-
|
|
17523
|
-
}
|
|
17524
|
-
}, {
|
|
17525
|
-
key: "getComponentProps",
|
|
17526
|
-
value: function getComponentProps(component, type, index) {
|
|
17527
|
-
var name = this.props.name || WrappedComponent.role;
|
|
17528
|
-
var key = this.dataKeys && this.dataKeys[index] || index;
|
|
17529
|
-
var id = "".concat(name, "-").concat(type, "-").concat(key);
|
|
17530
|
-
var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
|
|
17531
|
-
|
|
17532
|
-
if (!baseProps && !this.hasEvents) {
|
|
17533
|
-
return undefined;
|
|
17534
|
-
}
|
|
17495
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
|
|
17535
17496
|
|
|
17536
|
-
|
|
17537
|
-
|
|
17497
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
17498
|
+
}
|
|
17499
|
+
}, {
|
|
17500
|
+
key: "getAllEvents",
|
|
17501
|
+
value: function getAllEvents(props) {
|
|
17502
|
+
if (Array.isArray(this.componentEvents)) {
|
|
17503
|
+
var _componentEvents;
|
|
17538
17504
|
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
key: id
|
|
17542
|
-
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
17543
|
-
id: id
|
|
17544
|
-
});
|
|
17505
|
+
return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
|
|
17506
|
+
}
|
|
17545
17507
|
|
|
17546
|
-
|
|
17508
|
+
return props.events;
|
|
17509
|
+
}
|
|
17510
|
+
}, {
|
|
17511
|
+
key: "getComponentProps",
|
|
17512
|
+
value: function getComponentProps(component, type, index) {
|
|
17513
|
+
var name = this.props.name || WrappedComponent.role;
|
|
17514
|
+
var key = this.dataKeys && this.dataKeys[index] || index;
|
|
17515
|
+
var id = "".concat(name, "-").concat(type, "-").concat(key);
|
|
17516
|
+
var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
|
|
17517
|
+
|
|
17518
|
+
if (!baseProps && !this.hasEvents) {
|
|
17519
|
+
return undefined;
|
|
17520
|
+
}
|
|
17547
17521
|
|
|
17548
|
-
|
|
17549
|
-
|
|
17550
|
-
});
|
|
17551
|
-
}
|
|
17522
|
+
if (this.hasEvents) {
|
|
17523
|
+
var baseEvents = this.getEvents(this.props, type, key);
|
|
17552
17524
|
|
|
17553
|
-
|
|
17525
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
|
|
17554
17526
|
index: index,
|
|
17555
17527
|
key: id
|
|
17556
|
-
}, component.props, baseProps, {
|
|
17528
|
+
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
17557
17529
|
id: id
|
|
17558
17530
|
});
|
|
17559
|
-
}
|
|
17560
|
-
}, {
|
|
17561
|
-
key: "renderContainer",
|
|
17562
|
-
value: function renderContainer(component, children) {
|
|
17563
|
-
var isContainer = component.type && component.type.role === "container";
|
|
17564
|
-
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
17565
|
-
|
|
17566
|
-
if (parentProps.events) {
|
|
17567
|
-
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
|
|
17568
|
-
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
|
|
17569
|
-
}
|
|
17570
17531
|
|
|
17571
|
-
|
|
17532
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
17533
|
+
|
|
17534
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
|
|
17535
|
+
events: events
|
|
17536
|
+
});
|
|
17572
17537
|
}
|
|
17573
|
-
}, {
|
|
17574
|
-
key: "animateComponent",
|
|
17575
|
-
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
17576
|
-
var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
|
|
17577
|
-
return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
|
|
17578
|
-
animate: props.animate,
|
|
17579
|
-
animationWhitelist: animationWhitelist
|
|
17580
|
-
}, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
|
|
17581
|
-
} // Used by `VictoryLine` and `VictoryArea`
|
|
17582
|
-
|
|
17583
|
-
}, {
|
|
17584
|
-
key: "renderContinuousData",
|
|
17585
|
-
value: function renderContinuousData(props) {
|
|
17586
|
-
var _this8 = this;
|
|
17587
|
-
|
|
17588
|
-
var dataComponent = props.dataComponent,
|
|
17589
|
-
labelComponent = props.labelComponent,
|
|
17590
|
-
groupComponent = props.groupComponent;
|
|
17591
|
-
|
|
17592
|
-
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
|
|
17593
|
-
|
|
17594
|
-
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
17595
|
-
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
17596
|
-
|
|
17597
|
-
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
17598
|
-
memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
|
|
17599
|
-
}
|
|
17600
17538
|
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
|
|
17539
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
|
|
17540
|
+
index: index,
|
|
17541
|
+
key: id
|
|
17542
|
+
}, component.props, baseProps, {
|
|
17543
|
+
id: id
|
|
17544
|
+
});
|
|
17545
|
+
}
|
|
17546
|
+
}, {
|
|
17547
|
+
key: "renderContainer",
|
|
17548
|
+
value: function renderContainer(component, children) {
|
|
17549
|
+
var isContainer = component.type && component.type.role === "container";
|
|
17550
|
+
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
17551
|
+
|
|
17552
|
+
if (parentProps.events) {
|
|
17553
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
|
|
17554
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
|
|
17606
17555
|
}
|
|
17607
|
-
}, {
|
|
17608
|
-
key: "renderData",
|
|
17609
|
-
value: function renderData(props) {
|
|
17610
|
-
var _this9 = this;
|
|
17611
|
-
|
|
17612
|
-
var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
|
|
17613
|
-
var dataComponent = props.dataComponent,
|
|
17614
|
-
labelComponent = props.labelComponent,
|
|
17615
|
-
groupComponent = props.groupComponent;
|
|
17616
|
-
var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
|
|
17617
|
-
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
17618
|
-
|
|
17619
|
-
if (shouldRenderDatum(dataProps.datum)) {
|
|
17620
|
-
validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
|
|
17621
|
-
}
|
|
17622
17556
|
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17557
|
+
return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
|
|
17558
|
+
}
|
|
17559
|
+
}, {
|
|
17560
|
+
key: "animateComponent",
|
|
17561
|
+
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
17562
|
+
var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
|
|
17563
|
+
return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
|
|
17564
|
+
animate: props.animate,
|
|
17565
|
+
animationWhitelist: animationWhitelist
|
|
17566
|
+
}, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
|
|
17567
|
+
} // Used by `VictoryLine` and `VictoryArea`
|
|
17568
|
+
|
|
17569
|
+
}, {
|
|
17570
|
+
key: "renderContinuousData",
|
|
17571
|
+
value: function renderContinuousData(props) {
|
|
17572
|
+
var _this8 = this;
|
|
17573
|
+
|
|
17574
|
+
var dataComponent = props.dataComponent,
|
|
17575
|
+
labelComponent = props.labelComponent,
|
|
17576
|
+
groupComponent = props.groupComponent;
|
|
17577
|
+
|
|
17578
|
+
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
|
|
17579
|
+
|
|
17580
|
+
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
17581
|
+
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
17582
|
+
|
|
17583
|
+
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
17584
|
+
memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
|
|
17585
|
+
}
|
|
17627
17586
|
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17587
|
+
return memo;
|
|
17588
|
+
}, []);
|
|
17589
|
+
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
17590
|
+
var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
17591
|
+
return this.renderContainer(groupComponent, children);
|
|
17592
|
+
}
|
|
17593
|
+
}, {
|
|
17594
|
+
key: "renderData",
|
|
17595
|
+
value: function renderData(props) {
|
|
17596
|
+
var _this9 = this;
|
|
17597
|
+
|
|
17598
|
+
var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
|
|
17599
|
+
var dataComponent = props.dataComponent,
|
|
17600
|
+
labelComponent = props.labelComponent,
|
|
17601
|
+
groupComponent = props.groupComponent;
|
|
17602
|
+
var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
|
|
17603
|
+
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
17604
|
+
|
|
17605
|
+
if (shouldRenderDatum(dataProps.datum)) {
|
|
17606
|
+
validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
|
|
17607
|
+
}
|
|
17631
17608
|
|
|
17632
|
-
|
|
17633
|
-
|
|
17609
|
+
return validDataComponents;
|
|
17610
|
+
}, []);
|
|
17611
|
+
var labelComponents = this.dataKeys.map(function (_dataKey, index) {
|
|
17612
|
+
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
17634
17613
|
|
|
17635
|
-
|
|
17614
|
+
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
17615
|
+
return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
|
|
17616
|
+
}
|
|
17636
17617
|
|
|
17637
|
-
return
|
|
17638
|
-
}
|
|
17639
|
-
|
|
17618
|
+
return undefined;
|
|
17619
|
+
}).filter(Boolean);
|
|
17620
|
+
|
|
17621
|
+
var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
|
|
17622
|
+
|
|
17623
|
+
return this.renderContainer(groupComponent, children);
|
|
17624
|
+
}
|
|
17625
|
+
}]);
|
|
17640
17626
|
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
);
|
|
17627
|
+
return addEvents;
|
|
17628
|
+
}(WrappedComponent);
|
|
17644
17629
|
});
|
|
17645
17630
|
|
|
17646
17631
|
/***/ }),
|
|
@@ -21044,9 +21029,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
21044
21029
|
|
|
21045
21030
|
|
|
21046
21031
|
|
|
21047
|
-
var Timer =
|
|
21048
|
-
/*#__PURE__*/
|
|
21049
|
-
function () {
|
|
21032
|
+
var Timer = /*#__PURE__*/function () {
|
|
21050
21033
|
function Timer() {
|
|
21051
21034
|
_classCallCheck(this, Timer);
|
|
21052
21035
|
|
package/es/victory-box-plot.js
CHANGED
package/lib/victory-box-plot.js
CHANGED
|
@@ -95,9 +95,7 @@ var options = {
|
|
|
95
95
|
}]
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
var VictoryBoxPlot =
|
|
99
|
-
/*#__PURE__*/
|
|
100
|
-
function (_React$Component) {
|
|
98
|
+
var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
|
|
101
99
|
_inherits(VictoryBoxPlot, _React$Component);
|
|
102
100
|
|
|
103
101
|
function VictoryBoxPlot() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-box-plot",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.1.0",
|
|
4
4
|
"description": "Box Plot Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"d3-array": "^1.2.0",
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"prop-types": "^15.5.8",
|
|
25
|
-
"victory-core": "^36.
|
|
25
|
+
"victory-core": "^36.1.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^16.6.0 || ^17.0.0"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "038cd9b70d9ce54ac6b861014165583760734c99"
|
|
35
35
|
}
|