victory-create-container 37.3.1 → 37.3.2
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/CHANGELOG.md
CHANGED
|
@@ -6743,7 +6743,6 @@ const Helpers = {
|
|
|
6743
6743
|
return xMoved || yMoved;
|
|
6744
6744
|
}
|
|
6745
6745
|
},
|
|
6746
|
-
// eslint-disable-next-line max-statements, complexity
|
|
6747
6746
|
onMouseDown(evt, targetProps) {
|
|
6748
6747
|
evt.preventDefault();
|
|
6749
6748
|
const {
|
|
@@ -6836,7 +6835,6 @@ const Helpers = {
|
|
|
6836
6835
|
})
|
|
6837
6836
|
}] : {};
|
|
6838
6837
|
},
|
|
6839
|
-
// eslint-disable-next-line max-statements, complexity
|
|
6840
6838
|
onGlobalMouseMove(evt, targetProps) {
|
|
6841
6839
|
const {
|
|
6842
6840
|
scale,
|
|
@@ -6923,13 +6921,11 @@ const Helpers = {
|
|
|
6923
6921
|
}
|
|
6924
6922
|
return {};
|
|
6925
6923
|
},
|
|
6926
|
-
// eslint-disable-next-line complexity
|
|
6927
6924
|
onGlobalMouseUp(evt, targetProps) {
|
|
6928
6925
|
// if a panning or selection has not been started, ignore the event
|
|
6929
6926
|
if (!targetProps.isPanning && !targetProps.isSelecting) {
|
|
6930
6927
|
return {};
|
|
6931
6928
|
}
|
|
6932
|
-
// eslint-disable-line max-statements, complexity
|
|
6933
6929
|
const {
|
|
6934
6930
|
x1,
|
|
6935
6931
|
y1,
|
|
@@ -7512,9 +7508,9 @@ const VictoryContainer = initialProps => {
|
|
|
7512
7508
|
...style,
|
|
7513
7509
|
width: responsive ? style?.width : dimensions.width,
|
|
7514
7510
|
height: responsive ? style?.height : dimensions.height,
|
|
7515
|
-
pointerEvents: "none",
|
|
7516
|
-
touchAction: "none",
|
|
7517
|
-
position: "relative"
|
|
7511
|
+
pointerEvents: style?.pointerEvents ?? "none",
|
|
7512
|
+
touchAction: style?.touchAction ?? "none",
|
|
7513
|
+
position: style?.position ?? "relative"
|
|
7518
7514
|
},
|
|
7519
7515
|
"data-ouia-component-id": ouiaId,
|
|
7520
7516
|
"data-ouia-component-type": ouiaType,
|
|
@@ -10005,7 +10001,7 @@ function getTicks(props, scale, filterZero) {
|
|
|
10005
10001
|
* @param {String} axis: either x or y
|
|
10006
10002
|
* @returns {Array} returns a domain from tickValues
|
|
10007
10003
|
*/
|
|
10008
|
-
|
|
10004
|
+
|
|
10009
10005
|
function getDomainFromData(props, axis) {
|
|
10010
10006
|
const {
|
|
10011
10007
|
polar,
|
|
@@ -10202,7 +10198,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10202
10198
|
|
|
10203
10199
|
|
|
10204
10200
|
|
|
10205
|
-
/* eslint-disable no-use-before-define */
|
|
10206
10201
|
|
|
10207
10202
|
|
|
10208
10203
|
|
|
@@ -10328,8 +10323,6 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
10328
10323
|
const isUnderMinY = underMin(minDomainY);
|
|
10329
10324
|
const isOverMaxX = overMax(maxDomainX);
|
|
10330
10325
|
const isOverMaxY = overMax(maxDomainY);
|
|
10331
|
-
|
|
10332
|
-
// eslint-disable-next-line complexity
|
|
10333
10326
|
return dataset.map(datum => {
|
|
10334
10327
|
let {
|
|
10335
10328
|
_x,
|
|
@@ -10440,7 +10433,6 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
10440
10433
|
};
|
|
10441
10434
|
}
|
|
10442
10435
|
const data = preformattedData ? dataset : dataset.reduce((dataArr, datum, index) => {
|
|
10443
|
-
// eslint-disable-line complexity
|
|
10444
10436
|
const parsedDatum = parseDatum(datum);
|
|
10445
10437
|
const fallbackValues = {
|
|
10446
10438
|
x: index,
|
|
@@ -10633,7 +10625,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10633
10625
|
|
|
10634
10626
|
|
|
10635
10627
|
|
|
10636
|
-
/* eslint-disable no-use-before-define */
|
|
10637
10628
|
|
|
10638
10629
|
|
|
10639
10630
|
|
|
@@ -10689,8 +10680,6 @@ function getExtremeFromData(dataset, axis, type) {
|
|
|
10689
10680
|
}, initialValue);
|
|
10690
10681
|
return containsDate ? new Date(result) : result;
|
|
10691
10682
|
}
|
|
10692
|
-
|
|
10693
|
-
// eslint-disable-next-line max-statements
|
|
10694
10683
|
function padDomain(domain, props, axis) {
|
|
10695
10684
|
if (!props.domainPadding) {
|
|
10696
10685
|
return domain;
|
|
@@ -11026,7 +11015,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11026
11015
|
|
|
11027
11016
|
|
|
11028
11017
|
|
|
11029
|
-
/* eslint-disable no-use-before-define */
|
|
11030
11018
|
|
|
11031
11019
|
const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
11032
11020
|
|
|
@@ -11074,11 +11062,10 @@ getScopedEvents) {
|
|
|
11074
11062
|
*/
|
|
11075
11063
|
const getAllEvents = () => {
|
|
11076
11064
|
// Mandatory usage: `getEvents.bind(this)`
|
|
11077
|
-
|
|
11065
|
+
|
|
11078
11066
|
if (Array.isArray(this.componentEvents)) {
|
|
11079
11067
|
return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
|
|
11080
11068
|
}
|
|
11081
|
-
/* eslint-enable no-invalid-this */
|
|
11082
11069
|
return props.events;
|
|
11083
11070
|
};
|
|
11084
11071
|
const allEvents = getAllEvents();
|
|
@@ -11103,7 +11090,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11103
11090
|
}
|
|
11104
11091
|
|
|
11105
11092
|
// Mandatory usage: `getScopedEvents.bind(this)`
|
|
11106
|
-
|
|
11093
|
+
|
|
11107
11094
|
const newBaseProps = baseProps || this.baseProps;
|
|
11108
11095
|
// returns the original base props or base state of a given target element
|
|
11109
11096
|
const getTargetProps = (identifier, type) => {
|
|
@@ -11112,7 +11099,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11112
11099
|
target,
|
|
11113
11100
|
key
|
|
11114
11101
|
} = identifier;
|
|
11115
|
-
// eslint-disable-next-line no-invalid-this
|
|
11116
11102
|
const baseType = type === "props" ? newBaseProps : this.state || {};
|
|
11117
11103
|
const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
|
|
11118
11104
|
return key === "parent" ? base.parent : base[key] && base[key][target];
|
|
@@ -11139,7 +11125,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11139
11125
|
|
|
11140
11126
|
// returns the state object with mutated props applied for a single key
|
|
11141
11127
|
const getMutationObject = (key, childName) => {
|
|
11142
|
-
// eslint-disable-next-line no-invalid-this
|
|
11143
11128
|
const baseState = this.state || {};
|
|
11144
11129
|
if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
|
|
11145
11130
|
return baseState;
|
|
@@ -11212,11 +11197,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11212
11197
|
// into a state mutation, and calls setState
|
|
11213
11198
|
// eslint-disable-next-line max-params
|
|
11214
11199
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
11215
|
-
// eslint-disable-next-line no-invalid-this
|
|
11216
11200
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
11217
11201
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(eventReturn)) {
|
|
11218
11202
|
const callbacks = compileCallbacks(eventReturn);
|
|
11219
|
-
// eslint-disable-next-line no-invalid-this
|
|
11220
11203
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
11221
11204
|
}
|
|
11222
11205
|
};
|
|
@@ -11246,7 +11229,7 @@ function getPartialEvents(events, eventKey, childProps) {
|
|
|
11246
11229
|
// eslint-disable-next-line max-params
|
|
11247
11230
|
function getEventState(eventKey, namespace, childType) {
|
|
11248
11231
|
// Mandatory usage: `getEventState.bind(this)`
|
|
11249
|
-
|
|
11232
|
+
|
|
11250
11233
|
const state = this.state || {};
|
|
11251
11234
|
if (!childType) {
|
|
11252
11235
|
return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
|
|
@@ -11439,7 +11422,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11439
11422
|
|
|
11440
11423
|
|
|
11441
11424
|
|
|
11442
|
-
/* eslint-disable no-use-before-define */
|
|
11443
11425
|
|
|
11444
11426
|
// Private Functions
|
|
11445
11427
|
|
|
@@ -11908,7 +11890,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11908
11890
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
11909
11891
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
11910
11892
|
|
|
11911
|
-
/* eslint-disable no-use-before-define */
|
|
11912
11893
|
|
|
11913
11894
|
// Private Functions
|
|
11914
11895
|
|
|
@@ -12228,7 +12209,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12228
12209
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
12229
12210
|
/* harmony import */ var victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-vendor/d3-scale */ "../../victory-vendor/es/d3-scale.js");
|
|
12230
12211
|
|
|
12231
|
-
/* eslint-disable no-use-before-define */
|
|
12232
12212
|
|
|
12233
12213
|
|
|
12234
12214
|
|
|
@@ -13235,7 +13215,6 @@ function getDefaultDomainPadding(props, axis, childComponents) {
|
|
|
13235
13215
|
};
|
|
13236
13216
|
}
|
|
13237
13217
|
function getDomainFromChildren(props, axis, childComponents) {
|
|
13238
|
-
// eslint-disable-line max-statements, complexity, max-len
|
|
13239
13218
|
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(props.children);
|
|
13240
13219
|
const parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_7__.getData(props) : undefined;
|
|
13241
13220
|
const {
|
|
@@ -13593,7 +13572,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13593
13572
|
/* harmony import */ var _cursor_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cursor-helpers */ "../../victory-cursor-container/es/cursor-helpers.js");
|
|
13594
13573
|
|
|
13595
13574
|
|
|
13596
|
-
/* eslint-disable complexity */
|
|
13597
13575
|
|
|
13598
13576
|
|
|
13599
13577
|
|
|
@@ -13656,7 +13634,6 @@ const useVictoryCursorContainer = initialProps => {
|
|
|
13656
13634
|
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(props);
|
|
13657
13635
|
};
|
|
13658
13636
|
const getCursorElements = () => {
|
|
13659
|
-
// eslint-disable-line max-statements
|
|
13660
13637
|
const {
|
|
13661
13638
|
scale,
|
|
13662
13639
|
cursorLabelComponent,
|
|
@@ -14581,8 +14558,6 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14581
14558
|
y: Math.round(y + adjustments.y[0] - adjustments.y[1])
|
|
14582
14559
|
};
|
|
14583
14560
|
}
|
|
14584
|
-
|
|
14585
|
-
// eslint-disable-next-line complexity
|
|
14586
14561
|
getFlyoutCenter(props, dimensions) {
|
|
14587
14562
|
const {
|
|
14588
14563
|
x,
|
|
@@ -14857,7 +14832,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14857
14832
|
/* harmony import */ var _voronoi_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./voronoi-helpers */ "../../victory-voronoi-container/es/voronoi-helpers.js");
|
|
14858
14833
|
|
|
14859
14834
|
|
|
14860
|
-
/* eslint-disable react/no-multi-comp */
|
|
14861
14835
|
|
|
14862
14836
|
|
|
14863
14837
|
|
|
@@ -15306,7 +15280,6 @@ class VoronoiHelpersClass {
|
|
|
15306
15280
|
return this.getParentMutation([]).concat(...inactiveMutations);
|
|
15307
15281
|
};
|
|
15308
15282
|
handleMouseMove = (evt, targetProps) => {
|
|
15309
|
-
// eslint-disable-line max-statements
|
|
15310
15283
|
const activePoints = targetProps.activePoints || [];
|
|
15311
15284
|
const parentSVG = targetProps.parentSVG || victory_core__WEBPACK_IMPORTED_MODULE_9__.getParentSVG(evt);
|
|
15312
15285
|
const mousePosition = victory_core__WEBPACK_IMPORTED_MODULE_9__.getSVGEventCoordinates(evt, parentSVG);
|
|
@@ -15767,7 +15740,7 @@ const RawZoomHelpers = {
|
|
|
15767
15740
|
}
|
|
15768
15741
|
}];
|
|
15769
15742
|
},
|
|
15770
|
-
// eslint-disable-next-line max-params
|
|
15743
|
+
// eslint-disable-next-line max-params
|
|
15771
15744
|
onMouseMove(evt, targetProps, eventKey, ctx) {
|
|
15772
15745
|
if (targetProps.panning && targetProps.allowPan) {
|
|
15773
15746
|
const {
|