updated preview and using freespeech_walle as submodule

master
Malar Kannan 2017-07-19 18:02:46 +05:30
parent c6c8655649
commit ab930ee2eb
9 changed files with 50 additions and 12 deletions

1
.gitignore vendored
View File

@ -22,7 +22,6 @@ yarn-error.log*
public/png
*.xml
freespeech_walle
# Created by https://www.gitignore.io/api/python

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "freespeech_walle"]
path = freespeech_walle
url = https://github.com/inventionlabs/freespeech-wall-e.git

1
freespeech_walle Submodule

@ -0,0 +1 @@
Subproject commit 260e957355a70da04306b05661f23358b4e8ea39

11
package-lock.json generated
View File

@ -60,6 +60,12 @@
"integrity": "sha512-Xo99Pb3nQhDpnlOMBNkqse1Wj1C0ODoP/fnaM074YXDtwppIiaG3Nm7+b/VYKsIEhitH8o46/eDm51j+jG8EFw==",
"dev": true
},
"@types/react-sortable-hoc": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@types/react-sortable-hoc/-/react-sortable-hoc-0.6.0.tgz",
"integrity": "sha512-qOWavACyVKEASlqAy0qAvszIOz5GIDW5cdAcMaTl9rge30JHIvynTnOQJFzl+HmxPiEmTuz4gipiNoBjbnP3kQ==",
"dev": true
},
"@types/react-transition-group": {
"version": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-1.1.0.tgz",
"integrity": "sha1-GexL+hyxgJ7LxFmdDDjS6f+xm/4=",
@ -3638,6 +3644,11 @@
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.5.tgz",
"integrity": "sha1-+OjHsjlCJXblLWt9sGQ5RpvphGo="
},
"react-sortable-hoc": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/react-sortable-hoc/-/react-sortable-hoc-0.6.5.tgz",
"integrity": "sha1-5rXUFEdtUaC2IZMSmIVdT9YIwic="
},
"react-transition-group": {
"version": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.0.tgz",
"integrity": "sha1-tR/JIbDDg1p+98Vxx5/ILHPpIE8="

View File

@ -9,6 +9,7 @@
"react-addons-css-transition-group": "^15.5.2",
"react-dom": "^15.5.4",
"react-redux": "^5.0.5",
"react-sortable-hoc": "^0.6.5",
"react-transition-group": "^1.1.3",
"reflexbox": "^3.0.0-0",
"semantic-ui-css": "^2.2.10",
@ -26,6 +27,7 @@
"@types/react-addons-css-transition-group": "^15.0.2",
"@types/react-dom": "^15.5.0",
"@types/react-redux": "^4.4.46",
"@types/react-sortable-hoc": "^0.6.0",
"@types/react-transition-group": "^1.1.0",
"@types/xml2js": "0.0.33",
"app-root-path": "^2.0.1",

View File

@ -1,6 +1,22 @@
beautifulsoup4==4.6.0
bs4==0.0.1
certifi==2017.4.17
chardet==3.0.4
click==6.7
Flask==0.12.2
Flask-Cors==3.0.3
Flask-Webpack==0.1.0
idna==2.5
itsdangerous==0.24
Jinja2==2.9.6
lxml==3.8.0
MarkupSafe==1.0
nltk==3.2.4
Pattern==2.6
pytz==2017.2
requests==2.18.1
six==1.10.0
urllib3==1.21.1
Werkzeug==0.12.2
xlrd==1.0.0
xlwt==1.2.0

View File

@ -43,16 +43,22 @@ export class LexEdit extends React.Component<any, any> {
this.handleOnChange(eventData);
};
let params = { field, sh, defaultText, options, langSelOpts, changed };
if (this.props.fieldMetaMap[field].type === 'text') {
switch (fieldMeta.type) {
case 'text': {
return textInput(params);
} else if (this.props.fieldMetaMap[field].type === 'select') {
}
case 'select': {
return selectInput(params);
} else if (this.props.fieldMetaMap[field].type === 'preview') {
}
case 'preview': {
return imagePreview(params);
} else {
console.log('field discarded :', field);
}
default: {
console.log('type discarded :', fieldMeta.type);
console.log('values discarded :', fieldMeta.get(li));
return null;
}
}
});
return (
<Box m={2}>

View File

@ -27,7 +27,7 @@ const fieldMetaMap = {
synset: { type: 'text', ...simpleAccessor('lexprops[0].wnsynset[0]'), },
guid: { type: 'text', ...simpleAccessor('guid[0]'), },
pos: { type: 'select', ...simpleAccessor('pos[0]'), },
image: { type: 'text', ...simpleAccessor('image[0]'), },
image: { type: 'preview', ...simpleAccessor('image[0]'), },
relations: { type: 'text', ...simpleAccessor('relations[0]'), },
frame: { type: 'select', ...simpleAccessor('syntacticprops[0].property[0]._'), },
morphclass: {

View File

@ -86,5 +86,5 @@ export function imagePreview(params: any) {
<LexSingleInput key={field} label={changedLabel(changed, field)}>
<Image src={imageSrc} size="tiny" bordered={true} />
</LexSingleInput>
) : null;
) : textInput(params);
}