victory-create-container 37.3.2 → 37.3.4
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 +8 -0
- package/dist/victory-create-container.js +437 -385
- package/dist/victory-create-container.min.js +1 -1
- package/es/create-container.d.ts +2 -2
- package/es/create-container.js +9 -9
- package/lib/create-container.d.ts +2 -2
- package/lib/create-container.js +9 -9
- package/package.json +7 -35
- package/src/create-container.tsx +11 -2
|
@@ -23,18 +23,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23
23
|
/* harmony export */ "createContainer": function() { return /* binding */ createContainer; },
|
|
24
24
|
/* harmony export */ "makeCreateContainerFunction": function() { return /* binding */ makeCreateContainerFunction; }
|
|
25
25
|
/* harmony export */ });
|
|
26
|
-
/* harmony import */ var
|
|
27
|
-
/* harmony import */ var
|
|
28
|
-
/* harmony import */ var
|
|
29
|
-
/* harmony import */ var
|
|
26
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
27
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
28
|
+
/* harmony import */ var lodash_forOwn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/forOwn */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/forOwn.js");
|
|
29
|
+
/* harmony import */ var lodash_forOwn__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_forOwn__WEBPACK_IMPORTED_MODULE_1__);
|
|
30
30
|
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/groupBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/groupBy.js");
|
|
31
31
|
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
32
|
-
/* harmony import */ var
|
|
33
|
-
/* harmony import */ var
|
|
32
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
33
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3__);
|
|
34
|
+
/* harmony import */ var lodash_toPairs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/toPairs */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toPairs.js");
|
|
35
|
+
/* harmony import */ var lodash_toPairs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_toPairs__WEBPACK_IMPORTED_MODULE_4__);
|
|
34
36
|
/* harmony import */ var victory_zoom_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-zoom-container */ "../../victory-zoom-container/es/victory-zoom-container.js");
|
|
35
37
|
/* harmony import */ var victory_selection_container__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-selection-container */ "../../victory-selection-container/es/victory-selection-container.js");
|
|
36
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
|
|
37
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
38
38
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
39
39
|
/* harmony import */ var victory_voronoi_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-voronoi-container */ "../../victory-voronoi-container/es/victory-voronoi-container.js");
|
|
40
40
|
/* harmony import */ var victory_cursor_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-cursor-container */ "../../victory-cursor-container/es/victory-cursor-container.js");
|
|
@@ -62,7 +62,7 @@ const combineEventHandlers = eventHandlersArray => {
|
|
|
62
62
|
// takes an array of event handler objects and produces one eventHandlers object
|
|
63
63
|
// creates a custom combinedHandler() for events with multiple conflicting handlers
|
|
64
64
|
return eventHandlersArray.reduce((localHandlers, finalHandlers) => {
|
|
65
|
-
|
|
65
|
+
lodash_forOwn__WEBPACK_IMPORTED_MODULE_1___default()(localHandlers, (localHandler, eventName) => {
|
|
66
66
|
const existingHandler = finalHandlers[eventName];
|
|
67
67
|
if (existingHandler) {
|
|
68
68
|
// create new handler for event that concats the existing handler's mutations with new ones
|
|
@@ -84,10 +84,10 @@ const combineDefaultEvents = defaultEvents => {
|
|
|
84
84
|
// takes a defaultEvents array and returns one equal or lesser length,
|
|
85
85
|
// by combining any events that have the same target
|
|
86
86
|
const eventsByTarget = lodash_groupBy__WEBPACK_IMPORTED_MODULE_2___default()(defaultEvents, "target");
|
|
87
|
-
const events =
|
|
87
|
+
const events = lodash_toPairs__WEBPACK_IMPORTED_MODULE_4___default()(eventsByTarget).map(_ref => {
|
|
88
88
|
let [target, eventsArray] = _ref;
|
|
89
89
|
const newEventsArray = eventsArray.filter(Boolean);
|
|
90
|
-
return
|
|
90
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(newEventsArray) ? null : {
|
|
91
91
|
target,
|
|
92
92
|
eventHandlers: combineEventHandlers(eventsArray.map(event => event.eventHandlers))
|
|
93
93
|
// note: does not currently handle eventKey or childName
|
|
@@ -140,7 +140,7 @@ function makeCreateContainerFunction(containerComponents, VictoryContainerBase)
|
|
|
140
140
|
...propsA,
|
|
141
141
|
children: childrenA
|
|
142
142
|
});
|
|
143
|
-
return /*#__PURE__*/
|
|
143
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(VictoryContainerBase, combinedProps, combinedChildren);
|
|
144
144
|
};
|
|
145
145
|
CombinedContainer.displayName = `Victory${containerA}${containerB}Container`;
|
|
146
146
|
CombinedContainer.role = "container";
|
|
@@ -6999,14 +6999,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6999
6999
|
/* harmony export */ "VictoryBrushContainer": function() { return /* binding */ VictoryBrushContainer; },
|
|
7000
7000
|
/* harmony export */ "useVictoryBrushContainer": function() { return /* binding */ useVictoryBrushContainer; }
|
|
7001
7001
|
/* harmony export */ });
|
|
7002
|
-
/* harmony import */ var
|
|
7003
|
-
/* harmony import */ var
|
|
7004
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
7005
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
7002
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7003
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7006
7004
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/rect.js");
|
|
7007
7005
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
|
|
7008
7006
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
7009
7007
|
/* harmony import */ var _brush_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./brush-helpers */ "../../victory-brush-container/es/brush-helpers.js");
|
|
7008
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
7009
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7010
7010
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
|
|
7011
7011
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_2__);
|
|
7012
7012
|
|
|
@@ -7018,13 +7018,13 @@ const VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS = {
|
|
|
7018
7018
|
allowDrag: true,
|
|
7019
7019
|
allowDraw: true,
|
|
7020
7020
|
allowResize: true,
|
|
7021
|
-
brushComponent: /*#__PURE__*/
|
|
7021
|
+
brushComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
7022
7022
|
brushStyle: {
|
|
7023
7023
|
stroke: "transparent",
|
|
7024
7024
|
fill: "black",
|
|
7025
7025
|
fillOpacity: 0.1
|
|
7026
7026
|
},
|
|
7027
|
-
handleComponent: /*#__PURE__*/
|
|
7027
|
+
handleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
7028
7028
|
handleStyle: {
|
|
7029
7029
|
stroke: "transparent",
|
|
7030
7030
|
fill: "transparent"
|
|
@@ -7052,14 +7052,14 @@ const useVictoryBrushContainer = initialProps => {
|
|
|
7052
7052
|
} = props;
|
|
7053
7053
|
const brushComponentStyle = brushComponent.props && brushComponent.props.style;
|
|
7054
7054
|
const cursor = !props.allowDrag && !props.allowResize ? "auto" : "move";
|
|
7055
|
-
return x[0] !== x[1] && y[0] !== y[1] ? /*#__PURE__*/
|
|
7055
|
+
return x[0] !== x[1] && y[0] !== y[1] ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(brushComponent, {
|
|
7056
7056
|
key: `${name}-brush`,
|
|
7057
7057
|
width: Math.abs(x[1] - x[0]) || 1,
|
|
7058
7058
|
height: Math.abs(y[1] - y[0]) || 1,
|
|
7059
7059
|
x: Math.min(x[0], x[1]),
|
|
7060
7060
|
y: Math.min(y[0], y[1]),
|
|
7061
7061
|
cursor,
|
|
7062
|
-
style:
|
|
7062
|
+
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, brushComponentStyle, brushStyle)
|
|
7063
7063
|
}) : null;
|
|
7064
7064
|
};
|
|
7065
7065
|
const getCursorPointers = () => {
|
|
@@ -7099,7 +7099,7 @@ const useVictoryBrushContainer = initialProps => {
|
|
|
7099
7099
|
const width = Math.abs(x2 - x1) || 1;
|
|
7100
7100
|
const height = Math.abs(y2 - y1) || 1;
|
|
7101
7101
|
const handleComponentStyle = handleComponent.props && handleComponent.props.style || {};
|
|
7102
|
-
const style =
|
|
7102
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, handleComponentStyle, handleStyle);
|
|
7103
7103
|
const cursors = getCursorPointers();
|
|
7104
7104
|
const yProps = {
|
|
7105
7105
|
style,
|
|
@@ -7131,7 +7131,7 @@ const useVictoryBrushContainer = initialProps => {
|
|
|
7131
7131
|
x: right.x1
|
|
7132
7132
|
}, xProps)
|
|
7133
7133
|
};
|
|
7134
|
-
const handles = ["top", "bottom", "left", "right"].reduce((memo, curr) => handleProps[curr] ? memo.concat( /*#__PURE__*/
|
|
7134
|
+
const handles = ["top", "bottom", "left", "right"].reduce((memo, curr) => handleProps[curr] ? memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(handleComponent, Object.assign({
|
|
7135
7135
|
key: `${name}-handle-${curr}`
|
|
7136
7136
|
}, handleProps[curr]))) : memo, []);
|
|
7137
7137
|
return handles.length ? handles : null;
|
|
@@ -7141,15 +7141,15 @@ const useVictoryBrushContainer = initialProps => {
|
|
|
7141
7141
|
currentDomain,
|
|
7142
7142
|
cachedBrushDomain
|
|
7143
7143
|
} = props;
|
|
7144
|
-
const brushDomain =
|
|
7145
|
-
const domain = react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default()(brushDomain, cachedBrushDomain) ?
|
|
7144
|
+
const brushDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.brushDomain, props.domain);
|
|
7145
|
+
const domain = react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default()(brushDomain, cachedBrushDomain) ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, currentDomain, brushDomain) : brushDomain;
|
|
7146
7146
|
const coordinates = victory_core__WEBPACK_IMPORTED_MODULE_5__.getDomainCoordinates(props, domain);
|
|
7147
7147
|
const selectBox = getSelectBox(coordinates);
|
|
7148
7148
|
return selectBox ? [selectBox, getHandles(domain)] : [];
|
|
7149
7149
|
};
|
|
7150
7150
|
return {
|
|
7151
7151
|
props,
|
|
7152
|
-
children: [...
|
|
7152
|
+
children: [...react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children), ...getRect()]
|
|
7153
7153
|
};
|
|
7154
7154
|
};
|
|
7155
7155
|
const VictoryBrushContainer = initialProps => {
|
|
@@ -7157,7 +7157,7 @@ const VictoryBrushContainer = initialProps => {
|
|
|
7157
7157
|
props,
|
|
7158
7158
|
children
|
|
7159
7159
|
} = useVictoryBrushContainer(initialProps);
|
|
7160
|
-
return /*#__PURE__*/
|
|
7160
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_6__.VictoryContainer, props, children);
|
|
7161
7161
|
};
|
|
7162
7162
|
VictoryBrushContainer.role = "container";
|
|
7163
7163
|
VictoryBrushContainer.defaultEvents = initialProps => {
|
|
@@ -7198,20 +7198,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7198
7198
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7199
7199
|
/* harmony export */ "VictoryClipContainer": function() { return /* binding */ VictoryClipContainer; }
|
|
7200
7200
|
/* harmony export */ });
|
|
7201
|
-
/* harmony import */ var
|
|
7202
|
-
/* harmony import */ var
|
|
7203
|
-
/* harmony import */ var
|
|
7204
|
-
/* harmony import */ var
|
|
7205
|
-
/* harmony import */ var
|
|
7206
|
-
/* harmony import */ var
|
|
7207
|
-
/* harmony import */ var
|
|
7208
|
-
/* harmony import */ var
|
|
7209
|
-
/* harmony import */ var
|
|
7210
|
-
/* harmony import */ var
|
|
7211
|
-
/* harmony import */ var
|
|
7212
|
-
/* harmony import */ var _victory_primitives_circle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-primitives/circle */ "../../victory-core/es/victory-primitives/circle.js");
|
|
7213
|
-
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-primitives/rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
7214
|
-
|
|
7201
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7202
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7203
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
7204
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7205
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
7206
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
7207
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7208
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
7209
|
+
/* harmony import */ var _victory_primitives_clip_path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-primitives/clip-path */ "../../victory-core/es/victory-primitives/clip-path.js");
|
|
7210
|
+
/* harmony import */ var _victory_primitives_circle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-primitives/circle */ "../../victory-core/es/victory-primitives/circle.js");
|
|
7211
|
+
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-primitives/rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
7215
7212
|
|
|
7216
7213
|
|
|
7217
7214
|
|
|
@@ -7220,18 +7217,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7220
7217
|
|
|
7221
7218
|
|
|
7222
7219
|
|
|
7223
|
-
class VictoryClipContainer extends (
|
|
7220
|
+
class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
7224
7221
|
static displayName = "VictoryClipContainer";
|
|
7225
7222
|
static role = "container";
|
|
7226
7223
|
static defaultProps = {
|
|
7227
|
-
circleComponent: /*#__PURE__*/
|
|
7228
|
-
rectComponent: /*#__PURE__*/
|
|
7229
|
-
clipPathComponent: /*#__PURE__*/
|
|
7230
|
-
groupComponent: /*#__PURE__*/
|
|
7224
|
+
circleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_circle__WEBPACK_IMPORTED_MODULE_3__.Circle, null),
|
|
7225
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_4__.Rect, null),
|
|
7226
|
+
clipPathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_clip_path__WEBPACK_IMPORTED_MODULE_5__.ClipPath, null),
|
|
7227
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
7231
7228
|
};
|
|
7232
7229
|
constructor(props) {
|
|
7233
7230
|
super(props);
|
|
7234
|
-
this.
|
|
7231
|
+
this.state = {
|
|
7232
|
+
clipId: props?.clipId
|
|
7233
|
+
};
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7236
|
+
// The clipId state is used to prevent hydration mismatches between the server and client (issue #2941).
|
|
7237
|
+
// A better alternative would be to utilize React 18's useId hook instead of uniqueId, which would avoid needing state for this purpose.
|
|
7238
|
+
// However, this component currently supports React 16 at the time of writing, so this workaround is necessary.
|
|
7239
|
+
componentDidMount() {
|
|
7240
|
+
if (!this.state.clipId) {
|
|
7241
|
+
this.setState({
|
|
7242
|
+
clipId: lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()("victory-clip-")
|
|
7243
|
+
});
|
|
7244
|
+
}
|
|
7235
7245
|
}
|
|
7236
7246
|
calculateAttributes(props) {
|
|
7237
7247
|
const {
|
|
@@ -7242,10 +7252,8 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7242
7252
|
translateX = 0,
|
|
7243
7253
|
translateY = 0
|
|
7244
7254
|
} = props;
|
|
7245
|
-
const clipPadding =
|
|
7246
|
-
|
|
7247
|
-
});
|
|
7248
|
-
const radius = props.radius || _victory_util_helpers__WEBPACK_IMPORTED_MODULE_7__.getRadius(props);
|
|
7255
|
+
const clipPadding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getPadding(props.clipPadding);
|
|
7256
|
+
const radius = props.radius || _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRadius(props);
|
|
7249
7257
|
return {
|
|
7250
7258
|
x: (polar ? origin.x : translateX) - clipPadding.left,
|
|
7251
7259
|
y: (polar ? origin.y : translateY) - clipPadding.top,
|
|
@@ -7254,7 +7262,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7254
7262
|
};
|
|
7255
7263
|
}
|
|
7256
7264
|
renderClippedGroup(props, clipId) {
|
|
7257
|
-
const userProps =
|
|
7265
|
+
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__.getSafeUserProps(props);
|
|
7258
7266
|
const {
|
|
7259
7267
|
style,
|
|
7260
7268
|
events,
|
|
@@ -7272,11 +7280,11 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7272
7280
|
key: `clipped-group-${clipId}`,
|
|
7273
7281
|
clipPath: `url(#${clipId})`
|
|
7274
7282
|
}, events);
|
|
7275
|
-
return /*#__PURE__*/
|
|
7283
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(groupComponent, {
|
|
7276
7284
|
...groupProps,
|
|
7277
7285
|
tabIndex,
|
|
7278
7286
|
...userProps
|
|
7279
|
-
}, [clipComponent, ...
|
|
7287
|
+
}, [clipComponent, ...react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children)]);
|
|
7280
7288
|
}
|
|
7281
7289
|
renderGroup(props) {
|
|
7282
7290
|
const {
|
|
@@ -7288,7 +7296,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7288
7296
|
groupComponent,
|
|
7289
7297
|
tabIndex
|
|
7290
7298
|
} = props;
|
|
7291
|
-
return /*#__PURE__*/
|
|
7299
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(groupComponent, Object.assign({
|
|
7292
7300
|
className,
|
|
7293
7301
|
style,
|
|
7294
7302
|
transform,
|
|
@@ -7313,18 +7321,16 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7313
7321
|
bottom,
|
|
7314
7322
|
left,
|
|
7315
7323
|
right
|
|
7316
|
-
} =
|
|
7317
|
-
padding: props.clipPadding
|
|
7318
|
-
});
|
|
7324
|
+
} = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getPadding(props.clipPadding);
|
|
7319
7325
|
let child;
|
|
7320
7326
|
if (polar) {
|
|
7321
|
-
const radius = props.radius ||
|
|
7327
|
+
const radius = props.radius || _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRadius(props);
|
|
7322
7328
|
const circleProps = {
|
|
7323
7329
|
r: Math.max(radius + left + right, radius + top + bottom, 0),
|
|
7324
7330
|
cx: origin.x - left,
|
|
7325
7331
|
cy: origin.y - top
|
|
7326
7332
|
};
|
|
7327
|
-
child = /*#__PURE__*/
|
|
7333
|
+
child = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(circleComponent, circleProps);
|
|
7328
7334
|
} else {
|
|
7329
7335
|
const rectProps = {
|
|
7330
7336
|
x: translateX - left,
|
|
@@ -7332,9 +7338,9 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7332
7338
|
width: Math.max(clipWidth + left + right, 0),
|
|
7333
7339
|
height: Math.max(clipHeight + top + bottom, 0)
|
|
7334
7340
|
};
|
|
7335
|
-
child = /*#__PURE__*/
|
|
7341
|
+
child = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(rectComponent, rectProps);
|
|
7336
7342
|
}
|
|
7337
|
-
return /*#__PURE__*/
|
|
7343
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(clipPathComponent, Object.assign({
|
|
7338
7344
|
key: `clip-path-${clipId}`
|
|
7339
7345
|
}, props, {
|
|
7340
7346
|
clipId
|
|
@@ -7348,7 +7354,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7348
7354
|
if (clipValues[axis] !== undefined) {
|
|
7349
7355
|
return clipValues[axis];
|
|
7350
7356
|
}
|
|
7351
|
-
const range =
|
|
7357
|
+
const range = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRange(props, axis);
|
|
7352
7358
|
return range ? Math.abs(range[0] - range[1]) || undefined : undefined;
|
|
7353
7359
|
}
|
|
7354
7360
|
getTranslateValue(props, axis) {
|
|
@@ -7359,7 +7365,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7359
7365
|
if (translateValues[axis] !== undefined) {
|
|
7360
7366
|
return translateValues[axis];
|
|
7361
7367
|
}
|
|
7362
|
-
const range =
|
|
7368
|
+
const range = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRange(props, axis);
|
|
7363
7369
|
return range ? Math.min(...range) : undefined;
|
|
7364
7370
|
}
|
|
7365
7371
|
render() {
|
|
@@ -7370,13 +7376,13 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
7370
7376
|
}
|
|
7371
7377
|
const translateX = this.getTranslateValue(this.props, "x");
|
|
7372
7378
|
const translateY = this.getTranslateValue(this.props, "y");
|
|
7373
|
-
const clipProps =
|
|
7379
|
+
const clipProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.props, {
|
|
7374
7380
|
clipHeight,
|
|
7375
7381
|
clipWidth,
|
|
7376
7382
|
translateX,
|
|
7377
7383
|
translateY
|
|
7378
7384
|
});
|
|
7379
|
-
return this.renderClippedGroup(clipProps, this.clipId);
|
|
7385
|
+
return this.renderClippedGroup(clipProps, this.state.clipId);
|
|
7380
7386
|
}
|
|
7381
7387
|
}
|
|
7382
7388
|
|
|
@@ -7394,16 +7400,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7394
7400
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
7395
7401
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
7396
7402
|
/* harmony export */ });
|
|
7397
|
-
/* harmony import */ var
|
|
7398
|
-
/* harmony import */ var
|
|
7399
|
-
/* harmony import */ var
|
|
7400
|
-
/* harmony import */ var
|
|
7403
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7404
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7405
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
7406
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
7401
7407
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
7402
7408
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
7403
7409
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
7404
7410
|
/* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-portal/portal-outlet */ "../../victory-core/es/victory-portal/portal-outlet.js");
|
|
7405
7411
|
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
7406
|
-
|
|
7407
7412
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7408
7413
|
|
|
7409
7414
|
|
|
@@ -7411,9 +7416,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
7411
7416
|
|
|
7412
7417
|
|
|
7413
7418
|
|
|
7419
|
+
|
|
7414
7420
|
const defaultProps = {
|
|
7415
7421
|
className: "VictoryContainer",
|
|
7416
|
-
portalComponent: /*#__PURE__*/
|
|
7422
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
7417
7423
|
portalZIndex: 99,
|
|
7418
7424
|
responsive: true,
|
|
7419
7425
|
role: "img"
|
|
@@ -7430,10 +7436,10 @@ function useVictoryContainer(initialProps) {
|
|
|
7430
7436
|
height,
|
|
7431
7437
|
responsive
|
|
7432
7438
|
} = props;
|
|
7433
|
-
const localContainerRef = (0,
|
|
7439
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
7434
7440
|
|
|
7435
7441
|
// Generated ID stored in ref because it needs to persist across renders
|
|
7436
|
-
const generatedId = (0,
|
|
7442
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
7437
7443
|
const containerId = props.containerId ?? generatedId.current;
|
|
7438
7444
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
7439
7445
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -7492,7 +7498,7 @@ const VictoryContainer = initialProps => {
|
|
|
7492
7498
|
containerRef,
|
|
7493
7499
|
localContainerRef
|
|
7494
7500
|
} = useVictoryContainer(initialProps);
|
|
7495
|
-
|
|
7501
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
7496
7502
|
if (!events?.onWheel) return;
|
|
7497
7503
|
const handleWheel = e => e.preventDefault();
|
|
7498
7504
|
const container = localContainerRef?.current;
|
|
@@ -7502,7 +7508,7 @@ const VictoryContainer = initialProps => {
|
|
|
7502
7508
|
};
|
|
7503
7509
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7504
7510
|
}, []);
|
|
7505
|
-
return /*#__PURE__*/
|
|
7511
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
7506
7512
|
className: className,
|
|
7507
7513
|
style: {
|
|
7508
7514
|
...style,
|
|
@@ -7516,7 +7522,7 @@ const VictoryContainer = initialProps => {
|
|
|
7516
7522
|
"data-ouia-component-type": ouiaType,
|
|
7517
7523
|
"data-ouia-safe": ouiaSafe,
|
|
7518
7524
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
7519
|
-
}, /*#__PURE__*/
|
|
7525
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
7520
7526
|
width: width,
|
|
7521
7527
|
height: height,
|
|
7522
7528
|
tabIndex: tabIndex,
|
|
@@ -7529,11 +7535,11 @@ const VictoryContainer = initialProps => {
|
|
|
7529
7535
|
...dimensions,
|
|
7530
7536
|
pointerEvents: "all"
|
|
7531
7537
|
}
|
|
7532
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
7538
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
7533
7539
|
id: titleId
|
|
7534
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
7540
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
7535
7541
|
id: descId
|
|
7536
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
7542
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
7537
7543
|
style: {
|
|
7538
7544
|
...dimensions,
|
|
7539
7545
|
zIndex: portalZIndex,
|
|
@@ -7541,7 +7547,7 @@ const VictoryContainer = initialProps => {
|
|
|
7541
7547
|
top: 0,
|
|
7542
7548
|
left: 0
|
|
7543
7549
|
}
|
|
7544
|
-
}, /*#__PURE__*/
|
|
7550
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
7545
7551
|
as: portalComponent,
|
|
7546
7552
|
width: width,
|
|
7547
7553
|
height: height,
|
|
@@ -7568,12 +7574,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7568
7574
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7569
7575
|
/* harmony export */ "VictoryLabel": function() { return /* binding */ VictoryLabel; }
|
|
7570
7576
|
/* harmony export */ });
|
|
7571
|
-
/* harmony import */ var
|
|
7572
|
-
/* harmony import */ var
|
|
7577
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7578
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7573
7579
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
7574
7580
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7575
|
-
/* harmony import */ var
|
|
7576
|
-
/* harmony import */ var
|
|
7581
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
7582
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
7577
7583
|
/* harmony import */ var _victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../victory-portal/victory-portal */ "../../victory-core/es/victory-portal/victory-portal.js");
|
|
7578
7584
|
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-primitives/rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
7579
7585
|
/* harmony import */ var _victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../victory-primitives/text */ "../../victory-core/es/victory-primitives/text.js");
|
|
@@ -7584,9 +7590,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7584
7590
|
/* harmony import */ var _victory_util_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/style */ "../../victory-core/es/victory-util/style.js");
|
|
7585
7591
|
/* harmony import */ var _victory_util_textsize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../victory-util/textsize */ "../../victory-core/es/victory-util/textsize.js");
|
|
7586
7592
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
7593
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
7587
7594
|
|
|
7588
7595
|
|
|
7589
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
7590
7596
|
|
|
7591
7597
|
|
|
7592
7598
|
|
|
@@ -7638,7 +7644,7 @@ const shouldUseMultilineBackgrounds = props => {
|
|
|
7638
7644
|
backgroundStyle,
|
|
7639
7645
|
backgroundPadding
|
|
7640
7646
|
} = props;
|
|
7641
|
-
return Array.isArray(backgroundStyle) && !
|
|
7647
|
+
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundPadding);
|
|
7642
7648
|
};
|
|
7643
7649
|
const getStyles = (style, props) => {
|
|
7644
7650
|
if (props.disableInlineStyles) {
|
|
@@ -7654,32 +7660,28 @@ const getStyles = (style, props) => {
|
|
|
7654
7660
|
fontSize: getFontSize(baseStyles)
|
|
7655
7661
|
});
|
|
7656
7662
|
};
|
|
7657
|
-
return Array.isArray(style) && !
|
|
7663
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => getSingleStyle(s)) : getSingleStyle(style);
|
|
7658
7664
|
};
|
|
7659
7665
|
const getBackgroundStyles = (style, props) => {
|
|
7660
7666
|
if (!style) {
|
|
7661
7667
|
return undefined;
|
|
7662
7668
|
}
|
|
7663
|
-
return Array.isArray(style) && !
|
|
7669
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(s, props)) : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(style, props);
|
|
7664
7670
|
};
|
|
7665
7671
|
const getBackgroundPadding = props => {
|
|
7666
7672
|
if (props.backgroundPadding && Array.isArray(props.backgroundPadding)) {
|
|
7667
7673
|
return props.backgroundPadding.map(backgroundPadding => {
|
|
7668
7674
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(backgroundPadding, props);
|
|
7669
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
7670
|
-
padding
|
|
7671
|
-
});
|
|
7675
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
7672
7676
|
});
|
|
7673
7677
|
}
|
|
7674
7678
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.backgroundPadding, props);
|
|
7675
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
7676
|
-
padding
|
|
7677
|
-
});
|
|
7679
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
7678
7680
|
};
|
|
7679
7681
|
const getLineHeight = props => {
|
|
7680
7682
|
const lineHeight = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.lineHeight, props);
|
|
7681
7683
|
if (Array.isArray(lineHeight)) {
|
|
7682
|
-
return
|
|
7684
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(lineHeight) ? [1] : lineHeight;
|
|
7683
7685
|
}
|
|
7684
7686
|
return lineHeight;
|
|
7685
7687
|
};
|
|
@@ -7799,7 +7801,7 @@ const getFullBackground = (calculatedProps, tspanValues) => {
|
|
|
7799
7801
|
x: inline ? xCoordinate - backgroundPadding.left : xCoordinate + dx - backgroundPadding.left,
|
|
7800
7802
|
y: yCoordinate
|
|
7801
7803
|
};
|
|
7802
|
-
return /*#__PURE__*/
|
|
7804
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
7803
7805
|
};
|
|
7804
7806
|
const getInlineXOffset = (calculatedProps, textElements, index) => {
|
|
7805
7807
|
const {
|
|
@@ -7869,7 +7871,7 @@ const getChildBackgrounds = (calculatedProps, tspanValues) => {
|
|
|
7869
7871
|
x: xCoord - padding.left,
|
|
7870
7872
|
y: yCoord
|
|
7871
7873
|
};
|
|
7872
|
-
return /*#__PURE__*/
|
|
7874
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
7873
7875
|
});
|
|
7874
7876
|
};
|
|
7875
7877
|
const getBackgroundElement = (calculatedProps, tspanValues) => {
|
|
@@ -8000,16 +8002,16 @@ const renderLabel = (calculatedProps, tspanValues) => {
|
|
|
8000
8002
|
style: currentStyle,
|
|
8001
8003
|
children: line
|
|
8002
8004
|
};
|
|
8003
|
-
return /*#__PURE__*/
|
|
8005
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(tspanComponent, tspanProps);
|
|
8004
8006
|
});
|
|
8005
|
-
return /*#__PURE__*/
|
|
8007
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(textComponent, textProps, tspans);
|
|
8006
8008
|
};
|
|
8007
8009
|
const defaultProps = {
|
|
8008
|
-
backgroundComponent: /*#__PURE__*/
|
|
8009
|
-
groupComponent: /*#__PURE__*/
|
|
8010
|
+
backgroundComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__.Rect, null),
|
|
8011
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
8010
8012
|
direction: "inherit",
|
|
8011
|
-
textComponent: /*#__PURE__*/
|
|
8012
|
-
tspanComponent: /*#__PURE__*/
|
|
8013
|
+
textComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__.Text, null),
|
|
8014
|
+
tspanComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_tspan__WEBPACK_IMPORTED_MODULE_10__.TSpan, null),
|
|
8013
8015
|
capHeight: 0.71,
|
|
8014
8016
|
// Magic number from d3.
|
|
8015
8017
|
lineHeight: 1
|
|
@@ -8046,10 +8048,10 @@ const VictoryLabel = initialProps => {
|
|
|
8046
8048
|
if (props.backgroundStyle) {
|
|
8047
8049
|
const backgroundElement = getBackgroundElement(calculatedProps, tspanValues);
|
|
8048
8050
|
const children = [backgroundElement, label];
|
|
8049
|
-
const backgroundWithLabel = /*#__PURE__*/
|
|
8050
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
8051
|
+
const backgroundWithLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.groupComponent, {}, children);
|
|
8052
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, backgroundWithLabel) : backgroundWithLabel;
|
|
8051
8053
|
}
|
|
8052
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
8054
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, label) : label;
|
|
8053
8055
|
};
|
|
8054
8056
|
VictoryLabel.displayName = "VictoryLabel";
|
|
8055
8057
|
VictoryLabel.role = "label";
|
|
@@ -8175,12 +8177,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8175
8177
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8176
8178
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
8177
8179
|
/* harmony export */ });
|
|
8178
|
-
/* harmony import */ var
|
|
8179
|
-
/* harmony import */ var
|
|
8180
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8181
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8180
8182
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
8181
8183
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8182
|
-
/* harmony import */ var
|
|
8183
|
-
/* harmony import */ var
|
|
8184
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
8185
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
8184
8186
|
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
|
|
8185
8187
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8186
8188
|
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
@@ -8191,14 +8193,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8191
8193
|
|
|
8192
8194
|
|
|
8193
8195
|
const defaultProps = {
|
|
8194
|
-
groupComponent: /*#__PURE__*/
|
|
8196
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
8195
8197
|
};
|
|
8196
8198
|
const VictoryPortal = initialProps => {
|
|
8197
8199
|
const props = {
|
|
8198
8200
|
...defaultProps,
|
|
8199
8201
|
...initialProps
|
|
8200
8202
|
};
|
|
8201
|
-
const [id] = (0,
|
|
8203
|
+
const [id] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()());
|
|
8202
8204
|
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
8203
8205
|
if (!portalContext) {
|
|
8204
8206
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
@@ -8216,12 +8218,12 @@ const VictoryPortal = initialProps => {
|
|
|
8216
8218
|
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
8217
8219
|
key: childProps.key ?? id
|
|
8218
8220
|
});
|
|
8219
|
-
const child = children && /*#__PURE__*/
|
|
8220
|
-
|
|
8221
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(children, newProps);
|
|
8222
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
8221
8223
|
portalContext?.addChild(id, child);
|
|
8222
8224
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8223
8225
|
}, [props.children]);
|
|
8224
|
-
|
|
8226
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
8225
8227
|
return () => portalContext?.removeChild(id);
|
|
8226
8228
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8227
8229
|
}, []);
|
|
@@ -8305,10 +8307,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8305
8307
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8306
8308
|
/* harmony export */ "LineSegment": function() { return /* binding */ LineSegment; }
|
|
8307
8309
|
/* harmony export */ });
|
|
8308
|
-
/* harmony import */ var
|
|
8309
|
-
/* harmony import */ var
|
|
8310
|
-
/* harmony import */ var
|
|
8311
|
-
/* harmony import */ var
|
|
8310
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8311
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8312
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
8313
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8312
8314
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8313
8315
|
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "../../victory-core/es/victory-primitives/line.js");
|
|
8314
8316
|
|
|
@@ -8340,13 +8342,13 @@ const evaluateProps = props => {
|
|
|
8340
8342
|
});
|
|
8341
8343
|
};
|
|
8342
8344
|
const defaultProps = {
|
|
8343
|
-
lineComponent: /*#__PURE__*/
|
|
8345
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
8344
8346
|
role: "presentation",
|
|
8345
8347
|
shapeRendering: "auto"
|
|
8346
8348
|
};
|
|
8347
8349
|
const LineSegment = initialProps => {
|
|
8348
|
-
const props = evaluateProps(
|
|
8349
|
-
return /*#__PURE__*/
|
|
8350
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
8351
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.lineComponent, {
|
|
8350
8352
|
...props.events,
|
|
8351
8353
|
"aria-label": props.ariaLabel,
|
|
8352
8354
|
style: props.style,
|
|
@@ -9715,16 +9717,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9715
9717
|
/* harmony export */ "modifyProps": function() { return /* binding */ modifyProps; },
|
|
9716
9718
|
/* harmony export */ "stringTicks": function() { return /* binding */ stringTicks; }
|
|
9717
9719
|
/* harmony export */ });
|
|
9718
|
-
/* harmony import */ var
|
|
9719
|
-
/* harmony import */ var
|
|
9720
|
-
/* harmony import */ var
|
|
9721
|
-
/* harmony import */ var
|
|
9720
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9721
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9722
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
9723
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
9722
9724
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
9723
9725
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
9724
|
-
/* harmony import */ var
|
|
9725
|
-
/* harmony import */ var
|
|
9726
|
-
/* harmony import */ var
|
|
9727
|
-
/* harmony import */ var
|
|
9726
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
9727
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
9728
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
|
|
9729
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
9728
9730
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
9729
9731
|
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain */ "../../victory-core/es/victory-util/domain.js");
|
|
9730
9732
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -9771,7 +9773,7 @@ function findAxisComponents(childComponents, predicate) {
|
|
|
9771
9773
|
if (child.type && child.type.role === "axis" && predicateFunction(child)) {
|
|
9772
9774
|
return memo.concat(child);
|
|
9773
9775
|
} else if (child.props && child.props.children) {
|
|
9774
|
-
return memo.concat(findAxes(
|
|
9776
|
+
return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
9775
9777
|
}
|
|
9776
9778
|
return memo;
|
|
9777
9779
|
}, []);
|
|
@@ -9809,7 +9811,7 @@ function getAxisComponentsWithParent(childComponents, type) {
|
|
|
9809
9811
|
if (child.type && child.type.role === "axis" && matchesType(child)) {
|
|
9810
9812
|
return memo.concat(child);
|
|
9811
9813
|
} else if (child.props && child.props.children) {
|
|
9812
|
-
const childAxis = findComponents(
|
|
9814
|
+
const childAxis = findComponents(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children));
|
|
9813
9815
|
return childAxis.length > 0 ? memo.concat(child) : memo;
|
|
9814
9816
|
}
|
|
9815
9817
|
return memo;
|
|
@@ -9868,7 +9870,7 @@ function getDefaultTickFormat(props) {
|
|
|
9868
9870
|
return stringTicks(props) ? (x, index) => tickValues[index] : fallbackFormat;
|
|
9869
9871
|
}
|
|
9870
9872
|
const invertedStringMap = stringMap && _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
9871
|
-
const tickValueArray =
|
|
9873
|
+
const tickValueArray = lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default()(Object.values(stringMap), n => n);
|
|
9872
9874
|
const dataNames = tickValueArray.map(tick => invertedStringMap[tick]);
|
|
9873
9875
|
// string ticks should have one tick of padding at the beginning
|
|
9874
9876
|
const dataTicks = ["", ...dataNames, ""];
|
|
@@ -9905,14 +9907,14 @@ function getTickArray(props) {
|
|
|
9905
9907
|
if (tickValues && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickValues)) {
|
|
9906
9908
|
ticks = stringMap ? tickValues.map(tick => stringMap[tick]) : _helpers__WEBPACK_IMPORTED_MODULE_6__.range(1, tickValues.length + 1);
|
|
9907
9909
|
}
|
|
9908
|
-
const tickArray = ticks ?
|
|
9910
|
+
const tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(ticks) : getTicksFromFormat();
|
|
9909
9911
|
const buildTickArray = arr => {
|
|
9910
9912
|
const newTickArray = [];
|
|
9911
9913
|
const domain = props.domain && props.domain[axis] || props.domain;
|
|
9912
9914
|
if (arr) {
|
|
9913
9915
|
arr.forEach((t, index) => {
|
|
9914
9916
|
if (Array.isArray(domain)) {
|
|
9915
|
-
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain) && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain)) {
|
|
9917
|
+
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain).valueOf() && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain).valueOf()) {
|
|
9916
9918
|
newTickArray.push({
|
|
9917
9919
|
value: t,
|
|
9918
9920
|
index
|
|
@@ -10064,7 +10066,7 @@ function modifyProps(props, fallbackProps) {
|
|
|
10064
10066
|
if (role === "axis") {
|
|
10065
10067
|
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
10066
10068
|
}
|
|
10067
|
-
const axisTheme =
|
|
10069
|
+
const axisTheme = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.theme[role], props.theme.axis);
|
|
10068
10070
|
const theme = Object.assign({}, props.theme, {
|
|
10069
10071
|
axis: axisTheme
|
|
10070
10072
|
});
|
|
@@ -10168,24 +10170,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10168
10170
|
/* harmony export */ "getStringsFromData": function() { return /* binding */ getStringsFromData; },
|
|
10169
10171
|
/* harmony export */ "isDataComponent": function() { return /* binding */ isDataComponent; }
|
|
10170
10172
|
/* harmony export */ });
|
|
10171
|
-
/* harmony import */ var
|
|
10172
|
-
/* harmony import */ var
|
|
10173
|
-
/* harmony import */ var
|
|
10174
|
-
/* harmony import */ var
|
|
10173
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
10174
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10175
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
10176
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
10175
10177
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEqual */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js");
|
|
10176
10178
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__);
|
|
10177
|
-
/* harmony import */ var
|
|
10178
|
-
/* harmony import */ var
|
|
10179
|
-
/* harmony import */ var
|
|
10180
|
-
/* harmony import */ var
|
|
10181
|
-
/* harmony import */ var
|
|
10182
|
-
/* harmony import */ var
|
|
10183
|
-
/* harmony import */ var
|
|
10184
|
-
/* harmony import */ var
|
|
10185
|
-
/* harmony import */ var
|
|
10186
|
-
/* harmony import */ var
|
|
10187
|
-
/* harmony import */ var
|
|
10188
|
-
/* harmony import */ var
|
|
10179
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
10180
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__);
|
|
10181
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isUndefined */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js");
|
|
10182
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__);
|
|
10183
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/omitBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omitBy.js");
|
|
10184
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__);
|
|
10185
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
|
|
10186
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__);
|
|
10187
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
|
|
10188
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_7__);
|
|
10189
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
10190
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_8__);
|
|
10189
10191
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10190
10192
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
10191
10193
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
@@ -10219,7 +10221,7 @@ function getLength(data) {
|
|
|
10219
10221
|
|
|
10220
10222
|
// Returns generated data for a given axis based on domain and sample from props
|
|
10221
10223
|
function generateDataArray(props, axis) {
|
|
10222
|
-
const propsDomain =
|
|
10224
|
+
const propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
10223
10225
|
const domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis).domain();
|
|
10224
10226
|
const samples = props.samples || 1;
|
|
10225
10227
|
const domainMax = Math.max(...domain);
|
|
@@ -10244,7 +10246,7 @@ function sortData(dataset, sortKey, sortOrder) {
|
|
|
10244
10246
|
formattedSortKey = `_${sortKey}`;
|
|
10245
10247
|
}
|
|
10246
10248
|
const order = sortOrder === "ascending" ? "asc" : "desc";
|
|
10247
|
-
return
|
|
10249
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default()(dataset, formattedSortKey, order);
|
|
10248
10250
|
}
|
|
10249
10251
|
|
|
10250
10252
|
// This method will remove data points that break certain scales. (log scale only)
|
|
@@ -10288,7 +10290,7 @@ function getEventKey(key) {
|
|
|
10288
10290
|
return () => undefined;
|
|
10289
10291
|
}
|
|
10290
10292
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
10291
|
-
return
|
|
10293
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_7___default()(key);
|
|
10292
10294
|
}
|
|
10293
10295
|
|
|
10294
10296
|
// Returns data with an eventKey prop added to each datum
|
|
@@ -10347,12 +10349,12 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
10347
10349
|
if (isUnderMinY(baseline) && !isUnderMinY(value)) _y0 = minDomainY;
|
|
10348
10350
|
// baseline and value with only baseline above max, set baseline to maxDomainY
|
|
10349
10351
|
if (isOverMaxY(baseline) && !isOverMaxY(value)) _y0 = maxDomainY;
|
|
10350
|
-
return Object.assign({}, datum,
|
|
10352
|
+
return Object.assign({}, datum, lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
10351
10353
|
_x,
|
|
10352
10354
|
_y,
|
|
10353
10355
|
_y0,
|
|
10354
10356
|
_y1
|
|
10355
|
-
}, (
|
|
10357
|
+
}, (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default())));
|
|
10356
10358
|
});
|
|
10357
10359
|
}
|
|
10358
10360
|
|
|
@@ -10366,7 +10368,7 @@ function createStringMap(props, axis) {
|
|
|
10366
10368
|
const stringsFromAxes = getStringsFromAxes(props, axis);
|
|
10367
10369
|
const stringsFromCategories = getStringsFromCategories(props, axis);
|
|
10368
10370
|
const stringsFromData = getStringsFromData(props, axis);
|
|
10369
|
-
const allStrings =
|
|
10371
|
+
const allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default()([...stringsFromAxes, ...stringsFromCategories, ...stringsFromData]);
|
|
10370
10372
|
return allStrings.length === 0 ? null : allStrings.reduce((memo, string, index) => {
|
|
10371
10373
|
memo[string] = index + 1;
|
|
10372
10374
|
return memo;
|
|
@@ -10452,7 +10454,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
10452
10454
|
return memo;
|
|
10453
10455
|
}, {});
|
|
10454
10456
|
const formattedDatum = Object.assign({}, processedValues, parsedDatum);
|
|
10455
|
-
if (!
|
|
10457
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(formattedDatum)) {
|
|
10456
10458
|
dataArr.push(formattedDatum);
|
|
10457
10459
|
}
|
|
10458
10460
|
return dataArr;
|
|
@@ -10579,7 +10581,7 @@ function isDataComponent(component) {
|
|
|
10579
10581
|
};
|
|
10580
10582
|
let role = getRole(component);
|
|
10581
10583
|
if (role === "portal") {
|
|
10582
|
-
const children =
|
|
10584
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
10583
10585
|
role = children.length ? getRole(children[0]) : "";
|
|
10584
10586
|
}
|
|
10585
10587
|
const whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -10610,14 +10612,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10610
10612
|
/* harmony export */ "getSymmetricDomain": function() { return /* binding */ getSymmetricDomain; },
|
|
10611
10613
|
/* harmony export */ "isDomainComponent": function() { return /* binding */ isDomainComponent; }
|
|
10612
10614
|
/* harmony export */ });
|
|
10613
|
-
/* harmony import */ var
|
|
10614
|
-
/* harmony import */ var
|
|
10615
|
-
/* harmony import */ var
|
|
10616
|
-
/* harmony import */ var
|
|
10615
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
10616
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10617
|
+
/* harmony import */ var lodash_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isDate */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isDate.js");
|
|
10618
|
+
/* harmony import */ var lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isDate__WEBPACK_IMPORTED_MODULE_1__);
|
|
10617
10619
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
10618
10620
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
10619
|
-
/* harmony import */ var
|
|
10620
|
-
/* harmony import */ var
|
|
10621
|
+
/* harmony import */ var lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/sortedUniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/sortedUniq.js");
|
|
10622
|
+
/* harmony import */ var lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
10621
10623
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
10622
10624
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
10623
10625
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -10706,9 +10708,9 @@ function padDomain(domain, props, axis) {
|
|
|
10706
10708
|
max: max.valueOf() + simplePadding.right
|
|
10707
10709
|
};
|
|
10708
10710
|
const singleQuadrantDomainPadding = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.singleQuadrantDomainPadding) ? props.singleQuadrantDomainPadding[axis] : props.singleQuadrantDomainPadding;
|
|
10709
|
-
const addsQuadrants = min >= 0 && paddedDomain.min <= 0 || max <= 0 && paddedDomain.max >= 0;
|
|
10711
|
+
const addsQuadrants = min.valueOf() >= 0 && paddedDomain.min <= 0 || max.valueOf() <= 0 && paddedDomain.max >= 0;
|
|
10710
10712
|
const adjust = (val, type) => {
|
|
10711
|
-
const coerce = type === "min" && min >= 0 && val <= 0 || type === "max" && max <= 0 && val >= 0;
|
|
10713
|
+
const coerce = type === "min" && min.valueOf() >= 0 && val <= 0 || type === "max" && max.valueOf() <= 0 && val >= 0;
|
|
10712
10714
|
return coerce ? 0 : val;
|
|
10713
10715
|
};
|
|
10714
10716
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
@@ -10931,7 +10933,7 @@ function getMaxFromProps(props, axis) {
|
|
|
10931
10933
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.maxDomain) && props.maxDomain[axis] !== undefined) {
|
|
10932
10934
|
return props.maxDomain[axis];
|
|
10933
10935
|
}
|
|
10934
|
-
return typeof props.maxDomain === "number" ||
|
|
10936
|
+
return typeof props.maxDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.maxDomain) ? props.maxDomain : undefined;
|
|
10935
10937
|
}
|
|
10936
10938
|
|
|
10937
10939
|
/**
|
|
@@ -10944,7 +10946,7 @@ function getMinFromProps(props, axis) {
|
|
|
10944
10946
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.minDomain) && props.minDomain[axis] !== undefined) {
|
|
10945
10947
|
return props.minDomain[axis];
|
|
10946
10948
|
}
|
|
10947
|
-
return typeof props.minDomain === "number" ||
|
|
10949
|
+
return typeof props.minDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.minDomain) ? props.minDomain : undefined;
|
|
10948
10950
|
}
|
|
10949
10951
|
|
|
10950
10952
|
/**
|
|
@@ -10955,7 +10957,7 @@ function getMinFromProps(props, axis) {
|
|
|
10955
10957
|
* @returns {Array} the symmetric domain
|
|
10956
10958
|
*/
|
|
10957
10959
|
function getSymmetricDomain(domain, values) {
|
|
10958
|
-
const processedData =
|
|
10960
|
+
const processedData = lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default()(values.sort((a, b) => a - b));
|
|
10959
10961
|
const step = processedData[1] - processedData[0];
|
|
10960
10962
|
return [domain[0], domain[1] + step];
|
|
10961
10963
|
}
|
|
@@ -10971,7 +10973,7 @@ function isDomainComponent(component) {
|
|
|
10971
10973
|
};
|
|
10972
10974
|
let role = getRole(component);
|
|
10973
10975
|
if (role === "portal") {
|
|
10974
|
-
const children =
|
|
10976
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
10975
10977
|
role = children.length ? getRole(children[0]) : "";
|
|
10976
10978
|
}
|
|
10977
10979
|
const whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -11002,14 +11004,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11002
11004
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
11003
11005
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
11004
11006
|
/* harmony export */ });
|
|
11005
|
-
/* harmony import */ var
|
|
11006
|
-
/* harmony import */ var
|
|
11007
|
-
/* harmony import */ var
|
|
11008
|
-
/* harmony import */ var
|
|
11009
|
-
/* harmony import */ var
|
|
11010
|
-
/* harmony import */ var
|
|
11011
|
-
/* harmony import */ var
|
|
11012
|
-
/* harmony import */ var
|
|
11007
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
11008
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
11009
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pickBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pickBy.js");
|
|
11010
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
11011
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/omitBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omitBy.js");
|
|
11012
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
11013
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
11014
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
11013
11015
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
11014
11016
|
|
|
11015
11017
|
|
|
@@ -11085,7 +11087,7 @@ getScopedEvents) {
|
|
|
11085
11087
|
*/
|
|
11086
11088
|
// eslint-disable-next-line max-params
|
|
11087
11089
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
11088
|
-
if (
|
|
11090
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
11089
11091
|
return {};
|
|
11090
11092
|
}
|
|
11091
11093
|
|
|
@@ -11198,7 +11200,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11198
11200
|
// eslint-disable-next-line max-params
|
|
11199
11201
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
11200
11202
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
11201
|
-
if (!
|
|
11203
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
11202
11204
|
const callbacks = compileCallbacks(eventReturn);
|
|
11203
11205
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
11204
11206
|
}
|
|
@@ -11259,7 +11261,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
11259
11261
|
const childState = baseState[childName];
|
|
11260
11262
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
11261
11263
|
memo[childName] = mutation ? mutation : childState;
|
|
11262
|
-
return
|
|
11264
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
11263
11265
|
}, {});
|
|
11264
11266
|
}
|
|
11265
11267
|
|
|
@@ -11295,7 +11297,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
11295
11297
|
} else {
|
|
11296
11298
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
11297
11299
|
// will be used. (i.e. labels)
|
|
11298
|
-
const targets =
|
|
11300
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
11299
11301
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
11300
11302
|
const identifier = {
|
|
11301
11303
|
eventKey,
|
|
@@ -11304,10 +11306,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
11304
11306
|
};
|
|
11305
11307
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
11306
11308
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
11307
|
-
return
|
|
11309
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
11308
11310
|
}, {});
|
|
11309
11311
|
}
|
|
11310
|
-
return
|
|
11312
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
11311
11313
|
}, {});
|
|
11312
11314
|
}
|
|
11313
11315
|
|
|
@@ -11339,11 +11341,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
11339
11341
|
}
|
|
11340
11342
|
// find any mutation objects that match the target
|
|
11341
11343
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
11342
|
-
if (
|
|
11344
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
11343
11345
|
return undefined;
|
|
11344
11346
|
}
|
|
11345
11347
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
11346
|
-
if (
|
|
11348
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
11347
11349
|
return undefined;
|
|
11348
11350
|
}
|
|
11349
11351
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -11369,8 +11371,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
11369
11371
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
11370
11372
|
return match && match[1] && match[1].toLowerCase();
|
|
11371
11373
|
}
|
|
11372
|
-
const getGlobalEvents = events =>
|
|
11373
|
-
const omitGlobalEvents = events =>
|
|
11374
|
+
const getGlobalEvents = events => lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
11375
|
+
const omitGlobalEvents = events => lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
11374
11376
|
const emulateReactEvent = event => Object.assign(event, {
|
|
11375
11377
|
nativeEvent: event
|
|
11376
11378
|
});
|
|
@@ -11411,40 +11413,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11411
11413
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
11412
11414
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
11413
11415
|
/* harmony export */ });
|
|
11414
|
-
/* harmony import */ var
|
|
11415
|
-
/* harmony import */ var
|
|
11416
|
-
/* harmony import */ var
|
|
11417
|
-
/* harmony import */ var
|
|
11418
|
-
/* harmony import */ var
|
|
11419
|
-
/* harmony import */ var
|
|
11420
|
-
/* harmony import */ var
|
|
11421
|
-
/* harmony import */ var
|
|
11422
|
-
|
|
11416
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
11417
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11418
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
11419
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
11420
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
|
|
11421
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
|
|
11422
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
11423
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
11423
11424
|
|
|
11424
11425
|
|
|
11425
11426
|
|
|
11426
|
-
// Private Functions
|
|
11427
11427
|
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11428
|
+
/**
|
|
11429
|
+
* Determine the range of a cartesian axis
|
|
11430
|
+
*/
|
|
11431
|
+
function getCartesianRange(options) {
|
|
11432
|
+
const vertical = options.axis !== "x";
|
|
11432
11433
|
if (vertical) {
|
|
11433
|
-
return [
|
|
11434
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
11434
11435
|
}
|
|
11435
|
-
return [padding.left,
|
|
11436
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
11436
11437
|
}
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11438
|
+
|
|
11439
|
+
/**
|
|
11440
|
+
* Determine the range of a polar axis in radians
|
|
11441
|
+
*/
|
|
11442
|
+
function getPolarRange(options) {
|
|
11443
|
+
if (options.axis === "x") {
|
|
11444
|
+
const startAngle = degreesToRadians(options.startAngle || 0);
|
|
11445
|
+
const endAngle = degreesToRadians(options.endAngle || 360);
|
|
11441
11446
|
return [startAngle, endAngle];
|
|
11442
11447
|
}
|
|
11443
|
-
return [
|
|
11448
|
+
return [options.innerRadius || 0, getRadius({
|
|
11449
|
+
height: options.height,
|
|
11450
|
+
width: options.width,
|
|
11451
|
+
padding: options.padding
|
|
11452
|
+
})];
|
|
11444
11453
|
}
|
|
11445
11454
|
|
|
11446
|
-
// Exported Functions
|
|
11447
|
-
|
|
11448
11455
|
/**
|
|
11449
11456
|
* Creates an object composed of the inverted keys and values of object.
|
|
11450
11457
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -11481,8 +11488,11 @@ function omit(originalObject, ks) {
|
|
|
11481
11488
|
}
|
|
11482
11489
|
return newObject;
|
|
11483
11490
|
}
|
|
11491
|
+
|
|
11492
|
+
/**
|
|
11493
|
+
* Coalesce the x and y values from a data point
|
|
11494
|
+
*/
|
|
11484
11495
|
function getPoint(datum) {
|
|
11485
|
-
const exists = val => val !== undefined;
|
|
11486
11496
|
const {
|
|
11487
11497
|
_x,
|
|
11488
11498
|
_x1,
|
|
@@ -11493,16 +11503,20 @@ function getPoint(datum) {
|
|
|
11493
11503
|
_y0,
|
|
11494
11504
|
_voronoiY
|
|
11495
11505
|
} = datum;
|
|
11496
|
-
const defaultX =
|
|
11497
|
-
const defaultY =
|
|
11506
|
+
const defaultX = _x1 ?? _x;
|
|
11507
|
+
const defaultY = _y1 ?? _y;
|
|
11498
11508
|
const point = {
|
|
11499
|
-
x:
|
|
11500
|
-
x0:
|
|
11501
|
-
y:
|
|
11502
|
-
y0:
|
|
11509
|
+
x: _voronoiX ?? defaultX,
|
|
11510
|
+
x0: _x0 ?? _x,
|
|
11511
|
+
y: _voronoiY ?? defaultY,
|
|
11512
|
+
y0: _y0 ?? _y
|
|
11503
11513
|
};
|
|
11504
|
-
return
|
|
11514
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
11505
11515
|
}
|
|
11516
|
+
|
|
11517
|
+
/**
|
|
11518
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
11519
|
+
*/
|
|
11506
11520
|
function scalePoint(props, datum) {
|
|
11507
11521
|
const {
|
|
11508
11522
|
scale,
|
|
@@ -11525,11 +11539,11 @@ function scalePoint(props, datum) {
|
|
|
11525
11539
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
11526
11540
|
};
|
|
11527
11541
|
}
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11542
|
+
|
|
11543
|
+
/**
|
|
11544
|
+
* Returns a padding value from a number or partial padding values
|
|
11545
|
+
*/
|
|
11546
|
+
function getPadding(padding) {
|
|
11533
11547
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
11534
11548
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
11535
11549
|
return {
|
|
@@ -11539,6 +11553,10 @@ function getPadding(props, name) {
|
|
|
11539
11553
|
right: paddingObj.right || paddingVal
|
|
11540
11554
|
};
|
|
11541
11555
|
}
|
|
11556
|
+
|
|
11557
|
+
/**
|
|
11558
|
+
* Returns true if the component is defined as a tooltip
|
|
11559
|
+
*/
|
|
11542
11560
|
function isTooltip(component) {
|
|
11543
11561
|
const labelRole = component && component.type && component.type.role;
|
|
11544
11562
|
return labelRole === "tooltip";
|
|
@@ -11553,8 +11571,8 @@ function getDefaultStyles(props, role) {
|
|
|
11553
11571
|
return defaultStyles;
|
|
11554
11572
|
}
|
|
11555
11573
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
11556
|
-
const labelStyle =
|
|
11557
|
-
return
|
|
11574
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
11575
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
11558
11576
|
labels: labelStyle
|
|
11559
11577
|
}, defaultStyles);
|
|
11560
11578
|
}
|
|
@@ -11562,7 +11580,7 @@ function getStyles(style, defaultStyles) {
|
|
|
11562
11580
|
const width = "100%";
|
|
11563
11581
|
const height = "100%";
|
|
11564
11582
|
if (!style) {
|
|
11565
|
-
return
|
|
11583
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
11566
11584
|
parent: {
|
|
11567
11585
|
height,
|
|
11568
11586
|
width
|
|
@@ -11578,14 +11596,18 @@ function getStyles(style, defaultStyles) {
|
|
|
11578
11596
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
11579
11597
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
11580
11598
|
return {
|
|
11581
|
-
parent:
|
|
11599
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
11582
11600
|
width,
|
|
11583
11601
|
height
|
|
11584
11602
|
}),
|
|
11585
|
-
labels:
|
|
11586
|
-
data:
|
|
11603
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
11604
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
11587
11605
|
};
|
|
11588
11606
|
}
|
|
11607
|
+
|
|
11608
|
+
/**
|
|
11609
|
+
* Returns the value of a prop or accessor function with the given props
|
|
11610
|
+
*/
|
|
11589
11611
|
function evaluateProp(prop, props) {
|
|
11590
11612
|
return isFunction(prop) ? prop(props) : prop;
|
|
11591
11613
|
}
|
|
@@ -11607,19 +11629,28 @@ function degreesToRadians(degrees) {
|
|
|
11607
11629
|
function radiansToDegrees(radians) {
|
|
11608
11630
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
11609
11631
|
}
|
|
11610
|
-
|
|
11632
|
+
|
|
11633
|
+
/**
|
|
11634
|
+
* Get the maximum radius that will fit in the container
|
|
11635
|
+
*/
|
|
11636
|
+
function getRadius(options) {
|
|
11637
|
+
const {
|
|
11638
|
+
width,
|
|
11639
|
+
height,
|
|
11640
|
+
padding
|
|
11641
|
+
} = options;
|
|
11611
11642
|
const {
|
|
11612
11643
|
left,
|
|
11613
11644
|
right,
|
|
11614
11645
|
top,
|
|
11615
11646
|
bottom
|
|
11616
|
-
} =
|
|
11617
|
-
const {
|
|
11618
|
-
width,
|
|
11619
|
-
height
|
|
11620
|
-
} = props;
|
|
11647
|
+
} = padding;
|
|
11621
11648
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
11622
11649
|
}
|
|
11650
|
+
|
|
11651
|
+
/**
|
|
11652
|
+
* Returns the origin for a polar chart within the padded area
|
|
11653
|
+
*/
|
|
11623
11654
|
function getPolarOrigin(props) {
|
|
11624
11655
|
const {
|
|
11625
11656
|
width,
|
|
@@ -11630,7 +11661,7 @@ function getPolarOrigin(props) {
|
|
|
11630
11661
|
bottom,
|
|
11631
11662
|
left,
|
|
11632
11663
|
right
|
|
11633
|
-
} = getPadding(props);
|
|
11664
|
+
} = getPadding(props.padding);
|
|
11634
11665
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
11635
11666
|
const offsetWidth = width / 2 + left - right;
|
|
11636
11667
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -11639,13 +11670,30 @@ function getPolarOrigin(props) {
|
|
|
11639
11670
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
11640
11671
|
};
|
|
11641
11672
|
}
|
|
11673
|
+
|
|
11674
|
+
/**
|
|
11675
|
+
* Determine the range of an axis based on the given props
|
|
11676
|
+
*/
|
|
11642
11677
|
function getRange(props, axis) {
|
|
11643
11678
|
if (props.range && props.range[axis]) {
|
|
11644
11679
|
return props.range[axis];
|
|
11645
11680
|
} else if (props.range && Array.isArray(props.range)) {
|
|
11646
11681
|
return props.range;
|
|
11647
11682
|
}
|
|
11648
|
-
return props.polar ? getPolarRange(
|
|
11683
|
+
return props.polar ? getPolarRange({
|
|
11684
|
+
axis,
|
|
11685
|
+
innerRadius: props.innerRadius,
|
|
11686
|
+
startAngle: props.startAngle,
|
|
11687
|
+
endAngle: props.endAngle,
|
|
11688
|
+
height: props.height,
|
|
11689
|
+
width: props.width,
|
|
11690
|
+
padding: getPadding(props.padding)
|
|
11691
|
+
}) : getCartesianRange({
|
|
11692
|
+
axis,
|
|
11693
|
+
height: props.height,
|
|
11694
|
+
width: props.width,
|
|
11695
|
+
padding: getPadding(props.padding)
|
|
11696
|
+
});
|
|
11649
11697
|
}
|
|
11650
11698
|
|
|
11651
11699
|
/**
|
|
@@ -11677,7 +11725,7 @@ function createAccessor(key) {
|
|
|
11677
11725
|
return x => x;
|
|
11678
11726
|
}
|
|
11679
11727
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
11680
|
-
return
|
|
11728
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
11681
11729
|
}
|
|
11682
11730
|
function modifyProps(props, fallbackProps, role) {
|
|
11683
11731
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -11686,7 +11734,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
11686
11734
|
const defaultObject = horizontal === undefined ? {} : {
|
|
11687
11735
|
horizontal
|
|
11688
11736
|
};
|
|
11689
|
-
return
|
|
11737
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
11690
11738
|
}
|
|
11691
11739
|
|
|
11692
11740
|
/**
|
|
@@ -11773,10 +11821,10 @@ initialMemo, combine) {
|
|
|
11773
11821
|
const childRole = child.type && child.type.role;
|
|
11774
11822
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
11775
11823
|
if (child.props && child.props.children) {
|
|
11776
|
-
const childProps = Object.assign({}, child.props,
|
|
11777
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
11778
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
11779
|
-
return /*#__PURE__*/
|
|
11824
|
+
const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
|
|
11825
|
+
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children).map(c => {
|
|
11826
|
+
const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
|
|
11827
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
|
|
11780
11828
|
});
|
|
11781
11829
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
11782
11830
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -11790,7 +11838,7 @@ initialMemo, combine) {
|
|
|
11790
11838
|
return newMemo;
|
|
11791
11839
|
}, initialMemo);
|
|
11792
11840
|
};
|
|
11793
|
-
const validChildren = children.filter(
|
|
11841
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
11794
11842
|
const childNames = validChildren.map((c, i) => i);
|
|
11795
11843
|
return traverseChildren(validChildren, childNames);
|
|
11796
11844
|
}
|
|
@@ -11810,10 +11858,10 @@ function isHorizontal(props) {
|
|
|
11810
11858
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
11811
11859
|
return memo || childProps.horizontal;
|
|
11812
11860
|
}
|
|
11813
|
-
return traverseChildren(
|
|
11861
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
11814
11862
|
}, false);
|
|
11815
11863
|
};
|
|
11816
|
-
return traverseChildren(
|
|
11864
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
11817
11865
|
}
|
|
11818
11866
|
|
|
11819
11867
|
/***/ }),
|
|
@@ -11886,9 +11934,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11886
11934
|
/* harmony export */ "getProps": function() { return /* binding */ getProps; },
|
|
11887
11935
|
/* harmony export */ "getText": function() { return /* binding */ getText; }
|
|
11888
11936
|
/* harmony export */ });
|
|
11937
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
11889
11938
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
11890
11939
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
11891
|
-
|
|
11940
|
+
|
|
11892
11941
|
|
|
11893
11942
|
|
|
11894
11943
|
// Private Functions
|
|
@@ -12134,11 +12183,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12134
12183
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12135
12184
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
12136
12185
|
/* harmony export */ });
|
|
12137
|
-
/* global console */
|
|
12186
|
+
/* global console process */
|
|
12138
12187
|
/* eslint-disable no-console */
|
|
12139
12188
|
|
|
12140
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
12141
12189
|
function warn(message) {
|
|
12190
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
12191
|
+
// @ts-ignore - Webpack DefinePlugin will replace process.env.NODE_ENV
|
|
12142
12192
|
if (true) {
|
|
12143
12193
|
if (console && console.warn) {
|
|
12144
12194
|
console.warn(message);
|
|
@@ -12562,13 +12612,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12562
12612
|
/* harmony export */ "approximateTextSize": function() { return /* binding */ approximateTextSize; },
|
|
12563
12613
|
/* harmony export */ "convertLengthToPixels": function() { return /* binding */ convertLengthToPixels; }
|
|
12564
12614
|
/* harmony export */ });
|
|
12565
|
-
/* harmony import */ var
|
|
12566
|
-
/* harmony import */ var
|
|
12567
|
-
/* harmony import */ var
|
|
12568
|
-
/* harmony import */ var
|
|
12569
|
-
|
|
12570
|
-
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
12615
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
12616
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
12617
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/memoize */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js");
|
|
12618
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_memoize__WEBPACK_IMPORTED_MODULE_1__);
|
|
12619
|
+
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
12571
12620
|
/* eslint-disable no-magic-numbers */
|
|
12621
|
+
|
|
12622
|
+
|
|
12623
|
+
|
|
12572
12624
|
// Based on measuring specific character widths
|
|
12573
12625
|
// as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
|
|
12574
12626
|
// For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
|
|
@@ -12747,7 +12799,7 @@ const convertLengthToPixels = (length, fontSize) => {
|
|
|
12747
12799
|
};
|
|
12748
12800
|
const _prepareParams = (inputStyle, index) => {
|
|
12749
12801
|
const lineStyle = Array.isArray(inputStyle) ? inputStyle[index] : inputStyle;
|
|
12750
|
-
const style =
|
|
12802
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, lineStyle, defaultStyle);
|
|
12751
12803
|
return Object.assign({}, style, {
|
|
12752
12804
|
fontFamily: style.fontFamily,
|
|
12753
12805
|
letterSpacing: typeof style.letterSpacing === "number" ? style.letterSpacing : convertLengthToPixels(String(style.letterSpacing), style.fontSize),
|
|
@@ -12795,7 +12847,7 @@ const _approximateDimensionsInternal = (text, style) => {
|
|
|
12795
12847
|
height: heightWithRotate * coefficients.heightOverlapCoef
|
|
12796
12848
|
};
|
|
12797
12849
|
};
|
|
12798
|
-
const _getMeasurementContainer =
|
|
12850
|
+
const _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
12799
12851
|
const element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
12800
12852
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
12801
12853
|
element.setAttribute("width", "300");
|
|
@@ -12816,7 +12868,7 @@ const styleToKeyComponent = style => {
|
|
|
12816
12868
|
}
|
|
12817
12869
|
return `${style.angle}:${style.fontFamily}:${style.fontSize}:${style.letterSpacing}:${style.lineHeight}`;
|
|
12818
12870
|
};
|
|
12819
|
-
const _measureDimensionsInternal =
|
|
12871
|
+
const _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()((text, style) => {
|
|
12820
12872
|
let containerElement = _getMeasurementContainer();
|
|
12821
12873
|
if (!containerElement.isConnected) {
|
|
12822
12874
|
_getMeasurementContainer.cache.clear?.();
|
|
@@ -13025,16 +13077,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13025
13077
|
/* harmony export */ "getStyle": function() { return /* binding */ getStyle; },
|
|
13026
13078
|
/* harmony export */ "getWidth": function() { return /* binding */ getWidth; }
|
|
13027
13079
|
/* harmony export */ });
|
|
13028
|
-
/* harmony import */ var
|
|
13029
|
-
/* harmony import */ var
|
|
13030
|
-
/* harmony import */ var
|
|
13031
|
-
/* harmony import */ var
|
|
13080
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13081
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13082
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
13083
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
13032
13084
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
13033
13085
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_2__);
|
|
13034
|
-
/* harmony import */ var
|
|
13035
|
-
/* harmony import */ var
|
|
13036
|
-
/* harmony import */ var
|
|
13037
|
-
/* harmony import */ var
|
|
13086
|
+
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/groupBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/groupBy.js");
|
|
13087
|
+
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3__);
|
|
13088
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/uniqBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqBy.js");
|
|
13089
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
13038
13090
|
/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./axis */ "../../victory-core/es/victory-util/axis.js");
|
|
13039
13091
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style */ "../../victory-core/es/victory-util/style.js");
|
|
13040
13092
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
@@ -13128,7 +13180,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
13128
13180
|
maxDomain
|
|
13129
13181
|
};
|
|
13130
13182
|
let stack = 0;
|
|
13131
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
13183
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
13132
13184
|
parentProps = addBinsToParentPropsIfHistogram({
|
|
13133
13185
|
children,
|
|
13134
13186
|
props,
|
|
@@ -13142,7 +13194,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
13142
13194
|
if (!_data__WEBPACK_IMPORTED_MODULE_7__.isDataComponent(child)) {
|
|
13143
13195
|
return null;
|
|
13144
13196
|
} else if (child.type && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(child.type.getData)) {
|
|
13145
|
-
childElement = parent ? /*#__PURE__*/
|
|
13197
|
+
childElement = parent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, parent.props) : child;
|
|
13146
13198
|
childData = childElement.type.getData(childProps);
|
|
13147
13199
|
} else {
|
|
13148
13200
|
childData = _data__WEBPACK_IMPORTED_MODULE_7__.getData(childProps);
|
|
@@ -13154,16 +13206,16 @@ function getDataFromChildren(props, childComponents) {
|
|
|
13154
13206
|
}, datum));
|
|
13155
13207
|
};
|
|
13156
13208
|
const stacked = children.filter(c => c.type && c.type.role === "stack").length;
|
|
13157
|
-
const combine = (memo, val) => memo.concat(
|
|
13209
|
+
const combine = (memo, val) => memo.concat(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default()(val, "_group"));
|
|
13158
13210
|
const datasets = _helpers__WEBPACK_IMPORTED_MODULE_6__.reduceChildren(children, iteratee, props, [], combine);
|
|
13159
13211
|
const group = stacked ? "_group" : "_stack";
|
|
13160
|
-
return Object.values(
|
|
13212
|
+
return Object.values(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default()(datasets, group));
|
|
13161
13213
|
}
|
|
13162
13214
|
function getData(props, childComponents) {
|
|
13163
13215
|
if (props.data) {
|
|
13164
13216
|
return _data__WEBPACK_IMPORTED_MODULE_7__.getData(props);
|
|
13165
13217
|
}
|
|
13166
|
-
return getDataFromChildren(props, childComponents ||
|
|
13218
|
+
return getDataFromChildren(props, childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
13167
13219
|
}
|
|
13168
13220
|
function getWidth(props, groupLength, seriesLength) {
|
|
13169
13221
|
const {
|
|
@@ -13215,7 +13267,7 @@ function getDefaultDomainPadding(props, axis, childComponents) {
|
|
|
13215
13267
|
};
|
|
13216
13268
|
}
|
|
13217
13269
|
function getDomainFromChildren(props, axis, childComponents) {
|
|
13218
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
13270
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
13219
13271
|
const parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_7__.getData(props) : undefined;
|
|
13220
13272
|
const {
|
|
13221
13273
|
polar,
|
|
@@ -13253,7 +13305,7 @@ function getDomainFromChildren(props, axis, childComponents) {
|
|
|
13253
13305
|
return [min, max];
|
|
13254
13306
|
}
|
|
13255
13307
|
function getDomain(props, axis, childComponents) {
|
|
13256
|
-
const children = childComponents ||
|
|
13308
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
13257
13309
|
const propsDomain = _domain__WEBPACK_IMPORTED_MODULE_8__.getDomainFromProps(props, axis);
|
|
13258
13310
|
const domainPadding = getDefaultDomainPadding(props, axis, children);
|
|
13259
13311
|
let domain;
|
|
@@ -13277,7 +13329,7 @@ function getScale(props, axis, childComponents) {
|
|
|
13277
13329
|
if (props.data) {
|
|
13278
13330
|
return _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis);
|
|
13279
13331
|
}
|
|
13280
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
13332
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
13281
13333
|
const iteratee = child => {
|
|
13282
13334
|
const sharedProps = Object.assign({}, child.props, {
|
|
13283
13335
|
horizontal: props.horizontal
|
|
@@ -13346,8 +13398,8 @@ function getChildStyle(child, index, calculatedProps, theme) {
|
|
|
13346
13398
|
const dataWidth = role === "stack" ? {} : {
|
|
13347
13399
|
width: getWidth(calculatedProps)
|
|
13348
13400
|
};
|
|
13349
|
-
const dataStyle =
|
|
13350
|
-
const labelsStyle =
|
|
13401
|
+
const dataStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, childStyle.data, Object.assign({}, dataWidth, style.data, defaultColor));
|
|
13402
|
+
const labelsStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, childStyle.labels, style.labels);
|
|
13351
13403
|
return {
|
|
13352
13404
|
...childStyle,
|
|
13353
13405
|
parent: style.parent,
|
|
@@ -13403,7 +13455,7 @@ function getCategoryAndAxisStringsFromChildren(props, axis, childComponents) {
|
|
|
13403
13455
|
return lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default()([...categoryStrings, ...axisStrings].flat());
|
|
13404
13456
|
}
|
|
13405
13457
|
function getStringsFromChildren(props, childComponents) {
|
|
13406
|
-
const children = childComponents ||
|
|
13458
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
13407
13459
|
const xStrings = getCategoryAndAxisStringsFromChildren(props, "x", children);
|
|
13408
13460
|
const yStrings = getCategoryAndAxisStringsFromChildren(props, "y", children);
|
|
13409
13461
|
const dataStrings = getStringsFromData(children);
|
|
@@ -13438,10 +13490,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13438
13490
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13439
13491
|
/* harmony export */ "CursorHelpers": function() { return /* binding */ CursorHelpers; }
|
|
13440
13492
|
/* harmony export */ });
|
|
13441
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
13442
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_0__);
|
|
13443
13493
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
13444
13494
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
|
|
13495
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
13496
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_0__);
|
|
13445
13497
|
|
|
13446
13498
|
|
|
13447
13499
|
const ON_MOUSE_MOVE_THROTTLE_MS = 16;
|
|
@@ -13559,16 +13611,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13559
13611
|
/* harmony export */ "VictoryCursorContainer": function() { return /* binding */ VictoryCursorContainer; },
|
|
13560
13612
|
/* harmony export */ "useVictoryCursorContainer": function() { return /* binding */ useVictoryCursorContainer; }
|
|
13561
13613
|
/* harmony export */ });
|
|
13562
|
-
/* harmony import */ var
|
|
13563
|
-
/* harmony import */ var
|
|
13564
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
13565
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
13566
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
13567
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
13614
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13615
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13568
13616
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
|
|
13569
13617
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line-segment.js");
|
|
13570
13618
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
13571
13619
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
13620
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
13621
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
13622
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
13623
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
13572
13624
|
/* harmony import */ var _cursor_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cursor-helpers */ "../../victory-cursor-container/es/cursor-helpers.js");
|
|
13573
13625
|
|
|
13574
13626
|
|
|
@@ -13576,12 +13628,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13576
13628
|
|
|
13577
13629
|
|
|
13578
13630
|
const VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS = {
|
|
13579
|
-
cursorLabelComponent: /*#__PURE__*/
|
|
13631
|
+
cursorLabelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.VictoryLabel, null),
|
|
13580
13632
|
cursorLabelOffset: {
|
|
13581
13633
|
x: 5,
|
|
13582
13634
|
y: -10
|
|
13583
13635
|
},
|
|
13584
|
-
cursorComponent: /*#__PURE__*/
|
|
13636
|
+
cursorComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.LineSegment, null)
|
|
13585
13637
|
};
|
|
13586
13638
|
const useVictoryCursorContainer = initialProps => {
|
|
13587
13639
|
const props = {
|
|
@@ -13627,11 +13679,11 @@ const useVictoryCursorContainer = initialProps => {
|
|
|
13627
13679
|
const getPadding = () => {
|
|
13628
13680
|
if (props.padding === undefined) {
|
|
13629
13681
|
const child = Array.isArray(props.children) ? props.children.find(c => {
|
|
13630
|
-
return
|
|
13682
|
+
return lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(c.props) && c.props.padding !== undefined;
|
|
13631
13683
|
}) : props.children;
|
|
13632
|
-
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(child?.props);
|
|
13684
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(child?.props?.padding);
|
|
13633
13685
|
}
|
|
13634
|
-
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(props);
|
|
13686
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(props.padding);
|
|
13635
13687
|
};
|
|
13636
13688
|
const getCursorElements = () => {
|
|
13637
13689
|
const {
|
|
@@ -13674,7 +13726,7 @@ const useVictoryCursorContainer = initialProps => {
|
|
|
13674
13726
|
const tooltipTheme = theme && theme.tooltip || {};
|
|
13675
13727
|
labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps, tooltipTheme);
|
|
13676
13728
|
}
|
|
13677
|
-
newElements.push( /*#__PURE__*/
|
|
13729
|
+
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(cursorLabelComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps, {
|
|
13678
13730
|
text: victory_core__WEBPACK_IMPORTED_MODULE_5__.evaluateProp(cursorLabel, labelProps)
|
|
13679
13731
|
})));
|
|
13680
13732
|
}
|
|
@@ -13682,7 +13734,7 @@ const useVictoryCursorContainer = initialProps => {
|
|
|
13682
13734
|
stroke: "black"
|
|
13683
13735
|
}, cursorComponent.props.style);
|
|
13684
13736
|
if (cursorDimension === "x" || cursorDimension === undefined) {
|
|
13685
|
-
newElements.push( /*#__PURE__*/
|
|
13737
|
+
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(cursorComponent, {
|
|
13686
13738
|
key: `${name}-x-cursor`,
|
|
13687
13739
|
x1: cursorCoordinates.x,
|
|
13688
13740
|
x2: cursorCoordinates.x,
|
|
@@ -13692,7 +13744,7 @@ const useVictoryCursorContainer = initialProps => {
|
|
|
13692
13744
|
}));
|
|
13693
13745
|
}
|
|
13694
13746
|
if (cursorDimension === "y" || cursorDimension === undefined) {
|
|
13695
|
-
newElements.push( /*#__PURE__*/
|
|
13747
|
+
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(cursorComponent, {
|
|
13696
13748
|
key: `${name}-y-cursor`,
|
|
13697
13749
|
x1: padding.left,
|
|
13698
13750
|
x2: (typeof width === "number" ? width : 0) - padding.right,
|
|
@@ -13705,7 +13757,7 @@ const useVictoryCursorContainer = initialProps => {
|
|
|
13705
13757
|
};
|
|
13706
13758
|
return {
|
|
13707
13759
|
props,
|
|
13708
|
-
children: [...
|
|
13760
|
+
children: [...react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children), ...getCursorElements()]
|
|
13709
13761
|
};
|
|
13710
13762
|
};
|
|
13711
13763
|
const VictoryCursorContainer = initialProps => {
|
|
@@ -13713,7 +13765,7 @@ const VictoryCursorContainer = initialProps => {
|
|
|
13713
13765
|
props,
|
|
13714
13766
|
children
|
|
13715
13767
|
} = useVictoryCursorContainer(initialProps);
|
|
13716
|
-
return /*#__PURE__*/
|
|
13768
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.VictoryContainer, props, children);
|
|
13717
13769
|
};
|
|
13718
13770
|
VictoryCursorContainer.role = "container";
|
|
13719
13771
|
VictoryCursorContainer.defaultEvents = initialProps => {
|
|
@@ -13750,13 +13802,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13750
13802
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13751
13803
|
/* harmony export */ "SelectionHelpers": function() { return /* binding */ SelectionHelpers; }
|
|
13752
13804
|
/* harmony export */ });
|
|
13753
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
13754
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_0__);
|
|
13755
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
13756
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
13757
13805
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
13758
13806
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
13759
13807
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
|
|
13808
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
13809
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
13810
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
13811
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);
|
|
13760
13812
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
13761
13813
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
13762
13814
|
|
|
@@ -13874,7 +13926,7 @@ class SelectionHelpersClass {
|
|
|
13874
13926
|
parentSVG
|
|
13875
13927
|
};
|
|
13876
13928
|
if (selectedData && victory_core__WEBPACK_IMPORTED_MODULE_4__.isFunction(targetProps.onSelectionCleared)) {
|
|
13877
|
-
targetProps.onSelectionCleared(
|
|
13929
|
+
targetProps.onSelectionCleared(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, mutatedProps, targetProps));
|
|
13878
13930
|
}
|
|
13879
13931
|
const parentMutation = [{
|
|
13880
13932
|
target: "parent",
|
|
@@ -13918,7 +13970,7 @@ class SelectionHelpersClass {
|
|
|
13918
13970
|
}
|
|
13919
13971
|
};
|
|
13920
13972
|
};
|
|
13921
|
-
onMouseMove =
|
|
13973
|
+
onMouseMove = lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(this.handleMouseMove, ON_MOUSE_MOVE_THROTTLE_MS, {
|
|
13922
13974
|
leading: true,
|
|
13923
13975
|
trailing: false
|
|
13924
13976
|
});
|
|
@@ -13958,7 +14010,7 @@ class SelectionHelpersClass {
|
|
|
13958
14010
|
y1: null,
|
|
13959
14011
|
y2: null
|
|
13960
14012
|
};
|
|
13961
|
-
const callbackMutation = selectedData && victory_core__WEBPACK_IMPORTED_MODULE_4__.isFunction(targetProps.onSelection) ? targetProps.onSelection(selectedData, bounds,
|
|
14013
|
+
const callbackMutation = selectedData && victory_core__WEBPACK_IMPORTED_MODULE_4__.isFunction(targetProps.onSelection) ? targetProps.onSelection(selectedData, bounds, lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, mutatedProps, targetProps)) : {};
|
|
13962
14014
|
const parentMutation = [{
|
|
13963
14015
|
target: "parent",
|
|
13964
14016
|
mutation: () => mutatedProps
|
|
@@ -14090,10 +14142,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14090
14142
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14091
14143
|
/* harmony export */ "Flyout": function() { return /* binding */ Flyout; }
|
|
14092
14144
|
/* harmony export */ });
|
|
14093
|
-
/* harmony import */ var
|
|
14094
|
-
/* harmony import */ var
|
|
14095
|
-
/* harmony import */ var
|
|
14096
|
-
/* harmony import */ var
|
|
14145
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14146
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14147
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
14148
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
14097
14149
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
14098
14150
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
14099
14151
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
@@ -14187,12 +14239,12 @@ const evaluateProps = props => {
|
|
|
14187
14239
|
};
|
|
14188
14240
|
};
|
|
14189
14241
|
const defaultProps = {
|
|
14190
|
-
pathComponent: /*#__PURE__*/
|
|
14242
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
14191
14243
|
role: "presentation",
|
|
14192
14244
|
shapeRendering: "auto"
|
|
14193
14245
|
};
|
|
14194
14246
|
const Flyout = initialProps => {
|
|
14195
|
-
const props = evaluateProps(
|
|
14247
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
14196
14248
|
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.getSafeUserProps(props);
|
|
14197
14249
|
|
|
14198
14250
|
// check for required props for this subcomponent
|
|
@@ -14217,7 +14269,7 @@ const Flyout = initialProps => {
|
|
|
14217
14269
|
x: props.x,
|
|
14218
14270
|
y: props.y
|
|
14219
14271
|
};
|
|
14220
|
-
return /*#__PURE__*/
|
|
14272
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
14221
14273
|
...props.events,
|
|
14222
14274
|
...userProps,
|
|
14223
14275
|
style: props.style,
|
|
@@ -14243,22 +14295,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14243
14295
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14244
14296
|
/* harmony export */ "VictoryTooltip": function() { return /* binding */ VictoryTooltip; }
|
|
14245
14297
|
/* harmony export */ });
|
|
14246
|
-
/* harmony import */ var
|
|
14247
|
-
/* harmony import */ var
|
|
14248
|
-
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
14249
|
-
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__);
|
|
14250
|
-
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
14251
|
-
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
14252
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
14253
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_3__);
|
|
14254
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
|
|
14255
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
14298
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14299
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14256
14300
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
|
|
14257
14301
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/label-helpers.js");
|
|
14258
14302
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
|
|
14259
14303
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
14260
14304
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/textsize.js");
|
|
14261
14305
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-portal/victory-portal.js");
|
|
14306
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
14307
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
14308
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
14309
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
14310
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
14311
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__);
|
|
14312
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
|
|
14313
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
14262
14314
|
/* harmony import */ var _flyout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./flyout */ "../../victory-tooltip/es/flyout.js");
|
|
14263
14315
|
|
|
14264
14316
|
|
|
@@ -14272,15 +14324,15 @@ const fallbackProps = {
|
|
|
14272
14324
|
pointerLength: 10,
|
|
14273
14325
|
pointerWidth: 10
|
|
14274
14326
|
};
|
|
14275
|
-
class VictoryTooltip extends (
|
|
14327
|
+
class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
14276
14328
|
static displayName = "VictoryTooltip";
|
|
14277
14329
|
static role = "tooltip";
|
|
14278
14330
|
static defaultProps = {
|
|
14279
14331
|
active: false,
|
|
14280
14332
|
renderInPortal: true,
|
|
14281
|
-
labelComponent: /*#__PURE__*/
|
|
14282
|
-
flyoutComponent: /*#__PURE__*/
|
|
14283
|
-
groupComponent: /*#__PURE__*/
|
|
14333
|
+
labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryLabel, null),
|
|
14334
|
+
flyoutComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_flyout__WEBPACK_IMPORTED_MODULE_6__.Flyout, null),
|
|
14335
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
14284
14336
|
};
|
|
14285
14337
|
static defaultEvents(props) {
|
|
14286
14338
|
const activate = props.activateData ? [{
|
|
@@ -14370,9 +14422,9 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14370
14422
|
getStyles(props) {
|
|
14371
14423
|
const theme = props.theme || victory_core__WEBPACK_IMPORTED_MODULE_8__.VictoryTheme.grayscale;
|
|
14372
14424
|
const defaultLabelStyles = theme && theme.tooltip && theme.tooltip.style ? theme.tooltip.style : {};
|
|
14373
|
-
const baseLabelStyle = Array.isArray(props.style) ? props.style.map(s =>
|
|
14425
|
+
const baseLabelStyle = Array.isArray(props.style) ? props.style.map(s => lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultLabelStyles)) : lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.style, defaultLabelStyles);
|
|
14374
14426
|
const defaultFlyoutStyles = theme && theme.tooltip && theme.tooltip.flyoutStyle ? theme.tooltip.flyoutStyle : {};
|
|
14375
|
-
const baseFlyoutStyle = props.flyoutStyle ?
|
|
14427
|
+
const baseFlyoutStyle = props.flyoutStyle ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.flyoutStyle, defaultFlyoutStyles) : defaultFlyoutStyles;
|
|
14376
14428
|
const style = Array.isArray(baseLabelStyle) ? baseLabelStyle.map(s => victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateStyle(s, props)) : victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateStyle(baseLabelStyle, props);
|
|
14377
14429
|
const flyoutStyle = victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateStyle(baseFlyoutStyle, Object.assign({}, props, {
|
|
14378
14430
|
style
|
|
@@ -14419,9 +14471,7 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14419
14471
|
flyoutStyle,
|
|
14420
14472
|
orientation
|
|
14421
14473
|
})) || this.getLabelPadding(style);
|
|
14422
|
-
const flyoutPadding = victory_core__WEBPACK_IMPORTED_MODULE_9__.getPadding(
|
|
14423
|
-
padding
|
|
14424
|
-
});
|
|
14474
|
+
const flyoutPadding = victory_core__WEBPACK_IMPORTED_MODULE_9__.getPadding(padding);
|
|
14425
14475
|
const pointerWidth = victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateProp(props.pointerWidth, Object.assign({}, props, {
|
|
14426
14476
|
active,
|
|
14427
14477
|
text,
|
|
@@ -14462,8 +14512,8 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14462
14512
|
pointerWidth,
|
|
14463
14513
|
pointerLength
|
|
14464
14514
|
});
|
|
14465
|
-
const offsetX =
|
|
14466
|
-
const offsetY =
|
|
14515
|
+
const offsetX = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(centerOffset) && centerOffset?.x !== undefined ? victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateProp(centerOffset.x, evaluatedProps) : 0;
|
|
14516
|
+
const offsetY = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(centerOffset) && centerOffset?.y !== undefined ? victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateProp(centerOffset.y, evaluatedProps) : 0;
|
|
14467
14517
|
return {
|
|
14468
14518
|
...evaluatedProps,
|
|
14469
14519
|
centerOffset: {
|
|
@@ -14580,8 +14630,8 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14580
14630
|
y: orientation === "top" || orientation === "bottom" ? y - ySign * (pointerLength + height / 2 - ySign * dy) : y + dy
|
|
14581
14631
|
};
|
|
14582
14632
|
const center = {
|
|
14583
|
-
x:
|
|
14584
|
-
y:
|
|
14633
|
+
x: lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.center) && props.center.x !== undefined ? props.center.x : flyoutCenter.x,
|
|
14634
|
+
y: lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.center) && props.center.y !== undefined ? props.center.y : flyoutCenter.y
|
|
14585
14635
|
};
|
|
14586
14636
|
const centerWithOffset = {
|
|
14587
14637
|
x: center.x + centerOffset.x,
|
|
@@ -14645,7 +14695,7 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14645
14695
|
const sign = textAnchor === "end" ? -1 : 1;
|
|
14646
14696
|
return flyoutCenter.x - sign * (labelSize.width / 2);
|
|
14647
14697
|
};
|
|
14648
|
-
return
|
|
14698
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelComponent.props, {
|
|
14649
14699
|
key: `${this.id}-label-${index}`,
|
|
14650
14700
|
text,
|
|
14651
14701
|
datum,
|
|
@@ -14680,7 +14730,7 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14680
14730
|
side: "left",
|
|
14681
14731
|
val: edges.left > point.x ? edges.left - point.x : -1
|
|
14682
14732
|
}];
|
|
14683
|
-
return
|
|
14733
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default()(gaps, "val", "desc")[0].side;
|
|
14684
14734
|
}
|
|
14685
14735
|
getFlyoutProps(props, calculatedValues) {
|
|
14686
14736
|
const {
|
|
@@ -14703,7 +14753,7 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14703
14753
|
flyoutComponent
|
|
14704
14754
|
} = props;
|
|
14705
14755
|
const pointerOrientation = victory_core__WEBPACK_IMPORTED_MODULE_9__.evaluateProp(props.pointerOrientation, props);
|
|
14706
|
-
return
|
|
14756
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, flyoutComponent.props, {
|
|
14707
14757
|
x,
|
|
14708
14758
|
y,
|
|
14709
14759
|
dx,
|
|
@@ -14743,12 +14793,12 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
14743
14793
|
groupComponent
|
|
14744
14794
|
} = evaluatedProps;
|
|
14745
14795
|
const calculatedValues = this.getCalculatedValues(evaluatedProps);
|
|
14746
|
-
const children = [/*#__PURE__*/
|
|
14747
|
-
const tooltip = /*#__PURE__*/
|
|
14796
|
+
const children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(flyoutComponent, this.getFlyoutProps(evaluatedProps, calculatedValues)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, this.getLabelProps(evaluatedProps, calculatedValues))];
|
|
14797
|
+
const tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(groupComponent, {
|
|
14748
14798
|
role: "presentation",
|
|
14749
14799
|
transform: calculatedValues.transform
|
|
14750
14800
|
}, children);
|
|
14751
|
-
return renderInPortal ? /*#__PURE__*/
|
|
14801
|
+
return renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_11__.VictoryPortal, null, tooltip) : tooltip;
|
|
14752
14802
|
}
|
|
14753
14803
|
render() {
|
|
14754
14804
|
const props = victory_core__WEBPACK_IMPORTED_MODULE_9__.modifyProps(this.props, fallbackProps, "tooltip");
|
|
@@ -14820,12 +14870,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14820
14870
|
/* harmony export */ "VictoryVoronoiContainer": function() { return /* binding */ VictoryVoronoiContainer; },
|
|
14821
14871
|
/* harmony export */ "useVictoryVoronoiContainer": function() { return /* binding */ useVictoryVoronoiContainer; }
|
|
14822
14872
|
/* harmony export */ });
|
|
14823
|
-
/* harmony import */ var
|
|
14824
|
-
/* harmony import */ var
|
|
14873
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14874
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14825
14875
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
14826
14876
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
14827
|
-
/* harmony import */ var
|
|
14828
|
-
/* harmony import */ var
|
|
14877
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
14878
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_2__);
|
|
14829
14879
|
/* harmony import */ var victory_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-tooltip */ "../../victory-tooltip/es/victory-tooltip.js");
|
|
14830
14880
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
14831
14881
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
@@ -14839,12 +14889,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14839
14889
|
const VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS = {
|
|
14840
14890
|
activateData: true,
|
|
14841
14891
|
activateLabels: true,
|
|
14842
|
-
labelComponent: /*#__PURE__*/
|
|
14892
|
+
labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_tooltip__WEBPACK_IMPORTED_MODULE_3__.VictoryTooltip, null),
|
|
14843
14893
|
voronoiPadding: 5
|
|
14844
14894
|
};
|
|
14845
14895
|
const getPoint = point => {
|
|
14846
14896
|
const whitelist = ["_x", "_x1", "_x0", "_y", "_y1", "_y0"];
|
|
14847
|
-
return
|
|
14897
|
+
return lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(point, whitelist);
|
|
14848
14898
|
};
|
|
14849
14899
|
const useVictoryVoronoiContainer = initialProps => {
|
|
14850
14900
|
const props = {
|
|
@@ -14871,6 +14921,8 @@ const useVictoryVoronoiContainer = initialProps => {
|
|
|
14871
14921
|
} = props;
|
|
14872
14922
|
const voronoiDimension = getDimension();
|
|
14873
14923
|
const point = getPoint(points[0]);
|
|
14924
|
+
|
|
14925
|
+
// @ts-expect-error scale is defined but the types do not reflect that
|
|
14874
14926
|
const basePosition = victory_core__WEBPACK_IMPORTED_MODULE_4__.scalePoint(props, point);
|
|
14875
14927
|
let center = mouseFollowTooltips ? mousePosition : undefined;
|
|
14876
14928
|
if (!voronoiDimension || points.length < 2) {
|
|
@@ -14999,13 +15051,13 @@ const useVictoryVoronoiContainer = initialProps => {
|
|
|
14999
15051
|
text
|
|
15000
15052
|
} = labelProps;
|
|
15001
15053
|
const showLabel = Array.isArray(text) ? text.filter(Boolean).length : text;
|
|
15002
|
-
return showLabel ? /*#__PURE__*/
|
|
15054
|
+
return showLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps) : null;
|
|
15003
15055
|
}
|
|
15004
15056
|
return null;
|
|
15005
15057
|
};
|
|
15006
15058
|
return {
|
|
15007
15059
|
props,
|
|
15008
|
-
children: [...
|
|
15060
|
+
children: [...react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children), getTooltip()]
|
|
15009
15061
|
};
|
|
15010
15062
|
};
|
|
15011
15063
|
const VictoryVoronoiContainer = initialProps => {
|
|
@@ -15013,7 +15065,7 @@ const VictoryVoronoiContainer = initialProps => {
|
|
|
15013
15065
|
props,
|
|
15014
15066
|
children
|
|
15015
15067
|
} = useVictoryVoronoiContainer(initialProps);
|
|
15016
|
-
return /*#__PURE__*/
|
|
15068
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryContainer, props, children);
|
|
15017
15069
|
};
|
|
15018
15070
|
VictoryVoronoiContainer.role = "container";
|
|
15019
15071
|
VictoryVoronoiContainer.defaultEvents = initialProps => {
|
|
@@ -15058,16 +15110,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15058
15110
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15059
15111
|
/* harmony export */ "VoronoiHelpers": function() { return /* binding */ VoronoiHelpers; }
|
|
15060
15112
|
/* harmony export */ });
|
|
15061
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
15062
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_0__);
|
|
15063
|
-
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isRegExp */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js");
|
|
15064
|
-
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1__);
|
|
15065
|
-
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
15066
|
-
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
15067
15113
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
15068
15114
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
|
|
15069
15115
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
15070
15116
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
|
|
15117
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
15118
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
15119
|
+
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isRegExp */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js");
|
|
15120
|
+
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1__);
|
|
15121
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
15122
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_2__);
|
|
15071
15123
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
|
|
15072
15124
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
15073
15125
|
/* harmony import */ var delaunay_find_lib_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! delaunay-find/lib/index.js */ "../../../node_modules/.pnpm/delaunay-find@0.0.6/node_modules/delaunay-find/lib/index.js");
|
|
@@ -15090,7 +15142,7 @@ class VoronoiHelpersClass {
|
|
|
15090
15142
|
origin,
|
|
15091
15143
|
scale
|
|
15092
15144
|
} = props;
|
|
15093
|
-
const padding = victory_core__WEBPACK_IMPORTED_MODULE_6__.getPadding(props
|
|
15145
|
+
const padding = victory_core__WEBPACK_IMPORTED_MODULE_6__.getPadding(props.voronoiPadding);
|
|
15094
15146
|
const {
|
|
15095
15147
|
x,
|
|
15096
15148
|
y
|
|
@@ -15205,7 +15257,7 @@ class VoronoiHelpersClass {
|
|
|
15205
15257
|
}
|
|
15206
15258
|
const defaultTarget = activateData ? ["data"] : [];
|
|
15207
15259
|
const targets = labels && !activateLabels ? defaultTarget : defaultTarget.concat("labels");
|
|
15208
|
-
if (
|
|
15260
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targets)) {
|
|
15209
15261
|
return [];
|
|
15210
15262
|
}
|
|
15211
15263
|
return targets.map(target => {
|
|
@@ -15235,7 +15287,7 @@ class VoronoiHelpersClass {
|
|
|
15235
15287
|
}
|
|
15236
15288
|
const defaultTarget = activateData ? ["data"] : [];
|
|
15237
15289
|
const targets = labels && !activateLabels ? defaultTarget : defaultTarget.concat("labels");
|
|
15238
|
-
if (
|
|
15290
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targets)) {
|
|
15239
15291
|
return [];
|
|
15240
15292
|
}
|
|
15241
15293
|
return targets.map(target => {
|
|
@@ -15302,7 +15354,7 @@ class VoronoiHelpersClass {
|
|
|
15302
15354
|
const inactiveMutations = activePoints.length ? activePoints.map(point => this.getInactiveMutations(targetProps, point)) : [];
|
|
15303
15355
|
return parentMutations.concat(...inactiveMutations, ...activeMutations);
|
|
15304
15356
|
};
|
|
15305
|
-
onMouseMove =
|
|
15357
|
+
onMouseMove = lodash_throttle__WEBPACK_IMPORTED_MODULE_2___default()(this.handleMouseMove, ON_MOUSE_MOVE_THROTTLE_MS, {
|
|
15306
15358
|
leading: true,
|
|
15307
15359
|
trailing: false
|
|
15308
15360
|
});
|
|
@@ -15324,21 +15376,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15324
15376
|
/* harmony export */ "VictoryZoomContainer": function() { return /* binding */ VictoryZoomContainer; },
|
|
15325
15377
|
/* harmony export */ "useVictoryZoomContainer": function() { return /* binding */ useVictoryZoomContainer; }
|
|
15326
15378
|
/* harmony export */ });
|
|
15327
|
-
/* harmony import */ var
|
|
15328
|
-
/* harmony import */ var
|
|
15329
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
15330
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
15379
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15380
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15331
15381
|
/* harmony import */ var _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./zoom-helpers */ "../../victory-zoom-container/es/zoom-helpers.js");
|
|
15332
15382
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-clip-container/victory-clip-container.js");
|
|
15333
15383
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
15334
15384
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
15385
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
15386
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
15335
15387
|
|
|
15336
15388
|
|
|
15337
15389
|
|
|
15338
15390
|
|
|
15339
15391
|
const DEFAULT_DOWNSAMPLE = 150;
|
|
15340
15392
|
const VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS = {
|
|
15341
|
-
clipContainerComponent: /*#__PURE__*/
|
|
15393
|
+
clipContainerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_2__.VictoryClipContainer, null),
|
|
15342
15394
|
allowPan: true,
|
|
15343
15395
|
allowZoom: true,
|
|
15344
15396
|
zoomActive: false
|
|
@@ -15394,12 +15446,12 @@ const useVictoryZoomContainer = initialProps => {
|
|
|
15394
15446
|
const visibleData = data.slice(startIndex, endIndex);
|
|
15395
15447
|
return victory_core__WEBPACK_IMPORTED_MODULE_3__.downsample(visibleData, maxPoints, startIndex);
|
|
15396
15448
|
};
|
|
15397
|
-
const modifiedChildren =
|
|
15449
|
+
const modifiedChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children).map(child => {
|
|
15398
15450
|
const role = child.type && child.type.role;
|
|
15399
15451
|
const isDataComponent = victory_core__WEBPACK_IMPORTED_MODULE_3__.isDataComponent(child);
|
|
15400
|
-
const originalDomain =
|
|
15401
|
-
const zoomDomain =
|
|
15402
|
-
const cachedZoomDomain =
|
|
15452
|
+
const originalDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.originalDomain, props.domain);
|
|
15453
|
+
const zoomDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.zoomDomain, props.domain);
|
|
15454
|
+
const cachedZoomDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.cachedZoomDomain, props.domain);
|
|
15403
15455
|
let domain;
|
|
15404
15456
|
if (!_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.checkDomainEquality(zoomDomain, cachedZoomDomain)) {
|
|
15405
15457
|
// if zoomDomain has been changed, use it
|
|
@@ -15409,7 +15461,7 @@ const useVictoryZoomContainer = initialProps => {
|
|
|
15409
15461
|
domain = child.props.domain;
|
|
15410
15462
|
} else {
|
|
15411
15463
|
// default: use currentDomain, set by the event handlers
|
|
15412
|
-
domain =
|
|
15464
|
+
domain = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, currentDomain, originalDomain);
|
|
15413
15465
|
}
|
|
15414
15466
|
let newDomain = props.polar ? {
|
|
15415
15467
|
x: originalDomain.x,
|
|
@@ -15430,7 +15482,7 @@ const useVictoryZoomContainer = initialProps => {
|
|
|
15430
15482
|
} : {
|
|
15431
15483
|
domain: newDomain
|
|
15432
15484
|
};
|
|
15433
|
-
const newChild = /*#__PURE__*/
|
|
15485
|
+
const newChild = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(childProps, child.props));
|
|
15434
15486
|
|
|
15435
15487
|
// Clip data components
|
|
15436
15488
|
if (victory_core__WEBPACK_IMPORTED_MODULE_3__.isDataComponent(newChild)) {
|
|
@@ -15439,7 +15491,7 @@ const useVictoryZoomContainer = initialProps => {
|
|
|
15439
15491
|
const plottableWidth = Math.abs(rangeX[0] - rangeX[1]);
|
|
15440
15492
|
const plottableHeight = Math.abs(rangeY[0] - rangeY[1]);
|
|
15441
15493
|
const radius = Math.max(...rangeY);
|
|
15442
|
-
const groupComponent = /*#__PURE__*/
|
|
15494
|
+
const groupComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(clipContainerComponent, {
|
|
15443
15495
|
clipWidth: plottableWidth,
|
|
15444
15496
|
clipHeight: plottableHeight,
|
|
15445
15497
|
translateX: Math.min(...rangeX),
|
|
@@ -15449,7 +15501,7 @@ const useVictoryZoomContainer = initialProps => {
|
|
|
15449
15501
|
radius: polar ? radius : undefined,
|
|
15450
15502
|
...clipContainerComponent.props
|
|
15451
15503
|
});
|
|
15452
|
-
return /*#__PURE__*/
|
|
15504
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(newChild, {
|
|
15453
15505
|
groupComponent
|
|
15454
15506
|
});
|
|
15455
15507
|
}
|
|
@@ -15465,7 +15517,7 @@ const VictoryZoomContainer = initialProps => {
|
|
|
15465
15517
|
props,
|
|
15466
15518
|
children
|
|
15467
15519
|
} = useVictoryZoomContainer(initialProps);
|
|
15468
|
-
return /*#__PURE__*/
|
|
15520
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryContainer, props, children);
|
|
15469
15521
|
};
|
|
15470
15522
|
VictoryZoomContainer.role = "container";
|
|
15471
15523
|
VictoryZoomContainer.defaultEvents = initialProps => {
|
|
@@ -15509,22 +15561,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15509
15561
|
/* harmony export */ "RawZoomHelpers": function() { return /* binding */ RawZoomHelpers; },
|
|
15510
15562
|
/* harmony export */ "ZoomHelpers": function() { return /* binding */ ZoomHelpers; }
|
|
15511
15563
|
/* harmony export */ });
|
|
15512
|
-
/* harmony import */ var
|
|
15513
|
-
/* harmony import */ var
|
|
15564
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15565
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15514
15566
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
15515
15567
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
15516
|
-
/* harmony import */ var
|
|
15517
|
-
/* harmony import */ var
|
|
15518
|
-
/* harmony import */ var
|
|
15519
|
-
/* harmony import */ var
|
|
15568
|
+
/* harmony import */ var lodash_delay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/delay */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/delay.js");
|
|
15569
|
+
/* harmony import */ var lodash_delay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_delay__WEBPACK_IMPORTED_MODULE_2__);
|
|
15570
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/throttle */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js");
|
|
15571
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_3__);
|
|
15520
15572
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
|
|
15521
15573
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
|
|
15522
15574
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/wrapper.js");
|
|
15523
15575
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
15576
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/
|
|
15524
15577
|
|
|
15525
15578
|
|
|
15526
15579
|
|
|
15527
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/
|
|
15528
15580
|
|
|
15529
15581
|
|
|
15530
15582
|
const RawZoomHelpers = {
|
|
@@ -15658,7 +15710,7 @@ const RawZoomHelpers = {
|
|
|
15658
15710
|
transitionTimer.resumeAnimation();
|
|
15659
15711
|
};
|
|
15660
15712
|
// delay the callback that resumes animation by ~1 frame so that animation does not interfere with wheel events
|
|
15661
|
-
return
|
|
15713
|
+
return lodash_delay__WEBPACK_IMPORTED_MODULE_2___default()(resumeAnimation, 16); // eslint-disable-line no-magic-numbers
|
|
15662
15714
|
},
|
|
15663
15715
|
getLastDomain(targetProps, originalDomain) {
|
|
15664
15716
|
const {
|
|
@@ -15679,7 +15731,7 @@ const RawZoomHelpers = {
|
|
|
15679
15731
|
children,
|
|
15680
15732
|
zoomDimension
|
|
15681
15733
|
} = props;
|
|
15682
|
-
const childComponents =
|
|
15734
|
+
const childComponents = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);
|
|
15683
15735
|
let childrenDomain = {};
|
|
15684
15736
|
if (childComponents.length) {
|
|
15685
15737
|
childrenDomain = zoomDimension ? {
|
|
@@ -15838,13 +15890,13 @@ const ZoomHelpers = {
|
|
|
15838
15890
|
onMouseDown: RawZoomHelpers.onMouseDown.bind(RawZoomHelpers),
|
|
15839
15891
|
onMouseUp: RawZoomHelpers.onMouseUp.bind(RawZoomHelpers),
|
|
15840
15892
|
onMouseLeave: RawZoomHelpers.onMouseLeave.bind(RawZoomHelpers),
|
|
15841
|
-
onMouseMove:
|
|
15893
|
+
onMouseMove: lodash_throttle__WEBPACK_IMPORTED_MODULE_3___default()(RawZoomHelpers.onMouseMove.bind(RawZoomHelpers), 16,
|
|
15842
15894
|
// eslint-disable-line no-magic-numbers
|
|
15843
15895
|
{
|
|
15844
15896
|
leading: true,
|
|
15845
15897
|
trailing: false
|
|
15846
15898
|
}),
|
|
15847
|
-
onWheel:
|
|
15899
|
+
onWheel: lodash_throttle__WEBPACK_IMPORTED_MODULE_3___default()(RawZoomHelpers.onWheel.bind(RawZoomHelpers), 16,
|
|
15848
15900
|
// eslint-disable-line no-magic-numbers
|
|
15849
15901
|
{
|
|
15850
15902
|
leading: true,
|