Skip to content

Commit 79a1407

Browse files
committed
Updated to latest React infrastructure
1 parent 5674466 commit 79a1407

29 files changed

+106
-108
lines changed

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,20 @@
4343
"css-loader": "^0.12.0",
4444
"extract-text-webpack-plugin": "^0.8.0",
4545
"file-loader": "^0.8.1",
46+
"history": "^1.17.0",
4647
"keymirror": "^0.1.1",
4748
"less": "^2.5.0",
4849
"less-loader": "^2.2.0",
49-
"maco": "^1.0.2",
50+
"maco": "^2.0.3",
5051
"ngraph.events": "0.0.3",
5152
"node-libs-browser": "^0.5.0",
5253
"qs": "^4.0.0",
5354
"rafor": "^1.0.2",
54-
"react": "^0.13.3",
55-
"react-bootstrap": "^0.23.4",
56-
"react-list": "^0.6.0",
57-
"react-router": "^0.13.3",
55+
"react": "^0.14.5",
56+
"react-bootstrap": "^0.28.1",
57+
"react-dom": "^0.14.5",
58+
"react-list": "^0.7.10",
59+
"react-router": "^1.0.3",
5860
"style-loader": "^0.12.2",
5961
"three.orientation": "^1.1.0",
6062
"unrender": "git+https://github.com/anvaka/unrender.git",

src/galaxy/about.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
export default require('maco').template(about);
2+
export default require('maco').template(about, React);
33

44
function about() {
55
return (

src/galaxy/galaxyPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import LoadingIndicator from './loadingIndicator.jsx';
33
import Scene from './scene.jsx';
44
import appEvents from './service/appEvents.js';
55

6-
module.exports = require('maco')(galaxyPage);
6+
module.exports = require('maco')(galaxyPage, React);
77

88
function galaxyPage(x) {
99
var currentPath;
@@ -19,7 +19,7 @@ function galaxyPage(x) {
1919
<Scene />
2020
</div>
2121
);
22-
}
22+
};
2323

2424
function loadGraphIfRouteChanged() {
2525
var routeChanged = x.props.params.name !== currentPath;

src/galaxy/help.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React from 'react';
1010
import appEvents from './service/appEvents.js';
1111
import Key from './utils/key.js';
1212

13-
export default require('maco')(help);
13+
export default require('maco')(help, React);
1414

1515
var helpWasShown = false;
1616

src/galaxy/hoverInfo.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scene from './store/scene.js';
22
import React from 'react';
33
import hoverModel from './store/hover.js';
44

5-
module.exports = require('maco')(hoverInfo);
5+
module.exports = require('maco')(hoverInfo, React);
66

77
function hoverInfo(x) {
88
var hoverTemplate = null;
@@ -13,11 +13,11 @@ function hoverInfo(x) {
1313

1414
x.componentDidMount = function() {
1515
hoverModel.on('changed', updateView);
16-
}
16+
};
1717

1818
x.componentWillUnmount = function () {
1919
hoverModel.off('changed', updateView);
20-
}
20+
};
2121

2222
function updateView(viewTemplate) {
2323
hoverTemplate = viewTemplate;

src/galaxy/loadingIndicator.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import scene from './store/scene.js';
33

4-
module.exports = require('maco')(loadingIndicator);
4+
module.exports = require('maco')(loadingIndicator, React);
55

66
function loadingIndicator(x) {
77
var loadingMessage = '';
@@ -10,15 +10,15 @@ function loadingIndicator(x) {
1010
return scene.isLoading() ?
1111
<div className='label loading'>{loadingMessage}</div> :
1212
null;
13-
}
13+
};
1414

1515
x.componentDidMount = function() {
1616
scene.on('loadProgress', updateLoadingIndicator);
17-
}
17+
};
1818

1919
x.componentWillUnmount = function () {
2020
scene.off('loadProgress', updateLoadingIndicator);
21-
}
21+
};
2222

2323
function updateLoadingIndicator(progress) {
2424
loadingMessage = `${progress.message} - ${progress.completed}`;

src/galaxy/noWebgl.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
export default require('maco').template(noWebGL);
2+
export default require('maco').template(noWebGL, React);
33

44
function noWebGL() {
55
return (

src/galaxy/nodeDetails/nodeDetailsView.jsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import detailModel from './nodeDetailsStore.js';
2-
31
import React from 'react';
2+
import detailModel from './nodeDetailsStore.js';
43
import specialNodeDetails from './templates/all.js';
54
import scene from '../store/scene.js';
65

7-
module.exports = require('maco')(detailedNodeView);
6+
module.exports = require('maco')(detailedNodeView, React);
87

98
function detailedNodeView(x) {
109
x.render = function () {
@@ -17,15 +16,15 @@ function detailedNodeView(x) {
1716
<NodeDetails model={selectedNode} />
1817
</div>
1918
);
20-
}
19+
};
2120

2221
x.componentDidMount = function() {
2322
detailModel.on('changed', updateView);
24-
}
23+
};
2524

2625
x.componentWillUnmount = function () {
2726
detailModel.off('changed', updateView);
28-
}
27+
};
2928

3029
function getNodeDetails(viewModel) {
3130
var Template = specialNodeDetails[scene.getGraphName()] || specialNodeDetails.default;

src/galaxy/nodeDetails/templates/bower.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import React from 'react';
12
import commonPackageTemplate from './commonPackageTempalte.jsx';
23

3-
export default require('maco').template(bower);
4+
export default require('maco').template(bower, React);
45

56
function bower(props) {
67
var model = props.model;

src/galaxy/nodeDetails/templates/brew.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import React from 'react';
12
import commonPackageTemplate from './commonPackageTempalte.jsx';
23

3-
export default require('maco').template(brew);
4+
export default require('maco').template(brew, React);
45

56
function brew(props) {
67
var model = props.model;

0 commit comments

Comments
 (0)