Commit 5d99a7f4 authored by Oleg Kalmykov's avatar Oleg Kalmykov
Browse files

material-ui and material-ui-icons libraries migration to version 1.0.0-beta.10 - conflicts fix

parent 80708a51
......@@ -7,9 +7,9 @@ import * as parse from 'autosuggest-highlight/parse';
import TextField from 'material-ui/TextField';
import Paper from 'material-ui/Paper';
import {MenuItem} from 'material-ui/Menu';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
const styleSheet = createStyleSheet('MaterialAutosuggest', (theme) => ({
const styles = (theme) => ({
container: {
flexGrow: 1,
position: 'relative',
......@@ -33,7 +33,7 @@ const styleSheet = createStyleSheet('MaterialAutosuggest', (theme) => ({
textField: {
width: '100%',
},
}));
});
interface IMaterialAutosuggestProps extends React.ClassAttributes<any> {
// array of suggestion objects
......@@ -185,4 +185,4 @@ class MaterialAutosuggest extends React.Component<IMaterialAutosuggestProps, any
}
}
export default withStyles(styleSheet)(MaterialAutosuggest);
export default (withStyles as any)(styles)(MaterialAutosuggest);
import * as React from 'react';
import { connect } from 'react-redux';
import AppBar from 'material-ui/AppBar';
import { withStyles, createStyleSheet } from 'material-ui/styles';
import { withStyles } from 'material-ui/styles';
import Toolbar from 'material-ui/Toolbar';
import IconButton from 'material-ui/IconButton';
import MenuIcon from 'material-ui-icons/Menu';
......@@ -12,7 +12,7 @@ import { Link } from 'react-router';
import {ROLE_ADMINISTRATOR, ROLE_CLIENT, ROLE_USER} from '../../constants/userRoles';
import {saveCookies} from '../../utilities';
const styleSheet = createStyleSheet('Header', (theme) => ({
const styleSheet = {
root: {
marginTop: 90,
width: '100%',
......@@ -65,7 +65,7 @@ const styleSheet = createStyleSheet('Header', (theme) => ({
},
},
/* tslint:enable */
}));
};
interface IHeaderProps extends React.ClassAttributes<any> {
login: any;
......
import * as React from 'react';
import { connect } from 'react-redux';
import { withStyles, createStyleSheet } from 'material-ui/styles';
import { withStyles} from 'material-ui/styles';
import Drawer from 'material-ui/Drawer';
import List, { ListItem, ListItemIcon, ListItemText } from 'material-ui/List';
import { Link } from 'react-router';
const styleSheet = createStyleSheet('LeftMenu', (theme) => ({
const styleSheet = {
flex: {
flex: 1,
},
......@@ -23,11 +23,11 @@ const styleSheet = createStyleSheet('LeftMenu', (theme) => ({
},
},
/* tslint:enable */
}));
};
interface ILeftMenuProps extends React.ClassAttributes<any> {
open: boolean;
closeMenu: (flag) => void;
open: any;
closeMenu: (flag) => any;
classes: any;
}
......@@ -37,6 +37,7 @@ class LeftMenu extends React.Component<ILeftMenuProps, any> {
return (
<div>
<Drawer
type="temporary"
open={ this.props.open }
onRequestClose={ this.props.closeMenu }
onClick={ this.props.closeMenu }
......@@ -64,4 +65,4 @@ class LeftMenu extends React.Component<ILeftMenuProps, any> {
}
}
export default withStyles(styleSheet)(LeftMenu);
export default (withStyles as any)(styleSheet)(LeftMenu);
......@@ -5,7 +5,7 @@ import Grid from 'material-ui/Grid';
import Container from '../../common/container/index';
import TopDataPublisherSection from './top-section';
import MainDataPublisherSection from './main-section';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import {createDatasetRequest} from '../../../actions/dataset';
......@@ -15,12 +15,12 @@ interface IDatasetsProps extends React.ClassAttributes<any> {
createDatasetRequest: () => void;
}
const styleSheet = createStyleSheet('DatasetsProps', (theme) => ({
const styleSheet = {
root: {
margin: '0px',
},
}));
};
class DataPublisher extends React.Component<IDatasetsProps, any> {
......@@ -29,7 +29,7 @@ class DataPublisher extends React.Component<IDatasetsProps, any> {
const {classes} = this.props;
return (
<Grid container size={ 12 } gutter= { 0 } className={ classes.root }>
<Grid container xs={ 12 } spacing= { 0 } className={ classes.root }>
<TopDataPublisherSection/>
<MainDataPublisherSection/>
</Grid>
......
......@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
import {Link} from 'react-router';
import AppBar from 'material-ui/AppBar';
import Tabs, {Tab} from 'material-ui/Tabs';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import Button from 'material-ui/Button';
import DataInPreparation from '../tabs/DataInPreparation';
......@@ -16,7 +16,7 @@ interface IMainDataPublisherSection extends React.ClassAttributes<any> {
params: any;
}
const styleSheet = createStyleSheet('MainDataPublisherSection', (theme) => ({
const styleSheet = {
root: {
borderBottom: '1px solid #B2AFA6',
},
......@@ -37,7 +37,7 @@ const styleSheet = createStyleSheet('MainDataPublisherSection', (theme) => ({
margin: '6px',
float: 'right',
},
}));
};
class MainDataPublisherSection extends React.Component<IMainDataPublisherSection, any> {
public constructor(props: any) {
......@@ -59,11 +59,11 @@ class MainDataPublisherSection extends React.Component<IMainDataPublisherSection
const {value} = this.state;
return (
<Grid container gutter={ 0 }>
<Grid container gutter={ 0 } className={ classes.root }>
<Grid container spacing={ 0 }>
<Grid container spacing={ 0 } className={ classes.root }>
<Grid item xs={ 6 } className={ classes.appBarrBox }>
<AppBar position="static" color="default" className={ classes.appBar }>
<Tabs value={ value } onChange={ this.handleChange } index={ value }
<Tabs value={ value } onChange={ this.handleChange }
indicatorColor="#88B943">
<Tab label="DATA IN PREPARATION"/>
......@@ -75,7 +75,7 @@ class MainDataPublisherSection extends React.Component<IMainDataPublisherSection
<Button className={ classes.buttonPublish }>PUBLISH PHENOTYPIC DATA</Button>
</Grid>
</Grid>
<Grid container gutter={ 0 }>
<Grid container spacing={ 0 }>
{ value === 0 && <DataInPreparation/> }
{ value === 1 && <DataPublished/> }
</Grid>
......
......@@ -2,7 +2,7 @@ import * as React from 'react';
import {connect} from 'react-redux';
import {Link} from 'react-router';
import Grid from 'material-ui/Grid';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import DataInPreparationItem from './data-preparation-item';
......@@ -12,13 +12,13 @@ interface IDataInPreparation extends React.ClassAttributes<any> {
params: any;
}
const styleSheet = createStyleSheet('DataInPreparation', (theme) => ({
const styleSheet = {
root: {
color: 'black',
margin: '0px',
backgroundColor: '#E8E5E0',
},
}));
};
class DataInPreparation extends React.Component<IDataInPreparation, any> {
......
import * as React from 'react';
import {connect} from 'react-redux';
import { Link } from 'react-router';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
interface IDataPublished extends React.ClassAttributes<any> {
classes: any;
......@@ -9,11 +9,11 @@ interface IDataPublished extends React.ClassAttributes<any> {
params: any;
}
const styleSheet = createStyleSheet('UserAccount', (theme) => ({
const styleSheet = {
root: {
color: 'black',
},
}));
};
class DataPublished extends React.Component<IDataPublished, any> {
......
......@@ -4,15 +4,7 @@ import {Link} from 'react-router';
import Grid from 'material-ui/Grid';
import Button from 'material-ui/Button';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import List, {
ListItem,
ListItemAvatar,
ListItemIcon,
ListItemSecondaryAction,
ListItemText,
} from 'material-ui/List';
import {withStyles} from 'material-ui/styles';
import Typography from 'material-ui/Typography';
interface IDataInPreparationItem extends React.ClassAttributes<any> {
......@@ -21,7 +13,7 @@ interface IDataInPreparationItem extends React.ClassAttributes<any> {
params: any;
}
const styleSheet = createStyleSheet('DataInPreparationItem', (theme) => ({
const styleSheet = {
root: {
margin: '8px',
backgroundColor: 'white',
......@@ -49,7 +41,7 @@ const styleSheet = createStyleSheet('DataInPreparationItem', (theme) => ({
infoBodyRight: {
padding: '8px',
},
}));
};
class DataInPreparationItem extends React.Component<IDataInPreparationItem, any> {
......@@ -58,9 +50,9 @@ class DataInPreparationItem extends React.Component<IDataInPreparationItem, any>
const {classes} = this.props;
return (
<Grid container gutter= { 0 } className={ classes.root }>
<Grid container spacing= { 0 } className={ classes.root }>
<Grid item xs={ 12 }>
<Grid container gutter= { 0 } className={ classes.title }>
<Grid container spacing= { 0 } className={ classes.title }>
<Grid item xs={ 1 }>
<Typography type="title" className={ classes.infoNumber }>
1
......@@ -75,7 +67,7 @@ class DataInPreparationItem extends React.Component<IDataInPreparationItem, any>
<Button raised className={ classes.titleEditButton }>EDIT</Button>
</Grid>
</Grid>
<Grid container gutter= { 0 }>
<Grid container spacing= { 0 }>
<Grid item xs={ 1 }/>
<Grid item xs={ 9 } className={ classes.infoBody }>
<div>
......
......@@ -2,7 +2,7 @@ import * as React from 'react';
import {connect} from 'react-redux';
import {Link} from 'react-router';
import Grid from 'material-ui/Grid';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
interface ITopDataPublisherSection extends React.ClassAttributes<any> {
classes: any;
......@@ -10,7 +10,7 @@ interface ITopDataPublisherSection extends React.ClassAttributes<any> {
params: any;
}
const styleSheet = createStyleSheet('TopDataPublisherSection', (theme) => ({
const styleSheet = {
header: {
backgroundColor: '#88ba42',
fontSize: '24px',
......@@ -26,7 +26,7 @@ const styleSheet = createStyleSheet('TopDataPublisherSection', (theme) => ({
fontSize: '12px',
margin: '0',
},
}));
};
class TopDataPublisherSection extends React.Component<ITopDataPublisherSection, any> {
......@@ -35,7 +35,7 @@ class TopDataPublisherSection extends React.Component<ITopDataPublisherSection,
const {classes} = this.props;
return (
<Grid container gutter={ 0 } className={ classes.root }>
<Grid container spacing={ 0 } className={ classes.root }>
<Grid item xs={ 12 } className={ classes.header }>
<h1 className={ classes.headText }>Data Publisher</h1>
<p className={ classes.infoText }>Manage your Catalog Published Descriptors</p>
......
import * as React from 'react';
import Grid from 'material-ui/Grid';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
const styleSheet = createStyleSheet('BottomSection', (theme) => ({
const styleSheet = {
root: {
padding: '20px 10px 20px',
backgroundColor: '#D8D6D0',
},
}));
};
const BottomSection = ({classes}) => (
<Grid container gutter={ 0 } className={ classes.root }>
<Grid container spacing={ 0 } className={ classes.root }>
* All fields marked with * are required.
</Grid>
);
......
......@@ -9,7 +9,7 @@ import BottomSection from './bottom-section';
import Container from '../../../common/container/index';
import {getDatasetRequest} from '../../../../actions/dataset';
import {Dataset} from '../../../../model/dataset.model';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
interface IDatasetProps extends React.ClassAttributes<any> {
children: React.ReactElement<any>;
......@@ -19,11 +19,11 @@ interface IDatasetProps extends React.ClassAttributes<any> {
classes: any;
}
const styleSheet = createStyleSheet('DatasetStepper', (theme) => ({
const styleSheet = {
column: {
padding: '10px 15px',
},
}));
};
class DatasetStepper extends React.Component<IDatasetProps, any> {
......@@ -43,7 +43,7 @@ class DatasetStepper extends React.Component<IDatasetProps, any> {
return (
<Grid container gutter={ 0 }>
<Grid container spacing={ 0 }>
<TopSection { ...rest } />
<Grid item xs={ 9 } className={ classes.column }>
{ React.cloneElement(children, rest) }
......
import * as React from 'react';
import {connect} from 'react-redux';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import CheckCircle from 'material-ui-icons/CheckCircle';
interface IStepProgressProps extends React.ClassAttributes<any> {
......@@ -9,7 +9,7 @@ interface IStepProgressProps extends React.ClassAttributes<any> {
completed: number;
}
const styleSheet = createStyleSheet('StepProgress', (theme) => ({
const styleSheet = {
root: {
margin: '0 16px',
height: '30px',
......@@ -34,7 +34,7 @@ const styleSheet = createStyleSheet('StepProgress', (theme) => ({
verticalAlign: 'middle',
lineHeight: 'normal',
},
}));
};
class StepProgress extends React.Component<IStepProgressProps, any> {
......
import * as React from 'react';
import {connect} from 'react-redux';
import { Link } from 'react-router';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import List, {ListItem, ListItemIcon, ListItemText} from 'material-ui/List';
import Typography from 'material-ui/Typography';
......@@ -14,7 +14,7 @@ interface IProgressMenuProps extends React.ClassAttributes<any> {
params: any;
}
const styleSheet = createStyleSheet('ProgressMenu', (theme) => ({
const styleSheet = (theme) => ({
/* tslint:disable */
root: {
width: '100%',
......@@ -30,7 +30,7 @@ const styleSheet = createStyleSheet('ProgressMenu', (theme) => ({
fontFamily: 'Roboto-Medium',
},
},
}));
});
class ProgressMenu extends React.Component<IProgressMenuProps, any> {
......
import * as React from 'react';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import Button from 'material-ui/Button';
interface IButtonNext extends React.ClassAttributes<any> {
......@@ -10,13 +10,13 @@ interface IButtonNext extends React.ClassAttributes<any> {
nextPageUrl: string;
};
const styleSheet = createStyleSheet('ButtonNext', (theme) => ({
const styleSheet = {
nextSection: {
width: '100%',
padding: '20px',
textAlign: 'center',
},
}));
};
class ButtonNext extends React.Component<IButtonNext, any> {
......
import * as React from 'react';
import {connect} from 'react-redux';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import {Field, reduxForm} from 'redux-form';
import {TextField} from '../../../../../common/text-field';
import {DATASET_LIST_OF_ACCESSION_FORM} from '../../../../../../constants/datasets';
......@@ -11,7 +11,7 @@ interface IListOfAccession extends React.ClassAttributes<any> {
handleSubmit: () => void;
}
const styleSheet = createStyleSheet('ListOfAccession', (theme) => ({
const styleSheet = {
/* tslint:disable */
root: {
......@@ -28,7 +28,7 @@ const styleSheet = createStyleSheet('ListOfAccession', (theme) => ({
fileSection: {
},
}));
};
class ListOfAccession extends React.Component<IListOfAccession, any> {
......
import * as React from 'react';
import {connect} from 'react-redux';
import {Field, FieldArray, reduxForm} from 'redux-form';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import {FormLabel, FormControl, FormControlLabel} from 'material-ui/Form';
import Button from 'material-ui/Button';
import {RadioGroup, LabelRadio} from 'material-ui/Radio';
import Radio, {RadioGroup} from 'material-ui/Radio';
import UploadSection from './upload-section';
import MaterialAutosuggest from '../../../../../common/material-autosuggest';
......@@ -19,11 +19,11 @@ interface ILoginContainerProps extends React.ClassAttributes<any> {
uuid: string;
}
const styleSheet = createStyleSheet('BasicInfoStep', (theme) => ({
const styleSheet = {
root: {
width: '100%',
},
}));
};
const renderRadioGroup = ({input, meta, ...rest}) => (
<FormControl required>
......@@ -36,9 +36,9 @@ const renderRadioGroup = ({input, meta, ...rest}) => (
(event, value) => input.onChange(value) // tslint:disable-line
}
>
<LabelRadio value="CC0" label="CC0"/>
<LabelRadio value="CC-BY" label="CC-BY"/>
<LabelRadio value="CC-BY-NC" label="CC-BY-NC"/>
<FormControlLabel value="CC0" label="CC0" control={ <Radio /> }/>
<FormControlLabel value="CC-BY" label="CC-BY" control={ <Radio /> }/>
<FormControlLabel value="CC-BY-NC" label="CC-BY-NC" control={ <Radio /> }/>
</RadioGroup>
</FormControl>
);
......
import * as React from 'react';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import {FormLabel, FormControl, FormControlLabel} from 'material-ui/Form';
import Button from 'material-ui/Button';
import Grid from 'material-ui/Grid';
......@@ -30,7 +30,7 @@ interface IUploadSectionProps extends React.ClassAttributes<any> {
deleteRepositoryFileRequest: (datasetUUID: string, fileRepositoryUUID: string) => any;
}
const styleSheet = createStyleSheet('UploadSection', (theme) => ({
const styleSheet: any = (theme) => ({
/* tslint:disable */
root: {
'& input[type="file"]': {
......@@ -68,7 +68,7 @@ const styleSheet = createStyleSheet('UploadSection', (theme) => ({
margin: theme.spacing.unit,
width: '100%',
},
}));
});
class UploadSection extends React.Component<IUploadSectionProps, any> {
......
......@@ -82,7 +82,7 @@ class DatasetCreator extends React.Component<IDatasetCreator, any> {
return (
<Grid gutter={ 0 } container>
<Grid spacing={ 0 } container>
<form>
<FieldArray name="creators" component={ this.renderCreators }/>
......
import * as React from 'react';
import {CircularProgress} from 'material-ui/Progress';
import {withStyles, createStyleSheet} from 'material-ui/styles';
import {withStyles} from 'material-ui/styles';
import Grid from 'material-ui/Grid';
import Typography from 'material-ui/Typography';
import LocationIcon from 'material-ui-icons/LocationOn';
......@@ -13,7 +13,7 @@ interface ILocationMapProps extends React.ClassAttributes<any> {
location: Location;
}
const styleSheet = createStyleSheet('LocationMap', (theme) => ({
const styleSheet = {
progress: {
margin: '0 auto',
},
......@@ -23,7 +23,7 @@ const styleSheet = createStyleSheet('LocationMap', (theme) => ({
locationIcon: {
marginLeft: '20px',
},
}));
};
class LocationMap extends React.Component<ILocationMapProps, any> {
......