victory-voronoi-container 36.9.2-next.3 → 36.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,23 +1,16 @@
1
1
  # victory-voronoi-container
2
2
 
3
- ## 36.9.2-next.3
3
+ ## 36.9.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 7da790934: Replace lodash keys with native code
8
- - 65d02419f: Refactor containers and portal to function components
9
- - 7efd582cc: Replace lodash array utils with native code
10
- - 6e34169a5: Replace lodash isFunction with native code
11
- - Updated dependencies [7da790934]
12
- - Updated dependencies [3f2da66e3]
13
- - Updated dependencies [c13308624]
14
- - Updated dependencies [65d02419f]
15
- - Updated dependencies [7efd582cc]
16
- - Updated dependencies [9cdaf2c08]
17
- - Updated dependencies [f6f7cc515]
18
- - Updated dependencies [6e34169a5]
19
- - victory-core@36.9.2-next.3
20
- - victory-tooltip@36.9.2-next.3
7
+ - Replace lodash keys with native code ([#2811](https://github.com/FormidableLabs/victory/pull/2811))
8
+
9
+ * Replace lodash isString with native equivalent ([#2827](https://github.com/FormidableLabs/victory/pull/2827))
10
+
11
+ - Replace lodash array utils with native code ([#2810](https://github.com/FormidableLabs/victory/pull/2810))
12
+
13
+ * Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
21
14
 
22
15
  ## 36.9.1
23
16
 
package/README.md CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  `victory-voronoi-container@^30.0.0` exports `VictoryVoronoiContainer`, `voronoiContainerMixin` and `VoronoiHelpers`
4
4
 
5
- To view documentation for `VictoryVoronoiContainer` please see https://formidable.com/open-source/victory/docs/victory-voronoi-container
5
+ To view documentation for `VictoryVoronoiContainer` please see https://commerce.nearform.com/open-source/victory/docs/victory-voronoi-container
6
6
 
7
- To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-voronoi-container.md
7
+ To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-voronoi-container.md
@@ -331,20 +331,17 @@ __webpack_require__.r(__webpack_exports__);
331
331
  /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_0__);
332
332
  /* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isRegExp */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js");
333
333
  /* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1__);
334
- /* harmony import */ var lodash_isString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isString */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js");
335
- /* harmony import */ var lodash_isString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isString__WEBPACK_IMPORTED_MODULE_2__);
336
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
337
- /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3__);
338
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
339
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
340
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
341
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
342
- /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
343
- /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
344
- /* harmony import */ var delaunay_find_lib_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! delaunay-find/lib/index.js */ "../../../node_modules/.pnpm/delaunay-find@0.0.6/node_modules/delaunay-find/lib/index.js");
345
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react");
346
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
347
-
334
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
335
+ /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
336
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/selection.js");
337
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
338
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
339
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
340
+ /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
341
+ /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
342
+ /* harmony import */ var delaunay_find_lib_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! delaunay-find/lib/index.js */ "../../../node_modules/.pnpm/delaunay-find@0.0.6/node_modules/delaunay-find/lib/index.js");
343
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
344
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
348
345
 
349
346
 
350
347
 
@@ -395,8 +392,8 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
395
392
  this.handleMouseMove = function (evt, targetProps) {
396
393
  // eslint-disable-line max-statements
397
394
  var activePoints = targetProps.activePoints || [];
398
- var parentSVG = targetProps.parentSVG || victory_core__WEBPACK_IMPORTED_MODULE_7__.getParentSVG(evt);
399
- var mousePosition = victory_core__WEBPACK_IMPORTED_MODULE_7__.getSVGEventCoordinates(evt, parentSVG);
395
+ var parentSVG = targetProps.parentSVG || victory_core__WEBPACK_IMPORTED_MODULE_6__.getParentSVG(evt);
396
+ var mousePosition = victory_core__WEBPACK_IMPORTED_MODULE_6__.getSVGEventCoordinates(evt, parentSVG);
400
397
 
401
398
  if (!_this.withinBounds(targetProps, mousePosition)) {
402
399
  var _this$getParentMutati2;
@@ -417,7 +414,7 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
417
414
 
418
415
  var parentMutations = _this.getParentMutation(points, mousePosition, parentSVG, index);
419
416
 
420
- if (activePoints.length && react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(points, activePoints)) {
417
+ if (activePoints.length && react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default()(points, activePoints)) {
421
418
  return parentMutations;
422
419
  }
423
420
 
@@ -448,7 +445,7 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
448
445
  polar = props.polar,
449
446
  origin = props.origin,
450
447
  scale = props.scale;
451
- var padding = victory_core__WEBPACK_IMPORTED_MODULE_8__.getPadding(props, "voronoiPadding");
448
+ var padding = victory_core__WEBPACK_IMPORTED_MODULE_7__.getPadding(props, "voronoiPadding");
452
449
  var x = point.x,
453
450
  y = point.y;
454
451
 
@@ -464,16 +461,16 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
464
461
  key: "getDatasets",
465
462
  value: function getDatasets(props) {
466
463
  var minDomain = {
467
- x: victory_core__WEBPACK_IMPORTED_MODULE_9__.getMinValue(props.domain.x),
468
- y: victory_core__WEBPACK_IMPORTED_MODULE_9__.getMinValue(props.domain.y)
464
+ x: victory_core__WEBPACK_IMPORTED_MODULE_8__.getMinValue(props.domain.x),
465
+ y: victory_core__WEBPACK_IMPORTED_MODULE_8__.getMinValue(props.domain.y)
469
466
  };
470
- var children = react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children);
467
+ var children = react__WEBPACK_IMPORTED_MODULE_5___default().Children.toArray(props.children);
471
468
 
472
469
  var addMeta = function (data, name, child) {
473
470
  var continuous = child && child.type && child.type.continuous;
474
471
  var style = child ? child.props && child.props.style : props.style;
475
472
  return data.map(function (datum, index) {
476
- var _Helpers$getPoint = victory_core__WEBPACK_IMPORTED_MODULE_8__.getPoint(datum),
473
+ var _Helpers$getPoint = victory_core__WEBPACK_IMPORTED_MODULE_7__.getPoint(datum),
477
474
  x = _Helpers$getPoint.x,
478
475
  y = _Helpers$getPoint.y,
479
476
  y0 = _Helpers$getPoint.y0,
@@ -497,7 +494,7 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
497
494
  }
498
495
 
499
496
  var getData = function (childProps) {
500
- var data = victory_core__WEBPACK_IMPORTED_MODULE_10__.getData(childProps);
497
+ var data = victory_core__WEBPACK_IMPORTED_MODULE_9__.getData(childProps);
501
498
  return Array.isArray(data) && data.length > 0 ? data : undefined;
502
499
  };
503
500
 
@@ -505,22 +502,24 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
505
502
  var childProps = child.props || {};
506
503
  var name = childProps.name || childName;
507
504
  var blacklist = props.voronoiBlacklist || [];
508
- var blacklistStr = blacklist.filter((lodash_isString__WEBPACK_IMPORTED_MODULE_2___default()));
505
+ var blacklistStr = blacklist.filter(function (value) {
506
+ return !!value && typeof value.valueOf() === "string";
507
+ });
509
508
  var blacklistRegExp = blacklist.filter((lodash_isRegExp__WEBPACK_IMPORTED_MODULE_1___default()));
510
509
  var isRegExpMatch = blacklistRegExp.some(function (regExp) {
511
510
  return regExp.test(name);
512
511
  });
513
512
 
514
- if (!victory_core__WEBPACK_IMPORTED_MODULE_10__.isDataComponent(child) || blacklistStr.includes(name) || isRegExpMatch) {
513
+ if (!victory_core__WEBPACK_IMPORTED_MODULE_9__.isDataComponent(child) || blacklistStr.includes(name) || isRegExpMatch) {
515
514
  return null;
516
515
  }
517
516
 
518
- var getChildData = child.type && victory_core__WEBPACK_IMPORTED_MODULE_8__.isFunction(child.type.getData) ? child.type.getData : getData;
517
+ var getChildData = child.type && victory_core__WEBPACK_IMPORTED_MODULE_7__.isFunction(child.type.getData) ? child.type.getData : getData;
519
518
  var childData = getChildData(child.props);
520
519
  return childData ? addMeta(childData, name, child) : null;
521
520
  };
522
521
 
523
- return victory_core__WEBPACK_IMPORTED_MODULE_8__.reduceChildren(children, iteratee, props);
522
+ return victory_core__WEBPACK_IMPORTED_MODULE_7__.reduceChildren(children, iteratee, props);
524
523
  }
525
524
  }, {
526
525
  key: "findPoints",
@@ -550,13 +549,13 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
550
549
  value: function getVoronoiPoints(props, mousePosition) {
551
550
  var datasets = this.getDatasets(props);
552
551
  var scaledData = datasets.map(function (d) {
553
- var _Helpers$scalePoint = victory_core__WEBPACK_IMPORTED_MODULE_8__.scalePoint(props, d),
552
+ var _Helpers$scalePoint = victory_core__WEBPACK_IMPORTED_MODULE_7__.scalePoint(props, d),
554
553
  x = _Helpers$scalePoint.x,
555
554
  y = _Helpers$scalePoint.y;
556
555
 
557
556
  return [x, y];
558
557
  });
559
- var delaunay = delaunay_find_lib_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(scaledData);
558
+ var delaunay = delaunay_find_lib_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(scaledData);
560
559
  var index = delaunay.find(mousePosition.x, mousePosition.y);
561
560
  var withinRadius = this.withinRadius(scaledData[index], mousePosition, props.radius);
562
561
  var points = withinRadius ? this.findPoints(datasets, datasets[index]) : [];
@@ -581,7 +580,7 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
581
580
  var defaultTarget = activateData ? ["data"] : [];
582
581
  var targets = labels && !activateLabels ? defaultTarget : defaultTarget.concat("labels");
583
582
 
584
- if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(targets)) {
583
+ if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(targets)) {
585
584
  return [];
586
585
  }
587
586
 
@@ -615,7 +614,7 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
615
614
  var defaultTarget = activateData ? ["data"] : [];
616
615
  var targets = labels && !activateLabels ? defaultTarget : defaultTarget.concat("labels");
617
616
 
618
- if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(targets)) {
617
+ if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(targets)) {
619
618
  return [];
620
619
  }
621
620
 
@@ -651,14 +650,14 @@ var VoronoiHelpersClass = /*#__PURE__*/function () {
651
650
  }, {
652
651
  key: "onActivated",
653
652
  value: function onActivated(props, points) {
654
- if (victory_core__WEBPACK_IMPORTED_MODULE_8__.isFunction(props.onActivated)) {
653
+ if (victory_core__WEBPACK_IMPORTED_MODULE_7__.isFunction(props.onActivated)) {
655
654
  props.onActivated(points, props);
656
655
  }
657
656
  }
658
657
  }, {
659
658
  key: "onDeactivated",
660
659
  value: function onDeactivated(props, points) {
661
- if (victory_core__WEBPACK_IMPORTED_MODULE_8__.isFunction(props.onDeactivated)) {
660
+ if (victory_core__WEBPACK_IMPORTED_MODULE_7__.isFunction(props.onDeactivated)) {
662
661
  props.onDeactivated(points, props);
663
662
  }
664
663
  }
@@ -4218,29 +4217,29 @@ module.exports = stringToPath;
4218
4217
  /*!********************************************************************************!*\
4219
4218
  !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js ***!
4220
4219
  \********************************************************************************/
4221
- /***/ ((module) => {
4220
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4221
+
4222
+ var isSymbol = __webpack_require__(/*! ./isSymbol */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js");
4223
+
4224
+ /** Used as references for various `Number` constants. */
4225
+ var INFINITY = 1 / 0;
4222
4226
 
4223
4227
  /**
4224
- * This method returns the first argument it receives.
4228
+ * Converts `value` to a string key if it's not a string or symbol.
4225
4229
  *
4226
- * @static
4227
- * @since 0.1.0
4228
- * @memberOf _
4229
- * @category Util
4230
- * @param {*} value Any value.
4231
- * @returns {*} Returns `value`.
4232
- * @example
4233
- *
4234
- * var object = { 'a': 1 };
4235
- *
4236
- * console.log(_.identity(object) === object);
4237
- * // => true
4230
+ * @private
4231
+ * @param {*} value The value to inspect.
4232
+ * @returns {string|symbol} Returns the key.
4238
4233
  */
4239
- function identity(value) {
4240
- return value;
4234
+ function toKey(value) {
4235
+ if (typeof value == 'string' || isSymbol(value)) {
4236
+ return value;
4237
+ }
4238
+ var result = (value + '');
4239
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
4241
4240
  }
4242
4241
 
4243
- module.exports = identity;
4242
+ module.exports = toKey;
4244
4243
 
4245
4244
 
4246
4245
  /***/ }),
@@ -5263,46 +5262,6 @@ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
5263
5262
  module.exports = isRegExp;
5264
5263
 
5265
5264
 
5266
- /***/ }),
5267
-
5268
- /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js":
5269
- /*!**********************************************************************************!*\
5270
- !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js ***!
5271
- \**********************************************************************************/
5272
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5273
-
5274
- var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"),
5275
- isArray = __webpack_require__(/*! ./isArray */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"),
5276
- isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
5277
-
5278
- /** `Object#toString` result references. */
5279
- var stringTag = '[object String]';
5280
-
5281
- /**
5282
- * Checks if `value` is classified as a `String` primitive or object.
5283
- *
5284
- * @static
5285
- * @since 0.1.0
5286
- * @memberOf _
5287
- * @category Lang
5288
- * @param {*} value The value to check.
5289
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
5290
- * @example
5291
- *
5292
- * _.isString('abc');
5293
- * // => true
5294
- *
5295
- * _.isString(1);
5296
- * // => false
5297
- */
5298
- function isString(value) {
5299
- return typeof value == 'string' ||
5300
- (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
5301
- }
5302
-
5303
- module.exports = isString;
5304
-
5305
-
5306
5265
  /***/ }),
5307
5266
 
5308
5267
  /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js":
@@ -8108,6 +8067,7 @@ __webpack_require__.r(__webpack_exports__);
8108
8067
  /* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
8109
8068
  /* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
8110
8069
  /* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
8070
+ /* harmony export */ "difference": () => (/* binding */ difference),
8111
8071
  /* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
8112
8072
  /* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
8113
8073
  /* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
@@ -8149,6 +8109,22 @@ function containsOnlyStrings(collection) {
8149
8109
  return typeof value === "string";
8150
8110
  });
8151
8111
  }
8112
+ /**
8113
+ * Creates an array of array values not included in the other given arrays
8114
+ * @param a The array to inspect
8115
+ * @param b The values to exclude
8116
+ * @returns The new array of filtered values
8117
+ */
8118
+
8119
+ function difference(a, b) {
8120
+ if (a && b) {
8121
+ return a.filter(function (value) {
8122
+ return !b.includes(value);
8123
+ });
8124
+ }
8125
+
8126
+ return [];
8127
+ }
8152
8128
  function isArrayOfArrays(collection) {
8153
8129
  return isNonEmptyArray(collection) && collection.every(Array.isArray);
8154
8130
  }
@@ -8699,6 +8675,7 @@ __webpack_require__.r(__webpack_exports__);
8699
8675
  /* harmony export */ "getRadius": () => (/* binding */ getRadius),
8700
8676
  /* harmony export */ "getRange": () => (/* binding */ getRange),
8701
8677
  /* harmony export */ "getStyles": () => (/* binding */ getStyles),
8678
+ /* harmony export */ "invert": () => (/* binding */ invert),
8702
8679
  /* harmony export */ "isFunction": () => (/* binding */ isFunction),
8703
8680
  /* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
8704
8681
  /* harmony export */ "isNil": () => (/* binding */ isNil),
@@ -8749,6 +8726,18 @@ function getPolarRange(props, axis) {
8749
8726
  return [props.innerRadius || 0, getRadius(props)];
8750
8727
  } // Exported Functions
8751
8728
 
8729
+ /**
8730
+ * Creates an object composed of the inverted keys and values of object.
8731
+ * If object contains duplicate values, subsequent values overwrite property assignments of previous values.
8732
+ */
8733
+
8734
+
8735
+ function invert(original) {
8736
+ return Object.entries(original).reduce(function (acc, current) {
8737
+ acc[current[1]] = current[0];
8738
+ return acc;
8739
+ }, {});
8740
+ }
8752
8741
  /**
8753
8742
  * creates an object with some keys excluded
8754
8743
  * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
@@ -8757,7 +8746,6 @@ function getPolarRange(props, axis) {
8757
8746
  * @returns {Object} new object with same properties as originalObject
8758
8747
  */
8759
8748
 
8760
-
8761
8749
  function omit(originalObject) {
8762
8750
  var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
8763
8751
  // code based on babel's _objectWithoutProperties