victory-stack 36.9.2-next.1 → 36.9.2-next.3
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 +4 -3
- package/dist/victory-stack.js +310 -262
- package/dist/victory-stack.min.js +1 -1
- package/package.json +5 -5
package/dist/victory-stack.js
CHANGED
|
@@ -2047,53 +2047,6 @@ function baseSortedUniq(array, iteratee) {
|
|
|
2047
2047
|
module.exports = baseSortedUniq;
|
|
2048
2048
|
|
|
2049
2049
|
|
|
2050
|
-
/***/ }),
|
|
2051
|
-
|
|
2052
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js":
|
|
2053
|
-
/*!***************************************************************************************!*\
|
|
2054
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js ***!
|
|
2055
|
-
\***************************************************************************************/
|
|
2056
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2057
|
-
|
|
2058
|
-
var Symbol = __webpack_require__(/*! ./_Symbol */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"),
|
|
2059
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
2060
|
-
isArray = __webpack_require__(/*! ./isArray */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"),
|
|
2061
|
-
isSymbol = __webpack_require__(/*! ./isSymbol */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js");
|
|
2062
|
-
|
|
2063
|
-
/** Used as references for various `Number` constants. */
|
|
2064
|
-
var INFINITY = 1 / 0;
|
|
2065
|
-
|
|
2066
|
-
/** Used to convert symbols to primitives and strings. */
|
|
2067
|
-
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
2068
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
2072
|
-
* values to empty strings.
|
|
2073
|
-
*
|
|
2074
|
-
* @private
|
|
2075
|
-
* @param {*} value The value to process.
|
|
2076
|
-
* @returns {string} Returns the string.
|
|
2077
|
-
*/
|
|
2078
|
-
function baseToString(value) {
|
|
2079
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
2080
|
-
if (typeof value == 'string') {
|
|
2081
|
-
return value;
|
|
2082
|
-
}
|
|
2083
|
-
if (isArray(value)) {
|
|
2084
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
2085
|
-
return arrayMap(value, baseToString) + '';
|
|
2086
|
-
}
|
|
2087
|
-
if (isSymbol(value)) {
|
|
2088
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
2089
|
-
}
|
|
2090
|
-
var result = (value + '');
|
|
2091
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
module.exports = baseToString;
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
2050
|
/***/ }),
|
|
2098
2051
|
|
|
2099
2052
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js":
|
|
@@ -5181,36 +5134,29 @@ module.exports = sortedUniq;
|
|
|
5181
5134
|
/*!**********************************************************************************!*\
|
|
5182
5135
|
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js ***!
|
|
5183
5136
|
\**********************************************************************************/
|
|
5184
|
-
/***/ ((module
|
|
5185
|
-
|
|
5186
|
-
var baseToString = __webpack_require__(/*! ./_baseToString */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js");
|
|
5137
|
+
/***/ ((module) => {
|
|
5187
5138
|
|
|
5188
5139
|
/**
|
|
5189
|
-
*
|
|
5190
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
5140
|
+
* This method returns the first argument it receives.
|
|
5191
5141
|
*
|
|
5192
5142
|
* @static
|
|
5143
|
+
* @since 0.1.0
|
|
5193
5144
|
* @memberOf _
|
|
5194
|
-
* @
|
|
5195
|
-
* @
|
|
5196
|
-
* @
|
|
5197
|
-
* @returns {string} Returns the converted string.
|
|
5145
|
+
* @category Util
|
|
5146
|
+
* @param {*} value Any value.
|
|
5147
|
+
* @returns {*} Returns `value`.
|
|
5198
5148
|
* @example
|
|
5199
5149
|
*
|
|
5200
|
-
*
|
|
5201
|
-
* // => ''
|
|
5202
|
-
*
|
|
5203
|
-
* _.toString(-0);
|
|
5204
|
-
* // => '-0'
|
|
5150
|
+
* var object = { 'a': 1 };
|
|
5205
5151
|
*
|
|
5206
|
-
* _.
|
|
5207
|
-
* // =>
|
|
5152
|
+
* console.log(_.identity(object) === object);
|
|
5153
|
+
* // => true
|
|
5208
5154
|
*/
|
|
5209
|
-
function
|
|
5210
|
-
return value
|
|
5155
|
+
function identity(value) {
|
|
5156
|
+
return value;
|
|
5211
5157
|
}
|
|
5212
5158
|
|
|
5213
|
-
module.exports =
|
|
5159
|
+
module.exports = identity;
|
|
5214
5160
|
|
|
5215
5161
|
|
|
5216
5162
|
/***/ }),
|
|
@@ -5482,203 +5428,259 @@ module.exports = function isEqual(a, b) {
|
|
|
5482
5428
|
"use strict";
|
|
5483
5429
|
__webpack_require__.r(__webpack_exports__);
|
|
5484
5430
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5485
|
-
/* harmony export */ "VictoryContainer": () => (/* binding */ VictoryContainer)
|
|
5486
|
-
/* harmony export */ "useVictoryContainer": () => (/* binding */ useVictoryContainer)
|
|
5431
|
+
/* harmony export */ "VictoryContainer": () => (/* binding */ VictoryContainer)
|
|
5487
5432
|
/* harmony export */ });
|
|
5488
|
-
/* harmony import */ var
|
|
5489
|
-
/* harmony import */ var
|
|
5490
|
-
/* harmony import */ var
|
|
5491
|
-
/* harmony import */ var
|
|
5492
|
-
/* harmony import */ var
|
|
5493
|
-
/* harmony import */ var
|
|
5494
|
-
/* harmony import */ var
|
|
5495
|
-
/* harmony import */ var
|
|
5433
|
+
/* 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");
|
|
5434
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
5435
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
5436
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
5437
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
5438
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
5439
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
5440
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
5441
|
+
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5442
|
+
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
5443
|
+
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-util/timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
5444
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
5445
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
5446
|
+
|
|
5447
|
+
|
|
5496
5448
|
|
|
5497
5449
|
|
|
5498
5450
|
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); }
|
|
5499
5451
|
|
|
5500
|
-
function
|
|
5452
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5501
5453
|
|
|
5502
|
-
function
|
|
5454
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5503
5455
|
|
|
5504
|
-
function
|
|
5456
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5505
5457
|
|
|
5506
|
-
function
|
|
5458
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5507
5459
|
|
|
5508
|
-
function
|
|
5460
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5509
5461
|
|
|
5510
|
-
function
|
|
5462
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5511
5463
|
|
|
5512
|
-
function
|
|
5464
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5513
5465
|
|
|
5514
|
-
function
|
|
5466
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5515
5467
|
|
|
5516
|
-
function
|
|
5468
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5517
5469
|
|
|
5470
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
5518
5471
|
|
|
5472
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5519
5473
|
|
|
5474
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5520
5475
|
|
|
5476
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5521
5477
|
|
|
5522
5478
|
|
|
5523
|
-
var defaultProps = {
|
|
5524
|
-
className: "VictoryContainer",
|
|
5525
|
-
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5526
|
-
portalZIndex: 99,
|
|
5527
|
-
responsive: true,
|
|
5528
|
-
role: "img"
|
|
5529
|
-
};
|
|
5530
|
-
function useVictoryContainer(initialProps) {
|
|
5531
|
-
var props = _objectSpread(_objectSpread({}, defaultProps), initialProps);
|
|
5532
5479
|
|
|
5533
|
-
var title = props.title,
|
|
5534
|
-
desc = props.desc,
|
|
5535
|
-
width = props.width,
|
|
5536
|
-
height = props.height,
|
|
5537
|
-
responsive = props.responsive;
|
|
5538
|
-
var localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
5539
5480
|
|
|
5540
|
-
var _React$useState = react__WEBPACK_IMPORTED_MODULE_1___default().useState(),
|
|
5541
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
5542
|
-
portalElement = _React$useState2[0],
|
|
5543
|
-
setPortalElement = _React$useState2[1];
|
|
5544
5481
|
|
|
5545
|
-
var portalRef = function (element) {
|
|
5546
|
-
return setPortalElement(element);
|
|
5547
|
-
}; // Generated ID stored in ref because it needs to persist across renders
|
|
5548
5482
|
|
|
5549
5483
|
|
|
5550
|
-
|
|
5551
|
-
|
|
5484
|
+
var VictoryContainer = /*#__PURE__*/function (_React$Component) {
|
|
5485
|
+
_inherits(VictoryContainer, _React$Component);
|
|
5552
5486
|
|
|
5553
|
-
var
|
|
5554
|
-
return "".concat(containerId, "-").concat(elName);
|
|
5555
|
-
};
|
|
5487
|
+
var _super = _createSuper(VictoryContainer);
|
|
5556
5488
|
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
} : {
|
|
5562
|
-
width: width,
|
|
5563
|
-
height: height
|
|
5564
|
-
};
|
|
5565
|
-
var viewBox = responsive ? "0 0 ".concat(width, " ").concat(height) : undefined;
|
|
5566
|
-
var preserveAspectRatio = responsive ? props.preserveAspectRatio : undefined;
|
|
5567
|
-
var ariaLabelledBy = [title && getIdForElement("title"), props["aria-labelledby"]].filter(Boolean).join(" ") || undefined;
|
|
5568
|
-
var ariaDescribedBy = [desc && getIdForElement("desc"), props["aria-describedby"]].filter(Boolean).join(" ") || undefined;
|
|
5569
|
-
var titleId = getIdForElement("title");
|
|
5570
|
-
var descId = getIdForElement("desc");
|
|
5571
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
5572
|
-
titleId: titleId,
|
|
5573
|
-
descId: descId,
|
|
5574
|
-
dimensions: dimensions,
|
|
5575
|
-
viewBox: viewBox,
|
|
5576
|
-
preserveAspectRatio: preserveAspectRatio,
|
|
5577
|
-
ariaLabelledBy: ariaLabelledBy,
|
|
5578
|
-
ariaDescribedBy: ariaDescribedBy,
|
|
5579
|
-
userProps: userProps,
|
|
5580
|
-
portalRef: portalRef,
|
|
5581
|
-
portalElement: portalElement,
|
|
5582
|
-
localContainerRef: localContainerRef
|
|
5583
|
-
});
|
|
5584
|
-
}
|
|
5585
|
-
var VictoryContainer = function (initialProps) {
|
|
5586
|
-
var _useVictoryContainer = useVictoryContainer(initialProps),
|
|
5587
|
-
role = _useVictoryContainer.role,
|
|
5588
|
-
title = _useVictoryContainer.title,
|
|
5589
|
-
desc = _useVictoryContainer.desc,
|
|
5590
|
-
children = _useVictoryContainer.children,
|
|
5591
|
-
className = _useVictoryContainer.className,
|
|
5592
|
-
portalZIndex = _useVictoryContainer.portalZIndex,
|
|
5593
|
-
portalComponent = _useVictoryContainer.portalComponent,
|
|
5594
|
-
width = _useVictoryContainer.width,
|
|
5595
|
-
height = _useVictoryContainer.height,
|
|
5596
|
-
style = _useVictoryContainer.style,
|
|
5597
|
-
tabIndex = _useVictoryContainer.tabIndex,
|
|
5598
|
-
responsive = _useVictoryContainer.responsive,
|
|
5599
|
-
events = _useVictoryContainer.events,
|
|
5600
|
-
ouiaId = _useVictoryContainer.ouiaId,
|
|
5601
|
-
ouiaSafe = _useVictoryContainer.ouiaSafe,
|
|
5602
|
-
ouiaType = _useVictoryContainer.ouiaType,
|
|
5603
|
-
dimensions = _useVictoryContainer.dimensions,
|
|
5604
|
-
ariaDescribedBy = _useVictoryContainer.ariaDescribedBy,
|
|
5605
|
-
ariaLabelledBy = _useVictoryContainer.ariaLabelledBy,
|
|
5606
|
-
viewBox = _useVictoryContainer.viewBox,
|
|
5607
|
-
preserveAspectRatio = _useVictoryContainer.preserveAspectRatio,
|
|
5608
|
-
userProps = _useVictoryContainer.userProps,
|
|
5609
|
-
titleId = _useVictoryContainer.titleId,
|
|
5610
|
-
descId = _useVictoryContainer.descId,
|
|
5611
|
-
portalElement = _useVictoryContainer.portalElement,
|
|
5612
|
-
portalRef = _useVictoryContainer.portalRef,
|
|
5613
|
-
containerRef = _useVictoryContainer.containerRef,
|
|
5614
|
-
localContainerRef = _useVictoryContainer.localContainerRef;
|
|
5489
|
+
// @ts-expect-error Ref will be initialized on mount
|
|
5490
|
+
// @ts-expect-error Ref will be initialized on mount
|
|
5491
|
+
function VictoryContainer(props) {
|
|
5492
|
+
var _this;
|
|
5615
5493
|
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5494
|
+
_classCallCheck(this, VictoryContainer);
|
|
5495
|
+
|
|
5496
|
+
_this = _super.call(this, props);
|
|
5497
|
+
_this.containerId = void 0;
|
|
5498
|
+
_this.portalRef = void 0;
|
|
5499
|
+
_this.containerRef = void 0;
|
|
5500
|
+
_this.shouldHandleWheel = void 0;
|
|
5501
|
+
|
|
5502
|
+
_this.savePortalRef = function (portal) {
|
|
5503
|
+
_this.portalRef = portal;
|
|
5504
|
+
return portal;
|
|
5505
|
+
};
|
|
5506
|
+
|
|
5507
|
+
_this.portalUpdate = function (key, el) {
|
|
5508
|
+
return _this.portalRef.portalUpdate(key, el);
|
|
5509
|
+
};
|
|
5510
|
+
|
|
5511
|
+
_this.portalRegister = function () {
|
|
5512
|
+
return _this.portalRef.portalRegister();
|
|
5513
|
+
};
|
|
5514
|
+
|
|
5515
|
+
_this.portalDeregister = function (key) {
|
|
5516
|
+
return _this.portalRef.portalDeregister(key);
|
|
5517
|
+
};
|
|
5518
|
+
|
|
5519
|
+
_this.saveContainerRef = function (container) {
|
|
5520
|
+
if (_victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction(_this.props.containerRef)) {
|
|
5521
|
+
_this.props.containerRef(container);
|
|
5522
|
+
}
|
|
5619
5523
|
|
|
5620
|
-
|
|
5524
|
+
_this.containerRef = container;
|
|
5525
|
+
return container;
|
|
5526
|
+
};
|
|
5527
|
+
|
|
5528
|
+
_this.handleWheel = function (e) {
|
|
5621
5529
|
return e.preventDefault();
|
|
5622
5530
|
};
|
|
5623
5531
|
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
return
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
value: {
|
|
5632
|
-
|
|
5532
|
+
_this.containerId = !lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default()(props) || props.containerId === undefined ? lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-") : props.containerId;
|
|
5533
|
+
_this.shouldHandleWheel = !!(props && props.events && props.events.onWheel);
|
|
5534
|
+
return _this;
|
|
5535
|
+
}
|
|
5536
|
+
|
|
5537
|
+
_createClass(VictoryContainer, [{
|
|
5538
|
+
key: "componentDidMount",
|
|
5539
|
+
value: function componentDidMount() {
|
|
5540
|
+
if (this.shouldHandleWheel && this.containerRef) {
|
|
5541
|
+
this.containerRef.addEventListener("wheel", this.handleWheel);
|
|
5542
|
+
}
|
|
5633
5543
|
}
|
|
5634
|
-
},
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
},
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5544
|
+
}, {
|
|
5545
|
+
key: "componentWillUnmount",
|
|
5546
|
+
value: function componentWillUnmount() {
|
|
5547
|
+
if (this.shouldHandleWheel && this.containerRef) {
|
|
5548
|
+
this.containerRef.removeEventListener("wheel", this.handleWheel);
|
|
5549
|
+
}
|
|
5550
|
+
}
|
|
5551
|
+
}, {
|
|
5552
|
+
key: "getIdForElement",
|
|
5553
|
+
value: function getIdForElement(elementName) {
|
|
5554
|
+
return "".concat(this.containerId, "-").concat(elementName);
|
|
5555
|
+
} // overridden in custom containers
|
|
5556
|
+
|
|
5557
|
+
}, {
|
|
5558
|
+
key: "getChildren",
|
|
5559
|
+
value: function getChildren(props) {
|
|
5560
|
+
return props.children;
|
|
5561
|
+
} // Get props defined by the Open UI Automation (OUIA) 1.0-RC spec
|
|
5562
|
+
// See https://ouia.readthedocs.io/en/latest/README.html#ouia-component
|
|
5563
|
+
|
|
5564
|
+
}, {
|
|
5565
|
+
key: "getOUIAProps",
|
|
5566
|
+
value: function getOUIAProps(props) {
|
|
5567
|
+
var ouiaId = props.ouiaId,
|
|
5568
|
+
ouiaSafe = props.ouiaSafe,
|
|
5569
|
+
ouiaType = props.ouiaType;
|
|
5570
|
+
return _objectSpread(_objectSpread(_objectSpread({}, ouiaId && {
|
|
5571
|
+
"data-ouia-component-id": ouiaId
|
|
5572
|
+
}), ouiaType && {
|
|
5573
|
+
"data-ouia-component-type": ouiaType
|
|
5574
|
+
}), ouiaSafe !== undefined && {
|
|
5575
|
+
"data-ouia-safe": ouiaSafe
|
|
5576
|
+
});
|
|
5577
|
+
}
|
|
5578
|
+
}, {
|
|
5579
|
+
key: "renderContainer",
|
|
5580
|
+
value: function renderContainer(props, svgProps, style) {
|
|
5581
|
+
var title = props.title,
|
|
5582
|
+
desc = props.desc,
|
|
5583
|
+
portalComponent = props.portalComponent,
|
|
5584
|
+
className = props.className,
|
|
5585
|
+
width = props.width,
|
|
5586
|
+
height = props.height,
|
|
5587
|
+
portalZIndex = props.portalZIndex,
|
|
5588
|
+
responsive = props.responsive;
|
|
5589
|
+
var children = this.getChildren(props);
|
|
5590
|
+
var dimensions = responsive ? {
|
|
5591
|
+
width: "100%",
|
|
5592
|
+
height: "100%"
|
|
5593
|
+
} : {
|
|
5594
|
+
width: width,
|
|
5595
|
+
height: height
|
|
5596
|
+
};
|
|
5597
|
+
var divStyle = Object.assign({
|
|
5598
|
+
pointerEvents: "none",
|
|
5599
|
+
touchAction: "none",
|
|
5600
|
+
position: "relative"
|
|
5601
|
+
}, dimensions);
|
|
5602
|
+
var portalDivStyle = Object.assign({
|
|
5603
|
+
zIndex: portalZIndex,
|
|
5604
|
+
position: "absolute",
|
|
5605
|
+
top: 0,
|
|
5606
|
+
left: 0
|
|
5607
|
+
}, dimensions);
|
|
5608
|
+
var svgStyle = Object.assign({
|
|
5609
|
+
pointerEvents: "all"
|
|
5610
|
+
}, dimensions);
|
|
5611
|
+
var portalSvgStyle = Object.assign({
|
|
5612
|
+
overflow: "visible"
|
|
5613
|
+
}, dimensions);
|
|
5614
|
+
var portalProps = {
|
|
5615
|
+
width: width,
|
|
5616
|
+
height: height,
|
|
5617
|
+
viewBox: svgProps.viewBox,
|
|
5618
|
+
preserveAspectRatio: svgProps.preserveAspectRatio,
|
|
5619
|
+
style: portalSvgStyle
|
|
5620
|
+
};
|
|
5621
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext.Provider, {
|
|
5622
|
+
value: {
|
|
5623
|
+
portalUpdate: this.portalUpdate,
|
|
5624
|
+
portalRegister: this.portalRegister,
|
|
5625
|
+
portalDeregister: this.portalDeregister
|
|
5626
|
+
}
|
|
5627
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", _extends({
|
|
5628
|
+
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, style, divStyle),
|
|
5629
|
+
className: className,
|
|
5630
|
+
ref: this.saveContainerRef
|
|
5631
|
+
}, this.getOUIAProps(props)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("svg", _extends({}, svgProps, {
|
|
5632
|
+
style: svgStyle
|
|
5633
|
+
}), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("title", {
|
|
5634
|
+
id: this.getIdForElement("title")
|
|
5635
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("desc", {
|
|
5636
|
+
id: this.getIdForElement("desc")
|
|
5637
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
|
5638
|
+
style: portalDivStyle
|
|
5639
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(portalComponent, _objectSpread(_objectSpread({}, portalProps), {}, {
|
|
5640
|
+
ref: this.savePortalRef
|
|
5641
|
+
})))));
|
|
5642
|
+
}
|
|
5643
|
+
}, {
|
|
5644
|
+
key: "render",
|
|
5645
|
+
value: function render() {
|
|
5646
|
+
var _this$props = this.props,
|
|
5647
|
+
width = _this$props.width,
|
|
5648
|
+
height = _this$props.height,
|
|
5649
|
+
responsive = _this$props.responsive,
|
|
5650
|
+
events = _this$props.events,
|
|
5651
|
+
title = _this$props.title,
|
|
5652
|
+
desc = _this$props.desc,
|
|
5653
|
+
tabIndex = _this$props.tabIndex,
|
|
5654
|
+
preserveAspectRatio = _this$props.preserveAspectRatio,
|
|
5655
|
+
role = _this$props.role;
|
|
5656
|
+
var style = responsive ? this.props.style : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(this.props.style, ["height", "width"]);
|
|
5657
|
+
var userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_6__.getSafeUserProps(this.props);
|
|
5658
|
+
var svgProps = Object.assign(_objectSpread({
|
|
5659
|
+
width: width,
|
|
5660
|
+
height: height,
|
|
5661
|
+
tabIndex: tabIndex,
|
|
5662
|
+
role: role,
|
|
5663
|
+
"aria-labelledby": [title && this.getIdForElement("title"), this.props["aria-labelledby"]].filter(Boolean).join(" ") || undefined,
|
|
5664
|
+
"aria-describedby": [desc && this.getIdForElement("desc"), this.props["aria-describedby"]].filter(Boolean).join(" ") || undefined,
|
|
5665
|
+
viewBox: responsive ? "0 0 ".concat(width, " ").concat(height) : undefined,
|
|
5666
|
+
preserveAspectRatio: responsive ? preserveAspectRatio : undefined
|
|
5667
|
+
}, userProps), events);
|
|
5668
|
+
return this.renderContainer(this.props, svgProps, style);
|
|
5669
|
+
}
|
|
5670
|
+
}]);
|
|
5671
|
+
|
|
5672
|
+
return VictoryContainer;
|
|
5673
|
+
}((react__WEBPACK_IMPORTED_MODULE_3___default().Component));
|
|
5674
|
+
VictoryContainer.displayName = "VictoryContainer";
|
|
5681
5675
|
VictoryContainer.role = "container";
|
|
5676
|
+
VictoryContainer.defaultProps = {
|
|
5677
|
+
className: "VictoryContainer",
|
|
5678
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_7__.Portal, null),
|
|
5679
|
+
portalZIndex: 99,
|
|
5680
|
+
responsive: true,
|
|
5681
|
+
role: "img"
|
|
5682
|
+
};
|
|
5683
|
+
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_8__["default"];
|
|
5682
5684
|
|
|
5683
5685
|
/***/ }),
|
|
5684
5686
|
|
|
@@ -5701,7 +5703,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5701
5703
|
* The React context object consumers may use to access the context of the
|
|
5702
5704
|
* portal.
|
|
5703
5705
|
*/
|
|
5704
|
-
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(
|
|
5706
|
+
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
5705
5707
|
PortalContext.displayName = "PortalContext";
|
|
5706
5708
|
|
|
5707
5709
|
/***/ }),
|
|
@@ -5719,14 +5721,85 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5719
5721
|
/* harmony export */ });
|
|
5720
5722
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5721
5723
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5722
|
-
function
|
|
5724
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5723
5725
|
|
|
5726
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5724
5727
|
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
});
|
|
5728
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5729
|
+
|
|
5730
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5731
|
+
|
|
5732
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5733
|
+
|
|
5734
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5735
|
+
|
|
5736
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
5737
|
+
|
|
5738
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5739
|
+
|
|
5740
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5741
|
+
|
|
5742
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5743
|
+
|
|
5744
|
+
|
|
5745
|
+
var Portal = /*#__PURE__*/function (_ref) {
|
|
5746
|
+
_inherits(Portal, _ref);
|
|
5747
|
+
|
|
5748
|
+
var _super = _createSuper(Portal);
|
|
5749
|
+
|
|
5750
|
+
function Portal(props) {
|
|
5751
|
+
var _this;
|
|
5752
|
+
|
|
5753
|
+
_classCallCheck(this, Portal);
|
|
5754
|
+
|
|
5755
|
+
_this = _super.call(this, props);
|
|
5756
|
+
_this.map = void 0;
|
|
5757
|
+
_this.index = void 0;
|
|
5758
|
+
|
|
5759
|
+
_this.portalRegister = function () {
|
|
5760
|
+
return ++_this.index;
|
|
5761
|
+
};
|
|
5762
|
+
|
|
5763
|
+
_this.portalUpdate = function (key, element) {
|
|
5764
|
+
_this.map[key] = element;
|
|
5765
|
+
|
|
5766
|
+
_this.forceUpdate();
|
|
5767
|
+
};
|
|
5768
|
+
|
|
5769
|
+
_this.portalDeregister = function (key) {
|
|
5770
|
+
delete _this.map[key];
|
|
5771
|
+
|
|
5772
|
+
_this.forceUpdate();
|
|
5773
|
+
};
|
|
5774
|
+
|
|
5775
|
+
_this.map = {};
|
|
5776
|
+
_this.index = 1;
|
|
5777
|
+
return _this;
|
|
5778
|
+
}
|
|
5779
|
+
|
|
5780
|
+
_createClass(Portal, [{
|
|
5781
|
+
key: "getChildren",
|
|
5782
|
+
value: function getChildren() {
|
|
5783
|
+
var _this2 = this;
|
|
5784
|
+
|
|
5785
|
+
return Object.keys(this.map).map(function (key) {
|
|
5786
|
+
var el = _this2.map[key];
|
|
5787
|
+
return el ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(el, {
|
|
5788
|
+
key: key
|
|
5789
|
+
}) : el;
|
|
5790
|
+
});
|
|
5791
|
+
} // Overridden in victory-core-native
|
|
5792
|
+
|
|
5793
|
+
}, {
|
|
5794
|
+
key: "render",
|
|
5795
|
+
value: function render() {
|
|
5796
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", this.props, this.getChildren());
|
|
5797
|
+
}
|
|
5798
|
+
}]);
|
|
5799
|
+
|
|
5800
|
+
return Portal;
|
|
5801
|
+
}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
|
|
5802
|
+
Portal.displayName = "Portal";
|
|
5730
5803
|
|
|
5731
5804
|
/***/ }),
|
|
5732
5805
|
|
|
@@ -9031,31 +9104,6 @@ function warn(message) {
|
|
|
9031
9104
|
|
|
9032
9105
|
/***/ }),
|
|
9033
9106
|
|
|
9034
|
-
/***/ "../../victory-core/es/victory-util/merge-refs.js":
|
|
9035
|
-
/*!********************************************************!*\
|
|
9036
|
-
!*** ../../victory-core/es/victory-util/merge-refs.js ***!
|
|
9037
|
-
\********************************************************/
|
|
9038
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9039
|
-
|
|
9040
|
-
"use strict";
|
|
9041
|
-
__webpack_require__.r(__webpack_exports__);
|
|
9042
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9043
|
-
/* harmony export */ "mergeRefs": () => (/* binding */ mergeRefs)
|
|
9044
|
-
/* harmony export */ });
|
|
9045
|
-
function mergeRefs(refs) {
|
|
9046
|
-
return function (value) {
|
|
9047
|
-
refs.forEach(function (ref) {
|
|
9048
|
-
if (typeof ref === "function") {
|
|
9049
|
-
ref(value);
|
|
9050
|
-
} else if (ref !== null && ref !== undefined) {
|
|
9051
|
-
ref.current = value;
|
|
9052
|
-
}
|
|
9053
|
-
});
|
|
9054
|
-
};
|
|
9055
|
-
}
|
|
9056
|
-
|
|
9057
|
-
/***/ }),
|
|
9058
|
-
|
|
9059
9107
|
/***/ "../../victory-core/es/victory-util/scale.js":
|
|
9060
9108
|
/*!***************************************************!*\
|
|
9061
9109
|
!*** ../../victory-core/es/victory-util/scale.js ***!
|