diff options
156 files changed, 865 insertions, 632 deletions
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index bf0c23036be..911274faf74 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -11,6 +11,7 @@ "blueimp-md5": "1.1.1", "classnames": "2.2.0", "clipboard": "1.5.5", + "create-react-class": "15.6.0", "d3-array": "1.1.1", "d3-hierarchy": "1.1.4", "d3-scale": "1.0.5", @@ -24,16 +25,16 @@ "lodash": "4.6.1", "moment": "2.10.6", "numeral": "1.5.3", - "rc-tooltip": "^3.4.2", - "react": "15.4.2", - "react-dom": "15.4.2", - "react-draggable": "2.2.3", - "react-helmet": "3.1.0", - "react-modal": "^1.6.4", - "react-redux": "4.4.1", - "react-router": "3.0.2", - "react-select": "^1.0.0-rc.2", - "react-virtualized": "^9.1.0", + "rc-tooltip": "3.4.7", + "react": "15.6.1", + "react-dom": "15.6.1", + "react-draggable": "2.2.6", + "react-helmet": "5.1.3", + "react-modal": "2.2.2", + "react-redux": "5.0.5", + "react-router": "3.0.5", + "react-select": "1.0.0-rc.5", + "react-virtualized": "9.9.0", "redux": "3.3.1", "redux-logger": "2.2.1", "redux-thunk": "1.0.2", @@ -57,8 +58,8 @@ "babel-preset-react": "^6.22.0", "chalk": "1.1.3", "css-loader": "0.28.4", - "enzyme": "^2.6.0", - "enzyme-to-json": "^1.4.5", + "enzyme": "2.9.1", + "enzyme-to-json": "1.5.1", "eslint": "3.14.1", "eslint-loader": "1.8.0", "eslint-plugin-flowtype": "^2.29.1", @@ -76,9 +77,10 @@ "less-loader": "4.0.4", "postcss-loader": "2.0.6", "prettier": "1.5.2", - "react-addons-test-utils": "15.4.2", + "prop-types": "15.5.10", "react-dev-utils": "3.0.0", "react-error-overlay": "1.0.7", + "react-test-renderer": "15.6.1", "rimraf": "2.5.4", "style-loader": "0.18.2", "webpack": "2.6.1", @@ -108,8 +110,15 @@ ], "jest": { "coverageDirectory": "<rootDir>/target/coverage", - "coveragePathIgnorePatterns": ["<rootDir>/node_modules", "<rootDir>/tests"], - "moduleFileExtensions": ["jsx", "js", "json"], + "coveragePathIgnorePatterns": [ + "<rootDir>/node_modules", + "<rootDir>/tests" + ], + "moduleFileExtensions": [ + "jsx", + "js", + "json" + ], "moduleNameMapper": { "^.+\\.(hbs|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/config/jest/FileStub.js", "^.+\\.css$": "<rootDir>/config/jest/CSSStub.js" @@ -118,7 +127,9 @@ "<rootDir>/config/polyfills.js", "<rootDir>/config/jest/SetupTestEnvironment.js" ], - "snapshotSerializers": ["enzyme-to-json/serializer"], + "snapshotSerializers": [ + "enzyme-to-json/serializer" + ], "testPathIgnorePatterns": [ "<rootDir>/node_modules", "<rootDir>/src/main/webapp", diff --git a/server/sonar-web/src/main/js/app/components/App.js b/server/sonar-web/src/main/js/app/components/App.js index ea68bd92461..21b2e7e6f96 100644 --- a/server/sonar-web/src/main/js/app/components/App.js +++ b/server/sonar-web/src/main/js/app/components/App.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import GlobalLoading from './GlobalLoading'; import { fetchCurrentUser } from '../../store/users/actions'; @@ -28,10 +29,10 @@ class App extends React.PureComponent { mounted: boolean; static propTypes = { - fetchAppState: React.PropTypes.func.isRequired, - fetchCurrentUser: React.PropTypes.func.isRequired, - fetchLanguages: React.PropTypes.func.isRequired, - children: React.PropTypes.element.isRequired + fetchAppState: PropTypes.func.isRequired, + fetchCurrentUser: PropTypes.func.isRequired, + fetchLanguages: PropTypes.func.isRequired, + children: PropTypes.element.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/app/components/Landing.js b/server/sonar-web/src/main/js/app/components/Landing.js index 9cd07a0d4ba..2d69e4686ca 100644 --- a/server/sonar-web/src/main/js/app/components/Landing.js +++ b/server/sonar-web/src/main/js/app/components/Landing.js @@ -19,14 +19,14 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { withRouter } from 'react-router'; import { connect } from 'react-redux'; import { getCurrentUser } from '../../store/rootReducer'; class Landing extends React.PureComponent { static propTypes = { - currentUser: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.object]) - .isRequired + currentUser: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]).isRequired }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/app/components/help/__tests__/__snapshots__/GlobalHelp-test.js.snap b/server/sonar-web/src/main/js/app/components/help/__tests__/__snapshots__/GlobalHelp-test.js.snap index 37587136dbb..e9a2ed0ec03 100644 --- a/server/sonar-web/src/main/js/app/components/help/__tests__/__snapshots__/GlobalHelp-test.js.snap +++ b/server/sonar-web/src/main/js/app/components/help/__tests__/__snapshots__/GlobalHelp-test.js.snap @@ -3,6 +3,7 @@ exports[`does not show tutorials for anonymous 1`] = ` <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal modal-medium" closeTimeoutMS={0} contentLabel="help" diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js index c7f17f3a9cd..f584506a493 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import QualifierIcon from '../../../../components/shared/QualifierIcon'; @@ -29,9 +30,9 @@ import { collapsePath, limitComponentName } from '../../../../helpers/path'; class ComponentNavBreadcrumbs extends React.PureComponent { static propTypes = { - breadcrumbs: React.PropTypes.array, - component: React.PropTypes.shape({ - visibility: React.PropTypes.string + breadcrumbs: PropTypes.array, + component: PropTypes.shape({ + visibility: PropTypes.string }).isRequired }; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavFavorite.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavFavorite.js index 6b3fd012d28..9d6c59c000b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavFavorite.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavFavorite.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import Favorite from '../../../../components/controls/Favorite'; import { getCurrentUser } from '../../../../store/rootReducer'; class ComponentNavFavorite extends React.PureComponent { static propTypes = { - currentUser: React.PropTypes.object.isRequired + currentUser: PropTypes.object.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.js index c484fa2b50c..b77945b4d47 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import classNames from 'classnames'; import NavBarTabs from '../../../../components/nav/NavBarTabs'; @@ -39,8 +40,8 @@ const SETTINGS_URLS = [ export default class ComponentNavMenu extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - conf: React.PropTypes.object.isRequired + component: PropTypes.object.isRequired, + conf: PropTypes.object.isRequired }; isProject() { diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js index 968a9d109eb..55237996772 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import { getSettingValue, getCurrentUser } from '../../../../store/rootReducer'; @@ -25,8 +26,8 @@ import { translate } from '../../../../helpers/l10n'; class GlobalNavBranding extends React.PureComponent { static propTypes = { - customLogoUrl: React.PropTypes.string, - customLogoWidth: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]) + customLogoUrl: PropTypes.string, + customLogoWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) }; renderLogo() { diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js index 7d7437238bf..89053dedf89 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import { translate } from '../../../../helpers/l10n'; import { getQualityGatesUrl } from '../../../../helpers/urls'; @@ -25,10 +26,10 @@ import { isMySet } from '../../../../apps/issues/utils'; export default class GlobalNavMenu extends React.PureComponent { static propTypes = { - appState: React.PropTypes.object.isRequired, - currentUser: React.PropTypes.object.isRequired, - location: React.PropTypes.shape({ - pathname: React.PropTypes.string.isRequired + appState: PropTypes.object.isRequired, + currentUser: PropTypes.object.isRequired, + location: PropTypes.shape({ + pathname: PropTypes.string.isRequired }).isRequired }; diff --git a/server/sonar-web/src/main/js/app/components/search/Search.js b/server/sonar-web/src/main/js/app/components/search/Search.js index 808614922d1..fff7cdd5011 100644 --- a/server/sonar-web/src/main/js/app/components/search/Search.js +++ b/server/sonar-web/src/main/js/app/components/search/Search.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import key from 'keymaster'; import { debounce, keyBy, uniqBy } from 'lodash'; @@ -62,7 +63,7 @@ export default class Search extends React.PureComponent { state: State; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; constructor(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/about/components/ReadMore.js b/server/sonar-web/src/main/js/apps/about/components/ReadMore.js index 47a2b0e442a..87df2de5625 100644 --- a/server/sonar-web/src/main/js/apps/about/components/ReadMore.js +++ b/server/sonar-web/src/main/js/apps/about/components/ReadMore.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class ReadMore extends React.PureComponent { static propTypes = { - link: React.PropTypes.string.isRequired + link: PropTypes.string.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/account/components/UserCard.js b/server/sonar-web/src/main/js/apps/account/components/UserCard.js index 8b0ecc308ef..f6d071696a6 100644 --- a/server/sonar-web/src/main/js/apps/account/components/UserCard.js +++ b/server/sonar-web/src/main/js/apps/account/components/UserCard.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Avatar from '../../../components/ui/Avatar'; export default class UserCard extends React.PureComponent { static propTypes = { - user: React.PropTypes.object.isRequired + user: PropTypes.object.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.js.snap b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.js.snap index 66eea69153b..978e4038e91 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.js.snap +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.js.snap @@ -5,6 +5,7 @@ exports[`should match snapshot 1`] = ` className="account-body account-container" > <HelmetWrapper + encodeSpecialCharacters={true} title="my_account.notifications" /> <p diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js b/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js index 7aaf49a23c8..75c9f0a2d96 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js +++ b/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class UserGroups extends React.PureComponent { static propTypes = { - groups: React.PropTypes.arrayOf(React.PropTypes.string).isRequired + groups: PropTypes.arrayOf(PropTypes.string).isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js b/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js index 968f27bc8e1..b4fc4ecd6e0 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js +++ b/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class UserScmAccounts extends React.PureComponent { static propTypes = { - user: React.PropTypes.object.isRequired, - scmAccounts: React.PropTypes.arrayOf(React.PropTypes.string).isRequired + user: PropTypes.object.isRequired, + scmAccounts: PropTypes.arrayOf(PropTypes.string).isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/account/projects/Projects.js b/server/sonar-web/src/main/js/apps/account/projects/Projects.js index 71141b11ba7..89c151f73d5 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/Projects.js +++ b/server/sonar-web/src/main/js/apps/account/projects/Projects.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import ProjectCard from './ProjectCard'; import ListFooter from '../../../components/controls/ListFooter'; import { projectsListType } from './propTypes'; @@ -26,9 +27,9 @@ import { translate } from '../../../helpers/l10n'; export default class Projects extends React.PureComponent { static propTypes = { projects: projectsListType.isRequired, - total: React.PropTypes.number.isRequired, - loading: React.PropTypes.bool.isRequired, - loadMore: React.PropTypes.func.isRequired + total: PropTypes.number.isRequired, + loading: PropTypes.bool.isRequired, + loadMore: PropTypes.func.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/account/projects/propTypes.js b/server/sonar-web/src/main/js/apps/account/projects/propTypes.js index 67d11b209be..cae87b48906 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/propTypes.js +++ b/server/sonar-web/src/main/js/apps/account/projects/propTypes.js @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; +import PropTypes from 'prop-types'; -const { shape, string, array, arrayOf } = React.PropTypes; +const { shape, string, array, arrayOf } = PropTypes; export const projectType = shape({ id: string.isRequired, diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js index 23a54777c67..d68069722f3 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { debounce, uniq } from 'lodash'; import { connect } from 'react-redux'; @@ -63,7 +64,7 @@ class BackgroundTasksApp extends React.PureComponent { props: Props; static contextTypes = { - router: React.PropTypes.object.isRequired + router: PropTypes.object.isRequired }; state: State = { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js index fb595f3c60a..2ffdc3a2db6 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js @@ -19,6 +19,7 @@ */ /* @flow */ import React from 'react'; +import PropTypes from 'prop-types'; import StatusFilter from './StatusFilter'; import TypesFilter from './TypesFilter'; import CurrentsFilter from './CurrentsFilter'; @@ -28,13 +29,13 @@ import { translate } from '../../../helpers/l10n'; export default class Search extends React.PureComponent { static propTypes = { - loading: React.PropTypes.bool.isRequired, - status: React.PropTypes.any.isRequired, - taskType: React.PropTypes.any.isRequired, - currents: React.PropTypes.any.isRequired, - query: React.PropTypes.string.isRequired, - onFilterUpdate: React.PropTypes.func.isRequired, - onReload: React.PropTypes.func.isRequired + loading: PropTypes.bool.isRequired, + status: PropTypes.any.isRequired, + taskType: PropTypes.any.isRequired, + currents: PropTypes.any.isRequired, + query: PropTypes.string.isRequired, + onFilterUpdate: PropTypes.func.isRequired, + onReload: PropTypes.func.isRequired }; handleStatusChange(status: string) { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Task.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Task.js index ca8cc8c84fd..a12bea92a49 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Task.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Task.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import TaskStatus from './TaskStatus'; import TaskComponent from './TaskComponent'; import TaskId from './TaskId'; @@ -28,13 +29,13 @@ import TaskActions from './TaskActions'; export default class Task extends React.PureComponent { static propTypes = { - task: React.PropTypes.object.isRequired, - index: React.PropTypes.number.isRequired, - tasks: React.PropTypes.array.isRequired, - component: React.PropTypes.object, - types: React.PropTypes.array.isRequired, - onCancelTask: React.PropTypes.func.isRequired, - onFilterTask: React.PropTypes.func.isRequired + task: PropTypes.object.isRequired, + index: PropTypes.number.isRequired, + tasks: PropTypes.array.isRequired, + component: PropTypes.object, + types: PropTypes.array.isRequired, + onCancelTask: PropTypes.func.isRequired, + onFilterTask: PropTypes.func.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/WorkersForm-test.js.snap b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/WorkersForm-test.js.snap index 35ba8f86128..4bf13d5848f 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/WorkersForm-test.js.snap +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/WorkersForm-test.js.snap @@ -3,6 +3,7 @@ exports[`changes select 1`] = ` <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="background_tasks.change_number_of_workers" @@ -34,8 +35,10 @@ exports[`changes select 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="input-tiny spacer-top" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -55,7 +58,6 @@ exports[`changes select 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ @@ -144,6 +146,7 @@ exports[`changes select 1`] = ` exports[`changes select 2`] = ` <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="background_tasks.change_number_of_workers" @@ -175,8 +178,10 @@ exports[`changes select 2`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="input-tiny spacer-top" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -196,7 +201,6 @@ exports[`changes select 2`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.js b/server/sonar-web/src/main/js/apps/code/components/Search.js index 508487eaea0..12b644d943c 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Search.js +++ b/server/sonar-web/src/main/js/apps/code/components/Search.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { debounce } from 'lodash'; import Components from './Components'; @@ -28,13 +29,13 @@ import { getComponentUrl } from '../../../helpers/urls'; export default class Search extends React.PureComponent { static contextTypes = { - router: React.PropTypes.object.isRequired + router: PropTypes.object.isRequired }; static propTypes = { - component: React.PropTypes.object.isRequired, - location: React.PropTypes.object.isRequired, - onError: React.PropTypes.func.isRequired + component: PropTypes.object.isRequired, + location: PropTypes.object.isRequired, + onError: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/Measure.js b/server/sonar-web/src/main/js/apps/component-measures/components/Measure.js index aa81154e99f..ba59123b3b7 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/Measure.js +++ b/server/sonar-web/src/main/js/apps/component-measures/components/Measure.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Rating from '../../../components/ui/Rating'; import Level from '../../../components/ui/Level'; import { formatMeasure, isDiffMetric } from '../../../helpers/measures'; @@ -26,10 +27,10 @@ import { formatLeak, getRatingTooltip } from '../utils'; export default class Measure extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - measure: React.PropTypes.object, - metric: React.PropTypes.object, - decimals: React.PropTypes.number + className: PropTypes.string, + measure: PropTypes.object, + metric: PropTypes.object, + decimals: PropTypes.number }; renderRating(measure, metric) { diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js index 901073b7a6c..88d28d8f5f9 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import moment from 'moment'; import ComponentsList from './ComponentsList'; @@ -28,7 +29,7 @@ import ListFooter from '../../../../components/controls/ListFooter'; export default class ListView extends React.PureComponent { static contextTypes = { - router: React.PropTypes.object.isRequired + router: PropTypes.object.isRequired }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js index a4512876a18..1111a362a9c 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import HomeMeasuresList from './HomeMeasuresList'; import { getLocalizedMetricDomain } from '../../../helpers/l10n'; @@ -43,5 +44,5 @@ AllMeasuresDomain.defaultProps = { }; AllMeasuresDomain.propTypes = { - displayHeader: React.PropTypes.bool + displayHeader: PropTypes.bool }; diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/SearchSelect-test.js.snap b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/SearchSelect-test.js.snap index 96a6e6985cb..d3ea2edb7b0 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/SearchSelect-test.js.snap +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/SearchSelect-test.js.snap @@ -11,8 +11,10 @@ exports[`should render Select 1`] = ` cache={false} className="input-super-large" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -35,7 +37,6 @@ exports[`should render Select 1`] = ` onChange={[Function]} onCloseResetsInput={true} onInputChange={[Function]} - openAfterFocus={false} optionComponent={[Function]} options={Array []} pageSize={5} diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap index 4762fa4e4d9..508cdecb71b 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap @@ -5,6 +5,7 @@ exports[`smoke test 1`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.delete" /> <header @@ -38,6 +39,7 @@ exports[`smoke test 2`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.delete" /> <header @@ -64,6 +66,7 @@ exports[`smoke test 2`] = ` </button> <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="modal form" @@ -119,6 +122,7 @@ exports[`smoke test 3`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.delete" /> <header @@ -145,6 +149,7 @@ exports[`smoke test 3`] = ` </button> <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="modal form" diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.js.snap index 86dcb2b5556..6c13ca615a2 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.js.snap @@ -5,6 +5,7 @@ exports[`smoke test 1`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.edit" /> <header @@ -136,6 +137,7 @@ exports[`smoke test 2`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.edit" /> <header @@ -282,6 +284,7 @@ exports[`smoke test 3`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.edit" /> <header diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationMembers-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationMembers-test.js.snap index 20de4c58030..17ab36b7540 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationMembers-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationMembers-test.js.snap @@ -5,6 +5,7 @@ exports[`should not render actions for non admin 1`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.members.page" /> <MembersPageHeader @@ -54,6 +55,7 @@ exports[`should render actions for admin 1`] = ` className="page page-limited" > <HelmetWrapper + encodeSpecialCharacters={true} title="organization.members.page" /> <MembersPageHeader diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.js.snap index d9579e1bf4a..f63164ef1e0 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.js.snap @@ -16,6 +16,7 @@ exports[`smoke test 2`] = ` <div> <HelmetWrapper defaultTitle="Foo" + encodeSpecialCharacters={true} titleTemplate="%s - Foo" /> <OrganizationNavigation diff --git a/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/AddMemberForm-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/AddMemberForm-test.js.snap index 8fbd79d33c3..b00ff229314 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/AddMemberForm-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/AddMemberForm-test.js.snap @@ -15,6 +15,7 @@ exports[`should render and open the modal 2`] = ` organization.members.add <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="modal form" diff --git a/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/ManageMemberGroupsForm-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/ManageMemberGroupsForm-test.js.snap index a87d5985b3f..3f450483d13 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/ManageMemberGroupsForm-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/ManageMemberGroupsForm-test.js.snap @@ -85,6 +85,7 @@ exports[`should render and open the modal 2`] = ` organization.members.manage_groups <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="modal form" diff --git a/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/RemoveMemberForm-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/RemoveMemberForm-test.js.snap index 9a736b8c6de..5b298e526ba 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/RemoveMemberForm-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/forms/__tests__/__snapshots__/RemoveMemberForm-test.js.snap @@ -30,6 +30,7 @@ exports[`should render and open the modal 2`] = ` organization.members.remove <Modal ariaHideApp={true} + bodyOpenClassName="ReactModal__Body--open" className="modal" closeTimeoutMS={0} contentLabel="modal form" diff --git a/server/sonar-web/src/main/js/apps/overview/components/Timeline.js b/server/sonar-web/src/main/js/apps/overview/components/Timeline.js index 476707db58c..cabf59b0e5a 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/Timeline.js +++ b/server/sonar-web/src/main/js/apps/overview/components/Timeline.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { max } from 'd3-array'; import { LineChart } from '../../../components/charts/line-chart'; @@ -25,9 +26,9 @@ const HEIGHT = 80; export default class Timeline extends React.PureComponent { static propTypes = { - history: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - before: React.PropTypes.object, - after: React.PropTypes.object + history: PropTypes.arrayOf(PropTypes.object).isRequired, + before: PropTypes.object, + after: PropTypes.object }; filterSnapshots() { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.js index c88e57977a6..4982632cc80 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import MetaLink from './MetaLink'; import { getProjectLinks } from '../../../api/projectLinks'; import { orderLinks } from '../../project-admin/links/utils'; export default class MetaLinks extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired + component: PropTypes.object.isRequired }; state = {}; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js index 0367e3a8147..6c632128757 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { DrilldownLink } from '../../../components/shared/drilldown-link'; import LanguageDistribution from '../../../components/charts/LanguageDistribution'; import { formatMeasure } from '../../../helpers/measures'; @@ -26,8 +27,8 @@ import SizeRating from '../../../components/ui/SizeRating'; export default class MetaSize extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - measures: React.PropTypes.array.isRequired + component: PropTypes.object.isRequired, + measures: PropTypes.array.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/overview/propTypes.js b/server/sonar-web/src/main/js/apps/overview/propTypes.js index 19d9d6624a0..014a74176de 100644 --- a/server/sonar-web/src/main/js/apps/overview/propTypes.js +++ b/server/sonar-web/src/main/js/apps/overview/propTypes.js @@ -17,9 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { PropTypes } from 'react'; - -const { shape, arrayOf, array, string, number, object } = PropTypes; +import { shape, arrayOf, array, string, number, object } from 'prop-types'; export const ComponentType = shape({ id: string.isRequired diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js index fca2990dc54..7282eecc45d 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import { difference } from 'lodash'; import Backbone from 'backbone'; @@ -30,11 +31,11 @@ import { setDefaultPermissionTemplate } from '../../../api/permissions'; export default class ActionsCell extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, + organization: PropTypes.object, permissionTemplate: PermissionTemplateType.isRequired, - topQualifiers: React.PropTypes.array.isRequired, + topQualifiers: PropTypes.array.isRequired, refresh: CallbackType, - fromDetails: React.PropTypes.bool + fromDetails: PropTypes.bool }; static defaultProps = { @@ -42,7 +43,7 @@ export default class ActionsCell extends React.PureComponent { }; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; handleUpdateClick(e) { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/App.js b/server/sonar-web/src/main/js/apps/permission-templates/components/App.js index b28c3564d9e..9f0df724326 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/App.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/App.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Home from './Home'; import Template from './Template'; import OrganizationHelmet from '../../../components/common/OrganizationHelmet'; @@ -28,9 +29,9 @@ import '../../permissions/styles.css'; export default class App extends React.PureComponent { static propTypes = { - location: React.PropTypes.object.isRequired, - organization: React.PropTypes.object, - topQualifiers: React.PropTypes.array.isRequired + location: PropTypes.object.isRequired, + organization: PropTypes.object, + topQualifiers: PropTypes.array.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js index 4a551a419fc..454b269f85a 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { sortBy } from 'lodash'; import { translate } from '../../../helpers/l10n'; import { PermissionTemplateType } from '../propTypes'; export default class Defaults extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, + organization: PropTypes.object, permissionTemplate: PermissionTemplateType.isRequired }; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Header.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Header.js index 17eb68d06c3..74c4741fc64 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Header.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Header.js @@ -18,19 +18,20 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import CreateView from '../views/CreateView'; import { translate } from '../../../helpers/l10n'; import { CallbackType } from '../propTypes'; export default class Header extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - ready: React.PropTypes.bool.isRequired, + organization: PropTypes.object, + ready: PropTypes.bool.isRequired, refresh: CallbackType }; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; componentWillMount() { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Home.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Home.js index 7b2135fc335..bdd5a97a1bc 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Home.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Home.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import Header from './Header'; import List from './List'; @@ -25,12 +26,12 @@ import { translate } from '../../../helpers/l10n'; export default class Home extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - topQualifiers: React.PropTypes.array.isRequired, - permissions: React.PropTypes.array.isRequired, - permissionTemplates: React.PropTypes.array.isRequired, - ready: React.PropTypes.bool.isRequired, - refresh: React.PropTypes.func.isRequired + organization: PropTypes.object, + topQualifiers: PropTypes.array.isRequired, + permissions: PropTypes.array.isRequired, + permissionTemplates: PropTypes.array.isRequired, + ready: PropTypes.bool.isRequired, + refresh: PropTypes.func.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/List.js b/server/sonar-web/src/main/js/apps/permission-templates/components/List.js index 200fb7244fb..76b5570fd51 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/List.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/List.js @@ -18,16 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import ListHeader from './ListHeader'; import ListItem from './ListItem'; import { PermissionTemplateType, CallbackType } from '../propTypes'; export default class List extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - permissionTemplates: React.PropTypes.arrayOf(PermissionTemplateType).isRequired, - permissions: React.PropTypes.array.isRequired, - topQualifiers: React.PropTypes.array.isRequired, + organization: PropTypes.object, + permissionTemplates: PropTypes.arrayOf(PermissionTemplateType).isRequired, + permissions: PropTypes.array.isRequired, + topQualifiers: PropTypes.array.isRequired, refresh: CallbackType }; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js index 31915dbacdd..b09b86a3ee3 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; export default class ListHeader extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - permissions: React.PropTypes.array.isRequired + organization: PropTypes.object, + permissions: PropTypes.array.isRequired }; renderTooltip = permission => diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js index b6dbec1d7b9..ea111a3e0c2 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import NameCell from './NameCell'; import PermissionCell from './PermissionCell'; import ActionsCell from './ActionsCell'; @@ -25,9 +26,9 @@ import { PermissionTemplateType, CallbackType } from '../propTypes'; export default class ListItem extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, + organization: PropTypes.object, permissionTemplate: PermissionTemplateType.isRequired, - topQualifiers: React.PropTypes.array.isRequired, + topQualifiers: PropTypes.array.isRequired, refresh: CallbackType }; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js index 5e0d4ea196b..cb52710b803 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import Defaults from './Defaults'; import { PermissionTemplateType } from '../propTypes'; export default class NameCell extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, + organization: PropTypes.object, permissionTemplate: PermissionTemplateType.isRequired }; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js index a0191df28f0..82260039e0e 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { debounce } from 'lodash'; import TemplateHeader from './TemplateHeader'; @@ -30,10 +31,10 @@ import { translate } from '../../../helpers/l10n'; export default class Template extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - template: React.PropTypes.object.isRequired, - refresh: React.PropTypes.func.isRequired, - topQualifiers: React.PropTypes.array.isRequired + organization: PropTypes.object, + template: PropTypes.object.isRequired, + refresh: PropTypes.func.isRequired, + topQualifiers: PropTypes.array.isRequired }; constructor(props) { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.js b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.js index ef4b83905ae..541200c995b 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Defaults from './Defaults'; export default class TemplateDetails extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - template: React.PropTypes.object.isRequired + organization: PropTypes.object, + template: PropTypes.object.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.js b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.js index e7a81092fa5..1e0417c2f7b 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.js @@ -18,17 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import ActionsCell from './ActionsCell'; import { translate } from '../../../helpers/l10n'; export default class TemplateHeader extends React.PureComponent { static propTypes = { - organization: React.PropTypes.object, - template: React.PropTypes.object.isRequired, - loading: React.PropTypes.bool.isRequired, - refresh: React.PropTypes.func.isRequired, - topQualifiers: React.PropTypes.array.isRequired + organization: PropTypes.object, + template: PropTypes.object.isRequired, + loading: PropTypes.bool.isRequired, + refresh: PropTypes.func.isRequired, + topQualifiers: PropTypes.array.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/propTypes.js b/server/sonar-web/src/main/js/apps/permission-templates/propTypes.js index efda8d264c2..612a9e78b9e 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/propTypes.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/propTypes.js @@ -17,9 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { PropTypes } from 'react'; - -const { shape, arrayOf, string, number, func } = PropTypes; +import { shape, arrayOf, string, number, func } from 'prop-types'; export const PermissionType = shape({ key: string.isRequired, diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js index dc037d86753..9fd34e34b5b 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import GroupIcon from './GroupIcon'; export default class GroupHolder extends React.PureComponent { static propTypes = { - group: React.PropTypes.object.isRequired, - permissions: React.PropTypes.array.isRequired, - selectedPermission: React.PropTypes.string, - permissionsOrder: React.PropTypes.array.isRequired, - onToggle: React.PropTypes.func.isRequired + group: PropTypes.object.isRequired, + permissions: PropTypes.array.isRequired, + selectedPermission: PropTypes.string, + permissionsOrder: PropTypes.array.isRequired, + onToggle: PropTypes.func.isRequired }; handleClick(permission, e) { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js index d2eee7396c6..710b6830ed2 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import UserHolder from './UserHolder'; import GroupHolder from './GroupHolder'; import Tooltip from '../../../../components/controls/Tooltip'; @@ -25,14 +26,14 @@ import { translate } from '../../../../helpers/l10n'; export default class HoldersList extends React.PureComponent { static propTypes = { - permissions: React.PropTypes.array.isRequired, - users: React.PropTypes.array.isRequired, - groups: React.PropTypes.array.isRequired, - selectedPermission: React.PropTypes.string, - showPublicProjectsWarning: React.PropTypes.bool, - onSelectPermission: React.PropTypes.func.isRequired, - onToggleUser: React.PropTypes.func.isRequired, - onToggleGroup: React.PropTypes.func.isRequired + permissions: PropTypes.array.isRequired, + users: PropTypes.array.isRequired, + groups: PropTypes.array.isRequired, + selectedPermission: PropTypes.string, + showPublicProjectsWarning: PropTypes.bool, + onSelectPermission: PropTypes.func.isRequired, + onToggleUser: PropTypes.func.isRequired, + onToggleGroup: PropTypes.func.isRequired }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js index da53c30b9ef..4b1ad1d8ede 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { getPermissionsAppError } from '../../../../store/rootReducer'; class PageError extends React.PureComponent { static propTypes = { - message: React.PropTypes.string + message: PropTypes.string }; render() { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js index 9687e42732a..08f0654683c 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import RadioToggle from '../../../../components/controls/RadioToggle'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; export default class SearchForm extends React.PureComponent { static propTypes = { - query: React.PropTypes.string, - filter: React.PropTypes.oneOf(['all', 'users', 'groups']), - onSearch: React.PropTypes.func, - onFilter: React.PropTypes.func + query: PropTypes.string, + filter: PropTypes.oneOf(['all', 'users', 'groups']), + onSearch: PropTypes.func, + onFilter: PropTypes.func }; componentWillMount() { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.js index d95158c9032..4ef61d7aa0b 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.js @@ -18,16 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Avatar from '../../../../components/ui/Avatar'; import { translate } from '../../../../helpers/l10n'; export default class UserHolder extends React.PureComponent { static propTypes = { - user: React.PropTypes.object.isRequired, - permissions: React.PropTypes.array.isRequired, - selectedPermission: React.PropTypes.string, - permissionsOrder: React.PropTypes.array.isRequired, - onToggle: React.PropTypes.func.isRequired + user: PropTypes.object.isRequired, + permissions: PropTypes.array.isRequired, + selectedPermission: PropTypes.string, + permissionsOrder: PropTypes.array.isRequired, + onToggle: PropTypes.func.isRequired }; handleClick(permission, e) { diff --git a/server/sonar-web/src/main/js/apps/project-admin/deletion/Deletion.js b/server/sonar-web/src/main/js/apps/project-admin/deletion/Deletion.js index e94863a7ac1..5aff00dd956 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/deletion/Deletion.js +++ b/server/sonar-web/src/main/js/apps/project-admin/deletion/Deletion.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import Header from './Header'; @@ -27,7 +28,7 @@ import { translate } from '../../../helpers/l10n'; class Deletion extends React.PureComponent { static propTypes = { - component: React.PropTypes.object + component: PropTypes.object }; render() { diff --git a/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js b/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js index 06f7189aae5..b4e381e7373 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js +++ b/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js @@ -18,17 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Modal from 'react-modal'; import { deleteProject } from '../../../api/components'; import { translate, translateWithParameters } from '../../../helpers/l10n'; export default class Form extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired + component: PropTypes.object.isRequired }; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; state = { loading: false, modalOpen: false }; diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js index 90af5ae2f54..c0452fc158b 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import BulkUpdateForm from './BulkUpdateForm'; import BulkUpdateResults from './BulkUpdateResults'; @@ -34,10 +35,10 @@ import RecentHistory from '../../../app/components/RecentHistory'; class BulkUpdate extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - addGlobalErrorMessage: React.PropTypes.func.isRequired, - addGlobalSuccessMessage: React.PropTypes.func.isRequired, - closeAllGlobalMessages: React.PropTypes.func.isRequired + component: PropTypes.object.isRequired, + addGlobalErrorMessage: PropTypes.func.isRequired, + addGlobalSuccessMessage: PropTypes.func.isRequired, + closeAllGlobalMessages: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateForm.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateForm.js index 3c58171ebdb..b549c19db05 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateForm.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateForm.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class BulkUpdateForm extends React.PureComponent { static propTypes = { - onSubmit: React.PropTypes.func.isRequired + onSubmit: PropTypes.func.isRequired }; handleSubmit(e) { diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js index ff202655a41..bd96b8a225a 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { some } from 'lodash'; import { translateWithParameters, translate } from '../../../helpers/l10n'; export default class BulkUpdateResults extends React.PureComponent { static propTypes = { - results: React.PropTypes.array.isRequired, - onConfirm: React.PropTypes.func.isRequired + results: PropTypes.array.isRequired, + onConfirm: PropTypes.func.isRequired }; handleConfirm(e) { diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/Key.js b/server/sonar-web/src/main/js/apps/project-admin/key/Key.js index 97cd01c3f1c..130d67cd4c2 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/Key.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/Key.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import Header from './Header'; @@ -38,12 +39,12 @@ import { getProjectAdminProjectModules, getComponent } from '../../../store/root class Key extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - fetchProjectModules: React.PropTypes.func.isRequired, - changeKey: React.PropTypes.func.isRequired, - addGlobalErrorMessage: React.PropTypes.func.isRequired, - addGlobalSuccessMessage: React.PropTypes.func.isRequired, - closeAllGlobalMessages: React.PropTypes.func.isRequired + component: PropTypes.object.isRequired, + fetchProjectModules: PropTypes.func.isRequired, + changeKey: PropTypes.func.isRequired, + addGlobalErrorMessage: PropTypes.func.isRequired, + addGlobalSuccessMessage: PropTypes.func.isRequired, + closeAllGlobalMessages: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js b/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js index 1de387c9721..59a01d1fe0a 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import UpdateKeyConfirmation from './views/UpdateKeyConfirmation'; import { translate } from '../../../helpers/l10n'; export default class UpdateForm extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - onKeyChange: React.PropTypes.func.isRequired + component: PropTypes.object.isRequired, + onKeyChange: PropTypes.func.isRequired }; state = { newKey: null }; diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/UpdateKeyForm.js b/server/sonar-web/src/main/js/apps/project-admin/key/UpdateKeyForm.js index bb510a4ca26..87c53066797 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/UpdateKeyForm.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/UpdateKeyForm.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import UpdateKeyConfirmation from './views/UpdateKeyConfirmation'; import { translate } from '../../../helpers/l10n'; export default class UpdateKeyForm extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired + component: PropTypes.object.isRequired }; state = {}; diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/Header.js b/server/sonar-web/src/main/js/apps/project-admin/links/Header.js index 9173d97c1aa..34faf7a76d4 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/Header.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/Header.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import CreationModal from './views/CreationModal'; import { translate } from '../../../helpers/l10n'; export default class Header extends React.PureComponent { static propTypes = { - onCreate: React.PropTypes.func.isRequired + onCreate: PropTypes.func.isRequired }; handleCreateClick(e) { diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js b/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js index 67313e188f4..ad0fcc33306 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/LinkRow.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { isProvided, isClickable } from './utils'; import { translate } from '../../../helpers/l10n'; import BugTrackerIcon from '../../../components/ui/BugTrackerIcon'; export default class LinkRow extends React.PureComponent { static propTypes = { - link: React.PropTypes.object.isRequired, - onDelete: React.PropTypes.func.isRequired + link: PropTypes.object.isRequired, + onDelete: PropTypes.func.isRequired }; handleDeleteClick(e) { diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/Links.js b/server/sonar-web/src/main/js/apps/project-admin/links/Links.js index e06a045a9aa..fede0404e07 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/Links.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/Links.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import Header from './Header'; @@ -29,8 +30,8 @@ import { translate } from '../../../helpers/l10n'; class Links extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - links: React.PropTypes.array + component: PropTypes.object.isRequired, + links: PropTypes.array }; componentWillMount() { diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/Table.js b/server/sonar-web/src/main/js/apps/project-admin/links/Table.js index a7358dbb26b..acc5cf5ec96 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/Table.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/Table.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import LinkRow from './LinkRow'; import { orderLinks } from './utils'; import { translate } from '../../../helpers/l10n'; export default class Table extends React.PureComponent { static propTypes = { - links: React.PropTypes.array.isRequired, - onDelete: React.PropTypes.func.isRequired + links: PropTypes.array.isRequired, + onDelete: PropTypes.func.isRequired }; handleDeleteLink(link) { diff --git a/server/sonar-web/src/main/js/apps/project-admin/quality-gate/Form.js b/server/sonar-web/src/main/js/apps/project-admin/quality-gate/Form.js index 5e594cac288..69b5fdc2126 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/quality-gate/Form.js +++ b/server/sonar-web/src/main/js/apps/project-admin/quality-gate/Form.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; import { some } from 'lodash'; import { translate } from '../../../helpers/l10n'; export default class Form extends React.PureComponent { static propTypes = { - allGates: React.PropTypes.array.isRequired, - gate: React.PropTypes.object, - onChange: React.PropTypes.func.isRequired + allGates: PropTypes.array.isRequired, + gate: PropTypes.object, + onChange: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js b/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js index fd5759a40b9..f07fbed428b 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import Header from './Header'; @@ -32,9 +33,9 @@ import { translate } from '../../../helpers/l10n'; class QualityGate extends React.PureComponent { static propTypes = { - component: React.PropTypes.object.isRequired, - allGates: React.PropTypes.array, - gate: React.PropTypes.object + component: PropTypes.object.isRequired, + allGates: PropTypes.array, + gate: PropTypes.object }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/ProfileRow.js b/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/ProfileRow.js index bc1f3c55417..8a9e02e717f 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/ProfileRow.js +++ b/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/ProfileRow.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; import { translate } from '../../../helpers/l10n'; export default class ProfileRow extends React.PureComponent { static propTypes = { - profile: React.PropTypes.object.isRequired, - possibleProfiles: React.PropTypes.array.isRequired, - onChangeProfile: React.PropTypes.func.isRequired + profile: PropTypes.object.isRequired, + possibleProfiles: PropTypes.array.isRequired, + onChangeProfile: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/Table.js b/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/Table.js index 77b9039762b..24a099134b2 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/Table.js +++ b/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/Table.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { groupBy, orderBy } from 'lodash'; import ProfileRow from './ProfileRow'; import { translate } from '../../../helpers/l10n'; export default class Table extends React.PureComponent { static propTypes = { - allProfiles: React.PropTypes.array.isRequired, - profiles: React.PropTypes.array.isRequired, - onChangeProfile: React.PropTypes.func.isRequired + allProfiles: PropTypes.array.isRequired, + profiles: PropTypes.array.isRequired, + onChangeProfile: PropTypes.func.isRequired }; renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap index 6bf098ccb15..9912ce833fc 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap @@ -6,6 +6,7 @@ exports[`should render correctly 1`] = ` id="project-activity" > <HelmetWrapper + encodeSpecialCharacters={true} title="project_activity.page" /> <ProjectActivityPageHeader diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap index 42faa3e8acd..1112cfa4ea8 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap @@ -12,8 +12,10 @@ exports[`should render correctly the list of series 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="input-medium pull-left big-spacer-right" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={true} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -33,7 +35,6 @@ exports[`should render correctly the list of series 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ diff --git a/server/sonar-web/src/main/js/apps/projects-admin/projects.js b/server/sonar-web/src/main/js/apps/projects-admin/projects.js index 847d2a5f702..0d0f59342ad 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/projects.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/projects.js @@ -19,6 +19,7 @@ */ import classNames from 'classnames'; import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import { getComponentPermissionsUrl } from '../../helpers/urls'; import ApplyTemplateView from '../permissions/project/views/ApplyTemplateView'; @@ -29,9 +30,9 @@ import { translate } from '../../helpers/l10n'; export default class Projects extends React.PureComponent { static propTypes = { - projects: React.PropTypes.array.isRequired, - selection: React.PropTypes.array.isRequired, - organization: React.PropTypes.object.isRequired + projects: PropTypes.array.isRequired, + selection: PropTypes.array.isRequired, + organization: PropTypes.object.isRequired }; componentWillMount() { diff --git a/server/sonar-web/src/main/js/apps/projects-admin/search.js b/server/sonar-web/src/main/js/apps/projects-admin/search.js index ee8d522e2ad..ce42b2050e9 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/search.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/search.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { sortBy } from 'lodash'; import { TYPE, QUALIFIERS_ORDER } from './constants'; import DeleteView from './delete-view'; @@ -28,7 +29,7 @@ import { translate } from '../../helpers/l10n'; export default class Search extends React.PureComponent { static propTypes = { - onSearch: React.PropTypes.func.isRequired + onSearch: PropTypes.func.isRequired }; onSubmit = e => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js index 3a1f5d4c1fe..bf478ed0a6d 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooter.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import ListFooter from '../../../components/controls/ListFooter'; export default class ProjectsListFooter extends React.PureComponent { static propTypes = { - total: React.PropTypes.number.isRequired + total: PropTypes.number.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.js.snap index b4ab927ee51..7671abced29 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.js.snap @@ -35,8 +35,10 @@ exports[`should render correctly 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="little-spacer-left input-medium" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -56,7 +58,6 @@ exports[`should render correctly 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ @@ -130,8 +131,10 @@ exports[`should render with coverage selected 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="little-spacer-left input-medium" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -151,7 +154,6 @@ exports[`should render with coverage selected 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.js.snap index 21c3b3f5d5a..dfa78f606fc 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.js.snap @@ -14,8 +14,10 @@ exports[`should handle the descending sort direction 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="little-spacer-left input-medium" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -35,7 +37,6 @@ exports[`should handle the descending sort direction 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ @@ -123,8 +124,10 @@ exports[`should render correctly for leak view 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="little-spacer-left input-medium" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -144,7 +147,6 @@ exports[`should render correctly for leak view 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ @@ -232,8 +234,10 @@ exports[`should render correctly for overall view 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="little-spacer-left input-medium" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -253,7 +257,6 @@ exports[`should render correctly for overall view 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ diff --git a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js index 277c59a4e1d..368069368ef 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FilterContainer from './FilterContainer'; import FilterHeader from './FilterHeader'; import CoverageRating from '../../../components/ui/CoverageRating'; @@ -26,11 +27,11 @@ import { translate } from '../../../helpers/l10n'; export default class CoverageFilter extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - query: React.PropTypes.object.isRequired, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object, - property: React.PropTypes.string + className: PropTypes.string, + query: PropTypes.object.isRequired, + isFavorite: PropTypes.bool, + organization: PropTypes.object, + property: PropTypes.string }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js index 5b9f30484c0..74ed1033c6d 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FilterContainer from './FilterContainer'; import FilterHeader from './FilterHeader'; import DuplicationsRating from '../../../components/ui/DuplicationsRating'; @@ -29,11 +30,11 @@ import { translate } from '../../../helpers/l10n'; export default class DuplicationsFilter extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - query: React.PropTypes.object.isRequired, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object, - property: React.PropTypes.string + className: PropTypes.string, + query: PropTypes.object.isRequired, + isFavorite: PropTypes.bool, + organization: PropTypes.object, + property: PropTypes.string }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js index 876eb1e7abf..a00b11ef2a3 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Link } from 'react-router'; import { getFilterUrl } from './utils'; @@ -26,27 +27,27 @@ import { translate } from '../../../helpers/l10n'; export default class Filter extends React.PureComponent { static propTypes = { - property: React.PropTypes.string.isRequired, - className: React.PropTypes.string, - options: React.PropTypes.array.isRequired, - query: React.PropTypes.object.isRequired, - renderOption: React.PropTypes.func.isRequired, - - value: React.PropTypes.any, - facet: React.PropTypes.object, - maxFacetValue: React.PropTypes.number, - optionClassName: React.PropTypes.string, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object, - - getFacetValueForOption: React.PropTypes.func, - - halfWidth: React.PropTypes.bool, - highlightUnder: React.PropTypes.number, - highlightUnderMax: React.PropTypes.number, - - header: React.PropTypes.object, - footer: React.PropTypes.object + property: PropTypes.string.isRequired, + className: PropTypes.string, + options: PropTypes.array.isRequired, + query: PropTypes.object.isRequired, + renderOption: PropTypes.func.isRequired, + + value: PropTypes.any, + facet: PropTypes.object, + maxFacetValue: PropTypes.number, + optionClassName: PropTypes.string, + isFavorite: PropTypes.bool, + organization: PropTypes.object, + + getFacetValueForOption: PropTypes.func, + + halfWidth: PropTypes.bool, + highlightUnder: PropTypes.number, + highlightUnderMax: PropTypes.number, + + header: PropTypes.object, + footer: PropTypes.object }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js index 69d68a033ff..0d790a7b0c4 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FilterContainer from './FilterContainer'; import FilterHeader from './FilterHeader'; import Rating from '../../../components/ui/Rating'; @@ -25,13 +26,13 @@ import { translate } from '../../../helpers/l10n'; export default class IssuesFilter extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - headerDetail: React.PropTypes.element, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object, - name: React.PropTypes.string.isRequired, - property: React.PropTypes.string.isRequired, - query: React.PropTypes.object.isRequired + className: PropTypes.string, + headerDetail: PropTypes.element, + isFavorite: PropTypes.bool, + organization: PropTypes.object, + name: PropTypes.string.isRequired, + property: PropTypes.string.isRequired, + query: PropTypes.object.isRequired }; getFacetValueForOption(facet, option) { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.js index 3aa2f889cfc..d060e1259b7 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FilterContainer from './FilterContainer'; import FilterHeader from './FilterHeader'; import { translate } from '../../../helpers/l10n'; @@ -25,11 +26,11 @@ import { getSizeRatingLabel } from '../../../helpers/ratings'; export default class NewLinesFilter extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - query: React.PropTypes.object.isRequired, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object, - property: React.PropTypes.string + className: PropTypes.string, + query: PropTypes.object.isRequired, + isFavorite: PropTypes.bool, + organization: PropTypes.object, + property: PropTypes.string }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.js index 348a3b199d6..825ccb8625d 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FilterContainer from './FilterContainer'; import FilterHeader from './FilterHeader'; import Level from '../../../components/ui/Level'; @@ -25,9 +26,9 @@ import { translate } from '../../../helpers/l10n'; export default class QualityGateFilter extends React.PureComponent { static propTypes = { - query: React.PropTypes.object.isRequired, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object + query: PropTypes.object.isRequired, + isFavorite: PropTypes.bool, + organization: PropTypes.object }; getFacetValueForOption(facet, option) { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js index ed8877f6df5..99eff214d0c 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class SearchableFilterOption extends React.PureComponent { static propTypes = { - optionKey: React.PropTypes.string.isRequired, - option: React.PropTypes.object + optionKey: PropTypes.string.isRequired, + option: PropTypes.object }; render() { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js index ca46efe6c21..1677be82ff0 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FilterContainer from './FilterContainer'; import FilterHeader from './FilterHeader'; import SizeRating from '../../../components/ui/SizeRating'; @@ -26,11 +27,11 @@ import { getSizeRatingLabel, getSizeRatingAverageValue } from '../../../helpers/ export default class SizeFilter extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - query: React.PropTypes.object.isRequired, - isFavorite: React.PropTypes.bool, - organization: React.PropTypes.object, - property: React.PropTypes.string + className: PropTypes.string, + query: PropTypes.object.isRequired, + isFavorite: PropTypes.bool, + organization: PropTypes.object, + property: PropTypes.string }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap index 59dc178ab24..b0346a32181 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/SearchableFilterFooter-test.js.snap @@ -12,8 +12,10 @@ exports[`should render the languages without the ones in the facet 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="input-super-large" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -33,7 +35,6 @@ exports[`should render the languages without the ones in the facet 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ @@ -76,8 +77,10 @@ exports[`should render the tags without the ones in the facet 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="input-super-large" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -97,7 +100,6 @@ exports[`should render the tags without the ones in the facet 1`] = ` onBlurResetsInput={true} onChange={[Function]} onCloseResetsInput={true} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js index 8f52c7bbe69..4d9893fbff3 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { fetchQualityGate, @@ -132,5 +133,5 @@ export default class Details extends React.PureComponent { } Details.contextTypes = { - router: React.PropTypes.object.isRequired + router: PropTypes.object.isRequired }; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js index e197e6f0f83..1499f139787 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import ListHeader from './ListHeader'; import List from './List'; @@ -31,7 +32,7 @@ import '../styles.css'; export default class QualityGatesApp extends Component { static contextTypes = { - router: React.PropTypes.object.isRequired + router: PropTypes.object.isRequired }; state = {}; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js index 4b8f6980975..e1c13626495 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; export default class ThresholdInput extends React.PureComponent { static propTypes = { - name: React.PropTypes.string.isRequired, - value: React.PropTypes.any, - metric: React.PropTypes.object.isRequired, - onChange: React.PropTypes.func.isRequired + name: PropTypes.string.isRequired, + value: PropTypes.any, + metric: PropTypes.object.isRequired, + onChange: PropTypes.func.isRequired }; handleChange = e => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.js b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.js index a8d4fea6593..d7088601445 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import Changelog from './Changelog'; import ChangelogSearch from './ChangelogSearch'; import ChangelogEmpty from './ChangelogEmpty'; @@ -50,7 +51,7 @@ export default class ChangelogContainer extends React.PureComponent { props: Props; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; state: State = { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.js b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.js index 24fba98b452..a7258bce199 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import ComparisonForm from './ComparisonForm'; import ComparisonResults from './ComparisonResults'; import { compareProfiles } from '../../../api/quality-profiles'; @@ -47,7 +48,7 @@ export default class ComparisonContainer extends React.PureComponent { state: State; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; constructor(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.js index 3f1e42bd3da..723a283b51c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import RenameProfileForm from './RenameProfileForm'; import CopyProfileForm from './CopyProfileForm'; @@ -53,7 +54,7 @@ export default class ProfileActions extends React.PureComponent { }; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; constructor(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.js b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.js index 44ce54b4555..734dbde494b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import CreateProfileForm from './CreateProfileForm'; import RestoreProfileForm from './RestoreProfileForm'; import type { Profile } from '../propTypes'; @@ -42,7 +43,7 @@ export default class PageHeader extends React.PureComponent { props: Props; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; state: State = { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/propTypes.js b/server/sonar-web/src/main/js/apps/quality-profiles/propTypes.js index 12a872f056b..bdc59bbecc0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/propTypes.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/propTypes.js @@ -18,9 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // @flow -import { PropTypes } from 'react'; - -const { shape, string, number, bool, arrayOf } = PropTypes; +import { shape, string, number, bool, arrayOf } from 'prop-types'; export type Profile = { key: string, diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js b/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js index 9208545732f..257f00a8259 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import LoginForm from './LoginForm'; import { doLogin } from '../../../store/rootActions'; @@ -29,7 +30,7 @@ class LoginFormContainer extends React.PureComponent { mounted: boolean; static propTypes = { - location: React.PropTypes.object.isRequired + location: PropTypes.object.isRequired }; state = {}; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js b/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js index 52f00e1b8f6..a8f98da3fd1 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js @@ -19,10 +19,11 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; export default class Unauthorized extends React.PureComponent { static propTypes = { - location: React.PropTypes.object.isRequired + location: PropTypes.object.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.js b/server/sonar-web/src/main/js/apps/settings/components/Definition.js index ec64d222cb4..9b613bc6d79 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Definition.js +++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import classNames from 'classnames'; import Input from './inputs/Input'; @@ -46,17 +47,17 @@ class Definition extends React.PureComponent { timeout: number; static propTypes = { - component: React.PropTypes.object, - setting: React.PropTypes.object.isRequired, - changedValue: React.PropTypes.any, - loading: React.PropTypes.bool.isRequired, - validationMessage: React.PropTypes.string, - - changeValue: React.PropTypes.func.isRequired, - cancelChange: React.PropTypes.func.isRequired, - saveValue: React.PropTypes.func.isRequired, - resetValue: React.PropTypes.func.isRequired, - passValidation: React.PropTypes.func.isRequired + component: PropTypes.object, + setting: PropTypes.object.isRequired, + changedValue: PropTypes.any, + loading: PropTypes.bool.isRequired, + validationMessage: PropTypes.string, + + changeValue: PropTypes.func.isRequired, + cancelChange: PropTypes.func.isRequired, + saveValue: PropTypes.func.isRequired, + resetValue: PropTypes.func.isRequired, + passValidation: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js index ef9c248ffd0..67545155421 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js @@ -19,12 +19,13 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class DefinitionChanges extends React.PureComponent { static propTypes = { - onSave: React.PropTypes.func.isRequired, - onCancel: React.PropTypes.func.isRequired + onSave: PropTypes.func.isRequired, + onCancel: PropTypes.func.isRequired }; handleSaveClick(e: Object) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js index d686f9097db..01ef2658324 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js @@ -19,14 +19,15 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { getSettingValue, isEmptyValue, getDefaultValue } from '../utils'; import { translate } from '../../../helpers/l10n'; export default class DefinitionDefaults extends React.PureComponent { static propTypes = { - setting: React.PropTypes.object.isRequired, - isDefault: React.PropTypes.bool.isRequired, - onReset: React.PropTypes.func.isRequired + setting: PropTypes.object.isRequired, + isDefault: PropTypes.bool.isRequired, + onReset: PropTypes.func.isRequired }; handleReset(e: Object) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js index 8a9399e2c8b..3df8d283c7d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js @@ -19,12 +19,13 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import Definition from './Definition'; export default class DefinitionsList extends React.PureComponent { static propTypes = { - component: React.PropTypes.object, - settings: React.PropTypes.array.isRequired + component: PropTypes.object, + settings: PropTypes.array.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js index 44fc1f1976c..394b607a715 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js @@ -19,11 +19,12 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { translate } from '../../../helpers/l10n'; export default class PageHeader extends React.PureComponent { static propTypes = { - component: React.PropTypes.object + component: PropTypes.object }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js index 51186fde3b8..532a03ba4b1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import { groupBy, sortBy } from 'lodash'; import DefinitionsList from './DefinitionsList'; import EmailForm from './EmailForm'; @@ -26,8 +27,8 @@ import { getSubCategoryName, getSubCategoryDescription } from '../utils'; export default class SubCategoryDefinitionsList extends React.PureComponent { static propTypes = { - component: React.PropTypes.object, - settings: React.PropTypes.array.isRequired + component: PropTypes.object, + settings: PropTypes.array.isRequired }; renderEmailForm(subCategoryKey: string) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js index ac0e51a76b6..1a1b8d7cb56 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import PropertySetInput from './PropertySetInput'; import MultiValueInput from './MultiValueInput'; import PrimitiveInput from './PrimitiveInput'; @@ -25,9 +26,9 @@ import { TYPE_PROPERTY_SET } from '../../constants'; export default class Input extends React.PureComponent { static propTypes = { - setting: React.PropTypes.object.isRequired, - value: React.PropTypes.any, - onChange: React.PropTypes.func.isRequired + setting: PropTypes.object.isRequired, + value: PropTypes.any, + onChange: PropTypes.func.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js index 66794971de7..fa95e12b7b1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Toggle from '../../../../components/controls/Toggle'; import { defaultInputPropTypes } from '../../propTypes'; import { translate } from '../../../../helpers/l10n'; @@ -25,7 +26,7 @@ import { translate } from '../../../../helpers/l10n'; export default class InputForBoolean extends React.PureComponent { static propTypes = { ...defaultInputPropTypes, - value: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.string]) + value: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]) }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js index 06de1ca1c58..c6c62a38651 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; import { defaultInputPropTypes } from '../../propTypes'; export default class InputForSingleSelectList extends React.PureComponent { static propTypes = { ...defaultInputPropTypes, - options: React.PropTypes.arrayOf(React.PropTypes.string).isRequired + options: PropTypes.arrayOf(PropTypes.string).isRequired }; handleInputChange(option) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js index a5346068192..668f9fe5720 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import PrimitiveInput from './PrimitiveInput'; import { getEmptyValue } from '../../utils'; export default class MultiValueInput extends React.PureComponent { static propTypes = { - setting: React.PropTypes.object.isRequired, - value: React.PropTypes.array, - onChange: React.PropTypes.func.isRequired + setting: PropTypes.object.isRequired, + value: PropTypes.array, + onChange: PropTypes.func.isRequired }; ensureValue() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js index 3f39350f7b6..fc8f48de793 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import InputForString from './InputForString'; import InputForText from './InputForText'; import InputForPassword from './InputForPassword'; @@ -39,9 +40,9 @@ const typeMapping = { export default class PrimitiveInput extends React.PureComponent { static propTypes = { - setting: React.PropTypes.object.isRequired, - value: React.PropTypes.any, - onChange: React.PropTypes.func.isRequired + setting: PropTypes.object.isRequired, + value: PropTypes.any, + onChange: PropTypes.func.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js index 8a48eede7f9..a77603fb388 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import PrimitiveInput from './PrimitiveInput'; import { getEmptyValue, getUniqueName } from '../../utils'; export default class PropertySetInput extends React.PureComponent { static propTypes = { - setting: React.PropTypes.object.isRequired, - value: React.PropTypes.array, - onChange: React.PropTypes.func.isRequired + setting: PropTypes.object.isRequired, + value: PropTypes.array, + onChange: PropTypes.func.isRequired }; ensureValue() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js index 0b0164407a3..b628f69c7e6 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { defaultInputPropTypes } from '../../propTypes'; export default class SimpleInput extends React.PureComponent { static propTypes = { ...defaultInputPropTypes, - value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]), - type: React.PropTypes.string.isRequired, - className: React.PropTypes.string.isRequired + value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + type: PropTypes.string.isRequired, + className: PropTypes.string.isRequired }; handleInputChange(e) { diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js index 9b769007425..e9f59b8c2df 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import GenerateSecretKeyForm from './GenerateSecretKeyForm'; import EncryptionForm from './EncryptionForm'; @@ -25,15 +26,15 @@ import { translate } from '../../../helpers/l10n'; export default class EncryptionApp extends React.PureComponent { static propTypes = { - loading: React.PropTypes.bool.isRequired, - secretKeyAvailable: React.PropTypes.bool, - secretKey: React.PropTypes.string, - encryptedValue: React.PropTypes.string, + loading: PropTypes.bool.isRequired, + secretKeyAvailable: PropTypes.bool, + secretKey: PropTypes.string, + encryptedValue: PropTypes.string, - checkSecretKey: React.PropTypes.func.isRequired, - generateSecretKey: React.PropTypes.func.isRequired, - encryptValue: React.PropTypes.func.isRequired, - startGeneration: React.PropTypes.func.isRequired + checkSecretKey: PropTypes.func.isRequired, + generateSecretKey: PropTypes.func.isRequired, + encryptValue: PropTypes.func.isRequired, + startGeneration: PropTypes.func.isRequired }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js index 544c19fa45c..c3301970686 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; export default class EncryptionForm extends React.PureComponent { static propTypes = { - encryptedValue: React.PropTypes.string, - encryptValue: React.PropTypes.func.isRequired, - generateSecretKey: React.PropTypes.func.isRequired + encryptedValue: PropTypes.string, + encryptValue: PropTypes.func.isRequired, + generateSecretKey: PropTypes.func.isRequired }; state = { value: '' }; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js index f6ae735d4eb..79166acc968 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js +++ b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; export default class GenerateSecretKeyForm extends React.PureComponent { static propTypes = { - secretKey: React.PropTypes.string, - generateSecretKey: React.PropTypes.func.isRequired + secretKey: PropTypes.string, + generateSecretKey: PropTypes.func.isRequired }; handleSubmit(e) { diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js index b9b6c56b737..36fa5ff8a70 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseChangeForm.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Modal from 'react-modal'; import { translate, translateWithParameters } from '../../../helpers/l10n'; export default class LicenseChangeForm extends React.PureComponent { static propTypes = { - license: React.PropTypes.object.isRequired, - onChange: React.PropTypes.func.isRequired + license: PropTypes.object.isRequired, + onChange: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js index 277d8a4c636..f8ef6d4c7f0 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRow.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import moment from 'moment'; import LicenseStatus from './LicenseStatus'; import LicenseChangeForm from './LicenseChangeForm'; export default class LicenseRow extends React.PureComponent { static propTypes = { - license: React.PropTypes.object.isRequired, - setLicense: React.PropTypes.func.isRequired + license: PropTypes.object.isRequired, + setLicense: PropTypes.func.isRequired }; handleSet = value => this.props.setLicense(this.props.license.key, value); diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js index 086fb5f4eb0..5f77eeeb718 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseStatus.js @@ -18,11 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { isLicenseInvalid } from './licenseUtils'; export default class LicenseStatus extends React.PureComponent { static propTypes = { - license: React.PropTypes.object.isRequired + license: PropTypes.object.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js index 9104cd830ee..91fcdcb1889 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesList.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import LicenseRowContainer from './LicenseRowContainer'; import { translate } from '../../../helpers/l10n'; export default class LicensesList extends React.PureComponent { static propTypes = { - licenses: React.PropTypes.array.isRequired, - fetchLicenses: React.PropTypes.func.isRequired + licenses: PropTypes.array.isRequired, + fetchLicenses: PropTypes.func.isRequired }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/apps/settings/propTypes.js b/server/sonar-web/src/main/js/apps/settings/propTypes.js index 871b3301c02..e6284a0d86b 100644 --- a/server/sonar-web/src/main/js/apps/settings/propTypes.js +++ b/server/sonar-web/src/main/js/apps/settings/propTypes.js @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { PropTypes } from 'react'; +import PropTypes from 'prop-types'; export const defaultInputPropTypes = { name: PropTypes.string.isRequired, diff --git a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js index ef2ded655bc..a6adaec83b9 100644 --- a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js +++ b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { translate } from '../../../helpers/l10n'; import { getServerId, generateServerId } from '../../../api/settings'; @@ -25,8 +26,8 @@ import { parseError } from '../../code/utils'; export default class ServerIdApp extends React.PureComponent { static propTypes = { - addGlobalErrorMessage: React.PropTypes.func.isRequired, - closeAllGlobalMessages: React.PropTypes.func.isRequired + addGlobalErrorMessage: PropTypes.func.isRequired, + closeAllGlobalMessages: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/Onboarding.js b/server/sonar-web/src/main/js/apps/tutorials/onboarding/Onboarding.js index b648f3a5197..4d3cc475152 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/Onboarding.js +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/Onboarding.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import TokenStep from './TokenStep'; import OrganizationStep from './OrganizationStep'; @@ -52,7 +53,7 @@ export default class Onboarding extends React.PureComponent { state: State; static contextTypes = { - router: React.PropTypes.object + router: PropTypes.object }; constructor(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/Onboarding-test.js.snap b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/Onboarding-test.js.snap index 5e9291b6c85..74b2721d7b0 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/Onboarding-test.js.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/__snapshots__/Onboarding-test.js.snap @@ -5,6 +5,7 @@ exports[`guides for on-premise 1`] = ` className="modal-container" > <HelmetWrapper + encodeSpecialCharacters={true} title="onboarding.header" titleTemplate="%s" /> @@ -59,6 +60,7 @@ exports[`guides for on-premise 2`] = ` className="modal-container" > <HelmetWrapper + encodeSpecialCharacters={true} title="onboarding.header" titleTemplate="%s" /> @@ -114,6 +116,7 @@ exports[`guides for sonarcloud 1`] = ` className="modal-container" > <HelmetWrapper + encodeSpecialCharacters={true} title="onboarding.header.sonarcloud" titleTemplate="%s" /> @@ -181,6 +184,7 @@ exports[`guides for sonarcloud 2`] = ` className="modal-container" > <HelmetWrapper + encodeSpecialCharacters={true} title="onboarding.header.sonarcloud" titleTemplate="%s" /> @@ -249,6 +253,7 @@ exports[`guides for sonarcloud 3`] = ` className="modal-container" > <HelmetWrapper + encodeSpecialCharacters={true} title="onboarding.header.sonarcloud" titleTemplate="%s" /> diff --git a/server/sonar-web/src/main/js/apps/users/components/UsersAppContainer.js b/server/sonar-web/src/main/js/apps/users/components/UsersAppContainer.js index d70383fd891..3dae41946b2 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UsersAppContainer.js +++ b/server/sonar-web/src/main/js/apps/users/components/UsersAppContainer.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import init from '../init'; @@ -26,7 +27,7 @@ import { translate } from '../../../helpers/l10n'; class UsersAppContainer extends React.PureComponent { static propTypes = { - currentUser: React.PropTypes.object.isRequired + currentUser: PropTypes.object.isRequired }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/UsersSelectSearch-test.js.snap b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/UsersSelectSearch-test.js.snap index 23e19035a29..483f49d3ea0 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/UsersSelectSearch-test.js.snap +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/UsersSelectSearch-test.js.snap @@ -9,8 +9,10 @@ exports[`should render correctly 1`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="Select-big" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -31,7 +33,6 @@ exports[`should render correctly 1`] = ` onChange={[Function]} onCloseResetsInput={true} onInputChange={[Function]} - openAfterFocus={false} optionComponent={[Function]} options={Array []} pageSize={5} @@ -77,8 +78,10 @@ exports[`should render correctly 3`] = ` backspaceToRemoveMessage="Press backspace to remove {label}" className="Select-big" clearAllText="Clear all" + clearRenderer={[Function]} clearValueText="Clear value" clearable={false} + deleteRemoves={true} delimiter="," disabled={false} escapeClearsValue={true} @@ -99,7 +102,6 @@ exports[`should render correctly 3`] = ` onChange={[Function]} onCloseResetsInput={true} onInputChange={[Function]} - openAfterFocus={false} optionComponent={[Function]} options={ Array [ diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js index a6dd2212369..ecd167948dc 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import { Link } from 'react-router'; import { fetchWebApi } from '../../../api/web-api'; @@ -187,5 +188,5 @@ export default class WebApiApp extends React.PureComponent { } WebApiApp.contextTypes = { - router: React.PropTypes.object.isRequired + router: PropTypes.object.isRequired }; diff --git a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.js b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.js index d6fb2024693..696ad6c6e24 100644 --- a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.js +++ b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { find, sortBy } from 'lodash'; +import PropTypes from 'prop-types'; import React from 'react'; import { Histogram } from './histogram'; import { formatMeasure } from '../../helpers/measures'; @@ -26,7 +27,7 @@ import { translate } from '../../helpers/l10n'; export default class LanguageDistribution extends React.PureComponent { static propTypes = { - distribution: React.PropTypes.string.isRequired + distribution: PropTypes.string.isRequired }; state = {}; diff --git a/server/sonar-web/src/main/js/components/charts/Timeline.js b/server/sonar-web/src/main/js/components/charts/Timeline.js index f8c5568df02..0896127d099 100644 --- a/server/sonar-web/src/main/js/components/charts/Timeline.js +++ b/server/sonar-web/src/main/js/components/charts/Timeline.js @@ -19,19 +19,23 @@ */ import $ from 'jquery'; import moment from 'moment'; +import PropTypes from 'prop-types'; import React from 'react'; +import createReactClass from 'create-react-class'; import { extent, max } from 'd3-array'; import { scaleLinear, scalePoint, scaleTime } from 'd3-scale'; import { line as d3Line, curveBasis } from 'd3-shape'; import { ResizeMixin } from '../mixins/resize-mixin'; import { TooltipsMixin } from '../mixins/tooltips-mixin'; -const Timeline = React.createClass({ +const Timeline = createReactClass({ + displayName: 'Timeline', + propTypes: { - data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - padding: React.PropTypes.arrayOf(React.PropTypes.number), - height: React.PropTypes.number, - basisCurve: React.PropTypes.bool + data: PropTypes.arrayOf(PropTypes.object).isRequired, + padding: PropTypes.arrayOf(PropTypes.number), + height: PropTypes.number, + basisCurve: PropTypes.bool }, mixins: [ResizeMixin, TooltipsMixin], @@ -205,6 +209,7 @@ const Timeline = React.createClass({ </g> ); }, + render() { if (!this.state.width || !this.state.height) { return <div />; diff --git a/server/sonar-web/src/main/js/components/charts/bar-chart.js b/server/sonar-web/src/main/js/components/charts/bar-chart.js index 1d89adb5475..37e847d580d 100644 --- a/server/sonar-web/src/main/js/components/charts/bar-chart.js +++ b/server/sonar-web/src/main/js/components/charts/bar-chart.js @@ -18,20 +18,24 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { max } from 'd3-array'; import { scaleLinear, scaleBand } from 'd3-scale'; import { ResizeMixin } from './../mixins/resize-mixin'; import { TooltipsContainer } from './../mixins/tooltips-mixin'; -export const BarChart = React.createClass({ +export const BarChart = createReactClass({ + displayName: 'BarChart', + propTypes: { - data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - xTicks: React.PropTypes.arrayOf(React.PropTypes.any), - xValues: React.PropTypes.arrayOf(React.PropTypes.any), - height: React.PropTypes.number, - padding: React.PropTypes.arrayOf(React.PropTypes.number), - barsWidth: React.PropTypes.number.isRequired, - onBarClick: React.PropTypes.func + data: PropTypes.arrayOf(PropTypes.object).isRequired, + xTicks: PropTypes.arrayOf(PropTypes.any), + xValues: PropTypes.arrayOf(PropTypes.any), + height: PropTypes.number, + padding: PropTypes.arrayOf(PropTypes.number), + barsWidth: PropTypes.number.isRequired, + onBarClick: PropTypes.func }, mixins: [ResizeMixin], diff --git a/server/sonar-web/src/main/js/components/charts/donut-chart.js b/server/sonar-web/src/main/js/components/charts/donut-chart.js index a55a243a72f..9acec66a199 100644 --- a/server/sonar-web/src/main/js/components/charts/donut-chart.js +++ b/server/sonar-web/src/main/js/components/charts/donut-chart.js @@ -18,22 +18,22 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { arc as d3Arc, pie as d3Pie } from 'd3-shape'; import { ResizeMixin } from './../mixins/resize-mixin'; import { TooltipsMixin } from './../mixins/tooltips-mixin'; -const Sector = React.createClass({ - render() { - const arc = d3Arc() - .outerRadius(this.props.radius) - .innerRadius(this.props.radius - this.props.thickness); - return <path d={arc(this.props.data)} style={{ fill: this.props.fill }} />; - } -}); +function Sector(props) { + const arc = d3Arc().outerRadius(props.radius).innerRadius(props.radius - props.thickness); + return <path d={arc(props.data)} style={{ fill: props.fill }} />; +} + +export const DonutChart = createReactClass({ + displayName: 'DonutChart', -export const DonutChart = React.createClass({ propTypes: { - data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired + data: PropTypes.arrayOf(PropTypes.object).isRequired }, mixins: [ResizeMixin, TooltipsMixin], diff --git a/server/sonar-web/src/main/js/components/charts/histogram.js b/server/sonar-web/src/main/js/components/charts/histogram.js index c7542b3a0de..b6fdeb7b6c5 100644 --- a/server/sonar-web/src/main/js/components/charts/histogram.js +++ b/server/sonar-web/src/main/js/components/charts/histogram.js @@ -18,21 +18,25 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { max } from 'd3-array'; import { scaleLinear, scaleBand } from 'd3-scale'; import { ResizeMixin } from './../mixins/resize-mixin'; import { TooltipsMixin } from './../mixins/tooltips-mixin'; -export const Histogram = React.createClass({ +export const Histogram = createReactClass({ + displayName: 'Histogram', + propTypes: { - data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - yTicks: React.PropTypes.arrayOf(React.PropTypes.any), - yValues: React.PropTypes.arrayOf(React.PropTypes.any), - width: React.PropTypes.number, - height: React.PropTypes.number, - padding: React.PropTypes.arrayOf(React.PropTypes.number), - barsHeight: React.PropTypes.number, - onBarClick: React.PropTypes.func + data: PropTypes.arrayOf(PropTypes.object).isRequired, + yTicks: PropTypes.arrayOf(PropTypes.any), + yValues: PropTypes.arrayOf(PropTypes.any), + width: PropTypes.number, + height: PropTypes.number, + padding: PropTypes.arrayOf(PropTypes.number), + barsHeight: PropTypes.number, + onBarClick: PropTypes.func }, mixins: [ResizeMixin, TooltipsMixin], diff --git a/server/sonar-web/src/main/js/components/charts/line-chart.js b/server/sonar-web/src/main/js/components/charts/line-chart.js index 1b574db1216..ea56aa7e6ca 100644 --- a/server/sonar-web/src/main/js/components/charts/line-chart.js +++ b/server/sonar-web/src/main/js/components/charts/line-chart.js @@ -18,23 +18,27 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { extent, max } from 'd3-array'; import { scaleLinear } from 'd3-scale'; import { area as d3Area, line as d3Line, curveBasis } from 'd3-shape'; import { ResizeMixin } from './../mixins/resize-mixin'; import { TooltipsMixin } from './../mixins/tooltips-mixin'; -export const LineChart = React.createClass({ +export const LineChart = createReactClass({ + displayName: 'LineChart', + propTypes: { - data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - xTicks: React.PropTypes.arrayOf(React.PropTypes.any), - xValues: React.PropTypes.arrayOf(React.PropTypes.any), - padding: React.PropTypes.arrayOf(React.PropTypes.number), - backdropConstraints: React.PropTypes.arrayOf(React.PropTypes.number), - displayBackdrop: React.PropTypes.bool, - displayPoints: React.PropTypes.bool, - displayVerticalGrid: React.PropTypes.bool, - height: React.PropTypes.number + data: PropTypes.arrayOf(PropTypes.object).isRequired, + xTicks: PropTypes.arrayOf(PropTypes.any), + xValues: PropTypes.arrayOf(PropTypes.any), + padding: PropTypes.arrayOf(PropTypes.number), + backdropConstraints: PropTypes.arrayOf(PropTypes.number), + displayBackdrop: PropTypes.bool, + displayPoints: PropTypes.bool, + displayVerticalGrid: PropTypes.bool, + height: PropTypes.number }, mixins: [ResizeMixin, TooltipsMixin], diff --git a/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js b/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js index 3e23cb080ac..8ed3536a9d6 100644 --- a/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js +++ b/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import QualifierIcon from '../shared/QualifierIcon'; export class TreemapBreadcrumbs extends React.PureComponent { static propTypes = { - breadcrumbs: React.PropTypes.arrayOf( - React.PropTypes.shape({ - key: React.PropTypes.string.isRequired, - name: React.PropTypes.string.isRequired, - qualifier: React.PropTypes.string.isRequired + breadcrumbs: PropTypes.arrayOf( + PropTypes.shape({ + key: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + qualifier: PropTypes.string.isRequired }).isRequired ).isRequired }; diff --git a/server/sonar-web/src/main/js/components/charts/treemap.js b/server/sonar-web/src/main/js/components/charts/treemap.js index 77316c7c78f..7b6c73af59e 100644 --- a/server/sonar-web/src/main/js/components/charts/treemap.js +++ b/server/sonar-web/src/main/js/components/charts/treemap.js @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { scaleLinear } from 'd3-scale'; import { treemap as d3Treemap, hierarchy as d3Hierarchy } from 'd3-hierarchy'; import { TreemapBreadcrumbs } from './treemap-breadcrumbs'; @@ -42,18 +44,18 @@ function mostCommitPrefix(strings) { return prefix.substr(0, prefix.length - lastPrefixPart.length); } -export const TreemapRect = React.createClass({ - propTypes: { - x: React.PropTypes.number.isRequired, - y: React.PropTypes.number.isRequired, - width: React.PropTypes.number.isRequired, - height: React.PropTypes.number.isRequired, - fill: React.PropTypes.string.isRequired, - label: React.PropTypes.string.isRequired, - onClick: React.PropTypes.func - }, - - renderLink() { +export class TreemapRect extends React.PureComponent { + static propTypes = { + x: PropTypes.number.isRequired, + y: PropTypes.number.isRequired, + width: PropTypes.number.isRequired, + height: PropTypes.number.isRequired, + fill: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, + onClick: PropTypes.func + }; + + renderLink = () => { if (!this.props.link) { return null; } @@ -71,7 +73,7 @@ export const TreemapRect = React.createClass({ <span className="icon-link" /> </a> ); - }, + }; render() { let tooltipAttrs = {}; @@ -108,13 +110,15 @@ export const TreemapRect = React.createClass({ </div> ); } -}); +} + +export const Treemap = createReactClass({ + displayName: 'Treemap', -export const Treemap = React.createClass({ propTypes: { - items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - height: React.PropTypes.number, - onRectangleClick: React.PropTypes.func + items: PropTypes.arrayOf(PropTypes.object).isRequired, + height: PropTypes.number, + onRectangleClick: PropTypes.func }, mixins: [ResizeMixin, TooltipsMixin], diff --git a/server/sonar-web/src/main/js/components/charts/word-cloud.js b/server/sonar-web/src/main/js/components/charts/word-cloud.js index 021b5bcba59..c7547ebdf87 100644 --- a/server/sonar-web/src/main/js/components/charts/word-cloud.js +++ b/server/sonar-web/src/main/js/components/charts/word-cloud.js @@ -18,39 +18,41 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import createReactClass from 'create-react-class'; +import PropTypes from 'prop-types'; import { max } from 'd3-array'; import { scaleLinear } from 'd3-scale'; import { sortBy } from 'lodash'; import { TooltipsMixin } from './../mixins/tooltips-mixin'; -export const Word = React.createClass({ - propTypes: { - size: React.PropTypes.number.isRequired, - text: React.PropTypes.string.isRequired, - tooltip: React.PropTypes.string, - link: React.PropTypes.string.isRequired - }, - - render() { - let tooltipAttrs = {}; - if (this.props.tooltip) { - tooltipAttrs = { - 'data-toggle': 'tooltip', - title: this.props.tooltip - }; - } - return ( - <a {...tooltipAttrs} style={{ fontSize: this.props.size }} href={this.props.link}> - {this.props.text} - </a> - ); +export function Word(props) { + let tooltipAttrs = {}; + if (props.tooltip) { + tooltipAttrs = { + 'data-toggle': 'tooltip', + title: props.tooltip + }; } -}); + return ( + <a {...tooltipAttrs} style={{ fontSize: props.size }} href={props.link}> + {props.text} + </a> + ); +} + +Word.propTypes = { + size: PropTypes.number.isRequired, + text: PropTypes.string.isRequired, + tooltip: PropTypes.string, + link: PropTypes.string.isRequired +}; + +export const WordCloud = createReactClass({ + displayName: 'WordCloud', -export const WordCloud = React.createClass({ propTypes: { - items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, - sizeRange: React.PropTypes.arrayOf(React.PropTypes.number) + items: PropTypes.arrayOf(PropTypes.object).isRequired, + sizeRange: PropTypes.arrayOf(PropTypes.number) }, mixins: [TooltipsMixin], diff --git a/server/sonar-web/src/main/js/components/common/BubblePopup.js b/server/sonar-web/src/main/js/components/common/BubblePopup.js index b29ee147dab..c77167ee53b 100644 --- a/server/sonar-web/src/main/js/components/common/BubblePopup.js +++ b/server/sonar-web/src/main/js/components/common/BubblePopup.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; export default class BubblePopup extends React.PureComponent { static propsType = { - children: React.PropTypes.object.isRequired, - position: React.PropTypes.object.isRequired, - customClass: React.PropTypes.string + children: PropTypes.object.isRequired, + position: PropTypes.object.isRequired, + customClass: PropTypes.string }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/controls/Checkbox.js b/server/sonar-web/src/main/js/components/controls/Checkbox.js index 57a5d6969a5..b1acc9f577e 100644 --- a/server/sonar-web/src/main/js/components/controls/Checkbox.js +++ b/server/sonar-web/src/main/js/components/controls/Checkbox.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; export default class Checkbox extends React.PureComponent { static propTypes = { - id: React.PropTypes.string, - onCheck: React.PropTypes.func.isRequired, - checked: React.PropTypes.bool.isRequired, - thirdState: React.PropTypes.bool, - className: React.PropTypes.any + id: PropTypes.string, + onCheck: PropTypes.func.isRequired, + checked: PropTypes.bool.isRequired, + thirdState: PropTypes.bool, + className: PropTypes.any }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/controls/DateInput.js b/server/sonar-web/src/main/js/components/controls/DateInput.js index 16bab132de3..9da950af99a 100644 --- a/server/sonar-web/src/main/js/components/controls/DateInput.js +++ b/server/sonar-web/src/main/js/components/controls/DateInput.js @@ -19,18 +19,19 @@ */ import $ from 'jquery'; import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { pick } from 'lodash'; import './styles.css'; export default class DateInput extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, - value: React.PropTypes.string, - format: React.PropTypes.string, - name: React.PropTypes.string, - placeholder: React.PropTypes.string, - onChange: React.PropTypes.func.isRequired + className: PropTypes.string, + value: PropTypes.string, + format: PropTypes.string, + name: PropTypes.string, + placeholder: PropTypes.string, + onChange: PropTypes.func.isRequired }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/controls/Favorite.js b/server/sonar-web/src/main/js/components/controls/Favorite.js index f783d24b666..4faf4e186e6 100644 --- a/server/sonar-web/src/main/js/components/controls/Favorite.js +++ b/server/sonar-web/src/main/js/components/controls/Favorite.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FavoriteBase from './FavoriteBase'; import { addFavorite, removeFavorite } from '../../api/favorites'; export default class Favorite extends React.PureComponent { static propTypes = { - favorite: React.PropTypes.bool.isRequired, - component: React.PropTypes.string.isRequired, - className: React.PropTypes.string + favorite: PropTypes.bool.isRequired, + component: PropTypes.string.isRequired, + className: PropTypes.string }; render() { diff --git a/server/sonar-web/src/main/js/components/controls/FavoriteBase.js b/server/sonar-web/src/main/js/components/controls/FavoriteBase.js index 13ec0372fe1..ac1d58186b3 100644 --- a/server/sonar-web/src/main/js/components/controls/FavoriteBase.js +++ b/server/sonar-web/src/main/js/components/controls/FavoriteBase.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import FavoriteIcon from '../common/FavoriteIcon'; export default class FavoriteBase extends React.PureComponent { static propTypes = { - favorite: React.PropTypes.bool.isRequired, - addFavorite: React.PropTypes.func.isRequired, - removeFavorite: React.PropTypes.func.isRequired, - className: React.PropTypes.string + favorite: PropTypes.bool.isRequired, + addFavorite: PropTypes.func.isRequired, + removeFavorite: PropTypes.func.isRequired, + className: PropTypes.string }; constructor(props) { diff --git a/server/sonar-web/src/main/js/components/controls/FavoriteBaseStateless.js b/server/sonar-web/src/main/js/components/controls/FavoriteBaseStateless.js index 1e4f325fa1f..35260d19d85 100644 --- a/server/sonar-web/src/main/js/components/controls/FavoriteBaseStateless.js +++ b/server/sonar-web/src/main/js/components/controls/FavoriteBaseStateless.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import FavoriteIcon from '../common/FavoriteIcon'; export default class FavoriteBaseStateless extends React.PureComponent { static propTypes = { - favorite: React.PropTypes.bool.isRequired, - addFavorite: React.PropTypes.func.isRequired, - removeFavorite: React.PropTypes.func.isRequired, - className: React.PropTypes.string + favorite: PropTypes.bool.isRequired, + addFavorite: PropTypes.func.isRequired, + removeFavorite: PropTypes.func.isRequired, + className: PropTypes.string }; toggleFavorite = e => { diff --git a/server/sonar-web/src/main/js/components/controls/FavoriteIssueFilter.js b/server/sonar-web/src/main/js/components/controls/FavoriteIssueFilter.js index 2cfaf29aa8a..c00c2993d04 100644 --- a/server/sonar-web/src/main/js/components/controls/FavoriteIssueFilter.js +++ b/server/sonar-web/src/main/js/components/controls/FavoriteIssueFilter.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import FavoriteBase from './FavoriteBase'; import { toggleIssueFilter } from '../../api/issue-filters'; export default class FavoriteIssueFilter extends React.PureComponent { static propTypes = { - favorite: React.PropTypes.bool.isRequired, - filter: React.PropTypes.shape({ - id: React.PropTypes.string.isRequired + favorite: PropTypes.bool.isRequired, + filter: PropTypes.shape({ + id: PropTypes.string.isRequired }).isRequired }; diff --git a/server/sonar-web/src/main/js/components/controls/GlobalMessages.js b/server/sonar-web/src/main/js/components/controls/GlobalMessages.js index 10f41ddad15..ac3c07535bf 100644 --- a/server/sonar-web/src/main/js/components/controls/GlobalMessages.js +++ b/server/sonar-web/src/main/js/components/controls/GlobalMessages.js @@ -18,19 +18,20 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { ERROR, SUCCESS } from '../../store/globalMessages/duck'; export default class GlobalMessages extends React.PureComponent { static propTypes = { - messages: React.PropTypes.arrayOf( - React.PropTypes.shape({ - id: React.PropTypes.string.isRequired, - message: React.PropTypes.string.isRequired, - level: React.PropTypes.oneOf([ERROR, SUCCESS]) + messages: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string.isRequired, + message: PropTypes.string.isRequired, + level: PropTypes.oneOf([ERROR, SUCCESS]) }) ), - closeGlobalMessage: React.PropTypes.func.isRequired + closeGlobalMessage: PropTypes.func.isRequired }; renderMessage = message => { diff --git a/server/sonar-web/src/main/js/components/controls/ListFooter.js b/server/sonar-web/src/main/js/components/controls/ListFooter.js index ba8ea10eadd..2cb3d59e903 100644 --- a/server/sonar-web/src/main/js/components/controls/ListFooter.js +++ b/server/sonar-web/src/main/js/components/controls/ListFooter.js @@ -19,15 +19,16 @@ */ import classNames from 'classnames'; import React from 'react'; +import PropTypes from 'prop-types'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { formatMeasure } from '../../helpers/measures'; export default class ListFooter extends React.PureComponent { static propTypes = { - count: React.PropTypes.number.isRequired, - total: React.PropTypes.number.isRequired, - loadMore: React.PropTypes.func, - ready: React.PropTypes.bool + count: PropTypes.number.isRequired, + total: PropTypes.number.isRequired, + loadMore: PropTypes.func, + ready: PropTypes.bool }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/controls/RadioToggle.js b/server/sonar-web/src/main/js/components/controls/RadioToggle.js index 83f36d2d846..2041eba1422 100644 --- a/server/sonar-web/src/main/js/components/controls/RadioToggle.js +++ b/server/sonar-web/src/main/js/components/controls/RadioToggle.js @@ -18,18 +18,19 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; export default class RadioToggle extends React.PureComponent { static propTypes = { - value: React.PropTypes.string, - options: React.PropTypes.arrayOf( - React.PropTypes.shape({ - value: React.PropTypes.string.isRequired, - label: React.PropTypes.string.isRequired + value: PropTypes.string, + options: PropTypes.arrayOf( + PropTypes.shape({ + value: PropTypes.string.isRequired, + label: PropTypes.string.isRequired }) ).isRequired, - name: React.PropTypes.string.isRequired, - onCheck: React.PropTypes.func.isRequired + name: PropTypes.string.isRequired, + onCheck: PropTypes.func.isRequired }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/controls/Toggle.js b/server/sonar-web/src/main/js/components/controls/Toggle.js index 870ed5220ec..165c74777eb 100644 --- a/server/sonar-web/src/main/js/components/controls/Toggle.js +++ b/server/sonar-web/src/main/js/components/controls/Toggle.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import './styles.css'; export default class Toggle extends React.PureComponent { static propTypes = { - value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.bool]).isRequired, - name: React.PropTypes.string, - onChange: React.PropTypes.func + value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).isRequired, + name: PropTypes.string, + onChange: PropTypes.func }; handleClick(e, value) { diff --git a/server/sonar-web/src/main/js/components/issue/Issue.js b/server/sonar-web/src/main/js/components/issue/Issue.js index eaa0214f92a..f21644f1e59 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.js +++ b/server/sonar-web/src/main/js/components/issue/Issue.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import key from 'keymaster'; import IssueView from './IssueView'; import { updateIssue } from './actions'; @@ -46,7 +47,7 @@ export default class BaseIssue extends React.PureComponent { state: State; static contextTypes = { - store: React.PropTypes.object + store: PropTypes.object }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/select-list/footer.js b/server/sonar-web/src/main/js/components/select-list/footer.js index 3088c2f2337..d85be905a9d 100644 --- a/server/sonar-web/src/main/js/components/select-list/footer.js +++ b/server/sonar-web/src/main/js/components/select-list/footer.js @@ -18,12 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; export default class Footer extends React.PureComponent { static propTypes = { - count: React.PropTypes.number.isRequired, - total: React.PropTypes.number.isRequired, - loadMore: React.PropTypes.func.isRequired + count: PropTypes.number.isRequired, + total: PropTypes.number.isRequired, + loadMore: PropTypes.func.isRequired }; loadMore = e => { diff --git a/server/sonar-web/src/main/js/components/select-list/item.js b/server/sonar-web/src/main/js/components/select-list/item.js index ecd5442c927..c03ef453c04 100644 --- a/server/sonar-web/src/main/js/components/select-list/item.js +++ b/server/sonar-web/src/main/js/components/select-list/item.js @@ -18,14 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Checkbox from '../controls/Checkbox'; export default class Item extends React.PureComponent { static propTypes = { - item: React.PropTypes.any.isRequired, - renderItem: React.PropTypes.func.isRequired, - selectItem: React.PropTypes.func.isRequired, - deselectItem: React.PropTypes.func.isRequired + item: PropTypes.any.isRequired, + renderItem: PropTypes.func.isRequired, + selectItem: PropTypes.func.isRequired, + deselectItem: PropTypes.func.isRequired }; onCheck = checked => { diff --git a/server/sonar-web/src/main/js/components/select-list/list.js b/server/sonar-web/src/main/js/components/select-list/list.js index 6a701f51eb4..c752367bb8e 100644 --- a/server/sonar-web/src/main/js/components/select-list/list.js +++ b/server/sonar-web/src/main/js/components/select-list/list.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Item from './item'; export default class List extends React.PureComponent { static propTypes = { - items: React.PropTypes.array.isRequired, - renderItem: React.PropTypes.func.isRequired, - getItemKey: React.PropTypes.func.isRequired, - selectItem: React.PropTypes.func.isRequired, - deselectItem: React.PropTypes.func.isRequired + items: PropTypes.array.isRequired, + renderItem: PropTypes.func.isRequired, + getItemKey: PropTypes.func.isRequired, + selectItem: PropTypes.func.isRequired, + deselectItem: PropTypes.func.isRequired }; render() { diff --git a/server/sonar-web/src/main/js/components/select-list/main.js b/server/sonar-web/src/main/js/components/select-list/main.js index 64902383add..3ebfeafaa9b 100644 --- a/server/sonar-web/src/main/js/components/select-list/main.js +++ b/server/sonar-web/src/main/js/components/select-list/main.js @@ -18,17 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import Controls from './controls'; import List from './list'; import Footer from './footer'; export default class Main extends React.PureComponent { static propTypes = { - loadItems: React.PropTypes.func.isRequired, - renderItem: React.PropTypes.func.isRequired, - getItemKey: React.PropTypes.func.isRequired, - selectItem: React.PropTypes.func.isRequired, - deselectItem: React.PropTypes.func.isRequired + loadItems: PropTypes.func.isRequired, + renderItem: PropTypes.func.isRequired, + getItemKey: PropTypes.func.isRequired, + selectItem: PropTypes.func.isRequired, + deselectItem: PropTypes.func.isRequired }; state = { diff --git a/server/sonar-web/src/main/js/components/shared/WithStore.js b/server/sonar-web/src/main/js/components/shared/WithStore.js index 5d8a41939cf..c406d118aff 100644 --- a/server/sonar-web/src/main/js/components/shared/WithStore.js +++ b/server/sonar-web/src/main/js/components/shared/WithStore.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import PropTypes from 'prop-types'; import getStore from '../../app/utils/getStore'; type Props = { @@ -30,7 +31,7 @@ export default class WithStore extends React.PureComponent { store: {}; static childContextTypes = { - store: React.PropTypes.object + store: PropTypes.object }; constructor(props: Props) { diff --git a/server/sonar-web/src/main/js/components/shared/complexity-distribution.js b/server/sonar-web/src/main/js/components/shared/complexity-distribution.js index 6c7b49221a5..7853ee91800 100644 --- a/server/sonar-web/src/main/js/components/shared/complexity-distribution.js +++ b/server/sonar-web/src/main/js/components/shared/complexity-distribution.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { BarChart } from '../charts/bar-chart'; import { formatMeasure } from '../../helpers/measures'; import { translateWithParameters } from '../../helpers/l10n'; @@ -26,8 +27,8 @@ const HEIGHT = 80; export class ComplexityDistribution extends React.PureComponent { static propTypes = { - distribution: React.PropTypes.string.isRequired, - of: React.PropTypes.string.isRequired + distribution: PropTypes.string.isRequired, + of: PropTypes.string.isRequired }; renderBarChart = () => { diff --git a/server/sonar-web/src/main/js/components/shared/drilldown-link.js b/server/sonar-web/src/main/js/components/shared/drilldown-link.js index 55b64727a8a..13b0afeb0c3 100644 --- a/server/sonar-web/src/main/js/components/shared/drilldown-link.js +++ b/server/sonar-web/src/main/js/components/shared/drilldown-link.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; import { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls'; @@ -48,14 +49,11 @@ const ISSUE_MEASURES = [ export class DrilldownLink extends React.PureComponent { static propTypes = { - children: React.PropTypes.oneOfType([ - React.PropTypes.node, - React.PropTypes.arrayOf(React.PropTypes.node) - ]), - className: React.PropTypes.string, - component: React.PropTypes.string.isRequired, - metric: React.PropTypes.string.isRequired, - sinceLeakPeriod: React.PropTypes.bool + children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]), + className: PropTypes.string, + component: PropTypes.string.isRequired, + metric: PropTypes.string.isRequired, + sinceLeakPeriod: PropTypes.bool }; isIssueMeasure = () => { return ISSUE_MEASURES.indexOf(this.props.metric) !== -1; diff --git a/server/sonar-web/src/main/js/components/ui/Avatar.js b/server/sonar-web/src/main/js/components/ui/Avatar.js index fcd34da318f..a2a53f474aa 100644 --- a/server/sonar-web/src/main/js/components/ui/Avatar.js +++ b/server/sonar-web/src/main/js/components/ui/Avatar.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import md5 from 'blueimp-md5'; import classNames from 'classnames'; @@ -47,13 +48,13 @@ function getTextColor(background) { class Avatar extends React.PureComponent { static propTypes = { - enableGravatar: React.PropTypes.bool.isRequired, - gravatarServerUrl: React.PropTypes.string.isRequired, - email: React.PropTypes.string, - hash: React.PropTypes.string, - name: React.PropTypes.string.isRequired, - size: React.PropTypes.number.isRequired, - className: React.PropTypes.string + enableGravatar: PropTypes.bool.isRequired, + gravatarServerUrl: PropTypes.string.isRequired, + email: PropTypes.string, + hash: PropTypes.string, + name: PropTypes.string.isRequired, + size: PropTypes.number.isRequired, + className: PropTypes.string }; renderFallback() { diff --git a/server/sonar-web/src/main/js/components/ui/Level.js b/server/sonar-web/src/main/js/components/ui/Level.js index 66a2bbe5025..013618021ef 100644 --- a/server/sonar-web/src/main/js/components/ui/Level.js +++ b/server/sonar-web/src/main/js/components/ui/Level.js @@ -18,15 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { formatMeasure } from '../../helpers/measures'; import './Level.css'; export default class Level extends React.PureComponent { static propTypes = { - level: React.PropTypes.oneOf(['ERROR', 'WARN', 'OK']).isRequired, - small: React.PropTypes.bool, - muted: React.PropTypes.bool + level: PropTypes.oneOf(['ERROR', 'WARN', 'OK']).isRequired, + small: PropTypes.bool, + muted: PropTypes.bool }; static defaultProps = { diff --git a/server/sonar-web/src/main/js/components/ui/Rating.js b/server/sonar-web/src/main/js/components/ui/Rating.js index 65a56c46999..1f30a388d04 100644 --- a/server/sonar-web/src/main/js/components/ui/Rating.js +++ b/server/sonar-web/src/main/js/components/ui/Rating.js @@ -18,13 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { formatMeasure } from '../../helpers/measures'; import './Rating.css'; export default class Rating extends React.PureComponent { static propTypes = { - className: React.PropTypes.string, + className: PropTypes.string, value: (props, propName, componentName) => { // allow both numbers and strings const numberValue = Number(props[propName]); @@ -32,8 +33,8 @@ export default class Rating extends React.PureComponent { throw new Error(`Invalid prop "${propName}" passed to "${componentName}".`); } }, - small: React.PropTypes.bool, - muted: React.PropTypes.bool + small: PropTypes.bool, + muted: PropTypes.bool }; static defaultProps = { diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index 40419b19538..d54951666b7 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -867,7 +867,7 @@ babel-register@^6.22.0: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@6.23.0, babel-runtime@6.x, babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.9.0: +babel-runtime@6.23.0, babel-runtime@6.x, babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.23.0, babel-runtime@^6.9.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: @@ -947,7 +947,7 @@ babel-types@^6.22.0: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.0.18, babylon@^6.11.0: +babylon@^6.11.0: version "6.14.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" @@ -1552,6 +1552,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-react-class@15.6.0, create-react-class@15.x, create-react-class@^15.5.1, create-react-class@^15.5.2, create-react-class@^15.5.3, create-react-class@^15.6.0: + version "15.6.0" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + cross-spawn@4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -1580,7 +1588,7 @@ crypto-browserify@^3.11.0: public-encrypt "^4.0.0" randombytes "^2.0.0" -css-animation@^1.3.0: +css-animation@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/css-animation/-/css-animation-1.3.2.tgz#df515820ef5903733ad2db0999403b3037b8b880" dependencies: @@ -1806,7 +1814,7 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" -deep-equal@1.0.1: +deep-equal@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -1904,8 +1912,8 @@ doctrine@1.5.0, doctrine@^1.2.2: isarray "^1.0.0" dom-align@1.x: - version "1.5.3" - resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.5.3.tgz#b906b616822a5e599f579ec8505e367c51da7588" + version "1.6.2" + resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.6.2.tgz#b14e64917c25de6b4055227339b4d64f4b7db885" dom-converter@~0.1: version "0.1.4" @@ -1983,10 +1991,6 @@ electron-to-chromium@^1.2.1, electron-to-chromium@^1.3.14: version "1.3.14" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.14.tgz#64af0f9efd3c3c6acd57d71f83b49ca7ee9c4b43" -element-class@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/element-class/-/element-class-0.2.2.tgz#9d3bbd0767f9013ef8e1c8ebe722c1402a60050e" - elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -2026,29 +2030,32 @@ entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -enzyme-to-json@^1.4.5: - version "1.4.5" - resolved "https://registry.yarnpkg.com/enzyme-to-json/-/enzyme-to-json-1.4.5.tgz#698d6c209b54527aa3e28658e34b5d9f976f8016" +enzyme-to-json@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/enzyme-to-json/-/enzyme-to-json-1.5.1.tgz#e34f4d126bb3f4696ce3800b51f9ed83df708799" dependencies: - lodash.compact "^3.0.1" + lodash.filter "^4.6.0" + lodash.isnil "^4.0.0" lodash.isplainobject "^4.0.6" lodash.omitby "^4.5.0" + lodash.range "^3.2.0" object-values "^1.0.0" object.entries "^1.0.3" -enzyme@^2.6.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.7.0.tgz#772477800547ca2514cc0af258e647c166aee899" +enzyme@2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.9.1.tgz#07d5ce691241240fb817bf2c4b18d6e530240df6" dependencies: cheerio "^0.22.0" function.prototype.name "^1.0.0" is-subset "^0.1.1" - lodash "^4.17.2" + lodash "^4.17.4" object-is "^1.0.1" object.assign "^4.0.4" - object.entries "^1.0.3" - object.values "^1.0.3" - uuid "^2.0.3" + object.entries "^1.0.4" + object.values "^1.0.4" + prop-types "^15.5.10" + uuid "^3.0.1" "errno@>=0.1.1 <0.2.0-0", errno@^0.1.1, errno@^0.1.3: version "0.1.4" @@ -2334,6 +2341,10 @@ exenv@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.0.tgz#3835f127abf075bfe082d0aed4484057c78e3c89" +exenv@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -2450,17 +2461,9 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@0.1.0-alpha.10: - version "0.1.0-alpha.10" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.1.0-alpha.10.tgz#46e457c09cbefb51fc752a3e030e7b67fcc384c8" - dependencies: - core-js "^1.0.0" - promise "^7.0.3" - whatwg-fetch "^0.9.0" - -fbjs@^0.8.1, fbjs@^0.8.4: - version "0.8.8" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.8.tgz#02f1b6e0ea0d46c24e0b51a2d24df069563a5ad6" +fbjs@^0.8.9: + version "0.8.12" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -3819,6 +3822,10 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +lodash-es@^4.2.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" + lodash-es@^4.2.1: version "4.17.3" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.3.tgz#567a08d2f0c91d92b31ce35c5565e1f337fb81db" @@ -3827,10 +3834,6 @@ lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - lodash.assignin@^4.0.9: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" @@ -3843,10 +3846,6 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" -lodash.compact@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash.compact/-/lodash.compact-3.0.1.tgz#540ce3837745975807471e16b4a2ba21e7256ca5" - lodash.cond@^4.3.0: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" @@ -3855,7 +3854,7 @@ lodash.defaults@^4.0.1: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" -lodash.filter@^4.4.0: +lodash.filter@^4.4.0, lodash.filter@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" @@ -3879,6 +3878,10 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" +lodash.isnil@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lodash.isnil/-/lodash.isnil-4.0.0.tgz#49e28cd559013458c814c5479d3c663a21bfaa6c" + lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" @@ -3907,6 +3910,10 @@ lodash.pick@^4.2.1: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" +lodash.range@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.range/-/lodash.range-3.2.0.tgz#f461e588f66683f7eadeade513e38a69a565a15d" + lodash.reduce@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" @@ -3935,12 +3942,18 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8" dependencies: js-tokens "^2.0.0" +loose-envify@^1.3.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + lower-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.3.tgz#c92393d976793eee5ba4edb583cf8eae35bd9bfb" @@ -4249,7 +4262,11 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@4.x, object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@4.x, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" @@ -4277,7 +4294,7 @@ object.assign@^4.0.4: function-bind "^1.1.0" object-keys "^1.0.10" -object.entries@^1.0.3: +object.entries@^1.0.3, object.entries@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" dependencies: @@ -4293,7 +4310,7 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -object.values@^1.0.3: +object.values@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" dependencies: @@ -4862,12 +4879,19 @@ progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" -promise@^7.0.3, promise@^7.1.1: +promise@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" dependencies: asap "~2.0.3" +prop-types@15.5.10, prop-types@15.x, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8: + version "15.5.10" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + proxy-addr@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3" @@ -4954,38 +4978,46 @@ range-parser@^1.0.3, range-parser@~1.2.0: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" rc-align@2.x: - version "2.3.3" - resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-2.3.3.tgz#15e2fd329fde9c2dec16e4a0e0ec20fba2ffdbc0" + version "2.3.4" + resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-2.3.4.tgz#d83bdab7560f0142e72a3de1d495dab6ba225249" dependencies: dom-align "1.x" + prop-types "^15.5.8" rc-util "4.x" rc-animate@2.x: - version "2.3.3" - resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-2.3.3.tgz#9f123990aa625c5867ace88412a185e46b307d03" + version "2.4.1" + resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-2.4.1.tgz#df3e0f56fe106afe4bf52ff408ced241c5178919" dependencies: - css-animation "^1.3.0" + babel-runtime "6.x" + css-animation "^1.3.2" + prop-types "15.x" -rc-tooltip@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-3.4.2.tgz#c5c89c347ed790f7f290ef825d5e24e8fb599166" +rc-tooltip@3.4.7: + version "3.4.7" + resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-3.4.7.tgz#ec6cc39a962de96a9147de08a78fb38f93517ff3" dependencies: + babel-runtime "^6.23.0" + prop-types "^15.5.8" rc-trigger "1.x" rc-trigger@1.x: - version "1.9.1" - resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-1.9.1.tgz#70cf50cc268ff46e335ee9c95f46c94d8074275c" + version "1.11.2" + resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-1.11.2.tgz#5c75a1928814a0595e3d912e0a15ca853df5464d" dependencies: babel-runtime "6.x" + create-react-class "15.x" + prop-types "15.x" rc-align "2.x" rc-animate "2.x" rc-util "4.x" rc-util@4.x: - version "4.0.2" - resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-4.0.2.tgz#5804f8b141a13c8c14d7c265a7d21d298195af46" + version "4.0.4" + resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-4.0.4.tgz#99813dd90aee7e29b64939a70ac176ead3f4ff39" dependencies: add-dom-event-listener "1.x" + babel-runtime "6.x" shallowequal "^0.2.2" rc@~1.1.6: @@ -4997,13 +5029,6 @@ rc@~1.1.6: minimist "^1.2.0" strip-json-comments "~1.0.4" -react-addons-test-utils@15.4.2: - version "15.4.2" - resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.4.2.tgz#93bcaa718fcae7360d42e8fb1c09756cc36302a2" - dependencies: - fbjs "^0.8.4" - object-assign "^4.1.0" - react-dev-utils@3.0.0, react-dev-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-3.0.0.tgz#3677f37718ba0cae892ba9c01fe54d1622e6ef7c" @@ -5026,17 +5051,22 @@ react-dev-utils@3.0.0, react-dev-utils@^3.0.0: strip-ansi "3.0.1" text-table "0.2.0" -react-dom@15.4.2: - version "15.4.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.2.tgz#015363f05b0a1fd52ae9efdd3a0060d90695208f" +react-dom-factories@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.0.tgz#f43c05e5051b304f33251618d5bc859b29e46b6d" + +react-dom@15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470" dependencies: - fbjs "^0.8.1" + fbjs "^0.8.9" loose-envify "^1.1.0" object-assign "^4.1.0" + prop-types "^15.5.10" -react-draggable@2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-2.2.3.tgz#17628cb8aaefed639d38e0021b978a685d80b08b" +react-draggable@2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-2.2.6.tgz#3a806e10f2da6babfea4136be6510e89b0d76901" dependencies: classnames "^2.2.5" @@ -5051,76 +5081,96 @@ react-error-overlay@1.0.7: settle-promise "1.0.0" source-map "0.5.6" -react-helmet@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-3.1.0.tgz#63486194682f33004826f3687dc49a138b557050" +react-helmet@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.1.3.tgz#cd40626593a29eecf684b6d38d711f44c48188af" dependencies: - deep-equal "1.0.1" - object-assign "^4.0.1" - react-side-effect "1.0.2" - shallowequal "0.2.2" - warning "2.1.0" + deep-equal "^1.0.1" + object-assign "^4.1.1" + prop-types "^15.5.4" + react-side-effect "^1.1.0" -react-input-autosize@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-1.1.0.tgz#3fe1ac832387d8abab85f6051ceab1c9e5570853" +react-input-autosize@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-1.1.4.tgz#cbc45072d4084ddc57806db8e3b34e644b8366ac" + dependencies: + create-react-class "^15.5.2" + prop-types "^15.5.8" -react-modal@^1.6.4: - version "1.6.4" - resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-1.6.4.tgz#639383931cbaae7946a92de9d5a7c05a4a1cab82" +react-modal@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-2.2.2.tgz#4bbf98bc506e61c446c9f57329c7a488ea7d504b" dependencies: - element-class "^0.2.0" exenv "1.2.0" - lodash.assign "^4.2.0" + prop-types "^15.5.10" + react-dom-factories "^1.0.0" -react-redux@4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-4.4.1.tgz#f0be889d3dff0b9caf9f4e31fdcc0d0b481aa311" +react-redux@5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.5.tgz#f8e8c7b239422576e52d6b7db06439469be9846a" dependencies: + create-react-class "^15.5.3" hoist-non-react-statics "^1.0.3" invariant "^2.0.0" lodash "^4.2.0" + lodash-es "^4.2.0" loose-envify "^1.1.0" + prop-types "^15.5.10" -react-router@3.0.2: - version "3.0.2" - resolved "https://repox.sonarsource.com/api/npm/npm/react-router/-/react-router-3.0.2.tgz#5a19156678810e01d81901f9c0fef63284b8a514" +react-router@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-3.0.5.tgz#c3b7873758045a8bbc9562aef4ff4bc8cce7c136" dependencies: + create-react-class "^15.5.1" history "^3.0.0" hoist-non-react-statics "^1.2.0" invariant "^2.2.1" loose-envify "^1.2.0" + prop-types "^15.5.6" warning "^3.0.0" -react-select@^1.0.0-rc.2: - version "1.0.0-rc.2" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-1.0.0-rc.2.tgz#9fc11b149a3dc1ac831289d21b40a59742f82f8d" +react-select@1.0.0-rc.5: + version "1.0.0-rc.5" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-1.0.0-rc.5.tgz#9d316f252b1adc372ddb5cdf1f119c6b7cfdb5d6" dependencies: classnames "^2.2.4" - react-input-autosize "^1.1.0" + create-react-class "^15.5.2" + prop-types "^15.5.8" + react-input-autosize "^1.1.3" -react-side-effect@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.0.2.tgz#98e354decdbf0281e4223d87852d33e345eda561" +react-side-effect@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.3.tgz#512c25abe0dec172834c4001ec5c51e04d41bc5c" dependencies: - fbjs "0.1.0-alpha.10" + exenv "^1.2.1" + shallowequal "^1.0.1" -react-virtualized@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.1.0.tgz#ac022281860f832ffecaf7863c099813681be521" +react-test-renderer@15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.1.tgz#026f4a5bb5552661fd2cc4bbcd0d4bc8a35ebf7e" + dependencies: + fbjs "^0.8.9" + object-assign "^4.1.0" + +react-virtualized@9.9.0: + version "9.9.0" + resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.9.0.tgz#799a6f23819eeb82860d59b82fad33d1d420325e" dependencies: babel-runtime "^6.11.6" classnames "^2.2.3" dom-helpers "^2.4.0 || ^3.0.0" loose-envify "^1.3.0" + prop-types "^15.5.4" -react@15.4.2: - version "15.4.2" - resolved "https://registry.yarnpkg.com/react/-/react-15.4.2.tgz#41f7991b26185392ba9bae96c8889e7e018397ef" +react@15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df" dependencies: - fbjs "^0.8.4" + create-react-class "^15.6.0" + fbjs "^0.8.9" loose-envify "^1.1.0" object-assign "^4.1.0" + prop-types "^15.5.10" read-pkg-up@^1.0.1: version "1.0.1" @@ -5548,12 +5598,16 @@ sha.js@^2.4.0, sha.js@^2.4.8: dependencies: inherits "^2.0.1" -shallowequal@0.2.2, shallowequal@^0.2.2: +shallowequal@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e" dependencies: lodash.keys "^3.1.2" +shallowequal@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.0.2.tgz#1561dbdefb8c01408100319085764da3fcf83f8f" + shell-quote@1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" @@ -6093,7 +6147,7 @@ utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" -uuid@^2.0.2, uuid@^2.0.3: +uuid@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" @@ -6101,6 +6155,10 @@ uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" +uuid@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" @@ -6134,12 +6192,6 @@ walker@~1.0.5: dependencies: makeerror "1.0.x" -warning@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/warning/-/warning-2.1.0.tgz#21220d9c63afc77a8c92111e011af705ce0c6901" - dependencies: - loose-envify "^1.0.0" - warning@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" @@ -6279,10 +6331,6 @@ whatwg-fetch@1.0.0, whatwg-fetch@>=0.10.0: version "1.0.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-1.0.0.tgz#01c2ac4df40e236aaa18480e3be74bd5c8eb798e" -whatwg-fetch@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz#0e3684c6cb9995b43efc9df03e4c365d95fd9cc0" - whatwg-url@^4.3.0: version "4.7.1" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.7.1.tgz#df4dc2e3f25a63b1fa5b32ed6d6c139577d690de" |