diff --git a/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx b/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx index 4c941232ad..37b884a6f6 100644 --- a/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx +++ b/superset/assets/javascripts/SqlLab/components/AceEditorWrapper.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import AceEditor from 'react-ace'; import 'brace/mode/sql'; import 'brace/theme/github'; @@ -25,12 +26,12 @@ const sqlWords = sqlKeywords.map(s => ({ })); const propTypes = { - actions: React.PropTypes.object.isRequired, - onBlur: React.PropTypes.func, - onAltEnter: React.PropTypes.func, - sql: React.PropTypes.string.isRequired, - tables: React.PropTypes.array, - queryEditor: React.PropTypes.object.isRequired, + actions: PropTypes.object.isRequired, + onBlur: PropTypes.func, + onAltEnter: PropTypes.func, + sql: PropTypes.string.isRequired, + tables: PropTypes.array, + queryEditor: PropTypes.object.isRequired, }; const defaultProps = { diff --git a/superset/assets/javascripts/SqlLab/components/App.jsx b/superset/assets/javascripts/SqlLab/components/App.jsx index f3a6e26d39..2a6eb41864 100644 --- a/superset/assets/javascripts/SqlLab/components/App.jsx +++ b/superset/assets/javascripts/SqlLab/components/App.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; @@ -79,8 +80,8 @@ class App extends React.PureComponent { } App.propTypes = { - alerts: React.PropTypes.array, - actions: React.PropTypes.object, + alerts: PropTypes.array, + actions: PropTypes.object, }; function mapStateToProps(state) { diff --git a/superset/assets/javascripts/SqlLab/components/ColumnElement.jsx b/superset/assets/javascripts/SqlLab/components/ColumnElement.jsx index 874ad44ff7..cfd2d80fe2 100644 --- a/superset/assets/javascripts/SqlLab/components/ColumnElement.jsx +++ b/superset/assets/javascripts/SqlLab/components/ColumnElement.jsx @@ -1,9 +1,10 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { OverlayTrigger, Tooltip } from 'react-bootstrap'; const propTypes = { - column: React.PropTypes.object.isRequired, + column: PropTypes.object.isRequired, }; const iconMap = { diff --git a/superset/assets/javascripts/SqlLab/components/CopyQueryTabUrl.jsx b/superset/assets/javascripts/SqlLab/components/CopyQueryTabUrl.jsx index 9c618a13d5..5491eed545 100644 --- a/superset/assets/javascripts/SqlLab/components/CopyQueryTabUrl.jsx +++ b/superset/assets/javascripts/SqlLab/components/CopyQueryTabUrl.jsx @@ -1,9 +1,10 @@ import React from 'react'; +import PropTypes from 'prop-types'; import CopyToClipboard from '../../components/CopyToClipboard'; import { storeQuery } from '../../../utils/common'; const propTypes = { - queryEditor: React.PropTypes.object.isRequired, + queryEditor: PropTypes.object.isRequired, }; export default class CopyQueryTabUrl extends React.PureComponent { diff --git a/superset/assets/javascripts/SqlLab/components/DataPreviewModal.jsx b/superset/assets/javascripts/SqlLab/components/DataPreviewModal.jsx index 843ed4bd63..9505b2ef3f 100644 --- a/superset/assets/javascripts/SqlLab/components/DataPreviewModal.jsx +++ b/superset/assets/javascripts/SqlLab/components/DataPreviewModal.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Modal } from 'react-bootstrap'; @@ -7,10 +8,10 @@ import * as Actions from '../actions'; import ResultSet from './ResultSet'; const propTypes = { - queries: React.PropTypes.object, - actions: React.PropTypes.object, - showDataPreviewModal: React.PropTypes.bool, - dataPreviewQueryId: React.PropTypes.string, + queries: PropTypes.object, + actions: PropTypes.object, + showDataPreviewModal: PropTypes.bool, + dataPreviewQueryId: PropTypes.string, }; class DataPreviewModal extends React.PureComponent { diff --git a/superset/assets/javascripts/SqlLab/components/HighlightedSql.jsx b/superset/assets/javascripts/SqlLab/components/HighlightedSql.jsx index 7636cdae45..dc5a5a90f3 100644 --- a/superset/assets/javascripts/SqlLab/components/HighlightedSql.jsx +++ b/superset/assets/javascripts/SqlLab/components/HighlightedSql.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import SyntaxHighlighter from 'react-syntax-highlighter'; import { github } from 'react-syntax-highlighter/dist/styles'; import ModalTrigger from '../../components/ModalTrigger'; @@ -10,11 +11,11 @@ const defaultProps = { }; const propTypes = { - sql: React.PropTypes.string.isRequired, - rawSql: React.PropTypes.string, - maxWidth: React.PropTypes.number, - maxLines: React.PropTypes.number, - shrink: React.PropTypes.bool, + sql: PropTypes.string.isRequired, + rawSql: PropTypes.string, + maxWidth: PropTypes.number, + maxLines: PropTypes.number, + shrink: PropTypes.bool, }; class HighlightedSql extends React.Component { diff --git a/superset/assets/javascripts/SqlLab/components/Link.jsx b/superset/assets/javascripts/SqlLab/components/Link.jsx index af53f97aa2..54b8bb7418 100644 --- a/superset/assets/javascripts/SqlLab/components/Link.jsx +++ b/superset/assets/javascripts/SqlLab/components/Link.jsx @@ -1,14 +1,15 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { OverlayTrigger, Tooltip } from 'react-bootstrap'; const propTypes = { - children: React.PropTypes.node, - className: React.PropTypes.string, - href: React.PropTypes.string, - onClick: React.PropTypes.func, - placement: React.PropTypes.string, - style: React.PropTypes.object, - tooltip: React.PropTypes.string, + children: PropTypes.node, + className: PropTypes.string, + href: PropTypes.string, + onClick: PropTypes.func, + placement: PropTypes.string, + style: PropTypes.object, + tooltip: PropTypes.string, }; const defaultProps = { className: '', diff --git a/superset/assets/javascripts/SqlLab/components/QueryAutoRefresh.jsx b/superset/assets/javascripts/SqlLab/components/QueryAutoRefresh.jsx index e96fcba6ef..0f53c09e9c 100644 --- a/superset/assets/javascripts/SqlLab/components/QueryAutoRefresh.jsx +++ b/superset/assets/javascripts/SqlLab/components/QueryAutoRefresh.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import * as Actions from '../actions'; @@ -48,9 +49,9 @@ class QueryAutoRefresh extends React.PureComponent { } } QueryAutoRefresh.propTypes = { - queries: React.PropTypes.object.isRequired, - actions: React.PropTypes.object.isRequired, - queriesLastUpdate: React.PropTypes.number.isRequired, + queries: PropTypes.object.isRequired, + actions: PropTypes.object.isRequired, + queriesLastUpdate: PropTypes.number.isRequired, }; function mapStateToProps(state) { diff --git a/superset/assets/javascripts/SqlLab/components/QueryHistory.jsx b/superset/assets/javascripts/SqlLab/components/QueryHistory.jsx index 5356206ae3..0de35d2c14 100644 --- a/superset/assets/javascripts/SqlLab/components/QueryHistory.jsx +++ b/superset/assets/javascripts/SqlLab/components/QueryHistory.jsx @@ -1,11 +1,12 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Alert } from 'react-bootstrap'; import QueryTable from './QueryTable'; const propTypes = { - queries: React.PropTypes.array.isRequired, - actions: React.PropTypes.object.isRequired, + queries: PropTypes.array.isRequired, + actions: PropTypes.object.isRequired, }; const QueryHistory = (props) => { diff --git a/superset/assets/javascripts/SqlLab/components/QuerySearch.jsx b/superset/assets/javascripts/SqlLab/components/QuerySearch.jsx index 83cc6bf309..44daa3920b 100644 --- a/superset/assets/javascripts/SqlLab/components/QuerySearch.jsx +++ b/superset/assets/javascripts/SqlLab/components/QuerySearch.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Button } from 'react-bootstrap'; import Select from 'react-select'; import QueryTable from './QueryTable'; @@ -10,8 +11,8 @@ import AsyncSelect from '../../components/AsyncSelect'; const $ = window.$ = require('jquery'); const propTypes = { - actions: React.PropTypes.object.isRequired, - height: React.PropTypes.number.isRequired, + actions: PropTypes.object.isRequired, + height: PropTypes.number.isRequired, }; class QuerySearch extends React.PureComponent { diff --git a/superset/assets/javascripts/SqlLab/components/QueryTable.jsx b/superset/assets/javascripts/SqlLab/components/QueryTable.jsx index ffacccd78b..f051169048 100644 --- a/superset/assets/javascripts/SqlLab/components/QueryTable.jsx +++ b/superset/assets/javascripts/SqlLab/components/QueryTable.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import moment from 'moment'; import { Table } from 'reactable'; @@ -13,11 +14,11 @@ import { fDuration } from '../../modules/dates'; import { storeQuery } from '../../../utils/common'; const propTypes = { - columns: React.PropTypes.array, - actions: React.PropTypes.object, - queries: React.PropTypes.array, - onUserClicked: React.PropTypes.func, - onDbClicked: React.PropTypes.func, + columns: PropTypes.array, + actions: PropTypes.object, + queries: PropTypes.array, + onUserClicked: PropTypes.func, + onDbClicked: PropTypes.func, }; const defaultProps = { columns: ['started', 'duration', 'rows'], diff --git a/superset/assets/javascripts/SqlLab/components/ResultSet.jsx b/superset/assets/javascripts/SqlLab/components/ResultSet.jsx index 52b5aa306b..f6661823fc 100644 --- a/superset/assets/javascripts/SqlLab/components/ResultSet.jsx +++ b/superset/assets/javascripts/SqlLab/components/ResultSet.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Alert, Button, ButtonGroup, ProgressBar } from 'react-bootstrap'; import shortid from 'shortid'; @@ -7,14 +8,14 @@ import HighlightedSql from './HighlightedSql'; import FilterableTable from '../../components/FilterableTable/FilterableTable'; const propTypes = { - actions: React.PropTypes.object, - csv: React.PropTypes.bool, - query: React.PropTypes.object, - search: React.PropTypes.bool, - showSql: React.PropTypes.bool, - visualize: React.PropTypes.bool, - cache: React.PropTypes.bool, - height: React.PropTypes.number.isRequired, + actions: PropTypes.object, + csv: PropTypes.bool, + query: PropTypes.object, + search: PropTypes.bool, + showSql: PropTypes.bool, + visualize: PropTypes.bool, + cache: PropTypes.bool, + height: PropTypes.number.isRequired, }; const defaultProps = { search: true, diff --git a/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx b/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx index 579fc487ff..36b4702224 100644 --- a/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx +++ b/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import Button from '../../components/Button'; const propTypes = { diff --git a/superset/assets/javascripts/SqlLab/components/SaveQuery.jsx b/superset/assets/javascripts/SqlLab/components/SaveQuery.jsx index aeea060ce2..9e67cf5941 100644 --- a/superset/assets/javascripts/SqlLab/components/SaveQuery.jsx +++ b/superset/assets/javascripts/SqlLab/components/SaveQuery.jsx @@ -1,15 +1,16 @@ /* global notify */ import React from 'react'; +import PropTypes from 'prop-types'; import { FormControl, FormGroup, Overlay, Popover, Row, Col } from 'react-bootstrap'; import Button from '../../components/Button'; const propTypes = { - defaultLabel: React.PropTypes.string, - sql: React.PropTypes.string, - schema: React.PropTypes.string, - dbId: React.PropTypes.number, - animation: React.PropTypes.bool, - onSave: React.PropTypes.func, + defaultLabel: PropTypes.string, + sql: PropTypes.string, + schema: PropTypes.string, + dbId: PropTypes.number, + animation: PropTypes.bool, + onSave: PropTypes.func, }; const defaultProps = { defaultLabel: 'Undefined', diff --git a/superset/assets/javascripts/SqlLab/components/SouthPane.jsx b/superset/assets/javascripts/SqlLab/components/SouthPane.jsx index d08683e790..6773ac7827 100644 --- a/superset/assets/javascripts/SqlLab/components/SouthPane.jsx +++ b/superset/assets/javascripts/SqlLab/components/SouthPane.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import shortid from 'shortid'; import { Alert, Tab, Tabs } from 'react-bootstrap'; import { connect } from 'react-redux'; @@ -13,10 +14,10 @@ import ResultSet from './ResultSet'; dataPrebiewQueries are all queries executed for preview of table data (from SqlEditorLeft) */ const propTypes = { - editorQueries: React.PropTypes.array.isRequired, - dataPreviewQueries: React.PropTypes.array.isRequired, - actions: React.PropTypes.object.isRequired, - activeSouthPaneTab: React.PropTypes.string, + editorQueries: PropTypes.array.isRequired, + dataPreviewQueries: PropTypes.array.isRequired, + actions: PropTypes.object.isRequired, + activeSouthPaneTab: PropTypes.string, }; const defaultProps = { diff --git a/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx b/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx index 4c32afabb0..3da8050f2b 100644 --- a/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx +++ b/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Col, FormGroup, @@ -23,15 +24,15 @@ import { STATE_BSSTYLE_MAP } from '../constants'; import RunQueryActionButton from './RunQueryActionButton'; const propTypes = { - actions: React.PropTypes.object.isRequired, - height: React.PropTypes.string.isRequired, - database: React.PropTypes.object, - latestQuery: React.PropTypes.object, - tables: React.PropTypes.array.isRequired, - editorQueries: React.PropTypes.array.isRequired, - dataPreviewQueries: React.PropTypes.array.isRequired, - queryEditor: React.PropTypes.object.isRequired, - hideLeftBar: React.PropTypes.bool, + actions: PropTypes.object.isRequired, + height: PropTypes.string.isRequired, + database: PropTypes.object, + latestQuery: PropTypes.object, + tables: PropTypes.array.isRequired, + editorQueries: PropTypes.array.isRequired, + dataPreviewQueries: PropTypes.array.isRequired, + queryEditor: PropTypes.object.isRequired, + hideLeftBar: PropTypes.bool, }; const defaultProps = { diff --git a/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx b/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx index e7f7d89b69..4f258588cc 100644 --- a/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx +++ b/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Button } from 'react-bootstrap'; import Select from 'react-virtualized-select'; import createFilterOptions from 'react-select-fast-filter-options'; @@ -9,10 +10,10 @@ import AsyncSelect from '../../components/AsyncSelect'; const $ = window.$ = require('jquery'); const propTypes = { - queryEditor: React.PropTypes.object.isRequired, - height: React.PropTypes.number.isRequired, - tables: React.PropTypes.array, - actions: React.PropTypes.object, + queryEditor: PropTypes.object.isRequired, + height: PropTypes.number.isRequired, + tables: PropTypes.array, + actions: PropTypes.object, }; const defaultProps = { diff --git a/superset/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx b/superset/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx index e407b9d412..73ba6bcd29 100644 --- a/superset/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx +++ b/superset/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { DropdownButton, MenuItem, Tab, Tabs } from 'react-bootstrap'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; @@ -10,14 +11,14 @@ import CopyQueryTabUrl from './CopyQueryTabUrl'; import { areArraysShallowEqual } from '../../reduxUtils'; const propTypes = { - actions: React.PropTypes.object.isRequired, - defaultDbId: React.PropTypes.number, - databases: React.PropTypes.object.isRequired, - queries: React.PropTypes.object.isRequired, - queryEditors: React.PropTypes.array, - tabHistory: React.PropTypes.array.isRequired, - tables: React.PropTypes.array.isRequired, - editorHeight: React.PropTypes.string.isRequired, + actions: PropTypes.object.isRequired, + defaultDbId: PropTypes.number, + databases: PropTypes.object.isRequired, + queries: PropTypes.object.isRequired, + queryEditors: PropTypes.array, + tabHistory: PropTypes.array.isRequired, + tables: PropTypes.array.isRequired, + editorHeight: PropTypes.string.isRequired, }; const defaultProps = { queryEditors: [], diff --git a/superset/assets/javascripts/SqlLab/components/TableElement.jsx b/superset/assets/javascripts/SqlLab/components/TableElement.jsx index fe72af396d..dbcb0291a6 100644 --- a/superset/assets/javascripts/SqlLab/components/TableElement.jsx +++ b/superset/assets/javascripts/SqlLab/components/TableElement.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { ButtonGroup, Collapse, Well } from 'react-bootstrap'; import shortid from 'shortid'; @@ -9,9 +10,9 @@ import ColumnElement from './ColumnElement'; import ModalTrigger from '../../components/ModalTrigger'; const propTypes = { - table: React.PropTypes.object, - actions: React.PropTypes.object, - timeout: React.PropTypes.number, // used for tests + table: PropTypes.object, + actions: PropTypes.object, + timeout: PropTypes.number, // used for tests }; const defaultProps = { diff --git a/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx b/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx index eed3e1beb8..64d3f94f1e 100644 --- a/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx +++ b/superset/assets/javascripts/SqlLab/components/VisualizeModal.jsx @@ -1,5 +1,6 @@ /* global notify */ import React from 'react'; +import PropTypes from 'prop-types'; import { Alert, Button, Col, Modal } from 'react-bootstrap'; import Select from 'react-select'; @@ -16,9 +17,9 @@ const CHART_TYPES = [ ]; const propTypes = { - onHide: React.PropTypes.func, - query: React.PropTypes.object, - show: React.PropTypes.bool, + onHide: PropTypes.func, + query: PropTypes.object, + show: PropTypes.bool, }; const defaultProps = { show: false, diff --git a/superset/assets/javascripts/components/AsyncSelect.jsx b/superset/assets/javascripts/components/AsyncSelect.jsx index 3b7e6f0632..3269a98ae5 100644 --- a/superset/assets/javascripts/components/AsyncSelect.jsx +++ b/superset/assets/javascripts/components/AsyncSelect.jsx @@ -1,15 +1,16 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; const $ = window.$ = require('jquery'); const propTypes = { - dataEndpoint: React.PropTypes.string.isRequired, - onChange: React.PropTypes.func.isRequired, - mutator: React.PropTypes.func.isRequired, - value: React.PropTypes.number, - valueRenderer: React.PropTypes.func, - placeholder: React.PropTypes.string, + dataEndpoint: PropTypes.string.isRequired, + onChange: PropTypes.func.isRequired, + mutator: PropTypes.func.isRequired, + value: PropTypes.number, + valueRenderer: PropTypes.func, + placeholder: PropTypes.string, }; const defaultProps = { diff --git a/superset/assets/javascripts/components/Button.jsx b/superset/assets/javascripts/components/Button.jsx index d431c65f64..120113de7e 100644 --- a/superset/assets/javascripts/components/Button.jsx +++ b/superset/assets/javascripts/components/Button.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Button as BootstrapButton, Tooltip, OverlayTrigger } from 'react-bootstrap'; import { slugify } from '../modules/utils'; diff --git a/superset/assets/javascripts/components/CachedLabel.jsx b/superset/assets/javascripts/components/CachedLabel.jsx index 4c1995b8a1..e78e4f7996 100644 --- a/superset/assets/javascripts/components/CachedLabel.jsx +++ b/superset/assets/javascripts/components/CachedLabel.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Label } from 'react-bootstrap'; import moment from 'moment'; import TooltipWrapper from './TooltipWrapper'; diff --git a/superset/assets/javascripts/components/CopyToClipboard.jsx b/superset/assets/javascripts/components/CopyToClipboard.jsx index 07330e5f70..c9120b2b3e 100644 --- a/superset/assets/javascripts/components/CopyToClipboard.jsx +++ b/superset/assets/javascripts/components/CopyToClipboard.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Tooltip, OverlayTrigger, MenuItem } from 'react-bootstrap'; const propTypes = { diff --git a/superset/assets/javascripts/components/FaveStar.jsx b/superset/assets/javascripts/components/FaveStar.jsx index ce19fcb945..8282066954 100644 --- a/superset/assets/javascripts/components/FaveStar.jsx +++ b/superset/assets/javascripts/components/FaveStar.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import cx from 'classnames'; import TooltipWrapper from './TooltipWrapper'; diff --git a/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx b/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx index 23b6906e57..f72014ab97 100644 --- a/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx +++ b/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx @@ -1,5 +1,6 @@ import { List } from 'immutable'; -import React, { PropTypes, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import React, { PureComponent } from 'react'; import { Column, Table, diff --git a/superset/assets/javascripts/components/InfoTooltipWithTrigger.jsx b/superset/assets/javascripts/components/InfoTooltipWithTrigger.jsx index 39b5ff8f8b..d0763fd19c 100644 --- a/superset/assets/javascripts/components/InfoTooltipWithTrigger.jsx +++ b/superset/assets/javascripts/components/InfoTooltipWithTrigger.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Tooltip, OverlayTrigger } from 'react-bootstrap'; import { slugify } from '../modules/utils'; diff --git a/superset/assets/javascripts/components/ModalTrigger.jsx b/superset/assets/javascripts/components/ModalTrigger.jsx index aee93ba826..628f0067bd 100644 --- a/superset/assets/javascripts/components/ModalTrigger.jsx +++ b/superset/assets/javascripts/components/ModalTrigger.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Modal } from 'react-bootstrap'; import cx from 'classnames'; import Button from './Button'; diff --git a/superset/assets/javascripts/components/Timer.jsx b/superset/assets/javascripts/components/Timer.jsx index 98b5883a63..f108e4ce1b 100644 --- a/superset/assets/javascripts/components/Timer.jsx +++ b/superset/assets/javascripts/components/Timer.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { now, fDuration } from '../modules/dates'; class Timer extends React.PureComponent { @@ -54,11 +55,11 @@ class Timer extends React.PureComponent { } } Timer.propTypes = { - startTime: React.PropTypes.number, - endTime: React.PropTypes.number, - isRunning: React.PropTypes.bool.isRequired, - status: React.PropTypes.string, - style: React.PropTypes.object, + startTime: PropTypes.number, + endTime: PropTypes.number, + isRunning: PropTypes.bool.isRequired, + status: PropTypes.string, + style: PropTypes.object, }; Timer.defaultProps = { diff --git a/superset/assets/javascripts/components/TooltipWrapper.jsx b/superset/assets/javascripts/components/TooltipWrapper.jsx index fb476c410c..b189041603 100644 --- a/superset/assets/javascripts/components/TooltipWrapper.jsx +++ b/superset/assets/javascripts/components/TooltipWrapper.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Tooltip, OverlayTrigger } from 'react-bootstrap'; import { slugify } from '../modules/utils'; diff --git a/superset/assets/javascripts/dashboard/components/CodeModal.jsx b/superset/assets/javascripts/dashboard/components/CodeModal.jsx index 322fb00ff2..77f2dafea0 100644 --- a/superset/assets/javascripts/dashboard/components/CodeModal.jsx +++ b/superset/assets/javascripts/dashboard/components/CodeModal.jsx @@ -1,11 +1,12 @@ import React from 'react'; +import PropTypes from 'prop-types'; import ModalTrigger from '../../components/ModalTrigger'; const propTypes = { - triggerNode: React.PropTypes.node.isRequired, - code: React.PropTypes.string, - codeCallback: React.PropTypes.func, + triggerNode: PropTypes.node.isRequired, + code: PropTypes.string, + codeCallback: PropTypes.func, }; const defaultProps = { diff --git a/superset/assets/javascripts/dashboard/components/Controls.jsx b/superset/assets/javascripts/dashboard/components/Controls.jsx index 09b8937e24..1169642ff6 100644 --- a/superset/assets/javascripts/dashboard/components/Controls.jsx +++ b/superset/assets/javascripts/dashboard/components/Controls.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { ButtonGroup } from 'react-bootstrap'; import Button from '../../components/Button'; @@ -11,7 +12,7 @@ import SliceAdder from './SliceAdder'; const $ = window.$ = require('jquery'); const propTypes = { - dashboard: React.PropTypes.object.isRequired, + dashboard: PropTypes.object.isRequired, }; class Controls extends React.PureComponent { diff --git a/superset/assets/javascripts/dashboard/components/CssEditor.jsx b/superset/assets/javascripts/dashboard/components/CssEditor.jsx index 4aab39efce..b77ab9d0ff 100644 --- a/superset/assets/javascripts/dashboard/components/CssEditor.jsx +++ b/superset/assets/javascripts/dashboard/components/CssEditor.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; import AceEditor from 'react-ace'; @@ -8,10 +9,10 @@ import 'brace/theme/github'; import ModalTrigger from '../../components/ModalTrigger'; const propTypes = { - initialCss: React.PropTypes.string, - triggerNode: React.PropTypes.node.isRequired, - onChange: React.PropTypes.func, - templates: React.PropTypes.array, + initialCss: PropTypes.string, + triggerNode: PropTypes.node.isRequired, + onChange: PropTypes.func, + templates: PropTypes.array, }; const defaultProps = { diff --git a/superset/assets/javascripts/dashboard/components/GridLayout.jsx b/superset/assets/javascripts/dashboard/components/GridLayout.jsx index ab5414eb49..382d967a95 100644 --- a/superset/assets/javascripts/dashboard/components/GridLayout.jsx +++ b/superset/assets/javascripts/dashboard/components/GridLayout.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Responsive, WidthProvider } from 'react-grid-layout'; import $ from 'jquery'; diff --git a/superset/assets/javascripts/dashboard/components/Header.jsx b/superset/assets/javascripts/dashboard/components/Header.jsx index f7730fce4f..44259b928a 100644 --- a/superset/assets/javascripts/dashboard/components/Header.jsx +++ b/superset/assets/javascripts/dashboard/components/Header.jsx @@ -1,9 +1,10 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Controls from './Controls'; const propTypes = { - dashboard: React.PropTypes.object, + dashboard: PropTypes.object, }; const defaultProps = { }; diff --git a/superset/assets/javascripts/dashboard/components/RefreshIntervalModal.jsx b/superset/assets/javascripts/dashboard/components/RefreshIntervalModal.jsx index 3da95e5ded..d392c98df5 100644 --- a/superset/assets/javascripts/dashboard/components/RefreshIntervalModal.jsx +++ b/superset/assets/javascripts/dashboard/components/RefreshIntervalModal.jsx @@ -1,11 +1,12 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; import ModalTrigger from '../../components/ModalTrigger'; const propTypes = { - triggerNode: React.PropTypes.node.isRequired, - initialRefreshFrequency: React.PropTypes.number, - onChange: React.PropTypes.func, + triggerNode: PropTypes.node.isRequired, + initialRefreshFrequency: PropTypes.number, + onChange: PropTypes.func, }; const defaultProps = { diff --git a/superset/assets/javascripts/dashboard/components/SaveModal.jsx b/superset/assets/javascripts/dashboard/components/SaveModal.jsx index 88c8ad2089..a414308a08 100644 --- a/superset/assets/javascripts/dashboard/components/SaveModal.jsx +++ b/superset/assets/javascripts/dashboard/components/SaveModal.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Button, FormControl, FormGroup, Radio } from 'react-bootstrap'; import { getAjaxErrorMsg, showModal } from '../../modules/utils'; import ModalTrigger from '../../components/ModalTrigger'; @@ -6,9 +7,9 @@ import ModalTrigger from '../../components/ModalTrigger'; const $ = window.$ = require('jquery'); const propTypes = { - css: React.PropTypes.string, - dashboard: React.PropTypes.object.isRequired, - triggerNode: React.PropTypes.node.isRequired, + css: PropTypes.string, + dashboard: PropTypes.object.isRequired, + triggerNode: PropTypes.node.isRequired, }; class SaveModal extends React.PureComponent { diff --git a/superset/assets/javascripts/dashboard/components/SliceAdder.jsx b/superset/assets/javascripts/dashboard/components/SliceAdder.jsx index 34f20a1bca..a96effef4b 100644 --- a/superset/assets/javascripts/dashboard/components/SliceAdder.jsx +++ b/superset/assets/javascripts/dashboard/components/SliceAdder.jsx @@ -1,5 +1,6 @@ +import React from 'react'; import $ from 'jquery'; -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; import ModalTrigger from '../../components/ModalTrigger'; diff --git a/superset/assets/javascripts/dashboard/components/SliceCell.jsx b/superset/assets/javascripts/dashboard/components/SliceCell.jsx index 5d8cb04d24..a57fbded63 100644 --- a/superset/assets/javascripts/dashboard/components/SliceCell.jsx +++ b/superset/assets/javascripts/dashboard/components/SliceCell.jsx @@ -1,5 +1,6 @@ /* eslint-disable react/no-danger */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; const propTypes = { slice: PropTypes.object.isRequired, diff --git a/superset/assets/javascripts/explorev2/components/ChartContainer.jsx b/superset/assets/javascripts/explorev2/components/ChartContainer.jsx index cc0524251b..0d6b3cfa2f 100644 --- a/superset/assets/javascripts/explorev2/components/ChartContainer.jsx +++ b/superset/assets/javascripts/explorev2/components/ChartContainer.jsx @@ -1,6 +1,7 @@ import $ from 'jquery'; +import React from 'react'; +import PropTypes from 'prop-types'; import Mustache from 'mustache'; -import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { Alert, Collapse, Panel } from 'react-bootstrap'; import visMap from '../../../visualizations/main'; diff --git a/superset/assets/javascripts/explorev2/components/Control.jsx b/superset/assets/javascripts/explorev2/components/Control.jsx index 6e911f108c..992ef889fe 100644 --- a/superset/assets/javascripts/explorev2/components/Control.jsx +++ b/superset/assets/javascripts/explorev2/components/Control.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import ControlHeader from './ControlHeader'; import CheckboxControl from './controls/CheckboxControl'; diff --git a/superset/assets/javascripts/explorev2/components/ControlHeader.jsx b/superset/assets/javascripts/explorev2/components/ControlHeader.jsx index 66940da828..b1392f6b1e 100644 --- a/superset/assets/javascripts/explorev2/components/ControlHeader.jsx +++ b/superset/assets/javascripts/explorev2/components/ControlHeader.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { ControlLabel, OverlayTrigger, Tooltip } from 'react-bootstrap'; import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger'; diff --git a/superset/assets/javascripts/explorev2/components/ControlPanelSection.jsx b/superset/assets/javascripts/explorev2/components/ControlPanelSection.jsx index 25607d36e0..c6d12cbb6d 100644 --- a/superset/assets/javascripts/explorev2/components/ControlPanelSection.jsx +++ b/superset/assets/javascripts/explorev2/components/ControlPanelSection.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Panel } from 'react-bootstrap'; import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger'; diff --git a/superset/assets/javascripts/explorev2/components/ControlPanelsContainer.jsx b/superset/assets/javascripts/explorev2/components/ControlPanelsContainer.jsx index 1d07e19d9a..06b80e714e 100644 --- a/superset/assets/javascripts/explorev2/components/ControlPanelsContainer.jsx +++ b/superset/assets/javascripts/explorev2/components/ControlPanelsContainer.jsx @@ -1,5 +1,6 @@ /* eslint camelcase: 0 */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Panel, Alert } from 'react-bootstrap'; diff --git a/superset/assets/javascripts/explorev2/components/ControlRow.jsx b/superset/assets/javascripts/explorev2/components/ControlRow.jsx index 2838d5ea53..700ea4f47d 100644 --- a/superset/assets/javascripts/explorev2/components/ControlRow.jsx +++ b/superset/assets/javascripts/explorev2/components/ControlRow.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; const NUM_COLUMNS = 12; diff --git a/superset/assets/javascripts/explorev2/components/DisplayQueryButton.jsx b/superset/assets/javascripts/explorev2/components/DisplayQueryButton.jsx index 3ac6a2eb36..9194ed159f 100644 --- a/superset/assets/javascripts/explorev2/components/DisplayQueryButton.jsx +++ b/superset/assets/javascripts/explorev2/components/DisplayQueryButton.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import SyntaxHighlighter from 'react-syntax-highlighter'; import { github } from 'react-syntax-highlighter/dist/styles'; diff --git a/superset/assets/javascripts/explorev2/components/EmbedCodeButton.jsx b/superset/assets/javascripts/explorev2/components/EmbedCodeButton.jsx index 4225043338..4de5d94831 100644 --- a/superset/assets/javascripts/explorev2/components/EmbedCodeButton.jsx +++ b/superset/assets/javascripts/explorev2/components/EmbedCodeButton.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Popover, OverlayTrigger } from 'react-bootstrap'; import CopyToClipboard from './../../components/CopyToClipboard'; diff --git a/superset/assets/javascripts/explorev2/components/ExploreActionButtons.jsx b/superset/assets/javascripts/explorev2/components/ExploreActionButtons.jsx index 9235530036..f46c568853 100644 --- a/superset/assets/javascripts/explorev2/components/ExploreActionButtons.jsx +++ b/superset/assets/javascripts/explorev2/components/ExploreActionButtons.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import cx from 'classnames'; import URLShortLinkButton from './URLShortLinkButton'; import EmbedCodeButton from './EmbedCodeButton'; diff --git a/superset/assets/javascripts/explorev2/components/ExploreViewContainer.jsx b/superset/assets/javascripts/explorev2/components/ExploreViewContainer.jsx index 15e991583b..67141241a3 100644 --- a/superset/assets/javascripts/explorev2/components/ExploreViewContainer.jsx +++ b/superset/assets/javascripts/explorev2/components/ExploreViewContainer.jsx @@ -1,5 +1,6 @@ /* eslint camelcase: 0 */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import ChartContainer from './ChartContainer'; diff --git a/superset/assets/javascripts/explorev2/components/QueryAndSaveBtns.jsx b/superset/assets/javascripts/explorev2/components/QueryAndSaveBtns.jsx index 002b3ad348..b9ce21f80b 100644 --- a/superset/assets/javascripts/explorev2/components/QueryAndSaveBtns.jsx +++ b/superset/assets/javascripts/explorev2/components/QueryAndSaveBtns.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { ButtonGroup, OverlayTrigger, Tooltip } from 'react-bootstrap'; import classnames from 'classnames'; diff --git a/superset/assets/javascripts/explorev2/components/SaveModal.jsx b/superset/assets/javascripts/explorev2/components/SaveModal.jsx index a98ceaadae..35ad0c98ad 100644 --- a/superset/assets/javascripts/explorev2/components/SaveModal.jsx +++ b/superset/assets/javascripts/explorev2/components/SaveModal.jsx @@ -1,5 +1,6 @@ /* eslint camelcase: 0 */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import $ from 'jquery'; import { Modal, Alert, Button, Radio } from 'react-bootstrap'; import Select from 'react-select'; diff --git a/superset/assets/javascripts/explorev2/components/URLShortLinkButton.jsx b/superset/assets/javascripts/explorev2/components/URLShortLinkButton.jsx index 1fa572e5e3..4dbf0f1103 100644 --- a/superset/assets/javascripts/explorev2/components/URLShortLinkButton.jsx +++ b/superset/assets/javascripts/explorev2/components/URLShortLinkButton.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Popover, OverlayTrigger } from 'react-bootstrap'; import CopyToClipboard from './../../components/CopyToClipboard'; import { getShortUrl } from '../../../utils/common'; diff --git a/superset/assets/javascripts/explorev2/components/controls/CheckboxControl.jsx b/superset/assets/javascripts/explorev2/components/controls/CheckboxControl.jsx index c1cffe6ae1..a32926d56d 100644 --- a/superset/assets/javascripts/explorev2/components/controls/CheckboxControl.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/CheckboxControl.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Checkbox } from 'react-bootstrap'; const propTypes = { diff --git a/superset/assets/javascripts/explorev2/components/controls/Filter.jsx b/superset/assets/javascripts/explorev2/components/controls/Filter.jsx index cf29a2b084..afa63423d1 100644 --- a/superset/assets/javascripts/explorev2/components/controls/Filter.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/Filter.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import Select from 'react-select'; import { Button, Row, Col } from 'react-bootstrap'; import SelectControl from './SelectControl'; diff --git a/superset/assets/javascripts/explorev2/components/controls/FilterControl.jsx b/superset/assets/javascripts/explorev2/components/controls/FilterControl.jsx index 9c6c6e773b..74065ecc67 100644 --- a/superset/assets/javascripts/explorev2/components/controls/FilterControl.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/FilterControl.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { Button, Row, Col } from 'react-bootstrap'; import Filter from './Filter'; diff --git a/superset/assets/javascripts/explorev2/components/controls/HiddenControl.jsx b/superset/assets/javascripts/explorev2/components/controls/HiddenControl.jsx index 087694436d..3b1f445476 100644 --- a/superset/assets/javascripts/explorev2/components/controls/HiddenControl.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/HiddenControl.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { FormControl } from 'react-bootstrap'; const propTypes = { diff --git a/superset/assets/javascripts/explorev2/components/controls/SelectControl.jsx b/superset/assets/javascripts/explorev2/components/controls/SelectControl.jsx index 8f14e1e62b..19f0727e6d 100644 --- a/superset/assets/javascripts/explorev2/components/controls/SelectControl.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/SelectControl.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import Select, { Creatable } from 'react-select'; const propTypes = { diff --git a/superset/assets/javascripts/explorev2/components/controls/TextAreaControl.jsx b/superset/assets/javascripts/explorev2/components/controls/TextAreaControl.jsx index b6148aa170..7765040d45 100644 --- a/superset/assets/javascripts/explorev2/components/controls/TextAreaControl.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/TextAreaControl.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { FormGroup, FormControl } from 'react-bootstrap'; const propTypes = { diff --git a/superset/assets/javascripts/explorev2/components/controls/TextControl.jsx b/superset/assets/javascripts/explorev2/components/controls/TextControl.jsx index f8f0531b3b..f596c1ae95 100644 --- a/superset/assets/javascripts/explorev2/components/controls/TextControl.jsx +++ b/superset/assets/javascripts/explorev2/components/controls/TextControl.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { FormGroup, FormControl } from 'react-bootstrap'; import * as v from '../../validators'; diff --git a/superset/assets/javascripts/profile/components/App.jsx b/superset/assets/javascripts/profile/components/App.jsx index c12d092698..596b0ada4b 100644 --- a/superset/assets/javascripts/profile/components/App.jsx +++ b/superset/assets/javascripts/profile/components/App.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Col, Row, Tabs, Tab, Panel } from 'react-bootstrap'; import Favorites from './Favorites'; import UserInfo from './UserInfo'; @@ -7,7 +8,7 @@ import RecentActivity from './RecentActivity'; import CreatedContent from './CreatedContent'; const propTypes = { - user: React.PropTypes.object.isRequired, + user: PropTypes.object.isRequired, }; export default function App(props) { diff --git a/superset/assets/javascripts/profile/components/CreatedContent.jsx b/superset/assets/javascripts/profile/components/CreatedContent.jsx index 81fc26c141..87921c6872 100644 --- a/superset/assets/javascripts/profile/components/CreatedContent.jsx +++ b/superset/assets/javascripts/profile/components/CreatedContent.jsx @@ -1,9 +1,10 @@ import React from 'react'; +import PropTypes from 'prop-types'; import moment from 'moment'; import TableLoader from './TableLoader'; const propTypes = { - user: React.PropTypes.object.isRequired, + user: PropTypes.object.isRequired, }; class CreatedContent extends React.PureComponent { diff --git a/superset/assets/javascripts/profile/components/Favorites.jsx b/superset/assets/javascripts/profile/components/Favorites.jsx index 6a7518224c..9039d91651 100644 --- a/superset/assets/javascripts/profile/components/Favorites.jsx +++ b/superset/assets/javascripts/profile/components/Favorites.jsx @@ -1,9 +1,10 @@ import React from 'react'; +import PropTypes from 'prop-types'; import moment from 'moment'; import TableLoader from './TableLoader'; const propTypes = { - user: React.PropTypes.object.isRequired, + user: PropTypes.object.isRequired, }; export default class Favorites extends React.PureComponent { diff --git a/superset/assets/javascripts/profile/components/RecentActivity.jsx b/superset/assets/javascripts/profile/components/RecentActivity.jsx index ceecf7cb12..ec143d63fa 100644 --- a/superset/assets/javascripts/profile/components/RecentActivity.jsx +++ b/superset/assets/javascripts/profile/components/RecentActivity.jsx @@ -1,11 +1,12 @@ import React from 'react'; +import PropTypes from 'prop-types'; import moment from 'moment'; import $ from 'jquery'; import TableLoader from './TableLoader'; const propTypes = { - user: React.PropTypes.object, + user: PropTypes.object, }; export default class RecentActivity extends React.PureComponent { diff --git a/superset/assets/javascripts/profile/components/Security.jsx b/superset/assets/javascripts/profile/components/Security.jsx index 2f68d18e00..0d942dd83f 100644 --- a/superset/assets/javascripts/profile/components/Security.jsx +++ b/superset/assets/javascripts/profile/components/Security.jsx @@ -1,8 +1,9 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Badge, Label } from 'react-bootstrap'; const propTypes = { - user: React.PropTypes.object.isRequired, + user: PropTypes.object.isRequired, }; export default function Security({ user }) { return ( diff --git a/superset/assets/javascripts/profile/components/TableLoader.jsx b/superset/assets/javascripts/profile/components/TableLoader.jsx index 76323d8bce..b14d6f6865 100644 --- a/superset/assets/javascripts/profile/components/TableLoader.jsx +++ b/superset/assets/javascripts/profile/components/TableLoader.jsx @@ -1,12 +1,13 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Table, Tr, Td } from 'reactable'; import { Collapse } from 'react-bootstrap'; import $ from 'jquery'; const propTypes = { - dataEndpoint: React.PropTypes.string.isRequired, - mutator: React.PropTypes.func, - columns: React.PropTypes.arrayOf(React.PropTypes.string), + dataEndpoint: PropTypes.string.isRequired, + mutator: PropTypes.func, + columns: PropTypes.arrayOf(PropTypes.string), }; export default class TableLoader extends React.PureComponent { diff --git a/superset/assets/javascripts/profile/components/UserInfo.jsx b/superset/assets/javascripts/profile/components/UserInfo.jsx index 81b9b9d463..4f751ed0d2 100644 --- a/superset/assets/javascripts/profile/components/UserInfo.jsx +++ b/superset/assets/javascripts/profile/components/UserInfo.jsx @@ -1,10 +1,11 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Gravatar from 'react-gravatar'; import moment from 'moment'; import { Panel } from 'react-bootstrap'; const propTypes = { - user: React.PropTypes.object.isRequired, + user: PropTypes.object.isRequired, }; const UserInfo = ({ user }) => (