-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,524 additions
and
1,605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,55 @@ | ||
import React from 'react' | ||
import React from 'react'; | ||
//import {Col, Row} from "antd"; | ||
import { | ||
Layout, Menu, Breadcrumb, Icon, | ||
} from 'antd'; | ||
import { Layout, Menu, Breadcrumb, Icon } from 'antd'; | ||
|
||
import ClassTreeView from './ClassTreeView' | ||
import PropertyEditor from './PropertyEditor' | ||
import ClassTreeView from './ClassTreeView'; | ||
import PropertyEditor from './PropertyEditor'; | ||
|
||
const { Header, Content, Sider } = Layout; | ||
const { SubMenu } = Menu; | ||
|
||
const App = () => { | ||
return ( | ||
<Layout> | ||
<Header className="header"> | ||
{/* | ||
return ( | ||
<Layout> | ||
<Header className='header'> | ||
{/* | ||
// TODO : left side navigation menu | ||
*/} | ||
<div className="logo" /> | ||
<Menu | ||
mode="horizontal" | ||
defaultSelectedKeys={['2']} | ||
style={{ lineHeight: '64px' }} | ||
> | ||
<Menu.Item key="1">nav 1</Menu.Item> | ||
<Menu.Item key="2">nav 2</Menu.Item> | ||
<Menu.Item key="3">nav 3</Menu.Item> | ||
</Menu> | ||
</Header> | ||
<Layout> | ||
<Sider width={200} | ||
style={{ | ||
background: '#fff', | ||
overflow: 'auto', | ||
height: '100vh', | ||
position: 'fixed' | ||
}}> | ||
<ClassTreeView /> | ||
</Sider> | ||
<Layout style={{ marginLeft: 300, padding: '0 24px 24px' }}> | ||
<Breadcrumb style={{ margin: '16px 0' }}> | ||
<Breadcrumb.Item>Home</Breadcrumb.Item> | ||
<Breadcrumb.Item>List</Breadcrumb.Item> | ||
<Breadcrumb.Item>App</Breadcrumb.Item> | ||
</Breadcrumb> | ||
<Content style={{ | ||
margin: '24px 16px 0', | ||
overflow: 'initial' | ||
}} | ||
> | ||
<PropertyEditor /> | ||
</Content> | ||
</Layout> | ||
</Layout> | ||
</Layout> | ||
); | ||
<div className='logo' /> | ||
<Menu mode='horizontal' defaultSelectedKeys={['2']} style={{ lineHeight: '64px' }}> | ||
<Menu.Item key='1'>nav 1</Menu.Item> | ||
<Menu.Item key='2'>nav 2</Menu.Item> | ||
<Menu.Item key='3'>nav 3</Menu.Item> | ||
</Menu> | ||
</Header> | ||
<Layout> | ||
<Sider | ||
width={200} | ||
style={{ | ||
background: '#fff', | ||
overflow: 'auto', | ||
height: '100vh', | ||
position: 'fixed', | ||
}}> | ||
<ClassTreeView /> | ||
</Sider> | ||
<Layout style={{ marginLeft: 300, padding: '0 24px 24px' }}> | ||
<Breadcrumb style={{ margin: '16px 0' }}> | ||
<Breadcrumb.Item>Home</Breadcrumb.Item> | ||
<Breadcrumb.Item>List</Breadcrumb.Item> | ||
<Breadcrumb.Item>App</Breadcrumb.Item> | ||
</Breadcrumb> | ||
<Content | ||
style={{ | ||
margin: '24px 16px 0', | ||
overflow: 'initial', | ||
}}> | ||
<PropertyEditor /> | ||
</Content> | ||
</Layout> | ||
</Layout> | ||
</Layout> | ||
); | ||
}; | ||
|
||
export default App | ||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,82 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { Form, Input, Button, Upload, Checkbox,Select, Radio, Layout, Icon } from 'antd'; | ||
|
||
import { Form, Input, Button, Upload, Checkbox, Select, Radio, Layout, Icon } from 'antd'; | ||
|
||
const { TextArea } = Input; | ||
|
||
class AddRDFForm extends React.Component { | ||
constructor() { | ||
super(); | ||
this.state = { | ||
formLayout: 'horizontal', | ||
}; } | ||
const { TextArea } = Input; | ||
|
||
handleFormLayoutChange = (e) => { | ||
this.setState({ formLayout: e.target.value }); | ||
} | ||
class AddRDFForm extends React.Component { | ||
constructor() { | ||
super(); | ||
this.state = { | ||
formLayout: 'horizontal', | ||
}; | ||
} | ||
|
||
render() { | ||
const { formLayout } = this.state; | ||
const formItemLayout = { | ||
labelCol: { span: 4 }, | ||
wrapperCol: { span: 14 }, | ||
} ; | ||
handleFormLayoutChange = (e) => { | ||
this.setState({ formLayout: e.target.value }); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<Form layout={formLayout}> | ||
<Form.Item id="base" {...formItemLayout} label="Base URI: "> | ||
<Layout> | ||
<Input readOnly style={{ width: "50%" }} /> | ||
<Checkbox> use base URI as context identifier </Checkbox> | ||
</Layout> | ||
</Form.Item> | ||
render() { | ||
const { formLayout } = this.state; | ||
const formItemLayout = { | ||
labelCol: { span: 4 }, | ||
wrapperCol: { span: 14 }, | ||
}; | ||
|
||
<Form.Item id="context" {...formItemLayout} label="Context:"> | ||
<Input readOnly style={{ width: "50%" }} /> | ||
</Form.Item> | ||
return ( | ||
<div> | ||
<Form layout={formLayout}> | ||
<Form.Item id='base' {...formItemLayout} label='Base URI: '> | ||
<Layout> | ||
<Input readOnly style={{ width: '50%' }} /> | ||
<Checkbox> use base URI as context identifier </Checkbox> | ||
</Layout> | ||
</Form.Item> | ||
|
||
<Form.Item | ||
id="dataFormat" | ||
{...formItemLayout} | ||
label="Data format:" | ||
> | ||
<Layout> | ||
<Select | ||
defaultValue="(autodetect)" | ||
style={{ width: 120 }} | ||
> | ||
<Option value="(autodetect)">(autodetect)</Option> | ||
<Option value="N-Triples">N-Triples</Option> | ||
<Option value="RDF/XML">RDF/XML</Option> | ||
<Option value="Turtle">Turtle</Option> | ||
</Select> | ||
<Radio>Location of the RDF data you wish to upload</Radio> | ||
</Layout> | ||
</Form.Item> | ||
<Form.Item id='context' {...formItemLayout} label='Context:'> | ||
<Input readOnly style={{ width: '50%' }} /> | ||
</Form.Item> | ||
|
||
<Form.Item | ||
id="RDFdataUrl" | ||
{...formItemLayout} | ||
label="RDF Data URL:" | ||
> | ||
<Layout> | ||
<Input readOnly style={{ width: "50%" }} /> | ||
<Radio> | ||
Select the file containing the RDF data you wish to | ||
upload | ||
</Radio> | ||
</Layout> | ||
</Form.Item> | ||
<Form.Item id='dataFormat' {...formItemLayout} label='Data format:'> | ||
<Layout> | ||
<Select defaultValue='(autodetect)' style={{ width: 120 }}> | ||
<Option value='(autodetect)'>(autodetect)</Option> | ||
<Option value='N-Triples'>N-Triples</Option> | ||
<Option value='RDF/XML'>RDF/XML</Option> | ||
<Option value='Turtle'>Turtle</Option> | ||
</Select> | ||
<Radio>Location of the RDF data you wish to upload</Radio> | ||
</Layout> | ||
</Form.Item> | ||
|
||
<Form.Item label="RDF Data File: " {...formItemLayout}> | ||
{ | ||
<Upload | ||
name="logo" | ||
action="/upload.do" | ||
listType="picture" | ||
> | ||
<Button> | ||
<Icon type="upload" /> Click to upload | ||
</Button> | ||
</Upload> | ||
} | ||
<Checkbox>Enter the RDF data you wish to upload</Checkbox> | ||
</Form.Item> | ||
<Form.Item id='RDFdataUrl' {...formItemLayout} label='RDF Data URL:'> | ||
<Layout> | ||
<Input readOnly style={{ width: '50%' }} /> | ||
<Radio>Select the file containing the RDF data you wish to upload</Radio> | ||
</Layout> | ||
</Form.Item> | ||
|
||
<Form.Item | ||
id="RDFcontent" | ||
{...formItemLayout} | ||
label="RDF Content:" | ||
> | ||
<Layout> | ||
<TextArea readOnly rows={4} style={{ width: "50%" }} /> | ||
<Button style={{ width: "30%" }}>Upload</Button> | ||
</Layout> | ||
</Form.Item> | ||
</Form> | ||
</div> | ||
); | ||
} | ||
<Form.Item label='RDF Data File: ' {...formItemLayout}> | ||
{ | ||
<Upload name='logo' action='/upload.do' listType='picture'> | ||
<Button> | ||
<Icon type='upload' /> Click to upload | ||
</Button> | ||
</Upload> | ||
} | ||
<Checkbox>Enter the RDF data you wish to upload</Checkbox> | ||
</Form.Item> | ||
|
||
<Form.Item id='RDFcontent' {...formItemLayout} label='RDF Content:'> | ||
<Layout> | ||
<TextArea readOnly rows={4} style={{ width: '50%' }} /> | ||
<Button style={{ width: '30%' }}>Upload</Button> | ||
</Layout> | ||
</Form.Item> | ||
</Form> | ||
</div> | ||
); | ||
} | ||
|
||
storiesOf('Add RDF', module) | ||
.add('form', () => ( | ||
<AddRDFForm></AddRDFForm> | ||
)); | ||
} | ||
|
||
storiesOf('Add RDF', module).add('form', () => <AddRDFForm />); |
Oops, something went wrong.