upgrade (dep): upgrade react to latest version

This commit is contained in:
Mickael KERJEAN
2019-03-07 18:47:12 +11:00
parent faa1aa69b2
commit 581b89f700
12 changed files with 26 additions and 34 deletions
+1 -1
View File
@@ -248,6 +248,6 @@ const FormElement = (props) => {
return props.render($input, props, struct, props.onChange.bind(null, null));
};
FormElement.PropTypes = {
FormElement.propTypes = {
render: PropTypes.func.isRequired
};
+1 -1
View File
@@ -1,4 +1,4 @@
import React from 'react'
import React from 'react';
import PropTypes from 'prop-types';
export class NgIf extends React.Component {
+3 -3
View File
@@ -24,7 +24,7 @@ let LAST_PAGE_PARAMS = {
@ErrorPage
@LoggedInOnly
@EventReceiver
@DragDropContext(('ontouchstart' in window)? HTML5Backend : HTML5Backend)
@DragDropContext(HTML5Backend)
export class FilesPage extends React.Component {
constructor(props){
super(props);
@@ -238,13 +238,13 @@ export class FilesPage extends React.Component {
initialLoad={false} useWindow={false} loadMore={this.loadMore.bind(this)} threshold={100}>
<NgIf className="container" cond={!this.state.loading}>
<NgIf cond={this.state.path === '/'}>
<FrequentlyAccess files={this.state.frequents} default={this.state.files}/>
<FrequentlyAccess files={this.state.frequents} />
</NgIf>
<Submenu path={this.state.path} sort={this.state.sort} view={this.state.view} onSearch={this.onSearch.bind(this)} onViewUpdate={(value) => this.onView(value)} onSortUpdate={(value) => {this.onSort(value);}} accessRight={this.state.metadata || {}}></Submenu>
<NgIf cond={true}>
<FileSystem path={this.state.path} sort={this.state.sort} view={this.state.view}
files={this.state.files.slice(0, this.state.page_number * LOAD_PER_SCROLL)}
metadata={this.state.metadata} onSort={this.onSort.bind(this)} onView={this.onView.bind(this)} />
metadata={this.state.metadata || {}} onSort={this.onSort.bind(this)} onView={this.onView.bind(this)} />
</NgIf>
</NgIf>
</InfiniteScroll>
+1 -8
View File
@@ -5,7 +5,7 @@ import { DropTarget } from 'react-dnd';
import { EventEmitter, BreadCrumb, PathElement } from '../../components/';
import { pathBuilder } from '../../helpers/';
export class BreadCrumbTargettable extends BreadCrumb{
export class BreadCrumbTargettable extends BreadCrumb {
constructor(props){
super(props);
}
@@ -14,10 +14,6 @@ export class BreadCrumbTargettable extends BreadCrumb{
return super.render(Element);
}
}
BreadCrumbTargettable.PropTypes = {
path: PropTypes.string.isRequred
}
const fileTarget = {
canDrop(props){
@@ -63,6 +59,3 @@ class Element extends PathElement {
));
}
}
Element.PropTypes = {
path: PropTypes.string.isRequred
}
+2 -2
View File
@@ -22,7 +22,7 @@ export class FileSystem extends React.Component {
render() {
const metadata = this.props.metadata || {};
// TODO: https://reactjs.org/docs/higher-order-components.html#dont-use-hocs-inside-the-render-method
return this.props.connectDropFile(
<div className="component_filesystem">
<Container>
@@ -53,7 +53,7 @@ export class FileSystem extends React.Component {
}
}
FileSystem.PropTypes = {
FileSystem.propTypes = {
path: PropTypes.string.isRequired,
files: PropTypes.array.isRequired,
metadata: PropTypes.object.isRequired
+1 -1
View File
@@ -28,6 +28,6 @@ export class FileZone extends React.Component{
}
}
FileZone.PropTypes = {
FileZone.propTypes = {
path: PropTypes.string.isRequired
}
+1 -1
View File
@@ -283,7 +283,7 @@ const SuperCheckbox = (props) => {
</div>
);
};
SuperCheckbox.PropTypes = {
SuperCheckbox.propTypes = {
label: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
inputType: PropTypes.string,
+2 -3
View File
@@ -152,9 +152,8 @@ export class Submenu extends React.Component {
};
}
Submenu.PropTypes = {
accessRight: PropTypes.obj,
onCreate: PropTypes.func.isRequired,
Submenu.propTypes = {
accessRight: PropTypes.object,
onSortUpdate: PropTypes.func.isRequired,
sort: PropTypes.string.isRequired
};
+9 -8
View File
@@ -237,14 +237,15 @@ export class ExistingThing extends React.Component {
)));
}
}
ExistingThing.PropTypes = {
connectDragSource: PropTypes.func.isRequired,
isDragging: PropTypes.bool.isRequired,
fileIsOver: PropTypes.bool.isRequired,
nativeFileIsOver: PropTypes.bool.isRequired,
canDropFile: PropTypes.bool.isRequired,
canDropNativeFile: PropTypes.bool.isRequired
};
// TODO: https://reactjs.org/docs/higher-order-components.html#dont-use-hocs-inside-the-render-method
// ExistingThing.propTypes = {
// connectDragSource: PropTypes.func.isRequired,
// isDragging: PropTypes.bool.isRequired,
// fileIsOver: PropTypes.bool.isRequired,
// nativeFileIsOver: PropTypes.bool.isRequired,
// canDropFile: PropTypes.bool.isRequired,
// canDropNativeFile: PropTypes.bool.isRequired
// };
export default function ToggleableLink(props) {
const { disabled, ...rest } = props;
+2 -3
View File
@@ -112,9 +112,8 @@ export class NewThing extends React.Component {
};
}
NewThing.PropTypes = {
accessRight: PropTypes.obj,
onCreate: PropTypes.func.isRequired,
NewThing.propTypes = {
accessRight: PropTypes.object.isRequired,
onSortUpdate: PropTypes.func.isRequired,
sort: PropTypes.string.isRequired
};
+1 -1
View File
@@ -66,7 +66,7 @@ class DownloadButton extends React.Component {
);
}
}
DownloadButton.PropTypes = {
DownloadButton.propTypes = {
link: PropTypes.string.isRequired,
name: PropTypes.string.isRequired
};
+2 -2
View File
@@ -38,11 +38,11 @@
"node-sass": "^4.10.0",
"nodemon": "^1.17.1",
"prop-types": "^15.5.10",
"react": "^15.3.2",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-addons-css-transition-group": "^15.6.2",
"react-dnd": "^2.4.0",
"react-dnd-html5-backend-filedrop": "^1.0.0",
"react-dom": "^15.3.2",
"react-draggable": "^2.2.6",
"react-infinite-scroller": "^1.1.4",
"react-router": "^4.1.1",