Commit 0548cbb7 authored by Florent Chehab's avatar Florent Chehab

Fixed some lacking proptypes

parent 8c1a9051
Pipeline #35619 passed with stages
in 4 minutes and 51 seconds
......@@ -36,6 +36,11 @@ import PageSettings from "./pages/PageSettings";
const DRAWER_WIDTH = 240;
/**
* @class App
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class App extends CustomComponentForAPI {
state = {
open: true,
......
import React from "react";
import PropTypes from "prop-types";
import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider";
import createMuiTheme from "@material-ui/core/styles/createMuiTheme";
import { connect } from "react-redux";
......@@ -19,6 +21,8 @@ import { saveAppTheme } from "../actions/theme";
*
* @class ThemeProvider
* @extends {CustomComponentForAPI}
* @extends React.Component
*
*/
class ThemeProvider extends CustomComponentForAPI {
state = { theme: this.props.themeSavedInTheApp.theme };
......@@ -81,6 +85,13 @@ class ThemeProvider extends CustomComponentForAPI {
}
}
ThemeProvider.propTypes = {
themeSavedInTheApp: PropTypes.object.isRequired,
saveUserData: PropTypes.func.isRequired,
saveTheme: PropTypes.func.isRequired,
children: PropTypes.node.isRequired,
};
const mapStateToProps = (state) => {
return {
themeSavedInTheApp: state.app.appTheme,
......
......@@ -21,6 +21,7 @@
import React from "react";
import PropTypes from "prop-types";
import DownshiftMultiple from "./DownshiftMultiple";
import CustomComponentForAPI from "../CustomComponentForAPI";
......@@ -43,6 +44,7 @@ import getActions from "../../api/getActions";
*
* @class Filter
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class Filter extends CustomComponentForAPI {
......@@ -109,6 +111,12 @@ class Filter extends CustomComponentForAPI {
}
}
Filter.propTypes = {
classes: PropTypes.object.isRequired,
saveConfig: PropTypes.func.isRequired,
saveSelection: PropTypes.func.isRequired,
countriesFilterConfig: PropTypes.array
};
const mapStateToProps = (state) => {
return {
......
......@@ -18,6 +18,7 @@ import arrayOfInstancesToMap from "../../utils/arrayOfInstancesToMap";
*
* @class UnivMarkers
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class UnivMarkers extends CustomComponentForAPI {
......
import React from "react";
// import PropTypes from "prop-types";
import PropTypes from "prop-types";
import Typography from "@material-ui/core/Typography";
import Paper from "@material-ui/core/Paper";
import CustomComponentForAPI from "../CustomComponentForAPI";
......@@ -30,6 +30,7 @@ import {
*
* @class PageUniversity
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class PageUniversity extends CustomComponentForAPI {
......@@ -73,10 +74,13 @@ class PageUniversity extends CustomComponentForAPI {
}
PageUniversity.propTypes = {
universityBeingViewed: PropTypes.string,
universities: PropTypes.object.isRequired,
match: PropTypes.object,
saveUniversityInView: PropTypes.func.isRequired,
};
function renderUniversityNotFound() {
return (
<Dialog
......
import React from "react";
import PropTypes from "prop-types";
import TextField from "@material-ui/core/TextField";
import CustomComponentForAPI from "../CustomComponentForAPI";
......@@ -16,6 +18,8 @@ import getActions from "../../api/getActions";
*
* @class Search
* @extends {CustomComponentForAPI}
* @extends React.Component
*
*/
class Search extends CustomComponentForAPI {
state = {
......@@ -56,6 +60,10 @@ class Search extends CustomComponentForAPI {
}
}
Search.propTypes = {
classes: PropTypes.object.isRequired,
};
const mapStateToProps = (state) => {
......
......@@ -56,6 +56,7 @@ const SHADES = [900, 800, 700, 600, 500, 400, 300, 200, 100, 50, "A700", "A400",
*
* @class ColorTool
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class ColorTool extends CustomComponentForAPI {
......@@ -331,6 +332,12 @@ class ColorTool extends CustomComponentForAPI {
ColorTool.propTypes = {
classes: PropTypes.object.isRequired,
theme: PropTypes.object.isRequired,
state: PropTypes.object.isRequired,
saveColorPicker: PropTypes.func.isRequired,
saveTheme: PropTypes.func.isRequired,
currentUiTheme: PropTypes.object.isRequired,
saveToServer: PropTypes.func.isRequired,
userData: PropTypes.object.isRequired,
};
......
......@@ -42,6 +42,11 @@ const styles = theme => ({
/**
* @class GenericGroupModule
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class GenericGroupModule extends CustomComponentForAPI {
state = {
editorOpen: false,
......@@ -105,6 +110,11 @@ class GenericGroupModule extends CustomComponentForAPI {
GenericGroupModule.propTypes = {
groupTitle: PropTypes.string.isRequired,
endPoint: PropTypes.string.isRequired,
invalidateGroup: PropTypes.func.isRequired,
classes: PropTypes.object.isRequired,
propsForEditor: PropTypes.object.isRequired,
children: PropTypes.node.isRequired,
userData: PropTypes.object.isRequired,
};
......
......@@ -24,6 +24,11 @@ import History from "./History";
import PendingModeration from "./PendingModeration";
/**
* @class GenericModule
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class GenericModule extends CustomComponentForAPI {
state = {
editorOpen: false,
......@@ -205,6 +210,7 @@ GenericModule.propTypes = {
parseRawModelData: PropTypes.func.isRequired,
coreClasses: PropTypes.object.isRequired,
outsideData: PropTypes.object,
userData: PropTypes.object.isRequired,
__apiAttr: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
moduleInGroupInfos: PropTypes.shape({ isInGroup: PropTypes.bool.isRequired, invalidateGroup: PropTypes.func }).isRequired,
};
......
import PropTypes from "prop-types";
import CustomComponentForAPI from "../../CustomComponentForAPI";
/**
* @class Module
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class Module extends CustomComponentForAPI {
// prevent hard reset of module when refetching
// ignoreInvalidation = true;
......@@ -16,5 +22,9 @@ class Module extends CustomComponentForAPI {
}
}
Module.propTypes = {
invalidateData: PropTypes.func.isRequired,
};
export default Module;
......@@ -10,6 +10,11 @@ import getActions from "../../../api/getActions";
/**
* @class UnivInfoProvider
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class UnivInfoProvider extends CustomComponentForAPI {
customRender() {
const { univId } = this.props,
......@@ -28,6 +33,7 @@ class UnivInfoProvider extends CustomComponentForAPI {
UnivInfoProvider.propTypes = {
univId: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
};
const mapStateToProps = (state) => {
......
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