@@ -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", |
@@ -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 = { |
@@ -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() { |
@@ -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" |
@@ -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 | |||
}; | |||
@@ -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() { |
@@ -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() { |
@@ -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() { |
@@ -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 | |||
}; | |||
@@ -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) { |
@@ -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() { |
@@ -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() { |
@@ -5,6 +5,7 @@ exports[`should match snapshot 1`] = ` | |||
className="account-body account-container" | |||
> | |||
<HelmetWrapper | |||
encodeSpecialCharacters={true} | |||
title="my_account.notifications" | |||
/> | |||
<p |
@@ -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() { |
@@ -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() { |
@@ -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() { |
@@ -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, |
@@ -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 = { |
@@ -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) { |
@@ -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() { |
@@ -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 [ |
@@ -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 = { |
@@ -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) { |
@@ -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() { |
@@ -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 | |||
}; |
@@ -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} |
@@ -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" |
@@ -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 |
@@ -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 |
@@ -16,6 +16,7 @@ exports[`smoke test 2`] = ` | |||
<div> | |||
<HelmetWrapper | |||
defaultTitle="Foo" | |||
encodeSpecialCharacters={true} | |||
titleTemplate="%s - Foo" | |||
/> | |||
<OrganizationNavigation |
@@ -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" |
@@ -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" |
@@ -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" |
@@ -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() { |
@@ -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 = {}; |
@@ -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() { |
@@ -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 |
@@ -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) { |
@@ -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 = { |
@@ -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 | |||
}; | |||
@@ -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() { |
@@ -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() { |
@@ -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 | |||
}; | |||
@@ -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 => |
@@ -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 | |||
}; | |||
@@ -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 | |||
}; | |||
@@ -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) { |
@@ -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() { |
@@ -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() { |
@@ -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, |
@@ -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) { |
@@ -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 = { |
@@ -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() { |
@@ -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() { |
@@ -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) { |
@@ -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() { |
@@ -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 }; |
@@ -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 = { |
@@ -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) { |
@@ -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) { |
@@ -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 = { |
@@ -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 }; |
@@ -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 = {}; |
@@ -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) { |
@@ -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) { |
@@ -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() { |
@@ -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) { |
@@ -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 = { |
@@ -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() { |
@@ -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 = { |
@@ -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() { |
@@ -6,6 +6,7 @@ exports[`should render correctly 1`] = ` | |||
id="project-activity" | |||
> | |||
<HelmetWrapper | |||
encodeSpecialCharacters={true} | |||
title="project_activity.page" | |||
/> | |||
<ProjectActivityPageHeader |
@@ -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 [ |
@@ -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() { |
@@ -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 => { |
@@ -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() { |
@@ -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 [ |
@@ -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 [ |
@@ -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 = { |
@@ -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 = { |
@@ -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 = { |
@@ -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) { |
@@ -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 = { |
@@ -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) { |
@@ -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() { |
@@ -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 = { |
@@ -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 [ |
@@ -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 | |||
}; |
@@ -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 = {}; |
@@ -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 => { |
@@ -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 = { |
@@ -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) { |
@@ -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) { |
@@ -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 = { |
@@ -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, |
@@ -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 = {}; |
@@ -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() { |
@@ -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 = { |
@@ -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) { |