Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 5b3bedf

Browse files
authored
Merge pull request #180 from bartvde/sdk-1.x-upgrade
Upgrade to SDK 1.x
2 parents 63d6266 + fd6d620 commit 5b3bedf

File tree

9 files changed

+39
-31
lines changed

9 files changed

+39
-31
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
"node": ">6"
3737
},
3838
"dependencies": {
39-
"boundless-sdk": "0.10.24",
39+
"@boundlessgeo/sdk": "1.0.4",
4040
"core-js": "^2.4.1",
4141
"intl": "^1.2.5",
4242
"material-ui": "0.16.4",
4343
"ol3-cesium": "3.9.4",
44-
"openlayers": "4.0.1",
44+
"openlayers": "4.2.0",
4545
"react": "15.3.2",
4646
"react-dom": "15.3.2",
4747
"react-intl": "^2.1.5",
@@ -67,7 +67,7 @@
6767
"chai-as-promised": "^6.0.0",
6868
"codeclimate-test-reporter": "^0.4.0",
6969
"css-loader": "^0.26.0",
70-
"enzyme": "^2.7.0",
70+
"enzyme": "2.8.0",
7171
"eslint": "^3.7.1",
7272
"eslint-plugin-react": "^6.4.1",
7373
"exports-loader": "^0.6.3",

src/components/geonode.jsx

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ import ol from 'openlayers';
77
import {addLocaleData, IntlProvider} from 'react-intl';
88
global.IntlProvider = IntlProvider;
99
import injectTapEventPlugin from 'react-tap-event-plugin';
10-
import Globe from 'boundless-sdk/components/Globe';
11-
import QGISPrint from 'boundless-sdk/components/QGISPrint';
12-
import Zoom from 'boundless-sdk/components/Zoom';
13-
import Rotate from 'boundless-sdk/components/Rotate';
14-
import HomeButton from 'boundless-sdk/components/HomeButton';
15-
import MapPanel from 'boundless-sdk/components/MapPanel';
10+
import Globe from '@boundlessgeo/sdk/components/Globe';
11+
import QGISPrint from '@boundlessgeo/sdk/components/QGISPrint';
12+
import Zoom from '@boundlessgeo/sdk/components/Zoom';
13+
import Rotate from '@boundlessgeo/sdk/components/Rotate';
14+
import HomeButton from '@boundlessgeo/sdk/components/HomeButton';
15+
import MapPanel from '@boundlessgeo/sdk/components/MapPanel';
1616
import getMuiTheme from 'material-ui/styles/getMuiTheme';
1717
import Snackbar from 'material-ui/Snackbar';
18-
import LayerList from 'boundless-sdk/components/LayerList';
18+
import LayerList from '@boundlessgeo/sdk/components/LayerList';
1919
import enLocaleData from 'react-intl/locale-data/en.js';
20-
import InfoPopup from 'boundless-sdk/components/InfoPopup';
21-
import MapConfigTransformService from 'boundless-sdk/services/MapConfigTransformService';
22-
import MapConfigService from 'boundless-sdk/services/MapConfigService';
23-
import WMSService from 'boundless-sdk/services/WMSService';
24-
import enMessages from 'boundless-sdk/locale/en.js';
20+
import InfoPopup from '@boundlessgeo/sdk/components/InfoPopup';
21+
import MapConfigTransformService from '@boundlessgeo/sdk/services/MapConfigTransformService';
22+
import MapConfigService from '@boundlessgeo/sdk/services/MapConfigService';
23+
import WMSService from '@boundlessgeo/sdk/services/WMSService';
24+
import enMessages from '@boundlessgeo/sdk/locale/en.js';
2525
enMessages["loginmodal.helptext"] = "Login to GeoNode";
2626
global.enMessages = enMessages;
2727

@@ -31,7 +31,7 @@ import {getLocalGeoServer,createThumbnail} from '../services/geonode';
3131
import {getCRSFToken} from '../helper';
3232

3333
import '../css/app.css'
34-
import 'boundless-sdk/dist/css/components.css';
34+
import '@boundlessgeo/sdk/dist/css/components.css';
3535

3636
// Needed for onTouchTap
3737
// Can go away when react 1.0 release
@@ -165,9 +165,7 @@ class GeoNodeViewer extends React.Component {
165165
<div id='globe-button'><Globe tooltipPosition='right' map={map}/></div>
166166
<div id='print-button'><QGISPrint menu={false} map={map} layouts={this.props.printLayouts}/></div>
167167
<div id='home-button'><HomeButton extent={this._extent} tooltipPosition='right' map={map}/></div>
168-
<div><LayerList showZoomTo={true} addBaseMap={{
169-
tileServices: this.state.tileServices
170-
}} addLayer={layerList} showTable={true} allowReordering={true} includeLegend={true} allowRemove={this.edit} tooltipPosition='left' allowStyling={this.edit || this.props.zoomToLayer} map={map}/></div>
168+
<div id='layerlist'><LayerList showZoomTo={true} addBaseMap={true} baseMapTileServices={this.state.tileServices} addLayer={layerList} showTable={true} allowReordering={true} includeLegend={true} allowRemove={this.edit} tooltipPosition='left' allowStyling={this.edit || this.props.zoomToLayer} map={map}/></div>
171169
<div id='zoom-buttons'><Zoom tooltipPosition='right' map={map}/></div>
172170
<div id='rotate-button'><Rotate autoHide={true} tooltipPosition='right' map={map}/></div>
173171
<div id='popup' className='ol-popup'><InfoPopup toggleGroup='navigation' toolId='nav' infoFormat='application/vnd.ogc.gml' map={map}/></div>

src/components/save.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ol from 'openlayers';
3-
import Button from 'boundless-sdk/components/Button';
3+
import Button from '@boundlessgeo/sdk/components/Button';
44
import classNames from 'classnames';
55
import SaveIcon from 'material-ui/svg-icons/content/save';
66
import {defineMessages, injectIntl, intlShape} from 'react-intl';

src/components/saveContainer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {saveMap, setMapId, ajaxLogin} from '../state/map/actions';
66
import * as selectors from '../state/map/selectors';
77
import * as mapConfigSelectors from '../state/mapConfig/selectors';
88
import {connectAdvanced} from 'react-redux';
9-
import LoginModal from 'boundless-sdk/components/LoginModal';
9+
import LoginModal from '@boundlessgeo/sdk/components/LoginModal';
1010

1111
import SaveView from './saveView';
1212

src/composer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import GeonodeComposer from './components/geonodeLink';
4-
import enMessages from 'boundless-sdk/locale/en.js';
4+
import enMessages from '@boundlessgeo/sdk/locale/en.js';
55
import {IntlProvider} from 'react-intl';
66
import {Provider} from 'react-redux';
77
import configureStore from './configureStore';

src/css/app.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,18 @@ html, body {
3838
position: absolute;
3939
top: 20px;
4040
}
41-
.layer-list {
42-
top: 74px !important;
41+
#layerlist {
42+
position: absolute;
43+
right: 0px;
44+
top: 20px;
45+
}
46+
.layer-tree-panel {
47+
margin-right: 70px;
48+
}
49+
.layerlistbutton {
50+
position: absolute !important;
51+
right: 20px;
52+
top: 0px;
4353
}
4454
#rotate-button {
4555
top: 366px;

src/services/geonode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import MapConfigTransformService from 'boundless-sdk/services/MapConfigTransformService';
2-
import MapConfigService from 'boundless-sdk/services/MapConfigService';
1+
import MapConfigTransformService from '@boundlessgeo/sdk/services/MapConfigTransformService';
2+
import MapConfigService from '@boundlessgeo/sdk/services/MapConfigService';
33
import {
44
getCRSFToken,
55
removeTrailingSlash

src/viewer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import GeoNodeViewer from './components/geonode';
4-
import enMessages from 'boundless-sdk/locale/en.js';
4+
import enMessages from '@boundlessgeo/sdk/locale/en.js';
55
import {IntlProvider} from 'react-intl';
66

77
class Viewer {

tests/components/geonodeviewer.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ol from 'openlayers';
77
import ReactTestUtils from 'react-addons-test-utils';
88
import {shallowWithIntl} from '../testhelper';
99

10-
import LayerList from 'boundless-sdk/components/LayerList';
10+
import LayerList from '@boundlessgeo/sdk/components/LayerList';
1111

1212
import GeoNodeViewer from '../../src/components/geonode';
1313
import rendererWithIntl from '../../helper/renderWithIntl.js';
@@ -57,7 +57,7 @@ describe('GeoNodeViewer', () => {
5757
});
5858
it('the layer list includes layers name', () => {
5959
const geonodeviewer = ReactTestUtils.renderIntoDocument(<IntlProvider locale="en"><GeoNodeViewer config={config}/></IntlProvider>);
60-
var contents = ReactTestUtils.scryRenderedDOMComponentsWithClass(geonodeviewer, 'layer-list-item');
60+
var contents = ReactTestUtils.scryRenderedDOMComponentsWithClass(geonodeviewer, 'layer-list-name');
6161
assert.equal(contents[0].textContent,'Sprint_85');
6262
});
6363
describe('two layers', () => {
@@ -87,7 +87,7 @@ describe('GeoNodeViewer', () => {
8787
describe('viewer (default)', () => {
8888
it('the layer list includes layers name', () => {
8989
const geonodeviewer = ReactTestUtils.renderIntoDocument(<IntlProvider locale="en"><GeoNodeViewer config={config}/></IntlProvider>);
90-
var contents = ReactTestUtils.scryRenderedDOMComponentsWithClass(geonodeviewer, 'layer-list-item');
90+
var contents = ReactTestUtils.scryRenderedDOMComponentsWithClass(geonodeviewer, 'layer-list-name');
9191
assert.equal(contents[0].textContent,'Sprint_85');
9292
});
9393
});
@@ -98,7 +98,7 @@ describe('GeoNodeViewer', () => {
9898
});
9999
it('can add layers', () => {
100100
const geonodeviewer = ReactTestUtils.renderIntoDocument(<IntlProvider locale="en"><GeoNodeViewer mode='composer' config={config}/></IntlProvider>);
101-
var contents = ReactTestUtils.scryRenderedDOMComponentsWithClass(geonodeviewer, 'layer-list-add');
101+
var contents = ReactTestUtils.scryRenderedDOMComponentsWithClass(geonodeviewer, 'ms-ogc-web-services');
102102
assert.equal(contents.length, 1);
103103
});
104104
it('does allow styling of layers', () => {

0 commit comments

Comments
 (0)