Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
0548cbb7
Commit
0548cbb7
authored
Feb 27, 2019
by
Florent Chehab
Browse files
Fixed some lacking proptypes
parent
8c1a9051
Pipeline
#35619
passed with stages
in 4 minutes and 51 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/App.js
View file @
0548cbb7
...
...
@@ -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
,
...
...
frontend/src/components/ThemeProvider.js
View file @
0548cbb7
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
,
...
...
frontend/src/components/filter/Filter.js
View file @
0548cbb7
...
...
@@ -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
{
...
...
frontend/src/components/map/UnivMakers.js
View file @
0548cbb7
...
...
@@ -18,6 +18,7 @@ import arrayOfInstancesToMap from "../../utils/arrayOfInstancesToMap";
*
* @class UnivMarkers
* @extends {CustomComponentForAPI}
* @extends React.Component
*/
class
UnivMarkers
extends
CustomComponentForAPI
{
...
...
frontend/src/components/pages/PageUniversity.js
View file @
0548cbb7
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
...
...
frontend/src/components/search/Search.js
View file @
0548cbb7
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
)
=>
{
...
...
frontend/src/components/settings/ColorTools.js
View file @
0548cbb7
...
...
@@ -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
,
};
...
...
frontend/src/components/university/shared/GenericGroupModule.js
View file @
0548cbb7
...
...
@@ -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
,
};
...
...
frontend/src/components/university/shared/GenericModule.js
View file @
0548cbb7
...
...
@@ -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
,
};
...
...
frontend/src/components/university/shared/Module.js
View file @
0548cbb7
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
;
frontend/src/components/university/shared/UnivInfoProvider.js
View file @
0548cbb7
...
...
@@ -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
)
=>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment