Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump React to version 16.14.0 #501

Merged
merged 7 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
350 changes: 160 additions & 190 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
"moment": "^2.29.4",
"panda-session": "0.1.6",
"phantomjs-prebuilt": "^2.1.14",
"prop-types": "^15.8.1",
"q": "1.4.1",
"ramda": "^0.18.0",
"react": "^15.3.0",
"react-addons-css-transition-group": "^15.3.0",
"react-dom": "^15.3.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-dropzone": "^3.0",
"react-redux": "^5.1.0",
"react-router": "^2.6.1",
"react-tooltip": "^1.1.2",
"react-widgets": "^3.1.0",
"react-router": "^3.2.6",
"react-tooltip": "^4.5.1",
"react-transition-group": "^1.2.1",
"react-widgets": "^4.6.1",
"react-widgets-moment": "4.0.30",
"redux": "^4.0.5",
"redux-logger": "^2.0.4",
"redux-thunk": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions public/components/BatchTag.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class BatchTag extends React.Component {
}
}

componentWillUpdate(newProps, newState) {
UNSAFE_componentWillUpdate(newProps, newState) {
const prevCount = this.state.selectedContent.length;
const newCount = newState.selectedContent.length;
if (prevCount === 0 && newCount > 0) {
Expand All @@ -42,7 +42,7 @@ export class BatchTag extends React.Component {
}
}

componentWillUnmount() {
UNSAFE_componentWillUnmount() {
window.onbeforeunload = null;
}

Expand Down
2 changes: 1 addition & 1 deletion public/components/BatchTag/BatchFilters.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SectionSelect from '../utils/SectionSelect.react';

import DateTimePicker from 'react-widgets/lib/DateTimePicker';
import DateTimePickerCSS from 'react-widgets/dist/css/react-widgets.css';
import momentLocalizer from 'react-widgets/lib/localizers/moment';
import momentLocalizer from 'react-widgets-moment';
momentLocalizer(moment);

const CAPI_DATE_FORMAT = 'YYYY-MM-DD';
Expand Down
6 changes: 3 additions & 3 deletions public/components/BatchTagControls/BatchTagControls.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
import TagSelect from '../utils/TagSelect';
import tagManagerApi from '../../util/tagManagerApi';
import { browserHistory } from 'react-router'
Expand Down Expand Up @@ -173,14 +173,14 @@ export default class BatchTagControls extends React.Component {

const {toAddToTop, toAddToBottom, toRemove} = this.state;
return (
<ReactCSSTransitionGroup transitionName="batch-status-transition" transitionEnterTimeout={500} transitionLeaveTimeout={500}>
<CSSTransitionGroup transitionName="batch-status-transition" transitionEnterTimeout={500} transitionLeaveTimeout={500}>
<div className="batch-status__container">
<div className="batch-status">
{this.renderMode()}
</div>
{toAddToTop.length + toAddToBottom.length + toRemove.length > 0 ? this.renderBasket() : false}
</div>
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
);
}
}
2 changes: 1 addition & 1 deletion public/components/JobStatus/JobStatus.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class JobStatus extends React.Component {
this.jobCheck = setInterval(this.fetchJobs.bind(this), 5000);
}

componentWillUnmount() {
UNSAFE_componentWillUnmount() {
clearInterval(this.jobCheck);
}

Expand Down
2 changes: 1 addition & 1 deletion public/components/Pillar/PillarList.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PillarList extends React.Component {
browserHistory.push(path);
}

componentWillMount() {
UNSAFE_componentWillMount() {
if (!this.props.pillars || !this.props.pillars.length) {
this.props.pillarActions.getPillars();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';

export default class PillarSectionsList extends React.Component {
renderFinalRow() {
Expand Down Expand Up @@ -31,6 +32,6 @@ export default class PillarSectionsList extends React.Component {
}

PillarSectionsList.propTypes = {
title: React.PropTypes.string.isRequired,
actionButton: React.PropTypes.node
title: PropTypes.string.isRequired,
actionButton: PropTypes.node
}
2 changes: 1 addition & 1 deletion public/components/SectionEdit/SectionName.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class SectionNameEdit extends React.Component {
this.state = inferLockStateFromProps(props);
}

componentWillReceiveProps(props) {
UNSAFE_componentWillReceiveProps(props) {
this.setState(inferLockStateFromProps(props));
}

Expand Down
2 changes: 1 addition & 1 deletion public/components/SectionList/SectionList.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SectionList extends React.Component {
browserHistory.push(path);
}

componentWillMount() {
UNSAFE_componentWillMount() {
if (!this.props.sections || !this.props.sections.length) {
this.props.sectionActions.getSections();
}
Expand Down
2 changes: 1 addition & 1 deletion public/components/SponsorshipEdit/TargetingEdit.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import R from 'ramda';
import moment from 'moment';

import DateTimePicker from 'react-widgets/lib/DateTimePicker';
import momentLocalizer from 'react-widgets/lib/localizers/moment';
import momentLocalizer from 'react-widgets-moment';

import {allowedEditions} from '../../constants/allowedEditions';
import SectionSelect from '../utils/SectionSelect.react';
Expand Down
2 changes: 1 addition & 1 deletion public/components/SponsorshipEdit/ValidityEdit.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import moment from 'moment';

import DateTimePicker from 'react-widgets/lib/DateTimePicker';
import momentLocalizer from 'react-widgets/lib/localizers/moment';
import momentLocalizer from 'react-widgets-moment';

momentLocalizer(moment);

Expand Down
2 changes: 1 addition & 1 deletion public/components/Status.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Status extends React.Component {
this.jobCheck = setInterval(this.fetchJobs.bind(this), 15000);
}

componentWillUnmount() {
UNSAFE_componentWillUnmount() {
clearInterval(this.jobCheck);
}

Expand Down
2 changes: 1 addition & 1 deletion public/components/Tag/Display.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TagDisplay extends React.Component {
}
}

componentWillReceiveProps(props) {
UNSAFE_componentWillReceiveProps(props) {
if (props.tag.id !== parseInt(props.routeParams.tagId, 10)) {
props.tagActions.getTag(parseInt(props.routeParams.tagId, 10));
}
Expand Down
2 changes: 1 addition & 1 deletion public/components/Tag/TagAudit.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class TagAudit extends React.Component {
this.fetchAudit();
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if(this.props.saveState === 'SAVE_STATE_INPROGRESS' && nextProps.saveState === 'SAVE_STATE_CLEAN') { //I.E a save just completed
this.fetchAudit();
}
Expand Down
6 changes: 3 additions & 3 deletions public/components/Tag/TagValidation.react.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';

export default class TagValidation extends React.Component {

Expand All @@ -23,9 +23,9 @@ export default class TagValidation extends React.Component {
return (
<div className="tag-validation">
<div className="tag-validation__header">Validation</div>
<ReactCSSTransitionGroup transitionName="validation-transition" transitionEnter={false} transitionLeaveTimeout={500}>
<CSSTransitionGroup transitionName="validation-transition" transitionEnter={false} transitionLeaveTimeout={500}>
{this.props.validations.map(this.renderValidationResult, this)}
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
</div>
);
}
Expand Down
9 changes: 5 additions & 4 deletions public/components/TagContext/TagReferenceList.react.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';

/**
* Renders the table header and the passed content & action button for the
Expand Down Expand Up @@ -30,7 +31,7 @@ export default class TagReferenceList extends React.Component {
<table className={"grid-table tag-references " + this.props.tableClassName}>
<thead className="tag-references__header">
<tr>
{this.props.headers.map(h => <th>{h}</th>)}
{this.props.headers.map((h, index) => <th key={index}>{h}</th>)}
</tr>
</thead>
<tbody className="tag-references__references">
Expand All @@ -44,7 +45,7 @@ export default class TagReferenceList extends React.Component {
}

TagReferenceList.propTypes = {
title: React.PropTypes.string.isRequired,
headers: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
actionButton: React.PropTypes.node
title: PropTypes.string.isRequired,
headers: PropTypes.arrayOf(PropTypes.string).isRequired,
actionButton: PropTypes.node
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class TagRelationship extends React.Component {
});
}

componentWillReceiveProps(props) {
UNSAFE_componentWillReceiveProps(props) {
props.tag.parents.forEach(parentId => {
this.fetchTagInformation(parentId);
});
Expand Down Expand Up @@ -70,20 +70,20 @@ export default class TagRelationship extends React.Component {
}));
}

renderTag(tagId) {
renderTag(tagId, index) {

const tag = this.state.cachedTags[tagId];

if (!tag) {
return (
<tr>
<td colspan="3">Fetching tag #{tagId}</td>
<tr key={index}>
<td colSpan="3">Fetching tag #{tagId}</td>
</tr>
)
}

return (
<tr>
<tr key={index}>
<td><Link to={`/tag/${tag.id}`}>{tag.internalName}</Link></td>
<td>{tag.type}</td>
<td onClick={this.removeParentTag.bind(this, tag)}><i className="i-delete clickable-icon" /></td>
Expand Down Expand Up @@ -122,7 +122,7 @@ export default class TagRelationship extends React.Component {
</tr>
</thead>
<tbody className="tag-references__references">
{this.props.tag.parents.map(this.renderTag)}
{this.props.tag.parents.map((tag, index) => this.renderTag(tag, index))}
<tr>
<td colSpan="3" className="tag-references__addrow">
{this.renderAddTagToContext()}
Expand Down
2 changes: 1 addition & 1 deletion public/components/TagEdit/formComponents/TagName.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class TagNameEdit extends React.Component {
this.getPathPrefixForSection = this.getPathPrefixForSection.bind(this);
}

componentWillReceiveProps(props) {
UNSFE_componentWillReceiveProps(props) {
this.setState(inferLockStateFromProps(props));
}

Expand Down
2 changes: 1 addition & 1 deletion public/components/utils/ReactScribe.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class ReactScribe extends React.Component {
}
}

componentWillUnmount() {
UNSAFE_componentWillUnmount() {
if (!this.props.disabled) {
this.scribe.off('content-changed', this.onContentChange);
}
Expand Down
6 changes: 3 additions & 3 deletions public/components/utils/SaveButton.react.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
import {saveState} from "../../reducers/rootReducer"
import ProgressSpinner from "../utils/ProgressSpinner.react"

Expand Down Expand Up @@ -41,9 +41,9 @@ export default class SaveButton extends React.Component {

render () {
return (
<ReactCSSTransitionGroup transitionName="save-transition" transitionEnterTimeout={500} transitionLeaveTimeout={500}>
<CSSTransitionGroup transitionName="save-transition" transitionEnterTimeout={500} transitionLeaveTimeout={500}>
{this.renderButtons()}
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
);
}
}