summaryrefslogtreecommitdiffstats
path: root/src/generic-components
diff options
context:
space:
mode:
authorArul.Nambi <arul.nambi@amdocs.com>2018-09-05 14:44:15 -0400
committerArul.Nambi <arul.nambi@amdocs.com>2018-09-05 14:46:13 -0400
commit6b408bc2ea74ffbe3985c7f90211e59a2f00fad2 (patch)
treed0e3bab15d5c5587ef857051cce68bd389f6d20f /src/generic-components
parentb68cd9cee606372747f6fee4a864de994b0518a7 (diff)
Upgrade to react 16
Issue-ID: AAI-1576 Change-Id: I2a3035c7922ccabdca446e76341adf6ca8785155 Signed-off-by: Arul.Nambi <arul.nambi@amdocs.com>
Diffstat (limited to 'src/generic-components')
-rw-r--r--src/generic-components/InlineMessage/InlineMessage.jsx3
-rw-r--r--src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx9
-rw-r--r--src/generic-components/componentManager/ComponentManagerContainer.jsx1
-rw-r--r--src/generic-components/confirmations/ConfirmationModalView.jsx11
-rw-r--r--src/generic-components/dynamicViewLoader/dynamicViewLoader.jsx5
-rw-r--r--src/generic-components/graph/ForceDirectedGraph.jsx3
-rw-r--r--src/generic-components/graph/Link.jsx11
-rw-r--r--src/generic-components/graph/Node.jsx11
-rw-r--r--src/generic-components/graph/SVGShape.jsx9
-rw-r--r--src/generic-components/input/ToggleInput.jsx9
-rw-r--r--src/generic-components/input/inputOptions/InputOptions.jsx29
-rw-r--r--src/generic-components/map/TopographicMap.jsx1
-rw-r--r--src/generic-components/notifications/NotificationModal.jsx1
-rw-r--r--src/generic-components/paginatedTable/PaginatedTable.jsx19
-rw-r--r--src/generic-components/panel/SlidePanel.jsx9
-rw-r--r--src/generic-components/titledContainer/TitledContainer.jsx1
-rw-r--r--src/generic-components/toggleButtonGroup/ToggleButtonGroup.jsx1
17 files changed, 75 insertions, 58 deletions
diff --git a/src/generic-components/InlineMessage/InlineMessage.jsx b/src/generic-components/InlineMessage/InlineMessage.jsx
index 647b5dd..d634337 100644
--- a/src/generic-components/InlineMessage/InlineMessage.jsx
+++ b/src/generic-components/InlineMessage/InlineMessage.jsx
@@ -18,7 +18,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-import React, {Component, PropTypes} from 'react';
+import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import FontAwesome from 'react-fontawesome';
import InlineMessageConstatns from './InlineMessageConstants';
diff --git a/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx b/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
index 2f7b455..b7fca67 100644
--- a/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
+++ b/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import {Button} from 'react-bootstrap';
import AutoSuggest from 'react-autosuggest';
import Highlighter from 'react-highlight-words';
@@ -38,10 +39,10 @@ import {
export default class AutoCompleteSearchBar extends Component {
static propTypes = {
- value: React.PropTypes.string,
- suggestions: React.PropTypes.array,
- cachedSuggestions: React.PropTypes.array,
- suggestionName: React.PropTypes.string
+ value: PropTypes.string,
+ suggestions: PropTypes.array,
+ cachedSuggestions: PropTypes.array,
+ suggestionName: PropTypes.string
};
componentWillMount() {
diff --git a/src/generic-components/componentManager/ComponentManagerContainer.jsx b/src/generic-components/componentManager/ComponentManagerContainer.jsx
index 03cba83..02a3eba 100644
--- a/src/generic-components/componentManager/ComponentManagerContainer.jsx
+++ b/src/generic-components/componentManager/ComponentManagerContainer.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component, PropTypes} from 'react';
+import { PropTypes } from 'prop-types';
import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
import Button from 'react-bootstrap/lib/Button';
diff --git a/src/generic-components/confirmations/ConfirmationModalView.jsx b/src/generic-components/confirmations/ConfirmationModalView.jsx
index b97c2d4..39fea97 100644
--- a/src/generic-components/confirmations/ConfirmationModalView.jsx
+++ b/src/generic-components/confirmations/ConfirmationModalView.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React from 'react';
+import { PropTypes } from 'prop-types';
import Button from 'react-bootstrap/lib/Button.js';
import i18n from 'utils/i18n/i18n.js';
@@ -35,11 +36,11 @@ let typeClass = {
class ConfirmationModalView extends React.Component {
static propTypes = {
- show: React.PropTypes.bool,
- type: React.PropTypes.oneOf(['default', 'error', 'warning', 'success']),
- msg: React.PropTypes.node,
- title: React.PropTypes.string,
- confirmationDetails: React.PropTypes.object
+ show: PropTypes.bool,
+ type: PropTypes.oneOf(['default', 'error', 'warning', 'success']),
+ msg: PropTypes.node,
+ title: PropTypes.string,
+ confirmationDetails: PropTypes.object
};
static defaultProps = {
diff --git a/src/generic-components/dynamicViewLoader/dynamicViewLoader.jsx b/src/generic-components/dynamicViewLoader/dynamicViewLoader.jsx
index 332cdcf..7732951 100644
--- a/src/generic-components/dynamicViewLoader/dynamicViewLoader.jsx
+++ b/src/generic-components/dynamicViewLoader/dynamicViewLoader.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import {connect} from 'react-redux';
import DateRangeSelector from 'generic-components/dateRangeSelector/DateRangeSelector.jsx';
@@ -54,8 +55,8 @@ let mapActionToProps = (dispatch) => {
class DynamicViewLoader extends Component {
static propTypes = {
- viewTitle: React.PropTypes.string,
- layoutSource: React.PropTypes.object
+ viewTitle: PropTypes.string,
+ layoutSource: PropTypes.object
};
componentWillMount() {
diff --git a/src/generic-components/graph/ForceDirectedGraph.jsx b/src/generic-components/graph/ForceDirectedGraph.jsx
index 0ec2412..dfebfe3 100644
--- a/src/generic-components/graph/ForceDirectedGraph.jsx
+++ b/src/generic-components/graph/ForceDirectedGraph.jsx
@@ -22,7 +22,8 @@ import {drag} from 'd3-drag';
import {forceSimulation, forceLink, forceManyBody, forceCenter} from 'd3-force';
import {interpolateNumber} from 'd3-interpolate';
import {select, event as currentEvent} from 'd3-selection';
-import React, {Component, PropTypes} from 'react';
+import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import {interval, now} from 'd3-timer';
import {zoom, zoomIdentity} from 'd3-zoom';
import NodeConstants from './NodeVisualElementConstants.js';
diff --git a/src/generic-components/graph/Link.jsx b/src/generic-components/graph/Link.jsx
index bebd4b6..aec33b8 100644
--- a/src/generic-components/graph/Link.jsx
+++ b/src/generic-components/graph/Link.jsx
@@ -19,17 +19,18 @@
* ============LICENSE_END=========================================================
*/
import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import TempCreateAttributes from './TempCreateAttributes.js';
class Link extends Component {
static propTypes = {
- x1: React.PropTypes.number,
- y1: React.PropTypes.number,
- x2: React.PropTypes.number,
- y2: React.PropTypes.number,
- linkAttributes: React.PropTypes.object
+ x1: PropTypes.number,
+ y1: PropTypes.number,
+ x2: PropTypes.number,
+ y2: PropTypes.number,
+ linkAttributes: PropTypes.object
};
static defaultProps = {
diff --git a/src/generic-components/graph/Node.jsx b/src/generic-components/graph/Node.jsx
index 0b96f2a..6de4715 100644
--- a/src/generic-components/graph/Node.jsx
+++ b/src/generic-components/graph/Node.jsx
@@ -19,15 +19,16 @@
* ============LICENSE_END=========================================================
*/
import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
class Node extends Component {
static propTypes = {
- x: React.PropTypes.number,
- y: React.PropTypes.number,
- nodeClass: React.PropTypes.string,
- visualElements: React.PropTypes.array,
- meta: React.PropTypes.object
+ x: PropTypes.number,
+ y: PropTypes.number,
+ nodeClass: PropTypes.string,
+ visualElements: PropTypes.array,
+ meta: PropTypes.object
};
static defaultProps = {
diff --git a/src/generic-components/graph/SVGShape.jsx b/src/generic-components/graph/SVGShape.jsx
index 0ee31fd..b06c46f 100644
--- a/src/generic-components/graph/SVGShape.jsx
+++ b/src/generic-components/graph/SVGShape.jsx
@@ -19,15 +19,16 @@
* ============LICENSE_END=========================================================
*/
import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import NodeVisualElementConstants from './NodeVisualElementConstants';
class SVGShape extends Component {
static propTypes = {
- shapeType: React.PropTypes.string.isRequired,
- shapeAttributes: React.PropTypes.object.isRequired,
- shapeClass: React.PropTypes.object.isRequired,
- textValue: React.PropTypes.string
+ shapeType: PropTypes.string.isRequired,
+ shapeAttributes: PropTypes.object.isRequired,
+ shapeClass: PropTypes.object.isRequired,
+ textValue: PropTypes.string
};
static defaultProps = {
diff --git a/src/generic-components/input/ToggleInput.jsx b/src/generic-components/input/ToggleInput.jsx
index 980d0ff..49b0376 100644
--- a/src/generic-components/input/ToggleInput.jsx
+++ b/src/generic-components/input/ToggleInput.jsx
@@ -19,15 +19,16 @@
* ============LICENSE_END=========================================================
*/
import React from 'react';
+import { PropTypes } from 'prop-types';
export default
class ToggleInput extends React.Component {
static propTypes = {
- label: React.PropTypes.node,
- value: React.PropTypes.bool,
- onChange: React.PropTypes.func,
- disabled: React.PropTypes.bool
+ label: PropTypes.node,
+ value: PropTypes.bool,
+ onChange: PropTypes.func,
+ disabled: PropTypes.bool
}
static defaultProps = {
diff --git a/src/generic-components/input/inputOptions/InputOptions.jsx b/src/generic-components/input/inputOptions/InputOptions.jsx
index 61bc33f..bb9d777 100644
--- a/src/generic-components/input/inputOptions/InputOptions.jsx
+++ b/src/generic-components/input/inputOptions/InputOptions.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React from 'react';
+import { PropTypes } from 'prop-types';
import i18n from 'utils/i18n/i18n.js';
import classNames from 'classnames';
import Select from 'generic-components/input/SelectInput.jsx';
@@ -28,25 +29,25 @@ export const other = {OTHER: 'Other'};
class InputOptions extends React.Component {
static propTypes = {
- values: React.PropTypes.arrayOf(React.PropTypes.shape({
- enum: React.PropTypes.string,
- title: React.PropTypes.string
+ values: PropTypes.arrayOf(PropTypes.shape({
+ enum: PropTypes.string,
+ title: PropTypes.string
})),
- isEnabledOther: React.PropTypes.bool,
- title: React.PropTypes.string,
- selectedValue: React.PropTypes.string,
- multiSelectedEnum: React.PropTypes.array,
- selectedEnum: React.PropTypes.string,
- otherValue: React.PropTypes.string,
- onEnumChange: React.PropTypes.func,
- onOtherChange: React.PropTypes.func,
- isRequired: React.PropTypes.bool,
- isMultiSelect: React.PropTypes.bool
+ isEnabledOther: PropTypes.bool,
+ title: PropTypes.string,
+ selectedValue: PropTypes.string,
+ multiSelectedEnum: PropTypes.array,
+ selectedEnum: PropTypes.string,
+ otherValue: PropTypes.string,
+ onEnumChange: PropTypes.func,
+ onOtherChange: PropTypes.func,
+ isRequired: PropTypes.bool,
+ isMultiSelect: PropTypes.bool
};
static contextTypes = {
- isReadOnlyMode: React.PropTypes.bool
+ isReadOnlyMode: PropTypes.bool
};
state = {
diff --git a/src/generic-components/map/TopographicMap.jsx b/src/generic-components/map/TopographicMap.jsx
index b72b1be..fc0fb64 100644
--- a/src/generic-components/map/TopographicMap.jsx
+++ b/src/generic-components/map/TopographicMap.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component, PropTypes} from 'react';
+import { PropTypes } from 'prop-types';
import {geoAlbersUsa, geoEquirectangular, geoPath} from 'd3-geo';
import {feature, mesh} from 'topojson';
diff --git a/src/generic-components/notifications/NotificationModal.jsx b/src/generic-components/notifications/NotificationModal.jsx
index b09212d..1547da3 100644
--- a/src/generic-components/notifications/NotificationModal.jsx
+++ b/src/generic-components/notifications/NotificationModal.jsx
@@ -30,6 +30,7 @@
*
*/
import React, {Component, PropTypes} from 'react';
+import { PropTypes } from 'prop-types';
import {connect} from 'react-redux';
import Button from 'react-bootstrap/lib/Button.js';
diff --git a/src/generic-components/paginatedTable/PaginatedTable.jsx b/src/generic-components/paginatedTable/PaginatedTable.jsx
index cd36f2d..6b6c5e9 100644
--- a/src/generic-components/paginatedTable/PaginatedTable.jsx
+++ b/src/generic-components/paginatedTable/PaginatedTable.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component} from 'react';
+import { PropTypes } from 'prop-types';
import Pagination from 'react-bootstrap/lib/Pagination';
import Table from 'react-bootstrap/lib/Table';
@@ -28,15 +29,15 @@ const MAX_PAGE_LINKS = 5;
export default class PaginatedTable extends Component {
static propTypes = {
- tableHeaders: React.PropTypes.object,
- tableData: React.PropTypes.array,
- activePage: React.PropTypes.number,
- pageCount: React.PropTypes.number,
- onPageIndexSelected: React.PropTypes.func,
- paginationClass: React.PropTypes.string,
- tableClass: React.PropTypes.string,
- displayHeader: React.PropTypes.bool,
- maxPaginationLinks: React.PropTypes.number
+ tableHeaders: PropTypes.object,
+ tableData: PropTypes.array,
+ activePage: PropTypes.number,
+ pageCount: PropTypes.number,
+ onPageIndexSelected: PropTypes.func,
+ paginationClass: PropTypes.string,
+ tableClass: PropTypes.string,
+ displayHeader: PropTypes.bool,
+ maxPaginationLinks: PropTypes.number
}
static defaultProps = {
diff --git a/src/generic-components/panel/SlidePanel.jsx b/src/generic-components/panel/SlidePanel.jsx
index 305fdf5..9580837 100644
--- a/src/generic-components/panel/SlidePanel.jsx
+++ b/src/generic-components/panel/SlidePanel.jsx
@@ -19,16 +19,17 @@
* ============LICENSE_END=========================================================
*/
import React from 'react';
+import { PropTypes } from 'prop-types';
import FontAwesome from 'react-fontawesome';
import ReactDOM from 'react-dom';
class SlidePanel extends React.Component {
static PropTypes = {
- direction: React.PropTypes.string.isRequired,
- className: React.PropTypes.string,
- title: React.PropTypes.string,
- isOpen: React.PropTypes.bool
+ direction: PropTypes.string.isRequired,
+ className: PropTypes.string,
+ title: PropTypes.string,
+ isOpen: PropTypes.bool
};
static defaultProps = {
diff --git a/src/generic-components/titledContainer/TitledContainer.jsx b/src/generic-components/titledContainer/TitledContainer.jsx
index 7ac3f11..d3d606a 100644
--- a/src/generic-components/titledContainer/TitledContainer.jsx
+++ b/src/generic-components/titledContainer/TitledContainer.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component, PropTypes} from 'react';
+import { PropTypes } from 'prop-types';
import Button from 'react-bootstrap/lib/Button';
import i18n from 'utils/i18n/i18n';
diff --git a/src/generic-components/toggleButtonGroup/ToggleButtonGroup.jsx b/src/generic-components/toggleButtonGroup/ToggleButtonGroup.jsx
index 134a748..6d57637 100644
--- a/src/generic-components/toggleButtonGroup/ToggleButtonGroup.jsx
+++ b/src/generic-components/toggleButtonGroup/ToggleButtonGroup.jsx
@@ -19,6 +19,7 @@
* ============LICENSE_END=========================================================
*/
import React, {Component, PropTypes} from 'react';
+import { PropTypes } from 'prop-types';
import {connect} from 'react-redux';
import ButtonGroup from 'react-bootstrap/lib/ButtonGroup.js';