Commit e8af97ea authored by Florent Chehab's avatar Florent Chehab
Browse files

Udated critical node packages

Created #49
parent 34d1f6e9
Pipeline #35336 passed with stages
in 4 minutes and 29 seconds
This diff is collapsed.
...@@ -20,24 +20,26 @@ ...@@ -20,24 +20,26 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@babel/core": "^7.0.0", "@babel/core": "^7.0.0",
"@material-ui/core": "^3.1.0", "@date-io/date-fns": "^1.1.0",
"@material-ui/icons": "^2.0.3", "@date-io/luxon": "^1.1.0",
"@material-ui/lab": "^3.0.0-alpha.16", "@material-ui/core": "^3.9.2",
"date-fns": "^2.0.0-alpha.16", "@material-ui/icons": "^3.0.2",
"downshift": "^2.2.0", "@material-ui/lab": "^3.0.0-alpha.30",
"date-fns": "^2.0.0-alpha.25",
"downshift": "^3.2.3",
"fuzzysort": "^1.1.4", "fuzzysort": "^1.1.4",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"leaflet": "^1.4.0", "leaflet": "^1.4.0",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"material-ui-pickers": "^1.0.0-rc.14", "material-ui-pickers": "^2.2.1",
"react": "^16.5.1", "react": "^16.8.2",
"react-awesome-slider": "^0.5.2", "react-awesome-slider": "^0.5.2",
"react-dom": "^16.5.1", "react-dom": "^16.8.2",
"react-leaflet": "^2.0.1", "react-leaflet": "^2.2.1",
"react-markdown": "^4.0.6", "react-markdown": "^4.0.6",
"react-redux": "^6.0.1", "react-redux": "^6.0.1",
"react-router-dom": "^4.3.1", "react-router-dom": "^4.3.1",
"react-swipeable-views": "^0.12.17", "react-swipeable-views": "^0.13.1",
"redux": "^4.0.1", "redux": "^4.0.1",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
...@@ -61,7 +63,7 @@ ...@@ -61,7 +63,7 @@
"node-sass": "^4.11.0", "node-sass": "^4.11.0",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"react-hot-loader": "^4.6.5", "react-hot-loader": "^4.7.1",
"react-lorem-component": "^0.13.0", "react-lorem-component": "^0.13.0",
"react-script": "^2.0.5", "react-script": "^2.0.5",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
......
...@@ -49,13 +49,15 @@ class ThemeProvider extends CustomComponentForAPI { ...@@ -49,13 +49,15 @@ class ThemeProvider extends CustomComponentForAPI {
customRender() { customRender() {
const font = { const siteSettings = {
typography: { typography: {
fontSize: 14, fontSize: 14,
htmlFontSize: 14 htmlFontSize: 14
} },
useNextVariants: true
}; };
const theme = Object.assign({}, this.state.theme, font);
const theme = Object.assign({}, this.state.theme, siteSettings);
return ( return (
<div> <div>
<MuiThemeProvider theme={createMuiTheme(theme)}> <MuiThemeProvider theme={createMuiTheme(theme)}>
......
...@@ -46,11 +46,11 @@ class UnivPopupContent extends Component { ...@@ -46,11 +46,11 @@ class UnivPopupContent extends Component {
/> />
<Divider /> <Divider />
<CardContent> <CardContent>
<Typography variant="subheading"> <Typography variant="subtitle1">
{city}, {country} {city}, {country}
</Typography> </Typography>
<Divider /> <Divider />
<Typography gutterBottom variant="headline"> <Typography gutterBottom variant="h5">
{name} {name}
</Typography> </Typography>
</CardContent> </CardContent>
......
...@@ -63,7 +63,7 @@ class PageHome extends React.Component { ...@@ -63,7 +63,7 @@ class PageHome extends React.Component {
return ( return (
<Paper className={classes.myPaper}> <Paper className={classes.myPaper}>
<Typography variant="display2"> <Typography variant="h3">
Bienvenue sur <em>Outgoing REX</em> Bienvenue sur <em>Outgoing REX</em>
</Typography> </Typography>
<Markdown source={source} /> <Markdown source={source} />
......
...@@ -20,7 +20,7 @@ class PageMap extends React.Component { ...@@ -20,7 +20,7 @@ class PageMap extends React.Component {
<Paper className={classes.myPaper}> <Paper className={classes.myPaper}>
<Grid container spacing={24}> <Grid container spacing={24}>
<Grid item xs={11}> <Grid item xs={11}>
<Typography variant="display1" gutterBottom> <Typography variant="h4" gutterBottom>
Exploration Cartographique Exploration Cartographique
</Typography> </Typography>
</Grid> </Grid>
......
...@@ -20,7 +20,7 @@ class PageSearch extends React.Component { ...@@ -20,7 +20,7 @@ class PageSearch extends React.Component {
<Paper className={classes.myPaper}> <Paper className={classes.myPaper}>
<Grid container spacing={24}> <Grid container spacing={24}>
<Grid item xs={11}> <Grid item xs={11}>
<Typography variant="display1" gutterBottom> <Typography variant="h4" gutterBottom>
Recherche d'une université Recherche d'une université
</Typography> </Typography>
</Grid> </Grid>
......
...@@ -20,7 +20,7 @@ class PageSettings extends React.Component { ...@@ -20,7 +20,7 @@ class PageSettings extends React.Component {
<Paper className={classes.myPaper}> <Paper className={classes.myPaper}>
<Grid container spacing={24}> <Grid container spacing={24}>
<Grid item xs={11}> <Grid item xs={11}>
<Typography variant="display1" gutterBottom> <Typography variant="h4" gutterBottom>
Paramètres Paramètres
</Typography> </Typography>
</Grid> </Grid>
......
...@@ -52,7 +52,7 @@ function ColorDemo(props) { ...@@ -52,7 +52,7 @@ function ColorDemo(props) {
<IconButton className={classes.menuButton} color="inherit" aria-label="Menu"> <IconButton className={classes.menuButton} color="inherit" aria-label="Menu">
<MenuIcon /> <MenuIcon />
</IconButton> </IconButton>
<Typography variant="title" color="inherit"> <Typography variant="h6" color="inherit">
Color sample Color sample
</Typography> </Typography>
</Toolbar> </Toolbar>
...@@ -70,4 +70,4 @@ ColorDemo.propTypes = { ...@@ -70,4 +70,4 @@ ColorDemo.propTypes = {
theme: PropTypes.object.isRequired, theme: PropTypes.object.isRequired,
}; };
export default withStyles(styles, { withTheme: true })(ColorDemo); export default withStyles(styles, { withTheme: true })(ColorDemo);
\ No newline at end of file
...@@ -234,7 +234,7 @@ class ColorTool extends CustomComponentForAPI { ...@@ -234,7 +234,7 @@ class ColorTool extends CustomComponentForAPI {
const caption = intent == "primary" ? "Couleur primaire" : "Couleur secondaire"; const caption = intent == "primary" ? "Couleur primaire" : "Couleur secondaire";
return ( return (
<Grid item xs={12} sm={6} md={4}> <Grid item xs={12} sm={6} md={4}>
<Typography gutterBottom variant="title"> <Typography gutterBottom variant="h6">
{caption} {caption}
</Typography> </Typography>
<div className={classes.sliderContainer}> <div className={classes.sliderContainer}>
......
...@@ -72,20 +72,20 @@ const renderers = { ...@@ -72,20 +72,20 @@ const renderers = {
switch (level) { switch (level) {
case 1: case 1:
variant = "headline"; variant = "h5";
break; break;
case 2: case 2:
variant = "title"; variant = "h6";
break; break;
case 3: case 3:
variant = "subheading"; variant = "subtitle1";
break; break;
case 4: case 4:
variant = "caption"; variant = "caption";
paragraph = true; paragraph = true;
break; break;
default: default:
variant = "body"; variant = "body2";
break; break;
} }
......
...@@ -82,7 +82,7 @@ class UniversityTemplate extends React.Component { ...@@ -82,7 +82,7 @@ class UniversityTemplate extends React.Component {
<Tabs <Tabs
value={value} value={value}
onChange={this.handleChange} onChange={this.handleChange}
scrollable={scroll} variant={scroll ? "scrollable" : "standard"}
centered={!scroll} centered={!scroll}
scrollButtons="on" scrollButtons="on"
indicatorColor="primary" indicatorColor="primary"
......
...@@ -42,11 +42,11 @@ function renderCore(rawModelData, classes, outsideData) { ...@@ -42,11 +42,11 @@ function renderCore(rawModelData, classes, outsideData) {
</Grid> </Grid>
<Grid item xs> <Grid item xs>
<Typography variant='headline'>{name}</Typography> <Typography variant='h5'>{name}</Typography>
<Typography variant='title'>{acronym}</Typography> <Typography variant='h6'>{acronym}</Typography>
<Divider /> <Divider />
<Typography variant='subheading'>{city}, {country}</Typography> <Typography variant='subtitle1'>{city}, {country}</Typography>
<Typography variant='body1'> Site internet&nbsp;:{" "} <Typography variant='body2'> Site internet&nbsp;:{" "}
{ {
website != "" ? website != "" ?
<TextLink href={website}>{website}</TextLink> <TextLink href={website}>{website}</TextLink>
......
...@@ -255,7 +255,7 @@ class Editor extends CustomComponentForAPI { ...@@ -255,7 +255,7 @@ class Editor extends CustomComponentForAPI {
<IconButton color="inherit" onClick={() => this.handleCloseEditorRequest()} aria-label="Close"> <IconButton color="inherit" onClick={() => this.handleCloseEditorRequest()} aria-label="Close">
<CloseIcon /> <CloseIcon />
</IconButton> </IconButton>
<Typography variant="title" color="inherit" className={classes.flex}> <Typography variant="h6" color="inherit" className={classes.flex}>
Mode édition Mode édition
</Typography> </Typography>
<Button color="inherit" onClick={() => this.handleSaveEditor()}> <Button color="inherit" onClick={() => this.handleSaveEditor()}>
......
...@@ -7,7 +7,7 @@ import { connect } from "react-redux"; ...@@ -7,7 +7,7 @@ import { connect } from "react-redux";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import Paper from "@material-ui/core/Paper"; import Paper from "@material-ui/core/Paper";
import Tooltip from "@material-ui/core/Tooltip"; import Tooltip from "@material-ui/core/Tooltip";
import Button from "@material-ui/core/Button"; import Fab from "@material-ui/core/Fab";
import Grid from "@material-ui/core/Grid"; import Grid from "@material-ui/core/Grid";
import Divider from "@material-ui/core/Divider"; import Divider from "@material-ui/core/Divider";
...@@ -74,15 +74,14 @@ class GenericGroupModule extends CustomComponentForAPI { ...@@ -74,15 +74,14 @@ class GenericGroupModule extends CustomComponentForAPI {
<Grid container spacing={8} alignItems='center'> <Grid container spacing={8} alignItems='center'>
<Grid item xs> <Grid item xs>
<Typography variant='title' align='center' color="textSecondary"><em>{groupTitle}</em></Typography> <Typography variant='h6' align='center' color="textSecondary"><em>{groupTitle}</em></Typography>
</Grid> </Grid>
<Grid item xs={2} style={{ textAlign: "right" }}> <Grid item xs={2} style={{ textAlign: "right" }}>
<Tooltip title={disabled ? "Vous ne pouvez pas ajouter d'élément" : "Ajouter un élément"} placement="top"> <Tooltip title={disabled ? "Vous ne pouvez pas ajouter d'élément" : "Ajouter un élément"} placement="top">
<div style={{ display: "inline-block" }}> {/* Needed to fire events for the tooltip when below is disabled! */} <div style={{ display: "inline-block" }}> {/* Needed to fire events for the tooltip when below is disabled! */}
<Button <Fab
variant='fab' size='small'
mini
aria-label="Ajouter un élément" aria-label="Ajouter un élément"
disabled={disabled} disabled={disabled}
style={disabled ? {} : { backgroundColor: green.A700 }} style={disabled ? {} : { backgroundColor: green.A700 }}
...@@ -90,7 +89,7 @@ class GenericGroupModule extends CustomComponentForAPI { ...@@ -90,7 +89,7 @@ class GenericGroupModule extends CustomComponentForAPI {
onClick={this.handleOpenEditor} onClick={this.handleOpenEditor}
> >
<AddIcon /> <AddIcon />
</Button> </Fab>
</div> </div>
</Tooltip> </Tooltip>
</Grid> </Grid>
......
...@@ -66,7 +66,7 @@ const styles = theme => ({ ...@@ -66,7 +66,7 @@ const styles = theme => ({
}, },
titleIcon: { titleIcon: {
paddingRight: theme.spacing.unit, paddingRight: theme.spacing.unit,
fontSize: theme.typography.display1.fontSize fontSize: theme.typography.h4.fontSize
} }
}); });
......
...@@ -110,7 +110,7 @@ class History extends React.Component { ...@@ -110,7 +110,7 @@ class History extends React.Component {
return ( return (
<div> <div>
<Typography variant='caption' align='center'>Les versions successives d'un même utilisateur ne sont pas enregistrés (dans de tels cas, seul la dernière est conservée).</Typography> <Typography variant='caption' align='center'>Les versions successives d'un même utilisateur ne sont pas enregistrés (dans de tels cas, seul la dernière est conservée).</Typography>
<Typography variant='title' align='center'>Version n°{this.state.versionInView + 1} du {dateInfo}</Typography> <Typography variant='h6' align='center'>Version n°{this.state.versionInView + 1} du {dateInfo}</Typography>
<Button <Button
variant='outlined' variant='outlined'
color="primary" color="primary"
...@@ -182,7 +182,7 @@ class History extends React.Component { ...@@ -182,7 +182,7 @@ class History extends React.Component {
<IconButton color="inherit" onClick={() => { this.props.handleCloseHistory(); this.props.resetVersions(); }} aria-label="Close"> <IconButton color="inherit" onClick={() => { this.props.handleCloseHistory(); this.props.resetVersions(); }} aria-label="Close">
<CloseIcon /> <CloseIcon />
</IconButton> </IconButton>
<Typography variant="title" color="inherit" className={classes.flex}> <Typography variant="h6" color="inherit" className={classes.flex}>
Parcours de l'historique Parcours de l'historique
</Typography> </Typography>
</Toolbar> </Toolbar>
......
...@@ -101,7 +101,7 @@ class PendingModeration extends React.Component { ...@@ -101,7 +101,7 @@ class PendingModeration extends React.Component {
<IconButton color="inherit" onClick={() => { this.props.handleClosePendingModeration(); }} aria-label="Close"> <IconButton color="inherit" onClick={() => { this.props.handleClosePendingModeration(); }} aria-label="Close">
<CloseIcon /> <CloseIcon />
</IconButton> </IconButton>
<Typography variant="title" color="inherit" className={classes.flex}> <Typography variant="h6" color="inherit" className={classes.flex}>
Version en attente de modération Version en attente de modération
</Typography> </Typography>
</Toolbar> </Toolbar>
......
...@@ -91,7 +91,7 @@ class Scholarship extends React.Component { ...@@ -91,7 +91,7 @@ class Scholarship extends React.Component {
return ( return (
<div> <div>
<Typography className={classes.item} variant='headline'> Avantage financier : </Typography> <Typography className={classes.item} variant='h5'> Avantage financier : </Typography>
{ {
amountMin !== null ? ( amountMin !== null ? (
<div> <div>
...@@ -116,7 +116,7 @@ class Scholarship extends React.Component { ...@@ -116,7 +116,7 @@ class Scholarship extends React.Component {
return ( return (
<div> <div>
<Typography className={classes.item} variant='headline' > Autre(s) avantage(s) : </Typography> <Typography className={classes.item} variant='h5' > Autre(s) avantage(s) : </Typography>
{ {
otherAdvantages != "" && otherAdvantages !== null ? otherAdvantages != "" && otherAdvantages !== null ?
<Markdown source={otherAdvantages} /> <Markdown source={otherAdvantages} />
...@@ -132,11 +132,11 @@ class Scholarship extends React.Component { ...@@ -132,11 +132,11 @@ class Scholarship extends React.Component {
return ( return (
<div> <div>
<Typography className={classes.item} variant='headline'>{type}</Typography> <Typography className={classes.item} variant='h5'>{type}</Typography>
{this.renderFinancialAdvantage()} {this.renderFinancialAdvantage()}
<div style={{ height: 2 * theme.spacing.unit }} /> <div style={{ height: 2 * theme.spacing.unit }} />
{this.renderOtherAdvantages()} {this.renderOtherAdvantages()}
<Typography className={classes.item} variant='headline'> Informations complémentaires : </Typography> <Typography className={classes.item} variant='h5'> Informations complémentaires : </Typography>
<Markdown source={comment} /> <Markdown source={comment} />
</div> </div>
); );
......
import React from "react"; import React from "react";
import DatePicker from "material-ui-pickers/DatePicker";
import DateFnsUtils from "material-ui-pickers/utils/date-fns-utils";
import MuiPickersUtilsProvider from "material-ui-pickers/utils/MuiPickersUtilsProvider";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import compose from "recompose/compose"; import compose from "recompose/compose";
import withStyles from "@material-ui/core/styles/withStyles"; import withStyles from "@material-ui/core/styles/withStyles";
import { DatePicker, MuiPickersUtilsProvider } from "material-ui-pickers";
import DateFnsUtils from "@date-io/date-fns";
import frLocale from "date-fns/locale/fr"; import frLocale from "date-fns/locale/fr";
import format from "date-fns/format"; import format from "date-fns/format";
...@@ -21,9 +21,15 @@ const styles = theme => ({ ...@@ -21,9 +21,15 @@ const styles = theme => ({
}); });
/**
* Class to customize the header of the date selection box
*
* @class LocalizedUtils
* @extends {DateFnsUtils}
*/
class LocalizedUtils extends DateFnsUtils { class LocalizedUtils extends DateFnsUtils {
getDatePickerHeaderText(date) { getDatePickerHeaderText(date) {
return format(date, "d MMM YYYY", { locale: this.locale }); return format(date, "d MMM yyyy", { locale: this.locale });
} }
} }
...@@ -58,7 +64,7 @@ class DateField extends Field { ...@@ -58,7 +64,7 @@ class DateField extends Field {
<MuiPickersUtilsProvider utils={LocalizedUtils} locale={frLocale}> <MuiPickersUtilsProvider utils={LocalizedUtils} locale={frLocale}>
<DatePicker <DatePicker
clearable clearable
format="d MMM YYYY" format="d MMM yyyy"
value={this.state.value} value={this.state.value}
onChange={this.handleDateChange} onChange={this.handleDateChange}
clearLabel="vider" clearLabel="vider"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment