From 654f844b867fc36a6ad8801b52ca87c18b25f4c3 Mon Sep 17 00:00:00 2001 From: Caleb Date: Sat, 9 Sep 2017 19:39:10 -0600 Subject: [PATCH] Upgrade to seperate React `prop-types` library. `propTypes` was seperated/depreciated from React as of 15.5.0: https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes --- package.json | 1 + src/backends/git-gateway/AuthenticationPage.js | 3 ++- src/backends/github/AuthenticationPage.js | 3 ++- src/backends/test-repo/AuthenticationPage.js | 3 ++- src/components/AppHeader/AppHeader.js | 3 ++- src/components/ControlPanel/ControlPane.js | 3 ++- src/components/EntryEditor/EntryEditor.js | 3 ++- src/components/EntryEditor/EntryEditorToolbar.js | 3 ++- src/components/EntryListing/EntryListing.js | 3 ++- src/components/FindBar/FindBar.js | 3 ++- src/components/PreviewPane/Preview.js | 3 ++- src/components/PreviewPane/PreviewContent.js | 3 ++- src/components/PreviewPane/PreviewPane.js | 3 ++- src/components/ScrollSync/ScrollSync.js | 3 ++- src/components/ScrollSync/ScrollSyncPane.js | 3 ++- src/components/UI/Sticky/Sticky.js | 3 ++- src/components/UI/toast/Toast.js | 3 ++- src/components/UnpublishedListing/UnpublishedListing.js | 3 ++- .../UnpublishedListing/UnpublishedListingCardMeta.js | 3 ++- src/components/Widgets/BooleanControl.js | 3 ++- src/components/Widgets/ControlHOC.js | 3 ++- src/components/Widgets/DateControl.js | 3 ++- src/components/Widgets/DatePreview.js | 3 ++- src/components/Widgets/DateTimeControl.js | 3 ++- src/components/Widgets/DateTimePreview.js | 3 ++- src/components/Widgets/FileControl.js | 3 ++- src/components/Widgets/FilePreview.js | 3 ++- src/components/Widgets/ImageControl.js | 3 ++- src/components/Widgets/ImagePreview.js | 3 ++- src/components/Widgets/ListControl.js | 3 ++- src/components/Widgets/ListPreview.js | 3 ++- .../Widgets/Markdown/MarkdownControl/RawEditor/index.js | 3 ++- .../Widgets/Markdown/MarkdownControl/Toolbar/Toolbar.js | 3 ++- .../Widgets/Markdown/MarkdownControl/Toolbar/ToolbarButton.js | 3 ++- .../Markdown/MarkdownControl/Toolbar/ToolbarComponentsMenu.js | 3 ++- .../Markdown/MarkdownControl/Toolbar/ToolbarPluginForm.js | 3 ++- .../MarkdownControl/Toolbar/ToolbarPluginFormControl.js | 3 ++- .../Widgets/Markdown/MarkdownControl/VisualEditor/index.js | 3 ++- src/components/Widgets/Markdown/MarkdownControl/index.js | 3 ++- src/components/Widgets/Markdown/MarkdownControl/plugins.js | 3 ++- src/components/Widgets/Markdown/MarkdownPreview/index.js | 3 ++- src/components/Widgets/NumberControl.js | 3 ++- src/components/Widgets/NumberPreview.js | 3 ++- src/components/Widgets/ObjectControl.js | 3 ++- src/components/Widgets/ObjectPreview.js | 3 ++- src/components/Widgets/RelationControl.js | 3 ++- src/components/Widgets/RelationPreview.js | 3 ++- src/components/Widgets/SelectControl.js | 3 ++- src/components/Widgets/SelectPreview.js | 3 ++- src/components/Widgets/StringControl.js | 3 ++- src/components/Widgets/StringPreview.js | 3 ++- src/components/Widgets/TextControl.js | 3 ++- src/components/Widgets/TextPreview.js | 3 ++- src/containers/App.js | 3 ++- src/containers/CollectionPage.js | 3 ++- src/containers/DashboardPage.js | 3 ++- src/containers/EntryPage.js | 3 ++- src/containers/SearchPage.js | 3 ++- src/containers/Sidebar.js | 3 ++- src/containers/editorialWorkflow/UnpublishedEntriesPanel.js | 3 ++- 60 files changed, 119 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index 34691b3b..732eb384 100644 --- a/package.json +++ b/package.json @@ -121,6 +121,7 @@ "preliminaries-parser-toml": "1.1.0", "preliminaries-parser-yaml": "1.1.0", "prismjs": "^1.5.1", + "prop-types": "^15.5.10", "react": "^15.1.0", "react-addons-css-transition-group": "^15.3.1", "react-autosuggest": "^7.0.1", diff --git a/src/backends/git-gateway/AuthenticationPage.js b/src/backends/git-gateway/AuthenticationPage.js index 66807e56..9962b117 100644 --- a/src/backends/git-gateway/AuthenticationPage.js +++ b/src/backends/git-gateway/AuthenticationPage.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import React from "react"; import Input from "react-toolbox/lib/input"; import Button from "react-toolbox/lib/button"; @@ -53,7 +54,7 @@ export default class AuthenticationPage extends React.Component { } static propTypes = { - onLogin: React.PropTypes.func.isRequired, + onLogin: PropTypes.func.isRequired, }; state = { email: "", password: "", errors: {} }; diff --git a/src/backends/github/AuthenticationPage.js b/src/backends/github/AuthenticationPage.js index db45e18b..31ab5732 100644 --- a/src/backends/github/AuthenticationPage.js +++ b/src/backends/github/AuthenticationPage.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import React from 'react'; import Button from 'react-toolbox/lib/button'; import Authenticator from '../../lib/netlify-auth'; @@ -8,7 +9,7 @@ import styles from './AuthenticationPage.css'; export default class AuthenticationPage extends React.Component { static propTypes = { - onLogin: React.PropTypes.func.isRequired, + onLogin: PropTypes.func.isRequired, }; state = {}; diff --git a/src/backends/test-repo/AuthenticationPage.js b/src/backends/test-repo/AuthenticationPage.js index 6ebe77c0..17b74bde 100644 --- a/src/backends/test-repo/AuthenticationPage.js +++ b/src/backends/test-repo/AuthenticationPage.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import React from 'react'; import Input from "react-toolbox/lib/input"; import Button from "react-toolbox/lib/button"; @@ -7,7 +8,7 @@ import styles from "../git-gateway/AuthenticationPage.css"; export default class AuthenticationPage extends React.Component { static propTypes = { - onLogin: React.PropTypes.func.isRequired, + onLogin: PropTypes.func.isRequired, }; state = { email: '' }; diff --git a/src/components/AppHeader/AppHeader.js b/src/components/AppHeader/AppHeader.js index db42bd3b..a8665191 100644 --- a/src/components/AppHeader/AppHeader.js +++ b/src/components/AppHeader/AppHeader.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from "react"; +import PropTypes from 'prop-types'; +import React from "react"; import ImmutablePropTypes from "react-immutable-proptypes"; import { IndexLink } from "react-router"; import { IconMenu, Menu, MenuItem } from "react-toolbox/lib/menu"; diff --git a/src/components/ControlPanel/ControlPane.js b/src/components/ControlPanel/ControlPane.js index f8aec82f..08f129e7 100644 --- a/src/components/ControlPanel/ControlPane.js +++ b/src/components/ControlPanel/ControlPane.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { Map, fromJS } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { resolveWidget } from '../Widgets'; diff --git a/src/components/EntryEditor/EntryEditor.js b/src/components/EntryEditor/EntryEditor.js index 5413d12d..17b88727 100644 --- a/src/components/EntryEditor/EntryEditor.js +++ b/src/components/EntryEditor/EntryEditor.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import SplitPane from 'react-split-pane'; import Button from 'react-toolbox/lib/button'; diff --git a/src/components/EntryEditor/EntryEditorToolbar.js b/src/components/EntryEditor/EntryEditorToolbar.js index da5847e9..c020b6d6 100644 --- a/src/components/EntryEditor/EntryEditorToolbar.js +++ b/src/components/EntryEditor/EntryEditorToolbar.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { Button } from 'react-toolbox/lib/button'; const EntryEditorToolbar = ( diff --git a/src/components/EntryListing/EntryListing.js b/src/components/EntryListing/EntryListing.js index faf5b2db..84c717ff 100644 --- a/src/components/EntryListing/EntryListing.js +++ b/src/components/EntryListing/EntryListing.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Waypoint from 'react-waypoint'; import { Map } from 'immutable'; diff --git a/src/components/FindBar/FindBar.js b/src/components/FindBar/FindBar.js index 479fcb7c..727b6d70 100644 --- a/src/components/FindBar/FindBar.js +++ b/src/components/FindBar/FindBar.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import styles from './FindBar.css'; export const SEARCH = 'SEARCH'; diff --git a/src/components/PreviewPane/Preview.js b/src/components/PreviewPane/Preview.js index 93ea02c3..9995125b 100644 --- a/src/components/PreviewPane/Preview.js +++ b/src/components/PreviewPane/Preview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; function isVisible(field) { diff --git a/src/components/PreviewPane/PreviewContent.js b/src/components/PreviewPane/PreviewContent.js index 2baec537..a8bae522 100644 --- a/src/components/PreviewPane/PreviewContent.js +++ b/src/components/PreviewPane/PreviewContent.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { ScrollSyncPane } from '../ScrollSync'; /** diff --git a/src/components/PreviewPane/PreviewPane.js b/src/components/PreviewPane/PreviewPane.js index d849eac6..eb868e28 100644 --- a/src/components/PreviewPane/PreviewPane.js +++ b/src/components/PreviewPane/PreviewPane.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { List, Map } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Frame from 'react-frame-component'; diff --git a/src/components/ScrollSync/ScrollSync.js b/src/components/ScrollSync/ScrollSync.js index 5d921488..28a76220 100644 --- a/src/components/ScrollSync/ScrollSync.js +++ b/src/components/ScrollSync/ScrollSync.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { without } from 'lodash'; export default class ScrollSync extends Component { diff --git a/src/components/ScrollSync/ScrollSyncPane.js b/src/components/ScrollSync/ScrollSyncPane.js index 6fcf7a67..77a6454a 100644 --- a/src/components/ScrollSync/ScrollSyncPane.js +++ b/src/components/ScrollSync/ScrollSyncPane.js @@ -1,4 +1,5 @@ -import { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import { Component } from 'react'; import ReactDOM from 'react-dom'; export default class ScrollSyncPane extends Component { diff --git a/src/components/UI/Sticky/Sticky.js b/src/components/UI/Sticky/Sticky.js index bfa75080..766068c0 100644 --- a/src/components/UI/Sticky/Sticky.js +++ b/src/components/UI/Sticky/Sticky.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import classnames from 'classnames'; import { partial, without } from 'lodash'; import styles from './Sticky.css'; diff --git a/src/components/UI/toast/Toast.js b/src/components/UI/toast/Toast.js index 36157815..068ef48d 100644 --- a/src/components/UI/toast/Toast.js +++ b/src/components/UI/toast/Toast.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { Icon } from '../index'; import styles from './Toast.css'; diff --git a/src/components/UnpublishedListing/UnpublishedListing.js b/src/components/UnpublishedListing/UnpublishedListing.js index 865af614..b2f00b20 100644 --- a/src/components/UnpublishedListing/UnpublishedListing.js +++ b/src/components/UnpublishedListing/UnpublishedListing.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { DragSource, DropTarget, HTML5DragDrop } from 'react-simple-dnd'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { Link } from 'react-router'; diff --git a/src/components/UnpublishedListing/UnpublishedListingCardMeta.js b/src/components/UnpublishedListing/UnpublishedListingCardMeta.js index fb4c23ad..4f42912a 100644 --- a/src/components/UnpublishedListing/UnpublishedListingCardMeta.js +++ b/src/components/UnpublishedListing/UnpublishedListingCardMeta.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import styles from './UnpublishedListingCardMeta.css'; const UnpublishedListingCardMeta = ({ meta, label }) => diff --git a/src/components/Widgets/BooleanControl.js b/src/components/Widgets/BooleanControl.js index c902f395..e870193e 100644 --- a/src/components/Widgets/BooleanControl.js +++ b/src/components/Widgets/BooleanControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from "react-immutable-proptypes"; import Switch from 'react-toolbox/lib/switch'; import { isBoolean } from 'lodash'; diff --git a/src/components/Widgets/ControlHOC.js b/src/components/Widgets/ControlHOC.js index 37bf7069..20d34e8b 100644 --- a/src/components/Widgets/ControlHOC.js +++ b/src/components/Widgets/ControlHOC.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import ImmutablePropTypes from "react-immutable-proptypes"; const truthy = () => ({ error: false }); diff --git a/src/components/Widgets/DateControl.js b/src/components/Widgets/DateControl.js index edd918f2..7dfa4277 100644 --- a/src/components/Widgets/DateControl.js +++ b/src/components/Widgets/DateControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import DateTime from 'react-datetime'; export default class DateControl extends React.Component { diff --git a/src/components/Widgets/DatePreview.js b/src/components/Widgets/DatePreview.js index 70e5bc2f..c31e95f5 100644 --- a/src/components/Widgets/DatePreview.js +++ b/src/components/Widgets/DatePreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function DatePreview({ value }) { diff --git a/src/components/Widgets/DateTimeControl.js b/src/components/Widgets/DateTimeControl.js index db98aff1..ed869e65 100644 --- a/src/components/Widgets/DateTimeControl.js +++ b/src/components/Widgets/DateTimeControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import DateTime from 'react-datetime'; export default class DateTimeControl extends React.Component { diff --git a/src/components/Widgets/DateTimePreview.js b/src/components/Widgets/DateTimePreview.js index 2d78f9e8..c6cc8589 100644 --- a/src/components/Widgets/DateTimePreview.js +++ b/src/components/Widgets/DateTimePreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function DateTimePreview({ value }) { diff --git a/src/components/Widgets/FileControl.js b/src/components/Widgets/FileControl.js index 468b4107..321a8d6b 100644 --- a/src/components/Widgets/FileControl.js +++ b/src/components/Widgets/FileControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { truncateMiddle } from '../../lib/textHelper'; import { Loader } from '../UI'; import AssetProxy, { createAssetProxy } from '../../valueObjects/AssetProxy'; diff --git a/src/components/Widgets/FilePreview.js b/src/components/Widgets/FilePreview.js index d9ed8801..bea801d3 100644 --- a/src/components/Widgets/FilePreview.js +++ b/src/components/Widgets/FilePreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function FilePreview({ value, getAsset }) { diff --git a/src/components/Widgets/ImageControl.js b/src/components/Widgets/ImageControl.js index cd8fb46b..ace0c0cf 100644 --- a/src/components/Widgets/ImageControl.js +++ b/src/components/Widgets/ImageControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { truncateMiddle } from '../../lib/textHelper'; import { Loader } from '../UI'; import AssetProxy, { createAssetProxy } from '../../valueObjects/AssetProxy'; diff --git a/src/components/Widgets/ImagePreview.js b/src/components/Widgets/ImagePreview.js index c31dd3a0..55ffa1a4 100644 --- a/src/components/Widgets/ImagePreview.js +++ b/src/components/Widgets/ImagePreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle, { imagePreviewStyle } from './defaultPreviewStyle'; export default function ImagePreview({ value, getAsset }) { diff --git a/src/components/Widgets/ListControl.js b/src/components/Widgets/ListControl.js index 8fb103f0..a9b9ad3b 100644 --- a/src/components/Widgets/ListControl.js +++ b/src/components/Widgets/ListControl.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { List, Map, fromJS } from 'immutable'; import { sortable } from 'react-sortable'; import FontIcon from 'react-toolbox/lib/font_icon'; diff --git a/src/components/Widgets/ListPreview.js b/src/components/Widgets/ListPreview.js index 463ee126..c2bc596c 100644 --- a/src/components/Widgets/ListPreview.js +++ b/src/components/Widgets/ListPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { resolveWidget } from '../Widgets'; import previewStyle from './defaultPreviewStyle'; import ObjectPreview from './ObjectPreview'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js b/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js index d19164b6..d3ccda2d 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { Editor as Slate, Plain } from 'slate'; import { debounce } from 'lodash'; import Toolbar from '../Toolbar/Toolbar'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/Toolbar.js b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/Toolbar.js index 99ed3249..ce2ad6c1 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/Toolbar.js +++ b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/Toolbar.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { List } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Switch from 'react-toolbox/lib/switch'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarButton.js b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarButton.js index 3feeba24..cc5d1d7f 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarButton.js +++ b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarButton.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import classnames from 'classnames'; import { Icon } from '../../../../UI'; import styles from './ToolbarButton.css'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarComponentsMenu.js b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarComponentsMenu.js index e6bf3a2d..e4b0ab79 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarComponentsMenu.js +++ b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarComponentsMenu.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { Menu, MenuItem } from 'react-toolbox/lib/menu'; import ToolbarButton from './ToolbarButton'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginForm.js b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginForm.js index d90dddd9..2cb6c4da 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginForm.js +++ b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginForm.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { Map } from 'immutable'; import { Button } from 'react-toolbox/lib/button'; import ToolbarPluginFormControl from './ToolbarPluginFormControl'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginFormControl.js b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginFormControl.js index 6293475d..ebd58c2d 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginFormControl.js +++ b/src/components/Widgets/Markdown/MarkdownControl/Toolbar/ToolbarPluginFormControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { resolveWidget } from '../../../../Widgets'; import styles from './ToolbarPluginFormControl.css'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js b/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js index 2fa9323a..ee18459d 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { get, isEmpty, debounce } from 'lodash'; import { Editor as Slate, Raw, Block, Text } from 'slate'; import { slateToMarkdown, markdownToSlate, htmlToSlate } from '../../serializers'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/index.js b/src/components/Widgets/Markdown/MarkdownControl/index.js index 79b7e866..78de7ef2 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/index.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import registry from '../../../../lib/registry'; import { markdownToRemark, remarkToMarkdown } from '../serializers' import RawEditor from './RawEditor'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/plugins.js b/src/components/Widgets/Markdown/MarkdownControl/plugins.js index 400b77b3..dc39d20c 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/plugins.js +++ b/src/components/Widgets/Markdown/MarkdownControl/plugins.js @@ -1,4 +1,5 @@ -import { Component, PropTypes, Children } from 'react'; +import PropTypes from 'prop-types'; +import { Component, Children } from 'react'; import { List, Record, fromJS } from 'immutable'; import _ from 'lodash'; diff --git a/src/components/Widgets/Markdown/MarkdownPreview/index.js b/src/components/Widgets/Markdown/MarkdownPreview/index.js index c6cbfcf9..cfa5b04b 100644 --- a/src/components/Widgets/Markdown/MarkdownPreview/index.js +++ b/src/components/Widgets/Markdown/MarkdownPreview/index.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { markdownToHtml } from '../serializers'; import previewStyle from '../../defaultPreviewStyle'; diff --git a/src/components/Widgets/NumberControl.js b/src/components/Widgets/NumberControl.js index 9e5d622e..d8c2fa28 100644 --- a/src/components/Widgets/NumberControl.js +++ b/src/components/Widgets/NumberControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; export default class NumberControl extends React.Component { handleChange = (e) => { diff --git a/src/components/Widgets/NumberPreview.js b/src/components/Widgets/NumberPreview.js index 7e6337ac..b90e3fbb 100644 --- a/src/components/Widgets/NumberPreview.js +++ b/src/components/Widgets/NumberPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function NumberPreview({ value }) { diff --git a/src/components/Widgets/ObjectControl.js b/src/components/Widgets/ObjectControl.js index 569ea20b..ae3dd43d 100644 --- a/src/components/Widgets/ObjectControl.js +++ b/src/components/Widgets/ObjectControl.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { Map } from 'immutable'; import { resolveWidget } from '../Widgets'; import controlStyles from '../ControlPanel/ControlPane.css'; diff --git a/src/components/Widgets/ObjectPreview.js b/src/components/Widgets/ObjectPreview.js index 03a50475..bd713072 100644 --- a/src/components/Widgets/ObjectPreview.js +++ b/src/components/Widgets/ObjectPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { resolveWidget } from '../Widgets'; import previewStyle from './defaultPreviewStyle'; diff --git a/src/components/Widgets/RelationControl.js b/src/components/Widgets/RelationControl.js index 378b0e60..fc3a5e5f 100644 --- a/src/components/Widgets/RelationControl.js +++ b/src/components/Widgets/RelationControl.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import Autosuggest from 'react-autosuggest'; import uuid from 'uuid'; import { Map } from 'immutable'; diff --git a/src/components/Widgets/RelationPreview.js b/src/components/Widgets/RelationPreview.js index b758e130..1924708d 100644 --- a/src/components/Widgets/RelationPreview.js +++ b/src/components/Widgets/RelationPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function RelationPreview({ value }) { diff --git a/src/components/Widgets/SelectControl.js b/src/components/Widgets/SelectControl.js index 22ce171e..331567e3 100644 --- a/src/components/Widgets/SelectControl.js +++ b/src/components/Widgets/SelectControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; export default class SelectControl extends React.Component { diff --git a/src/components/Widgets/SelectPreview.js b/src/components/Widgets/SelectPreview.js index edf38a0f..1eb2a59c 100644 --- a/src/components/Widgets/SelectPreview.js +++ b/src/components/Widgets/SelectPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function SelectPreview({ value }) { diff --git a/src/components/Widgets/StringControl.js b/src/components/Widgets/StringControl.js index cf8e72d5..78129ea7 100644 --- a/src/components/Widgets/StringControl.js +++ b/src/components/Widgets/StringControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; export default class StringControl extends React.Component { handleChange = (e) => { diff --git a/src/components/Widgets/StringPreview.js b/src/components/Widgets/StringPreview.js index 0885405d..b1d5817e 100644 --- a/src/components/Widgets/StringPreview.js +++ b/src/components/Widgets/StringPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function StringPreview({ value }) { diff --git a/src/components/Widgets/TextControl.js b/src/components/Widgets/TextControl.js index 090f50e4..ba4324ba 100644 --- a/src/components/Widgets/TextControl.js +++ b/src/components/Widgets/TextControl.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; export default class StringControl extends React.Component { componentDidMount() { diff --git a/src/components/Widgets/TextPreview.js b/src/components/Widgets/TextPreview.js index 2e1e4bd6..32b7a6ff 100644 --- a/src/components/Widgets/TextPreview.js +++ b/src/components/Widgets/TextPreview.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import previewStyle from './defaultPreviewStyle'; export default function TextPreview({ value }) { diff --git a/src/containers/App.js b/src/containers/App.js index ccc8baae..ece0b2cb 100644 --- a/src/containers/App.js +++ b/src/containers/App.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { IndexLink } from "react-router"; diff --git a/src/containers/CollectionPage.js b/src/containers/CollectionPage.js index cb331ff8..e3418493 100644 --- a/src/containers/CollectionPage.js +++ b/src/containers/CollectionPage.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { loadEntries } from '../actions/entries'; diff --git a/src/containers/DashboardPage.js b/src/containers/DashboardPage.js index f9e71492..948a07ad 100644 --- a/src/containers/DashboardPage.js +++ b/src/containers/DashboardPage.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import { connect } from 'react-redux'; import { SIMPLE, EDITORIAL_WORKFLOW } from '../constants/publishModes'; import history from '../routing/history'; diff --git a/src/containers/EntryPage.js b/src/containers/EntryPage.js index 7a85c08d..e76fbd70 100644 --- a/src/containers/EntryPage.js +++ b/src/containers/EntryPage.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import history from '../routing/history'; diff --git a/src/containers/SearchPage.js b/src/containers/SearchPage.js index 0ac906d5..43dae8ef 100644 --- a/src/containers/SearchPage.js +++ b/src/containers/SearchPage.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { selectSearchedEntries } from '../reducers'; diff --git a/src/containers/Sidebar.js b/src/containers/Sidebar.js index 072ca288..8bb59447 100644 --- a/src/containers/Sidebar.js +++ b/src/containers/Sidebar.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { connect } from 'react-redux'; import ReactSidebar from 'react-sidebar'; import _ from 'lodash'; diff --git a/src/containers/editorialWorkflow/UnpublishedEntriesPanel.js b/src/containers/editorialWorkflow/UnpublishedEntriesPanel.js index ddb263c5..17d4013f 100644 --- a/src/containers/editorialWorkflow/UnpublishedEntriesPanel.js +++ b/src/containers/editorialWorkflow/UnpublishedEntriesPanel.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { OrderedMap } from 'immutable'; import { connect } from 'react-redux';