victory-create-container 36.3.1 → 36.4.1
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/dist/victory-create-container.js +20884 -21216
- package/dist/victory-create-container.min.js +1 -1
- package/es/create-container.js +43 -49
- package/lib/create-container.js +44 -50
- package/lib/index.js +4 -4
- package/package.json +8 -8
package/es/create-container.js
CHANGED
|
@@ -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
|
|
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))
|
|
16
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
17
|
|
|
18
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
44
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
45
|
|
|
38
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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)
|
|
201
|
+
return combineContainerMixins([].concat(_toConsumableArray(firstMixins), _toConsumableArray(secondMixins)), Container);
|
|
208
202
|
};
|
|
209
203
|
};
|
|
210
204
|
|
package/lib/create-container.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
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
|
|
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))
|
|
44
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
45
45
|
|
|
46
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
72
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
65
73
|
|
|
66
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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)
|
|
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, "
|
|
12
|
+
Object.defineProperty(exports, "createContainer", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return _createContainer.
|
|
15
|
+
return _createContainer.createContainer;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "makeCreateContainerFunction", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return _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
|
+
"version": "36.4.1",
|
|
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.
|
|
24
|
-
"victory-core": "^36.
|
|
25
|
-
"victory-cursor-container": "^36.
|
|
26
|
-
"victory-selection-container": "^36.
|
|
27
|
-
"victory-voronoi-container": "^36.
|
|
28
|
-
"victory-zoom-container": "^36.
|
|
23
|
+
"victory-brush-container": "^36.4.1",
|
|
24
|
+
"victory-core": "^36.4.1",
|
|
25
|
+
"victory-cursor-container": "^36.4.1",
|
|
26
|
+
"victory-selection-container": "^36.4.1",
|
|
27
|
+
"victory-voronoi-container": "^36.4.1",
|
|
28
|
+
"victory-zoom-container": "^36.4.1"
|
|
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": "
|
|
37
|
+
"gitHead": "aa44a22e5a93989773a560f765f83ac151f44c46"
|
|
38
38
|
}
|