Skip to content

Commit

Permalink
Merge pull request #118 from KaiVolland/package-updates
Browse files Browse the repository at this point in the history
Updates several pacakges and adapts code
  • Loading branch information
KaiVolland authored May 16, 2019
2 parents e4be766 + 3f33552 commit c3c8be0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"homepage": ".",
"devDependencies": {},
"dependencies": {
"@types/react": "16.8.17",
"@types/react-dom": "16.8.4",
"@types/react": "16.8.8",
"antd": "3.15.2",
"antd": "3.18.1",
"geostyler": "4.1.3",
"geostyler-geojson-parser": "1.0.0",
"geostyler-sld-parser": "0.18.1",
"geostyler-style": "0.14.3",
"geostyler-sld-parser": "1.2.0",
"geostyler-style": "1.1.0",
"geostyler-wfs-parser": "1.0.0",
"geostyler": "3.2.0",
"moment": "2.24.0",
"ol": "5.3.2",
"react-dom": "16.8.5",
"react-scripts": "2.1.5",
"react": "16.8.5",
"typescript": "3.3.3"
"react": "16.8.6",
"react-dom": "16.8.6",
"react-scripts": "3.0.1",
"typescript": "3.4.5"
},
"scripts": {
"start": "react-scripts start",
Expand Down
34 changes: 19 additions & 15 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import * as React from 'react';

import 'antd/dist/antd.css';

import {
Form,
LocaleProvider,
Radio,
Switch
} from 'antd';
const RadioButton = Radio.Button;
const RadioGroup = Radio.Group;

import { Locale } from 'antd/lib/locale-provider/index';
import * as moment from 'moment';
import 'moment/locale/de';
import 'moment/locale/es';

import logo from './assets/logo.svg';

import {
Style as GsStyle,
StyleParser as GsStyleParser
Expand All @@ -29,9 +22,7 @@ import {

import GeoJsonParser from 'geostyler-geojson-parser';
import SldStyleParser from 'geostyler-sld-parser';
import GeoWfsParser from 'geostyler-wfs-parser';

import './App.css';
import WfsParser from 'geostyler-wfs-parser';

import {
CodeEditor,
Expand All @@ -41,6 +32,13 @@ import {
StyleLoader
} from 'geostyler';

import logo from './assets/logo.svg';
import './App.css';

const RadioButton = Radio.Button;
const RadioGroup = Radio.Group;


// i18n
export interface AppLocale extends Locale {
graphicalEditor: string;
Expand Down Expand Up @@ -69,6 +67,12 @@ interface AppState {

class App extends React.Component<AppProps, AppState> {

private _sldStyleParser = new SldStyleParser();

private _geoJsonParser = new GeoJsonParser();

private _wfsParser = new WfsParser();

constructor(props: AppProps) {
super(props);
this.state = {
Expand Down Expand Up @@ -206,7 +210,7 @@ class App extends React.Component<AppProps, AppState> {
<Form.Item>
<StyleLoader
parsers={[
SldStyleParser
this._sldStyleParser
]}
onStyleRead={(style: GsStyle) => {
this.setState({style});
Expand All @@ -216,8 +220,8 @@ class App extends React.Component<AppProps, AppState> {
<Form.Item>
<DataLoader
parsers={[
GeoJsonParser,
GeoWfsParser
this._geoJsonParser,
this._wfsParser
]}
onDataRead={(data: GsData) => {
this.setState({data});
Expand Down Expand Up @@ -247,9 +251,9 @@ class App extends React.Component<AppProps, AppState> {
<CodeEditor
style={style}
parsers={[
SldStyleParser
this._sldStyleParser
]}
defaultParser={SldStyleParser}
defaultParser={this._sldStyleParser}
onStyleChange={(style: GsStyle) => {
this.setState({style});
}}
Expand Down
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';

import './index.css';
import 'antd/dist/antd.css';

ReactDOM.render(<App />, document.getElementById('root'));

0 comments on commit c3c8be0

Please sign in to comment.