victory-create-container 36.3.2 → 36.4.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.
@@ -7,35 +7,49 @@ import _forOwn from "lodash/forOwn";
7
7
  import _groupBy from "lodash/groupBy";
8
8
  import _toPairs from "lodash/toPairs";
9
9
 
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
10
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
11
 
12
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
12
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
13
 
14
- function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
14
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
15
15
 
16
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
16
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
17
 
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
18
+ 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; }
19
19
 
20
- 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; }
20
+ 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; }
21
21
 
22
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
23
 
24
24
  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); } }
25
25
 
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
+
28
+ 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); }
29
+
30
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
31
 
28
- function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
32
+ 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); }; }
33
+
34
+ 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); }
29
35
 
30
36
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
37
 
32
- 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, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
38
+ 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; } }
39
+
40
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
41
 
34
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
42
+ 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; }
35
43
 
36
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
44
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
37
45
 
38
- function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
46
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
47
+
48
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
49
+
50
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
51
+
52
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
39
53
 
40
54
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
55
 
@@ -105,7 +119,7 @@ var combineDefaultEvents = function (defaultEvents) {
105
119
  };
106
120
 
107
121
  var combineContainerMixins = function (mixins, Container) {
108
- var _class, _temp;
122
+ var _class;
109
123
 
110
124
  // similar to Object.assign(A, B), this function will decide conflicts in favor mixinB.
111
125
  // this applies to propTypes and defaultProps.
@@ -124,22 +138,22 @@ var combineContainerMixins = function (mixins, Container) {
124
138
  var match = Class.displayName.match(/Victory(.*)Container/);
125
139
  return match[1] || "";
126
140
  }).join("");
127
- return _temp = _class =
128
- /*#__PURE__*/
129
- function (_NaiveCombinedContain) {
141
+ return _class = /*#__PURE__*/function (_NaiveCombinedContain) {
130
142
  _inherits(VictoryCombinedContainer, _NaiveCombinedContain);
131
143
 
144
+ var _super = _createSuper(VictoryCombinedContainer);
145
+
132
146
  function VictoryCombinedContainer() {
133
147
  _classCallCheck(this, VictoryCombinedContainer);
134
148
 
135
- return _possibleConstructorReturn(this, (VictoryCombinedContainer.__proto__ || Object.getPrototypeOf(VictoryCombinedContainer)).apply(this, arguments));
149
+ return _super.apply(this, arguments);
136
150
  }
137
151
 
138
152
  _createClass(VictoryCombinedContainer, [{
139
153
  key: "getChildren",
140
154
  value: function getChildren(props) {
141
155
  return instances.reduce(function (children, instance) {
142
- return instance.getChildren(_objectSpread({}, props, {
156
+ return instance.getChildren(_objectSpread(_objectSpread({}, props), {}, {
143
157
  children: children
144
158
  }));
145
159
  }, props.children);
@@ -147,36 +161,16 @@ var combineContainerMixins = function (mixins, Container) {
147
161
  }]);
148
162
 
149
163
  return VictoryCombinedContainer;
150
- }(NaiveCombinedContainer), Object.defineProperty(_class, "displayName", {
151
- configurable: true,
152
- enumerable: true,
153
- writable: true,
154
- value: "Victory".concat(displayType, "Container")
155
- }), Object.defineProperty(_class, "propTypes", {
156
- configurable: true,
157
- enumerable: true,
158
- writable: true,
159
- value: Classes.reduce(function (propTypes, Class) {
160
- return _objectSpread({}, propTypes, Class.propTypes);
161
- }, {})
162
- }), Object.defineProperty(_class, "defaultProps", {
163
- configurable: true,
164
- enumerable: true,
165
- writable: true,
166
- value: Classes.reduce(function (defaultProps, Class) {
167
- return _objectSpread({}, defaultProps, Class.defaultProps);
168
- }, {})
169
- }), Object.defineProperty(_class, "defaultEvents", {
170
- configurable: true,
171
- enumerable: true,
172
- writable: true,
173
- value: function (props) {
174
- return combineDefaultEvents(Classes.reduce(function (defaultEvents, Class) {
175
- var events = _isFunction(Class.defaultEvents) ? Class.defaultEvents(props) : Class.defaultEvents;
176
- return _toConsumableArray(defaultEvents).concat(_toConsumableArray(events));
177
- }, []));
178
- }
179
- }), _temp;
164
+ }(NaiveCombinedContainer), _defineProperty(_class, "displayName", "Victory".concat(displayType, "Container")), _defineProperty(_class, "propTypes", Classes.reduce(function (propTypes, Class) {
165
+ return _objectSpread(_objectSpread({}, propTypes), Class.propTypes);
166
+ }, {})), _defineProperty(_class, "defaultProps", Classes.reduce(function (defaultProps, Class) {
167
+ return _objectSpread(_objectSpread({}, defaultProps), Class.defaultProps);
168
+ }, {})), _defineProperty(_class, "defaultEvents", function (props) {
169
+ return combineDefaultEvents(Classes.reduce(function (defaultEvents, Class) {
170
+ var events = _isFunction(Class.defaultEvents) ? Class.defaultEvents(props) : Class.defaultEvents;
171
+ return [].concat(_toConsumableArray(defaultEvents), _toConsumableArray(events));
172
+ }, []));
173
+ }), _class;
180
174
  };
181
175
 
182
176
  var checkBehaviorName = function (behavior, behaviors) {
@@ -204,7 +198,7 @@ var makeCreateContainerFunction = function (mixinMap, Container) {
204
198
  return Container;
205
199
  }
206
200
 
207
- return combineContainerMixins(_toConsumableArray(firstMixins).concat(_toConsumableArray(secondMixins)), Container);
201
+ return combineContainerMixins([].concat(_toConsumableArray(firstMixins), _toConsumableArray(secondMixins)), Container);
208
202
  };
209
203
  };
210
204
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.combineContainerMixins = exports.makeCreateContainerFunction = exports.createContainer = void 0;
6
+ exports.makeCreateContainerFunction = exports.createContainer = exports.combineContainerMixins = void 0;
7
7
 
8
8
  var _keys2 = _interopRequireDefault(require("lodash/keys"));
9
9
 
@@ -35,35 +35,49 @@ var _victoryCursorContainer = require("victory-cursor-container");
35
35
 
36
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
37
 
38
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
38
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
39
39
 
40
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
40
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
41
41
 
42
- function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
42
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
43
43
 
44
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
44
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
45
45
 
46
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
46
+ 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; }
47
47
 
48
- 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; }
48
+ 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; }
49
49
 
50
50
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
51
51
 
52
52
  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); } }
53
53
 
54
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
54
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
55
+
56
+ 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); }
57
+
58
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
55
59
 
56
- function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
60
+ 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); }; }
61
+
62
+ 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); }
57
63
 
58
64
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
59
65
 
60
- 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, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
66
+ 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; } }
67
+
68
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
61
69
 
62
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
70
+ 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; }
63
71
 
64
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
72
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
65
73
 
66
- function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
74
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
75
+
76
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
77
+
78
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
79
+
80
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
67
81
 
68
82
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
69
83
 
@@ -123,7 +137,7 @@ var combineDefaultEvents = function (defaultEvents) {
123
137
  };
124
138
 
125
139
  var combineContainerMixins = function (mixins, Container) {
126
- var _class, _temp;
140
+ var _class;
127
141
 
128
142
  // similar to Object.assign(A, B), this function will decide conflicts in favor mixinB.
129
143
  // this applies to propTypes and defaultProps.
@@ -140,22 +154,22 @@ var combineContainerMixins = function (mixins, Container) {
140
154
  var match = Class.displayName.match(/Victory(.*)Container/);
141
155
  return match[1] || "";
142
156
  }).join("");
143
- return _temp = _class =
144
- /*#__PURE__*/
145
- function (_NaiveCombinedContain) {
157
+ return _class = /*#__PURE__*/function (_NaiveCombinedContain) {
146
158
  _inherits(VictoryCombinedContainer, _NaiveCombinedContain);
147
159
 
160
+ var _super = _createSuper(VictoryCombinedContainer);
161
+
148
162
  function VictoryCombinedContainer() {
149
163
  _classCallCheck(this, VictoryCombinedContainer);
150
164
 
151
- return _possibleConstructorReturn(this, (VictoryCombinedContainer.__proto__ || Object.getPrototypeOf(VictoryCombinedContainer)).apply(this, arguments));
165
+ return _super.apply(this, arguments);
152
166
  }
153
167
 
154
168
  _createClass(VictoryCombinedContainer, [{
155
169
  key: "getChildren",
156
170
  value: function getChildren(props) {
157
171
  return instances.reduce(function (children, instance) {
158
- return instance.getChildren(_objectSpread({}, props, {
172
+ return instance.getChildren(_objectSpread(_objectSpread({}, props), {}, {
159
173
  children: children
160
174
  }));
161
175
  }, props.children);
@@ -163,36 +177,16 @@ var combineContainerMixins = function (mixins, Container) {
163
177
  }]);
164
178
 
165
179
  return VictoryCombinedContainer;
166
- }(NaiveCombinedContainer), Object.defineProperty(_class, "displayName", {
167
- configurable: true,
168
- enumerable: true,
169
- writable: true,
170
- value: "Victory".concat(displayType, "Container")
171
- }), Object.defineProperty(_class, "propTypes", {
172
- configurable: true,
173
- enumerable: true,
174
- writable: true,
175
- value: Classes.reduce(function (propTypes, Class) {
176
- return _objectSpread({}, propTypes, Class.propTypes);
177
- }, {})
178
- }), Object.defineProperty(_class, "defaultProps", {
179
- configurable: true,
180
- enumerable: true,
181
- writable: true,
182
- value: Classes.reduce(function (defaultProps, Class) {
183
- return _objectSpread({}, defaultProps, Class.defaultProps);
184
- }, {})
185
- }), Object.defineProperty(_class, "defaultEvents", {
186
- configurable: true,
187
- enumerable: true,
188
- writable: true,
189
- value: function (props) {
190
- return combineDefaultEvents(Classes.reduce(function (defaultEvents, Class) {
191
- var events = (0, _isFunction2.default)(Class.defaultEvents) ? Class.defaultEvents(props) : Class.defaultEvents;
192
- return _toConsumableArray(defaultEvents).concat(_toConsumableArray(events));
193
- }, []));
194
- }
195
- }), _temp;
180
+ }(NaiveCombinedContainer), _defineProperty(_class, "displayName", "Victory".concat(displayType, "Container")), _defineProperty(_class, "propTypes", Classes.reduce(function (propTypes, Class) {
181
+ return _objectSpread(_objectSpread({}, propTypes), Class.propTypes);
182
+ }, {})), _defineProperty(_class, "defaultProps", Classes.reduce(function (defaultProps, Class) {
183
+ return _objectSpread(_objectSpread({}, defaultProps), Class.defaultProps);
184
+ }, {})), _defineProperty(_class, "defaultEvents", function (props) {
185
+ return combineDefaultEvents(Classes.reduce(function (defaultEvents, Class) {
186
+ var events = (0, _isFunction2.default)(Class.defaultEvents) ? Class.defaultEvents(props) : Class.defaultEvents;
187
+ return [].concat(_toConsumableArray(defaultEvents), _toConsumableArray(events));
188
+ }, []));
189
+ }), _class;
196
190
  };
197
191
 
198
192
  exports.combineContainerMixins = combineContainerMixins;
@@ -221,7 +215,7 @@ var makeCreateContainerFunction = function (mixinMap, Container) {
221
215
  return Container;
222
216
  }
223
217
 
224
- return combineContainerMixins(_toConsumableArray(firstMixins).concat(_toConsumableArray(secondMixins)), Container);
218
+ return combineContainerMixins([].concat(_toConsumableArray(firstMixins), _toConsumableArray(secondMixins)), Container);
225
219
  };
226
220
  };
227
221
 
package/lib/index.js CHANGED
@@ -9,16 +9,16 @@ Object.defineProperty(exports, "combineContainerMixins", {
9
9
  return _createContainer.combineContainerMixins;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "makeCreateContainerFunction", {
12
+ Object.defineProperty(exports, "createContainer", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _createContainer.makeCreateContainerFunction;
15
+ return _createContainer.createContainer;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "createContainer", {
18
+ Object.defineProperty(exports, "makeCreateContainerFunction", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _createContainer.createContainer;
21
+ return _createContainer.makeCreateContainerFunction;
22
22
  }
23
23
  });
24
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-create-container",
3
- "version": "36.3.2",
3
+ "version": "36.4.0",
4
4
  "description": "Container Helper for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -20,12 +20,12 @@
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
22
  "lodash": "^4.17.19",
23
- "victory-brush-container": "^36.3.2",
24
- "victory-core": "^36.3.2",
25
- "victory-cursor-container": "^36.3.2",
26
- "victory-selection-container": "^36.3.2",
27
- "victory-voronoi-container": "^36.3.2",
28
- "victory-zoom-container": "^36.3.2"
23
+ "victory-brush-container": "^36.4.0",
24
+ "victory-core": "^36.4.0",
25
+ "victory-cursor-container": "^36.4.0",
26
+ "victory-selection-container": "^36.4.0",
27
+ "victory-voronoi-container": "^36.4.0",
28
+ "victory-zoom-container": "^36.4.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^16.6.0 || ^17.0.0"
@@ -34,5 +34,5 @@
34
34
  "version": "yarn run nps build-libs && nps build-dists"
35
35
  },
36
36
  "sideEffects": false,
37
- "gitHead": "18895d1290245732d14332bbbda10336032c9aab"
37
+ "gitHead": "2e05481eeb34f9801a90023a131a21aa7deff082"
38
38
  }