victory-chart 18.2.0 → 19.1.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/CHANGELOG.md +28 -0
- package/README.md +9 -5
- package/dist/victory-chart.js +17058 -24378
- package/dist/victory-chart.min.js +13 -14
- package/lib/components/containers/brush-helpers.js +7 -4
- package/lib/components/containers/create-container.js +40 -32
- package/lib/components/containers/cursor-helpers.js +48 -0
- package/lib/components/containers/victory-brush-container.js +7 -3
- package/lib/components/containers/victory-cursor-container.js +145 -0
- package/lib/components/containers/victory-selection-container.js +5 -2
- package/lib/components/containers/victory-voronoi-container.js +40 -15
- package/lib/components/containers/victory-zoom-container.js +9 -2
- package/lib/components/containers/zoom-helpers.js +7 -2
- package/lib/components/victory-area/helper-methods.js +2 -1
- package/lib/components/victory-area/victory-area.js +9 -105
- package/lib/components/victory-axis/helper-methods.js +5 -2
- package/lib/components/victory-axis/victory-axis.js +11 -53
- package/lib/components/victory-bar/helper-methods.js +3 -1
- package/lib/components/victory-bar/victory-bar.js +8 -114
- package/lib/components/victory-candlestick/helper-methods.js +2 -1
- package/lib/components/victory-candlestick/victory-candlestick.js +10 -111
- package/lib/components/victory-chart/helper-methods.js +4 -3
- package/lib/components/victory-chart/victory-chart.js +12 -67
- package/lib/components/victory-errorbar/helper-methods.js +1 -1
- package/lib/components/victory-errorbar/victory-errorbar.js +8 -113
- package/lib/components/victory-group/victory-group.js +12 -86
- package/lib/components/victory-line/helper-methods.js +2 -1
- package/lib/components/victory-line/victory-line.js +9 -105
- package/lib/components/victory-scatter/helper-methods.js +1 -1
- package/lib/components/victory-scatter/victory-scatter.js +8 -111
- package/lib/components/victory-stack/victory-stack.js +11 -59
- package/lib/components/victory-voronoi/helper-methods.js +1 -1
- package/lib/components/victory-voronoi/victory-voronoi.js +7 -112
- package/lib/helpers/common-props.js +87 -0
- package/lib/helpers/wrapper.js +2 -1
- package/lib/index.js +9 -7
- package/package.json +14 -14
- package/src/components/containers/brush-helpers.js +37 -34
- package/src/components/containers/create-container.js +52 -43
- package/src/components/containers/cursor-helpers.js +49 -0
- package/src/components/containers/selection-helpers.js +13 -13
- package/src/components/containers/victory-brush-container.js +33 -29
- package/src/components/containers/victory-cursor-container.js +145 -0
- package/src/components/containers/victory-selection-container.js +14 -11
- package/src/components/containers/victory-voronoi-container.js +50 -25
- package/src/components/containers/victory-zoom-container.js +17 -10
- package/src/components/containers/voronoi-helpers.js +9 -9
- package/src/components/containers/zoom-helpers.js +18 -13
- package/src/components/victory-area/helper-methods.js +7 -6
- package/src/components/victory-area/victory-area.js +14 -110
- package/src/components/victory-axis/helper-methods.js +22 -19
- package/src/components/victory-axis/victory-axis.js +15 -57
- package/src/components/victory-bar/helper-methods.js +7 -5
- package/src/components/victory-bar/victory-bar.js +14 -120
- package/src/components/victory-candlestick/helper-methods.js +10 -9
- package/src/components/victory-candlestick/victory-candlestick.js +20 -121
- package/src/components/victory-chart/helper-methods.js +7 -6
- package/src/components/victory-chart/victory-chart.js +24 -79
- package/src/components/victory-errorbar/helper-methods.js +7 -7
- package/src/components/victory-errorbar/victory-errorbar.js +15 -120
- package/src/components/victory-group/victory-group.js +26 -100
- package/src/components/victory-line/helper-methods.js +5 -4
- package/src/components/victory-line/victory-line.js +16 -112
- package/src/components/victory-scatter/helper-methods.js +8 -8
- package/src/components/victory-scatter/victory-scatter.js +11 -114
- package/src/components/victory-stack/victory-stack.js +21 -69
- package/src/components/victory-voronoi/helper-methods.js +3 -3
- package/src/components/victory-voronoi/victory-voronoi.js +10 -115
- package/src/helpers/axis.js +6 -6
- package/src/helpers/common-props.js +89 -0
- package/src/helpers/wrapper.js +10 -9
- package/src/index.js +7 -5
- package/lib/components/victory-voronoi-tooltip/helper-methods.js +0 -100
- package/lib/components/victory-voronoi-tooltip/victory-voronoi-tooltip.js +0 -180
- package/lib/components/victory-zoom/helper-methods.js +0 -48
- package/lib/components/victory-zoom/victory-zoom.js +0 -221
- package/src/components/victory-voronoi-tooltip/helper-methods.js +0 -101
- package/src/components/victory-voronoi-tooltip/victory-voronoi-tooltip.js +0 -180
- package/src/components/victory-zoom/helper-methods.js +0 -49
- package/src/components/victory-zoom/victory-zoom.js +0 -221
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});var _propTypes=require("prop-types");var _propTypes2=_interopRequireDefault(_propTypes);
|
|
2
|
+
var _victoryCore=require("victory-core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default=
|
|
3
|
+
|
|
4
|
+
{
|
|
5
|
+
DataProps:{
|
|
6
|
+
categories:_propTypes2.default.oneOfType([
|
|
7
|
+
_propTypes2.default.arrayOf(_propTypes2.default.string),
|
|
8
|
+
_propTypes2.default.shape({
|
|
9
|
+
x:_propTypes2.default.arrayOf(_propTypes2.default.string),y:_propTypes2.default.arrayOf(_propTypes2.default.string)})]),
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
data:_propTypes2.default.array,
|
|
13
|
+
dataComponent:_propTypes2.default.element,
|
|
14
|
+
labelComponent:_propTypes2.default.element,
|
|
15
|
+
labels:_propTypes2.default.oneOfType([_propTypes2.default.func,_propTypes2.default.array]),
|
|
16
|
+
samples:_victoryCore.PropTypes.nonNegative,
|
|
17
|
+
sortKey:_propTypes2.default.oneOfType([
|
|
18
|
+
_propTypes2.default.func,
|
|
19
|
+
_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),
|
|
20
|
+
_propTypes2.default.string,
|
|
21
|
+
_propTypes2.default.arrayOf(_propTypes2.default.string)]),
|
|
22
|
+
|
|
23
|
+
style:_propTypes2.default.shape({
|
|
24
|
+
parent:_propTypes2.default.object,data:_propTypes2.default.object,labels:_propTypes2.default.object}),
|
|
25
|
+
|
|
26
|
+
x:_propTypes2.default.oneOfType([
|
|
27
|
+
_propTypes2.default.func,
|
|
28
|
+
_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),
|
|
29
|
+
_propTypes2.default.string,
|
|
30
|
+
_propTypes2.default.arrayOf(_propTypes2.default.string)]),
|
|
31
|
+
|
|
32
|
+
y:_propTypes2.default.oneOfType([
|
|
33
|
+
_propTypes2.default.func,
|
|
34
|
+
_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),
|
|
35
|
+
_propTypes2.default.string,
|
|
36
|
+
_propTypes2.default.arrayOf(_propTypes2.default.string)])},
|
|
37
|
+
|
|
38
|
+
BaseProps:{
|
|
39
|
+
animate:_propTypes2.default.object,
|
|
40
|
+
containerComponent:_propTypes2.default.element,
|
|
41
|
+
domain:_propTypes2.default.oneOfType([
|
|
42
|
+
_victoryCore.PropTypes.domain,
|
|
43
|
+
_propTypes2.default.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),
|
|
44
|
+
|
|
45
|
+
domainPadding:_propTypes2.default.oneOfType([
|
|
46
|
+
_propTypes2.default.shape({
|
|
47
|
+
x:_propTypes2.default.oneOfType([_propTypes2.default.number,_propTypes2.default.arrayOf(_propTypes2.default.number)]),
|
|
48
|
+
y:_propTypes2.default.oneOfType([_propTypes2.default.number,_propTypes2.default.arrayOf(_propTypes2.default.number)])}),
|
|
49
|
+
|
|
50
|
+
_propTypes2.default.number,
|
|
51
|
+
_propTypes2.default.arrayOf(_propTypes2.default.number)]),
|
|
52
|
+
|
|
53
|
+
eventKey:_propTypes2.default.oneOfType([
|
|
54
|
+
_propTypes2.default.func,
|
|
55
|
+
_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),
|
|
56
|
+
_propTypes2.default.string]),
|
|
57
|
+
|
|
58
|
+
events:_propTypes2.default.arrayOf(_propTypes2.default.shape({
|
|
59
|
+
target:_propTypes2.default.oneOf(["data","labels","parent"]),
|
|
60
|
+
eventKey:_propTypes2.default.oneOfType([
|
|
61
|
+
_propTypes2.default.array,
|
|
62
|
+
_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),
|
|
63
|
+
_propTypes2.default.string]),
|
|
64
|
+
|
|
65
|
+
eventHandlers:_propTypes2.default.object})),
|
|
66
|
+
|
|
67
|
+
groupComponent:_propTypes2.default.element,
|
|
68
|
+
height:_victoryCore.PropTypes.nonNegative,
|
|
69
|
+
name:_propTypes2.default.string,
|
|
70
|
+
padding:_propTypes2.default.oneOfType([
|
|
71
|
+
_propTypes2.default.number,
|
|
72
|
+
_propTypes2.default.shape({
|
|
73
|
+
top:_propTypes2.default.number,bottom:_propTypes2.default.number,
|
|
74
|
+
left:_propTypes2.default.number,right:_propTypes2.default.number})]),
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
scale:_propTypes2.default.oneOfType([
|
|
78
|
+
_victoryCore.PropTypes.scale,
|
|
79
|
+
_propTypes2.default.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),
|
|
80
|
+
|
|
81
|
+
sharedEvents:_propTypes2.default.shape({
|
|
82
|
+
events:_propTypes2.default.array,
|
|
83
|
+
getEventState:_propTypes2.default.func}),
|
|
84
|
+
|
|
85
|
+
standalone:_propTypes2.default.bool,
|
|
86
|
+
theme:_propTypes2.default.object,
|
|
87
|
+
width:_victoryCore.PropTypes.nonNegative}};
|
package/lib/helpers/wrapper.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports,"__esModule",{value:true});var _some2=require("lodash/some");var _some3=_interopRequireDefault(_some2);var _uniq2=require("lodash/uniq");var _uniq3=_interopRequireDefault(_uniq2);var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _isFunction2=require("lodash/isFunction");var _isFunction3=_interopRequireDefault(_isFunction2);var _flatten2=require("lodash/flatten");var _flatten3=_interopRequireDefault(_flatten2);var _defaults2=require("lodash/defaults");var _defaults3=_interopRequireDefault(_defaults2);var _assign2=require("lodash/assign");var _assign3=_interopRequireDefault(_assign2);
|
|
2
|
+
|
|
2
3
|
var _react=require("react");var _react2=_interopRequireDefault(_react);
|
|
3
4
|
var _axis=require("./axis");var _axis2=_interopRequireDefault(_axis);
|
|
4
5
|
var _victoryCore=require("victory-core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}exports.default=
|
|
@@ -89,7 +90,7 @@ continuous:continuous});
|
|
|
89
90
|
},
|
|
90
91
|
|
|
91
92
|
getAllEvents:function getAllEvents(props){
|
|
92
|
-
var components=["groupComponent","containerComponent"];
|
|
93
|
+
var components=["groupComponent","containerComponent","labelComponent"];
|
|
93
94
|
this.componentEvents=_victoryCore.Events.getComponentEvents(props,components);
|
|
94
95
|
if(Array.isArray(this.componentEvents)){var _componentEvents;
|
|
95
96
|
return Array.isArray(props.events)?
|
package/lib/index.js
CHANGED
|
@@ -7,11 +7,8 @@ default;}});var _victoryGroup=require("./components/victory-group/victory-group"
|
|
|
7
7
|
default;}});var _victoryStack=require("./components/victory-stack/victory-stack");Object.defineProperty(exports,"VictoryStack",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryStack).
|
|
8
8
|
default;}});var _victoryErrorbar=require("./components/victory-errorbar/victory-errorbar");Object.defineProperty(exports,"VictoryErrorBar",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryErrorbar).
|
|
9
9
|
default;}});var _victoryVoronoi=require("./components/victory-voronoi/victory-voronoi");Object.defineProperty(exports,"VictoryVoronoi",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryVoronoi).
|
|
10
|
-
default;}});var _victoryVoronoiTooltip=require("./components/victory-voronoi-tooltip/victory-voronoi-tooltip");Object.defineProperty(exports,"VictoryVoronoiTooltip",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryVoronoiTooltip).
|
|
11
|
-
|
|
12
10
|
default;}});var _victoryCandlestick=require("./components/victory-candlestick/victory-candlestick");Object.defineProperty(exports,"VictoryCandlestick",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryCandlestick).
|
|
13
11
|
|
|
14
|
-
|
|
15
12
|
default;}});var _victorySelectionContainer=require("./components/containers/victory-selection-container");Object.defineProperty(exports,"selectionContainerMixin",{enumerable:true,get:function get(){return _victorySelectionContainer.
|
|
16
13
|
|
|
17
14
|
|
|
@@ -24,6 +21,10 @@ default;}});var _victoryVoronoiContainer=require("./components/containers/victor
|
|
|
24
21
|
|
|
25
22
|
|
|
26
23
|
voronoiContainerMixin;}});Object.defineProperty(exports,"VictoryVoronoiContainer",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryVoronoiContainer).
|
|
24
|
+
default;}});var _victoryCursorContainer=require("./components/containers/victory-cursor-container");Object.defineProperty(exports,"cursorContainerMixin",{enumerable:true,get:function get(){return _victoryCursorContainer.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
cursorContainerMixin;}});Object.defineProperty(exports,"VictoryCursorContainer",{enumerable:true,get:function get(){return _interopRequireDefault(_victoryCursorContainer).
|
|
27
28
|
default;}});var _victoryZoomContainer=require("./components/containers/victory-zoom-container");Object.defineProperty(exports,"zoomContainerMixin",{enumerable:true,get:function get(){return _victoryZoomContainer.
|
|
28
29
|
|
|
29
30
|
|
|
@@ -31,11 +32,12 @@ zoomContainerMixin;}});Object.defineProperty(exports,"VictoryZoomContainer",{enu
|
|
|
31
32
|
default;}});var _createContainer=require("./components/containers/create-container");Object.defineProperty(exports,"combineContainerMixins",{enumerable:true,get:function get(){return _createContainer.
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
combineContainerMixins;}});Object.defineProperty(exports,"
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
combineContainerMixins;}});Object.defineProperty(exports,"makeCreateContainerFunction",{enumerable:true,get:function get(){return _createContainer.
|
|
36
|
+
makeCreateContainerFunction;}});Object.defineProperty(exports,"createContainer",{enumerable:true,get:function get(){return _interopRequireDefault(_createContainer).
|
|
37
37
|
default;}});var _brushHelpers=require("./components/containers/brush-helpers");Object.defineProperty(exports,"BrushHelpers",{enumerable:true,get:function get(){return _interopRequireDefault(_brushHelpers).
|
|
38
|
+
|
|
39
|
+
default;}});var _cursorHelpers=require("./components/containers/cursor-helpers");Object.defineProperty(exports,"CursorHelpers",{enumerable:true,get:function get(){return _interopRequireDefault(_cursorHelpers).
|
|
38
40
|
default;}});var _selectionHelpers=require("./components/containers/selection-helpers");Object.defineProperty(exports,"SelectionHelpers",{enumerable:true,get:function get(){return _interopRequireDefault(_selectionHelpers).
|
|
39
41
|
default;}});var _voronoiHelpers=require("./components/containers/voronoi-helpers");Object.defineProperty(exports,"VoronoiHelpers",{enumerable:true,get:function get(){return _interopRequireDefault(_voronoiHelpers).
|
|
40
42
|
default;}});var _zoomHelpers=require("./components/containers/zoom-helpers");Object.defineProperty(exports,"ZoomHelpers",{enumerable:true,get:function get(){return _interopRequireDefault(_zoomHelpers).
|
|
41
|
-
default;}});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
|
|
43
|
+
default;}});Object.defineProperty(exports,"RawZoomHelpers",{enumerable:true,get:function get(){return _zoomHelpers.RawZoomHelpers;}});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-chart",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.1.1",
|
|
4
4
|
"description": "Chart Component for Victory",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -28,24 +28,24 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"d3-voronoi": "^1.1.2",
|
|
31
|
-
"lodash": "^4.
|
|
32
|
-
"victory-core": "^
|
|
31
|
+
"lodash": "^4.17.4",
|
|
32
|
+
"victory-core": "^15.1.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"builder-victory-component-dev": "^
|
|
36
|
-
"chai": "^3.
|
|
35
|
+
"builder-victory-component-dev": "^4.0.0",
|
|
36
|
+
"chai": "^3.5.0",
|
|
37
37
|
"d3-scale": "^1.0.0",
|
|
38
38
|
"d3-shape": "^1.0.0",
|
|
39
|
-
"enzyme": "^2.
|
|
40
|
-
"mocha": "^
|
|
41
|
-
"
|
|
42
|
-
"react
|
|
43
|
-
"react-
|
|
44
|
-
"react-
|
|
45
|
-
"sinon": "^1.17.
|
|
39
|
+
"enzyme": "^2.4.1",
|
|
40
|
+
"mocha": "^3.0.2",
|
|
41
|
+
"prop-types": "^15.5.8",
|
|
42
|
+
"react": "^15.5.4",
|
|
43
|
+
"react-addons-test-utils": "^15.5.1",
|
|
44
|
+
"react-dom": "^15.5.4",
|
|
45
|
+
"sinon": "^1.17.5",
|
|
46
46
|
"sinon-chai": "^2.8.0",
|
|
47
|
-
"builder": "^3.1
|
|
48
|
-
"builder-victory-component": "^
|
|
47
|
+
"builder": "^3.2.1",
|
|
48
|
+
"builder-victory-component": "^4.0.0"
|
|
49
49
|
},
|
|
50
50
|
"publishr": {
|
|
51
51
|
"dependencies": [
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/*eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2] }]*/
|
|
2
|
+
import { Selection } from "victory-core";
|
|
2
3
|
import { assign, throttle, isFunction, isEqual, defaults } from "lodash";
|
|
3
4
|
import { attachId } from "../../helpers/event-handlers.js";
|
|
4
5
|
|
|
5
6
|
const Helpers = {
|
|
6
7
|
withinBounds(point, bounds, padding) {
|
|
7
|
-
const {x1, x2, y1, y2} = bounds;
|
|
8
|
-
const {x, y} = point;
|
|
8
|
+
const { x1, x2, y1, y2 } = bounds;
|
|
9
|
+
const { x, y } = point;
|
|
9
10
|
padding = padding ? padding / 2 : 0;
|
|
10
11
|
return x + padding >= Math.min(x1, x2) &&
|
|
11
12
|
x - padding <= Math.max(x1, x2) &&
|
|
@@ -29,17 +30,17 @@ const Helpers = {
|
|
|
29
30
|
},
|
|
30
31
|
|
|
31
32
|
getHandles(props, domainBox) {
|
|
32
|
-
const {x1, x2, y1, y2} = domainBox;
|
|
33
|
+
const { x1, x2, y1, y2 } = domainBox;
|
|
33
34
|
const minX = Math.min(x1, x2);
|
|
34
35
|
const maxX = Math.max(x1, x2);
|
|
35
36
|
const minY = Math.min(y1, y2);
|
|
36
37
|
const maxY = Math.max(y1, y2);
|
|
37
38
|
const handleWidth = props.handleWidth / 2;
|
|
38
39
|
return {
|
|
39
|
-
left: {x1: minX - handleWidth, x2: minX + handleWidth, y1, y2},
|
|
40
|
-
right: {x1: maxX - handleWidth, x2: maxX + handleWidth, y1, y2},
|
|
41
|
-
top: {x1, x2, y1: minY + handleWidth, y2: minY - handleWidth},
|
|
42
|
-
bottom: {x1, x2, y1: maxY + handleWidth, y2: maxY - handleWidth}
|
|
40
|
+
left: { x1: minX - handleWidth, x2: minX + handleWidth, y1, y2 },
|
|
41
|
+
right: { x1: maxX - handleWidth, x2: maxX + handleWidth, y1, y2 },
|
|
42
|
+
top: { x1, x2, y1: minY + handleWidth, y2: minY - handleWidth },
|
|
43
|
+
bottom: { x1, x2, y1: maxY + handleWidth, y2: maxY - handleWidth }
|
|
43
44
|
};
|
|
44
45
|
},
|
|
45
46
|
|
|
@@ -53,12 +54,12 @@ const Helpers = {
|
|
|
53
54
|
},
|
|
54
55
|
|
|
55
56
|
getResizeMutation(box, handles) {
|
|
56
|
-
const {x1, y1, x2, y2} = box;
|
|
57
|
+
const { x1, y1, x2, y2 } = box;
|
|
57
58
|
const mutations = {
|
|
58
|
-
left: {x1: Math.max(x1, x2), x2: Math.min(x1, x2), y1, y2},
|
|
59
|
-
right: {x1: Math.min(x1, x2), x2: Math.max(x1, x2), y1, y2},
|
|
60
|
-
top: {y1: Math.max(y1, y2), y2: Math.min(y1, y2), x1, x2},
|
|
61
|
-
bottom: {y1: Math.min(y1, y2), y2: Math.max(y1, y2), x1, x2}
|
|
59
|
+
left: { x1: Math.max(x1, x2), x2: Math.min(x1, x2), y1, y2 },
|
|
60
|
+
right: { x1: Math.min(x1, x2), x2: Math.max(x1, x2), y1, y2 },
|
|
61
|
+
top: { y1: Math.max(y1, y2), y2: Math.min(y1, y2), x1, x2 },
|
|
62
|
+
bottom: { y1: Math.min(y1, y2), y2: Math.max(y1, y2), x1, x2 }
|
|
62
63
|
};
|
|
63
64
|
return handles.reduce((memo, current) => {
|
|
64
65
|
return assign(memo, mutations[current]);
|
|
@@ -66,12 +67,12 @@ const Helpers = {
|
|
|
66
67
|
},
|
|
67
68
|
|
|
68
69
|
getMinimumDomain() {
|
|
69
|
-
return {x: [0, 1 / Number.MAX_SAFE_INTEGER], y: [0, 1 / Number.MAX_SAFE_INTEGER]};
|
|
70
|
+
return { x: [0, 1 / Number.MAX_SAFE_INTEGER], y: [0, 1 / Number.MAX_SAFE_INTEGER] };
|
|
70
71
|
},
|
|
71
72
|
|
|
72
73
|
getSelectionMutation(point, box, dimension) {
|
|
73
|
-
const {x, y} = point;
|
|
74
|
-
const {x1, x2, y1, y2} = box;
|
|
74
|
+
const { x, y } = point;
|
|
75
|
+
const { x1, x2, y1, y2 } = box;
|
|
75
76
|
return {
|
|
76
77
|
x1: dimension !== "y" ? x : x1,
|
|
77
78
|
y1: dimension !== "x" ? y : y1,
|
|
@@ -81,13 +82,13 @@ const Helpers = {
|
|
|
81
82
|
},
|
|
82
83
|
|
|
83
84
|
panBox(props, point) {
|
|
84
|
-
const {dimension, domain, startX, startY} = props;
|
|
85
|
+
const { dimension, domain, startX, startY } = props;
|
|
85
86
|
const selectedDomain = defaults({}, props.selectedDomain, domain);
|
|
86
87
|
const fullDomain = defaults({}, props.fullDomain, domain);
|
|
87
|
-
const {x1, x2, y1, y2} = props.x1 ?
|
|
88
|
+
const { x1, x2, y1, y2 } = props.x1 ?
|
|
88
89
|
props : this.getDomainBox(props, fullDomain, selectedDomain);
|
|
89
90
|
|
|
90
|
-
const {x, y} = point;
|
|
91
|
+
const { x, y } = point;
|
|
91
92
|
const delta = {
|
|
92
93
|
x: startX ? startX - x : 0,
|
|
93
94
|
y: startY ? startY - y : 0
|
|
@@ -101,7 +102,7 @@ const Helpers = {
|
|
|
101
102
|
},
|
|
102
103
|
|
|
103
104
|
constrainBox(box, fullDomainBox) {
|
|
104
|
-
const {x1, y1, x2, y2} = fullDomainBox;
|
|
105
|
+
const { x1, y1, x2, y2 } = fullDomainBox;
|
|
105
106
|
return {
|
|
106
107
|
x1: box.x2 > x2 ? x2 - Math.abs(box.x2 - box.x1) : Math.max(box.x1, x1),
|
|
107
108
|
y1: box.y2 > y2 ? y2 - Math.abs(box.y2 - box.y1) : Math.max(box.y1, y1),
|
|
@@ -120,13 +121,13 @@ const Helpers = {
|
|
|
120
121
|
this.getDomainBox(targetProps, domain);
|
|
121
122
|
const currentDomain = isEqual(selectedDomain, cachedSelectedDomain) ?
|
|
122
123
|
targetProps.currentDomain || selectedDomain || domain : selectedDomain || domain;
|
|
123
|
-
const {x, y} = Selection.getSVGEventCoordinates(evt);
|
|
124
|
+
const { x, y } = Selection.getSVGEventCoordinates(evt);
|
|
124
125
|
// Ignore events that occur outside of the maximum domain region
|
|
125
|
-
if (!this.withinBounds({x, y}, fullDomainBox, handleWidth)) {
|
|
126
|
+
if (!this.withinBounds({ x, y }, fullDomainBox, handleWidth)) {
|
|
126
127
|
return {};
|
|
127
128
|
}
|
|
128
129
|
const domainBox = this.getDomainBox(targetProps, domain, currentDomain);
|
|
129
|
-
const activeHandles = this.getActiveHandles({x, y}, targetProps, domainBox);
|
|
130
|
+
const activeHandles = this.getActiveHandles({ x, y }, targetProps, domainBox);
|
|
130
131
|
// If the event occurs in any of the handle regions, start a resize
|
|
131
132
|
if (activeHandles) {
|
|
132
133
|
return [{
|
|
@@ -140,7 +141,7 @@ const Helpers = {
|
|
|
140
141
|
}
|
|
141
142
|
}];
|
|
142
143
|
} else if (
|
|
143
|
-
this.withinBounds({x, y}, domainBox) &&
|
|
144
|
+
this.withinBounds({ x, y }, domainBox) &&
|
|
144
145
|
!isEqual(domain, currentDomain)
|
|
145
146
|
) {
|
|
146
147
|
// if the event occurs within a selected region start a panning event, unless the whole
|
|
@@ -166,7 +167,7 @@ const Helpers = {
|
|
|
166
167
|
isSelecting: true, domainBox, fullDomainBox,
|
|
167
168
|
cachedSelectedDomain: selectedDomain,
|
|
168
169
|
currentDomain: this.getMinimumDomain(),
|
|
169
|
-
...this.getSelectionMutation({x, y}, domainBox, dimension)
|
|
170
|
+
...this.getSelectionMutation({ x, y }, domainBox, dimension)
|
|
170
171
|
};
|
|
171
172
|
}
|
|
172
173
|
}];
|
|
@@ -181,16 +182,16 @@ const Helpers = {
|
|
|
181
182
|
const {
|
|
182
183
|
dimension, scale, isPanning, isSelecting, fullDomainBox, onDomainChange
|
|
183
184
|
} = targetProps;
|
|
184
|
-
const {x, y} = Selection.getSVGEventCoordinates(evt);
|
|
185
|
+
const { x, y } = Selection.getSVGEventCoordinates(evt);
|
|
185
186
|
// Ignore events that occur outside of the maximum domain region
|
|
186
|
-
if (!this.withinBounds({x, y}, fullDomainBox)) {
|
|
187
|
+
if (!this.withinBounds({ x, y }, fullDomainBox)) {
|
|
187
188
|
return {};
|
|
188
189
|
}
|
|
189
190
|
if (isPanning) {
|
|
190
|
-
const {startX, startY} = targetProps;
|
|
191
|
-
const pannedBox = this.panBox(targetProps, {x, y});
|
|
191
|
+
const { startX, startY } = targetProps;
|
|
192
|
+
const pannedBox = this.panBox(targetProps, { x, y });
|
|
192
193
|
const constrainedBox = this.constrainBox(pannedBox, fullDomainBox);
|
|
193
|
-
const currentDomain = Selection.getBounds({...constrainedBox, scale});
|
|
194
|
+
const currentDomain = Selection.getBounds({ ...constrainedBox, scale });
|
|
194
195
|
if (isFunction(onDomainChange)) {
|
|
195
196
|
onDomainChange(currentDomain);
|
|
196
197
|
}
|
|
@@ -211,7 +212,7 @@ const Helpers = {
|
|
|
211
212
|
const x2 = dimension !== "y" ? x : targetProps.x2;
|
|
212
213
|
const y2 = dimension !== "x" ? y : targetProps.y2;
|
|
213
214
|
const currentDomain =
|
|
214
|
-
Selection.getBounds({x2, y2, x1: targetProps.x1, y1: targetProps.y1, scale});
|
|
215
|
+
Selection.getBounds({ x2, y2, x1: targetProps.x1, y1: targetProps.y1, scale });
|
|
215
216
|
if (isFunction(onDomainChange)) {
|
|
216
217
|
onDomainChange(currentDomain);
|
|
217
218
|
}
|
|
@@ -224,10 +225,11 @@ const Helpers = {
|
|
|
224
225
|
}
|
|
225
226
|
}];
|
|
226
227
|
}
|
|
228
|
+
return {};
|
|
227
229
|
},
|
|
228
230
|
|
|
229
231
|
onMouseUp(evt, targetProps) {
|
|
230
|
-
const {x1, y1, x2, y2, onDomainChange, domain} = targetProps;
|
|
232
|
+
const { x1, y1, x2, y2, onDomainChange, domain } = targetProps;
|
|
231
233
|
// if the mouse hasn't moved since a mouseDown event, select the whole domain region
|
|
232
234
|
if (x1 === x2 || y1 === y2) {
|
|
233
235
|
if (isFunction(onDomainChange)) {
|
|
@@ -257,12 +259,13 @@ const Helpers = {
|
|
|
257
259
|
};
|
|
258
260
|
|
|
259
261
|
export default {
|
|
262
|
+
...Helpers,
|
|
260
263
|
onMouseDown: Helpers.onMouseDown.bind(Helpers),
|
|
261
264
|
onMouseUp: Helpers.onMouseUp.bind(Helpers),
|
|
262
265
|
onMouseLeave: Helpers.onMouseLeave.bind(Helpers),
|
|
263
266
|
onMouseMove: throttle(
|
|
264
267
|
attachId(Helpers.onMouseMove.bind(Helpers)),
|
|
265
|
-
16,
|
|
266
|
-
{leading: true, trailing: false}
|
|
268
|
+
16, // eslint-disable-line no-magic-numbers
|
|
269
|
+
{ leading: true, trailing: false }
|
|
267
270
|
)
|
|
268
271
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { toPairs, groupBy, forOwn, includes } from "lodash";
|
|
1
|
+
import { toPairs, groupBy, forOwn, includes, flow } from "lodash";
|
|
2
2
|
import { VictoryContainer, Log } from "victory-core";
|
|
3
3
|
|
|
4
4
|
import { voronoiContainerMixin } from "./victory-voronoi-container";
|
|
5
5
|
import { zoomContainerMixin } from "./victory-zoom-container";
|
|
6
6
|
import { selectionContainerMixin } from "./victory-selection-container";
|
|
7
7
|
import { brushContainerMixin } from "./victory-brush-container";
|
|
8
|
+
import { cursorContainerMixin } from "./victory-cursor-container";
|
|
8
9
|
|
|
9
10
|
const ensureArray = (thing) => {
|
|
10
11
|
if (!thing) {
|
|
@@ -53,36 +54,48 @@ const combineDefaultEvents = (defaultEvents) => {
|
|
|
53
54
|
);
|
|
54
55
|
};
|
|
55
56
|
|
|
56
|
-
export const combineContainerMixins = (
|
|
57
|
+
export const combineContainerMixins = (mixins, Container) => {
|
|
57
58
|
// similar to Object.assign(A, B), this function will decide conflicts in favor mixinB.
|
|
58
59
|
// this applies to propTypes and defaultProps.
|
|
59
60
|
// getChildren will call A's getChildren() and pass the resulting children to B's.
|
|
60
61
|
// defaultEvents attempts to resolve any conflicts between A and B's defaultEvents.
|
|
61
62
|
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const instanceB = new ClassB();
|
|
63
|
+
const Classes = mixins.map((mixin) => mixin(Container));
|
|
64
|
+
const instances = Classes.map((Class) => new Class());
|
|
65
|
+
const NaiveCombinedContainer = flow(mixins)(Container);
|
|
66
66
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
static propTypes = {
|
|
72
|
-
...ClassA.propTypes,
|
|
73
|
-
...ClassB.propTypes
|
|
74
|
-
};
|
|
67
|
+
const displayType = Classes.map((Class) => {
|
|
68
|
+
const match = Class.displayName.match(/Victory(.*)Container/);
|
|
69
|
+
return match[1] || "";
|
|
70
|
+
}).join("");
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
return class VictoryCombinedContainer extends NaiveCombinedContainer {
|
|
73
|
+
static displayName = `Victory${displayType}Container`;
|
|
74
|
+
|
|
75
|
+
static propTypes =
|
|
76
|
+
Classes.reduce(
|
|
77
|
+
(propTypes, Class) => ({ ...propTypes, ...Class.propTypes }),
|
|
78
|
+
{}
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
static defaultProps =
|
|
82
|
+
Classes.reduce(
|
|
83
|
+
(defaultProps, Class) => ({ ...defaultProps, ...Class.defaultProps }),
|
|
84
|
+
{}
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
static defaultEvents = combineDefaultEvents(
|
|
88
|
+
Classes.reduce(
|
|
89
|
+
(defaultEvents, Class) => ([...defaultEvents, ...Class.defaultEvents]),
|
|
90
|
+
[]
|
|
91
|
+
)
|
|
92
|
+
);
|
|
82
93
|
|
|
83
94
|
getChildren(props) {
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
return instances.reduce(
|
|
96
|
+
(children, instance) => instance.getChildren({ ...props, children }),
|
|
97
|
+
props.children
|
|
98
|
+
);
|
|
86
99
|
}
|
|
87
100
|
};
|
|
88
101
|
};
|
|
@@ -95,34 +108,30 @@ const checkBehaviorName = (behavior, behaviors) => {
|
|
|
95
108
|
}
|
|
96
109
|
};
|
|
97
110
|
|
|
98
|
-
export const
|
|
99
|
-
const
|
|
100
|
-
voronoi: voronoiContainerMixin,
|
|
101
|
-
zoom: zoomContainerMixin,
|
|
102
|
-
selection: selectionContainerMixin,
|
|
103
|
-
brush: brushContainerMixin
|
|
104
|
-
};
|
|
105
|
-
const behaviors = Object.keys(containerMixins);
|
|
111
|
+
export const makeCreateContainerFunction = (mixinMap, Container) => (behaviorA, behaviorB, ...invalid) => { // eslint-disable-line
|
|
112
|
+
const behaviors = Object.keys(mixinMap);
|
|
106
113
|
|
|
107
|
-
checkBehaviorName(
|
|
108
|
-
checkBehaviorName(
|
|
114
|
+
checkBehaviorName(behaviorA, behaviors);
|
|
115
|
+
checkBehaviorName(behaviorB, behaviors);
|
|
109
116
|
|
|
110
|
-
if (
|
|
117
|
+
if (invalid.length) {
|
|
111
118
|
Log.warn("too many arguments given to createContainer (maximum accepted: 2).");
|
|
112
119
|
}
|
|
113
120
|
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
if (!firstMixin) {
|
|
118
|
-
return VictoryContainer;
|
|
119
|
-
}
|
|
121
|
+
const firstMixins = mixinMap[behaviorA];
|
|
122
|
+
const secondMixins = mixinMap[behaviorB] || [];
|
|
120
123
|
|
|
121
|
-
if (!
|
|
122
|
-
return
|
|
124
|
+
if (!firstMixins) {
|
|
125
|
+
return Container;
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
return combineContainerMixins(
|
|
128
|
+
return combineContainerMixins([...firstMixins, ...secondMixins], Container);
|
|
126
129
|
};
|
|
127
130
|
|
|
128
|
-
export default
|
|
131
|
+
export default makeCreateContainerFunction({
|
|
132
|
+
zoom: [zoomContainerMixin],
|
|
133
|
+
voronoi: [voronoiContainerMixin],
|
|
134
|
+
selection: [selectionContainerMixin],
|
|
135
|
+
cursor: [cursorContainerMixin],
|
|
136
|
+
brush: [brushContainerMixin]
|
|
137
|
+
}, VictoryContainer);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Selection } from "victory-core";
|
|
2
|
+
import { throttle, isFunction } from "lodash";
|
|
3
|
+
import { attachId } from "../../helpers/event-handlers";
|
|
4
|
+
import BrushHelpers from "./brush-helpers";
|
|
5
|
+
|
|
6
|
+
const CursorHelpers = {
|
|
7
|
+
onMouseMove(evt, targetProps) {
|
|
8
|
+
const { onChange, dimension, domain } = targetProps;
|
|
9
|
+
const cursorSVGPosition = Selection.getSVGEventCoordinates(evt);
|
|
10
|
+
let cursorValue = Selection.getDataCoordinates(
|
|
11
|
+
targetProps.scale,
|
|
12
|
+
cursorSVGPosition.x,
|
|
13
|
+
cursorSVGPosition.y
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const inBounds = BrushHelpers.withinBounds(cursorValue, {
|
|
17
|
+
x1: domain.x[0],
|
|
18
|
+
x2: domain.x[1],
|
|
19
|
+
y1: domain.y[0],
|
|
20
|
+
y2: domain.y[1]
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (!inBounds) {
|
|
24
|
+
cursorValue = null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (isFunction(onChange)) {
|
|
28
|
+
if (inBounds) {
|
|
29
|
+
const value = dimension ? cursorValue[dimension] : cursorValue;
|
|
30
|
+
onChange(value);
|
|
31
|
+
} else if (cursorValue !== targetProps.cursorValue) {
|
|
32
|
+
onChange(targetProps.defaultCursorValue || null);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return [{
|
|
37
|
+
target: "parent",
|
|
38
|
+
eventKey: "parent",
|
|
39
|
+
mutation: () => ({ cursorValue })
|
|
40
|
+
}];
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
onMouseMove: throttle(
|
|
46
|
+
attachId(CursorHelpers.onMouseMove.bind(CursorHelpers)),
|
|
47
|
+
32, // eslint-disable-line no-magic-numbers
|
|
48
|
+
{ leading: true, trailing: false })
|
|
49
|
+
};
|
|
@@ -6,7 +6,7 @@ import { attachId } from "../../helpers/event-handlers.js";
|
|
|
6
6
|
const SelectionHelpers = {
|
|
7
7
|
getDatasets(props) {
|
|
8
8
|
if (props.data) {
|
|
9
|
-
return [{data: props.data}];
|
|
9
|
+
return [{ data: props.data }];
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const getData = (childProps) => {
|
|
@@ -20,10 +20,10 @@ const SelectionHelpers = {
|
|
|
20
20
|
} else if (child.type && isFunction(child.type.getData)) {
|
|
21
21
|
child = parent ? React.cloneElement(child, parent.props) : child;
|
|
22
22
|
const childData = child.props && child.type.getData(child.props);
|
|
23
|
-
return childData ? {childName, data: childData} : null;
|
|
23
|
+
return childData ? { childName, data: childData } : null;
|
|
24
24
|
} else {
|
|
25
25
|
const childData = getData(child.props);
|
|
26
|
-
return childData ? {childName, data: childData} : null;
|
|
26
|
+
return childData ? { childName, data: childData } : null;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
return Helpers.reduceChildren(React.Children.toArray(props.children), iteratee);
|
|
@@ -43,7 +43,7 @@ const SelectionHelpers = {
|
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
getSelectedData(dataset, bounds) {
|
|
46
|
-
const {x, y} = bounds;
|
|
46
|
+
const { x, y } = bounds;
|
|
47
47
|
const withinBounds = (d) => {
|
|
48
48
|
return d._x >= x[0] && d._x <= x[1] && d._y >= y[0] && d._y <= y[1];
|
|
49
49
|
};
|
|
@@ -58,14 +58,14 @@ const SelectionHelpers = {
|
|
|
58
58
|
count++;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
return count > 0 ? {eventKey, data} : null;
|
|
61
|
+
return count > 0 ? { eventKey, data } : null;
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
onMouseDown(evt, targetProps) {
|
|
65
65
|
evt.preventDefault();
|
|
66
66
|
const { dimension, scale } = targetProps;
|
|
67
67
|
const datasets = targetProps.datasets || [];
|
|
68
|
-
const {x, y} = Selection.getSVGEventCoordinates(evt);
|
|
68
|
+
const { x, y } = Selection.getSVGEventCoordinates(evt);
|
|
69
69
|
const x1 = dimension !== "y" ? x : Selection.getDomainCoordinates(scale).x[0];
|
|
70
70
|
const y1 = dimension !== "x" ? y : Selection.getDomainCoordinates(scale).y[0];
|
|
71
71
|
const x2 = dimension !== "y" ? x : Selection.getDomainCoordinates(scale).x[1];
|
|
@@ -77,7 +77,7 @@ const SelectionHelpers = {
|
|
|
77
77
|
{
|
|
78
78
|
target: "parent",
|
|
79
79
|
mutation: () => {
|
|
80
|
-
return {x1, y1, select: true, x2, y2};
|
|
80
|
+
return { x1, y1, select: true, x2, y2 };
|
|
81
81
|
}
|
|
82
82
|
}, {
|
|
83
83
|
target: "data",
|
|
@@ -89,11 +89,11 @@ const SelectionHelpers = {
|
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
onMouseMove(evt, targetProps) {
|
|
92
|
-
const {dimension, scale, select} = targetProps;
|
|
92
|
+
const { dimension, scale, select } = targetProps;
|
|
93
93
|
if (!select) {
|
|
94
94
|
return {};
|
|
95
95
|
} else {
|
|
96
|
-
const {x, y} = Selection.getSVGEventCoordinates(evt);
|
|
96
|
+
const { x, y } = Selection.getSVGEventCoordinates(evt);
|
|
97
97
|
const x2 = dimension !== "y" ? x : Selection.getDomainCoordinates(scale).x[1];
|
|
98
98
|
const y2 = dimension !== "x" ? y : Selection.getDomainCoordinates(scale).y[1];
|
|
99
99
|
return {
|
|
@@ -106,7 +106,7 @@ const SelectionHelpers = {
|
|
|
106
106
|
},
|
|
107
107
|
|
|
108
108
|
onMouseUp(evt, targetProps) {
|
|
109
|
-
const {x2, y2} = targetProps;
|
|
109
|
+
const { x2, y2 } = targetProps;
|
|
110
110
|
if (!x2 || !y2) {
|
|
111
111
|
return [{
|
|
112
112
|
target: "parent",
|
|
@@ -133,7 +133,7 @@ const SelectionHelpers = {
|
|
|
133
133
|
return {
|
|
134
134
|
childName: d.childName, eventKey: d.eventKey, target: "data",
|
|
135
135
|
mutation: () => {
|
|
136
|
-
return assign({active: true}, callbackMutation);
|
|
136
|
+
return assign({ active: true }, callbackMutation);
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
}) : [];
|
|
@@ -147,6 +147,6 @@ export default {
|
|
|
147
147
|
onMouseUp: SelectionHelpers.onMouseUp.bind(SelectionHelpers),
|
|
148
148
|
onMouseMove: throttle(
|
|
149
149
|
attachId(SelectionHelpers.onMouseMove.bind(SelectionHelpers)),
|
|
150
|
-
16,
|
|
151
|
-
{leading: true, trailing: false})
|
|
150
|
+
16, // eslint-disable-line no-magic-numbers
|
|
151
|
+
{ leading: true, trailing: false })
|
|
152
152
|
};
|