victory-polar-axis 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.
|
@@ -538,9 +538,7 @@ var options = {
|
|
|
538
538
|
}]
|
|
539
539
|
};
|
|
540
540
|
|
|
541
|
-
var VictoryPolarAxis =
|
|
542
|
-
/*#__PURE__*/
|
|
543
|
-
function (_React$Component) {
|
|
541
|
+
var VictoryPolarAxis = /*#__PURE__*/function (_React$Component) {
|
|
544
542
|
_inherits(VictoryPolarAxis, _React$Component);
|
|
545
543
|
|
|
546
544
|
function VictoryPolarAxis() {
|
|
@@ -14389,9 +14387,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
14389
14387
|
|
|
14390
14388
|
|
|
14391
14389
|
|
|
14392
|
-
var VictoryAnimation =
|
|
14393
|
-
/*#__PURE__*/
|
|
14394
|
-
function (_React$Component) {
|
|
14390
|
+
var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
|
|
14395
14391
|
_inherits(VictoryAnimation, _React$Component);
|
|
14396
14392
|
|
|
14397
14393
|
function VictoryAnimation(props, context) {
|
|
@@ -14675,9 +14671,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
14675
14671
|
|
|
14676
14672
|
|
|
14677
14673
|
|
|
14678
|
-
var VictoryContainer =
|
|
14679
|
-
/*#__PURE__*/
|
|
14680
|
-
function (_React$Component) {
|
|
14674
|
+
var VictoryContainer = /*#__PURE__*/function (_React$Component) {
|
|
14681
14675
|
_inherits(VictoryContainer, _React$Component);
|
|
14682
14676
|
|
|
14683
14677
|
function VictoryContainer(props) {
|
|
@@ -15623,9 +15617,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
15623
15617
|
|
|
15624
15618
|
|
|
15625
15619
|
|
|
15626
|
-
var Portal =
|
|
15627
|
-
/*#__PURE__*/
|
|
15628
|
-
function (_React$Component) {
|
|
15620
|
+
var Portal = /*#__PURE__*/function (_React$Component) {
|
|
15629
15621
|
_inherits(Portal, _React$Component);
|
|
15630
15622
|
|
|
15631
15623
|
function Portal(props) {
|
|
@@ -15744,9 +15736,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
15744
15736
|
|
|
15745
15737
|
|
|
15746
15738
|
|
|
15747
|
-
var VictoryPortal =
|
|
15748
|
-
/*#__PURE__*/
|
|
15749
|
-
function (_React$Component) {
|
|
15739
|
+
var VictoryPortal = /*#__PURE__*/function (_React$Component) {
|
|
15750
15740
|
_inherits(VictoryPortal, _React$Component);
|
|
15751
15741
|
|
|
15752
15742
|
function VictoryPortal() {
|
|
@@ -16884,9 +16874,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
16884
16874
|
|
|
16885
16875
|
|
|
16886
16876
|
|
|
16887
|
-
var VictoryTransition =
|
|
16888
|
-
/*#__PURE__*/
|
|
16889
|
-
function (_React$Component) {
|
|
16877
|
+
var VictoryTransition = /*#__PURE__*/function (_React$Component) {
|
|
16890
16878
|
_inherits(VictoryTransition, _React$Component);
|
|
16891
16879
|
|
|
16892
16880
|
function VictoryTransition(props, context) {
|
|
@@ -17187,365 +17175,362 @@ var defaultComponents = [{
|
|
|
17187
17175
|
name: "labels"
|
|
17188
17176
|
}];
|
|
17189
17177
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (WrappedComponent, options) {
|
|
17190
|
-
return (
|
|
17191
|
-
|
|
17192
|
-
function (_WrappedComponent) {
|
|
17193
|
-
_inherits(addEvents, _WrappedComponent);
|
|
17178
|
+
return /*#__PURE__*/function (_WrappedComponent) {
|
|
17179
|
+
_inherits(addEvents, _WrappedComponent);
|
|
17194
17180
|
|
|
17195
|
-
|
|
17196
|
-
|
|
17181
|
+
function addEvents(props) {
|
|
17182
|
+
var _this;
|
|
17197
17183
|
|
|
17198
|
-
|
|
17184
|
+
_classCallCheck(this, addEvents);
|
|
17199
17185
|
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17186
|
+
_this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
|
|
17187
|
+
var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
17188
|
+
var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
|
|
17189
|
+
_this.state = {};
|
|
17204
17190
|
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
17191
|
+
_this.getEvents = function (p, target, eventKey) {
|
|
17192
|
+
return boundGetEvents(p, target, eventKey, getScopedEvents);
|
|
17193
|
+
};
|
|
17210
17194
|
|
|
17211
|
-
|
|
17195
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
17212
17196
|
|
|
17213
|
-
|
|
17197
|
+
var calculatedValues = _this.getCalculatedValues(props);
|
|
17214
17198
|
|
|
17215
|
-
|
|
17216
|
-
_this.calculatedState = _this.getStateChanges(props);
|
|
17217
|
-
_this.globalEvents = {};
|
|
17218
|
-
_this.prevGlobalEventKeys = [];
|
|
17219
|
-
_this.boundGlobalEvents = {};
|
|
17220
|
-
return _this;
|
|
17221
|
-
}
|
|
17199
|
+
_this.cacheValues(calculatedValues);
|
|
17222
17200
|
|
|
17223
|
-
|
|
17224
|
-
|
|
17225
|
-
|
|
17226
|
-
|
|
17227
|
-
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
if (animating || newMutation) {
|
|
17231
|
-
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17232
|
-
this.externalMutations = externalMutations;
|
|
17233
|
-
this.applyExternalMutations(nextProps, externalMutations);
|
|
17234
|
-
return true;
|
|
17235
|
-
}
|
|
17236
|
-
|
|
17237
|
-
var calculatedState = this.getStateChanges(nextProps);
|
|
17201
|
+
_this.externalMutations = _this.getExternalMutations(props);
|
|
17202
|
+
_this.calculatedState = _this.getStateChanges(props);
|
|
17203
|
+
_this.globalEvents = {};
|
|
17204
|
+
_this.prevGlobalEventKeys = [];
|
|
17205
|
+
_this.boundGlobalEvents = {};
|
|
17206
|
+
return _this;
|
|
17207
|
+
}
|
|
17238
17208
|
|
|
17239
|
-
|
|
17240
|
-
|
|
17241
|
-
|
|
17242
|
-
|
|
17209
|
+
_createClass(addEvents, [{
|
|
17210
|
+
key: "shouldComponentUpdate",
|
|
17211
|
+
value: function shouldComponentUpdate(nextProps) {
|
|
17212
|
+
var externalMutations = this.getExternalMutations(nextProps);
|
|
17213
|
+
var animating = this.props.animating || this.props.animate;
|
|
17214
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
|
|
17215
|
+
|
|
17216
|
+
if (animating || newMutation) {
|
|
17217
|
+
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17218
|
+
this.externalMutations = externalMutations;
|
|
17219
|
+
this.applyExternalMutations(nextProps, externalMutations);
|
|
17220
|
+
return true;
|
|
17221
|
+
}
|
|
17243
17222
|
|
|
17244
|
-
|
|
17245
|
-
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17246
|
-
return true;
|
|
17247
|
-
}
|
|
17223
|
+
var calculatedState = this.getStateChanges(nextProps);
|
|
17248
17224
|
|
|
17249
|
-
|
|
17225
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
|
|
17226
|
+
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17227
|
+
return true;
|
|
17250
17228
|
}
|
|
17251
|
-
}, {
|
|
17252
|
-
key: "componentDidMount",
|
|
17253
|
-
value: function componentDidMount() {
|
|
17254
|
-
var _this2 = this;
|
|
17255
17229
|
|
|
17256
|
-
|
|
17257
|
-
|
|
17258
|
-
|
|
17259
|
-
return _this2.addGlobalListener(key);
|
|
17260
|
-
});
|
|
17261
|
-
this.prevGlobalEventKeys = globalEventKeys;
|
|
17230
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
|
|
17231
|
+
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
17232
|
+
return true;
|
|
17262
17233
|
}
|
|
17263
|
-
}, {
|
|
17264
|
-
key: "componentDidUpdate",
|
|
17265
|
-
value: function componentDidUpdate(prevProps) {
|
|
17266
|
-
var _this3 = this;
|
|
17267
17234
|
|
|
17268
|
-
|
|
17269
|
-
|
|
17235
|
+
return false;
|
|
17236
|
+
}
|
|
17237
|
+
}, {
|
|
17238
|
+
key: "componentDidMount",
|
|
17239
|
+
value: function componentDidMount() {
|
|
17240
|
+
var _this2 = this;
|
|
17270
17241
|
|
|
17271
|
-
|
|
17242
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
|
|
17272
17243
|
|
|
17273
|
-
|
|
17244
|
+
globalEventKeys.forEach(function (key) {
|
|
17245
|
+
return _this2.addGlobalListener(key);
|
|
17246
|
+
});
|
|
17247
|
+
this.prevGlobalEventKeys = globalEventKeys;
|
|
17248
|
+
}
|
|
17249
|
+
}, {
|
|
17250
|
+
key: "componentDidUpdate",
|
|
17251
|
+
value: function componentDidUpdate(prevProps) {
|
|
17252
|
+
var _this3 = this;
|
|
17274
17253
|
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
});
|
|
17254
|
+
var calculatedState = this.getStateChanges(prevProps);
|
|
17255
|
+
this.calculatedState = calculatedState;
|
|
17278
17256
|
|
|
17279
|
-
|
|
17257
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
|
|
17280
17258
|
|
|
17281
|
-
|
|
17282
|
-
return _this3.addGlobalListener(key);
|
|
17283
|
-
});
|
|
17284
|
-
this.prevGlobalEventKeys = globalEventKeys;
|
|
17285
|
-
}
|
|
17286
|
-
}, {
|
|
17287
|
-
key: "componentWillUnmount",
|
|
17288
|
-
value: function componentWillUnmount() {
|
|
17289
|
-
var _this4 = this;
|
|
17259
|
+
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
17290
17260
|
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
}
|
|
17295
|
-
}, {
|
|
17296
|
-
key: "addGlobalListener",
|
|
17297
|
-
value: function addGlobalListener(key) {
|
|
17298
|
-
var _this5 = this;
|
|
17299
|
-
|
|
17300
|
-
var boundListener = function (event) {
|
|
17301
|
-
var listener = _this5.globalEvents[key];
|
|
17302
|
-
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
|
|
17303
|
-
};
|
|
17261
|
+
removedGlobalEventKeys.forEach(function (key) {
|
|
17262
|
+
return _this3.removeGlobalListener(key);
|
|
17263
|
+
});
|
|
17304
17264
|
|
|
17305
|
-
|
|
17306
|
-
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
|
|
17307
|
-
}
|
|
17308
|
-
}, {
|
|
17309
|
-
key: "removeGlobalListener",
|
|
17310
|
-
value: function removeGlobalListener(key) {
|
|
17311
|
-
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
17312
|
-
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
17313
|
-
// state change should trigger a re-render
|
|
17314
|
-
|
|
17315
|
-
}, {
|
|
17316
|
-
key: "getStateChanges",
|
|
17317
|
-
value: function getStateChanges(props) {
|
|
17318
|
-
var _this6 = this;
|
|
17319
|
-
|
|
17320
|
-
if (!this.hasEvents) {
|
|
17321
|
-
return {};
|
|
17322
|
-
}
|
|
17265
|
+
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
17323
17266
|
|
|
17324
|
-
|
|
17325
|
-
|
|
17267
|
+
addedGlobalEventKeys.forEach(function (key) {
|
|
17268
|
+
return _this3.addGlobalListener(key);
|
|
17269
|
+
});
|
|
17270
|
+
this.prevGlobalEventKeys = globalEventKeys;
|
|
17271
|
+
}
|
|
17272
|
+
}, {
|
|
17273
|
+
key: "componentWillUnmount",
|
|
17274
|
+
value: function componentWillUnmount() {
|
|
17275
|
+
var _this4 = this;
|
|
17326
17276
|
|
|
17327
|
-
|
|
17328
|
-
|
|
17277
|
+
this.prevGlobalEventKeys.forEach(function (key) {
|
|
17278
|
+
return _this4.removeGlobalListener(key);
|
|
17279
|
+
});
|
|
17280
|
+
}
|
|
17281
|
+
}, {
|
|
17282
|
+
key: "addGlobalListener",
|
|
17283
|
+
value: function addGlobalListener(key) {
|
|
17284
|
+
var _this5 = this;
|
|
17285
|
+
|
|
17286
|
+
var boundListener = function (event) {
|
|
17287
|
+
var listener = _this5.globalEvents[key];
|
|
17288
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
|
|
17289
|
+
};
|
|
17329
17290
|
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
|
|
17334
|
-
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17344
|
-
|
|
17345
|
-
|
|
17346
|
-
|
|
17347
|
-
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
17348
|
-
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
17349
|
-
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
17350
|
-
return memo;
|
|
17351
|
-
}, []);
|
|
17352
|
-
var compiledCallbacks = callbacks.length ? function () {
|
|
17353
|
-
callbacks.forEach(function (c) {
|
|
17354
|
-
return c();
|
|
17355
|
-
});
|
|
17356
|
-
} : undefined;
|
|
17357
|
-
this.setState(externalMutations, compiledCallbacks);
|
|
17358
|
-
}
|
|
17291
|
+
this.boundGlobalEvents[key] = boundListener;
|
|
17292
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
|
|
17293
|
+
}
|
|
17294
|
+
}, {
|
|
17295
|
+
key: "removeGlobalListener",
|
|
17296
|
+
value: function removeGlobalListener(key) {
|
|
17297
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
17298
|
+
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
17299
|
+
// state change should trigger a re-render
|
|
17300
|
+
|
|
17301
|
+
}, {
|
|
17302
|
+
key: "getStateChanges",
|
|
17303
|
+
value: function getStateChanges(props) {
|
|
17304
|
+
var _this6 = this;
|
|
17305
|
+
|
|
17306
|
+
if (!this.hasEvents) {
|
|
17307
|
+
return {};
|
|
17359
17308
|
}
|
|
17360
|
-
}, {
|
|
17361
|
-
key: "getCalculatedValues",
|
|
17362
|
-
value: function getCalculatedValues(props) {
|
|
17363
|
-
var sharedEvents = props.sharedEvents;
|
|
17364
|
-
var components = WrappedComponent.expectedComponents;
|
|
17365
|
-
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
17366
|
-
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
17367
|
-
return undefined;
|
|
17368
|
-
};
|
|
17369
|
-
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
17370
17309
|
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
});
|
|
17310
|
+
var getState = function (key, type) {
|
|
17311
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
17374
17312
|
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
return {
|
|
17378
|
-
componentEvents: componentEvents,
|
|
17379
|
-
getSharedEventState: getSharedEventState,
|
|
17380
|
-
baseProps: baseProps,
|
|
17381
|
-
dataKeys: dataKeys,
|
|
17382
|
-
hasEvents: hasEvents,
|
|
17383
|
-
events: events
|
|
17384
|
-
};
|
|
17385
|
-
}
|
|
17386
|
-
}, {
|
|
17387
|
-
key: "getExternalMutations",
|
|
17388
|
-
value: function getExternalMutations(props) {
|
|
17389
|
-
var sharedEvents = props.sharedEvents,
|
|
17390
|
-
externalEventMutations = props.externalEventMutations;
|
|
17391
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
17392
|
-
}
|
|
17393
|
-
}, {
|
|
17394
|
-
key: "cacheValues",
|
|
17395
|
-
value: function cacheValues(obj) {
|
|
17396
|
-
var _this7 = this;
|
|
17313
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
|
|
17314
|
+
};
|
|
17397
17315
|
|
|
17398
|
-
|
|
17399
|
-
|
|
17400
|
-
|
|
17316
|
+
options = options || {};
|
|
17317
|
+
var components = options.components || defaultComponents;
|
|
17318
|
+
var stateChanges = components.map(function (component) {
|
|
17319
|
+
if (!props.standalone && component.name === "parent") {
|
|
17320
|
+
// don't check for changes on parent props for non-standalone components
|
|
17321
|
+
return undefined;
|
|
17322
|
+
} else {
|
|
17323
|
+
return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
|
|
17324
|
+
return getState(key, component.name);
|
|
17325
|
+
}).filter(Boolean);
|
|
17326
|
+
}
|
|
17327
|
+
}).filter(Boolean);
|
|
17328
|
+
return stateChanges;
|
|
17329
|
+
}
|
|
17330
|
+
}, {
|
|
17331
|
+
key: "applyExternalMutations",
|
|
17332
|
+
value: function applyExternalMutations(props, externalMutations) {
|
|
17333
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
17334
|
+
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
17335
|
+
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
17336
|
+
return memo;
|
|
17337
|
+
}, []);
|
|
17338
|
+
var compiledCallbacks = callbacks.length ? function () {
|
|
17339
|
+
callbacks.forEach(function (c) {
|
|
17340
|
+
return c();
|
|
17341
|
+
});
|
|
17342
|
+
} : undefined;
|
|
17343
|
+
this.setState(externalMutations, compiledCallbacks);
|
|
17401
17344
|
}
|
|
17402
|
-
}
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17345
|
+
}
|
|
17346
|
+
}, {
|
|
17347
|
+
key: "getCalculatedValues",
|
|
17348
|
+
value: function getCalculatedValues(props) {
|
|
17349
|
+
var sharedEvents = props.sharedEvents;
|
|
17350
|
+
var components = WrappedComponent.expectedComponents;
|
|
17351
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
17352
|
+
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
17353
|
+
return undefined;
|
|
17354
|
+
};
|
|
17355
|
+
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
17408
17356
|
|
|
17409
|
-
|
|
17357
|
+
var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
|
|
17358
|
+
return key !== "parent";
|
|
17359
|
+
});
|
|
17410
17360
|
|
|
17411
|
-
|
|
17412
|
-
|
|
17361
|
+
var hasEvents = props.events || props.sharedEvents || componentEvents;
|
|
17362
|
+
var events = this.getAllEvents(props);
|
|
17363
|
+
return {
|
|
17364
|
+
componentEvents: componentEvents,
|
|
17365
|
+
getSharedEventState: getSharedEventState,
|
|
17366
|
+
baseProps: baseProps,
|
|
17367
|
+
dataKeys: dataKeys,
|
|
17368
|
+
hasEvents: hasEvents,
|
|
17369
|
+
events: events
|
|
17370
|
+
};
|
|
17371
|
+
}
|
|
17372
|
+
}, {
|
|
17373
|
+
key: "getExternalMutations",
|
|
17374
|
+
value: function getExternalMutations(props) {
|
|
17375
|
+
var sharedEvents = props.sharedEvents,
|
|
17376
|
+
externalEventMutations = props.externalEventMutations;
|
|
17377
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
17378
|
+
}
|
|
17379
|
+
}, {
|
|
17380
|
+
key: "cacheValues",
|
|
17381
|
+
value: function cacheValues(obj) {
|
|
17382
|
+
var _this7 = this;
|
|
17413
17383
|
|
|
17414
|
-
|
|
17384
|
+
lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
|
|
17385
|
+
_this7[key] = obj[key];
|
|
17386
|
+
});
|
|
17387
|
+
}
|
|
17388
|
+
}, {
|
|
17389
|
+
key: "getBaseProps",
|
|
17390
|
+
value: function getBaseProps(props, getSharedEventState) {
|
|
17391
|
+
getSharedEventState = getSharedEventState || this.getSharedEventState;
|
|
17392
|
+
var sharedParentState = getSharedEventState("parent", "parent");
|
|
17393
|
+
var parentState = this.getEventState("parent", "parent");
|
|
17415
17394
|
|
|
17416
|
-
|
|
17417
|
-
}
|
|
17418
|
-
}, {
|
|
17419
|
-
key: "getAllEvents",
|
|
17420
|
-
value: function getAllEvents(props) {
|
|
17421
|
-
if (Array.isArray(this.componentEvents)) {
|
|
17422
|
-
var _componentEvents;
|
|
17395
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
|
|
17423
17396
|
|
|
17424
|
-
|
|
17425
|
-
|
|
17397
|
+
var parentPropsList = baseParentProps.parentControlledProps;
|
|
17398
|
+
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
|
|
17426
17399
|
|
|
17427
|
-
|
|
17428
|
-
}
|
|
17429
|
-
}, {
|
|
17430
|
-
key: "getComponentProps",
|
|
17431
|
-
value: function getComponentProps(component, type, index) {
|
|
17432
|
-
var name = this.props.name || WrappedComponent.role;
|
|
17433
|
-
var key = this.dataKeys && this.dataKeys[index] || index;
|
|
17434
|
-
var id = "".concat(name, "-").concat(type, "-").concat(key);
|
|
17435
|
-
var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
|
|
17436
|
-
|
|
17437
|
-
if (!baseProps && !this.hasEvents) {
|
|
17438
|
-
return undefined;
|
|
17439
|
-
}
|
|
17400
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
|
|
17440
17401
|
|
|
17441
|
-
|
|
17442
|
-
|
|
17402
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
17403
|
+
}
|
|
17404
|
+
}, {
|
|
17405
|
+
key: "getAllEvents",
|
|
17406
|
+
value: function getAllEvents(props) {
|
|
17407
|
+
if (Array.isArray(this.componentEvents)) {
|
|
17408
|
+
var _componentEvents;
|
|
17443
17409
|
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
key: id
|
|
17447
|
-
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
17448
|
-
id: id
|
|
17449
|
-
});
|
|
17410
|
+
return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
|
|
17411
|
+
}
|
|
17450
17412
|
|
|
17451
|
-
|
|
17413
|
+
return props.events;
|
|
17414
|
+
}
|
|
17415
|
+
}, {
|
|
17416
|
+
key: "getComponentProps",
|
|
17417
|
+
value: function getComponentProps(component, type, index) {
|
|
17418
|
+
var name = this.props.name || WrappedComponent.role;
|
|
17419
|
+
var key = this.dataKeys && this.dataKeys[index] || index;
|
|
17420
|
+
var id = "".concat(name, "-").concat(type, "-").concat(key);
|
|
17421
|
+
var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
|
|
17422
|
+
|
|
17423
|
+
if (!baseProps && !this.hasEvents) {
|
|
17424
|
+
return undefined;
|
|
17425
|
+
}
|
|
17452
17426
|
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
});
|
|
17456
|
-
}
|
|
17427
|
+
if (this.hasEvents) {
|
|
17428
|
+
var baseEvents = this.getEvents(this.props, type, key);
|
|
17457
17429
|
|
|
17458
|
-
|
|
17430
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
|
|
17459
17431
|
index: index,
|
|
17460
17432
|
key: id
|
|
17461
|
-
}, component.props, baseProps, {
|
|
17433
|
+
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
17462
17434
|
id: id
|
|
17463
17435
|
});
|
|
17464
|
-
}
|
|
17465
|
-
}, {
|
|
17466
|
-
key: "renderContainer",
|
|
17467
|
-
value: function renderContainer(component, children) {
|
|
17468
|
-
var isContainer = component.type && component.type.role === "container";
|
|
17469
|
-
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
17470
|
-
|
|
17471
|
-
if (parentProps.events) {
|
|
17472
|
-
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
|
|
17473
|
-
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
|
|
17474
|
-
}
|
|
17475
17436
|
|
|
17476
|
-
|
|
17437
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
17438
|
+
|
|
17439
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
|
|
17440
|
+
events: events
|
|
17441
|
+
});
|
|
17477
17442
|
}
|
|
17478
|
-
}, {
|
|
17479
|
-
key: "animateComponent",
|
|
17480
|
-
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
17481
|
-
var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
|
|
17482
|
-
return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
|
|
17483
|
-
animate: props.animate,
|
|
17484
|
-
animationWhitelist: animationWhitelist
|
|
17485
|
-
}, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
|
|
17486
|
-
} // Used by `VictoryLine` and `VictoryArea`
|
|
17487
|
-
|
|
17488
|
-
}, {
|
|
17489
|
-
key: "renderContinuousData",
|
|
17490
|
-
value: function renderContinuousData(props) {
|
|
17491
|
-
var _this8 = this;
|
|
17492
|
-
|
|
17493
|
-
var dataComponent = props.dataComponent,
|
|
17494
|
-
labelComponent = props.labelComponent,
|
|
17495
|
-
groupComponent = props.groupComponent;
|
|
17496
|
-
|
|
17497
|
-
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
|
|
17498
|
-
|
|
17499
|
-
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
17500
|
-
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
17501
|
-
|
|
17502
|
-
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
17503
|
-
memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
|
|
17504
|
-
}
|
|
17505
17443
|
|
|
17506
|
-
|
|
17507
|
-
|
|
17508
|
-
|
|
17509
|
-
|
|
17510
|
-
|
|
17444
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
|
|
17445
|
+
index: index,
|
|
17446
|
+
key: id
|
|
17447
|
+
}, component.props, baseProps, {
|
|
17448
|
+
id: id
|
|
17449
|
+
});
|
|
17450
|
+
}
|
|
17451
|
+
}, {
|
|
17452
|
+
key: "renderContainer",
|
|
17453
|
+
value: function renderContainer(component, children) {
|
|
17454
|
+
var isContainer = component.type && component.type.role === "container";
|
|
17455
|
+
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
17456
|
+
|
|
17457
|
+
if (parentProps.events) {
|
|
17458
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
|
|
17459
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
|
|
17511
17460
|
}
|
|
17512
|
-
}, {
|
|
17513
|
-
key: "renderData",
|
|
17514
|
-
value: function renderData(props) {
|
|
17515
|
-
var _this9 = this;
|
|
17516
|
-
|
|
17517
|
-
var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
|
|
17518
|
-
var dataComponent = props.dataComponent,
|
|
17519
|
-
labelComponent = props.labelComponent,
|
|
17520
|
-
groupComponent = props.groupComponent;
|
|
17521
|
-
var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
|
|
17522
|
-
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
17523
|
-
|
|
17524
|
-
if (shouldRenderDatum(dataProps.datum)) {
|
|
17525
|
-
validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
|
|
17526
|
-
}
|
|
17527
17461
|
|
|
17528
|
-
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17462
|
+
return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
|
|
17463
|
+
}
|
|
17464
|
+
}, {
|
|
17465
|
+
key: "animateComponent",
|
|
17466
|
+
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
17467
|
+
var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
|
|
17468
|
+
return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
|
|
17469
|
+
animate: props.animate,
|
|
17470
|
+
animationWhitelist: animationWhitelist
|
|
17471
|
+
}, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
|
|
17472
|
+
} // Used by `VictoryLine` and `VictoryArea`
|
|
17473
|
+
|
|
17474
|
+
}, {
|
|
17475
|
+
key: "renderContinuousData",
|
|
17476
|
+
value: function renderContinuousData(props) {
|
|
17477
|
+
var _this8 = this;
|
|
17478
|
+
|
|
17479
|
+
var dataComponent = props.dataComponent,
|
|
17480
|
+
labelComponent = props.labelComponent,
|
|
17481
|
+
groupComponent = props.groupComponent;
|
|
17482
|
+
|
|
17483
|
+
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
|
|
17484
|
+
|
|
17485
|
+
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
17486
|
+
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
17487
|
+
|
|
17488
|
+
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
17489
|
+
memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
|
|
17490
|
+
}
|
|
17532
17491
|
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
|
|
17492
|
+
return memo;
|
|
17493
|
+
}, []);
|
|
17494
|
+
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
17495
|
+
var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
17496
|
+
return this.renderContainer(groupComponent, children);
|
|
17497
|
+
}
|
|
17498
|
+
}, {
|
|
17499
|
+
key: "renderData",
|
|
17500
|
+
value: function renderData(props) {
|
|
17501
|
+
var _this9 = this;
|
|
17502
|
+
|
|
17503
|
+
var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
|
|
17504
|
+
var dataComponent = props.dataComponent,
|
|
17505
|
+
labelComponent = props.labelComponent,
|
|
17506
|
+
groupComponent = props.groupComponent;
|
|
17507
|
+
var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
|
|
17508
|
+
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
17509
|
+
|
|
17510
|
+
if (shouldRenderDatum(dataProps.datum)) {
|
|
17511
|
+
validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
|
|
17512
|
+
}
|
|
17536
17513
|
|
|
17537
|
-
|
|
17538
|
-
|
|
17514
|
+
return validDataComponents;
|
|
17515
|
+
}, []);
|
|
17516
|
+
var labelComponents = this.dataKeys.map(function (_dataKey, index) {
|
|
17517
|
+
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
17539
17518
|
|
|
17540
|
-
|
|
17519
|
+
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
17520
|
+
return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
|
|
17521
|
+
}
|
|
17541
17522
|
|
|
17542
|
-
return
|
|
17543
|
-
}
|
|
17544
|
-
|
|
17523
|
+
return undefined;
|
|
17524
|
+
}).filter(Boolean);
|
|
17525
|
+
|
|
17526
|
+
var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
|
|
17527
|
+
|
|
17528
|
+
return this.renderContainer(groupComponent, children);
|
|
17529
|
+
}
|
|
17530
|
+
}]);
|
|
17545
17531
|
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
);
|
|
17532
|
+
return addEvents;
|
|
17533
|
+
}(WrappedComponent);
|
|
17549
17534
|
});
|
|
17550
17535
|
|
|
17551
17536
|
/***/ }),
|
|
@@ -21302,9 +21287,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
21302
21287
|
|
|
21303
21288
|
|
|
21304
21289
|
|
|
21305
|
-
var Timer =
|
|
21306
|
-
/*#__PURE__*/
|
|
21307
|
-
function () {
|
|
21290
|
+
var Timer = /*#__PURE__*/function () {
|
|
21308
21291
|
function Timer() {
|
|
21309
21292
|
_classCallCheck(this, Timer);
|
|
21310
21293
|
|