victory 37.0.1 → 37.0.3-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/victory.js +1475 -1677
- package/dist/victory.min.js +1 -1
- package/es/index.d.ts +27 -27
- package/lib/index.d.ts +27 -27
- package/package.json +28 -31
package/dist/victory.js
CHANGED
|
@@ -1995,33 +1995,6 @@ function serializer(replacer, cycleReplacer) {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
|
|
1997
1997
|
|
|
1998
|
-
/***/ }),
|
|
1999
|
-
|
|
2000
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_LodashWrapper.js":
|
|
2001
|
-
/*!****************************************************************************************!*\
|
|
2002
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_LodashWrapper.js ***!
|
|
2003
|
-
\****************************************************************************************/
|
|
2004
|
-
/***/ (function(module) {
|
|
2005
|
-
|
|
2006
|
-
/**
|
|
2007
|
-
* This method returns `undefined`.
|
|
2008
|
-
*
|
|
2009
|
-
* @static
|
|
2010
|
-
* @memberOf _
|
|
2011
|
-
* @since 2.3.0
|
|
2012
|
-
* @category Util
|
|
2013
|
-
* @example
|
|
2014
|
-
*
|
|
2015
|
-
* _.times(2, _.noop);
|
|
2016
|
-
* // => [undefined, undefined]
|
|
2017
|
-
*/
|
|
2018
|
-
function noop() {
|
|
2019
|
-
// No operation performed.
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
module.exports = noop;
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
1998
|
/***/ }),
|
|
2026
1999
|
|
|
2027
2000
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js":
|
|
@@ -4147,94 +4120,6 @@ function createBaseFor(fromRight) {
|
|
|
4147
4120
|
module.exports = createBaseFor;
|
|
4148
4121
|
|
|
4149
4122
|
|
|
4150
|
-
/***/ }),
|
|
4151
|
-
|
|
4152
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createFlow.js":
|
|
4153
|
-
/*!*************************************************************************************!*\
|
|
4154
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createFlow.js ***!
|
|
4155
|
-
\*************************************************************************************/
|
|
4156
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
4157
|
-
|
|
4158
|
-
var LodashWrapper = __webpack_require__(/*! ./_LodashWrapper */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_LodashWrapper.js"),
|
|
4159
|
-
flatRest = __webpack_require__(/*! ./_flatRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js"),
|
|
4160
|
-
getData = __webpack_require__(/*! ./_getData */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getData.js"),
|
|
4161
|
-
getFuncName = __webpack_require__(/*! ./_getFuncName */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getFuncName.js"),
|
|
4162
|
-
isArray = __webpack_require__(/*! ./isArray */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"),
|
|
4163
|
-
isLaziable = __webpack_require__(/*! ./_isLaziable */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isLaziable.js");
|
|
4164
|
-
|
|
4165
|
-
/** Error message constants. */
|
|
4166
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
4167
|
-
|
|
4168
|
-
/** Used to compose bitmasks for function metadata. */
|
|
4169
|
-
var WRAP_CURRY_FLAG = 8,
|
|
4170
|
-
WRAP_PARTIAL_FLAG = 32,
|
|
4171
|
-
WRAP_ARY_FLAG = 128,
|
|
4172
|
-
WRAP_REARG_FLAG = 256;
|
|
4173
|
-
|
|
4174
|
-
/**
|
|
4175
|
-
* Creates a `_.flow` or `_.flowRight` function.
|
|
4176
|
-
*
|
|
4177
|
-
* @private
|
|
4178
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
4179
|
-
* @returns {Function} Returns the new flow function.
|
|
4180
|
-
*/
|
|
4181
|
-
function createFlow(fromRight) {
|
|
4182
|
-
return flatRest(function(funcs) {
|
|
4183
|
-
var length = funcs.length,
|
|
4184
|
-
index = length,
|
|
4185
|
-
prereq = LodashWrapper.prototype.thru;
|
|
4186
|
-
|
|
4187
|
-
if (fromRight) {
|
|
4188
|
-
funcs.reverse();
|
|
4189
|
-
}
|
|
4190
|
-
while (index--) {
|
|
4191
|
-
var func = funcs[index];
|
|
4192
|
-
if (typeof func != 'function') {
|
|
4193
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4194
|
-
}
|
|
4195
|
-
if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
|
|
4196
|
-
var wrapper = new LodashWrapper([], true);
|
|
4197
|
-
}
|
|
4198
|
-
}
|
|
4199
|
-
index = wrapper ? index : length;
|
|
4200
|
-
while (++index < length) {
|
|
4201
|
-
func = funcs[index];
|
|
4202
|
-
|
|
4203
|
-
var funcName = getFuncName(func),
|
|
4204
|
-
data = funcName == 'wrapper' ? getData(func) : undefined;
|
|
4205
|
-
|
|
4206
|
-
if (data && isLaziable(data[0]) &&
|
|
4207
|
-
data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
|
|
4208
|
-
!data[4].length && data[9] == 1
|
|
4209
|
-
) {
|
|
4210
|
-
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
|
4211
|
-
} else {
|
|
4212
|
-
wrapper = (func.length == 1 && isLaziable(func))
|
|
4213
|
-
? wrapper[funcName]()
|
|
4214
|
-
: wrapper.thru(func);
|
|
4215
|
-
}
|
|
4216
|
-
}
|
|
4217
|
-
return function() {
|
|
4218
|
-
var args = arguments,
|
|
4219
|
-
value = args[0];
|
|
4220
|
-
|
|
4221
|
-
if (wrapper && args.length == 1 && isArray(value)) {
|
|
4222
|
-
return wrapper.plant(value).value();
|
|
4223
|
-
}
|
|
4224
|
-
var index = 0,
|
|
4225
|
-
result = length ? funcs[index].apply(this, args) : value;
|
|
4226
|
-
|
|
4227
|
-
while (++index < length) {
|
|
4228
|
-
result = funcs[index].call(this, result);
|
|
4229
|
-
}
|
|
4230
|
-
return result;
|
|
4231
|
-
};
|
|
4232
|
-
});
|
|
4233
|
-
}
|
|
4234
|
-
|
|
4235
|
-
module.exports = createFlow;
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
4123
|
/***/ }),
|
|
4239
4124
|
|
|
4240
4125
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js":
|
|
@@ -4690,61 +4575,6 @@ function nativeKeysIn(object) {
|
|
|
4690
4575
|
module.exports = nativeKeysIn;
|
|
4691
4576
|
|
|
4692
4577
|
|
|
4693
|
-
/***/ }),
|
|
4694
|
-
|
|
4695
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getData.js":
|
|
4696
|
-
/*!**********************************************************************************!*\
|
|
4697
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getData.js ***!
|
|
4698
|
-
\**********************************************************************************/
|
|
4699
|
-
/***/ (function(module) {
|
|
4700
|
-
|
|
4701
|
-
/**
|
|
4702
|
-
* This method returns `undefined`.
|
|
4703
|
-
*
|
|
4704
|
-
* @static
|
|
4705
|
-
* @memberOf _
|
|
4706
|
-
* @since 2.3.0
|
|
4707
|
-
* @category Util
|
|
4708
|
-
* @example
|
|
4709
|
-
*
|
|
4710
|
-
* _.times(2, _.noop);
|
|
4711
|
-
* // => [undefined, undefined]
|
|
4712
|
-
*/
|
|
4713
|
-
function noop() {
|
|
4714
|
-
// No operation performed.
|
|
4715
|
-
}
|
|
4716
|
-
|
|
4717
|
-
module.exports = noop;
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
/***/ }),
|
|
4721
|
-
|
|
4722
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getFuncName.js":
|
|
4723
|
-
/*!**************************************************************************************!*\
|
|
4724
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getFuncName.js ***!
|
|
4725
|
-
\**************************************************************************************/
|
|
4726
|
-
/***/ (function(module) {
|
|
4727
|
-
|
|
4728
|
-
/**
|
|
4729
|
-
* This method returns an empty string.
|
|
4730
|
-
*
|
|
4731
|
-
* @static
|
|
4732
|
-
* @memberOf _
|
|
4733
|
-
* @since 4.13.0
|
|
4734
|
-
* @category Util
|
|
4735
|
-
* @returns {string} Returns the empty string.
|
|
4736
|
-
* @example
|
|
4737
|
-
*
|
|
4738
|
-
* _.times(2, _.stubString);
|
|
4739
|
-
* // => ['', '']
|
|
4740
|
-
*/
|
|
4741
|
-
function stubString() {
|
|
4742
|
-
return '';
|
|
4743
|
-
}
|
|
4744
|
-
|
|
4745
|
-
module.exports = stubString;
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
4578
|
/***/ }),
|
|
4749
4579
|
|
|
4750
4580
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js":
|
|
@@ -5031,34 +4861,6 @@ function isKey(value, object) {
|
|
|
5031
4861
|
module.exports = isKey;
|
|
5032
4862
|
|
|
5033
4863
|
|
|
5034
|
-
/***/ }),
|
|
5035
|
-
|
|
5036
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isLaziable.js":
|
|
5037
|
-
/*!*************************************************************************************!*\
|
|
5038
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isLaziable.js ***!
|
|
5039
|
-
\*************************************************************************************/
|
|
5040
|
-
/***/ (function(module) {
|
|
5041
|
-
|
|
5042
|
-
/**
|
|
5043
|
-
* This method returns `false`.
|
|
5044
|
-
*
|
|
5045
|
-
* @static
|
|
5046
|
-
* @memberOf _
|
|
5047
|
-
* @since 4.13.0
|
|
5048
|
-
* @category Util
|
|
5049
|
-
* @returns {boolean} Returns `false`.
|
|
5050
|
-
* @example
|
|
5051
|
-
*
|
|
5052
|
-
* _.times(2, _.stubFalse);
|
|
5053
|
-
* // => [false, false]
|
|
5054
|
-
*/
|
|
5055
|
-
function stubFalse() {
|
|
5056
|
-
return false;
|
|
5057
|
-
}
|
|
5058
|
-
|
|
5059
|
-
module.exports = stubFalse;
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
4864
|
/***/ }),
|
|
5063
4865
|
|
|
5064
4866
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js":
|
|
@@ -6150,43 +5952,6 @@ function flatten(array) {
|
|
|
6150
5952
|
module.exports = flatten;
|
|
6151
5953
|
|
|
6152
5954
|
|
|
6153
|
-
/***/ }),
|
|
6154
|
-
|
|
6155
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flow.js":
|
|
6156
|
-
/*!******************************************************************************!*\
|
|
6157
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flow.js ***!
|
|
6158
|
-
\******************************************************************************/
|
|
6159
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
6160
|
-
|
|
6161
|
-
var createFlow = __webpack_require__(/*! ./_createFlow */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createFlow.js");
|
|
6162
|
-
|
|
6163
|
-
/**
|
|
6164
|
-
* Creates a function that returns the result of invoking the given functions
|
|
6165
|
-
* with the `this` binding of the created function, where each successive
|
|
6166
|
-
* invocation is supplied the return value of the previous.
|
|
6167
|
-
*
|
|
6168
|
-
* @static
|
|
6169
|
-
* @memberOf _
|
|
6170
|
-
* @since 3.0.0
|
|
6171
|
-
* @category Util
|
|
6172
|
-
* @param {...(Function|Function[])} [funcs] The functions to invoke.
|
|
6173
|
-
* @returns {Function} Returns the new composite function.
|
|
6174
|
-
* @see _.flowRight
|
|
6175
|
-
* @example
|
|
6176
|
-
*
|
|
6177
|
-
* function square(n) {
|
|
6178
|
-
* return n * n;
|
|
6179
|
-
* }
|
|
6180
|
-
*
|
|
6181
|
-
* var addSquare = _.flow([_.add, square]);
|
|
6182
|
-
* addSquare(1, 2);
|
|
6183
|
-
* // => 9
|
|
6184
|
-
*/
|
|
6185
|
-
var flow = createFlow();
|
|
6186
|
-
|
|
6187
|
-
module.exports = flow;
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
5955
|
/***/ }),
|
|
6191
5956
|
|
|
6192
5957
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/forOwn.js":
|
|
@@ -8189,13 +7954,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8189
7954
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8190
7955
|
/* harmony export */ "Area": function() { return /* binding */ Area; }
|
|
8191
7956
|
/* harmony export */ });
|
|
8192
|
-
/* harmony import */ var
|
|
8193
|
-
/* harmony import */ var
|
|
8194
|
-
/* harmony import */ var
|
|
8195
|
-
/* harmony import */ var
|
|
8196
|
-
/* harmony import */ var
|
|
8197
|
-
/* harmony import */ var
|
|
8198
|
-
/* harmony import */ var
|
|
7957
|
+
/* 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");
|
|
7958
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
7959
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
7960
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
7961
|
+
/* harmony import */ var victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-shape */ "../../victory-vendor/es/d3-shape.js");
|
|
7962
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/line-helpers.js");
|
|
7963
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
7964
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
7965
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
7966
|
+
|
|
8199
7967
|
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
|
|
8200
7968
|
|
|
8201
7969
|
|
|
@@ -8224,16 +7992,16 @@ const getCartesianArea = props => {
|
|
|
8224
7992
|
horizontal,
|
|
8225
7993
|
scale
|
|
8226
7994
|
} = props;
|
|
8227
|
-
const interpolationFunction =
|
|
8228
|
-
return horizontal ?
|
|
7995
|
+
const interpolationFunction = victory_core__WEBPACK_IMPORTED_MODULE_3__.getInterpolationFunction(props);
|
|
7996
|
+
return horizontal ? victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__.area().defined(defined).curve(interpolationFunction).x0(getY0Accessor(scale)).x1(getYAccessor(scale)).y(getXAccessor(scale)) : victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__.area().defined(defined).curve(interpolationFunction).x(getXAccessor(scale)).y1(getYAccessor(scale)).y0(getY0Accessor(scale));
|
|
8229
7997
|
};
|
|
8230
7998
|
const getAreaFunction = props => {
|
|
8231
7999
|
const {
|
|
8232
8000
|
polar,
|
|
8233
8001
|
scale
|
|
8234
8002
|
} = props;
|
|
8235
|
-
const interpolationFunction =
|
|
8236
|
-
return polar ?
|
|
8003
|
+
const interpolationFunction = victory_core__WEBPACK_IMPORTED_MODULE_3__.getInterpolationFunction(props);
|
|
8004
|
+
return polar ? victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__.radialArea().defined(defined).curve(interpolationFunction).angle(getAngleAccessor(scale)).outerRadius(getYAccessor(scale)).innerRadius(getY0Accessor(scale)) : getCartesianArea(props);
|
|
8237
8005
|
};
|
|
8238
8006
|
const evaluateProps = props => {
|
|
8239
8007
|
/**
|
|
@@ -8244,13 +8012,13 @@ const evaluateProps = props => {
|
|
|
8244
8012
|
* `style`
|
|
8245
8013
|
* `tabIndex`
|
|
8246
8014
|
*/
|
|
8247
|
-
const ariaLabel =
|
|
8248
|
-
const desc =
|
|
8249
|
-
const id =
|
|
8250
|
-
const style =
|
|
8015
|
+
const ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.ariaLabel, props);
|
|
8016
|
+
const desc = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.desc, props);
|
|
8017
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.id, props);
|
|
8018
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(Object.assign({
|
|
8251
8019
|
fill: "black"
|
|
8252
8020
|
}, props.style), props);
|
|
8253
|
-
const tabIndex =
|
|
8021
|
+
const tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.tabIndex, props);
|
|
8254
8022
|
return Object.assign({}, props, {
|
|
8255
8023
|
ariaLabel,
|
|
8256
8024
|
desc,
|
|
@@ -8260,8 +8028,8 @@ const evaluateProps = props => {
|
|
|
8260
8028
|
});
|
|
8261
8029
|
};
|
|
8262
8030
|
const defaultProps = {
|
|
8263
|
-
groupComponent: /*#__PURE__*/
|
|
8264
|
-
pathComponent: /*#__PURE__*/
|
|
8031
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
|
|
8032
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.Path, null),
|
|
8265
8033
|
role: "presentation",
|
|
8266
8034
|
shapeRendering: "auto"
|
|
8267
8035
|
};
|
|
@@ -8270,10 +8038,7 @@ const defaultProps = {
|
|
|
8270
8038
|
* The area primitive used by VictoryArea
|
|
8271
8039
|
*/
|
|
8272
8040
|
const Area = initialProps => {
|
|
8273
|
-
const props = evaluateProps({
|
|
8274
|
-
...defaultProps,
|
|
8275
|
-
...initialProps
|
|
8276
|
-
});
|
|
8041
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
8277
8042
|
const {
|
|
8278
8043
|
ariaLabel,
|
|
8279
8044
|
role,
|
|
@@ -8291,12 +8056,12 @@ const Area = initialProps => {
|
|
|
8291
8056
|
desc,
|
|
8292
8057
|
tabIndex
|
|
8293
8058
|
} = props;
|
|
8294
|
-
const userProps =
|
|
8059
|
+
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_6__.getSafeUserProps(props);
|
|
8295
8060
|
const defaultTransform = polar && origin ? `translate(${origin.x}, ${origin.y})` : undefined;
|
|
8296
8061
|
const transform = props.transform || defaultTransform;
|
|
8297
8062
|
const renderLine = style.stroke && style.stroke !== "none" && style.stroke !== "transparent";
|
|
8298
8063
|
const areaFunction = getAreaFunction(props);
|
|
8299
|
-
const lineFunction = renderLine &&
|
|
8064
|
+
const lineFunction = renderLine && victory_core__WEBPACK_IMPORTED_MODULE_3__.getLineFunction(props);
|
|
8300
8065
|
const areaStroke = style.stroke ? "none" : style.fill;
|
|
8301
8066
|
const sharedProps = {
|
|
8302
8067
|
"aria-label": ariaLabel,
|
|
@@ -8308,7 +8073,7 @@ const Area = initialProps => {
|
|
|
8308
8073
|
clipPath,
|
|
8309
8074
|
tabIndex
|
|
8310
8075
|
};
|
|
8311
|
-
const area = /*#__PURE__*/
|
|
8076
|
+
const area = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(pathComponent, Object.assign({
|
|
8312
8077
|
key: `${id}-area`,
|
|
8313
8078
|
style: Object.assign({}, style, {
|
|
8314
8079
|
stroke: areaStroke
|
|
@@ -8317,14 +8082,14 @@ const Area = initialProps => {
|
|
|
8317
8082
|
desc,
|
|
8318
8083
|
tabIndex
|
|
8319
8084
|
}, sharedProps, userProps));
|
|
8320
|
-
const line = renderLine ? /*#__PURE__*/
|
|
8085
|
+
const line = renderLine ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(pathComponent, Object.assign({
|
|
8321
8086
|
key: `${id}-area-stroke`,
|
|
8322
8087
|
style: Object.assign({}, style, {
|
|
8323
8088
|
fill: "none"
|
|
8324
8089
|
}),
|
|
8325
8090
|
d: lineFunction(data)
|
|
8326
8091
|
}, sharedProps)) : null;
|
|
8327
|
-
return renderLine ? /*#__PURE__*/
|
|
8092
|
+
return renderLine ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(groupComponent, userProps, [area, line]) : area;
|
|
8328
8093
|
};
|
|
8329
8094
|
|
|
8330
8095
|
/***/ }),
|
|
@@ -9550,12 +9315,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9550
9315
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9551
9316
|
/* harmony export */ "Bar": function() { return /* binding */ Bar; }
|
|
9552
9317
|
/* harmony export */ });
|
|
9553
|
-
/* harmony import */ var
|
|
9554
|
-
/* harmony import */ var
|
|
9555
|
-
/* harmony import */ var
|
|
9556
|
-
/* harmony import */ var
|
|
9557
|
-
/* harmony import */ var
|
|
9558
|
-
/* harmony import */ var
|
|
9318
|
+
/* 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");
|
|
9319
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
9320
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9321
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9322
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
9323
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
9324
|
+
/* harmony import */ var _bar_helper_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bar-helper-methods */ "../../victory-bar/es/bar-helper-methods.js");
|
|
9325
|
+
/* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-helper-methods */ "../../victory-bar/es/path-helper-methods.js");
|
|
9326
|
+
|
|
9559
9327
|
|
|
9560
9328
|
|
|
9561
9329
|
|
|
@@ -9573,18 +9341,18 @@ const evaluateProps = props => {
|
|
|
9573
9341
|
* `id`
|
|
9574
9342
|
* `tabIndex`
|
|
9575
9343
|
*/
|
|
9576
|
-
const style = (0,
|
|
9577
|
-
const barWidth = (0,
|
|
9344
|
+
const style = (0,_bar_helper_methods__WEBPACK_IMPORTED_MODULE_2__.getStyle)(props.style, props);
|
|
9345
|
+
const barWidth = (0,_bar_helper_methods__WEBPACK_IMPORTED_MODULE_2__.getBarWidth)(props.barWidth, Object.assign({}, props, {
|
|
9578
9346
|
style
|
|
9579
9347
|
}));
|
|
9580
|
-
const cornerRadius = (0,
|
|
9348
|
+
const cornerRadius = (0,_bar_helper_methods__WEBPACK_IMPORTED_MODULE_2__.getCornerRadius)(props.cornerRadius, Object.assign({}, props, {
|
|
9581
9349
|
style,
|
|
9582
9350
|
barWidth
|
|
9583
9351
|
}));
|
|
9584
|
-
const ariaLabel =
|
|
9585
|
-
const desc =
|
|
9586
|
-
const id =
|
|
9587
|
-
const tabIndex =
|
|
9352
|
+
const ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.ariaLabel, props);
|
|
9353
|
+
const desc = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.desc, props);
|
|
9354
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.id, props);
|
|
9355
|
+
const tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.tabIndex, props);
|
|
9588
9356
|
return Object.assign({}, props, {
|
|
9589
9357
|
ariaLabel,
|
|
9590
9358
|
style,
|
|
@@ -9596,17 +9364,14 @@ const evaluateProps = props => {
|
|
|
9596
9364
|
});
|
|
9597
9365
|
};
|
|
9598
9366
|
const defaultProps = {
|
|
9599
|
-
pathComponent: /*#__PURE__*/
|
|
9367
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Path, null),
|
|
9600
9368
|
role: "presentation",
|
|
9601
9369
|
shapeRendering: "auto"
|
|
9602
9370
|
};
|
|
9603
9371
|
|
|
9604
9372
|
// eslint-disable-next-line prefer-arrow-callback
|
|
9605
|
-
const Bar = /*#__PURE__*/(0,
|
|
9606
|
-
const props = evaluateProps({
|
|
9607
|
-
...defaultProps,
|
|
9608
|
-
...initialProps
|
|
9609
|
-
});
|
|
9373
|
+
const Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Bar(initialProps, ref) {
|
|
9374
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
9610
9375
|
const {
|
|
9611
9376
|
polar,
|
|
9612
9377
|
origin,
|
|
@@ -9614,12 +9379,12 @@ const Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
|
|
|
9614
9379
|
barWidth,
|
|
9615
9380
|
cornerRadius
|
|
9616
9381
|
} = props;
|
|
9617
|
-
const path = polar ? (0,
|
|
9382
|
+
const path = polar ? (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getPolarBarPath)(props, cornerRadius) : (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getBarPath)(props, barWidth, cornerRadius);
|
|
9618
9383
|
const defaultTransform = polar && origin ? `translate(${origin.x}, ${origin.y})` : undefined;
|
|
9619
9384
|
if (!props.pathComponent) {
|
|
9620
9385
|
return null;
|
|
9621
9386
|
}
|
|
9622
|
-
return /*#__PURE__*/
|
|
9387
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
9623
9388
|
...props.events,
|
|
9624
9389
|
"aria-label": props.ariaLabel,
|
|
9625
9390
|
style,
|
|
@@ -11770,8 +11535,9 @@ const BrushHelpers = {
|
|
|
11770
11535
|
__webpack_require__.r(__webpack_exports__);
|
|
11771
11536
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11772
11537
|
/* harmony export */ "BrushHelpers": function() { return /* reexport safe */ _brush_helpers__WEBPACK_IMPORTED_MODULE_1__.BrushHelpers; },
|
|
11538
|
+
/* harmony export */ "VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ _victory_brush_container__WEBPACK_IMPORTED_MODULE_0__.VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS; },
|
|
11773
11539
|
/* harmony export */ "VictoryBrushContainer": function() { return /* reexport safe */ _victory_brush_container__WEBPACK_IMPORTED_MODULE_0__.VictoryBrushContainer; },
|
|
11774
|
-
/* harmony export */ "
|
|
11540
|
+
/* harmony export */ "useVictoryBrushContainer": function() { return /* reexport safe */ _victory_brush_container__WEBPACK_IMPORTED_MODULE_0__.useVictoryBrushContainer; }
|
|
11775
11541
|
/* harmony export */ });
|
|
11776
11542
|
/* harmony import */ var _victory_brush_container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-brush-container */ "../../victory-brush-container/es/victory-brush-container.js");
|
|
11777
11543
|
/* harmony import */ var _brush_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./brush-helpers */ "../../victory-brush-container/es/brush-helpers.js");
|
|
@@ -11789,17 +11555,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11789
11555
|
"use strict";
|
|
11790
11556
|
__webpack_require__.r(__webpack_exports__);
|
|
11791
11557
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11558
|
+
/* harmony export */ "VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS": function() { return /* binding */ VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS; },
|
|
11792
11559
|
/* harmony export */ "VictoryBrushContainer": function() { return /* binding */ VictoryBrushContainer; },
|
|
11793
|
-
/* harmony export */ "
|
|
11560
|
+
/* harmony export */ "useVictoryBrushContainer": function() { return /* binding */ useVictoryBrushContainer; }
|
|
11794
11561
|
/* harmony export */ });
|
|
11795
11562
|
/* 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");
|
|
11796
11563
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
11797
11564
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
11798
11565
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
11799
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
11800
|
-
/* harmony import */ var
|
|
11801
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
11802
|
-
/* harmony import */ var
|
|
11566
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/rect.js");
|
|
11567
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
|
|
11568
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
11569
|
+
/* harmony import */ var _brush_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./brush-helpers */ "../../victory-brush-container/es/brush-helpers.js");
|
|
11803
11570
|
/* 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");
|
|
11804
11571
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_2__);
|
|
11805
11572
|
|
|
@@ -11807,172 +11574,176 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11807
11574
|
|
|
11808
11575
|
|
|
11809
11576
|
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11577
|
+
const VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS = {
|
|
11578
|
+
allowDrag: true,
|
|
11579
|
+
allowDraw: true,
|
|
11580
|
+
allowResize: true,
|
|
11581
|
+
brushComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
11582
|
+
brushStyle: {
|
|
11583
|
+
stroke: "transparent",
|
|
11584
|
+
fill: "black",
|
|
11585
|
+
fillOpacity: 0.1
|
|
11586
|
+
},
|
|
11587
|
+
handleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
11588
|
+
handleStyle: {
|
|
11589
|
+
stroke: "transparent",
|
|
11590
|
+
fill: "transparent"
|
|
11591
|
+
},
|
|
11592
|
+
handleWidth: 8,
|
|
11593
|
+
mouseMoveThreshold: 0
|
|
11594
|
+
};
|
|
11595
|
+
const useVictoryBrushContainer = initialProps => {
|
|
11596
|
+
const props = {
|
|
11597
|
+
...VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS,
|
|
11598
|
+
...initialProps
|
|
11599
|
+
};
|
|
11600
|
+
const {
|
|
11601
|
+
children
|
|
11602
|
+
} = props;
|
|
11603
|
+
const getSelectBox = coordinates => {
|
|
11604
|
+
const {
|
|
11605
|
+
x,
|
|
11606
|
+
y
|
|
11607
|
+
} = coordinates;
|
|
11608
|
+
const {
|
|
11609
|
+
brushStyle,
|
|
11610
|
+
brushComponent,
|
|
11611
|
+
name
|
|
11612
|
+
} = props;
|
|
11613
|
+
const brushComponentStyle = brushComponent.props && brushComponent.props.style;
|
|
11614
|
+
const cursor = !props.allowDrag && !props.allowResize ? "auto" : "move";
|
|
11615
|
+
return x[0] !== x[1] && y[0] !== y[1] ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(brushComponent, {
|
|
11616
|
+
key: `${name}-brush`,
|
|
11617
|
+
width: Math.abs(x[1] - x[0]) || 1,
|
|
11618
|
+
height: Math.abs(y[1] - y[0]) || 1,
|
|
11619
|
+
x: Math.min(x[0], x[1]),
|
|
11620
|
+
y: Math.min(y[0], y[1]),
|
|
11621
|
+
cursor,
|
|
11622
|
+
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, brushComponentStyle, brushStyle)
|
|
11623
|
+
}) : null;
|
|
11624
|
+
};
|
|
11625
|
+
const getCursorPointers = () => {
|
|
11626
|
+
const cursors = {
|
|
11627
|
+
yProps: "ns-resize",
|
|
11628
|
+
xProps: "ew-resize"
|
|
11832
11629
|
};
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
},
|
|
11840
|
-
onTouchStart: (evt, targetProps) => {
|
|
11841
|
-
return props.disable ? {} : _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.onMouseDown(evt, targetProps);
|
|
11842
|
-
},
|
|
11843
|
-
onGlobalMouseMove: (evt, targetProps) => {
|
|
11844
|
-
return props.disable || !targetProps.isPanning && !targetProps.isSelecting ? {} : _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.onGlobalMouseMove(evt, targetProps);
|
|
11845
|
-
},
|
|
11846
|
-
onGlobalTouchMove: (evt, targetProps) => {
|
|
11847
|
-
return props.disable || !targetProps.isPanning && !targetProps.isSelecting ? {} : _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.onGlobalMouseMove(evt, targetProps);
|
|
11848
|
-
},
|
|
11849
|
-
onGlobalMouseUp: (evt, targetProps) => {
|
|
11850
|
-
return props.disable ? {} : _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.onGlobalMouseUp(evt, targetProps);
|
|
11851
|
-
},
|
|
11852
|
-
onGlobalTouchEnd: (evt, targetProps) => {
|
|
11853
|
-
return props.disable ? {} : _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.onGlobalMouseUp(evt, targetProps);
|
|
11854
|
-
},
|
|
11855
|
-
onGlobalTouchCancel: (evt, targetProps) => {
|
|
11856
|
-
return props.disable ? {} : _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.onGlobalMouseUp(evt, targetProps);
|
|
11857
|
-
}
|
|
11858
|
-
}
|
|
11859
|
-
}];
|
|
11860
|
-
}
|
|
11861
|
-
getSelectBox(props, coordinates) {
|
|
11862
|
-
const {
|
|
11863
|
-
x,
|
|
11864
|
-
y
|
|
11865
|
-
} = coordinates;
|
|
11866
|
-
const {
|
|
11867
|
-
brushStyle,
|
|
11868
|
-
brushComponent,
|
|
11869
|
-
name
|
|
11870
|
-
} = props;
|
|
11871
|
-
const brushComponentStyle = brushComponent.props && brushComponent.props.style;
|
|
11872
|
-
const cursor = !props.allowDrag && !props.allowResize ? "auto" : "move";
|
|
11873
|
-
return x[0] !== x[1] && y[0] !== y[1] ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(brushComponent, {
|
|
11874
|
-
key: `${name}-brush`,
|
|
11875
|
-
width: Math.abs(x[1] - x[0]) || 1,
|
|
11876
|
-
height: Math.abs(y[1] - y[0]) || 1,
|
|
11877
|
-
x: Math.min(x[0], x[1]),
|
|
11878
|
-
y: Math.min(y[0], y[1]),
|
|
11879
|
-
cursor,
|
|
11880
|
-
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, brushComponentStyle, brushStyle)
|
|
11881
|
-
}) : null;
|
|
11882
|
-
}
|
|
11883
|
-
getCursorPointers(props) {
|
|
11884
|
-
const cursors = {
|
|
11885
|
-
yProps: "ns-resize",
|
|
11886
|
-
xProps: "ew-resize"
|
|
11887
|
-
};
|
|
11888
|
-
if (!props.allowResize && props.allowDrag) {
|
|
11889
|
-
cursors.xProps = "move";
|
|
11890
|
-
cursors.yProps = "move";
|
|
11891
|
-
} else if (!props.allowResize && !props.allowDrag) {
|
|
11892
|
-
cursors.xProps = "auto";
|
|
11893
|
-
cursors.yProps = "auto";
|
|
11894
|
-
}
|
|
11895
|
-
return cursors;
|
|
11896
|
-
}
|
|
11897
|
-
getHandles(props, domain) {
|
|
11898
|
-
const {
|
|
11899
|
-
handleWidth,
|
|
11900
|
-
handleStyle,
|
|
11901
|
-
handleComponent,
|
|
11902
|
-
name
|
|
11903
|
-
} = props;
|
|
11904
|
-
const domainBox = _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.getDomainBox(props, domain);
|
|
11905
|
-
const {
|
|
11906
|
-
x1,
|
|
11907
|
-
x2,
|
|
11908
|
-
y1,
|
|
11909
|
-
y2
|
|
11910
|
-
} = domainBox;
|
|
11911
|
-
const {
|
|
11912
|
-
top,
|
|
11913
|
-
bottom,
|
|
11914
|
-
left,
|
|
11915
|
-
right
|
|
11916
|
-
} = _brush_helpers__WEBPACK_IMPORTED_MODULE_5__.BrushHelpers.getHandles(props, domainBox);
|
|
11917
|
-
const width = Math.abs(x2 - x1) || 1;
|
|
11918
|
-
const height = Math.abs(y2 - y1) || 1;
|
|
11919
|
-
const handleComponentStyle = handleComponent.props && handleComponent.props.style || {};
|
|
11920
|
-
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, handleComponentStyle, handleStyle);
|
|
11921
|
-
const cursors = this.getCursorPointers(props);
|
|
11922
|
-
const yProps = {
|
|
11923
|
-
style,
|
|
11924
|
-
width,
|
|
11925
|
-
height: handleWidth,
|
|
11926
|
-
cursor: cursors.yProps
|
|
11927
|
-
};
|
|
11928
|
-
const xProps = {
|
|
11929
|
-
style,
|
|
11930
|
-
width: handleWidth,
|
|
11931
|
-
height,
|
|
11932
|
-
cursor: cursors.xProps
|
|
11933
|
-
};
|
|
11934
|
-
const handleProps = {
|
|
11935
|
-
top: top && Object.assign({
|
|
11936
|
-
x: top.x1,
|
|
11937
|
-
y: top.y1
|
|
11938
|
-
}, yProps),
|
|
11939
|
-
bottom: bottom && Object.assign({
|
|
11940
|
-
x: bottom.x1,
|
|
11941
|
-
y: bottom.y1
|
|
11942
|
-
}, yProps),
|
|
11943
|
-
left: left && Object.assign({
|
|
11944
|
-
y: left.y1,
|
|
11945
|
-
x: left.x1
|
|
11946
|
-
}, xProps),
|
|
11947
|
-
right: right && Object.assign({
|
|
11948
|
-
y: right.y1,
|
|
11949
|
-
x: right.x1
|
|
11950
|
-
}, xProps)
|
|
11951
|
-
};
|
|
11952
|
-
const handles = ["top", "bottom", "left", "right"].reduce((memo, curr) => handleProps[curr] ? memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(handleComponent, Object.assign({
|
|
11953
|
-
key: `${name}-handle-${curr}`
|
|
11954
|
-
}, handleProps[curr]))) : memo, []);
|
|
11955
|
-
return handles.length ? handles : null;
|
|
11956
|
-
}
|
|
11957
|
-
getRect(props) {
|
|
11958
|
-
const {
|
|
11959
|
-
currentDomain,
|
|
11960
|
-
cachedBrushDomain
|
|
11961
|
-
} = props;
|
|
11962
|
-
const brushDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.brushDomain, props.domain);
|
|
11963
|
-
const domain = react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default()(brushDomain, cachedBrushDomain) ? lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, currentDomain, brushDomain) : brushDomain;
|
|
11964
|
-
const coordinates = victory_core__WEBPACK_IMPORTED_MODULE_6__.getDomainCoordinates(props, domain);
|
|
11965
|
-
const selectBox = this.getSelectBox(props, coordinates);
|
|
11966
|
-
return selectBox ? [selectBox, this.getHandles(props, domain)] : [];
|
|
11967
|
-
}
|
|
11968
|
-
|
|
11969
|
-
// Overrides method in VictoryContainer
|
|
11970
|
-
getChildren(props) {
|
|
11971
|
-
return [...react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(props.children), ...this.getRect(props)];
|
|
11630
|
+
if (!props.allowResize && props.allowDrag) {
|
|
11631
|
+
cursors.xProps = "move";
|
|
11632
|
+
cursors.yProps = "move";
|
|
11633
|
+
} else if (!props.allowResize && !props.allowDrag) {
|
|
11634
|
+
cursors.xProps = "auto";
|
|
11635
|
+
cursors.yProps = "auto";
|
|
11972
11636
|
}
|
|
11637
|
+
return cursors;
|
|
11973
11638
|
};
|
|
11974
|
-
|
|
11975
|
-
const
|
|
11639
|
+
const getHandles = domain => {
|
|
11640
|
+
const {
|
|
11641
|
+
handleWidth,
|
|
11642
|
+
handleStyle,
|
|
11643
|
+
handleComponent,
|
|
11644
|
+
name
|
|
11645
|
+
} = props;
|
|
11646
|
+
const domainBox = _brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.getDomainBox(props, domain);
|
|
11647
|
+
const {
|
|
11648
|
+
x1,
|
|
11649
|
+
x2,
|
|
11650
|
+
y1,
|
|
11651
|
+
y2
|
|
11652
|
+
} = domainBox;
|
|
11653
|
+
const {
|
|
11654
|
+
top,
|
|
11655
|
+
bottom,
|
|
11656
|
+
left,
|
|
11657
|
+
right
|
|
11658
|
+
} = _brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.getHandles(props, domainBox);
|
|
11659
|
+
const width = Math.abs(x2 - x1) || 1;
|
|
11660
|
+
const height = Math.abs(y2 - y1) || 1;
|
|
11661
|
+
const handleComponentStyle = handleComponent.props && handleComponent.props.style || {};
|
|
11662
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, handleComponentStyle, handleStyle);
|
|
11663
|
+
const cursors = getCursorPointers();
|
|
11664
|
+
const yProps = {
|
|
11665
|
+
style,
|
|
11666
|
+
width,
|
|
11667
|
+
height: handleWidth,
|
|
11668
|
+
cursor: cursors.yProps
|
|
11669
|
+
};
|
|
11670
|
+
const xProps = {
|
|
11671
|
+
style,
|
|
11672
|
+
width: handleWidth,
|
|
11673
|
+
height,
|
|
11674
|
+
cursor: cursors.xProps
|
|
11675
|
+
};
|
|
11676
|
+
const handleProps = {
|
|
11677
|
+
top: top && Object.assign({
|
|
11678
|
+
x: top.x1,
|
|
11679
|
+
y: top.y1
|
|
11680
|
+
}, yProps),
|
|
11681
|
+
bottom: bottom && Object.assign({
|
|
11682
|
+
x: bottom.x1,
|
|
11683
|
+
y: bottom.y1
|
|
11684
|
+
}, yProps),
|
|
11685
|
+
left: left && Object.assign({
|
|
11686
|
+
y: left.y1,
|
|
11687
|
+
x: left.x1
|
|
11688
|
+
}, xProps),
|
|
11689
|
+
right: right && Object.assign({
|
|
11690
|
+
y: right.y1,
|
|
11691
|
+
x: right.x1
|
|
11692
|
+
}, xProps)
|
|
11693
|
+
};
|
|
11694
|
+
const handles = ["top", "bottom", "left", "right"].reduce((memo, curr) => handleProps[curr] ? memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(handleComponent, Object.assign({
|
|
11695
|
+
key: `${name}-handle-${curr}`
|
|
11696
|
+
}, handleProps[curr]))) : memo, []);
|
|
11697
|
+
return handles.length ? handles : null;
|
|
11698
|
+
};
|
|
11699
|
+
const getRect = () => {
|
|
11700
|
+
const {
|
|
11701
|
+
currentDomain,
|
|
11702
|
+
cachedBrushDomain
|
|
11703
|
+
} = props;
|
|
11704
|
+
const brushDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.brushDomain, props.domain);
|
|
11705
|
+
const domain = react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default()(brushDomain, cachedBrushDomain) ? lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, currentDomain, brushDomain) : brushDomain;
|
|
11706
|
+
const coordinates = victory_core__WEBPACK_IMPORTED_MODULE_5__.getDomainCoordinates(props, domain);
|
|
11707
|
+
const selectBox = getSelectBox(coordinates);
|
|
11708
|
+
return selectBox ? [selectBox, getHandles(domain)] : [];
|
|
11709
|
+
};
|
|
11710
|
+
return {
|
|
11711
|
+
props,
|
|
11712
|
+
children: [...react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(children), ...getRect()]
|
|
11713
|
+
};
|
|
11714
|
+
};
|
|
11715
|
+
const VictoryBrushContainer = initialProps => {
|
|
11716
|
+
const {
|
|
11717
|
+
props,
|
|
11718
|
+
children
|
|
11719
|
+
} = useVictoryBrushContainer(initialProps);
|
|
11720
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_6__.VictoryContainer, props, children);
|
|
11721
|
+
};
|
|
11722
|
+
VictoryBrushContainer.role = "container";
|
|
11723
|
+
VictoryBrushContainer.defaultEvents = initialProps => {
|
|
11724
|
+
const props = {
|
|
11725
|
+
...VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS,
|
|
11726
|
+
...initialProps
|
|
11727
|
+
};
|
|
11728
|
+
const createEventHandler = (handler, isDisabled) =>
|
|
11729
|
+
// eslint-disable-next-line max-params
|
|
11730
|
+
(event, targetProps, eventKey, context) => props.disable || isDisabled?.(targetProps) ? {} : handler(event, {
|
|
11731
|
+
...props,
|
|
11732
|
+
...targetProps
|
|
11733
|
+
}, eventKey, context);
|
|
11734
|
+
return [{
|
|
11735
|
+
target: "parent",
|
|
11736
|
+
eventHandlers: {
|
|
11737
|
+
onMouseDown: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onMouseDown),
|
|
11738
|
+
onTouchStart: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onMouseDown),
|
|
11739
|
+
onGlobalMouseMove: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onGlobalMouseMove, targetProps => !targetProps.isPanning && !targetProps.isSelecting),
|
|
11740
|
+
onGlobalTouchMove: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onGlobalMouseMove, targetProps => !targetProps.isPanning && !targetProps.isSelecting),
|
|
11741
|
+
onGlobalMouseUp: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onGlobalMouseUp),
|
|
11742
|
+
onGlobalTouchEnd: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onGlobalMouseUp),
|
|
11743
|
+
onGlobalTouchCancel: createEventHandler(_brush_helpers__WEBPACK_IMPORTED_MODULE_4__.BrushHelpers.onGlobalMouseUp)
|
|
11744
|
+
}
|
|
11745
|
+
}];
|
|
11746
|
+
};
|
|
11976
11747
|
|
|
11977
11748
|
/***/ }),
|
|
11978
11749
|
|
|
@@ -12689,10 +12460,7 @@ const defaultProps = {
|
|
|
12689
12460
|
shapeRendering: "auto"
|
|
12690
12461
|
};
|
|
12691
12462
|
const Candle = props => {
|
|
12692
|
-
const modifiedProps = evaluateProps({
|
|
12693
|
-
...defaultProps,
|
|
12694
|
-
...props
|
|
12695
|
-
});
|
|
12463
|
+
const modifiedProps = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props, defaultProps));
|
|
12696
12464
|
const {
|
|
12697
12465
|
ariaLabel,
|
|
12698
12466
|
events,
|
|
@@ -14077,10 +13845,7 @@ const defaultProps = {
|
|
|
14077
13845
|
theme: victory_core__WEBPACK_IMPORTED_MODULE_8__.VictoryTheme.grayscale
|
|
14078
13846
|
};
|
|
14079
13847
|
const VictoryChartImpl = initialProps => {
|
|
14080
|
-
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => ({
|
|
14081
|
-
...defaultProps,
|
|
14082
|
-
...initialProps
|
|
14083
|
-
}), [initialProps]);
|
|
13848
|
+
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps), [initialProps]);
|
|
14084
13849
|
const role = "chart";
|
|
14085
13850
|
const {
|
|
14086
13851
|
getAnimationProps,
|
|
@@ -14192,53 +13957,58 @@ VictoryChart.expectedComponents = ["groupComponent", "containerComponent"];
|
|
|
14192
13957
|
"use strict";
|
|
14193
13958
|
__webpack_require__.r(__webpack_exports__);
|
|
14194
13959
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14195
|
-
/* harmony export */ "Arc": function() { return /* reexport safe */
|
|
14196
|
-
/* harmony export */ "Axis": function() { return /* reexport safe */
|
|
14197
|
-
/* harmony export */ "Background": function() { return /* reexport safe */
|
|
14198
|
-
/* harmony export */ "Border": function() { return /* reexport safe */
|
|
14199
|
-
/* harmony export */ "Box": function() { return /* reexport safe */
|
|
14200
|
-
/* harmony export */ "Circle": function() { return /* reexport safe */
|
|
14201
|
-
/* harmony export */ "ClipPath": function() { return /* reexport safe */
|
|
14202
|
-
/* harmony export */ "Collection": function() { return /* reexport safe */
|
|
14203
|
-
/* harmony export */ "Data": function() { return /* reexport safe */
|
|
14204
|
-
/* harmony export */ "DefaultTransitions": function() { return /* reexport safe */
|
|
14205
|
-
/* harmony export */ "Domain": function() { return /* reexport safe */
|
|
14206
|
-
/* harmony export */ "Events": function() { return /* reexport safe */
|
|
14207
|
-
/* harmony export */ "Helpers": function() { return /* reexport safe */
|
|
14208
|
-
/* harmony export */ "Hooks": function() { return /* reexport safe */
|
|
14209
|
-
/* harmony export */ "Immutable": function() { return /* reexport safe */
|
|
14210
|
-
/* harmony export */ "LabelHelpers": function() { return /* reexport safe */
|
|
14211
|
-
/* harmony export */ "Line": function() { return /* reexport safe */
|
|
14212
|
-
/* harmony export */ "LineHelpers": function() { return /* reexport safe */
|
|
14213
|
-
/* harmony export */ "LineSegment": function() { return /* reexport safe */
|
|
14214
|
-
/* harmony export */ "Log": function() { return /* reexport safe */
|
|
14215
|
-
/* harmony export */ "Path": function() { return /* reexport safe */
|
|
14216
|
-
/* harmony export */ "Point": function() { return /* reexport safe */
|
|
14217
|
-
/* harmony export */ "PointPathHelpers": function() { return /* reexport safe */
|
|
13960
|
+
/* harmony export */ "Arc": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Arc; },
|
|
13961
|
+
/* harmony export */ "Axis": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Axis; },
|
|
13962
|
+
/* harmony export */ "Background": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Background; },
|
|
13963
|
+
/* harmony export */ "Border": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Border; },
|
|
13964
|
+
/* harmony export */ "Box": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_12__.Border; },
|
|
13965
|
+
/* harmony export */ "Circle": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Circle; },
|
|
13966
|
+
/* harmony export */ "ClipPath": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.ClipPath; },
|
|
13967
|
+
/* harmony export */ "Collection": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Collection; },
|
|
13968
|
+
/* harmony export */ "Data": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Data; },
|
|
13969
|
+
/* harmony export */ "DefaultTransitions": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.DefaultTransitions; },
|
|
13970
|
+
/* harmony export */ "Domain": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Domain; },
|
|
13971
|
+
/* harmony export */ "Events": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Events; },
|
|
13972
|
+
/* harmony export */ "Helpers": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Helpers; },
|
|
13973
|
+
/* harmony export */ "Hooks": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Hooks; },
|
|
13974
|
+
/* harmony export */ "Immutable": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Immutable; },
|
|
13975
|
+
/* harmony export */ "LabelHelpers": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.LabelHelpers; },
|
|
13976
|
+
/* harmony export */ "Line": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Line; },
|
|
13977
|
+
/* harmony export */ "LineHelpers": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.LineHelpers; },
|
|
13978
|
+
/* harmony export */ "LineSegment": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.LineSegment; },
|
|
13979
|
+
/* harmony export */ "Log": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Log; },
|
|
13980
|
+
/* harmony export */ "Path": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Path; },
|
|
13981
|
+
/* harmony export */ "Point": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Point; },
|
|
13982
|
+
/* harmony export */ "PointPathHelpers": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.PointPathHelpers; },
|
|
14218
13983
|
/* harmony export */ "Portal": function() { return /* reexport safe */ _victory_portal_portal__WEBPACK_IMPORTED_MODULE_7__.Portal; },
|
|
14219
|
-
/* harmony export */ "PortalContext": function() { return /* reexport safe */
|
|
14220
|
-
/* harmony export */ "
|
|
14221
|
-
/* harmony export */ "
|
|
14222
|
-
/* harmony export */ "
|
|
14223
|
-
/* harmony export */ "
|
|
14224
|
-
/* harmony export */ "
|
|
14225
|
-
/* harmony export */ "
|
|
14226
|
-
/* harmony export */ "
|
|
14227
|
-
/* harmony export */ "
|
|
14228
|
-
/* harmony export */ "
|
|
14229
|
-
/* harmony export */ "
|
|
14230
|
-
/* harmony export */ "
|
|
13984
|
+
/* harmony export */ "PortalContext": function() { return /* reexport safe */ _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_9__.PortalContext; },
|
|
13985
|
+
/* harmony export */ "PortalOutlet": function() { return /* reexport safe */ _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_10__.PortalOutlet; },
|
|
13986
|
+
/* harmony export */ "PortalProvider": function() { return /* reexport safe */ _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_9__.PortalProvider; },
|
|
13987
|
+
/* harmony export */ "Rect": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Rect; },
|
|
13988
|
+
/* harmony export */ "Scale": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Scale; },
|
|
13989
|
+
/* harmony export */ "Selection": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Selection; },
|
|
13990
|
+
/* harmony export */ "Style": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Style; },
|
|
13991
|
+
/* harmony export */ "TSpan": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.TSpan; },
|
|
13992
|
+
/* harmony export */ "Text": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Text; },
|
|
13993
|
+
/* harmony export */ "TextSize": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.TextSize; },
|
|
13994
|
+
/* harmony export */ "Timer": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Timer; },
|
|
13995
|
+
/* harmony export */ "TimerContext": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.TimerContext; },
|
|
13996
|
+
/* harmony export */ "Transitions": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Transitions; },
|
|
13997
|
+
/* harmony export */ "UserProps": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.UserProps; },
|
|
14231
13998
|
/* harmony export */ "VictoryAccessibleGroup": function() { return /* reexport safe */ _victory_accessible_group_victory_accessible_group__WEBPACK_IMPORTED_MODULE_0__.VictoryAccessibleGroup; },
|
|
14232
13999
|
/* harmony export */ "VictoryAnimation": function() { return /* reexport safe */ _victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_1__.VictoryAnimation; },
|
|
14233
14000
|
/* harmony export */ "VictoryClipContainer": function() { return /* reexport safe */ _victory_clip_container_victory_clip_container__WEBPACK_IMPORTED_MODULE_5__.VictoryClipContainer; },
|
|
14234
14001
|
/* harmony export */ "VictoryContainer": function() { return /* reexport safe */ _victory_container_victory_container__WEBPACK_IMPORTED_MODULE_2__.VictoryContainer; },
|
|
14235
14002
|
/* harmony export */ "VictoryLabel": function() { return /* reexport safe */ _victory_label_victory_label__WEBPACK_IMPORTED_MODULE_3__.VictoryLabel; },
|
|
14236
|
-
/* harmony export */ "VictoryPortal": function() { return /* reexport safe */
|
|
14003
|
+
/* harmony export */ "VictoryPortal": function() { return /* reexport safe */ _victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_8__.VictoryPortal; },
|
|
14237
14004
|
/* harmony export */ "VictoryTheme": function() { return /* reexport safe */ _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_6__.VictoryTheme; },
|
|
14238
14005
|
/* harmony export */ "VictoryTransition": function() { return /* reexport safe */ _victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_4__.VictoryTransition; },
|
|
14239
|
-
/* harmony export */ "Whisker": function() { return /* reexport safe */
|
|
14240
|
-
/* harmony export */ "Wrapper": function() { return /* reexport safe */
|
|
14241
|
-
/* harmony export */ "addEvents": function() { return /* reexport safe */
|
|
14006
|
+
/* harmony export */ "Whisker": function() { return /* reexport safe */ _victory_primitives__WEBPACK_IMPORTED_MODULE_11__.Whisker; },
|
|
14007
|
+
/* harmony export */ "Wrapper": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.Wrapper; },
|
|
14008
|
+
/* harmony export */ "addEvents": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.addEvents; },
|
|
14009
|
+
/* harmony export */ "mergeRefs": function() { return /* reexport safe */ _victory_util__WEBPACK_IMPORTED_MODULE_13__.mergeRefs; },
|
|
14010
|
+
/* harmony export */ "usePortalContext": function() { return /* reexport safe */ _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_9__.usePortalContext; },
|
|
14011
|
+
/* harmony export */ "useVictoryContainer": function() { return /* reexport safe */ _victory_container_victory_container__WEBPACK_IMPORTED_MODULE_2__.useVictoryContainer; }
|
|
14242
14012
|
/* harmony export */ });
|
|
14243
14013
|
/* harmony import */ var _victory_accessible_group_victory_accessible_group__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-accessible-group/victory-accessible-group */ "../../victory-core/es/victory-accessible-group/victory-accessible-group.js");
|
|
14244
14014
|
/* harmony import */ var _victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./victory-animation/victory-animation */ "../../victory-core/es/victory-animation/victory-animation.js");
|
|
@@ -14248,11 +14018,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14248
14018
|
/* harmony import */ var _victory_clip_container_victory_clip_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./victory-clip-container/victory-clip-container */ "../../victory-core/es/victory-clip-container/victory-clip-container.js");
|
|
14249
14019
|
/* harmony import */ var _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./victory-theme/victory-theme */ "../../victory-core/es/victory-theme/victory-theme.js");
|
|
14250
14020
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
14251
|
-
/* harmony import */ var
|
|
14252
|
-
/* harmony import */ var
|
|
14253
|
-
/* harmony import */ var
|
|
14254
|
-
/* harmony import */ var _victory_primitives__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./victory-primitives */ "../../victory-core/es/victory-primitives/
|
|
14255
|
-
/* harmony import */ var
|
|
14021
|
+
/* harmony import */ var _victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./victory-portal/victory-portal */ "../../victory-core/es/victory-portal/victory-portal.js");
|
|
14022
|
+
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
14023
|
+
/* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./victory-portal/portal-outlet */ "../../victory-core/es/victory-portal/portal-outlet.js");
|
|
14024
|
+
/* harmony import */ var _victory_primitives__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./victory-primitives */ "../../victory-core/es/victory-primitives/index.js");
|
|
14025
|
+
/* harmony import */ var _victory_primitives__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./victory-primitives */ "../../victory-core/es/victory-primitives/border.js");
|
|
14026
|
+
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./victory-util */ "../../victory-core/es/victory-util/index.js");
|
|
14027
|
+
|
|
14256
14028
|
|
|
14257
14029
|
|
|
14258
14030
|
|
|
@@ -14887,23 +14659,18 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
14887
14659
|
"use strict";
|
|
14888
14660
|
__webpack_require__.r(__webpack_exports__);
|
|
14889
14661
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14890
|
-
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; }
|
|
14662
|
+
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
14663
|
+
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
14891
14664
|
/* harmony export */ });
|
|
14892
|
-
/* harmony import */ var
|
|
14893
|
-
/* harmony import */ var
|
|
14894
|
-
/* harmony import */ var
|
|
14895
|
-
/* harmony import */ var
|
|
14896
|
-
/* harmony import */ var
|
|
14897
|
-
/* harmony import */ var
|
|
14898
|
-
/* harmony import */ var
|
|
14899
|
-
/* harmony import */ var
|
|
14900
|
-
/* harmony import */ var
|
|
14901
|
-
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
14902
|
-
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
14903
|
-
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
14904
|
-
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
14905
|
-
|
|
14906
|
-
|
|
14665
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
14666
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__);
|
|
14667
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
14668
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
14669
|
+
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
14670
|
+
/* 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");
|
|
14671
|
+
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
14672
|
+
/* 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");
|
|
14673
|
+
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
14907
14674
|
|
|
14908
14675
|
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); }
|
|
14909
14676
|
|
|
@@ -14912,175 +14679,149 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
14912
14679
|
|
|
14913
14680
|
|
|
14914
14681
|
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
// @ts-expect-error Ref will be initialized on mount
|
|
14928
|
-
|
|
14929
|
-
// @ts-expect-error Ref will be initialized on mount
|
|
14930
|
-
|
|
14931
|
-
constructor(props) {
|
|
14932
|
-
super(props);
|
|
14933
|
-
this.containerId = !lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default()(props) || props.containerId === undefined ? lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-") : props.containerId;
|
|
14934
|
-
this.shouldHandleWheel = !!(props && props.events && props.events.onWheel);
|
|
14935
|
-
}
|
|
14936
|
-
savePortalRef = portal => {
|
|
14937
|
-
this.portalRef = portal;
|
|
14938
|
-
return portal;
|
|
14682
|
+
const defaultProps = {
|
|
14683
|
+
className: "VictoryContainer",
|
|
14684
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
14685
|
+
portalZIndex: 99,
|
|
14686
|
+
responsive: true,
|
|
14687
|
+
role: "img"
|
|
14688
|
+
};
|
|
14689
|
+
function useVictoryContainer(initialProps) {
|
|
14690
|
+
const props = {
|
|
14691
|
+
...defaultProps,
|
|
14692
|
+
...initialProps
|
|
14939
14693
|
};
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14694
|
+
const {
|
|
14695
|
+
title,
|
|
14696
|
+
desc,
|
|
14697
|
+
width,
|
|
14698
|
+
height,
|
|
14699
|
+
responsive
|
|
14700
|
+
} = props;
|
|
14701
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
14702
|
+
|
|
14703
|
+
// Generated ID stored in ref because it needs to persist across renders
|
|
14704
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default()("victory-container-"));
|
|
14705
|
+
const containerId = props.containerId ?? generatedId.current;
|
|
14706
|
+
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
14707
|
+
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
14708
|
+
const dimensions = responsive ? {
|
|
14709
|
+
width: "100%",
|
|
14710
|
+
height: "100%"
|
|
14711
|
+
} : {
|
|
14712
|
+
width,
|
|
14713
|
+
height
|
|
14949
14714
|
};
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
const
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
} : {
|
|
15006
|
-
width,
|
|
15007
|
-
height
|
|
14715
|
+
const viewBox = responsive ? `0 0 ${width} ${height}` : undefined;
|
|
14716
|
+
const preserveAspectRatio = responsive ? props.preserveAspectRatio : undefined;
|
|
14717
|
+
const ariaLabelledBy = [title && getIdForElement("title"), props["aria-labelledby"]].filter(Boolean).join(" ") || undefined;
|
|
14718
|
+
const ariaDescribedBy = [desc && getIdForElement("desc"), props["aria-describedby"]].filter(Boolean).join(" ") || undefined;
|
|
14719
|
+
const titleId = getIdForElement("title");
|
|
14720
|
+
const descId = getIdForElement("desc");
|
|
14721
|
+
return {
|
|
14722
|
+
...props,
|
|
14723
|
+
titleId,
|
|
14724
|
+
descId,
|
|
14725
|
+
dimensions,
|
|
14726
|
+
viewBox,
|
|
14727
|
+
preserveAspectRatio,
|
|
14728
|
+
ariaLabelledBy,
|
|
14729
|
+
ariaDescribedBy,
|
|
14730
|
+
userProps,
|
|
14731
|
+
localContainerRef
|
|
14732
|
+
};
|
|
14733
|
+
}
|
|
14734
|
+
const VictoryContainer = initialProps => {
|
|
14735
|
+
const {
|
|
14736
|
+
role,
|
|
14737
|
+
title,
|
|
14738
|
+
desc,
|
|
14739
|
+
children,
|
|
14740
|
+
className,
|
|
14741
|
+
portalZIndex,
|
|
14742
|
+
portalComponent,
|
|
14743
|
+
width,
|
|
14744
|
+
height,
|
|
14745
|
+
style,
|
|
14746
|
+
tabIndex,
|
|
14747
|
+
responsive,
|
|
14748
|
+
events,
|
|
14749
|
+
ouiaId,
|
|
14750
|
+
ouiaSafe,
|
|
14751
|
+
ouiaType,
|
|
14752
|
+
dimensions,
|
|
14753
|
+
ariaDescribedBy,
|
|
14754
|
+
ariaLabelledBy,
|
|
14755
|
+
viewBox,
|
|
14756
|
+
preserveAspectRatio,
|
|
14757
|
+
userProps,
|
|
14758
|
+
titleId,
|
|
14759
|
+
descId,
|
|
14760
|
+
containerRef,
|
|
14761
|
+
localContainerRef
|
|
14762
|
+
} = useVictoryContainer(initialProps);
|
|
14763
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
14764
|
+
if (!events?.onWheel) return;
|
|
14765
|
+
const handleWheel = e => e.preventDefault();
|
|
14766
|
+
const container = localContainerRef?.current;
|
|
14767
|
+
container?.addEventListener("wheel", handleWheel);
|
|
14768
|
+
return () => {
|
|
14769
|
+
container?.removeEventListener("wheel", handleWheel);
|
|
15008
14770
|
};
|
|
15009
|
-
|
|
14771
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14772
|
+
}, []);
|
|
14773
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_4__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
|
14774
|
+
className: className,
|
|
14775
|
+
style: {
|
|
14776
|
+
...style,
|
|
14777
|
+
width: responsive ? style?.width : dimensions.width,
|
|
14778
|
+
height: responsive ? style?.height : dimensions.height,
|
|
15010
14779
|
pointerEvents: "none",
|
|
15011
14780
|
touchAction: "none",
|
|
15012
14781
|
position: "relative"
|
|
15013
|
-
},
|
|
15014
|
-
|
|
14782
|
+
},
|
|
14783
|
+
"data-ouia-component-id": ouiaId,
|
|
14784
|
+
"data-ouia-component-type": ouiaType,
|
|
14785
|
+
"data-ouia-safe": ouiaSafe,
|
|
14786
|
+
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_5__.mergeRefs)([localContainerRef, containerRef])
|
|
14787
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
|
14788
|
+
width: width,
|
|
14789
|
+
height: height,
|
|
14790
|
+
tabIndex: tabIndex,
|
|
14791
|
+
role: role,
|
|
14792
|
+
"aria-labelledby": ariaLabelledBy,
|
|
14793
|
+
"aria-describedby": ariaDescribedBy,
|
|
14794
|
+
viewBox: viewBox,
|
|
14795
|
+
preserveAspectRatio: preserveAspectRatio,
|
|
14796
|
+
style: {
|
|
14797
|
+
...dimensions,
|
|
14798
|
+
pointerEvents: "all"
|
|
14799
|
+
}
|
|
14800
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("title", {
|
|
14801
|
+
id: titleId
|
|
14802
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("desc", {
|
|
14803
|
+
id: descId
|
|
14804
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
|
14805
|
+
style: {
|
|
14806
|
+
...dimensions,
|
|
15015
14807
|
zIndex: portalZIndex,
|
|
15016
14808
|
position: "absolute",
|
|
15017
14809
|
top: 0,
|
|
15018
14810
|
left: 0
|
|
15019
|
-
}
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
|
|
14811
|
+
}
|
|
14812
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
14813
|
+
as: portalComponent,
|
|
14814
|
+
width: width,
|
|
14815
|
+
height: height,
|
|
14816
|
+
viewBox: viewBox,
|
|
14817
|
+
preserveAspectRatio: preserveAspectRatio,
|
|
14818
|
+
style: {
|
|
14819
|
+
...dimensions,
|
|
15024
14820
|
overflow: "visible"
|
|
15025
|
-
}
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
viewBox: svgProps.viewBox,
|
|
15030
|
-
preserveAspectRatio: svgProps.preserveAspectRatio,
|
|
15031
|
-
style: portalSvgStyle
|
|
15032
|
-
};
|
|
15033
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_7__.PortalContext.Provider, {
|
|
15034
|
-
value: {
|
|
15035
|
-
portalUpdate: this.portalUpdate,
|
|
15036
|
-
portalRegister: this.portalRegister,
|
|
15037
|
-
portalDeregister: this.portalDeregister
|
|
15038
|
-
}
|
|
15039
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", _extends({
|
|
15040
|
-
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, style, divStyle),
|
|
15041
|
-
className: className,
|
|
15042
|
-
ref: this.saveContainerRef
|
|
15043
|
-
}, this.getOUIAProps(props)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("svg", _extends({}, svgProps, {
|
|
15044
|
-
style: svgStyle
|
|
15045
|
-
}), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("title", {
|
|
15046
|
-
id: this.getIdForElement("title")
|
|
15047
|
-
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("desc", {
|
|
15048
|
-
id: this.getIdForElement("desc")
|
|
15049
|
-
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
|
15050
|
-
style: portalDivStyle
|
|
15051
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(portalComponent, {
|
|
15052
|
-
...portalProps,
|
|
15053
|
-
ref: this.savePortalRef
|
|
15054
|
-
}))));
|
|
15055
|
-
}
|
|
15056
|
-
render() {
|
|
15057
|
-
const {
|
|
15058
|
-
width,
|
|
15059
|
-
height,
|
|
15060
|
-
responsive,
|
|
15061
|
-
events,
|
|
15062
|
-
title,
|
|
15063
|
-
desc,
|
|
15064
|
-
tabIndex,
|
|
15065
|
-
preserveAspectRatio,
|
|
15066
|
-
role
|
|
15067
|
-
} = this.props;
|
|
15068
|
-
const style = responsive ? this.props.style : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.omit(this.props.style, ["height", "width"]);
|
|
15069
|
-
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_8__.getSafeUserProps(this.props);
|
|
15070
|
-
const svgProps = Object.assign({
|
|
15071
|
-
width,
|
|
15072
|
-
height,
|
|
15073
|
-
tabIndex,
|
|
15074
|
-
role,
|
|
15075
|
-
"aria-labelledby": [title && this.getIdForElement("title"), this.props["aria-labelledby"]].filter(Boolean).join(" ") || undefined,
|
|
15076
|
-
"aria-describedby": [desc && this.getIdForElement("desc"), this.props["aria-describedby"]].filter(Boolean).join(" ") || undefined,
|
|
15077
|
-
viewBox: responsive ? `0 0 ${width} ${height}` : undefined,
|
|
15078
|
-
preserveAspectRatio: responsive ? preserveAspectRatio : undefined,
|
|
15079
|
-
...userProps
|
|
15080
|
-
}, events);
|
|
15081
|
-
return this.renderContainer(this.props, svgProps, style);
|
|
15082
|
-
}
|
|
15083
|
-
}
|
|
14821
|
+
}
|
|
14822
|
+
}))));
|
|
14823
|
+
};
|
|
14824
|
+
VictoryContainer.role = "container";
|
|
15084
14825
|
|
|
15085
14826
|
/***/ }),
|
|
15086
14827
|
|
|
@@ -15542,10 +15283,7 @@ const defaultProps = {
|
|
|
15542
15283
|
lineHeight: 1
|
|
15543
15284
|
};
|
|
15544
15285
|
const VictoryLabel = initialProps => {
|
|
15545
|
-
const props = evaluateProps({
|
|
15546
|
-
...defaultProps,
|
|
15547
|
-
...initialProps
|
|
15548
|
-
});
|
|
15286
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
15549
15287
|
if (props.text === null || props.text === undefined) {
|
|
15550
15288
|
return null;
|
|
15551
15289
|
}
|
|
@@ -15596,17 +15334,83 @@ VictoryLabel.defaultStyles = defaultStyles;
|
|
|
15596
15334
|
"use strict";
|
|
15597
15335
|
__webpack_require__.r(__webpack_exports__);
|
|
15598
15336
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15599
|
-
/* harmony export */ "PortalContext": function() { return /* binding */ PortalContext; }
|
|
15337
|
+
/* harmony export */ "PortalContext": function() { return /* binding */ PortalContext; },
|
|
15338
|
+
/* harmony export */ "PortalProvider": function() { return /* binding */ PortalProvider; },
|
|
15339
|
+
/* harmony export */ "usePortalContext": function() { return /* binding */ usePortalContext; }
|
|
15600
15340
|
/* harmony export */ });
|
|
15601
15341
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15602
15342
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15603
15343
|
|
|
15604
|
-
|
|
15605
|
-
* The React context object consumers may use to access the context of the
|
|
15606
|
-
* portal.
|
|
15607
|
-
*/
|
|
15608
|
-
const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
15344
|
+
const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(undefined);
|
|
15609
15345
|
PortalContext.displayName = "PortalContext";
|
|
15346
|
+
const usePortalContext = () => {
|
|
15347
|
+
const context = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(PortalContext);
|
|
15348
|
+
if (!context) {
|
|
15349
|
+
throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");
|
|
15350
|
+
}
|
|
15351
|
+
return context;
|
|
15352
|
+
};
|
|
15353
|
+
const PortalProvider = _ref => {
|
|
15354
|
+
let {
|
|
15355
|
+
children
|
|
15356
|
+
} = _ref;
|
|
15357
|
+
const [portalChildren, setPortalChildren] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(new Map());
|
|
15358
|
+
const addChild = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((id, element) => {
|
|
15359
|
+
setPortalChildren(prevChildren => {
|
|
15360
|
+
const nextChildren = new Map(prevChildren);
|
|
15361
|
+
nextChildren.set(id, element);
|
|
15362
|
+
return nextChildren;
|
|
15363
|
+
});
|
|
15364
|
+
}, [setPortalChildren]);
|
|
15365
|
+
const removeChild = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(id => {
|
|
15366
|
+
setPortalChildren(prevChildren => {
|
|
15367
|
+
const nextChildren = new Map(prevChildren);
|
|
15368
|
+
nextChildren.delete(id);
|
|
15369
|
+
return nextChildren;
|
|
15370
|
+
});
|
|
15371
|
+
}, [setPortalChildren]);
|
|
15372
|
+
const contextValue = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => ({
|
|
15373
|
+
addChild,
|
|
15374
|
+
removeChild,
|
|
15375
|
+
children: portalChildren
|
|
15376
|
+
}), [addChild, removeChild, portalChildren]);
|
|
15377
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PortalContext.Provider, {
|
|
15378
|
+
value: contextValue
|
|
15379
|
+
}, children);
|
|
15380
|
+
};
|
|
15381
|
+
|
|
15382
|
+
/***/ }),
|
|
15383
|
+
|
|
15384
|
+
/***/ "../../victory-core/es/victory-portal/portal-outlet.js":
|
|
15385
|
+
/*!*************************************************************!*\
|
|
15386
|
+
!*** ../../victory-core/es/victory-portal/portal-outlet.js ***!
|
|
15387
|
+
\*************************************************************/
|
|
15388
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
15389
|
+
|
|
15390
|
+
"use strict";
|
|
15391
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15392
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15393
|
+
/* harmony export */ "PortalOutlet": function() { return /* binding */ PortalOutlet; }
|
|
15394
|
+
/* harmony export */ });
|
|
15395
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15396
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15397
|
+
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
15398
|
+
|
|
15399
|
+
|
|
15400
|
+
const PortalOutlet = _ref => {
|
|
15401
|
+
let {
|
|
15402
|
+
as: portalComponent,
|
|
15403
|
+
...props
|
|
15404
|
+
} = _ref;
|
|
15405
|
+
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_1__.usePortalContext)();
|
|
15406
|
+
const children = Array.from(portalContext.children.entries()).map(_ref2 => {
|
|
15407
|
+
let [key, node] = _ref2;
|
|
15408
|
+
return !node.key ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(node, {
|
|
15409
|
+
key
|
|
15410
|
+
}) : node;
|
|
15411
|
+
});
|
|
15412
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(portalComponent, props, children);
|
|
15413
|
+
};
|
|
15610
15414
|
|
|
15611
15415
|
/***/ }),
|
|
15612
15416
|
|
|
@@ -15623,39 +15427,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15623
15427
|
/* harmony export */ });
|
|
15624
15428
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15625
15429
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15430
|
+
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); }
|
|
15626
15431
|
|
|
15627
|
-
|
|
15628
|
-
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
this.index = 1;
|
|
15633
|
-
}
|
|
15634
|
-
portalRegister = () => {
|
|
15635
|
-
return ++this.index;
|
|
15636
|
-
};
|
|
15637
|
-
portalUpdate = (key, element) => {
|
|
15638
|
-
this.map[key] = element;
|
|
15639
|
-
this.forceUpdate();
|
|
15640
|
-
};
|
|
15641
|
-
portalDeregister = key => {
|
|
15642
|
-
delete this.map[key];
|
|
15643
|
-
this.forceUpdate();
|
|
15644
|
-
};
|
|
15645
|
-
getChildren() {
|
|
15646
|
-
return Object.keys(this.map).map(key => {
|
|
15647
|
-
const el = this.map[key];
|
|
15648
|
-
return el ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(el, {
|
|
15649
|
-
key
|
|
15650
|
-
}) : el;
|
|
15651
|
-
});
|
|
15652
|
-
}
|
|
15653
|
-
|
|
15654
|
-
// Overridden in victory-core-native
|
|
15655
|
-
render() {
|
|
15656
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", this.props, this.getChildren());
|
|
15657
|
-
}
|
|
15658
|
-
}
|
|
15432
|
+
const Portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef((props, ref) => {
|
|
15433
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
15434
|
+
ref: ref
|
|
15435
|
+
}, props));
|
|
15436
|
+
});
|
|
15659
15437
|
|
|
15660
15438
|
/***/ }),
|
|
15661
15439
|
|
|
@@ -15682,59 +15460,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15682
15460
|
|
|
15683
15461
|
|
|
15684
15462
|
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
|
|
15463
|
+
const defaultProps = {
|
|
15464
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
15465
|
+
};
|
|
15466
|
+
const VictoryPortal = initialProps => {
|
|
15467
|
+
const props = {
|
|
15468
|
+
...defaultProps,
|
|
15469
|
+
...initialProps
|
|
15690
15470
|
};
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15695
|
-
|
|
15696
|
-
_victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
|
|
15697
|
-
this.renderInPlace = true;
|
|
15698
|
-
}
|
|
15699
|
-
this.checkedContext = true;
|
|
15700
|
-
}
|
|
15701
|
-
this.forceUpdate();
|
|
15702
|
-
}
|
|
15703
|
-
componentDidUpdate() {
|
|
15704
|
-
if (!this.renderInPlace) {
|
|
15705
|
-
this.portalKey = this.portalKey || this.context.portalRegister();
|
|
15706
|
-
this.context.portalUpdate(this.portalKey, this.element);
|
|
15707
|
-
}
|
|
15471
|
+
const id = react__WEBPACK_IMPORTED_MODULE_1___default().useId();
|
|
15472
|
+
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_2__.usePortalContext)();
|
|
15473
|
+
if (!portalContext) {
|
|
15474
|
+
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
15475
|
+
_victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
|
|
15708
15476
|
}
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
this.context.portalDeregister(this.portalKey);
|
|
15712
|
-
}
|
|
15713
|
-
}
|
|
15714
|
-
|
|
15715
|
-
// Overridden in victory-core-native
|
|
15716
|
-
renderPortal(child) {
|
|
15717
|
-
if (this.renderInPlace) {
|
|
15718
|
-
return child;
|
|
15719
|
-
}
|
|
15720
|
-
this.element = child;
|
|
15721
|
-
return null;
|
|
15722
|
-
}
|
|
15723
|
-
render() {
|
|
15724
|
-
const children = Array.isArray(this.props.children) ? this.props.children[0] : this.props.children;
|
|
15477
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
15478
|
+
const children = Array.isArray(props.children) ? props.children[0] : props.children;
|
|
15725
15479
|
const {
|
|
15726
15480
|
groupComponent
|
|
15727
|
-
} =
|
|
15481
|
+
} = props;
|
|
15728
15482
|
const childProps = children && children.props || {};
|
|
15729
15483
|
const standardProps = childProps.groupComponent ? {
|
|
15730
15484
|
groupComponent,
|
|
15731
15485
|
standalone: false
|
|
15732
15486
|
} : {};
|
|
15733
|
-
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(
|
|
15487
|
+
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]));
|
|
15734
15488
|
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
|
|
15735
|
-
|
|
15736
|
-
|
|
15737
|
-
}
|
|
15489
|
+
portalContext.addChild(id, child);
|
|
15490
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15491
|
+
}, [props.children]);
|
|
15492
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
|
|
15493
|
+
return () => portalContext.removeChild(id);
|
|
15494
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15495
|
+
}, []);
|
|
15496
|
+
return null;
|
|
15497
|
+
};
|
|
15498
|
+
VictoryPortal.role = "portal";
|
|
15738
15499
|
|
|
15739
15500
|
/***/ }),
|
|
15740
15501
|
|
|
@@ -15749,10 +15510,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15749
15510
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15750
15511
|
/* harmony export */ "Arc": function() { return /* binding */ Arc; }
|
|
15751
15512
|
/* harmony export */ });
|
|
15752
|
-
/* harmony import */ var
|
|
15753
|
-
/* harmony import */ var
|
|
15754
|
-
/* harmony import */ var
|
|
15755
|
-
/* harmony import */ var
|
|
15513
|
+
/* 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");
|
|
15514
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
15515
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
15516
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
15517
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
15518
|
+
/* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path */ "../../victory-core/es/victory-primitives/path.js");
|
|
15519
|
+
|
|
15756
15520
|
/* eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2, 180] }]*/
|
|
15757
15521
|
|
|
15758
15522
|
|
|
@@ -15768,12 +15532,12 @@ const getArcPath = props => {
|
|
|
15768
15532
|
} = props;
|
|
15769
15533
|
// Always draw the path as two arcs so that complete circles may be rendered.
|
|
15770
15534
|
const halfAngle = Math.abs(endAngle - startAngle) / 2 + startAngle;
|
|
15771
|
-
const x1 = cx + r * Math.cos(
|
|
15772
|
-
const y1 = cy - r * Math.sin(
|
|
15773
|
-
const x2 = cx + r * Math.cos(
|
|
15774
|
-
const y2 = cy - r * Math.sin(
|
|
15775
|
-
const x3 = cx + r * Math.cos(
|
|
15776
|
-
const y3 = cy - r * Math.sin(
|
|
15535
|
+
const x1 = cx + r * Math.cos(_victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.degreesToRadians(startAngle));
|
|
15536
|
+
const y1 = cy - r * Math.sin(_victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.degreesToRadians(startAngle));
|
|
15537
|
+
const x2 = cx + r * Math.cos(_victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.degreesToRadians(halfAngle));
|
|
15538
|
+
const y2 = cy - r * Math.sin(_victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.degreesToRadians(halfAngle));
|
|
15539
|
+
const x3 = cx + r * Math.cos(_victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.degreesToRadians(endAngle));
|
|
15540
|
+
const y3 = cy - r * Math.sin(_victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.degreesToRadians(endAngle));
|
|
15777
15541
|
const largerArcFlag1 = halfAngle - startAngle <= 180 ? 0 : 1;
|
|
15778
15542
|
const largerArcFlag2 = endAngle - halfAngle <= 180 ? 0 : 1;
|
|
15779
15543
|
const arcStart = closedPath ? ` M ${cx}, ${cy} L ${x1}, ${y1}` : `M ${x1}, ${y1}`;
|
|
@@ -15791,14 +15555,14 @@ const evaluateProps = props => {
|
|
|
15791
15555
|
* `style`
|
|
15792
15556
|
* `tabIndex`
|
|
15793
15557
|
*/
|
|
15794
|
-
const ariaLabel =
|
|
15795
|
-
const desc =
|
|
15796
|
-
const id =
|
|
15797
|
-
const style =
|
|
15558
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
15559
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
15560
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
15561
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
15798
15562
|
stroke: "black",
|
|
15799
15563
|
fill: "none"
|
|
15800
15564
|
}, props.style), props);
|
|
15801
|
-
const tabIndex =
|
|
15565
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
15802
15566
|
return Object.assign({}, props, {
|
|
15803
15567
|
ariaLabel,
|
|
15804
15568
|
desc,
|
|
@@ -15808,16 +15572,13 @@ const evaluateProps = props => {
|
|
|
15808
15572
|
});
|
|
15809
15573
|
};
|
|
15810
15574
|
const defaultProps = {
|
|
15811
|
-
pathComponent: /*#__PURE__*/
|
|
15575
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_path__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
15812
15576
|
role: "presentation",
|
|
15813
15577
|
shapeRendering: "auto"
|
|
15814
15578
|
};
|
|
15815
15579
|
const Arc = initialProps => {
|
|
15816
|
-
const props = evaluateProps({
|
|
15817
|
-
|
|
15818
|
-
...initialProps
|
|
15819
|
-
});
|
|
15820
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
15580
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
15581
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
15821
15582
|
...props.events,
|
|
15822
15583
|
"aria-label": props.ariaLabel,
|
|
15823
15584
|
d: getArcPath(props),
|
|
@@ -15845,11 +15606,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15845
15606
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15846
15607
|
/* harmony export */ "Background": function() { return /* binding */ Background; }
|
|
15847
15608
|
/* harmony export */ });
|
|
15848
|
-
/* harmony import */ var
|
|
15849
|
-
/* harmony import */ var
|
|
15850
|
-
/* harmony import */ var
|
|
15851
|
-
/* harmony import */ var
|
|
15852
|
-
/* harmony import */ var
|
|
15609
|
+
/* 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");
|
|
15610
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
15611
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
15612
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
15613
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
15614
|
+
/* harmony import */ var _rect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
15615
|
+
/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle */ "../../victory-core/es/victory-primitives/circle.js");
|
|
15616
|
+
|
|
15853
15617
|
|
|
15854
15618
|
|
|
15855
15619
|
|
|
@@ -15859,23 +15623,20 @@ const evaluateProps = props => {
|
|
|
15859
15623
|
* Potential evaluated prop is:
|
|
15860
15624
|
* `id`
|
|
15861
15625
|
*/
|
|
15862
|
-
const id =
|
|
15626
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
15863
15627
|
return Object.assign({}, props, {
|
|
15864
15628
|
id
|
|
15865
15629
|
});
|
|
15866
15630
|
};
|
|
15867
15631
|
const defaultProps = {
|
|
15868
|
-
circleComponent: /*#__PURE__*/
|
|
15869
|
-
rectComponent: /*#__PURE__*/
|
|
15632
|
+
circleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_circle__WEBPACK_IMPORTED_MODULE_3__.Circle, null),
|
|
15633
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_rect__WEBPACK_IMPORTED_MODULE_4__.Rect, null),
|
|
15870
15634
|
role: "presentation",
|
|
15871
15635
|
shapeRendering: "auto"
|
|
15872
15636
|
};
|
|
15873
15637
|
const Background = initialProps => {
|
|
15874
|
-
const props = evaluateProps({
|
|
15875
|
-
|
|
15876
|
-
...initialProps
|
|
15877
|
-
});
|
|
15878
|
-
return props.polar ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.circleComponent, {
|
|
15638
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
15639
|
+
return props.polar ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.circleComponent, {
|
|
15879
15640
|
...props.events,
|
|
15880
15641
|
style: props.style,
|
|
15881
15642
|
role: props.role,
|
|
@@ -15884,7 +15645,7 @@ const Background = initialProps => {
|
|
|
15884
15645
|
cy: props.y,
|
|
15885
15646
|
r: props.height,
|
|
15886
15647
|
className: props.className
|
|
15887
|
-
}) : /*#__PURE__*/
|
|
15648
|
+
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.rectComponent, {
|
|
15888
15649
|
...props.events,
|
|
15889
15650
|
style: props.style,
|
|
15890
15651
|
role: props.role,
|
|
@@ -15912,10 +15673,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15912
15673
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15913
15674
|
/* harmony export */ "Border": function() { return /* binding */ Border; }
|
|
15914
15675
|
/* harmony export */ });
|
|
15915
|
-
/* harmony import */ var
|
|
15916
|
-
/* harmony import */ var
|
|
15917
|
-
/* harmony import */ var
|
|
15918
|
-
/* harmony import */ var
|
|
15676
|
+
/* 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");
|
|
15677
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
15678
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
15679
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
15680
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
15681
|
+
/* harmony import */ var _rect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
15682
|
+
|
|
15919
15683
|
|
|
15920
15684
|
|
|
15921
15685
|
|
|
@@ -15928,13 +15692,13 @@ const evaluateProps = props => {
|
|
|
15928
15692
|
* `style`
|
|
15929
15693
|
* `tabIndex`
|
|
15930
15694
|
*/
|
|
15931
|
-
const ariaLabel =
|
|
15932
|
-
const desc =
|
|
15933
|
-
const id =
|
|
15934
|
-
const style =
|
|
15695
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
15696
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
15697
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
15698
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
15935
15699
|
fill: "none"
|
|
15936
15700
|
}, props.style), props);
|
|
15937
|
-
const tabIndex =
|
|
15701
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
15938
15702
|
return Object.assign({}, props, {
|
|
15939
15703
|
ariaLabel,
|
|
15940
15704
|
desc,
|
|
@@ -15944,16 +15708,13 @@ const evaluateProps = props => {
|
|
|
15944
15708
|
});
|
|
15945
15709
|
};
|
|
15946
15710
|
const defaultProps = {
|
|
15947
|
-
rectComponent: /*#__PURE__*/
|
|
15711
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_rect__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
15948
15712
|
role: "presentation",
|
|
15949
15713
|
shapeRendering: "auto"
|
|
15950
15714
|
};
|
|
15951
15715
|
const Border = initialProps => {
|
|
15952
|
-
const props = evaluateProps({
|
|
15953
|
-
|
|
15954
|
-
...initialProps
|
|
15955
|
-
});
|
|
15956
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.rectComponent, {
|
|
15716
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
15717
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.rectComponent, {
|
|
15957
15718
|
...props.events,
|
|
15958
15719
|
"aria-label": props.ariaLabel,
|
|
15959
15720
|
style: props.style,
|
|
@@ -16100,10 +15861,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16100
15861
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16101
15862
|
/* harmony export */ "LineSegment": function() { return /* binding */ LineSegment; }
|
|
16102
15863
|
/* harmony export */ });
|
|
16103
|
-
/* harmony import */ var
|
|
16104
|
-
/* harmony import */ var
|
|
16105
|
-
/* harmony import */ var
|
|
16106
|
-
/* harmony import */ var
|
|
15864
|
+
/* 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");
|
|
15865
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
15866
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
15867
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
15868
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
15869
|
+
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "../../victory-core/es/victory-primitives/line.js");
|
|
15870
|
+
|
|
16107
15871
|
|
|
16108
15872
|
|
|
16109
15873
|
|
|
@@ -16116,13 +15880,13 @@ const evaluateProps = props => {
|
|
|
16116
15880
|
* `style`
|
|
16117
15881
|
* `tabIndex`
|
|
16118
15882
|
*/
|
|
16119
|
-
const ariaLabel =
|
|
16120
|
-
const desc =
|
|
16121
|
-
const id =
|
|
16122
|
-
const style =
|
|
15883
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
15884
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
15885
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
15886
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
16123
15887
|
stroke: "black"
|
|
16124
15888
|
}, props.style), props);
|
|
16125
|
-
const tabIndex =
|
|
15889
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
16126
15890
|
return Object.assign({}, props, {
|
|
16127
15891
|
ariaLabel,
|
|
16128
15892
|
desc,
|
|
@@ -16132,16 +15896,13 @@ const evaluateProps = props => {
|
|
|
16132
15896
|
});
|
|
16133
15897
|
};
|
|
16134
15898
|
const defaultProps = {
|
|
16135
|
-
lineComponent: /*#__PURE__*/
|
|
15899
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
16136
15900
|
role: "presentation",
|
|
16137
15901
|
shapeRendering: "auto"
|
|
16138
15902
|
};
|
|
16139
15903
|
const LineSegment = initialProps => {
|
|
16140
|
-
const props = evaluateProps({
|
|
16141
|
-
|
|
16142
|
-
...initialProps
|
|
16143
|
-
});
|
|
16144
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.lineComponent, {
|
|
15904
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
15905
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, {
|
|
16145
15906
|
...props.events,
|
|
16146
15907
|
"aria-label": props.ariaLabel,
|
|
16147
15908
|
style: props.style,
|
|
@@ -16257,12 +16018,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16257
16018
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16258
16019
|
/* harmony export */ "Point": function() { return /* binding */ Point; }
|
|
16259
16020
|
/* harmony export */ });
|
|
16260
|
-
/* harmony import */ var
|
|
16261
|
-
/* harmony import */ var
|
|
16262
|
-
/* harmony import */ var
|
|
16263
|
-
/* harmony import */ var
|
|
16264
|
-
/* harmony import */ var
|
|
16265
|
-
/* harmony import */ var
|
|
16021
|
+
/* 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");
|
|
16022
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
16023
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
16024
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
16025
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
16026
|
+
/* harmony import */ var _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/point-path-helpers */ "../../victory-core/es/victory-util/point-path-helpers.js");
|
|
16027
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
16028
|
+
/* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./path */ "../../victory-core/es/victory-primitives/path.js");
|
|
16029
|
+
|
|
16266
16030
|
|
|
16267
16031
|
|
|
16268
16032
|
|
|
@@ -16278,7 +16042,7 @@ const getPath = props => {
|
|
|
16278
16042
|
if (props.getPath) {
|
|
16279
16043
|
return props.getPath(x, y, size);
|
|
16280
16044
|
}
|
|
16281
|
-
const pathFunctions =
|
|
16045
|
+
const pathFunctions = _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_2__;
|
|
16282
16046
|
const symbolFunction = typeof pathFunctions[symbol] === "function" ? pathFunctions[symbol] : pathFunctions.circle;
|
|
16283
16047
|
return symbolFunction(x, y, size);
|
|
16284
16048
|
};
|
|
@@ -16293,13 +16057,13 @@ const evaluateProps = props => {
|
|
|
16293
16057
|
* `symbol`
|
|
16294
16058
|
* `tabIndex`
|
|
16295
16059
|
*/
|
|
16296
|
-
const ariaLabel =
|
|
16297
|
-
const desc =
|
|
16298
|
-
const id =
|
|
16299
|
-
const size =
|
|
16300
|
-
const style =
|
|
16301
|
-
const symbol =
|
|
16302
|
-
const tabIndex =
|
|
16060
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.ariaLabel, props);
|
|
16061
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.desc, props);
|
|
16062
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.id, props);
|
|
16063
|
+
const size = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.size, props);
|
|
16064
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(props.style, props);
|
|
16065
|
+
const symbol = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.symbol, props);
|
|
16066
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.tabIndex, props);
|
|
16303
16067
|
return Object.assign({}, props, {
|
|
16304
16068
|
ariaLabel,
|
|
16305
16069
|
desc,
|
|
@@ -16311,17 +16075,14 @@ const evaluateProps = props => {
|
|
|
16311
16075
|
});
|
|
16312
16076
|
};
|
|
16313
16077
|
const defaultProps = {
|
|
16314
|
-
pathComponent: /*#__PURE__*/
|
|
16078
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_path__WEBPACK_IMPORTED_MODULE_4__.Path, null),
|
|
16315
16079
|
role: "presentation",
|
|
16316
16080
|
shapeRendering: "auto"
|
|
16317
16081
|
};
|
|
16318
16082
|
const Point = initialProps => {
|
|
16319
|
-
const props = evaluateProps({
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
});
|
|
16323
|
-
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_4__.getSafeUserProps(props);
|
|
16324
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
16083
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
16084
|
+
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_5__.getSafeUserProps(props);
|
|
16085
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
16325
16086
|
...props.events,
|
|
16326
16087
|
"aria-label": props.ariaLabel,
|
|
16327
16088
|
d: getPath(props),
|
|
@@ -16469,10 +16230,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16469
16230
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16470
16231
|
/* harmony export */ "Whisker": function() { return /* binding */ Whisker; }
|
|
16471
16232
|
/* harmony export */ });
|
|
16472
|
-
/* harmony import */ var
|
|
16473
|
-
/* harmony import */ var
|
|
16474
|
-
/* harmony import */ var
|
|
16475
|
-
/* harmony import */ var
|
|
16233
|
+
/* 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");
|
|
16234
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
16235
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
16236
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
16237
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
16238
|
+
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "../../victory-core/es/victory-primitives/line.js");
|
|
16239
|
+
|
|
16476
16240
|
|
|
16477
16241
|
|
|
16478
16242
|
|
|
@@ -16485,11 +16249,11 @@ const evaluateProps = props => {
|
|
|
16485
16249
|
* `style`
|
|
16486
16250
|
* `tabIndex`
|
|
16487
16251
|
*/
|
|
16488
|
-
const ariaLabel =
|
|
16489
|
-
const desc =
|
|
16490
|
-
const id =
|
|
16491
|
-
const style =
|
|
16492
|
-
const tabIndex =
|
|
16252
|
+
const ariaLabel = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
16253
|
+
const desc = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.desc, props);
|
|
16254
|
+
const id = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
16255
|
+
const style = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(props.style, props);
|
|
16256
|
+
const tabIndex = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
16493
16257
|
return Object.assign({}, props, {
|
|
16494
16258
|
ariaLabel,
|
|
16495
16259
|
desc,
|
|
@@ -16499,16 +16263,13 @@ const evaluateProps = props => {
|
|
|
16499
16263
|
});
|
|
16500
16264
|
};
|
|
16501
16265
|
const defaultProps = {
|
|
16502
|
-
groupComponent: /*#__PURE__*/
|
|
16503
|
-
lineComponent: /*#__PURE__*/
|
|
16266
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
|
|
16267
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
16504
16268
|
role: "presentation",
|
|
16505
16269
|
shapeRendering: "auto"
|
|
16506
16270
|
};
|
|
16507
16271
|
const Whisker = initialProps => {
|
|
16508
|
-
const props = evaluateProps({
|
|
16509
|
-
...defaultProps,
|
|
16510
|
-
...initialProps
|
|
16511
|
-
});
|
|
16272
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
16512
16273
|
const {
|
|
16513
16274
|
ariaLabel,
|
|
16514
16275
|
groupComponent,
|
|
@@ -16536,10 +16297,10 @@ const Whisker = initialProps => {
|
|
|
16536
16297
|
role,
|
|
16537
16298
|
shapeRendering
|
|
16538
16299
|
};
|
|
16539
|
-
return /*#__PURE__*/
|
|
16300
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(groupComponent, {}, [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(lineComponent, Object.assign({
|
|
16540
16301
|
key: "major-whisker",
|
|
16541
16302
|
"aria-label": ariaLabel
|
|
16542
|
-
}, baseProps, majorWhisker)), /*#__PURE__*/
|
|
16303
|
+
}, baseProps, majorWhisker)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(lineComponent, Object.assign({
|
|
16543
16304
|
key: "minor-whisker",
|
|
16544
16305
|
"aria-label": ariaLabel
|
|
16545
16306
|
}, baseProps, minorWhisker))]);
|
|
@@ -20115,53 +19876,56 @@ function shallowToJS(x, whitelist) {
|
|
|
20115
19876
|
"use strict";
|
|
20116
19877
|
__webpack_require__.r(__webpack_exports__);
|
|
20117
19878
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20118
|
-
/* harmony export */ "Axis": function() { return /* reexport module object */
|
|
20119
|
-
/* harmony export */ "Collection": function() { return /* reexport module object */
|
|
20120
|
-
/* harmony export */ "Data": function() { return /* reexport module object */
|
|
20121
|
-
/* harmony export */ "DefaultTransitions": function() { return /* reexport module object */
|
|
20122
|
-
/* harmony export */ "Domain": function() { return /* reexport module object */
|
|
20123
|
-
/* harmony export */ "Events": function() { return /* reexport module object */
|
|
20124
|
-
/* harmony export */ "Helpers": function() { return /* reexport module object */
|
|
20125
|
-
/* harmony export */ "Hooks": function() { return /* reexport module object */
|
|
20126
|
-
/* harmony export */ "Immutable": function() { return /* reexport module object */
|
|
20127
|
-
/* harmony export */ "LabelHelpers": function() { return /* reexport module object */
|
|
20128
|
-
/* harmony export */ "LineHelpers": function() { return /* reexport module object */
|
|
20129
|
-
/* harmony export */ "Log": function() { return /* reexport module object */
|
|
20130
|
-
/* harmony export */ "PointPathHelpers": function() { return /* reexport module object */
|
|
20131
|
-
/* harmony export */ "Scale": function() { return /* reexport module object */
|
|
20132
|
-
/* harmony export */ "Selection": function() { return /* reexport module object */
|
|
20133
|
-
/* harmony export */ "Style": function() { return /* reexport module object */
|
|
20134
|
-
/* harmony export */ "TextSize": function() { return /* reexport module object */
|
|
20135
|
-
/* harmony export */ "Timer": function() { return /* reexport safe */
|
|
20136
|
-
/* harmony export */ "TimerContext": function() { return /* reexport safe */
|
|
20137
|
-
/* harmony export */ "Transitions": function() { return /* reexport module object */
|
|
20138
|
-
/* harmony export */ "UserProps": function() { return /* reexport module object */
|
|
20139
|
-
/* harmony export */ "Wrapper": function() { return /* reexport module object */
|
|
20140
|
-
/* harmony export */ "addEvents": function() { return /* reexport safe */ _add_events__WEBPACK_IMPORTED_MODULE_0__.addEvents; }
|
|
19879
|
+
/* harmony export */ "Axis": function() { return /* reexport module object */ _axis__WEBPACK_IMPORTED_MODULE_2__; },
|
|
19880
|
+
/* harmony export */ "Collection": function() { return /* reexport module object */ _collection__WEBPACK_IMPORTED_MODULE_3__; },
|
|
19881
|
+
/* harmony export */ "Data": function() { return /* reexport module object */ _data__WEBPACK_IMPORTED_MODULE_4__; },
|
|
19882
|
+
/* harmony export */ "DefaultTransitions": function() { return /* reexport module object */ _default_transitions__WEBPACK_IMPORTED_MODULE_5__; },
|
|
19883
|
+
/* harmony export */ "Domain": function() { return /* reexport module object */ _domain__WEBPACK_IMPORTED_MODULE_6__; },
|
|
19884
|
+
/* harmony export */ "Events": function() { return /* reexport module object */ _events__WEBPACK_IMPORTED_MODULE_7__; },
|
|
19885
|
+
/* harmony export */ "Helpers": function() { return /* reexport module object */ _helpers__WEBPACK_IMPORTED_MODULE_8__; },
|
|
19886
|
+
/* harmony export */ "Hooks": function() { return /* reexport module object */ _hooks__WEBPACK_IMPORTED_MODULE_9__; },
|
|
19887
|
+
/* harmony export */ "Immutable": function() { return /* reexport module object */ _immutable__WEBPACK_IMPORTED_MODULE_10__; },
|
|
19888
|
+
/* harmony export */ "LabelHelpers": function() { return /* reexport module object */ _label_helpers__WEBPACK_IMPORTED_MODULE_11__; },
|
|
19889
|
+
/* harmony export */ "LineHelpers": function() { return /* reexport module object */ _line_helpers__WEBPACK_IMPORTED_MODULE_12__; },
|
|
19890
|
+
/* harmony export */ "Log": function() { return /* reexport module object */ _log__WEBPACK_IMPORTED_MODULE_13__; },
|
|
19891
|
+
/* harmony export */ "PointPathHelpers": function() { return /* reexport module object */ _point_path_helpers__WEBPACK_IMPORTED_MODULE_14__; },
|
|
19892
|
+
/* harmony export */ "Scale": function() { return /* reexport module object */ _scale__WEBPACK_IMPORTED_MODULE_15__; },
|
|
19893
|
+
/* harmony export */ "Selection": function() { return /* reexport module object */ _selection__WEBPACK_IMPORTED_MODULE_16__; },
|
|
19894
|
+
/* harmony export */ "Style": function() { return /* reexport module object */ _style__WEBPACK_IMPORTED_MODULE_17__; },
|
|
19895
|
+
/* harmony export */ "TextSize": function() { return /* reexport module object */ _textsize__WEBPACK_IMPORTED_MODULE_18__; },
|
|
19896
|
+
/* harmony export */ "Timer": function() { return /* reexport safe */ _timer__WEBPACK_IMPORTED_MODULE_19__["default"]; },
|
|
19897
|
+
/* harmony export */ "TimerContext": function() { return /* reexport safe */ _timer_context__WEBPACK_IMPORTED_MODULE_20__["default"]; },
|
|
19898
|
+
/* harmony export */ "Transitions": function() { return /* reexport module object */ _transitions__WEBPACK_IMPORTED_MODULE_21__; },
|
|
19899
|
+
/* harmony export */ "UserProps": function() { return /* reexport module object */ _user_props__WEBPACK_IMPORTED_MODULE_22__; },
|
|
19900
|
+
/* harmony export */ "Wrapper": function() { return /* reexport module object */ _wrapper__WEBPACK_IMPORTED_MODULE_23__; },
|
|
19901
|
+
/* harmony export */ "addEvents": function() { return /* reexport safe */ _add_events__WEBPACK_IMPORTED_MODULE_0__.addEvents; },
|
|
19902
|
+
/* harmony export */ "mergeRefs": function() { return /* reexport safe */ _merge_refs__WEBPACK_IMPORTED_MODULE_1__.mergeRefs; }
|
|
20141
19903
|
/* harmony export */ });
|
|
20142
19904
|
/* harmony import */ var _add_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add-events */ "../../victory-core/es/victory-util/add-events.js");
|
|
20143
|
-
/* harmony import */ var
|
|
20144
|
-
/* harmony import */ var
|
|
20145
|
-
/* harmony import */ var
|
|
20146
|
-
/* harmony import */ var
|
|
20147
|
-
/* harmony import */ var
|
|
20148
|
-
/* harmony import */ var
|
|
20149
|
-
/* harmony import */ var
|
|
20150
|
-
/* harmony import */ var
|
|
20151
|
-
/* harmony import */ var
|
|
20152
|
-
/* harmony import */ var
|
|
20153
|
-
/* harmony import */ var
|
|
20154
|
-
/* harmony import */ var
|
|
20155
|
-
/* harmony import */ var
|
|
20156
|
-
/* harmony import */ var
|
|
20157
|
-
/* harmony import */ var
|
|
20158
|
-
/* harmony import */ var
|
|
20159
|
-
/* harmony import */ var
|
|
20160
|
-
/* harmony import */ var
|
|
20161
|
-
/* harmony import */ var
|
|
20162
|
-
/* harmony import */ var
|
|
20163
|
-
/* harmony import */ var
|
|
20164
|
-
/* harmony import */ var
|
|
19905
|
+
/* harmony import */ var _merge_refs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./merge-refs */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
19906
|
+
/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./axis */ "../../victory-core/es/victory-util/axis.js");
|
|
19907
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
19908
|
+
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
19909
|
+
/* harmony import */ var _default_transitions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./default-transitions */ "../../victory-core/es/victory-util/default-transitions.js");
|
|
19910
|
+
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./domain */ "../../victory-core/es/victory-util/domain.js");
|
|
19911
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
19912
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
19913
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hooks */ "../../victory-core/es/victory-util/hooks/index.js");
|
|
19914
|
+
/* harmony import */ var _immutable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./immutable */ "../../victory-core/es/victory-util/immutable.js");
|
|
19915
|
+
/* harmony import */ var _label_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./label-helpers */ "../../victory-core/es/victory-util/label-helpers.js");
|
|
19916
|
+
/* harmony import */ var _line_helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./line-helpers */ "../../victory-core/es/victory-util/line-helpers.js");
|
|
19917
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
19918
|
+
/* harmony import */ var _point_path_helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./point-path-helpers */ "../../victory-core/es/victory-util/point-path-helpers.js");
|
|
19919
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
19920
|
+
/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./selection */ "../../victory-core/es/victory-util/selection.js");
|
|
19921
|
+
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./style */ "../../victory-core/es/victory-util/style.js");
|
|
19922
|
+
/* harmony import */ var _textsize__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./textsize */ "../../victory-core/es/victory-util/textsize.js");
|
|
19923
|
+
/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./timer */ "../../victory-core/es/victory-util/timer.js");
|
|
19924
|
+
/* harmony import */ var _timer_context__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
19925
|
+
/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./transitions */ "../../victory-core/es/victory-util/transitions.js");
|
|
19926
|
+
/* harmony import */ var _user_props__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
19927
|
+
/* harmony import */ var _wrapper__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./wrapper */ "../../victory-core/es/victory-util/wrapper.js");
|
|
19928
|
+
|
|
20165
19929
|
|
|
20166
19930
|
|
|
20167
19931
|
|
|
@@ -20554,6 +20318,44 @@ function warn(message) {
|
|
|
20554
20318
|
|
|
20555
20319
|
/***/ }),
|
|
20556
20320
|
|
|
20321
|
+
/***/ "../../victory-core/es/victory-util/merge-refs.js":
|
|
20322
|
+
/*!********************************************************!*\
|
|
20323
|
+
!*** ../../victory-core/es/victory-util/merge-refs.js ***!
|
|
20324
|
+
\********************************************************/
|
|
20325
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
20326
|
+
|
|
20327
|
+
"use strict";
|
|
20328
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20329
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20330
|
+
/* harmony export */ "mergeRefs": function() { return /* binding */ mergeRefs; }
|
|
20331
|
+
/* harmony export */ });
|
|
20332
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
20333
|
+
|
|
20334
|
+
/**
|
|
20335
|
+
* Used to merge multiple React refs into a single callback ref.
|
|
20336
|
+
*
|
|
20337
|
+
* @example
|
|
20338
|
+
* ```tsx
|
|
20339
|
+
* <div ref={mergeRefs([ref, forwardedRef])} />
|
|
20340
|
+
* ```
|
|
20341
|
+
*/
|
|
20342
|
+
function mergeRefs(refs) {
|
|
20343
|
+
return value => {
|
|
20344
|
+
refs.forEach(ref => {
|
|
20345
|
+
// If the ref is a function, it's a callback ref and we call it with the value.
|
|
20346
|
+
if (_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction(ref)) {
|
|
20347
|
+
ref(value);
|
|
20348
|
+
} else if (ref !== null && ref !== undefined) {
|
|
20349
|
+
// If the ref is an object (not null and not undefined), it's an object ref.
|
|
20350
|
+
// We assign the value to its 'current' property.
|
|
20351
|
+
ref.current = value;
|
|
20352
|
+
}
|
|
20353
|
+
});
|
|
20354
|
+
};
|
|
20355
|
+
}
|
|
20356
|
+
|
|
20357
|
+
/***/ }),
|
|
20358
|
+
|
|
20557
20359
|
/***/ "../../victory-core/es/victory-util/point-path-helpers.js":
|
|
20558
20360
|
/*!****************************************************************!*\
|
|
20559
20361
|
!*** ../../victory-core/es/victory-util/point-path-helpers.js ***!
|
|
@@ -22400,28 +22202,25 @@ function getCategories(props, childComponents, allStrings) {
|
|
|
22400
22202
|
"use strict";
|
|
22401
22203
|
__webpack_require__.r(__webpack_exports__);
|
|
22402
22204
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22403
|
-
/* harmony export */ "combineContainerMixins": function() { return /* binding */ combineContainerMixins; },
|
|
22404
22205
|
/* harmony export */ "createContainer": function() { return /* binding */ createContainer; },
|
|
22405
22206
|
/* harmony export */ "makeCreateContainerFunction": function() { return /* binding */ makeCreateContainerFunction; }
|
|
22406
22207
|
/* harmony export */ });
|
|
22407
|
-
/* harmony import */ var
|
|
22408
|
-
/* harmony import */ var
|
|
22409
|
-
/* harmony import */ var
|
|
22410
|
-
/* harmony import */ var
|
|
22411
|
-
/* harmony import */ var
|
|
22412
|
-
/* harmony import */ var
|
|
22413
|
-
/* harmony import */ var
|
|
22414
|
-
/* harmony import */ var
|
|
22415
|
-
/* harmony import */ var
|
|
22416
|
-
/* harmony import */ var
|
|
22417
|
-
/* harmony import */ var
|
|
22418
|
-
/* harmony import */ var
|
|
22419
|
-
/* harmony import */ var
|
|
22420
|
-
/* harmony import */ var
|
|
22421
|
-
/* harmony import */ var
|
|
22422
|
-
/* harmony import */ var
|
|
22423
|
-
/* harmony import */ var victory_brush_container__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-brush-container */ "../../victory-brush-container/es/victory-brush-container.js");
|
|
22424
|
-
/* harmony import */ var victory_cursor_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-cursor-container */ "../../victory-cursor-container/es/victory-cursor-container.js");
|
|
22208
|
+
/* harmony import */ var lodash_toPairs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/toPairs */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toPairs.js");
|
|
22209
|
+
/* harmony import */ var lodash_toPairs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_toPairs__WEBPACK_IMPORTED_MODULE_0__);
|
|
22210
|
+
/* 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");
|
|
22211
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
22212
|
+
/* 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");
|
|
22213
|
+
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
22214
|
+
/* harmony import */ var lodash_forOwn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/forOwn */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/forOwn.js");
|
|
22215
|
+
/* harmony import */ var lodash_forOwn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_forOwn__WEBPACK_IMPORTED_MODULE_3__);
|
|
22216
|
+
/* harmony import */ var victory_zoom_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-zoom-container */ "../../victory-zoom-container/es/victory-zoom-container.js");
|
|
22217
|
+
/* harmony import */ var victory_selection_container__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-selection-container */ "../../victory-selection-container/es/victory-selection-container.js");
|
|
22218
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
|
|
22219
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
22220
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
22221
|
+
/* harmony import */ var victory_voronoi_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-voronoi-container */ "../../victory-voronoi-container/es/victory-voronoi-container.js");
|
|
22222
|
+
/* harmony import */ var victory_cursor_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-cursor-container */ "../../victory-cursor-container/es/victory-cursor-container.js");
|
|
22223
|
+
/* harmony import */ var victory_brush_container__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-brush-container */ "../../victory-brush-container/es/victory-brush-container.js");
|
|
22425
22224
|
|
|
22426
22225
|
|
|
22427
22226
|
|
|
@@ -22445,7 +22244,7 @@ const combineEventHandlers = eventHandlersArray => {
|
|
|
22445
22244
|
// takes an array of event handler objects and produces one eventHandlers object
|
|
22446
22245
|
// creates a custom combinedHandler() for events with multiple conflicting handlers
|
|
22447
22246
|
return eventHandlersArray.reduce((localHandlers, finalHandlers) => {
|
|
22448
|
-
|
|
22247
|
+
lodash_forOwn__WEBPACK_IMPORTED_MODULE_3___default()(localHandlers, (localHandler, eventName) => {
|
|
22449
22248
|
const existingHandler = finalHandlers[eventName];
|
|
22450
22249
|
if (existingHandler) {
|
|
22451
22250
|
// create new handler for event that concats the existing handler's mutations with new ones
|
|
@@ -22466,11 +22265,11 @@ const combineEventHandlers = eventHandlersArray => {
|
|
|
22466
22265
|
const combineDefaultEvents = defaultEvents => {
|
|
22467
22266
|
// takes a defaultEvents array and returns one equal or lesser length,
|
|
22468
22267
|
// by combining any events that have the same target
|
|
22469
|
-
const eventsByTarget =
|
|
22470
|
-
const events =
|
|
22268
|
+
const eventsByTarget = lodash_groupBy__WEBPACK_IMPORTED_MODULE_2___default()(defaultEvents, "target");
|
|
22269
|
+
const events = lodash_toPairs__WEBPACK_IMPORTED_MODULE_0___default()(eventsByTarget).map(_ref => {
|
|
22471
22270
|
let [target, eventsArray] = _ref;
|
|
22472
22271
|
const newEventsArray = eventsArray.filter(Boolean);
|
|
22473
|
-
return
|
|
22272
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(newEventsArray) ? null : {
|
|
22474
22273
|
target,
|
|
22475
22274
|
eventHandlers: combineEventHandlers(eventsArray.map(event => event.eventHandlers))
|
|
22476
22275
|
// note: does not currently handle eventKey or childName
|
|
@@ -22478,68 +22277,58 @@ const combineDefaultEvents = defaultEvents => {
|
|
|
22478
22277
|
});
|
|
22479
22278
|
return events.filter(Boolean);
|
|
22480
22279
|
};
|
|
22481
|
-
|
|
22482
|
-
|
|
22483
|
-
|
|
22484
|
-
|
|
22485
|
-
|
|
22486
|
-
|
|
22487
|
-
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22491
|
-
|
|
22492
|
-
|
|
22493
|
-
|
|
22494
|
-
|
|
22495
|
-
|
|
22496
|
-
|
|
22497
|
-
|
|
22498
|
-
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
|
|
22502
|
-
|
|
22503
|
-
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
|
|
22513
|
-
|
|
22514
|
-
|
|
22515
|
-
|
|
22516
|
-
};
|
|
22517
|
-
const
|
|
22518
|
-
|
|
22519
|
-
|
|
22520
|
-
|
|
22521
|
-
|
|
22522
|
-
|
|
22523
|
-
|
|
22524
|
-
|
|
22525
|
-
|
|
22526
|
-
|
|
22527
|
-
|
|
22528
|
-
|
|
22529
|
-
|
|
22530
|
-
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
}
|
|
22534
|
-
return combineContainerMixins([...firstMixins, ...secondMixins], Container);
|
|
22535
|
-
};
|
|
22536
|
-
const createContainer = makeCreateContainerFunction({
|
|
22537
|
-
zoom: [victory_zoom_container__WEBPACK_IMPORTED_MODULE_7__.zoomContainerMixin],
|
|
22538
|
-
voronoi: [victory_voronoi_container__WEBPACK_IMPORTED_MODULE_8__.voronoiContainerMixin],
|
|
22539
|
-
selection: [victory_selection_container__WEBPACK_IMPORTED_MODULE_9__.selectionContainerMixin],
|
|
22540
|
-
cursor: [victory_cursor_container__WEBPACK_IMPORTED_MODULE_10__.cursorContainerMixin],
|
|
22541
|
-
brush: [victory_brush_container__WEBPACK_IMPORTED_MODULE_11__.brushContainerMixin]
|
|
22542
|
-
}, victory_core__WEBPACK_IMPORTED_MODULE_12__.VictoryContainer);
|
|
22280
|
+
/**
|
|
22281
|
+
* Container hooks are used to provide the container logic to the container components through props and a modified children object
|
|
22282
|
+
* - These hooks contain shared logic for both web and Victory Native containers.
|
|
22283
|
+
* - In this utility, we call multiple of these hooks with the props returned by the previous to combine the container logic.
|
|
22284
|
+
*/
|
|
22285
|
+
const CONTAINER_HOOKS = {
|
|
22286
|
+
zoom: victory_zoom_container__WEBPACK_IMPORTED_MODULE_5__.useVictoryZoomContainer,
|
|
22287
|
+
selection: victory_selection_container__WEBPACK_IMPORTED_MODULE_6__.useVictorySelectionContainer,
|
|
22288
|
+
brush: victory_brush_container__WEBPACK_IMPORTED_MODULE_7__.useVictoryBrushContainer,
|
|
22289
|
+
cursor: victory_cursor_container__WEBPACK_IMPORTED_MODULE_8__.useVictoryCursorContainer,
|
|
22290
|
+
voronoi: victory_voronoi_container__WEBPACK_IMPORTED_MODULE_9__.useVictoryVoronoiContainer
|
|
22291
|
+
};
|
|
22292
|
+
|
|
22293
|
+
/**
|
|
22294
|
+
* Container hooks are wrappers that return a VictoryContainer with the props provided by their respective hooks, and the modified children.
|
|
22295
|
+
* - These containers are specific to the web. Victory Native has its own container components.
|
|
22296
|
+
* - For this utility, we only need the container components to extract the defaultEvents.
|
|
22297
|
+
*/
|
|
22298
|
+
const CONTAINER_COMPONENTS_WEB = {
|
|
22299
|
+
zoom: victory_zoom_container__WEBPACK_IMPORTED_MODULE_5__.VictoryZoomContainer,
|
|
22300
|
+
selection: victory_selection_container__WEBPACK_IMPORTED_MODULE_6__.VictorySelectionContainer,
|
|
22301
|
+
brush: victory_brush_container__WEBPACK_IMPORTED_MODULE_7__.VictoryBrushContainer,
|
|
22302
|
+
cursor: victory_cursor_container__WEBPACK_IMPORTED_MODULE_8__.VictoryCursorContainer,
|
|
22303
|
+
voronoi: victory_voronoi_container__WEBPACK_IMPORTED_MODULE_9__.VictoryVoronoiContainer
|
|
22304
|
+
};
|
|
22305
|
+
function makeCreateContainerFunction(containerComponents, VictoryContainerBase) {
|
|
22306
|
+
return function combineContainers(containerA, containerB) {
|
|
22307
|
+
const ContainerA = containerComponents[containerA];
|
|
22308
|
+
const ContainerB = containerComponents[containerB];
|
|
22309
|
+
const useContainerA = CONTAINER_HOOKS[containerA];
|
|
22310
|
+
const useContainerB = CONTAINER_HOOKS[containerB];
|
|
22311
|
+
const CombinedContainer = props => {
|
|
22312
|
+
const {
|
|
22313
|
+
children: childrenA,
|
|
22314
|
+
props: propsA
|
|
22315
|
+
} = useContainerA(props);
|
|
22316
|
+
const {
|
|
22317
|
+
children: combinedChildren,
|
|
22318
|
+
props: combinedProps
|
|
22319
|
+
} = useContainerB({
|
|
22320
|
+
...propsA,
|
|
22321
|
+
children: childrenA
|
|
22322
|
+
});
|
|
22323
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(VictoryContainerBase, combinedProps, combinedChildren);
|
|
22324
|
+
};
|
|
22325
|
+
CombinedContainer.displayName = `Victory${containerA}${containerB}Container`;
|
|
22326
|
+
CombinedContainer.role = "container";
|
|
22327
|
+
CombinedContainer.defaultEvents = props => combineDefaultEvents([...ContainerA.defaultEvents(props), ...ContainerB.defaultEvents(props)]);
|
|
22328
|
+
return CombinedContainer;
|
|
22329
|
+
};
|
|
22330
|
+
}
|
|
22331
|
+
const createContainer = makeCreateContainerFunction(CONTAINER_COMPONENTS_WEB, victory_core__WEBPACK_IMPORTED_MODULE_10__.VictoryContainer);
|
|
22543
22332
|
|
|
22544
22333
|
/***/ }),
|
|
22545
22334
|
|
|
@@ -22552,7 +22341,6 @@ const createContainer = makeCreateContainerFunction({
|
|
|
22552
22341
|
"use strict";
|
|
22553
22342
|
__webpack_require__.r(__webpack_exports__);
|
|
22554
22343
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22555
|
-
/* harmony export */ "combineContainerMixins": function() { return /* reexport safe */ _create_container__WEBPACK_IMPORTED_MODULE_0__.combineContainerMixins; },
|
|
22556
22344
|
/* harmony export */ "createContainer": function() { return /* reexport safe */ _create_container__WEBPACK_IMPORTED_MODULE_0__.createContainer; },
|
|
22557
22345
|
/* harmony export */ "makeCreateContainerFunction": function() { return /* reexport safe */ _create_container__WEBPACK_IMPORTED_MODULE_0__.makeCreateContainerFunction; }
|
|
22558
22346
|
/* harmony export */ });
|
|
@@ -22690,8 +22478,9 @@ const CursorHelpers = new CursorHelpersClass();
|
|
|
22690
22478
|
__webpack_require__.r(__webpack_exports__);
|
|
22691
22479
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22692
22480
|
/* harmony export */ "CursorHelpers": function() { return /* reexport safe */ _cursor_helpers__WEBPACK_IMPORTED_MODULE_0__.CursorHelpers; },
|
|
22481
|
+
/* harmony export */ "VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ _victory_cursor_container__WEBPACK_IMPORTED_MODULE_1__.VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS; },
|
|
22693
22482
|
/* harmony export */ "VictoryCursorContainer": function() { return /* reexport safe */ _victory_cursor_container__WEBPACK_IMPORTED_MODULE_1__.VictoryCursorContainer; },
|
|
22694
|
-
/* harmony export */ "
|
|
22483
|
+
/* harmony export */ "useVictoryCursorContainer": function() { return /* reexport safe */ _victory_cursor_container__WEBPACK_IMPORTED_MODULE_1__.useVictoryCursorContainer; }
|
|
22695
22484
|
/* harmony export */ });
|
|
22696
22485
|
/* harmony import */ var _cursor_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursor-helpers */ "../../victory-cursor-container/es/cursor-helpers.js");
|
|
22697
22486
|
/* harmony import */ var _victory_cursor_container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./victory-cursor-container */ "../../victory-cursor-container/es/victory-cursor-container.js");
|
|
@@ -22709,8 +22498,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22709
22498
|
"use strict";
|
|
22710
22499
|
__webpack_require__.r(__webpack_exports__);
|
|
22711
22500
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22501
|
+
/* harmony export */ "VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS": function() { return /* binding */ VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS; },
|
|
22712
22502
|
/* harmony export */ "VictoryCursorContainer": function() { return /* binding */ VictoryCursorContainer; },
|
|
22713
|
-
/* harmony export */ "
|
|
22503
|
+
/* harmony export */ "useVictoryCursorContainer": function() { return /* binding */ useVictoryCursorContainer; }
|
|
22714
22504
|
/* harmony export */ });
|
|
22715
22505
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
22716
22506
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -22718,164 +22508,179 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22718
22508
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
22719
22509
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
22720
22510
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
22721
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
22722
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
22723
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
22724
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
22511
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
|
|
22512
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line-segment.js");
|
|
22513
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
22514
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
22725
22515
|
/* harmony import */ var _cursor_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cursor-helpers */ "../../victory-cursor-container/es/cursor-helpers.js");
|
|
22726
22516
|
|
|
22727
22517
|
|
|
22518
|
+
/* eslint-disable complexity */
|
|
22728
22519
|
|
|
22729
22520
|
|
|
22730
22521
|
|
|
22731
|
-
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
22735
|
-
|
|
22736
|
-
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
|
|
22740
|
-
|
|
22741
|
-
|
|
22742
|
-
|
|
22743
|
-
|
|
22744
|
-
|
|
22745
|
-
|
|
22746
|
-
|
|
22747
|
-
|
|
22748
|
-
|
|
22749
|
-
|
|
22750
|
-
|
|
22751
|
-
|
|
22752
|
-
|
|
22753
|
-
|
|
22754
|
-
|
|
22755
|
-
|
|
22756
|
-
},
|
|
22757
|
-
onTouchMove: (evt, targetProps) => {
|
|
22758
|
-
return props.disable ? {} : _cursor_helpers__WEBPACK_IMPORTED_MODULE_6__.CursorHelpers.onMouseMove(evt, targetProps);
|
|
22759
|
-
}
|
|
22760
|
-
}
|
|
22761
|
-
}];
|
|
22522
|
+
const VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS = {
|
|
22523
|
+
cursorLabelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.VictoryLabel, null),
|
|
22524
|
+
cursorLabelOffset: {
|
|
22525
|
+
x: 5,
|
|
22526
|
+
y: -10
|
|
22527
|
+
},
|
|
22528
|
+
cursorComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.LineSegment, null)
|
|
22529
|
+
};
|
|
22530
|
+
const useVictoryCursorContainer = initialProps => {
|
|
22531
|
+
const props = {
|
|
22532
|
+
...VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS,
|
|
22533
|
+
...initialProps
|
|
22534
|
+
};
|
|
22535
|
+
const {
|
|
22536
|
+
children
|
|
22537
|
+
} = props;
|
|
22538
|
+
const getCursorPosition = () => {
|
|
22539
|
+
const {
|
|
22540
|
+
cursorValue,
|
|
22541
|
+
defaultCursorValue,
|
|
22542
|
+
domain,
|
|
22543
|
+
cursorDimension
|
|
22544
|
+
} = props;
|
|
22545
|
+
if (cursorValue) {
|
|
22546
|
+
return cursorValue;
|
|
22762
22547
|
}
|
|
22763
|
-
|
|
22764
|
-
|
|
22765
|
-
|
|
22766
|
-
|
|
22767
|
-
|
|
22768
|
-
cursorDimension
|
|
22769
|
-
} = props;
|
|
22770
|
-
if (cursorValue) {
|
|
22771
|
-
return cursorValue;
|
|
22772
|
-
}
|
|
22773
|
-
if (typeof defaultCursorValue === "number") {
|
|
22774
|
-
return {
|
|
22775
|
-
x: (domain.x[0] + domain.x[1]) / 2,
|
|
22776
|
-
y: (domain.y[0] + domain.y[1]) / 2,
|
|
22548
|
+
if (typeof defaultCursorValue === "number") {
|
|
22549
|
+
return {
|
|
22550
|
+
x: (domain.x[0] + domain.x[1]) / 2,
|
|
22551
|
+
y: (domain.y[0] + domain.y[1]) / 2,
|
|
22552
|
+
...(cursorDimension ? {
|
|
22777
22553
|
[cursorDimension]: defaultCursorValue
|
|
22778
|
-
}
|
|
22779
|
-
}
|
|
22780
|
-
return defaultCursorValue;
|
|
22554
|
+
} : {})
|
|
22555
|
+
};
|
|
22781
22556
|
}
|
|
22782
|
-
|
|
22783
|
-
|
|
22784
|
-
|
|
22785
|
-
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
22789
|
-
|
|
22790
|
-
|
|
22791
|
-
|
|
22792
|
-
|
|
22557
|
+
return defaultCursorValue;
|
|
22558
|
+
};
|
|
22559
|
+
const getCursorLabelOffset = () => {
|
|
22560
|
+
const {
|
|
22561
|
+
cursorLabelOffset
|
|
22562
|
+
} = props;
|
|
22563
|
+
if (typeof cursorLabelOffset === "number") {
|
|
22564
|
+
return {
|
|
22565
|
+
x: cursorLabelOffset,
|
|
22566
|
+
y: cursorLabelOffset
|
|
22567
|
+
};
|
|
22793
22568
|
}
|
|
22794
|
-
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
return
|
|
22800
|
-
}
|
|
22801
|
-
return
|
|
22569
|
+
return cursorLabelOffset;
|
|
22570
|
+
};
|
|
22571
|
+
const getPadding = () => {
|
|
22572
|
+
if (props.padding === undefined) {
|
|
22573
|
+
const child = Array.isArray(props.children) ? props.children.find(c => {
|
|
22574
|
+
return lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default()(c.props) && c.props.padding !== undefined;
|
|
22575
|
+
}) : props.children;
|
|
22576
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(child?.props);
|
|
22802
22577
|
}
|
|
22803
|
-
|
|
22804
|
-
|
|
22805
|
-
|
|
22806
|
-
|
|
22807
|
-
|
|
22808
|
-
|
|
22809
|
-
|
|
22810
|
-
|
|
22811
|
-
|
|
22812
|
-
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
|
|
22816
|
-
|
|
22817
|
-
|
|
22818
|
-
|
|
22819
|
-
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
const padding = this.getPadding(props);
|
|
22824
|
-
const cursorCoordinates = {
|
|
22825
|
-
x: horizontal ? scale.y(cursorValue.y) : scale.x(cursorValue.x),
|
|
22826
|
-
y: horizontal ? scale.x(cursorValue.x) : scale.y(cursorValue.y)
|
|
22827
|
-
};
|
|
22828
|
-
if (cursorLabel) {
|
|
22829
|
-
let labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
22830
|
-
active: true
|
|
22831
|
-
}, cursorLabelComponent.props, {
|
|
22832
|
-
x: cursorCoordinates.x + cursorLabelOffset.x,
|
|
22833
|
-
y: cursorCoordinates.y + cursorLabelOffset.y,
|
|
22834
|
-
datum: cursorValue,
|
|
22835
|
-
active: true,
|
|
22836
|
-
key: `${name}-cursor-label`
|
|
22837
|
-
});
|
|
22838
|
-
if (victory_core__WEBPACK_IMPORTED_MODULE_7__.isTooltip(cursorLabelComponent)) {
|
|
22839
|
-
const tooltipTheme = theme && theme.tooltip || {};
|
|
22840
|
-
labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps, tooltipTheme);
|
|
22841
|
-
}
|
|
22842
|
-
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cursorLabelComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps, {
|
|
22843
|
-
text: victory_core__WEBPACK_IMPORTED_MODULE_7__.evaluateProp(cursorLabel, labelProps)
|
|
22844
|
-
})));
|
|
22845
|
-
}
|
|
22846
|
-
const cursorStyle = Object.assign({
|
|
22847
|
-
stroke: "black"
|
|
22848
|
-
}, cursorComponent.props.style);
|
|
22849
|
-
if (cursorDimension === "x" || cursorDimension === undefined) {
|
|
22850
|
-
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cursorComponent, {
|
|
22851
|
-
key: `${name}-x-cursor`,
|
|
22852
|
-
x1: cursorCoordinates.x,
|
|
22853
|
-
x2: cursorCoordinates.x,
|
|
22854
|
-
y1: padding.top,
|
|
22855
|
-
y2: height - padding.bottom,
|
|
22856
|
-
style: cursorStyle
|
|
22857
|
-
}));
|
|
22858
|
-
}
|
|
22859
|
-
if (cursorDimension === "y" || cursorDimension === undefined) {
|
|
22860
|
-
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cursorComponent, {
|
|
22861
|
-
key: `${name}-y-cursor`,
|
|
22862
|
-
x1: padding.left,
|
|
22863
|
-
x2: width - padding.right,
|
|
22864
|
-
y1: cursorCoordinates.y,
|
|
22865
|
-
y2: cursorCoordinates.y,
|
|
22866
|
-
style: cursorStyle
|
|
22867
|
-
}));
|
|
22868
|
-
}
|
|
22869
|
-
return newElements;
|
|
22578
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_5__.getPadding(props);
|
|
22579
|
+
};
|
|
22580
|
+
const getCursorElements = () => {
|
|
22581
|
+
// eslint-disable-line max-statements
|
|
22582
|
+
const {
|
|
22583
|
+
scale,
|
|
22584
|
+
cursorLabelComponent,
|
|
22585
|
+
cursorLabel,
|
|
22586
|
+
cursorComponent,
|
|
22587
|
+
width,
|
|
22588
|
+
height,
|
|
22589
|
+
name,
|
|
22590
|
+
horizontal,
|
|
22591
|
+
theme
|
|
22592
|
+
} = props;
|
|
22593
|
+
const cursorDimension = _cursor_helpers__WEBPACK_IMPORTED_MODULE_6__.CursorHelpers.getDimension(props);
|
|
22594
|
+
const cursorValue = getCursorPosition();
|
|
22595
|
+
const cursorLabelOffset = getCursorLabelOffset();
|
|
22596
|
+
if (!cursorValue) {
|
|
22597
|
+
return [];
|
|
22870
22598
|
}
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22599
|
+
const newElements = [];
|
|
22600
|
+
const padding = getPadding();
|
|
22601
|
+
const cursorCoordinates = scale && "x" in scale && "y" in scale && typeof scale.y === "function" && typeof scale.x === "function" ? {
|
|
22602
|
+
x: horizontal ? scale.y(cursorValue.y) : scale.x(cursorValue.x),
|
|
22603
|
+
y: horizontal ? scale.x(cursorValue.x) : scale.y(cursorValue.y)
|
|
22604
|
+
} : {
|
|
22605
|
+
x: cursorValue.x,
|
|
22606
|
+
y: cursorValue.y
|
|
22607
|
+
};
|
|
22608
|
+
if (cursorLabel) {
|
|
22609
|
+
let labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
22610
|
+
active: true
|
|
22611
|
+
}, cursorLabelComponent.props, {
|
|
22612
|
+
x: cursorCoordinates.x + cursorLabelOffset.x,
|
|
22613
|
+
y: cursorCoordinates.y + cursorLabelOffset.y,
|
|
22614
|
+
datum: cursorValue,
|
|
22615
|
+
active: true,
|
|
22616
|
+
key: `${name}-cursor-label`
|
|
22617
|
+
});
|
|
22618
|
+
if (victory_core__WEBPACK_IMPORTED_MODULE_5__.isTooltip(cursorLabelComponent)) {
|
|
22619
|
+
const tooltipTheme = theme && theme.tooltip || {};
|
|
22620
|
+
labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps, tooltipTheme);
|
|
22621
|
+
}
|
|
22622
|
+
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cursorLabelComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps, {
|
|
22623
|
+
text: victory_core__WEBPACK_IMPORTED_MODULE_5__.evaluateProp(cursorLabel, labelProps)
|
|
22624
|
+
})));
|
|
22875
22625
|
}
|
|
22626
|
+
const cursorStyle = Object.assign({
|
|
22627
|
+
stroke: "black"
|
|
22628
|
+
}, cursorComponent.props.style);
|
|
22629
|
+
if (cursorDimension === "x" || cursorDimension === undefined) {
|
|
22630
|
+
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cursorComponent, {
|
|
22631
|
+
key: `${name}-x-cursor`,
|
|
22632
|
+
x1: cursorCoordinates.x,
|
|
22633
|
+
x2: cursorCoordinates.x,
|
|
22634
|
+
y1: padding.top,
|
|
22635
|
+
y2: (typeof height === "number" ? height : 0) - padding.bottom,
|
|
22636
|
+
style: cursorStyle
|
|
22637
|
+
}));
|
|
22638
|
+
}
|
|
22639
|
+
if (cursorDimension === "y" || cursorDimension === undefined) {
|
|
22640
|
+
newElements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cursorComponent, {
|
|
22641
|
+
key: `${name}-y-cursor`,
|
|
22642
|
+
x1: padding.left,
|
|
22643
|
+
x2: (typeof width === "number" ? width : 0) - padding.right,
|
|
22644
|
+
y1: cursorCoordinates.y,
|
|
22645
|
+
y2: cursorCoordinates.y,
|
|
22646
|
+
style: cursorStyle
|
|
22647
|
+
}));
|
|
22648
|
+
}
|
|
22649
|
+
return newElements;
|
|
22876
22650
|
};
|
|
22877
|
-
|
|
22878
|
-
|
|
22651
|
+
return {
|
|
22652
|
+
props,
|
|
22653
|
+
children: [...react__WEBPACK_IMPORTED_MODULE_2___default().Children.toArray(children), ...getCursorElements()]
|
|
22654
|
+
};
|
|
22655
|
+
};
|
|
22656
|
+
const VictoryCursorContainer = initialProps => {
|
|
22657
|
+
const {
|
|
22658
|
+
props,
|
|
22659
|
+
children
|
|
22660
|
+
} = useVictoryCursorContainer(initialProps);
|
|
22661
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.VictoryContainer, props, children);
|
|
22662
|
+
};
|
|
22663
|
+
VictoryCursorContainer.role = "container";
|
|
22664
|
+
VictoryCursorContainer.defaultEvents = initialProps => {
|
|
22665
|
+
const props = {
|
|
22666
|
+
...VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS,
|
|
22667
|
+
...initialProps
|
|
22668
|
+
};
|
|
22669
|
+
const createEventHandler = (handler, disabled) =>
|
|
22670
|
+
// eslint-disable-next-line max-params
|
|
22671
|
+
(event, targetProps, eventKey, context) => disabled || props.disable ? {} : handler(event, {
|
|
22672
|
+
...props,
|
|
22673
|
+
...targetProps
|
|
22674
|
+
}, eventKey, context);
|
|
22675
|
+
return [{
|
|
22676
|
+
target: "parent",
|
|
22677
|
+
eventHandlers: {
|
|
22678
|
+
onMouseLeave: createEventHandler(_cursor_helpers__WEBPACK_IMPORTED_MODULE_6__.CursorHelpers.onMouseLeave),
|
|
22679
|
+
onMouseMove: createEventHandler(_cursor_helpers__WEBPACK_IMPORTED_MODULE_6__.CursorHelpers.onMouseMove),
|
|
22680
|
+
onTouchMove: createEventHandler(_cursor_helpers__WEBPACK_IMPORTED_MODULE_6__.CursorHelpers.onMouseMove)
|
|
22681
|
+
}
|
|
22682
|
+
}];
|
|
22683
|
+
};
|
|
22879
22684
|
|
|
22880
22685
|
/***/ }),
|
|
22881
22686
|
|
|
@@ -22890,17 +22695,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22890
22695
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22891
22696
|
/* harmony export */ "ErrorBar": function() { return /* binding */ ErrorBar; }
|
|
22892
22697
|
/* harmony export */ });
|
|
22893
|
-
/* harmony import */ var
|
|
22894
|
-
/* harmony import */ var
|
|
22895
|
-
/* harmony import */ var
|
|
22896
|
-
/* harmony import */ var
|
|
22897
|
-
/* harmony import */ var
|
|
22698
|
+
/* 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");
|
|
22699
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
22700
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
22701
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
22702
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
22703
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line.js");
|
|
22704
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
22705
|
+
|
|
22898
22706
|
/* eslint-disable max-statements */
|
|
22899
22707
|
|
|
22900
22708
|
|
|
22901
22709
|
const renderBorder = (props, error, type) => {
|
|
22902
22710
|
const vertical = type === "right" || type === "left";
|
|
22903
|
-
return /*#__PURE__*/
|
|
22711
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, {
|
|
22904
22712
|
...props.events,
|
|
22905
22713
|
role: props.role,
|
|
22906
22714
|
shapeRendering: props.shapeRendering,
|
|
@@ -22917,7 +22725,7 @@ const renderBorder = (props, error, type) => {
|
|
|
22917
22725
|
};
|
|
22918
22726
|
const renderCross = (props, error, type) => {
|
|
22919
22727
|
const vertical = type === "top" || type === "bottom";
|
|
22920
|
-
return /*#__PURE__*/
|
|
22728
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, {
|
|
22921
22729
|
...props.events,
|
|
22922
22730
|
role: props.role,
|
|
22923
22731
|
shapeRendering: props.shapeRendering,
|
|
@@ -22976,12 +22784,12 @@ const evaluateProps = props => {
|
|
|
22976
22784
|
* `style`
|
|
22977
22785
|
* `tabIndex`
|
|
22978
22786
|
*/
|
|
22979
|
-
const ariaLabel =
|
|
22980
|
-
const id =
|
|
22981
|
-
const style =
|
|
22787
|
+
const ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
22788
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
22789
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
22982
22790
|
stroke: "black"
|
|
22983
22791
|
}, props.style), props);
|
|
22984
|
-
const tabIndex =
|
|
22792
|
+
const tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
22985
22793
|
return Object.assign({}, props, {
|
|
22986
22794
|
ariaLabel,
|
|
22987
22795
|
id,
|
|
@@ -22995,27 +22803,24 @@ const evaluateProps = props => {
|
|
|
22995
22803
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
22996
22804
|
|
|
22997
22805
|
const defaultProps = {
|
|
22998
|
-
groupComponent: /*#__PURE__*/
|
|
22999
|
-
lineComponent: /*#__PURE__*/
|
|
22806
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
|
|
22807
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
23000
22808
|
role: "presentation",
|
|
23001
22809
|
shapeRendering: "auto"
|
|
23002
22810
|
};
|
|
23003
22811
|
const ErrorBar = initialProps => {
|
|
23004
|
-
const props = evaluateProps({
|
|
23005
|
-
...defaultProps,
|
|
23006
|
-
...initialProps
|
|
23007
|
-
});
|
|
22812
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
23008
22813
|
const {
|
|
23009
22814
|
groupComponent
|
|
23010
22815
|
} = props;
|
|
23011
|
-
const userProps =
|
|
22816
|
+
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.getSafeUserProps(props);
|
|
23012
22817
|
const {
|
|
23013
22818
|
tabIndex,
|
|
23014
22819
|
ariaLabel
|
|
23015
22820
|
} = props;
|
|
23016
22821
|
const error = calculateError(props);
|
|
23017
22822
|
const children = [error.right ? renderBorder(props, error, "right") : null, error.left ? renderBorder(props, error, "left") : null, error.bottom ? renderBorder(props, error, "bottom") : null, error.top ? renderBorder(props, error, "top") : null, error.right ? renderCross(props, error, "right") : null, error.left ? renderCross(props, error, "left") : null, error.bottom ? renderCross(props, error, "bottom") : null, error.top ? renderCross(props, error, "top") : null].filter(Boolean);
|
|
23018
|
-
return /*#__PURE__*/
|
|
22823
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(groupComponent, {
|
|
23019
22824
|
tabIndex,
|
|
23020
22825
|
"aria-label": ariaLabel,
|
|
23021
22826
|
...userProps
|
|
@@ -23712,10 +23517,7 @@ const VictoryGroupBase = initialProps => {
|
|
|
23712
23517
|
setAnimationState,
|
|
23713
23518
|
getProps
|
|
23714
23519
|
} = victory_core__WEBPACK_IMPORTED_MODULE_6__.useAnimationState();
|
|
23715
|
-
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => ({
|
|
23716
|
-
...defaultProps,
|
|
23717
|
-
...initialProps
|
|
23718
|
-
}), [initialProps]);
|
|
23520
|
+
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps), [initialProps]);
|
|
23719
23521
|
const props = getProps(propsWithDefaults);
|
|
23720
23522
|
const modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_7__.modifyProps(props, fallbackProps, role);
|
|
23721
23523
|
const {
|
|
@@ -24761,12 +24563,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24761
24563
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24762
24564
|
/* harmony export */ "Curve": function() { return /* binding */ Curve; }
|
|
24763
24565
|
/* harmony export */ });
|
|
24764
|
-
/* harmony import */ var
|
|
24765
|
-
/* harmony import */ var
|
|
24766
|
-
/* harmony import */ var
|
|
24767
|
-
/* harmony import */ var
|
|
24768
|
-
/* harmony import */ var
|
|
24769
|
-
/* harmony import */ var
|
|
24566
|
+
/* 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");
|
|
24567
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
24568
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
24569
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
24570
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
24571
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
24572
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
24573
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/line-helpers.js");
|
|
24574
|
+
|
|
24770
24575
|
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
|
|
24771
24576
|
|
|
24772
24577
|
|
|
@@ -24778,14 +24583,14 @@ const evaluateProps = props => {
|
|
|
24778
24583
|
* `style`
|
|
24779
24584
|
* `tabIndex`
|
|
24780
24585
|
*/
|
|
24781
|
-
const ariaLabel =
|
|
24782
|
-
const id =
|
|
24783
|
-
const style =
|
|
24586
|
+
const ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
24587
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
24588
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(Object.assign({
|
|
24784
24589
|
fill: "none",
|
|
24785
24590
|
stroke: "black",
|
|
24786
24591
|
pointerEvents: "stroke"
|
|
24787
24592
|
}, props.style), props);
|
|
24788
|
-
const tabIndex =
|
|
24593
|
+
const tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
24789
24594
|
return Object.assign({}, props, {
|
|
24790
24595
|
ariaLabel,
|
|
24791
24596
|
id,
|
|
@@ -24794,24 +24599,21 @@ const evaluateProps = props => {
|
|
|
24794
24599
|
});
|
|
24795
24600
|
};
|
|
24796
24601
|
const defaultProps = {
|
|
24797
|
-
pathComponent: /*#__PURE__*/
|
|
24602
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
24798
24603
|
role: "presentation",
|
|
24799
24604
|
shapeRendering: "auto"
|
|
24800
24605
|
};
|
|
24801
24606
|
const Curve = initialProps => {
|
|
24802
|
-
const props = evaluateProps({
|
|
24803
|
-
|
|
24804
|
-
...initialProps
|
|
24805
|
-
});
|
|
24806
|
-
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
24607
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
24608
|
+
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.getSafeUserProps(props);
|
|
24807
24609
|
const {
|
|
24808
24610
|
polar,
|
|
24809
24611
|
origin
|
|
24810
24612
|
} = props;
|
|
24811
|
-
const lineFunction =
|
|
24613
|
+
const lineFunction = victory_core__WEBPACK_IMPORTED_MODULE_5__.getLineFunction(props);
|
|
24812
24614
|
const defaultTransform = polar && origin ? `translate(${origin.x}, ${origin.y})` : undefined;
|
|
24813
24615
|
const d = lineFunction(props.data);
|
|
24814
|
-
return /*#__PURE__*/
|
|
24616
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
24815
24617
|
...props.events,
|
|
24816
24618
|
...userProps,
|
|
24817
24619
|
"aria-label": props.ariaLabel,
|
|
@@ -25524,10 +25326,7 @@ const defaultProps = {
|
|
|
25524
25326
|
shapeRendering: "auto"
|
|
25525
25327
|
};
|
|
25526
25328
|
const Slice = initialProps => {
|
|
25527
|
-
const props = evaluateProps({
|
|
25528
|
-
...defaultProps,
|
|
25529
|
-
...initialProps
|
|
25530
|
-
});
|
|
25329
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
25531
25330
|
const defaultTransform = props.origin ? `translate(${props.origin.x}, ${props.origin.y})` : undefined;
|
|
25532
25331
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
25533
25332
|
...props.events,
|
|
@@ -26633,8 +26432,9 @@ const VictoryScatter = (0,victory_core__WEBPACK_IMPORTED_MODULE_11__.addEvents)(
|
|
|
26633
26432
|
__webpack_require__.r(__webpack_exports__);
|
|
26634
26433
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26635
26434
|
/* harmony export */ "SelectionHelpers": function() { return /* reexport safe */ _selection_helpers__WEBPACK_IMPORTED_MODULE_1__.SelectionHelpers; },
|
|
26435
|
+
/* harmony export */ "VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ _victory_selection_container__WEBPACK_IMPORTED_MODULE_0__.VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS; },
|
|
26636
26436
|
/* harmony export */ "VictorySelectionContainer": function() { return /* reexport safe */ _victory_selection_container__WEBPACK_IMPORTED_MODULE_0__.VictorySelectionContainer; },
|
|
26637
|
-
/* harmony export */ "
|
|
26437
|
+
/* harmony export */ "useVictorySelectionContainer": function() { return /* reexport safe */ _victory_selection_container__WEBPACK_IMPORTED_MODULE_0__.useVictorySelectionContainer; }
|
|
26638
26438
|
/* harmony export */ });
|
|
26639
26439
|
/* harmony import */ var _victory_selection_container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-selection-container */ "../../victory-selection-container/es/victory-selection-container.js");
|
|
26640
26440
|
/* harmony import */ var _selection_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selection-helpers */ "../../victory-selection-container/es/selection-helpers.js");
|
|
@@ -26895,88 +26695,91 @@ const SelectionHelpers = new SelectionHelpersClass();
|
|
|
26895
26695
|
"use strict";
|
|
26896
26696
|
__webpack_require__.r(__webpack_exports__);
|
|
26897
26697
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26698
|
+
/* harmony export */ "VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS": function() { return /* binding */ VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS; },
|
|
26898
26699
|
/* harmony export */ "VictorySelectionContainer": function() { return /* binding */ VictorySelectionContainer; },
|
|
26899
|
-
/* harmony export */ "
|
|
26700
|
+
/* harmony export */ "useVictorySelectionContainer": function() { return /* binding */ useVictorySelectionContainer; }
|
|
26900
26701
|
/* harmony export */ });
|
|
26901
26702
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
26902
26703
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
26903
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
26904
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
26704
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/rect.js");
|
|
26705
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
26905
26706
|
/* harmony import */ var _selection_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selection-helpers */ "../../victory-selection-container/es/selection-helpers.js");
|
|
26906
26707
|
|
|
26907
26708
|
|
|
26908
26709
|
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
|
|
26919
|
-
|
|
26920
|
-
|
|
26921
|
-
|
|
26922
|
-
|
|
26923
|
-
};
|
|
26924
|
-
static defaultEvents(props) {
|
|
26925
|
-
return [{
|
|
26926
|
-
target: "parent",
|
|
26927
|
-
eventHandlers: {
|
|
26928
|
-
onMouseDown: (evt, targetProps) => {
|
|
26929
|
-
return props.disable ? {} : _selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseDown(evt, targetProps);
|
|
26930
|
-
},
|
|
26931
|
-
onTouchStart: (evt, targetProps) => {
|
|
26932
|
-
return props.disable ? {} : _selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseDown(evt, targetProps);
|
|
26933
|
-
},
|
|
26934
|
-
onMouseMove: (evt, targetProps) => {
|
|
26935
|
-
return props.disable ? {} : _selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseMove(evt, targetProps);
|
|
26936
|
-
},
|
|
26937
|
-
onTouchMove: (evt, targetProps) => {
|
|
26938
|
-
return props.disable ? {} : _selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseMove(evt, targetProps);
|
|
26939
|
-
},
|
|
26940
|
-
onMouseUp: (evt, targetProps) => {
|
|
26941
|
-
return props.disable ? {} : _selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseUp(evt, targetProps);
|
|
26942
|
-
},
|
|
26943
|
-
onTouchEnd: (evt, targetProps) => {
|
|
26944
|
-
return props.disable ? {} : _selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseUp(evt, targetProps);
|
|
26945
|
-
}
|
|
26946
|
-
}
|
|
26947
|
-
}];
|
|
26948
|
-
}
|
|
26949
|
-
getRect(props) {
|
|
26950
|
-
const {
|
|
26951
|
-
x1,
|
|
26952
|
-
x2,
|
|
26953
|
-
y1,
|
|
26954
|
-
y2,
|
|
26955
|
-
selectionStyle,
|
|
26956
|
-
selectionComponent,
|
|
26957
|
-
name
|
|
26958
|
-
} = props;
|
|
26959
|
-
const width = Math.abs(x2 - x1) || 1;
|
|
26960
|
-
const height = Math.abs(y2 - y1) || 1;
|
|
26961
|
-
const x = Math.min(x1, x2);
|
|
26962
|
-
const y = Math.min(y1, y2);
|
|
26963
|
-
return y2 && x2 && x1 && y1 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(selectionComponent, {
|
|
26964
|
-
key: `${name}-selection`,
|
|
26965
|
-
x,
|
|
26966
|
-
y,
|
|
26967
|
-
width,
|
|
26968
|
-
height,
|
|
26969
|
-
style: selectionStyle
|
|
26970
|
-
}) : null;
|
|
26971
|
-
}
|
|
26972
|
-
|
|
26973
|
-
// Overrides method in VictoryContainer
|
|
26974
|
-
getChildren(props) {
|
|
26975
|
-
return [...react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children), this.getRect(props)];
|
|
26976
|
-
}
|
|
26710
|
+
const VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS = {
|
|
26711
|
+
activateSelectedData: true,
|
|
26712
|
+
allowSelection: true,
|
|
26713
|
+
selectionComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_1__.Rect, null),
|
|
26714
|
+
selectionStyle: {
|
|
26715
|
+
stroke: "transparent",
|
|
26716
|
+
fill: "black",
|
|
26717
|
+
fillOpacity: 0.1
|
|
26718
|
+
}
|
|
26719
|
+
};
|
|
26720
|
+
const useVictorySelectionContainer = initialProps => {
|
|
26721
|
+
const props = {
|
|
26722
|
+
...VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS,
|
|
26723
|
+
...initialProps
|
|
26977
26724
|
};
|
|
26978
|
-
|
|
26979
|
-
|
|
26725
|
+
const {
|
|
26726
|
+
x1,
|
|
26727
|
+
x2,
|
|
26728
|
+
y1,
|
|
26729
|
+
y2,
|
|
26730
|
+
selectionStyle,
|
|
26731
|
+
selectionComponent,
|
|
26732
|
+
children,
|
|
26733
|
+
name
|
|
26734
|
+
} = props;
|
|
26735
|
+
const width = Math.abs(x2 - x1) || 1;
|
|
26736
|
+
const height = Math.abs(y2 - y1) || 1;
|
|
26737
|
+
const x = Math.min(x1, x2);
|
|
26738
|
+
const y = Math.min(y1, y2);
|
|
26739
|
+
const shouldRenderRect = y1 && y2 && x1 && x2;
|
|
26740
|
+
return {
|
|
26741
|
+
props,
|
|
26742
|
+
children: [children, shouldRenderRect && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(selectionComponent, {
|
|
26743
|
+
key: `${name}-selection`,
|
|
26744
|
+
x,
|
|
26745
|
+
y,
|
|
26746
|
+
width,
|
|
26747
|
+
height,
|
|
26748
|
+
style: selectionStyle
|
|
26749
|
+
})]
|
|
26750
|
+
};
|
|
26751
|
+
};
|
|
26752
|
+
const VictorySelectionContainer = initialProps => {
|
|
26753
|
+
const {
|
|
26754
|
+
props,
|
|
26755
|
+
children
|
|
26756
|
+
} = useVictorySelectionContainer(initialProps);
|
|
26757
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_2__.VictoryContainer, props, children);
|
|
26758
|
+
};
|
|
26759
|
+
VictorySelectionContainer.role = "container";
|
|
26760
|
+
VictorySelectionContainer.defaultEvents = initialProps => {
|
|
26761
|
+
const props = {
|
|
26762
|
+
...VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS,
|
|
26763
|
+
...initialProps
|
|
26764
|
+
};
|
|
26765
|
+
const createEventHandler = (handler, disabled) =>
|
|
26766
|
+
// eslint-disable-next-line max-params
|
|
26767
|
+
(event, targetProps, eventKey, context) => disabled || props.disable ? {} : handler(event, {
|
|
26768
|
+
...props,
|
|
26769
|
+
...targetProps
|
|
26770
|
+
}, eventKey, context);
|
|
26771
|
+
return [{
|
|
26772
|
+
target: "parent",
|
|
26773
|
+
eventHandlers: {
|
|
26774
|
+
onMouseDown: createEventHandler(_selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseDown),
|
|
26775
|
+
onTouchStart: createEventHandler(_selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseDown),
|
|
26776
|
+
onMouseMove: createEventHandler(_selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseMove),
|
|
26777
|
+
onTouchMove: createEventHandler(_selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseMove),
|
|
26778
|
+
onMouseUp: createEventHandler(_selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseUp),
|
|
26779
|
+
onTouchEnd: createEventHandler(_selection_helpers__WEBPACK_IMPORTED_MODULE_3__.SelectionHelpers.onMouseUp)
|
|
26780
|
+
}
|
|
26781
|
+
}];
|
|
26782
|
+
};
|
|
26980
26783
|
|
|
26981
26784
|
/***/ }),
|
|
26982
26785
|
|
|
@@ -27557,10 +27360,7 @@ const VictoryStackBase = initialProps => {
|
|
|
27557
27360
|
const {
|
|
27558
27361
|
role
|
|
27559
27362
|
} = VictoryStack;
|
|
27560
|
-
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => ({
|
|
27561
|
-
...defaultProps,
|
|
27562
|
-
...initialProps
|
|
27563
|
-
}), [initialProps]);
|
|
27363
|
+
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps), [initialProps]);
|
|
27564
27364
|
const {
|
|
27565
27365
|
setAnimationState,
|
|
27566
27366
|
getAnimationProps,
|
|
@@ -27671,11 +27471,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27671
27471
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27672
27472
|
/* harmony export */ "Flyout": function() { return /* binding */ Flyout; }
|
|
27673
27473
|
/* harmony export */ });
|
|
27674
|
-
/* harmony import */ var
|
|
27675
|
-
/* harmony import */ var
|
|
27676
|
-
/* harmony import */ var
|
|
27677
|
-
/* harmony import */ var
|
|
27678
|
-
/* harmony import */ var
|
|
27474
|
+
/* 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");
|
|
27475
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
27476
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
27477
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
27478
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
27479
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
27480
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
27481
|
+
|
|
27679
27482
|
|
|
27680
27483
|
|
|
27681
27484
|
const getVerticalPath = props => {
|
|
@@ -27756,8 +27559,8 @@ const evaluateProps = props => {
|
|
|
27756
27559
|
* `id`
|
|
27757
27560
|
* `style`
|
|
27758
27561
|
*/
|
|
27759
|
-
const id =
|
|
27760
|
-
const style =
|
|
27562
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
27563
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(props.style, props);
|
|
27761
27564
|
return {
|
|
27762
27565
|
...props,
|
|
27763
27566
|
id,
|
|
@@ -27765,23 +27568,20 @@ const evaluateProps = props => {
|
|
|
27765
27568
|
};
|
|
27766
27569
|
};
|
|
27767
27570
|
const defaultProps = {
|
|
27768
|
-
pathComponent: /*#__PURE__*/
|
|
27571
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
27769
27572
|
role: "presentation",
|
|
27770
27573
|
shapeRendering: "auto"
|
|
27771
27574
|
};
|
|
27772
27575
|
const Flyout = initialProps => {
|
|
27773
|
-
const props = evaluateProps({
|
|
27774
|
-
|
|
27775
|
-
...initialProps
|
|
27776
|
-
});
|
|
27777
|
-
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
27576
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
27577
|
+
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.getSafeUserProps(props);
|
|
27778
27578
|
|
|
27779
27579
|
// check for required props for this subcomponent
|
|
27780
27580
|
// they should be passed in from the wrapper
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27581
|
+
victory_core__WEBPACK_IMPORTED_MODULE_4__.assert(props.height, "Flyout props[height] is undefined");
|
|
27582
|
+
victory_core__WEBPACK_IMPORTED_MODULE_4__.assert(props.width, "Flyout props[width] is undefined");
|
|
27583
|
+
victory_core__WEBPACK_IMPORTED_MODULE_4__.assert(props.x, "Flyout props[x] is undefined");
|
|
27584
|
+
victory_core__WEBPACK_IMPORTED_MODULE_4__.assert(props.y, "Flyout props[y] is undefined");
|
|
27785
27585
|
const flyoutPathProps = {
|
|
27786
27586
|
center: props.center || {
|
|
27787
27587
|
x: 0,
|
|
@@ -27798,7 +27598,7 @@ const Flyout = initialProps => {
|
|
|
27798
27598
|
x: props.x,
|
|
27799
27599
|
y: props.y
|
|
27800
27600
|
};
|
|
27801
|
-
return /*#__PURE__*/
|
|
27601
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
27802
27602
|
...props.events,
|
|
27803
27603
|
...userProps,
|
|
27804
27604
|
style: props.style,
|
|
@@ -28336,7 +28136,7 @@ class VictoryTooltip extends (react__WEBPACK_IMPORTED_MODULE_4___default().Compo
|
|
|
28336
28136
|
renderInPortal
|
|
28337
28137
|
} = props;
|
|
28338
28138
|
if (!active) {
|
|
28339
|
-
return
|
|
28139
|
+
return null;
|
|
28340
28140
|
}
|
|
28341
28141
|
const evaluatedProps = this.getEvaluatedProps(props);
|
|
28342
28142
|
const {
|
|
@@ -28728,9 +28528,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28728
28528
|
"use strict";
|
|
28729
28529
|
__webpack_require__.r(__webpack_exports__);
|
|
28730
28530
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28531
|
+
/* harmony export */ "VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ _victory_voronoi_container__WEBPACK_IMPORTED_MODULE_0__.VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS; },
|
|
28731
28532
|
/* harmony export */ "VictoryVoronoiContainer": function() { return /* reexport safe */ _victory_voronoi_container__WEBPACK_IMPORTED_MODULE_0__.VictoryVoronoiContainer; },
|
|
28732
28533
|
/* harmony export */ "VoronoiHelpers": function() { return /* reexport safe */ _voronoi_helpers__WEBPACK_IMPORTED_MODULE_1__.VoronoiHelpers; },
|
|
28733
|
-
/* harmony export */ "
|
|
28534
|
+
/* harmony export */ "useVictoryVoronoiContainer": function() { return /* reexport safe */ _victory_voronoi_container__WEBPACK_IMPORTED_MODULE_0__.useVictoryVoronoiContainer; }
|
|
28734
28535
|
/* harmony export */ });
|
|
28735
28536
|
/* harmony import */ var _victory_voronoi_container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-voronoi-container */ "../../victory-voronoi-container/es/victory-voronoi-container.js");
|
|
28736
28537
|
/* harmony import */ var _voronoi_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./voronoi-helpers */ "../../victory-voronoi-container/es/voronoi-helpers.js");
|
|
@@ -28748,8 +28549,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28748
28549
|
"use strict";
|
|
28749
28550
|
__webpack_require__.r(__webpack_exports__);
|
|
28750
28551
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28552
|
+
/* harmony export */ "VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS": function() { return /* binding */ VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS; },
|
|
28751
28553
|
/* harmony export */ "VictoryVoronoiContainer": function() { return /* binding */ VictoryVoronoiContainer; },
|
|
28752
|
-
/* harmony export */ "
|
|
28554
|
+
/* harmony export */ "useVictoryVoronoiContainer": function() { return /* binding */ useVictoryVoronoiContainer; }
|
|
28753
28555
|
/* harmony export */ });
|
|
28754
28556
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
28755
28557
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -28757,10 +28559,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28757
28559
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
28758
28560
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
28759
28561
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
28760
|
-
/* harmony import */ var
|
|
28761
|
-
/* harmony import */ var
|
|
28762
|
-
/* harmony import */ var
|
|
28763
|
-
/* harmony import */ var
|
|
28562
|
+
/* harmony import */ var victory_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-tooltip */ "../../victory-tooltip/es/victory-tooltip.js");
|
|
28563
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
28564
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
28565
|
+
/* harmony import */ var _voronoi_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./voronoi-helpers */ "../../victory-voronoi-container/es/voronoi-helpers.js");
|
|
28764
28566
|
|
|
28765
28567
|
|
|
28766
28568
|
/* eslint-disable react/no-multi-comp */
|
|
@@ -28768,204 +28570,214 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28768
28570
|
|
|
28769
28571
|
|
|
28770
28572
|
|
|
28771
|
-
|
|
28772
|
-
|
|
28773
|
-
|
|
28774
|
-
|
|
28775
|
-
|
|
28776
|
-
|
|
28777
|
-
|
|
28778
|
-
|
|
28779
|
-
|
|
28780
|
-
|
|
28781
|
-
|
|
28782
|
-
|
|
28783
|
-
|
|
28784
|
-
|
|
28785
|
-
|
|
28786
|
-
|
|
28787
|
-
|
|
28788
|
-
|
|
28789
|
-
|
|
28790
|
-
|
|
28791
|
-
|
|
28792
|
-
|
|
28793
|
-
|
|
28794
|
-
|
|
28795
|
-
|
|
28796
|
-
return props.disable ? {} : _voronoi_helpers__WEBPACK_IMPORTED_MODULE_5__.VoronoiHelpers.onMouseMove(evt, targetProps);
|
|
28797
|
-
}
|
|
28798
|
-
}
|
|
28799
|
-
}, {
|
|
28800
|
-
target: "data",
|
|
28801
|
-
eventHandlers: props.disable ? {} : {
|
|
28802
|
-
onMouseOver: () => null,
|
|
28803
|
-
onMouseOut: () => null,
|
|
28804
|
-
onMouseMove: () => null
|
|
28805
|
-
}
|
|
28806
|
-
}];
|
|
28807
|
-
}
|
|
28808
|
-
getDimension(props) {
|
|
28809
|
-
const {
|
|
28810
|
-
horizontal,
|
|
28811
|
-
voronoiDimension
|
|
28812
|
-
} = props;
|
|
28813
|
-
if (!horizontal || !voronoiDimension) {
|
|
28814
|
-
return voronoiDimension;
|
|
28815
|
-
}
|
|
28816
|
-
return voronoiDimension === "x" ? "y" : "x";
|
|
28817
|
-
}
|
|
28818
|
-
getPoint(point) {
|
|
28819
|
-
const whitelist = ["_x", "_x1", "_x0", "_y", "_y1", "_y0"];
|
|
28820
|
-
return lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(point, whitelist);
|
|
28573
|
+
const VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS = {
|
|
28574
|
+
activateData: true,
|
|
28575
|
+
activateLabels: true,
|
|
28576
|
+
labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_tooltip__WEBPACK_IMPORTED_MODULE_3__.VictoryTooltip, null),
|
|
28577
|
+
voronoiPadding: 5
|
|
28578
|
+
};
|
|
28579
|
+
const getPoint = point => {
|
|
28580
|
+
const whitelist = ["_x", "_x1", "_x0", "_y", "_y1", "_y0"];
|
|
28581
|
+
return lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(point, whitelist);
|
|
28582
|
+
};
|
|
28583
|
+
const useVictoryVoronoiContainer = initialProps => {
|
|
28584
|
+
const props = {
|
|
28585
|
+
...VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS,
|
|
28586
|
+
...initialProps
|
|
28587
|
+
};
|
|
28588
|
+
const {
|
|
28589
|
+
children
|
|
28590
|
+
} = props;
|
|
28591
|
+
const getDimension = () => {
|
|
28592
|
+
const {
|
|
28593
|
+
horizontal,
|
|
28594
|
+
voronoiDimension
|
|
28595
|
+
} = props;
|
|
28596
|
+
if (!horizontal || !voronoiDimension) {
|
|
28597
|
+
return voronoiDimension;
|
|
28821
28598
|
}
|
|
28822
|
-
|
|
28823
|
-
|
|
28824
|
-
|
|
28825
|
-
|
|
28826
|
-
|
|
28827
|
-
|
|
28828
|
-
|
|
28829
|
-
|
|
28830
|
-
|
|
28831
|
-
|
|
28832
|
-
|
|
28833
|
-
|
|
28834
|
-
center: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps.center, center)
|
|
28835
|
-
};
|
|
28836
|
-
}
|
|
28837
|
-
const x = voronoiDimension === "y" ? mousePosition.x : basePosition.x;
|
|
28838
|
-
const y = voronoiDimension === "x" ? mousePosition.y : basePosition.y;
|
|
28839
|
-
center = mouseFollowTooltips ? mousePosition : {
|
|
28840
|
-
x,
|
|
28841
|
-
y
|
|
28842
|
-
};
|
|
28599
|
+
return voronoiDimension === "x" ? "y" : "x";
|
|
28600
|
+
};
|
|
28601
|
+
const getLabelPosition = (labelProps, points) => {
|
|
28602
|
+
const {
|
|
28603
|
+
mousePosition,
|
|
28604
|
+
mouseFollowTooltips
|
|
28605
|
+
} = props;
|
|
28606
|
+
const voronoiDimension = getDimension();
|
|
28607
|
+
const point = getPoint(points[0]);
|
|
28608
|
+
const basePosition = victory_core__WEBPACK_IMPORTED_MODULE_4__.scalePoint(props, point);
|
|
28609
|
+
let center = mouseFollowTooltips ? mousePosition : undefined;
|
|
28610
|
+
if (!voronoiDimension || points.length < 2) {
|
|
28843
28611
|
return {
|
|
28844
|
-
|
|
28845
|
-
y,
|
|
28612
|
+
...basePosition,
|
|
28846
28613
|
center: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps.center, center)
|
|
28847
28614
|
};
|
|
28848
28615
|
}
|
|
28849
|
-
|
|
28850
|
-
|
|
28851
|
-
|
|
28852
|
-
|
|
28853
|
-
|
|
28854
|
-
|
|
28855
|
-
|
|
28856
|
-
|
|
28857
|
-
|
|
28858
|
-
|
|
28859
|
-
|
|
28860
|
-
|
|
28861
|
-
|
|
28862
|
-
|
|
28863
|
-
|
|
28864
|
-
|
|
28865
|
-
|
|
28866
|
-
|
|
28867
|
-
|
|
28868
|
-
|
|
28869
|
-
|
|
28870
|
-
|
|
28871
|
-
|
|
28872
|
-
getDefaultLabelProps(props, points) {
|
|
28873
|
-
const {
|
|
28874
|
-
voronoiDimension,
|
|
28875
|
-
horizontal,
|
|
28876
|
-
mouseFollowTooltips
|
|
28877
|
-
} = props;
|
|
28878
|
-
const point = this.getPoint(points[0]);
|
|
28879
|
-
const multiPoint = voronoiDimension && points.length > 1;
|
|
28880
|
-
const y = point._y1 !== undefined ? point._y1 : point._y;
|
|
28881
|
-
const defaultHorizontalOrientation = y < 0 ? "left" : "right";
|
|
28882
|
-
const defaultOrientation = y < 0 ? "bottom" : "top";
|
|
28883
|
-
const labelOrientation = horizontal ? defaultHorizontalOrientation : defaultOrientation;
|
|
28884
|
-
const orientation = mouseFollowTooltips ? undefined : labelOrientation;
|
|
28885
|
-
return {
|
|
28886
|
-
orientation,
|
|
28887
|
-
pointerLength: multiPoint ? 0 : undefined,
|
|
28888
|
-
constrainToVisibleArea: multiPoint || mouseFollowTooltips ? true : undefined
|
|
28889
|
-
};
|
|
28890
|
-
}
|
|
28891
|
-
getLabelProps(props, points) {
|
|
28892
|
-
const {
|
|
28893
|
-
labels,
|
|
28894
|
-
scale,
|
|
28895
|
-
labelComponent,
|
|
28896
|
-
theme,
|
|
28897
|
-
width,
|
|
28898
|
-
height
|
|
28899
|
-
} = props;
|
|
28900
|
-
const componentProps = labelComponent.props || {};
|
|
28901
|
-
const text = points.reduce((memo, datum) => {
|
|
28902
|
-
const labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, componentProps, {
|
|
28903
|
-
datum,
|
|
28904
|
-
active: true
|
|
28905
|
-
});
|
|
28906
|
-
const t = victory_core__WEBPACK_IMPORTED_MODULE_6__.isFunction(labels) ? labels(labelProps) : null;
|
|
28907
|
-
if (t === null || t === undefined) {
|
|
28908
|
-
return memo;
|
|
28909
|
-
}
|
|
28910
|
-
return memo.concat(`${t}`.split("\n"));
|
|
28911
|
-
}, []);
|
|
28912
|
-
|
|
28913
|
-
// remove properties from first point to make datum
|
|
28914
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28915
|
-
const {
|
|
28916
|
-
childName,
|
|
28917
|
-
eventKey,
|
|
28918
|
-
style,
|
|
28919
|
-
continuous,
|
|
28920
|
-
...datum
|
|
28921
|
-
} = points[0];
|
|
28922
|
-
const name = props.name === childName ? childName : `${props.name}-${childName}`;
|
|
28923
|
-
const labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
28924
|
-
key: `${name}-${eventKey}-voronoi-tooltip`,
|
|
28925
|
-
id: `${name}-${eventKey}-voronoi-tooltip`,
|
|
28926
|
-
active: true,
|
|
28927
|
-
renderInPortal: false,
|
|
28928
|
-
activePoints: points,
|
|
28616
|
+
const x = voronoiDimension === "y" ? mousePosition.x : basePosition.x;
|
|
28617
|
+
const y = voronoiDimension === "x" ? mousePosition.y : basePosition.y;
|
|
28618
|
+
center = mouseFollowTooltips ? mousePosition : {
|
|
28619
|
+
x,
|
|
28620
|
+
y
|
|
28621
|
+
};
|
|
28622
|
+
return {
|
|
28623
|
+
x,
|
|
28624
|
+
y,
|
|
28625
|
+
center: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelProps.center, center)
|
|
28626
|
+
};
|
|
28627
|
+
};
|
|
28628
|
+
const getStyle = (points, type) => {
|
|
28629
|
+
const {
|
|
28630
|
+
labels,
|
|
28631
|
+
labelComponent,
|
|
28632
|
+
theme
|
|
28633
|
+
} = props;
|
|
28634
|
+
const componentProps = labelComponent.props || {};
|
|
28635
|
+
const themeStyles = theme && theme.voronoi && theme.voronoi.style ? theme.voronoi.style : {};
|
|
28636
|
+
const componentStyleArray = type === "flyout" ? componentProps.flyoutStyle : componentProps.style;
|
|
28637
|
+
return points.reduce((memo, datum, index) => {
|
|
28638
|
+
const labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, componentProps, {
|
|
28929
28639
|
datum,
|
|
28930
|
-
|
|
28931
|
-
|
|
28932
|
-
|
|
28933
|
-
|
|
28934
|
-
|
|
28935
|
-
|
|
28936
|
-
|
|
28937
|
-
|
|
28938
|
-
|
|
28939
|
-
|
|
28940
|
-
|
|
28941
|
-
|
|
28942
|
-
|
|
28943
|
-
|
|
28944
|
-
|
|
28945
|
-
|
|
28946
|
-
|
|
28947
|
-
|
|
28948
|
-
|
|
28949
|
-
|
|
28950
|
-
|
|
28951
|
-
|
|
28952
|
-
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
28956
|
-
|
|
28957
|
-
|
|
28640
|
+
active: true
|
|
28641
|
+
});
|
|
28642
|
+
const text = victory_core__WEBPACK_IMPORTED_MODULE_4__.isFunction(labels) ? labels(labelProps) : undefined;
|
|
28643
|
+
const textArray = text !== undefined ? `${text}`.split("\n") : [];
|
|
28644
|
+
const baseStyle = datum.style && datum.style[type] || {};
|
|
28645
|
+
const componentStyle = Array.isArray(componentStyleArray) ? componentStyleArray[index] : componentStyleArray;
|
|
28646
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, componentStyle, baseStyle, themeStyles[type]), labelProps);
|
|
28647
|
+
const styleArray = textArray.length ? textArray.map(() => style) : [style];
|
|
28648
|
+
return memo.concat(styleArray);
|
|
28649
|
+
}, []);
|
|
28650
|
+
};
|
|
28651
|
+
const getDefaultLabelProps = points => {
|
|
28652
|
+
const {
|
|
28653
|
+
voronoiDimension,
|
|
28654
|
+
horizontal,
|
|
28655
|
+
mouseFollowTooltips
|
|
28656
|
+
} = props;
|
|
28657
|
+
const point = getPoint(points[0]);
|
|
28658
|
+
const multiPoint = voronoiDimension && points.length > 1;
|
|
28659
|
+
const y = point._y1 !== undefined ? point._y1 : point._y;
|
|
28660
|
+
const defaultHorizontalOrientation = y < 0 ? "left" : "right";
|
|
28661
|
+
const defaultOrientation = y < 0 ? "bottom" : "top";
|
|
28662
|
+
const labelOrientation = horizontal ? defaultHorizontalOrientation : defaultOrientation;
|
|
28663
|
+
const orientation = mouseFollowTooltips ? undefined : labelOrientation;
|
|
28664
|
+
return {
|
|
28665
|
+
orientation,
|
|
28666
|
+
pointerLength: multiPoint ? 0 : undefined,
|
|
28667
|
+
constrainToVisibleArea: multiPoint || mouseFollowTooltips ? true : undefined
|
|
28668
|
+
};
|
|
28669
|
+
};
|
|
28670
|
+
const getLabelProps = points => {
|
|
28671
|
+
const {
|
|
28672
|
+
labels,
|
|
28673
|
+
scale,
|
|
28674
|
+
labelComponent,
|
|
28675
|
+
theme,
|
|
28676
|
+
width,
|
|
28677
|
+
height
|
|
28678
|
+
} = props;
|
|
28679
|
+
const componentProps = labelComponent.props || {};
|
|
28680
|
+
const text = points.reduce((memo, datum) => {
|
|
28681
|
+
const labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, componentProps, {
|
|
28682
|
+
datum,
|
|
28683
|
+
active: true
|
|
28684
|
+
});
|
|
28685
|
+
const t = victory_core__WEBPACK_IMPORTED_MODULE_4__.isFunction(labels) ? labels(labelProps) : null;
|
|
28686
|
+
if (t === null || t === undefined) {
|
|
28687
|
+
return memo;
|
|
28958
28688
|
}
|
|
28689
|
+
return memo.concat(`${t}`.split("\n"));
|
|
28690
|
+
}, []);
|
|
28691
|
+
|
|
28692
|
+
// remove properties from first point to make datum
|
|
28693
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28694
|
+
const {
|
|
28695
|
+
childName,
|
|
28696
|
+
eventKey,
|
|
28697
|
+
style,
|
|
28698
|
+
continuous,
|
|
28699
|
+
...datum
|
|
28700
|
+
} = points[0];
|
|
28701
|
+
const name = props.name === childName ? childName : `${props.name}-${childName}`;
|
|
28702
|
+
const labelProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
28703
|
+
key: `${name}-${eventKey}-voronoi-tooltip`,
|
|
28704
|
+
id: `${name}-${eventKey}-voronoi-tooltip`,
|
|
28705
|
+
active: true,
|
|
28706
|
+
renderInPortal: false,
|
|
28707
|
+
activePoints: points,
|
|
28708
|
+
datum,
|
|
28709
|
+
scale,
|
|
28710
|
+
theme
|
|
28711
|
+
}, componentProps, {
|
|
28712
|
+
text,
|
|
28713
|
+
width,
|
|
28714
|
+
height,
|
|
28715
|
+
style: getStyle(points, "labels"),
|
|
28716
|
+
flyoutStyle: getStyle(points, "flyout")[0]
|
|
28717
|
+
}, getDefaultLabelProps(points));
|
|
28718
|
+
const labelPosition = getLabelPosition(labelProps, points);
|
|
28719
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labelPosition, labelProps);
|
|
28720
|
+
};
|
|
28721
|
+
const getTooltip = () => {
|
|
28722
|
+
const {
|
|
28723
|
+
labels,
|
|
28724
|
+
activePoints,
|
|
28725
|
+
labelComponent
|
|
28726
|
+
} = props;
|
|
28727
|
+
if (!labels) {
|
|
28959
28728
|
return null;
|
|
28960
28729
|
}
|
|
28961
|
-
|
|
28962
|
-
|
|
28963
|
-
|
|
28964
|
-
|
|
28730
|
+
if (Array.isArray(activePoints) && activePoints.length) {
|
|
28731
|
+
const labelProps = getLabelProps(activePoints);
|
|
28732
|
+
const {
|
|
28733
|
+
text
|
|
28734
|
+
} = labelProps;
|
|
28735
|
+
const showLabel = Array.isArray(text) ? text.filter(Boolean).length : text;
|
|
28736
|
+
return showLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(labelComponent, labelProps) : null;
|
|
28965
28737
|
}
|
|
28738
|
+
return null;
|
|
28966
28739
|
};
|
|
28967
|
-
|
|
28968
|
-
|
|
28740
|
+
return {
|
|
28741
|
+
props,
|
|
28742
|
+
children: [...react__WEBPACK_IMPORTED_MODULE_2___default().Children.toArray(children), getTooltip()]
|
|
28743
|
+
};
|
|
28744
|
+
};
|
|
28745
|
+
const VictoryVoronoiContainer = initialProps => {
|
|
28746
|
+
const {
|
|
28747
|
+
props,
|
|
28748
|
+
children
|
|
28749
|
+
} = useVictoryVoronoiContainer(initialProps);
|
|
28750
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryContainer, props, children);
|
|
28751
|
+
};
|
|
28752
|
+
VictoryVoronoiContainer.role = "container";
|
|
28753
|
+
VictoryVoronoiContainer.defaultEvents = initialProps => {
|
|
28754
|
+
const props = {
|
|
28755
|
+
...VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS,
|
|
28756
|
+
...initialProps
|
|
28757
|
+
};
|
|
28758
|
+
const createEventHandler = (handler, disabled) =>
|
|
28759
|
+
// eslint-disable-next-line max-params
|
|
28760
|
+
(event, targetProps, eventKey, context) => disabled || props.disable ? {} : handler(event, {
|
|
28761
|
+
...props,
|
|
28762
|
+
...targetProps
|
|
28763
|
+
}, eventKey, context);
|
|
28764
|
+
return [{
|
|
28765
|
+
target: "parent",
|
|
28766
|
+
eventHandlers: {
|
|
28767
|
+
onMouseLeave: createEventHandler(_voronoi_helpers__WEBPACK_IMPORTED_MODULE_6__.VoronoiHelpers.onMouseLeave),
|
|
28768
|
+
onTouchCancel: createEventHandler(_voronoi_helpers__WEBPACK_IMPORTED_MODULE_6__.VoronoiHelpers.onMouseLeave),
|
|
28769
|
+
onMouseMove: createEventHandler(_voronoi_helpers__WEBPACK_IMPORTED_MODULE_6__.VoronoiHelpers.onMouseMove),
|
|
28770
|
+
onTouchMove: createEventHandler(_voronoi_helpers__WEBPACK_IMPORTED_MODULE_6__.VoronoiHelpers.onMouseMove)
|
|
28771
|
+
}
|
|
28772
|
+
}, {
|
|
28773
|
+
target: "data",
|
|
28774
|
+
eventHandlers: props.disable ? {} : {
|
|
28775
|
+
onMouseOver: () => null,
|
|
28776
|
+
onMouseOut: () => null,
|
|
28777
|
+
onMouseMove: () => null
|
|
28778
|
+
}
|
|
28779
|
+
}];
|
|
28780
|
+
};
|
|
28969
28781
|
|
|
28970
28782
|
/***/ }),
|
|
28971
28783
|
|
|
@@ -29493,13 +29305,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29493
29305
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29494
29306
|
/* harmony export */ "Voronoi": function() { return /* binding */ Voronoi; }
|
|
29495
29307
|
/* harmony export */ });
|
|
29496
|
-
/* harmony import */ var
|
|
29497
|
-
/* harmony import */ var
|
|
29498
|
-
/* harmony import */ var
|
|
29499
|
-
/* harmony import */ var
|
|
29500
|
-
/* harmony import */ var
|
|
29501
|
-
/* harmony import */ var
|
|
29502
|
-
/* harmony import */ var
|
|
29308
|
+
/* 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");
|
|
29309
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
29310
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
29311
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
29312
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
29313
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
29314
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/circle.js");
|
|
29315
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/clip-path.js");
|
|
29316
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
29317
|
+
|
|
29503
29318
|
|
|
29504
29319
|
|
|
29505
29320
|
const getVoronoiPath = props => {
|
|
@@ -29517,11 +29332,11 @@ function evaluateProps(props) {
|
|
|
29517
29332
|
* `style`
|
|
29518
29333
|
* `tabIndex
|
|
29519
29334
|
*/
|
|
29520
|
-
const ariaLabel =
|
|
29521
|
-
const id =
|
|
29522
|
-
const size =
|
|
29523
|
-
const style =
|
|
29524
|
-
const tabIndex =
|
|
29335
|
+
const ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.ariaLabel, props);
|
|
29336
|
+
const id = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.id, props);
|
|
29337
|
+
const size = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.size, props);
|
|
29338
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateStyle(props.style, props);
|
|
29339
|
+
const tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_2__.evaluateProp(props.tabIndex, props);
|
|
29525
29340
|
return Object.assign({}, props, {
|
|
29526
29341
|
ariaLabel,
|
|
29527
29342
|
id,
|
|
@@ -29531,18 +29346,15 @@ function evaluateProps(props) {
|
|
|
29531
29346
|
});
|
|
29532
29347
|
}
|
|
29533
29348
|
const defaultProps = {
|
|
29534
|
-
pathComponent: /*#__PURE__*/
|
|
29535
|
-
circleComponent: /*#__PURE__*/
|
|
29536
|
-
clipPathComponent: /*#__PURE__*/
|
|
29537
|
-
groupComponent: /*#__PURE__*/
|
|
29349
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
29350
|
+
circleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Circle, null),
|
|
29351
|
+
clipPathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.ClipPath, null),
|
|
29352
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
|
|
29538
29353
|
role: "presentation",
|
|
29539
29354
|
shapeRendering: "auto"
|
|
29540
29355
|
};
|
|
29541
29356
|
const Voronoi = initialProps => {
|
|
29542
|
-
const props = evaluateProps({
|
|
29543
|
-
...defaultProps,
|
|
29544
|
-
...initialProps
|
|
29545
|
-
});
|
|
29357
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps));
|
|
29546
29358
|
const {
|
|
29547
29359
|
ariaLabel,
|
|
29548
29360
|
role,
|
|
@@ -29565,9 +29377,9 @@ const Voronoi = initialProps => {
|
|
|
29565
29377
|
transform,
|
|
29566
29378
|
...events
|
|
29567
29379
|
};
|
|
29568
|
-
const userProps =
|
|
29380
|
+
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_6__.getSafeUserProps(props);
|
|
29569
29381
|
if (size) {
|
|
29570
|
-
const circle = /*#__PURE__*/
|
|
29382
|
+
const circle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.circleComponent, {
|
|
29571
29383
|
...sharedProps,
|
|
29572
29384
|
key: `${props.id}-circle-clip`,
|
|
29573
29385
|
clipPath: `url(#${props.clipId})`,
|
|
@@ -29575,16 +29387,16 @@ const Voronoi = initialProps => {
|
|
|
29575
29387
|
cy: props.y,
|
|
29576
29388
|
r: size
|
|
29577
29389
|
});
|
|
29578
|
-
const voronoiClipPath = /*#__PURE__*/
|
|
29390
|
+
const voronoiClipPath = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.clipPathComponent, {
|
|
29579
29391
|
key: `${props.id}-voronoi-clip`,
|
|
29580
29392
|
clipId: props.clipId
|
|
29581
|
-
}, /*#__PURE__*/
|
|
29393
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
29582
29394
|
d: voronoiPath,
|
|
29583
29395
|
className
|
|
29584
29396
|
}));
|
|
29585
|
-
return /*#__PURE__*/
|
|
29397
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.groupComponent, {}, [voronoiClipPath, circle]);
|
|
29586
29398
|
}
|
|
29587
|
-
return /*#__PURE__*/
|
|
29399
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, {
|
|
29588
29400
|
...sharedProps,
|
|
29589
29401
|
...userProps,
|
|
29590
29402
|
d: voronoiPath
|
|
@@ -29603,9 +29415,10 @@ const Voronoi = initialProps => {
|
|
|
29603
29415
|
__webpack_require__.r(__webpack_exports__);
|
|
29604
29416
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29605
29417
|
/* harmony export */ "RawZoomHelpers": function() { return /* reexport safe */ _zoom_helpers__WEBPACK_IMPORTED_MODULE_1__.RawZoomHelpers; },
|
|
29418
|
+
/* harmony export */ "VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ _victory_zoom_container__WEBPACK_IMPORTED_MODULE_0__.VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS; },
|
|
29606
29419
|
/* harmony export */ "VictoryZoomContainer": function() { return /* reexport safe */ _victory_zoom_container__WEBPACK_IMPORTED_MODULE_0__.VictoryZoomContainer; },
|
|
29607
29420
|
/* harmony export */ "ZoomHelpers": function() { return /* reexport safe */ _zoom_helpers__WEBPACK_IMPORTED_MODULE_1__.ZoomHelpers; },
|
|
29608
|
-
/* harmony export */ "
|
|
29421
|
+
/* harmony export */ "useVictoryZoomContainer": function() { return /* reexport safe */ _victory_zoom_container__WEBPACK_IMPORTED_MODULE_0__.useVictoryZoomContainer; }
|
|
29609
29422
|
/* harmony export */ });
|
|
29610
29423
|
/* harmony import */ var _victory_zoom_container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-zoom-container */ "../../victory-zoom-container/es/victory-zoom-container.js");
|
|
29611
29424
|
/* harmony import */ var _zoom_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./zoom-helpers */ "../../victory-zoom-container/es/zoom-helpers.js");
|
|
@@ -29623,85 +29436,120 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29623
29436
|
"use strict";
|
|
29624
29437
|
__webpack_require__.r(__webpack_exports__);
|
|
29625
29438
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29439
|
+
/* harmony export */ "VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS": function() { return /* binding */ VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS; },
|
|
29626
29440
|
/* harmony export */ "VictoryZoomContainer": function() { return /* binding */ VictoryZoomContainer; },
|
|
29627
|
-
/* harmony export */ "
|
|
29441
|
+
/* harmony export */ "useVictoryZoomContainer": function() { return /* binding */ useVictoryZoomContainer; }
|
|
29628
29442
|
/* harmony export */ });
|
|
29629
29443
|
/* 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");
|
|
29630
29444
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
29631
29445
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
29632
29446
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
29633
29447
|
/* harmony import */ var _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./zoom-helpers */ "../../victory-zoom-container/es/zoom-helpers.js");
|
|
29634
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
29635
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
29636
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
29637
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
29448
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-clip-container/victory-clip-container.js");
|
|
29449
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
29450
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
29638
29451
|
|
|
29639
29452
|
|
|
29640
29453
|
|
|
29641
29454
|
|
|
29642
29455
|
const DEFAULT_DOWNSAMPLE = 150;
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29456
|
+
const VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS = {
|
|
29457
|
+
clipContainerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_2__.VictoryClipContainer, null),
|
|
29458
|
+
allowPan: true,
|
|
29459
|
+
allowZoom: true,
|
|
29460
|
+
zoomActive: false
|
|
29461
|
+
};
|
|
29462
|
+
const useVictoryZoomContainer = initialProps => {
|
|
29463
|
+
const props = {
|
|
29464
|
+
...VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS,
|
|
29465
|
+
...initialProps
|
|
29466
|
+
};
|
|
29467
|
+
const {
|
|
29468
|
+
children,
|
|
29469
|
+
currentDomain,
|
|
29470
|
+
zoomActive,
|
|
29471
|
+
allowZoom,
|
|
29472
|
+
downsample,
|
|
29473
|
+
scale,
|
|
29474
|
+
clipContainerComponent,
|
|
29475
|
+
polar,
|
|
29476
|
+
origin,
|
|
29477
|
+
horizontal
|
|
29478
|
+
} = props;
|
|
29479
|
+
const downsampleZoomData = (child, domain) => {
|
|
29480
|
+
const getData = childProps => {
|
|
29481
|
+
const {
|
|
29482
|
+
data,
|
|
29483
|
+
x,
|
|
29484
|
+
y
|
|
29485
|
+
} = childProps;
|
|
29486
|
+
const defaultGetData = child.type && typeof child.type.getData === "function" ? child.type.getData : () => undefined;
|
|
29487
|
+
// skip costly data formatting if x and y accessors are not present
|
|
29488
|
+
return Array.isArray(data) && !x && !y ? data : defaultGetData(childProps);
|
|
29653
29489
|
};
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
return props.disable ? {} : _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseDown(evt, targetProps);
|
|
29660
|
-
},
|
|
29661
|
-
onTouchStart: (evt, targetProps) => {
|
|
29662
|
-
return props.disable ? {} : _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseDown(evt, targetProps);
|
|
29663
|
-
},
|
|
29664
|
-
onMouseUp: (evt, targetProps) => {
|
|
29665
|
-
return props.disable ? {} : _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseUp(evt, targetProps);
|
|
29666
|
-
},
|
|
29667
|
-
onTouchEnd: (evt, targetProps) => {
|
|
29668
|
-
return props.disable ? {} : _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseUp(evt, targetProps);
|
|
29669
|
-
},
|
|
29670
|
-
onMouseLeave: (evt, targetProps) => {
|
|
29671
|
-
return props.disable ? {} : _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseLeave(evt, targetProps);
|
|
29672
|
-
},
|
|
29673
|
-
onTouchCancel: (evt, targetProps) => {
|
|
29674
|
-
return props.disable ? {} : _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseLeave(evt, targetProps);
|
|
29675
|
-
},
|
|
29676
|
-
// eslint-disable-next-line max-params
|
|
29677
|
-
onMouseMove: (evt, targetProps, eventKey, ctx) => {
|
|
29678
|
-
if (props.disable) {
|
|
29679
|
-
return {};
|
|
29680
|
-
}
|
|
29681
|
-
return _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseMove(evt, targetProps, eventKey, ctx);
|
|
29682
|
-
},
|
|
29683
|
-
// eslint-disable-next-line max-params
|
|
29684
|
-
onTouchMove: (evt, targetProps, eventKey, ctx) => {
|
|
29685
|
-
if (props.disable) {
|
|
29686
|
-
return {};
|
|
29687
|
-
}
|
|
29688
|
-
evt.preventDefault();
|
|
29689
|
-
return _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseMove(evt, targetProps, eventKey, ctx);
|
|
29690
|
-
},
|
|
29691
|
-
...(props.disable || !props.allowZoom ? {} : {
|
|
29692
|
-
onWheel: _zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onWheel
|
|
29693
|
-
})
|
|
29694
|
-
}
|
|
29695
|
-
}];
|
|
29490
|
+
const data = getData(child.props);
|
|
29491
|
+
|
|
29492
|
+
// return undefined if downsample is not run, then default() will replace with child.props.data
|
|
29493
|
+
if (!downsample || !domain || !data) {
|
|
29494
|
+
return undefined;
|
|
29696
29495
|
}
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29496
|
+
const maxPoints = downsample === true ? DEFAULT_DOWNSAMPLE : downsample;
|
|
29497
|
+
const dimension = props.zoomDimension || "x";
|
|
29498
|
+
|
|
29499
|
+
// important: assumes data is ordered by dimension
|
|
29500
|
+
// get the start and end of the data that is in the current visible domain
|
|
29501
|
+
let startIndex = data.findIndex(d => d[dimension] >= domain[dimension][0]);
|
|
29502
|
+
let endIndex = data.findIndex(d => d[dimension] > domain[dimension][1]);
|
|
29503
|
+
// pick one more point (if available) at each end so that VictoryLine, VictoryArea connect
|
|
29504
|
+
if (startIndex !== 0) {
|
|
29505
|
+
startIndex -= 1;
|
|
29506
|
+
}
|
|
29507
|
+
if (endIndex !== -1) {
|
|
29508
|
+
endIndex += 1;
|
|
29509
|
+
}
|
|
29510
|
+
const visibleData = data.slice(startIndex, endIndex);
|
|
29511
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_3__.downsample(visibleData, maxPoints, startIndex);
|
|
29512
|
+
};
|
|
29513
|
+
const modifiedChildren = react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(children).map(child => {
|
|
29514
|
+
const role = child.type && child.type.role;
|
|
29515
|
+
const isDataComponent = victory_core__WEBPACK_IMPORTED_MODULE_3__.isDataComponent(child);
|
|
29516
|
+
const originalDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.originalDomain, props.domain);
|
|
29517
|
+
const zoomDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.zoomDomain, props.domain);
|
|
29518
|
+
const cachedZoomDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.cachedZoomDomain, props.domain);
|
|
29519
|
+
let domain;
|
|
29520
|
+
if (!_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.checkDomainEquality(zoomDomain, cachedZoomDomain)) {
|
|
29521
|
+
// if zoomDomain has been changed, use it
|
|
29522
|
+
domain = zoomDomain;
|
|
29523
|
+
} else if (allowZoom && !zoomActive) {
|
|
29524
|
+
// if user has zoomed all the way out, use the child domain
|
|
29525
|
+
domain = child.props.domain;
|
|
29526
|
+
} else {
|
|
29527
|
+
// default: use currentDomain, set by the event handlers
|
|
29528
|
+
domain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, currentDomain, originalDomain);
|
|
29529
|
+
}
|
|
29530
|
+
let newDomain = props.polar ? {
|
|
29531
|
+
x: originalDomain.x,
|
|
29532
|
+
y: [0, domain.y[1]]
|
|
29533
|
+
} : domain;
|
|
29534
|
+
if (newDomain && props.zoomDimension) {
|
|
29535
|
+
// if zooming is restricted to a dimension, don't squash changes to zoomDomain in other dim
|
|
29536
|
+
newDomain = {
|
|
29537
|
+
...zoomDomain,
|
|
29538
|
+
[props.zoomDimension]: newDomain[props.zoomDimension]
|
|
29539
|
+
};
|
|
29540
|
+
}
|
|
29541
|
+
|
|
29542
|
+
// don't downsample stacked data
|
|
29543
|
+
const childProps = isDataComponent && role !== "stack" ? {
|
|
29544
|
+
domain: newDomain,
|
|
29545
|
+
data: downsampleZoomData(child, newDomain)
|
|
29546
|
+
} : {
|
|
29547
|
+
domain: newDomain
|
|
29548
|
+
};
|
|
29549
|
+
const newChild = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(childProps, child.props));
|
|
29550
|
+
|
|
29551
|
+
// Clip data components
|
|
29552
|
+
if (victory_core__WEBPACK_IMPORTED_MODULE_3__.isDataComponent(newChild)) {
|
|
29705
29553
|
const rangeX = horizontal ? scale.y.range() : scale.x.range();
|
|
29706
29554
|
const rangeY = horizontal ? scale.x.range() : scale.y.range();
|
|
29707
29555
|
const plottableWidth = Math.abs(rangeX[0] - rangeX[1]);
|
|
@@ -29717,110 +29565,51 @@ function zoomContainerMixin(Base) {
|
|
|
29717
29565
|
radius: polar ? radius : undefined,
|
|
29718
29566
|
...clipContainerComponent.props
|
|
29719
29567
|
});
|
|
29720
|
-
return react__WEBPACK_IMPORTED_MODULE_1___default().
|
|
29721
|
-
|
|
29722
|
-
return child;
|
|
29723
|
-
}
|
|
29724
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(child, {
|
|
29725
|
-
groupComponent
|
|
29726
|
-
});
|
|
29727
|
-
});
|
|
29728
|
-
}
|
|
29729
|
-
modifyPolarDomain(domain, originalDomain) {
|
|
29730
|
-
// Only zoom the radius of polar charts. Zooming angles is very confusing
|
|
29731
|
-
return {
|
|
29732
|
-
x: originalDomain.x,
|
|
29733
|
-
y: [0, domain.y[1]]
|
|
29734
|
-
};
|
|
29735
|
-
}
|
|
29736
|
-
downsampleZoomData(props, child, domain) {
|
|
29737
|
-
const {
|
|
29738
|
-
downsample
|
|
29739
|
-
} = props;
|
|
29740
|
-
const getData = childProps => {
|
|
29741
|
-
const {
|
|
29742
|
-
data,
|
|
29743
|
-
x,
|
|
29744
|
-
y
|
|
29745
|
-
} = childProps;
|
|
29746
|
-
const defaultGetData = child.type && victory_core__WEBPACK_IMPORTED_MODULE_6__.isFunction(child.type.getData) ? child.type.getData : () => undefined;
|
|
29747
|
-
// skip costly data formatting if x and y accessors are not present
|
|
29748
|
-
return Array.isArray(data) && !x && !y ? data : defaultGetData(childProps);
|
|
29749
|
-
};
|
|
29750
|
-
const data = getData(child.props);
|
|
29751
|
-
|
|
29752
|
-
// return undefined if downsample is not run, then default() will replace with child.props.data
|
|
29753
|
-
if (!downsample || !domain || !data) {
|
|
29754
|
-
return undefined;
|
|
29755
|
-
}
|
|
29756
|
-
const maxPoints = downsample === true ? DEFAULT_DOWNSAMPLE : downsample;
|
|
29757
|
-
const dimension = props.zoomDimension || "x";
|
|
29758
|
-
|
|
29759
|
-
// important: assumes data is ordered by dimension
|
|
29760
|
-
// get the start and end of the data that is in the current visible domain
|
|
29761
|
-
let startIndex = data.findIndex(d => d[dimension] >= domain[dimension][0]);
|
|
29762
|
-
let endIndex = data.findIndex(d => d[dimension] > domain[dimension][1]);
|
|
29763
|
-
// pick one more point (if available) at each end so that VictoryLine, VictoryArea connect
|
|
29764
|
-
if (startIndex !== 0) {
|
|
29765
|
-
startIndex -= 1;
|
|
29766
|
-
}
|
|
29767
|
-
if (endIndex !== -1) {
|
|
29768
|
-
endIndex += 1;
|
|
29769
|
-
}
|
|
29770
|
-
const visibleData = data.slice(startIndex, endIndex);
|
|
29771
|
-
return victory_core__WEBPACK_IMPORTED_MODULE_5__.downsample(visibleData, maxPoints, startIndex);
|
|
29772
|
-
}
|
|
29773
|
-
modifyChildren(props) {
|
|
29774
|
-
const childComponents = react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(props.children);
|
|
29775
|
-
return childComponents.map(child => {
|
|
29776
|
-
const role = child.type && child.type.role;
|
|
29777
|
-
const isDataComponent = victory_core__WEBPACK_IMPORTED_MODULE_5__.isDataComponent(child);
|
|
29778
|
-
const {
|
|
29779
|
-
currentDomain,
|
|
29780
|
-
zoomActive,
|
|
29781
|
-
allowZoom
|
|
29782
|
-
} = props;
|
|
29783
|
-
const originalDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.originalDomain, props.domain);
|
|
29784
|
-
const zoomDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.zoomDomain, props.domain);
|
|
29785
|
-
const cachedZoomDomain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, props.cachedZoomDomain, props.domain);
|
|
29786
|
-
let domain;
|
|
29787
|
-
if (!_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.checkDomainEquality(zoomDomain, cachedZoomDomain)) {
|
|
29788
|
-
// if zoomDomain has been changed, use it
|
|
29789
|
-
domain = zoomDomain;
|
|
29790
|
-
} else if (allowZoom && !zoomActive) {
|
|
29791
|
-
// if user has zoomed all the way out, use the child domain
|
|
29792
|
-
domain = child.props.domain;
|
|
29793
|
-
} else {
|
|
29794
|
-
// default: use currentDomain, set by the event handlers
|
|
29795
|
-
domain = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, currentDomain, originalDomain);
|
|
29796
|
-
}
|
|
29797
|
-
let newDomain = props.polar ? this.modifyPolarDomain(domain, originalDomain) : domain;
|
|
29798
|
-
if (newDomain && props.zoomDimension) {
|
|
29799
|
-
// if zooming is restricted to a dimension, don't squash changes to zoomDomain in other dim
|
|
29800
|
-
newDomain = {
|
|
29801
|
-
...zoomDomain,
|
|
29802
|
-
[props.zoomDimension]: newDomain[props.zoomDimension]
|
|
29803
|
-
};
|
|
29804
|
-
}
|
|
29805
|
-
// don't downsample stacked data
|
|
29806
|
-
const newProps = isDataComponent && role !== "stack" ? {
|
|
29807
|
-
domain: newDomain,
|
|
29808
|
-
data: this.downsampleZoomData(props, child, newDomain)
|
|
29809
|
-
} : {
|
|
29810
|
-
domain: newDomain
|
|
29811
|
-
};
|
|
29812
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(newProps, child.props));
|
|
29568
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(newChild, {
|
|
29569
|
+
groupComponent
|
|
29813
29570
|
});
|
|
29814
29571
|
}
|
|
29815
|
-
|
|
29816
|
-
|
|
29817
|
-
|
|
29818
|
-
|
|
29819
|
-
|
|
29820
|
-
}
|
|
29572
|
+
return newChild;
|
|
29573
|
+
});
|
|
29574
|
+
return {
|
|
29575
|
+
props,
|
|
29576
|
+
children: modifiedChildren
|
|
29821
29577
|
};
|
|
29822
|
-
}
|
|
29823
|
-
const VictoryZoomContainer =
|
|
29578
|
+
};
|
|
29579
|
+
const VictoryZoomContainer = initialProps => {
|
|
29580
|
+
const {
|
|
29581
|
+
props,
|
|
29582
|
+
children
|
|
29583
|
+
} = useVictoryZoomContainer(initialProps);
|
|
29584
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryContainer, props, children);
|
|
29585
|
+
};
|
|
29586
|
+
VictoryZoomContainer.role = "container";
|
|
29587
|
+
VictoryZoomContainer.defaultEvents = initialProps => {
|
|
29588
|
+
const props = {
|
|
29589
|
+
...VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS,
|
|
29590
|
+
...initialProps
|
|
29591
|
+
};
|
|
29592
|
+
const createEventHandler = (handler, disabled) =>
|
|
29593
|
+
// eslint-disable-next-line max-params
|
|
29594
|
+
(event, targetProps, eventKey, context) => disabled || props.disable ? {} : handler(event, {
|
|
29595
|
+
...props,
|
|
29596
|
+
...targetProps
|
|
29597
|
+
}, eventKey, context);
|
|
29598
|
+
return [{
|
|
29599
|
+
target: "parent",
|
|
29600
|
+
eventHandlers: {
|
|
29601
|
+
onMouseDown: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseDown),
|
|
29602
|
+
onTouchStart: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseDown),
|
|
29603
|
+
onMouseUp: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseUp),
|
|
29604
|
+
onTouchEnd: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseUp),
|
|
29605
|
+
onMouseLeave: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseLeave),
|
|
29606
|
+
onTouchCancel: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseLeave),
|
|
29607
|
+
onMouseMove: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseMove),
|
|
29608
|
+
onTouchMove: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onMouseMove),
|
|
29609
|
+
onWheel: createEventHandler(_zoom_helpers__WEBPACK_IMPORTED_MODULE_4__.ZoomHelpers.onWheel, !props.allowZoom)
|
|
29610
|
+
}
|
|
29611
|
+
}];
|
|
29612
|
+
};
|
|
29824
29613
|
|
|
29825
29614
|
/***/ }),
|
|
29826
29615
|
|
|
@@ -42385,6 +42174,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42385
42174
|
/* harmony export */ "PointPathHelpers": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.PointPathHelpers; },
|
|
42386
42175
|
/* harmony export */ "Portal": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.Portal; },
|
|
42387
42176
|
/* harmony export */ "PortalContext": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.PortalContext; },
|
|
42177
|
+
/* harmony export */ "PortalOutlet": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.PortalOutlet; },
|
|
42178
|
+
/* harmony export */ "PortalProvider": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.PortalProvider; },
|
|
42388
42179
|
/* harmony export */ "RawZoomHelpers": function() { return /* reexport safe */ victory_zoom_container__WEBPACK_IMPORTED_MODULE_26__.RawZoomHelpers; },
|
|
42389
42180
|
/* harmony export */ "Rect": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.Rect; },
|
|
42390
42181
|
/* harmony export */ "Scale": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.Scale; },
|
|
@@ -42399,6 +42190,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42399
42190
|
/* harmony export */ "TimerContext": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.TimerContext; },
|
|
42400
42191
|
/* harmony export */ "Transitions": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.Transitions; },
|
|
42401
42192
|
/* harmony export */ "UserProps": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.UserProps; },
|
|
42193
|
+
/* harmony export */ "VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ victory_brush_container__WEBPACK_IMPORTED_MODULE_4__.VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS; },
|
|
42194
|
+
/* harmony export */ "VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ victory_cursor_container__WEBPACK_IMPORTED_MODULE_11__.VICTORY_CURSOR_CONTAINER_DEFAULT_PROPS; },
|
|
42195
|
+
/* harmony export */ "VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ victory_selection_container__WEBPACK_IMPORTED_MODULE_20__.VICTORY_SELECTION_CONTAINER_DEFAULT_PROPS; },
|
|
42196
|
+
/* harmony export */ "VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ victory_voronoi_container__WEBPACK_IMPORTED_MODULE_25__.VICTORY_VORONOI_CONTAINER_DEFAULT_PROPS; },
|
|
42197
|
+
/* harmony export */ "VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS": function() { return /* reexport safe */ victory_zoom_container__WEBPACK_IMPORTED_MODULE_26__.VICTORY_ZOOM_CONTAINER_DEFAULT_PROPS; },
|
|
42402
42198
|
/* harmony export */ "VictoryAccessibleGroup": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.VictoryAccessibleGroup; },
|
|
42403
42199
|
/* harmony export */ "VictoryAnimation": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.VictoryAnimation; },
|
|
42404
42200
|
/* harmony export */ "VictoryArea": function() { return /* reexport safe */ victory_area__WEBPACK_IMPORTED_MODULE_0__.VictoryArea; },
|
|
@@ -42437,10 +42233,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42437
42233
|
/* harmony export */ "Wrapper": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.Wrapper; },
|
|
42438
42234
|
/* harmony export */ "ZoomHelpers": function() { return /* reexport safe */ victory_zoom_container__WEBPACK_IMPORTED_MODULE_26__.ZoomHelpers; },
|
|
42439
42235
|
/* harmony export */ "addEvents": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.addEvents; },
|
|
42440
|
-
/* harmony export */ "brushContainerMixin": function() { return /* reexport safe */ victory_brush_container__WEBPACK_IMPORTED_MODULE_4__.brushContainerMixin; },
|
|
42441
|
-
/* harmony export */ "combineContainerMixins": function() { return /* reexport safe */ victory_create_container__WEBPACK_IMPORTED_MODULE_10__.combineContainerMixins; },
|
|
42442
42236
|
/* harmony export */ "createContainer": function() { return /* reexport safe */ victory_create_container__WEBPACK_IMPORTED_MODULE_10__.createContainer; },
|
|
42443
|
-
/* harmony export */ "cursorContainerMixin": function() { return /* reexport safe */ victory_cursor_container__WEBPACK_IMPORTED_MODULE_11__.cursorContainerMixin; },
|
|
42444
42237
|
/* harmony export */ "getBarPath": function() { return /* reexport safe */ victory_bar__WEBPACK_IMPORTED_MODULE_2__.getBarPath; },
|
|
42445
42238
|
/* harmony export */ "getBarPosition": function() { return /* reexport safe */ victory_bar__WEBPACK_IMPORTED_MODULE_2__.getBarPosition; },
|
|
42446
42239
|
/* harmony export */ "getBarWidth": function() { return /* reexport safe */ victory_bar__WEBPACK_IMPORTED_MODULE_2__.getBarWidth; },
|
|
@@ -42452,10 +42245,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42452
42245
|
/* harmony export */ "getVerticalBarPath": function() { return /* reexport safe */ victory_bar__WEBPACK_IMPORTED_MODULE_2__.getVerticalBarPath; },
|
|
42453
42246
|
/* harmony export */ "getVerticalPolarBarPath": function() { return /* reexport safe */ victory_bar__WEBPACK_IMPORTED_MODULE_2__.getVerticalPolarBarPath; },
|
|
42454
42247
|
/* harmony export */ "makeCreateContainerFunction": function() { return /* reexport safe */ victory_create_container__WEBPACK_IMPORTED_MODULE_10__.makeCreateContainerFunction; },
|
|
42455
|
-
/* harmony export */ "
|
|
42248
|
+
/* harmony export */ "mergeRefs": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.mergeRefs; },
|
|
42456
42249
|
/* harmony export */ "useCanvasContext": function() { return /* reexport safe */ victory_canvas__WEBPACK_IMPORTED_MODULE_7__.useCanvasContext; },
|
|
42457
|
-
/* harmony export */ "
|
|
42458
|
-
/* harmony export */ "
|
|
42250
|
+
/* harmony export */ "usePortalContext": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.usePortalContext; },
|
|
42251
|
+
/* harmony export */ "useVictoryBrushContainer": function() { return /* reexport safe */ victory_brush_container__WEBPACK_IMPORTED_MODULE_4__.useVictoryBrushContainer; },
|
|
42252
|
+
/* harmony export */ "useVictoryContainer": function() { return /* reexport safe */ victory_core__WEBPACK_IMPORTED_MODULE_9__.useVictoryContainer; },
|
|
42253
|
+
/* harmony export */ "useVictoryCursorContainer": function() { return /* reexport safe */ victory_cursor_container__WEBPACK_IMPORTED_MODULE_11__.useVictoryCursorContainer; },
|
|
42254
|
+
/* harmony export */ "useVictorySelectionContainer": function() { return /* reexport safe */ victory_selection_container__WEBPACK_IMPORTED_MODULE_20__.useVictorySelectionContainer; },
|
|
42255
|
+
/* harmony export */ "useVictoryVoronoiContainer": function() { return /* reexport safe */ victory_voronoi_container__WEBPACK_IMPORTED_MODULE_25__.useVictoryVoronoiContainer; },
|
|
42256
|
+
/* harmony export */ "useVictoryZoomContainer": function() { return /* reexport safe */ victory_zoom_container__WEBPACK_IMPORTED_MODULE_26__.useVictoryZoomContainer; }
|
|
42459
42257
|
/* harmony export */ });
|
|
42460
42258
|
/* harmony import */ var victory_area__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! victory-area */ "../../victory-area/es/index.js");
|
|
42461
42259
|
/* harmony import */ var victory_axis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-axis */ "../../victory-axis/es/index.js");
|