From f3564470dd9a7c970bf48dcf48c72d92e345e4f8 Mon Sep 17 00:00:00 2001 From: David Revay Date: Mon, 2 Jul 2018 17:24:35 -0700 Subject: [PATCH 001/274] Moved to PropTypes --- .../app/renderer/main/Root.js | 3 +- .../main/pages/ProjectPage/ProjectPage.jsx | 3 +- .../ProjectSettingsGeneral.jsx | 4 +- .../menubar/modules/Sidebar/Sidebar.jsx | 2 +- .../menubar/pages/AppRootPage/AppRootPage.jsx | 3 +- .../preview/pages/AppRootPage/AppRootPage.jsx | 3 +- .../preview/pages/PreviewPage/PreviewPage.jsx | 3 +- stemn-frontend-shared/package.json | 1 - .../AccordianAnimate/AccordianAnimate.jsx | 4 +- .../src/misc/Auth/IsOwner/IsOwner.jsx | 3 +- .../src/misc/AutoUpdater/index.jsx | 3 +- .../src/misc/Autosuggest/Autosuggest.jsx | 3 +- .../src/misc/Autosuggest/Highlight.jsx | 4 +- .../src/misc/Breadcrumbs/Breadcrumbs.jsx | 3 +- .../src/misc/Breadcrumbs/Crumb.jsx | 3 +- .../src/misc/Calendar/Calendar.jsx | 3 +- .../LoadSplitCode/LoadSplitCode.jsx | 3 +- .../RouteLoading/RouteLoading.jsx | 3 +- .../DownloadButton/DownloadButton.js | 4 +- .../src/misc/Editor/EditorDisplay.jsx | 3 +- .../Editor/EditorMentions/EditorMentions.js | 3 +- .../src/misc/Editor/EditorNew/EditorNew.js | 3 +- .../Editor/EditorToolbar/EditorToolbar.js | 3 +- .../src/misc/EntityRow/EntityRow.jsx | 3 +- .../Fields/NewFieldModal/NewFieldModal.jsx | 3 +- .../src/misc/FileCompare/FileCompare.jsx | 3 +- .../src/misc/FileList/FileList.jsx | 21 +-- .../FileList/FileListPopup/FileListPopup.js | 3 +- .../FileSyncUnderway/FileSyncUnderway.jsx | 3 +- .../FileList/components/FileBreadCrumbs.jsx | 3 +- .../FileList/components/FileListPopup.jsx | 3 +- .../src/misc/FileList/components/FileRow.jsx | 3 +- .../FileSelectModal/FileSelectModal.jsx | 12 +- .../misc/FileSelectInput/FileSelectInput.jsx | 3 +- .../Download/DownloadModal/DownloadModal.jsx | 4 +- .../AssemblyParts/AssemblyParts.jsx | 3 +- .../PreviewFile/PreviewGdoc/PreviewGdoc.jsx | 2 +- .../PreviewGoogle/PreviewGoogle.jsx | 2 +- .../PreviewFile/PreviewImage/PreviewImage.jsx | 2 +- .../PreviewFile/PreviewPdf/PreviewPdf.jsx | 6 +- .../PreviewFile/PreviewPdf/PreviewPdfPage.jsx | 4 +- .../src/misc/Files/Readme/DisplayReadme.jsx | 3 +- .../src/misc/Files/Readme/Readme.jsx | 3 +- stemn-frontend-shared/src/misc/Forms/Form.jsx | 3 +- .../LoadingAnimation/LoadingAnimation.jsx | 2 +- .../Loading/LoadingOverlay/LoadingOverlay.jsx | 2 +- .../LoadingPlaceholder/LoadingPlaceholder.jsx | 2 +- .../MentionFromString/MentionFromString.js | 3 +- .../src/misc/Modal/ModalContainer.jsx | 3 +- .../NotificationItem/NotificationItem.js | 2 +- .../NotificationLink/NotificationLink.jsx | 2 +- .../src/misc/Pagination/Pagination.jsx | 5 +- .../PanelDescription/PanelDescription.jsx | 4 +- .../ProjectSettings/CloudSettings/index.js | 4 +- .../ProjectSettings/DeleteSettings/index.js | 4 +- .../ProjectSettings/GeneralSettings/index.js | 4 +- .../LicenseSettings/LicenseSettings.jsx | 3 +- .../OrganisationSettings/index.js | 4 +- .../PermissionsSettings.jsx | 3 +- .../misc/ProjectSettings/TagSettings/index.js | 4 +- .../TeamSettings/TeamSettings.jsx | 4 +- .../ThreadsSettings/ThreadsSettings.jsx | 4 +- .../MyProjectsPanel/MyProjectsPanel.jsx | 2 +- .../misc/Projects/ProjectRow/ProjectRow.jsx | 2 +- .../RelatedFields/RelatedList/RelatedList.jsx | 3 +- .../src/misc/Router/Link/Link.js | 3 +- .../src/misc/Scroll/ScrollZoom/ScrollZoom.jsx | 3 +- .../misc/Search/FieldSearch/FieldSearch.jsx | 4 +- .../Search/LocationSearch/LocationSearch.jsx | 3 +- .../Search/MentionPopover/MentionPopover.jsx | 2 +- .../OrganisationSearch/OrganisationSearch.jsx | 4 +- .../Search/SearchInput/SearchInputAlt.jsx | 3 +- .../src/misc/Search/SiteSearch/SiteSearch.js | 2 +- .../SiteSearchResults/SiteSearchResults.jsx | 2 +- .../src/misc/Search/UserSearch/UserSearch.jsx | 4 +- .../misc/Social/SocialButton/SocialButton.jsx | 2 +- .../TimelineItem/TimelineItem.jsx | 3 +- .../TimelineItem/TimelineItemText.jsx | 3 +- .../TimelineVertical/TimelineVertical.jsx | 3 +- .../src/misc/Tabs/ArrowTabs/ArrowTabs.jsx | 3 +- .../misc/Threads/GroupSelect/GroupSelect.jsx | 2 +- .../Threads/LabelDisplay/LabelDisplay.jsx | 3 +- .../misc/Threads/LabelSelect/LabelSelect.jsx | 2 +- .../Threads/NewThreadModal/NewThreadModal.jsx | 2 +- .../ThreadFilterMenu/ThreadFilterMenu.jsx | 3 +- .../ThreadFilterStatus/ThreadFilterStatus.jsx | 3 +- .../ThreadFilterUser/ThreadFilterUser.jsx | 3 +- .../ThreadGroupsEdit/ThreadGroupsEdit.jsx | 3 +- .../ThreadList/ThreadGroup/DragLayer.jsx | 15 +- .../ThreadGroup/ThreadGroupWrapped.jsx | 3 +- .../ThreadListItem/EmptyWrapped.jsx | 3 +- .../ThreadListItem/ThreadListItemWrapped.jsx | 3 +- .../src/misc/Timeline/Timeline.jsx | 3 +- .../src/misc/Toasts/Toasts.jsx | 2 +- .../src/misc/TogglePanel/TogglePanel.jsx | 3 +- .../misc/Upload/Upload/Upload.container.js | 2 +- .../src/misc/Upload/Upload/Upload.js | 3 +- .../misc/Upload/UploadModal/UploadModal.jsx | 3 +- .../EmailAndNotificationToggles.jsx | 3 +- .../UserBetaSettings/UserBetaSettings.jsx | 4 +- .../UserCloudProviderSettings.jsx | 4 +- .../UserEmailSettings/UserEmailSettings.jsx | 3 +- .../UserExperienceSettings.jsx | 3 +- .../UserLinkedAccountSettings.jsx | 4 +- .../UserNameSettings/UserNameSettings.jsx | 3 +- .../UserPasswordSettings.jsx | 3 +- .../UserProfileSettings.js | 3 +- .../src/misc/Walkthrough/Walkthrough.jsx | 3 +- stemn-frontend-website/package-lock.json | 151 ++++++++++++++---- stemn-frontend-website/package.json | 7 +- .../src/client/assets/javascripts/app/Root.js | 3 +- .../AddFriendInput/AddFriendInput.js | 4 +- .../components/FriendList/FriendList.js | 4 +- .../FriendListItem/FriendListItem.js | 4 +- .../friends/components/FriendsLayout.js | 4 +- .../javascripts/layout/LandingLayout.js | 2 +- .../javascripts/layout/StandardLayout.js | 2 +- .../modules/BetaBadge/BetaBadge.jsx | 2 +- .../javascripts/modules/Footer/Footer.js | 2 +- .../javascripts/modules/Header/Header.js | 2 +- .../HeaderMobileMenu/HeaderMobileMenu.jsx | 2 +- .../modules/HeroBanner/HeroBanner.js | 2 +- .../modules/LandingFooter/LandingFooter.js | 2 +- .../modules/LandingHeader/LandingHeader.js | 4 +- .../modules/SubHeader/SubHeader.jsx | 4 +- .../modules/SubSubHeader/SubSubHeader.jsx | 4 +- .../modules/UserNavHeader/UserNavHeader.jsx | 4 +- .../javascripts/pages/Download/Download.js | 2 +- .../javascripts/pages/Explore/Explore.js | 2 +- .../assets/javascripts/pages/Field/Field.jsx | 3 +- .../assets/javascripts/pages/File/File.js | 2 +- .../assets/javascripts/pages/Flow/Flow.js | 2 +- .../assets/javascripts/pages/Home/Home.js | 2 +- .../javascripts/pages/Landing/Landing.js | 2 +- .../pages/Notifications/Notifications.js | 2 +- .../NotificationsAll/NotificationsAll.js | 2 +- .../NotificationsUnread.js | 3 +- .../pages/Onboarding/Onboarding.js | 3 +- .../pages/OnboardingAbout/OnboardingAbout.js | 4 +- .../OnboardingDownload/OnboardingDownload.js | 4 +- .../pages/OnboardingSync/OnboardingSync.js | 4 +- .../pages/OpenSource/OpenSource.js | 3 +- .../javascripts/pages/Pricing/Pricing.js | 2 +- .../javascripts/pages/Privacy/Privacy.js | 2 +- .../ProjectSettingsGeneral.js | 2 +- .../ProjectSettingsTags.js | 2 +- .../javascripts/pages/Search/Search.jsx | 2 +- .../javascripts/pages/Security/Security.js | 2 +- .../javascripts/pages/Settings/Settings.js | 2 +- .../pages/SettingsAccount/SettingsAccount.js | 4 +- .../pages/SettingsBilling/SettingsBilling.js | 2 +- .../pages/SettingsEmails/SettingsEmails.js | 2 +- .../pages/SettingsProfile/SettingsProfile.js | 2 +- .../SettingsProfileDetails.js | 2 +- .../SettingsProjects/SettingsProjects.js | 2 +- .../assets/javascripts/pages/Terms/Terms.js | 2 +- .../assets/javascripts/pages/User/User.js | 2 +- .../pages/UserDetails/UserDetails.js | 2 +- .../pages/UserFollowers/UserFollowers.js | 2 +- .../pages/UserFollowing/UserFollowing.js | 2 +- .../pages/UserOverview/UserOverview.js | 2 +- .../pages/UserProjects/UserProjects.js | 2 +- .../javascripts/pages/UserStars/UserStars.js | 2 +- .../test/unit/testHelper.js | 3 +- 164 files changed, 406 insertions(+), 256 deletions(-) diff --git a/stemn-frontend-desktop/app/renderer/main/Root.js b/stemn-frontend-desktop/app/renderer/main/Root.js index 9d89c249..32a47b8c 100644 --- a/stemn-frontend-desktop/app/renderer/main/Root.js +++ b/stemn-frontend-desktop/app/renderer/main/Root.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { Provider } from 'react-redux' import { Router } from 'react-router' import getRoutes from './routes' diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectPage.jsx index c7e294e1..c43ff0c0 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectPage.jsx @@ -7,6 +7,7 @@ import * as SystemActions from 'stemn-shared/desktop/System/System.actions.js' // Component Core import React from 'react' +import PropTypes from 'prop-types' import Link from 'stemn-shared/misc/Router/Link' import { has, get } from 'lodash' @@ -158,7 +159,7 @@ class Component extends React.Component { Component.childContextTypes = { - project: React.PropTypes.object, + project: PropTypes.object, } // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsGeneralPage/ProjectSettingsGeneral.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsGeneralPage/ProjectSettingsGeneral.jsx index 2feb1b33..d5f019e8 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsGeneralPage/ProjectSettingsGeneral.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsGeneralPage/ProjectSettingsGeneral.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import GeneralSettings from 'stemn-shared/misc/ProjectSettings/GeneralSettings' import CloudSettings from 'stemn-shared/misc/ProjectSettings/CloudSettings' import DeleteSettings from 'stemn-shared/misc/ProjectSettings/DeleteSettings' diff --git a/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx b/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx index a7d1a5db..6df16553 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx @@ -7,7 +7,7 @@ import { toggleMenubarSidebar } from 'stemn-shared/misc/Sidebar/Sidebar.actions. // Component Core import React from 'react' -import ReactCSSTransitionGroup from 'react-addons-css-transition-group' +import ReactCSSTransitionGroup from 'react-transition-group' import { escapeRegExp, orderBy } from 'lodash' // Styles diff --git a/stemn-frontend-desktop/app/renderer/menubar/pages/AppRootPage/AppRootPage.jsx b/stemn-frontend-desktop/app/renderer/menubar/pages/AppRootPage/AppRootPage.jsx index 251c1a20..d8a90976 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/pages/AppRootPage/AppRootPage.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/pages/AppRootPage/AppRootPage.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' function App({ children }) { return ( diff --git a/stemn-frontend-desktop/app/renderer/preview/pages/AppRootPage/AppRootPage.jsx b/stemn-frontend-desktop/app/renderer/preview/pages/AppRootPage/AppRootPage.jsx index a0baa52f..a69e6302 100644 --- a/stemn-frontend-desktop/app/renderer/preview/pages/AppRootPage/AppRootPage.jsx +++ b/stemn-frontend-desktop/app/renderer/preview/pages/AppRootPage/AppRootPage.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import ModalContainer from 'stemn-shared/misc/Modal/ModalContainer.jsx' import TitleBar from 'stemn-shared/misc/TitleBar/TitleBar' diff --git a/stemn-frontend-desktop/app/renderer/preview/pages/PreviewPage/PreviewPage.jsx b/stemn-frontend-desktop/app/renderer/preview/pages/PreviewPage/PreviewPage.jsx index 34dbbec4..e068ce4c 100644 --- a/stemn-frontend-desktop/app/renderer/preview/pages/PreviewPage/PreviewPage.jsx +++ b/stemn-frontend-desktop/app/renderer/preview/pages/PreviewPage/PreviewPage.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './PreviewPage.css' diff --git a/stemn-frontend-shared/package.json b/stemn-frontend-shared/package.json index d0431ae7..ace5ac10 100644 --- a/stemn-frontend-shared/package.json +++ b/stemn-frontend-shared/package.json @@ -17,7 +17,6 @@ "react-router": "^2.2.4", "codemirror": "^5.17.0", "react-clickdrag": "https://github.com/MrBlenny/react-clickdrag/tarball/master", - "react-addons-css-transition-group": "^15.2.1", "react-dnd-html5-backend": "^2.3.0" }, "dependencies": {} diff --git a/stemn-frontend-shared/src/misc/Animation/AccordianAnimate/AccordianAnimate.jsx b/stemn-frontend-shared/src/misc/Animation/AccordianAnimate/AccordianAnimate.jsx index aed1a2e8..6aafe56f 100644 --- a/stemn-frontend-shared/src/misc/Animation/AccordianAnimate/AccordianAnimate.jsx +++ b/stemn-frontend-shared/src/misc/Animation/AccordianAnimate/AccordianAnimate.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' export default class AccordianAnimate extends Component { diff --git a/stemn-frontend-shared/src/misc/Auth/IsOwner/IsOwner.jsx b/stemn-frontend-shared/src/misc/Auth/IsOwner/IsOwner.jsx index bfd261a2..851ce1fa 100644 --- a/stemn-frontend-shared/src/misc/Auth/IsOwner/IsOwner.jsx +++ b/stemn-frontend-shared/src/misc/Auth/IsOwner/IsOwner.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' import { permissionsIsMin } from 'stemn-shared/misc/Auth/Auth.utils' diff --git a/stemn-frontend-shared/src/misc/AutoUpdater/index.jsx b/stemn-frontend-shared/src/misc/AutoUpdater/index.jsx index fd387db4..21f0a6e6 100644 --- a/stemn-frontend-shared/src/misc/AutoUpdater/index.jsx +++ b/stemn-frontend-shared/src/misc/AutoUpdater/index.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { isEqual } from 'lodash' import styles from './autoUpdater.css' diff --git a/stemn-frontend-shared/src/misc/Autosuggest/Autosuggest.jsx b/stemn-frontend-shared/src/misc/Autosuggest/Autosuggest.jsx index 6100991b..a2fa29c7 100644 --- a/stemn-frontend-shared/src/misc/Autosuggest/Autosuggest.jsx +++ b/stemn-frontend-shared/src/misc/Autosuggest/Autosuggest.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Autosuggest from 'react-autosuggest' import Highlight from './Highlight' import LoadingLinear from 'stemn-shared/misc/Loading/LoadingLinear/LoadingLinear' diff --git a/stemn-frontend-shared/src/misc/Autosuggest/Highlight.jsx b/stemn-frontend-shared/src/misc/Autosuggest/Highlight.jsx index 71d65cd9..f518e507 100644 --- a/stemn-frontend-shared/src/misc/Autosuggest/Highlight.jsx +++ b/stemn-frontend-shared/src/misc/Autosuggest/Highlight.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import AutosuggestHighlight from 'autosuggest-highlight' export default class Highlight extends Component { diff --git a/stemn-frontend-shared/src/misc/Breadcrumbs/Breadcrumbs.jsx b/stemn-frontend-shared/src/misc/Breadcrumbs/Breadcrumbs.jsx index 9b4fa068..6fcd1611 100644 --- a/stemn-frontend-shared/src/misc/Breadcrumbs/Breadcrumbs.jsx +++ b/stemn-frontend-shared/src/misc/Breadcrumbs/Breadcrumbs.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './Breadcrumbs.css' diff --git a/stemn-frontend-shared/src/misc/Breadcrumbs/Crumb.jsx b/stemn-frontend-shared/src/misc/Breadcrumbs/Crumb.jsx index 9d4de8b7..7ba2bee6 100644 --- a/stemn-frontend-shared/src/misc/Breadcrumbs/Crumb.jsx +++ b/stemn-frontend-shared/src/misc/Breadcrumbs/Crumb.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './Crumb.scss' import { middle as middleConcat } from 'stemn-shared/utils/stringConcat' diff --git a/stemn-frontend-shared/src/misc/Calendar/Calendar.jsx b/stemn-frontend-shared/src/misc/Calendar/Calendar.jsx index 66865b2d..640a3e8f 100644 --- a/stemn-frontend-shared/src/misc/Calendar/Calendar.jsx +++ b/stemn-frontend-shared/src/misc/Calendar/Calendar.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import moment from 'moment' import createDateObjects from './createDateObjects' diff --git a/stemn-frontend-shared/src/misc/CodeSplitting/LoadSplitCode/LoadSplitCode.jsx b/stemn-frontend-shared/src/misc/CodeSplitting/LoadSplitCode/LoadSplitCode.jsx index 2cd78050..ecb5c80a 100644 --- a/stemn-frontend-shared/src/misc/CodeSplitting/LoadSplitCode/LoadSplitCode.jsx +++ b/stemn-frontend-shared/src/misc/CodeSplitting/LoadSplitCode/LoadSplitCode.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import LoadingOverlay from 'stemn-shared/misc/Loading/LoadingOverlay/LoadingOverlay.jsx' import { load } from 'stemn-shared/misc/LazyLoading/LazyLoading.utils' diff --git a/stemn-frontend-shared/src/misc/CodeSplitting/RouteLoading/RouteLoading.jsx b/stemn-frontend-shared/src/misc/CodeSplitting/RouteLoading/RouteLoading.jsx index 78a5f095..ea52cf03 100644 --- a/stemn-frontend-shared/src/misc/CodeSplitting/RouteLoading/RouteLoading.jsx +++ b/stemn-frontend-shared/src/misc/CodeSplitting/RouteLoading/RouteLoading.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import LoadingOverlay from 'stemn-shared/misc/Loading/LoadingOverlay/LoadingOverlay' export default class RouteLoading extends Component { diff --git a/stemn-frontend-shared/src/misc/DesktopReleases/DownloadButton/DownloadButton.js b/stemn-frontend-shared/src/misc/DesktopReleases/DownloadButton/DownloadButton.js index b64b3283..660aed63 100644 --- a/stemn-frontend-shared/src/misc/DesktopReleases/DownloadButton/DownloadButton.js +++ b/stemn-frontend-shared/src/misc/DesktopReleases/DownloadButton/DownloadButton.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Button from 'stemn-shared/misc/Buttons/Button/Button' import classNames from 'classnames' import classes from './DownloadButton.css' diff --git a/stemn-frontend-shared/src/misc/Editor/EditorDisplay.jsx b/stemn-frontend-shared/src/misc/Editor/EditorDisplay.jsx index 9dcf3237..2846ec08 100644 --- a/stemn-frontend-shared/src/misc/Editor/EditorDisplay.jsx +++ b/stemn-frontend-shared/src/misc/Editor/EditorDisplay.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import markdownIt from 'markdown-it' import pluginEmoji from 'markdown-it-emoji' import pluginKatex from 'markdown-it-katex' diff --git a/stemn-frontend-shared/src/misc/Editor/EditorMentions/EditorMentions.js b/stemn-frontend-shared/src/misc/Editor/EditorMentions/EditorMentions.js index fecd2835..8b2a44b8 100644 --- a/stemn-frontend-shared/src/misc/Editor/EditorMentions/EditorMentions.js +++ b/stemn-frontend-shared/src/misc/Editor/EditorMentions/EditorMentions.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './EditorMentions.css' import MentionPopover from 'stemn-shared/misc/Search/MentionPopover' import { getMentionInfo, parseMentions, getMentionString, mentionTypeFromWord, newMention } from 'stemn-shared/misc/Mentions/Mentions.utils' diff --git a/stemn-frontend-shared/src/misc/Editor/EditorNew/EditorNew.js b/stemn-frontend-shared/src/misc/Editor/EditorNew/EditorNew.js index 3f680cc3..3bda06e6 100644 --- a/stemn-frontend-shared/src/misc/Editor/EditorNew/EditorNew.js +++ b/stemn-frontend-shared/src/misc/Editor/EditorNew/EditorNew.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import CodeMirror from 'react-codemirror' import classes from './EditorNew.scss' import 'codemirror/mode/markdown/markdown' diff --git a/stemn-frontend-shared/src/misc/Editor/EditorToolbar/EditorToolbar.js b/stemn-frontend-shared/src/misc/Editor/EditorToolbar/EditorToolbar.js index 23b2067c..eb68af30 100644 --- a/stemn-frontend-shared/src/misc/Editor/EditorToolbar/EditorToolbar.js +++ b/stemn-frontend-shared/src/misc/Editor/EditorToolbar/EditorToolbar.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './EditorToolbar.css' import SimpleIconButton from 'stemn-shared/misc/Buttons/SimpleIconButton/SimpleIconButton' import MdFormatItalic from 'react-icons/md/format-italic' diff --git a/stemn-frontend-shared/src/misc/EntityRow/EntityRow.jsx b/stemn-frontend-shared/src/misc/EntityRow/EntityRow.jsx index 0ff12789..d4282eae 100644 --- a/stemn-frontend-shared/src/misc/EntityRow/EntityRow.jsx +++ b/stemn-frontend-shared/src/misc/EntityRow/EntityRow.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './EntityRow.css' import classNames from 'classnames' import Highlight from 'stemn-shared/misc/Autosuggest/Highlight' diff --git a/stemn-frontend-shared/src/misc/Fields/NewFieldModal/NewFieldModal.jsx b/stemn-frontend-shared/src/misc/Fields/NewFieldModal/NewFieldModal.jsx index b0a3f612..4acdc4b1 100644 --- a/stemn-frontend-shared/src/misc/Fields/NewFieldModal/NewFieldModal.jsx +++ b/stemn-frontend-shared/src/misc/Fields/NewFieldModal/NewFieldModal.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './NewFieldModal.css' import classNames from 'classnames' import Form from 'stemn-shared/misc/Forms/Form' diff --git a/stemn-frontend-shared/src/misc/FileCompare/FileCompare.jsx b/stemn-frontend-shared/src/misc/FileCompare/FileCompare.jsx index fc212d37..a0961065 100644 --- a/stemn-frontend-shared/src/misc/FileCompare/FileCompare.jsx +++ b/stemn-frontend-shared/src/misc/FileCompare/FileCompare.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './FileCompare.css' import { orderItemsByTime, isSelected } from 'stemn-shared/misc/FileCompare/FileCompare.utils.js' diff --git a/stemn-frontend-shared/src/misc/FileList/FileList.jsx b/stemn-frontend-shared/src/misc/FileList/FileList.jsx index 66cd4768..e7377bd8 100644 --- a/stemn-frontend-shared/src/misc/FileList/FileList.jsx +++ b/stemn-frontend-shared/src/misc/FileList/FileList.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { has, omit, orderBy, get } from 'lodash' import classNames from 'classnames' import classes from './FileList.css' @@ -35,15 +36,15 @@ const propTypesObject = { crumbClickFn: PropTypes.func, // When a crumb is clicked selected: PropTypes.object, // The currently selected file contentStyle: PropTypes.object, // Styles for the content section - initialSync: React.PropTypes.bool, // Optional: True if this is the initial project sync (general uses !project.remote.lastSynced) - crumbPopup: React.PropTypes.bool, // Optional: Should we show a popup on the crumbs? - search: React.PropTypes.bool, // Optional: Should search be enabled - link: React.PropTypes.bool, // Optional: Should each row be a link with href - options: React.PropTypes.shape({ - allowFolder: React.PropTypes.bool, - foldersOnly: React.PropTypes.bool, - showMenu: React.PropTypes.bool, - explore: React.PropTypes.string, // Optional: 'dropbox' || 'drive' - The provider + initialSync: PropTypes.bool, // Optional: True if this is the initial project sync (general uses !project.remote.lastSynced) + crumbPopup: PropTypes.bool, // Optional: Should we show a popup on the crumbs? + search: PropTypes.bool, // Optional: Should search be enabled + link: PropTypes.bool, // Optional: Should each row be a link with href + options: PropTypes.shape({ + allowFolder: PropTypes.bool, + foldersOnly: PropTypes.bool, + showMenu: PropTypes.bool, + explore: PropTypes.string, // Optional: 'dropbox' || 'drive' - The provider }), dispatch: PropTypes.func, // Actions fileList: PropTypes.object, // Store diff --git a/stemn-frontend-shared/src/misc/FileList/FileListPopup/FileListPopup.js b/stemn-frontend-shared/src/misc/FileList/FileListPopup/FileListPopup.js index ec931704..ebaa38d6 100644 --- a/stemn-frontend-shared/src/misc/FileList/FileListPopup/FileListPopup.js +++ b/stemn-frontend-shared/src/misc/FileList/FileListPopup/FileListPopup.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { orderBy, omit } from 'lodash' import classNames from 'classnames' import classes from './FileListPopup.css' diff --git a/stemn-frontend-shared/src/misc/FileList/FileSyncUnderway/FileSyncUnderway.jsx b/stemn-frontend-shared/src/misc/FileList/FileSyncUnderway/FileSyncUnderway.jsx index 58a3beec..177a9580 100644 --- a/stemn-frontend-shared/src/misc/FileList/FileSyncUnderway/FileSyncUnderway.jsx +++ b/stemn-frontend-shared/src/misc/FileList/FileSyncUnderway/FileSyncUnderway.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import FileSyncIcon from './FileSyncIcon' diff --git a/stemn-frontend-shared/src/misc/FileList/components/FileBreadCrumbs.jsx b/stemn-frontend-shared/src/misc/FileList/components/FileBreadCrumbs.jsx index 1ae1dd6d..56444bb4 100644 --- a/stemn-frontend-shared/src/misc/FileList/components/FileBreadCrumbs.jsx +++ b/stemn-frontend-shared/src/misc/FileList/components/FileBreadCrumbs.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './FileBreadCrumbs.css' import { middle as middleConcat } from 'stemn-shared/utils/stringConcat' diff --git a/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx b/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx index f22ef8be..4fd600ed 100644 --- a/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx +++ b/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx @@ -6,7 +6,8 @@ import { connect } from 'react-redux' import * as FileListActions from '../FileList.actions.js' // Component Core -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { orderBy, omit } from 'lodash' // Styles diff --git a/stemn-frontend-shared/src/misc/FileList/components/FileRow.jsx b/stemn-frontend-shared/src/misc/FileList/components/FileRow.jsx index 8179e60d..6efde70a 100644 --- a/stemn-frontend-shared/src/misc/FileList/components/FileRow.jsx +++ b/stemn-frontend-shared/src/misc/FileList/components/FileRow.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import moment from 'moment' import classNames from 'classnames' import classes from './FileRow.css' diff --git a/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx b/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx index b72e40db..83f7ee3a 100644 --- a/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx +++ b/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx @@ -1,5 +1,5 @@ -import React, { PropTypes } from 'react' - +import React from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './FileSelectModal.scss' @@ -15,10 +15,10 @@ const propTypesObject = { path: PropTypes.string, // The current fileId: This folder will be opened when the modal inits. model: PropTypes.string, // The { fileId, path } will be assigned to this model on confirm storeKey: PropTypes.string.isRequired, // The store key (to be used in the redicer) - options: React.PropTypes.shape({ - allowFolder: React.PropTypes.bool, - foldersOnly: React.PropTypes.bool, - explore: React.PropTypes.string, // Optional: 'dropbox' || 'drive' - The provider + options: PropTypes.shape({ + allowFolder: PropTypes.bool, + foldersOnly: PropTypes.bool, + explore: PropTypes.string, // Optional: 'dropbox' || 'drive' - The provider }), } diff --git a/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx b/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx index 71cdfa0a..4730e22d 100644 --- a/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx +++ b/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' diff --git a/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx b/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx index b5707fc3..0687dd00 100644 --- a/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx +++ b/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx @@ -1,5 +1,5 @@ -import React, { PropTypes } from 'react' - +import React from 'react' +import PropTypes from 'prop-types' import moment from 'moment' import { orderBy } from 'lodash' import { orderByTime } from 'stemn-shared/misc/Timeline/Timeline.utils' diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx index fc16687f..f371f883 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx @@ -1,5 +1,6 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import classes from './AssemblyParts.css' import { connect } from 'react-redux' import { orderBy } from 'lodash' diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx index 00a18c77..0f786db1 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx @@ -1,4 +1,4 @@ -import React, { PropTypes } from 'react' +import React from 'react' export default React.createClass({ render() { diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGoogle/PreviewGoogle.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGoogle/PreviewGoogle.jsx index 425e7b81..ec51407d 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGoogle/PreviewGoogle.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGoogle/PreviewGoogle.jsx @@ -1,4 +1,4 @@ -import React, { PropTypes } from 'react' +import React from 'react' import { getDownloadUrl } from '../../utils' export default React.createClass({ diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewImage/PreviewImage.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewImage/PreviewImage.jsx index 51cf0d79..5aeaa96c 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewImage/PreviewImage.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewImage/PreviewImage.jsx @@ -1,4 +1,4 @@ -import React, { PropTypes } from 'react' +import React from 'react' import { omit } from 'lodash' import styles from './PreviewImage.css' import LoadingOverlay from 'stemn-shared/misc/Loading/LoadingOverlay/LoadingOverlay.jsx' diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdf.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdf.jsx index f064b268..d03508b4 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdf.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdf.jsx @@ -1,7 +1,7 @@ import React from 'react' +import PropTypes from 'prop-types' import PDFJS from 'pdfjs-dist/build/pdf.combined.js' import { get } from 'lodash' - import Viewer from './PreviewPdfViewer.jsx' import classes from './PreviewPdf.css' import ScrollZoom from 'stemn-shared/misc/Scroll/ScrollZoom/ScrollZoom.jsx' @@ -76,8 +76,8 @@ const PDF = React.createClass({ PDF.propTypes = propTypesObject PDF.childContextTypes = { - pdf: React.PropTypes.object, - scale: React.PropTypes.number, + pdf: PropTypes.object, + scale: PropTypes.number, } export default PDF diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdfPage.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdfPage.jsx index abff2d07..23e17e79 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdfPage.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewPdf/PreviewPdfPage.jsx @@ -1,6 +1,6 @@ import React from 'react' +import PropTypes from 'prop-types' import classes from './PreviewPdf.css' - import PDFJS from 'pdfjs-dist' import PDFJSUtils from 'pdfjs-dist/web/pdf_viewer.js' import Waypoint from 'react-waypoint' @@ -130,7 +130,7 @@ const Page = React.createClass({ }) Page.propTypes = { - index: React.PropTypes.number.isRequired, + index: PropTypes.number.isRequired, } export default Page diff --git a/stemn-frontend-shared/src/misc/Files/Readme/DisplayReadme.jsx b/stemn-frontend-shared/src/misc/Files/Readme/DisplayReadme.jsx index 562abf5f..d8b20d69 100644 --- a/stemn-frontend-shared/src/misc/Files/Readme/DisplayReadme.jsx +++ b/stemn-frontend-shared/src/misc/Files/Readme/DisplayReadme.jsx @@ -1,7 +1,8 @@ import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import * as FilesActions from '../Files.actions.js' -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { omit } from 'lodash' import classNames from 'classnames' import LoadingOverlay from 'stemn-shared/misc/Loading/LoadingOverlay/LoadingOverlay.jsx' diff --git a/stemn-frontend-shared/src/misc/Files/Readme/Readme.jsx b/stemn-frontend-shared/src/misc/Files/Readme/Readme.jsx index 8ecb7fc5..9292d07f 100644 --- a/stemn-frontend-shared/src/misc/Files/Readme/Readme.jsx +++ b/stemn-frontend-shared/src/misc/Files/Readme/Readme.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import DisplayReadme from './DisplayReadme.jsx' import EditorDisplay from 'stemn-shared/misc/Editor/EditorDisplay.jsx' diff --git a/stemn-frontend-shared/src/misc/Forms/Form.jsx b/stemn-frontend-shared/src/misc/Forms/Form.jsx index a8c3d0f9..93098e38 100644 --- a/stemn-frontend-shared/src/misc/Forms/Form.jsx +++ b/stemn-frontend-shared/src/misc/Forms/Form.jsx @@ -6,7 +6,8 @@ This is useful for initialising a new form data section in the store. ************************************************* */ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' import { storeLoad } from 'stemn-shared/misc/Store/Store.actions' import { get } from 'lodash' diff --git a/stemn-frontend-shared/src/misc/Loading/LoadingAnimation/LoadingAnimation.jsx b/stemn-frontend-shared/src/misc/Loading/LoadingAnimation/LoadingAnimation.jsx index 8d3b57bb..b8e9d498 100644 --- a/stemn-frontend-shared/src/misc/Loading/LoadingAnimation/LoadingAnimation.jsx +++ b/stemn-frontend-shared/src/misc/Loading/LoadingAnimation/LoadingAnimation.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './LoadingAnimation.css' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Loading/LoadingOverlay/LoadingOverlay.jsx b/stemn-frontend-shared/src/misc/Loading/LoadingOverlay/LoadingOverlay.jsx index 68866969..07c07c7c 100644 --- a/stemn-frontend-shared/src/misc/Loading/LoadingOverlay/LoadingOverlay.jsx +++ b/stemn-frontend-shared/src/misc/Loading/LoadingOverlay/LoadingOverlay.jsx @@ -1,5 +1,5 @@ import React, { PropTypes, Component } from 'react' -import ReactCSSTransitionGroup from 'react-addons-css-transition-group' +import ReactCSSTransitionGroup from 'react-transition-group' // Components import LoadingSpinner from 'stemn-shared/misc/Loading/LoadingSpinner/LoadingSpinner' diff --git a/stemn-frontend-shared/src/misc/Loading/LoadingPlaceholder/LoadingPlaceholder.jsx b/stemn-frontend-shared/src/misc/Loading/LoadingPlaceholder/LoadingPlaceholder.jsx index 9b1b8bc6..a74b9c08 100644 --- a/stemn-frontend-shared/src/misc/Loading/LoadingPlaceholder/LoadingPlaceholder.jsx +++ b/stemn-frontend-shared/src/misc/Loading/LoadingPlaceholder/LoadingPlaceholder.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './LoadingPlaceholder.css' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Mentions/MentionFromString/MentionFromString.js b/stemn-frontend-shared/src/misc/Mentions/MentionFromString/MentionFromString.js index 7180bc95..ffba0f0b 100644 --- a/stemn-frontend-shared/src/misc/Mentions/MentionFromString/MentionFromString.js +++ b/stemn-frontend-shared/src/misc/Mentions/MentionFromString/MentionFromString.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Link from 'stemn-shared/misc/Router/Link' import { getMentionInfo } from 'stemn-shared/misc/Mentions/Mentions.utils' diff --git a/stemn-frontend-shared/src/misc/Modal/ModalContainer.jsx b/stemn-frontend-shared/src/misc/Modal/ModalContainer.jsx index 5ff12b62..9a602a24 100644 --- a/stemn-frontend-shared/src/misc/Modal/ModalContainer.jsx +++ b/stemn-frontend-shared/src/misc/Modal/ModalContainer.jsx @@ -1,5 +1,6 @@ import { connect } from 'react-redux' -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import Modal from './Modal.jsx' const propTypesObject = { diff --git a/stemn-frontend-shared/src/misc/Notifications/NotificationItem/NotificationItem.js b/stemn-frontend-shared/src/misc/Notifications/NotificationItem/NotificationItem.js index a43f5304..28e31b04 100644 --- a/stemn-frontend-shared/src/misc/Notifications/NotificationItem/NotificationItem.js +++ b/stemn-frontend-shared/src/misc/Notifications/NotificationItem/NotificationItem.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './NotificationItem.css' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Notifications/NotificationLink/NotificationLink.jsx b/stemn-frontend-shared/src/misc/Notifications/NotificationLink/NotificationLink.jsx index a6befdbf..696854d9 100644 --- a/stemn-frontend-shared/src/misc/Notifications/NotificationLink/NotificationLink.jsx +++ b/stemn-frontend-shared/src/misc/Notifications/NotificationLink/NotificationLink.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import Link from 'stemn-shared/misc/Router/Link' const entityToRouteMap = { diff --git a/stemn-frontend-shared/src/misc/Pagination/Pagination.jsx b/stemn-frontend-shared/src/misc/Pagination/Pagination.jsx index b663e66c..801568bd 100644 --- a/stemn-frontend-shared/src/misc/Pagination/Pagination.jsx +++ b/stemn-frontend-shared/src/misc/Pagination/Pagination.jsx @@ -1,8 +1,7 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' - import classes from './Pagination.css' - import MdChevronRight from 'react-icons/md/chevron-right' import MdChevronLeft from 'react-icons/md/chevron-left' import { Link } from 'react-router' diff --git a/stemn-frontend-shared/src/misc/Panels/PanelDescription/PanelDescription.jsx b/stemn-frontend-shared/src/misc/Panels/PanelDescription/PanelDescription.jsx index 214ea7e6..02e915b9 100644 --- a/stemn-frontend-shared/src/misc/Panels/PanelDescription/PanelDescription.jsx +++ b/stemn-frontend-shared/src/misc/Panels/PanelDescription/PanelDescription.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Container, Row, Col } from 'stemn-shared/misc/Layout' export default class PanelDescription extends Component { diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/CloudSettings/index.js b/stemn-frontend-shared/src/misc/ProjectSettings/CloudSettings/index.js index 4d2aa00c..ac74fad0 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/CloudSettings/index.js +++ b/stemn-frontend-shared/src/misc/ProjectSettings/CloudSettings/index.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { has } from 'lodash' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import FileSelectInput from 'stemn-shared/misc/FileSelectInput/FileSelectInput.jsx' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/DeleteSettings/index.js b/stemn-frontend-shared/src/misc/ProjectSettings/DeleteSettings/index.js index 9abdcfbb..6f68b79d 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/DeleteSettings/index.js +++ b/stemn-frontend-shared/src/misc/ProjectSettings/DeleteSettings/index.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' export default class GeneralSettings extends Component { diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/GeneralSettings/index.js b/stemn-frontend-shared/src/misc/ProjectSettings/GeneralSettings/index.js index 689ec1d1..f0b7b4e1 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/GeneralSettings/index.js +++ b/stemn-frontend-shared/src/misc/ProjectSettings/GeneralSettings/index.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { has } from 'lodash' import Textarea from 'stemn-shared/misc/Input/Textarea/Textarea' import Input from 'stemn-shared/misc/Input/Input/Input' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/LicenseSettings/LicenseSettings.jsx b/stemn-frontend-shared/src/misc/ProjectSettings/LicenseSettings/LicenseSettings.jsx index 369233e4..d600f772 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/LicenseSettings/LicenseSettings.jsx +++ b/stemn-frontend-shared/src/misc/ProjectSettings/LicenseSettings/LicenseSettings.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import PopoverDropdown from 'stemn-shared/misc/PopoverMenu/PopoverDropdown' import { licenseData } from 'stemn-shared/misc/Licenses/Licenses.data' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/OrganisationSettings/index.js b/stemn-frontend-shared/src/misc/ProjectSettings/OrganisationSettings/index.js index dc2a627b..3aedf6c1 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/OrganisationSettings/index.js +++ b/stemn-frontend-shared/src/misc/ProjectSettings/OrganisationSettings/index.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import TagEdit from 'stemn-shared/misc/Tags/TagEdit' import OrganisationSearch from 'stemn-shared/misc/Search/OrganisationSearch' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/PermissionsSettings/PermissionsSettings.jsx b/stemn-frontend-shared/src/misc/ProjectSettings/PermissionsSettings/PermissionsSettings.jsx index d7104f11..fccdf6bf 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/PermissionsSettings/PermissionsSettings.jsx +++ b/stemn-frontend-shared/src/misc/ProjectSettings/PermissionsSettings/PermissionsSettings.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { get } from 'lodash' import ProjectPermissionsRadio from 'stemn-shared/misc/Project/ProjectPermissionsRadio/ProjectPermissionsRadio' import LicenseSettings from 'stemn-shared/misc/ProjectSettings/LicenseSettings' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/TagSettings/index.js b/stemn-frontend-shared/src/misc/ProjectSettings/TagSettings/index.js index f92cef38..7df04ce2 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/TagSettings/index.js +++ b/stemn-frontend-shared/src/misc/ProjectSettings/TagSettings/index.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import TagEdit from 'stemn-shared/misc/Tags/TagEdit' import FieldSearch from 'stemn-shared/misc/Search/FieldSearch' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/TeamSettings/TeamSettings.jsx b/stemn-frontend-shared/src/misc/ProjectSettings/TeamSettings/TeamSettings.jsx index 38456057..d314657c 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/TeamSettings/TeamSettings.jsx +++ b/stemn-frontend-shared/src/misc/ProjectSettings/TeamSettings/TeamSettings.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import TeamMember from 'stemn-shared/misc/Project/TeamMember/TeamMember.jsx' import UserSearch from 'stemn-shared/misc/Search/UserSearch' diff --git a/stemn-frontend-shared/src/misc/ProjectSettings/ThreadsSettings/ThreadsSettings.jsx b/stemn-frontend-shared/src/misc/ProjectSettings/ThreadsSettings/ThreadsSettings.jsx index 241c272b..b72c3155 100644 --- a/stemn-frontend-shared/src/misc/ProjectSettings/ThreadsSettings/ThreadsSettings.jsx +++ b/stemn-frontend-shared/src/misc/ProjectSettings/ThreadsSettings/ThreadsSettings.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import ThreadLabelsEdit from 'stemn-shared/misc/Threads/ThreadLabelsEdit/ThreadLabelsEdit.jsx' import ThreadGroupsEdit from 'stemn-shared/misc/Threads/ThreadGroupsEdit' diff --git a/stemn-frontend-shared/src/misc/Projects/MyProjectsPanel/MyProjectsPanel.jsx b/stemn-frontend-shared/src/misc/Projects/MyProjectsPanel/MyProjectsPanel.jsx index 20b40d50..57a6c969 100644 --- a/stemn-frontend-shared/src/misc/Projects/MyProjectsPanel/MyProjectsPanel.jsx +++ b/stemn-frontend-shared/src/misc/Projects/MyProjectsPanel/MyProjectsPanel.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import PublicPrivateIcon from 'stemn-shared/misc/Icons/PublicPrivateIcon' import classes from './MyProjectsPanel.scss' diff --git a/stemn-frontend-shared/src/misc/Projects/ProjectRow/ProjectRow.jsx b/stemn-frontend-shared/src/misc/Projects/ProjectRow/ProjectRow.jsx index 1a54daba..0db54ff9 100644 --- a/stemn-frontend-shared/src/misc/Projects/ProjectRow/ProjectRow.jsx +++ b/stemn-frontend-shared/src/misc/Projects/ProjectRow/ProjectRow.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './ProjectRow.css' import classNames from 'classnames' import moment from 'moment' diff --git a/stemn-frontend-shared/src/misc/RelatedFields/RelatedList/RelatedList.jsx b/stemn-frontend-shared/src/misc/RelatedFields/RelatedList/RelatedList.jsx index 2443c571..5476cdbe 100644 --- a/stemn-frontend-shared/src/misc/RelatedFields/RelatedList/RelatedList.jsx +++ b/stemn-frontend-shared/src/misc/RelatedFields/RelatedList/RelatedList.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Tag from 'stemn-shared/misc/Tags/Tag' import Link from 'stemn-shared/misc/Router/Link' diff --git a/stemn-frontend-shared/src/misc/Router/Link/Link.js b/stemn-frontend-shared/src/misc/Router/Link/Link.js index 111ccf39..2dfebc9e 100644 --- a/stemn-frontend-shared/src/misc/Router/Link/Link.js +++ b/stemn-frontend-shared/src/misc/Router/Link/Link.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import { Link } from 'react-router' diff --git a/stemn-frontend-shared/src/misc/Scroll/ScrollZoom/ScrollZoom.jsx b/stemn-frontend-shared/src/misc/Scroll/ScrollZoom/ScrollZoom.jsx index 1823f6b8..4ed37c9e 100644 --- a/stemn-frontend-shared/src/misc/Scroll/ScrollZoom/ScrollZoom.jsx +++ b/stemn-frontend-shared/src/misc/Scroll/ScrollZoom/ScrollZoom.jsx @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { omit } from 'lodash' const propTypesObject = { diff --git a/stemn-frontend-shared/src/misc/Search/FieldSearch/FieldSearch.jsx b/stemn-frontend-shared/src/misc/Search/FieldSearch/FieldSearch.jsx index 43eaa7e2..a4eb7679 100644 --- a/stemn-frontend-shared/src/misc/Search/FieldSearch/FieldSearch.jsx +++ b/stemn-frontend-shared/src/misc/Search/FieldSearch/FieldSearch.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './FieldSearch.css' import Autosuggest from 'stemn-shared/misc/Autosuggest/Autosuggest.container' import Highlight from 'stemn-shared/misc/Autosuggest/Highlight' diff --git a/stemn-frontend-shared/src/misc/Search/LocationSearch/LocationSearch.jsx b/stemn-frontend-shared/src/misc/Search/LocationSearch/LocationSearch.jsx index 5ecc96e1..3f115f0e 100644 --- a/stemn-frontend-shared/src/misc/Search/LocationSearch/LocationSearch.jsx +++ b/stemn-frontend-shared/src/misc/Search/LocationSearch/LocationSearch.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' import { storeChange } from 'stemn-shared/misc/Store/Store.actions' import classes from './LocationSearch.css' diff --git a/stemn-frontend-shared/src/misc/Search/MentionPopover/MentionPopover.jsx b/stemn-frontend-shared/src/misc/Search/MentionPopover/MentionPopover.jsx index 7e1963af..938cbaab 100644 --- a/stemn-frontend-shared/src/misc/Search/MentionPopover/MentionPopover.jsx +++ b/stemn-frontend-shared/src/misc/Search/MentionPopover/MentionPopover.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './MentionPopover.css' import Popover from 'stemn-shared/misc/Popover' import Highlight from 'stemn-shared/misc/Autosuggest/Highlight' diff --git a/stemn-frontend-shared/src/misc/Search/OrganisationSearch/OrganisationSearch.jsx b/stemn-frontend-shared/src/misc/Search/OrganisationSearch/OrganisationSearch.jsx index 15cff274..30d7c62d 100644 --- a/stemn-frontend-shared/src/misc/Search/OrganisationSearch/OrganisationSearch.jsx +++ b/stemn-frontend-shared/src/misc/Search/OrganisationSearch/OrganisationSearch.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './OrganisationSearch.css' import Autosuggest from 'stemn-shared/misc/Autosuggest/Autosuggest.container' diff --git a/stemn-frontend-shared/src/misc/Search/SearchInput/SearchInputAlt.jsx b/stemn-frontend-shared/src/misc/Search/SearchInput/SearchInputAlt.jsx index 7570aadd..c8971e66 100644 --- a/stemn-frontend-shared/src/misc/Search/SearchInput/SearchInputAlt.jsx +++ b/stemn-frontend-shared/src/misc/Search/SearchInput/SearchInputAlt.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import CodeMirror from 'react-codemirror' import classes from './SearchInput.css' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Search/SiteSearch/SiteSearch.js b/stemn-frontend-shared/src/misc/Search/SiteSearch/SiteSearch.js index 1517b21e..eff1ac9c 100644 --- a/stemn-frontend-shared/src/misc/Search/SiteSearch/SiteSearch.js +++ b/stemn-frontend-shared/src/misc/Search/SiteSearch/SiteSearch.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './SiteSearch.css' import classNames from 'classnames' import MdSearch from 'react-icons/md/search' diff --git a/stemn-frontend-shared/src/misc/Search/SiteSearchResults/SiteSearchResults.jsx b/stemn-frontend-shared/src/misc/Search/SiteSearchResults/SiteSearchResults.jsx index af92ac71..091a5ad9 100644 --- a/stemn-frontend-shared/src/misc/Search/SiteSearchResults/SiteSearchResults.jsx +++ b/stemn-frontend-shared/src/misc/Search/SiteSearchResults/SiteSearchResults.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { get } from 'lodash' import classes from './SiteSearchResults.css' import EntityRow from 'stemn-shared/misc/EntityRow' diff --git a/stemn-frontend-shared/src/misc/Search/UserSearch/UserSearch.jsx b/stemn-frontend-shared/src/misc/Search/UserSearch/UserSearch.jsx index 1b6e65c3..eb4a5ac4 100644 --- a/stemn-frontend-shared/src/misc/Search/UserSearch/UserSearch.jsx +++ b/stemn-frontend-shared/src/misc/Search/UserSearch/UserSearch.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './UserSearch.css' import Autosuggest from 'stemn-shared/misc/Autosuggest/Autosuggest.container' diff --git a/stemn-frontend-shared/src/misc/Social/SocialButton/SocialButton.jsx b/stemn-frontend-shared/src/misc/Social/SocialButton/SocialButton.jsx index 2282334b..05a0f185 100644 --- a/stemn-frontend-shared/src/misc/Social/SocialButton/SocialButton.jsx +++ b/stemn-frontend-shared/src/misc/Social/SocialButton/SocialButton.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classNames from 'classnames' import classes from './SocialButton.css' diff --git a/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItem.jsx b/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItem.jsx index 8f0b82d8..e53a601e 100644 --- a/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItem.jsx +++ b/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItem.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import moment from 'moment' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItemText.jsx b/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItemText.jsx index 8c0a4751..00548142 100644 --- a/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItemText.jsx +++ b/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineItem/TimelineItemText.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Link from 'stemn-shared/misc/Router/Link' import ThreadLabelDots from 'stemn-shared/misc/Threads/ThreadLabelDots/ThreadLabelDots.jsx' import UserNameFromId from 'stemn-shared/misc/Users/UserNameFromId' diff --git a/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineVertical.jsx b/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineVertical.jsx index 001922aa..43f49d11 100644 --- a/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineVertical.jsx +++ b/stemn-frontend-shared/src/misc/SyncTimeline/TimelineVertical/TimelineVertical.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import moment from 'moment' import { sum, get, groupBy, orderBy } from 'lodash' import TimelineItem from './TimelineItem/TimelineItem' diff --git a/stemn-frontend-shared/src/misc/Tabs/ArrowTabs/ArrowTabs.jsx b/stemn-frontend-shared/src/misc/Tabs/ArrowTabs/ArrowTabs.jsx index 0762bbfa..5fa8229d 100644 --- a/stemn-frontend-shared/src/misc/Tabs/ArrowTabs/ArrowTabs.jsx +++ b/stemn-frontend-shared/src/misc/Tabs/ArrowTabs/ArrowTabs.jsx @@ -1,5 +1,6 @@ // Component Core -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { omit } from 'lodash' // Styles diff --git a/stemn-frontend-shared/src/misc/Threads/GroupSelect/GroupSelect.jsx b/stemn-frontend-shared/src/misc/Threads/GroupSelect/GroupSelect.jsx index 20f2ce88..86649c21 100644 --- a/stemn-frontend-shared/src/misc/Threads/GroupSelect/GroupSelect.jsx +++ b/stemn-frontend-shared/src/misc/Threads/GroupSelect/GroupSelect.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { connect } from 'react-redux' import { storeRemove, storePush } from 'stemn-shared/misc/Store/Store.actions' diff --git a/stemn-frontend-shared/src/misc/Threads/LabelDisplay/LabelDisplay.jsx b/stemn-frontend-shared/src/misc/Threads/LabelDisplay/LabelDisplay.jsx index 29d707d9..a77aa62f 100644 --- a/stemn-frontend-shared/src/misc/Threads/LabelDisplay/LabelDisplay.jsx +++ b/stemn-frontend-shared/src/misc/Threads/LabelDisplay/LabelDisplay.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './LabelDisplay.css' import classNames from 'classnames' import Link from 'stemn-shared/misc/Router/Link' diff --git a/stemn-frontend-shared/src/misc/Threads/LabelSelect/LabelSelect.jsx b/stemn-frontend-shared/src/misc/Threads/LabelSelect/LabelSelect.jsx index 557625b9..252281b5 100644 --- a/stemn-frontend-shared/src/misc/Threads/LabelSelect/LabelSelect.jsx +++ b/stemn-frontend-shared/src/misc/Threads/LabelSelect/LabelSelect.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { connect } from 'react-redux' import { storeRemove, storePush } from 'stemn-shared/misc/Store/Store.actions' diff --git a/stemn-frontend-shared/src/misc/Threads/NewThreadModal/NewThreadModal.jsx b/stemn-frontend-shared/src/misc/Threads/NewThreadModal/NewThreadModal.jsx index ce93f5a6..2886e2eb 100644 --- a/stemn-frontend-shared/src/misc/Threads/NewThreadModal/NewThreadModal.jsx +++ b/stemn-frontend-shared/src/misc/Threads/NewThreadModal/NewThreadModal.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { get } from 'lodash' import classes from './NewThreadModal.scss' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterMenu/ThreadFilterMenu.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterMenu/ThreadFilterMenu.jsx index f080ec07..0062fe6b 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterMenu/ThreadFilterMenu.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterMenu/ThreadFilterMenu.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' const Item = ({ setFilter, objKey, value, filterObject, children }) => ( diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterStatus/ThreadFilterStatus.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterStatus/ThreadFilterStatus.jsx index f73c797a..c33c08dc 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterStatus/ThreadFilterStatus.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterStatus/ThreadFilterStatus.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import { get } from 'lodash' diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterUser/ThreadFilterUser.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterUser/ThreadFilterUser.jsx index e7e4455d..0b7367c7 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterUser/ThreadFilterUser.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadFilters/ThreadFilterUser/ThreadFilterUser.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import { get } from 'lodash' diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadGroupsEdit/ThreadGroupsEdit.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadGroupsEdit/ThreadGroupsEdit.jsx index 8283dcad..baff1d9b 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadGroupsEdit/ThreadGroupsEdit.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadGroupsEdit/ThreadGroupsEdit.jsx @@ -1,5 +1,6 @@ // Component Core -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' import getUuid from 'stemn-shared/utils/getUuid.js' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/DragLayer.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/DragLayer.jsx index 5e6bbfc3..005880a4 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/DragLayer.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/DragLayer.jsx @@ -1,6 +1,7 @@ import React from 'react' +import PropTypes from 'prop-types' import { DragLayer } from 'react-dnd' - +import PropTypes from 'prop-types' import ThreadGroup from './ThreadGroup.jsx' import ThreadListItem from '../ThreadListItem/ThreadListItem.jsx' @@ -41,13 +42,13 @@ function collect(monitor) { const CustomDragLayer = React.createClass({ propTypes: { - item: React.PropTypes.object, - itemType: React.PropTypes.string, - currentOffset: React.PropTypes.shape({ - x: React.PropTypes.number.isRequired, - y: React.PropTypes.number.isRequired, + item: PropTypes.object, + itemType: PropTypes.string, + currentOffset: PropTypes.shape({ + x: PropTypes.number.isRequired, + y: PropTypes.number.isRequired, }), - isDragging: React.PropTypes.bool.isRequired, + isDragging: PropTypes.bool.isRequired, }, renderItem(type, item) { diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/ThreadGroupWrapped.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/ThreadGroupWrapped.jsx index a4d2dc23..455d94a6 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/ThreadGroupWrapped.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadGroup/ThreadGroupWrapped.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { DragSource, DropTarget } from 'react-dnd' import { findDOMNode } from 'react-dom' diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/EmptyWrapped.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/EmptyWrapped.jsx index c670886a..98e3354a 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/EmptyWrapped.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/EmptyWrapped.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './EmptyWrapped.css' import { emptyHover } from './ThreadListItem.drag.config.js' diff --git a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/ThreadListItemWrapped.jsx b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/ThreadListItemWrapped.jsx index a5978422..6e28e820 100644 --- a/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/ThreadListItemWrapped.jsx +++ b/stemn-frontend-shared/src/misc/Threads/ThreadList/ThreadListItem/ThreadListItemWrapped.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { cardHover, cardDrop, beginDrag, endDrag } from './ThreadListItem.drag.config.js' import { DragSource, DropTarget } from 'react-dnd' const ItemTypes = { diff --git a/stemn-frontend-shared/src/misc/Timeline/Timeline.jsx b/stemn-frontend-shared/src/misc/Timeline/Timeline.jsx index ac2e200f..14910803 100644 --- a/stemn-frontend-shared/src/misc/Timeline/Timeline.jsx +++ b/stemn-frontend-shared/src/misc/Timeline/Timeline.jsx @@ -1,5 +1,6 @@ // Component Core -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' // Styles import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Toasts/Toasts.jsx b/stemn-frontend-shared/src/misc/Toasts/Toasts.jsx index 34a51c26..a6ad98c6 100644 --- a/stemn-frontend-shared/src/misc/Toasts/Toasts.jsx +++ b/stemn-frontend-shared/src/misc/Toasts/Toasts.jsx @@ -1,5 +1,5 @@ import { connect } from 'react-redux' -import ReactCSSTransitionGroup from 'react-addons-css-transition-group' +import ReactCSSTransitionGroup from 'react-transition-group' import * as ToastsActions from './Toasts.actions.js' import React from 'react' import MdError from 'react-icons/md/error' diff --git a/stemn-frontend-shared/src/misc/TogglePanel/TogglePanel.jsx b/stemn-frontend-shared/src/misc/TogglePanel/TogglePanel.jsx index 42951290..3dacb75f 100644 --- a/stemn-frontend-shared/src/misc/TogglePanel/TogglePanel.jsx +++ b/stemn-frontend-shared/src/misc/TogglePanel/TogglePanel.jsx @@ -9,7 +9,8 @@ ************************************************************* */ -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' import classNames from 'classnames' diff --git a/stemn-frontend-shared/src/misc/Upload/Upload/Upload.container.js b/stemn-frontend-shared/src/misc/Upload/Upload/Upload.container.js index b4b0cee5..467d2d3a 100644 --- a/stemn-frontend-shared/src/misc/Upload/Upload/Upload.container.js +++ b/stemn-frontend-shared/src/misc/Upload/Upload/Upload.container.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { connect } from 'react-redux' import { upload } from '../Upload.actions.js' import { storeChange } from 'stemn-shared/misc/Store/Store.actions' diff --git a/stemn-frontend-shared/src/misc/Upload/Upload/Upload.js b/stemn-frontend-shared/src/misc/Upload/Upload/Upload.js index 575af287..c44f364d 100644 --- a/stemn-frontend-shared/src/misc/Upload/Upload/Upload.js +++ b/stemn-frontend-shared/src/misc/Upload/Upload/Upload.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './Upload.css' import Dropzone from 'react-dropzone' diff --git a/stemn-frontend-shared/src/misc/Upload/UploadModal/UploadModal.jsx b/stemn-frontend-shared/src/misc/Upload/UploadModal/UploadModal.jsx index fc1c0c1d..f7875a31 100644 --- a/stemn-frontend-shared/src/misc/Upload/UploadModal/UploadModal.jsx +++ b/stemn-frontend-shared/src/misc/Upload/UploadModal/UploadModal.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './UploadModal.css' import classNames from 'classnames' import Button from 'stemn-shared/misc/Buttons/Button/Button' diff --git a/stemn-frontend-shared/src/misc/UserSettings/EmailAndNotificationToggles/EmailAndNotificationToggles.jsx b/stemn-frontend-shared/src/misc/UserSettings/EmailAndNotificationToggles/EmailAndNotificationToggles.jsx index bfef9123..cade7761 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/EmailAndNotificationToggles/EmailAndNotificationToggles.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/EmailAndNotificationToggles/EmailAndNotificationToggles.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { getToggleData, emailToggles, websiteToggles } from './EmailAndNotificationToggles.utils' import Toggle from 'stemn-shared/misc/Input/Toggle/Toggle' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserBetaSettings/UserBetaSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserBetaSettings/UserBetaSettings.jsx index 3214a8c2..f4fc5625 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserBetaSettings/UserBetaSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserBetaSettings/UserBetaSettings.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import TextDisplayBox from 'stemn-shared/misc/TextDisplayBox/TextDisplayBox.jsx' export default class UserBetaSettings extends Component { diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserCloudProviderSettings/UserCloudProviderSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserCloudProviderSettings/UserCloudProviderSettings.jsx index 7f164078..bc574e75 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserCloudProviderSettings/UserCloudProviderSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserCloudProviderSettings/UserCloudProviderSettings.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Input from 'stemn-shared/misc/Input/Input/Input' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import LinkAccount from 'stemn-shared/misc/Settings/LinkAccount/LinkAccount' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserEmailSettings/UserEmailSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserEmailSettings/UserEmailSettings.jsx index 18ec73a2..97918ffc 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserEmailSettings/UserEmailSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserEmailSettings/UserEmailSettings.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Input from 'stemn-shared/misc/Input/Input/Input' import Form from 'stemn-shared/misc/Forms/Form' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserExperienceSettings/UserExperienceSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserExperienceSettings/UserExperienceSettings.jsx index df2b0426..bb59c3b2 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserExperienceSettings/UserExperienceSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserExperienceSettings/UserExperienceSettings.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { connect } from 'react-redux' import { storePush, storeRemove } from 'stemn-shared/misc/Store/Store.actions' import { range } from 'lodash' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserLinkedAccountSettings/UserLinkedAccountSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserLinkedAccountSettings/UserLinkedAccountSettings.jsx index a7202dbb..3935e671 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserLinkedAccountSettings/UserLinkedAccountSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserLinkedAccountSettings/UserLinkedAccountSettings.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Input from 'stemn-shared/misc/Input/Input/Input' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' import LinkAccount from 'stemn-shared/misc/Settings/LinkAccount/LinkAccount' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserNameSettings/UserNameSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserNameSettings/UserNameSettings.jsx index 424f5516..01a106f8 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserNameSettings/UserNameSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserNameSettings/UserNameSettings.jsx @@ -1,5 +1,4 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' import Input from 'stemn-shared/misc/Input/Input/Input' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserPasswordSettings/UserPasswordSettings.jsx b/stemn-frontend-shared/src/misc/UserSettings/UserPasswordSettings/UserPasswordSettings.jsx index ed2400dd..a9dddced 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserPasswordSettings/UserPasswordSettings.jsx +++ b/stemn-frontend-shared/src/misc/UserSettings/UserPasswordSettings/UserPasswordSettings.jsx @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Input from 'stemn-shared/misc/Input/Input/Input' import Form from 'stemn-shared/misc/Forms/Form' import ProgressButton from 'stemn-shared/misc/Buttons/ProgressButton/ProgressButton' diff --git a/stemn-frontend-shared/src/misc/UserSettings/UserProfileSettings/UserProfileSettings.js b/stemn-frontend-shared/src/misc/UserSettings/UserProfileSettings/UserProfileSettings.js index 34b784b9..6fa03b2e 100644 --- a/stemn-frontend-shared/src/misc/UserSettings/UserProfileSettings/UserProfileSettings.js +++ b/stemn-frontend-shared/src/misc/UserSettings/UserProfileSettings/UserProfileSettings.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classNames from 'classnames' import classes from './UserProfileSettings.css' import Input from 'stemn-shared/misc/Input/Input/Input' diff --git a/stemn-frontend-shared/src/misc/Walkthrough/Walkthrough.jsx b/stemn-frontend-shared/src/misc/Walkthrough/Walkthrough.jsx index 4c038ea1..9d12bce9 100644 --- a/stemn-frontend-shared/src/misc/Walkthrough/Walkthrough.jsx +++ b/stemn-frontend-shared/src/misc/Walkthrough/Walkthrough.jsx @@ -6,7 +6,8 @@ import { connect } from 'react-redux' import * as WalkthroughActions from './Walkthrough.actions.js' // Component Core -import React, { PropTypes } from 'react' +import React from 'react' +import PropTypes from 'prop-types' import { omit } from 'lodash' import { getStepData } from './Walkthrough.config.js' diff --git a/stemn-frontend-website/package-lock.json b/stemn-frontend-website/package-lock.json index 8cc723af..ada0c948 100644 --- a/stemn-frontend-website/package-lock.json +++ b/stemn-frontend-website/package-lock.json @@ -9839,12 +9839,12 @@ } }, "prop-types": { - "version": "15.5.10", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", - "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", "requires": { - "fbjs": "0.8.14", - "loose-envify": "1.3.1" + "loose-envify": "1.3.1", + "object-assign": "4.1.1" } }, "proxy-addr": { @@ -10019,20 +10019,51 @@ "dev": true }, "react": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-15.3.1.tgz", - "integrity": "sha1-94UB7YwuxubjHDIjZS6X8TadK9Y=", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.4.1.tgz", + "integrity": "sha512-3GEs0giKp6E0Oh/Y9ZC60CmYgUPnp7voH9fbjWsvXtYFb4EWtgQub0ADSq0sJR0BbHc4FThLLtzlcFaFXIorwg==", "requires": { - "fbjs": "0.8.14", + "fbjs": "0.8.17", "loose-envify": "1.3.1", - "object-assign": "4.1.1" + "object-assign": "4.1.1", + "prop-types": "15.6.2" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.18" + } + }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "requires": { + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, + "ua-parser-js": { + "version": "0.7.18", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", + "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" + } } }, - "react-addons-css-transition-group": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/react-addons-css-transition-group/-/react-addons-css-transition-group-15.3.1.tgz", - "integrity": "sha1-uC7lRF65YnSsCiWtZeXWeqCKmtg=" - }, "react-addons-test-utils": { "version": "15.3.1", "resolved": "https://registry.npmjs.org/react-addons-test-utils/-/react-addons-test-utils-15.3.1.tgz", @@ -10044,7 +10075,7 @@ "resolved": "https://registry.npmjs.org/react-addons-transition-group/-/react-addons-transition-group-15.6.0.tgz", "integrity": "sha1-DyILn5WX2zqAqI29b+gF/GRM4hw=", "requires": { - "react-transition-group": "1.2.0" + "react-transition-group": "1.2.1" } }, "react-autosuggest": { @@ -10134,7 +10165,7 @@ "dev": true, "requires": { "lodash.debounce": "3.1.1", - "prop-types": "15.5.10" + "prop-types": "15.6.2" }, "dependencies": { "lodash.debounce": { @@ -10149,9 +10180,50 @@ } }, "react-dom": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.3.1.tgz", - "integrity": "sha1-bULNK2TIxeC2k/P/rsMB5uYn4k4=" + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.4.1.tgz", + "integrity": "sha512-1Gin+wghF/7gl4Cqcvr1DxFX2Osz7ugxSwl6gBqCMpdrxHjIFUS7GYxrFftZ9Ln44FHw0JxCFD9YtZsrbR5/4A==", + "requires": { + "fbjs": "0.8.17", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.6.2" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.18" + } + }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "requires": { + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, + "ua-parser-js": { + "version": "0.7.18", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", + "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" + } + } }, "react-dropzone": { "version": "3.5.3", @@ -10196,7 +10268,7 @@ "requires": { "error-stack-parser": "1.3.6", "object-assign": "4.1.1", - "prop-types": "15.5.10", + "prop-types": "15.6.2", "sourcemapped-stacktrace": "1.1.7" } }, @@ -10229,7 +10301,7 @@ "integrity": "sha1-y8RQctQITdxXgG2447NOZEuDZqw=", "requires": { "create-react-class": "15.6.0", - "prop-types": "15.5.10" + "prop-types": "15.6.2" } }, "react-json-tree": { @@ -10299,7 +10371,7 @@ "css-vendor": "0.3.8", "debug": "2.6.8", "lodash.throttle": "3.0.4", - "prop-types": "15.5.10" + "prop-types": "15.6.2" }, "dependencies": { "lodash.debounce": { @@ -10439,14 +10511,14 @@ } }, "react-transition-group": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.0.tgz", - "integrity": "sha1-tR/JIbDDg1p+98Vxx5/ILHPpIE8=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz", + "integrity": "sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==", "requires": { "chain-function": "1.0.0", "dom-helpers": "3.2.1", "loose-envify": "1.3.1", - "prop-types": "15.5.10", + "prop-types": "15.6.2", "warning": "3.0.0" } }, @@ -10546,6 +10618,15 @@ "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "prop-types": { + "version": "15.5.10", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", + "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", + "requires": { + "fbjs": "0.8.14", + "loose-envify": "1.3.1" + } } } }, @@ -10571,7 +10652,21 @@ "requires": { "error-stack-parser": "1.3.6", "object-assign": "4.1.1", - "react-dom": "15.3.1" + "react-dom": "15.6.2" + }, + "dependencies": { + "react-dom": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.2.tgz", + "integrity": "sha1-Qc+t9pO3V/rycIRDodH9WgK+9zA=", + "dev": true, + "requires": { + "fbjs": "0.8.14", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.6.2" + } + } } }, "redent": { diff --git a/stemn-frontend-website/package.json b/stemn-frontend-website/package.json index 074b52c7..5ab53c55 100644 --- a/stemn-frontend-website/package.json +++ b/stemn-frontend-website/package.json @@ -110,9 +110,9 @@ "moment-range": "3.0.3", "normalize.css": "6.0.0", "pdfjs-dist": "1.7.406", + "prop-types": "15.6.2", "raven-js": "3.6.1", - "react": "15.3.1", - "react-addons-css-transition-group": "15.3.1", + "react": "16.4.1", "react-autosuggest": "9.0.0", "react-calendar-heatmap": "1.1.0", "react-clickdrag": "3.0.2", @@ -120,7 +120,7 @@ "react-contextmenu": "1.6.2", "react-dnd": "2.3.0", "react-dnd-html5-backend": "2.3.0", - "react-dom": "15.3.1", + "react-dom": "16.4.1", "react-dropzone": "3.5.3", "react-flip-move": "2.9.1", "react-helmet": "5.0.2", @@ -133,6 +133,7 @@ "react-router-redux": "4.0.5", "react-select": "1.0.0-rc.3", "react-textarea-autosize": "4.0.5", + "react-transition-group": "1.2.1", "react-waypoint": "5.2.1", "recharts": "0.22.2", "redux": "3.5.2", diff --git a/stemn-frontend-website/src/client/assets/javascripts/app/Root.js b/stemn-frontend-website/src/client/assets/javascripts/app/Root.js index 8175c387..04b5de2b 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/app/Root.js +++ b/stemn-frontend-website/src/client/assets/javascripts/app/Root.js @@ -1,7 +1,8 @@ -import React, { PropTypes } from 'react' +import React from 'react' import { Provider } from 'react-redux' import { Router } from 'react-router' import routes from '../pages/routes' +import PropTypes from 'prop-types' const Root = ({ store, history }) => ( diff --git a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/AddFriendInput/AddFriendInput.js b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/AddFriendInput/AddFriendInput.js index 50dcfd9e..e3bfd75a 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/AddFriendInput/AddFriendInput.js +++ b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/AddFriendInput/AddFriendInput.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import './AddFriendInput.scss' export default class AddFriendInput extends Component { diff --git a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendList/FriendList.js b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendList/FriendList.js index 070aa5d1..fe6d090f 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendList/FriendList.js +++ b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendList/FriendList.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import FriendListItem from '../FriendListItem' import './FriendList.scss' diff --git a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendListItem/FriendListItem.js b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendListItem/FriendListItem.js index 4e00b534..70093b92 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendListItem/FriendListItem.js +++ b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendListItem/FriendListItem.js @@ -1,6 +1,6 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classnames from 'classnames' - +import PropTypes from 'prop-types' import './FriendListItem.scss' export default class FriendListItem extends Component { diff --git a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendsLayout.js b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendsLayout.js index 40747ca7..2383e8bf 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendsLayout.js +++ b/stemn-frontend-website/src/client/assets/javascripts/features/friends/components/FriendsLayout.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import AddFriendInput from './AddFriendInput' import FriendList from './FriendList' import './FriendListApp.scss' diff --git a/stemn-frontend-website/src/client/assets/javascripts/layout/LandingLayout.js b/stemn-frontend-website/src/client/assets/javascripts/layout/LandingLayout.js index 6c3c2107..d76e512c 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/layout/LandingLayout.js +++ b/stemn-frontend-website/src/client/assets/javascripts/layout/LandingLayout.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import LandingHeader from 'modules/LandingHeader' import LandingFooter from 'modules/LandingFooter' diff --git a/stemn-frontend-website/src/client/assets/javascripts/layout/StandardLayout.js b/stemn-frontend-website/src/client/assets/javascripts/layout/StandardLayout.js index 3ecb1a22..aa23e4d0 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/layout/StandardLayout.js +++ b/stemn-frontend-website/src/client/assets/javascripts/layout/StandardLayout.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import Header from 'modules/Header' import Footer from 'modules/Footer' import ScrollToTop from 'stemn-shared/misc/Scroll/ScrollToTop' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/BetaBadge/BetaBadge.jsx b/stemn-frontend-website/src/client/assets/javascripts/modules/BetaBadge/BetaBadge.jsx index ffd79b53..d1ded7d2 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/BetaBadge/BetaBadge.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/BetaBadge/BetaBadge.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './BetaBadge.scss' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/Footer/Footer.js b/stemn-frontend-website/src/client/assets/javascripts/modules/Footer/Footer.js index f35a3c3f..0ce6bf92 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/Footer/Footer.js +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/Footer/Footer.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './Footer.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/Header/Header.js b/stemn-frontend-website/src/client/assets/javascripts/modules/Header/Header.js index a47eda5c..e17ea47f 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/Header/Header.js +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/Header/Header.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './Header.scss' import classNames from 'classnames' import { loginRoute } from 'route-actions' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/HeaderMobileMenu/HeaderMobileMenu.jsx b/stemn-frontend-website/src/client/assets/javascripts/modules/HeaderMobileMenu/HeaderMobileMenu.jsx index 5e6f5d8f..c087007f 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/HeaderMobileMenu/HeaderMobileMenu.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/HeaderMobileMenu/HeaderMobileMenu.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './HeaderMobileMenu.css' import classNames from 'classnames' import Link from 'stemn-shared/misc/Router/Link' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/HeroBanner/HeroBanner.js b/stemn-frontend-website/src/client/assets/javascripts/modules/HeroBanner/HeroBanner.js index 49e62386..2da8e2d0 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/HeroBanner/HeroBanner.js +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/HeroBanner/HeroBanner.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './HeroBanner.scss' import classNames from 'classnames' import { Container } from 'stemn-shared/misc/Layout' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/LandingFooter/LandingFooter.js b/stemn-frontend-website/src/client/assets/javascripts/modules/LandingFooter/LandingFooter.js index 18430730..4c82620e 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/LandingFooter/LandingFooter.js +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/LandingFooter/LandingFooter.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './LandingFooter.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/LandingHeader/LandingHeader.js b/stemn-frontend-website/src/client/assets/javascripts/modules/LandingHeader/LandingHeader.js index 4b8b392b..c30ff872 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/LandingHeader/LandingHeader.js +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/LandingHeader/LandingHeader.js @@ -1,9 +1,7 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './LandingHeader.scss' import classNames from 'classnames' - import { loginRoute } from 'route-actions' - import { Container, Row, Col } from 'stemn-shared/misc/Layout' import Avatar from 'stemn-shared/misc/Avatar/UserAvatar/UserAvatar' import Popover from 'stemn-shared/misc/Popover' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/SubHeader/SubHeader.jsx b/stemn-frontend-website/src/client/assets/javascripts/modules/SubHeader/SubHeader.jsx index 3126da80..f0625a0c 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/SubHeader/SubHeader.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/SubHeader/SubHeader.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './SubHeader.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/SubSubHeader/SubSubHeader.jsx b/stemn-frontend-website/src/client/assets/javascripts/modules/SubSubHeader/SubSubHeader.jsx index 29aca56f..a5fc6dd6 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/SubSubHeader/SubSubHeader.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/SubSubHeader/SubSubHeader.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import classes from './SubSubHeader.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/modules/UserNavHeader/UserNavHeader.jsx b/stemn-frontend-website/src/client/assets/javascripts/modules/UserNavHeader/UserNavHeader.jsx index a617caff..b890791a 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/modules/UserNavHeader/UserNavHeader.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/modules/UserNavHeader/UserNavHeader.jsx @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import SubHeader from 'modules/SubHeader' import Tabs from 'stemn-shared/misc/Tabs/Tabs' import Link from 'stemn-shared/misc/Router/Link' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Download/Download.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Download/Download.js index a41df1e3..6bec3762 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Download/Download.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Download/Download.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import LandingLayout from 'layout/LandingLayout' import HeroBanner from 'modules/HeroBanner' import DownloadButton from 'stemn-shared/misc/DesktopReleases/DownloadButton' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Explore/Explore.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Explore/Explore.js index a12f3674..de1cba01 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Explore/Explore.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Explore/Explore.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import StandardLayout from 'layout/StandardLayout' import HeroBanner from 'modules/HeroBanner' import Button from 'stemn-shared/misc/Buttons/Button/Button' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Field/Field.jsx b/stemn-frontend-website/src/client/assets/javascripts/pages/Field/Field.jsx index 3d311c70..52a5cc69 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Field/Field.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Field/Field.jsx @@ -1,5 +1,4 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' import SubHeader from 'modules/SubHeader' import StandardLayout from 'layout/StandardLayout' import { Container } from 'stemn-shared/misc/Layout' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/File/File.js b/stemn-frontend-website/src/client/assets/javascripts/pages/File/File.js index a7930ec9..8cbeea02 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/File/File.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/File/File.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classNames from 'classnames' import classes from './File.scss' import { projectRoute, fileRoute } from 'route-actions' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Flow/Flow.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Flow/Flow.js index e1aa107a..7a1a1bfc 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Flow/Flow.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Flow/Flow.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import LandingLayout from 'layout/LandingLayout' import HeroBanner from 'modules/HeroBanner' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Home/Home.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Home/Home.js index f8629345..6ef4d50f 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Home/Home.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Home/Home.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import StandardLayout from 'layout/StandardLayout' import { Container, Row, Col } from 'stemn-shared/misc/Layout' import Button from 'stemn-shared/misc/Buttons/Button/Button' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Landing/Landing.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Landing/Landing.js index 4195e0cf..ae5537ea 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Landing/Landing.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Landing/Landing.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import LandingLayout from 'layout/LandingLayout' import HeroBanner from 'modules/HeroBanner' import DownloadButton from 'stemn-shared/misc/DesktopReleases/DownloadButton' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Notifications/Notifications.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Notifications/Notifications.js index 0e09e5a1..d8f45e93 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Notifications/Notifications.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Notifications/Notifications.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import NavPill from 'stemn-shared/misc/Buttons/NavPill/NavPill' import NavPillContainer from 'stemn-shared/misc/Buttons/NavPillContainer' import StandardLayout from 'layout/StandardLayout' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsAll/NotificationsAll.js b/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsAll/NotificationsAll.js index 7e8710dc..b3455e76 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsAll/NotificationsAll.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsAll/NotificationsAll.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import NotificationItem from 'stemn-shared/misc/Notifications/NotificationItem/NotificationItem' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsUnread/NotificationsUnread.js b/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsUnread/NotificationsUnread.js index c4020963..65d328df 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsUnread/NotificationsUnread.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/NotificationsUnread/NotificationsUnread.js @@ -1,5 +1,4 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' import NotificationItem from 'stemn-shared/misc/Notifications/NotificationItem/NotificationItem' export default class NotificationsUnread extends Component { diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Onboarding/Onboarding.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Onboarding/Onboarding.js index ef351301..f20dea46 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Onboarding/Onboarding.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Onboarding/Onboarding.js @@ -1,5 +1,4 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' import { ArrowTabs, ArrowTab } from 'stemn-shared/misc/Tabs/ArrowTabs/ArrowTabs.jsx' import { Container } from 'stemn-shared/misc/Layout' import { Helmet } from 'react-helmet' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingAbout/OnboardingAbout.js b/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingAbout/OnboardingAbout.js index 12126a4f..67ea45b2 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingAbout/OnboardingAbout.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingAbout/OnboardingAbout.js @@ -1,5 +1,4 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' import { Container, Col, Row } from 'stemn-shared/misc/Layout' import Button from 'stemn-shared/misc/Buttons/Button/Button' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' @@ -7,7 +6,6 @@ import PanelDescription from 'stemn-shared/misc/Panels/PanelDescription' import Textarea from 'stemn-shared/misc/Input/Textarea/Textarea' import UserAvatar from 'stemn-shared/misc/Avatar/UserAvatar/UserAvatar' import Upload from 'stemn-shared/misc/Upload/Upload' - import classes from './OnboardingAbout.scss' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingDownload/OnboardingDownload.js b/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingDownload/OnboardingDownload.js index f40c3e13..f31012fa 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingDownload/OnboardingDownload.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingDownload/OnboardingDownload.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Container, Col, Row } from 'stemn-shared/misc/Layout' import Button from 'stemn-shared/misc/Buttons/Button/Button' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingSync/OnboardingSync.js b/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingSync/OnboardingSync.js index 7ddd0266..2a6dfcf9 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingSync/OnboardingSync.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/OnboardingSync/OnboardingSync.js @@ -1,5 +1,5 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Container, Col, Row } from 'stemn-shared/misc/Layout' import Button from 'stemn-shared/misc/Buttons/Button/Button' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/OpenSource/OpenSource.js b/stemn-frontend-website/src/client/assets/javascripts/pages/OpenSource/OpenSource.js index 8e22cf5b..86c7a02c 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/OpenSource/OpenSource.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/OpenSource/OpenSource.js @@ -1,5 +1,4 @@ -import React, { Component, PropTypes } from 'react' - +import React, { Component } from 'react' import LandingLayout from 'layout/LandingLayout' import HeroBanner from 'modules/HeroBanner' import Button from 'stemn-shared/misc/Buttons/Button/Button' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Pricing/Pricing.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Pricing/Pricing.js index 818ec875..e294b32f 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Pricing/Pricing.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Pricing/Pricing.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import LandingLayout from 'layout/LandingLayout' import HeroBanner from 'modules/HeroBanner' import { Container } from 'stemn-shared/misc/Layout' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Privacy/Privacy.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Privacy/Privacy.js index 2e717103..d0bbe836 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Privacy/Privacy.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Privacy/Privacy.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import StandardLayout from 'layout/StandardLayout' import { Helmet } from 'react-helmet' import classes from 'layout/layout.css' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsGeneral/ProjectSettingsGeneral.js b/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsGeneral/ProjectSettingsGeneral.js index 861f453e..875a8698 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsGeneral/ProjectSettingsGeneral.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsGeneral/ProjectSettingsGeneral.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import GeneralSettings from 'stemn-shared/misc/ProjectSettings/GeneralSettings' import CloudSettings from 'stemn-shared/misc/ProjectSettings/CloudSettings' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsTags/ProjectSettingsTags.js b/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsTags/ProjectSettingsTags.js index 13aedd6f..838fdff0 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsTags/ProjectSettingsTags.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/ProjectSettingsTags/ProjectSettingsTags.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import TagSettings from 'stemn-shared/misc/ProjectSettings/TagSettings' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Search/Search.jsx b/stemn-frontend-website/src/client/assets/javascripts/pages/Search/Search.jsx index 07d2f46d..269e5c1c 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Search/Search.jsx +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Search/Search.jsx @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import SubHeader from 'modules/SubHeader' import StandardLayout from 'layout/StandardLayout' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Security/Security.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Security/Security.js index 325240ef..960c3230 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Security/Security.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Security/Security.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import StandardLayout from 'layout/StandardLayout' import { Helmet } from 'react-helmet' import classes from 'layout/layout.css' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Settings/Settings.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Settings/Settings.js index 67d3ed4f..6328a7c1 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Settings/Settings.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Settings/Settings.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import NavPill from 'stemn-shared/misc/Buttons/NavPill/NavPill' import NavPillContainer from 'stemn-shared/misc/Buttons/NavPillContainer' import StandardLayout from 'layout/StandardLayout' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsAccount/SettingsAccount.js b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsAccount/SettingsAccount.js index 9ab0ecfd..b643cee9 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsAccount/SettingsAccount.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsAccount/SettingsAccount.js @@ -1,6 +1,6 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { has } from 'lodash' - import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' import UserNameSettings from 'stemn-shared/misc/UserSettings/UserNameSettings' import UserEmailSettings from 'stemn-shared/misc/UserSettings/UserEmailSettings' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsBilling/SettingsBilling.js b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsBilling/SettingsBilling.js index a4f6b017..7aafcc4c 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsBilling/SettingsBilling.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsBilling/SettingsBilling.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' import SimpleTable from 'stemn-shared/misc/Tables/SimpleTable/SimpleTable' import Link from 'stemn-shared/misc/Router/Link' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsEmails/SettingsEmails.js b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsEmails/SettingsEmails.js index f604b7d0..ddea150d 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsEmails/SettingsEmails.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsEmails/SettingsEmails.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import EmailAndNotificationToggles from 'stemn-shared/misc/UserSettings/EmailAndNotificationToggles' class SettingsEmails extends Component { diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfile/SettingsProfile.js b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfile/SettingsProfile.js index e168abb1..89cb657d 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfile/SettingsProfile.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfile/SettingsProfile.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classNames from 'classnames' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfileDetails/SettingsProfileDetails.js b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfileDetails/SettingsProfileDetails.js index 87aee2e8..8e5a5ae8 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfileDetails/SettingsProfileDetails.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProfileDetails/SettingsProfileDetails.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './SettingsProfileDetails.css' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProjects/SettingsProjects.js b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProjects/SettingsProjects.js index 8d7ce9b3..e395a041 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProjects/SettingsProjects.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/SettingsProjects/SettingsProjects.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import InfoPanel from 'stemn-shared/misc/Panels/InfoPanel' import EntityRow from 'stemn-shared/misc/EntityRow' import SimpleIconButton from 'stemn-shared/misc/Buttons/SimpleIconButton/SimpleIconButton' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/Terms/Terms.js b/stemn-frontend-website/src/client/assets/javascripts/pages/Terms/Terms.js index 4a6254e8..8c30feec 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/Terms/Terms.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/Terms/Terms.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import StandardLayout from 'layout/StandardLayout' import classes from 'layout/layout.css' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/User/User.js b/stemn-frontend-website/src/client/assets/javascripts/pages/User/User.js index 36b056d9..424f6b8e 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/User/User.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/User/User.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './User.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/UserDetails/UserDetails.js b/stemn-frontend-website/src/client/assets/javascripts/pages/UserDetails/UserDetails.js index 89b8fa9c..d76ab252 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/UserDetails/UserDetails.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/UserDetails/UserDetails.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './UserDetails.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowers/UserFollowers.js b/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowers/UserFollowers.js index 39725bf6..3e9522c5 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowers/UserFollowers.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowers/UserFollowers.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './UserFollowers.css' import classNames from 'classnames' import UserRow from 'stemn-shared/misc/Users/UserRow' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowing/UserFollowing.js b/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowing/UserFollowing.js index cde7e800..832ebc6d 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowing/UserFollowing.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/UserFollowing/UserFollowing.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './UserFollowing.css' import classNames from 'classnames' import Pagination from 'stemn-shared/misc/Pagination' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/UserOverview/UserOverview.js b/stemn-frontend-website/src/client/assets/javascripts/pages/UserOverview/UserOverview.js index daadaec5..ed3ba52a 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/UserOverview/UserOverview.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/UserOverview/UserOverview.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import classes from './UserOverview.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/UserProjects/UserProjects.js b/stemn-frontend-website/src/client/assets/javascripts/pages/UserProjects/UserProjects.js index ff7db771..14886552 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/UserProjects/UserProjects.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/UserProjects/UserProjects.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { orderBy } from 'lodash' import classes from './UserProjects.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/src/client/assets/javascripts/pages/UserStars/UserStars.js b/stemn-frontend-website/src/client/assets/javascripts/pages/UserStars/UserStars.js index 4f586e9b..31b2d729 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/pages/UserStars/UserStars.js +++ b/stemn-frontend-website/src/client/assets/javascripts/pages/UserStars/UserStars.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' import { orderBy } from 'lodash' import classes from './UserStars.css' import classNames from 'classnames' diff --git a/stemn-frontend-website/test/unit/testHelper.js b/stemn-frontend-website/test/unit/testHelper.js index 1cd1461c..3c8877ef 100644 --- a/stemn-frontend-website/test/unit/testHelper.js +++ b/stemn-frontend-website/test/unit/testHelper.js @@ -1,5 +1,6 @@ import jq from 'jquery'; import React from 'react'; +import PropTypes from 'prop-types' import ReactDOM from 'react-dom'; import ReactTestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; @@ -30,7 +31,7 @@ function renderComponent(ComponentClass, props = {}, state = {}) { } function mockHistory(component) { - component.childContextTypes = { history: React.PropTypes.object }; + component.childContextTypes = { history: PropTypes.object }; component.prototype.getChildContext = () => ({ history: createHistory() }); } From 640531ef65d95390128e837ffd1beddff5a629e8 Mon Sep 17 00:00:00 2001 From: David Revay Date: Tue, 3 Jul 2018 10:00:11 -0700 Subject: [PATCH 002/274] update react-router --- .../config/webpack.config.development.js | 3 +- stemn-frontend-website/package-lock.json | 103 ++++++++++++------ stemn-frontend-website/package.json | 4 +- .../client/assets/javascripts/app/index.js | 2 +- 4 files changed, 76 insertions(+), 36 deletions(-) diff --git a/stemn-frontend-website/config/webpack.config.development.js b/stemn-frontend-website/config/webpack.config.development.js index f3b2fb05..1033be8d 100644 --- a/stemn-frontend-website/config/webpack.config.development.js +++ b/stemn-frontend-website/config/webpack.config.development.js @@ -19,8 +19,7 @@ const GLOBALS = { } module.exports = merge(config, { - debug: true, - devtool: 'eval-source-map', + devtool: 'cheap-module-source-map', entry: { application: [ 'webpack-hot-middleware/client', diff --git a/stemn-frontend-website/package-lock.json b/stemn-frontend-website/package-lock.json index ada0c948..e4d7258e 100644 --- a/stemn-frontend-website/package-lock.json +++ b/stemn-frontend-website/package-lock.json @@ -6414,24 +6414,14 @@ "integrity": "sha1-+fCxTAvgDw5PseV3t0n+2eb1L1U=" }, "history": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/history/-/history-2.1.2.tgz", - "integrity": "sha1-SqLeiXoOSGfkU5hDvm7Nsphr/ew=", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/history/-/history-3.3.0.tgz", + "integrity": "sha1-/O3M6PEpdTcVRdc1RhAzV5ptrpw=", "requires": { - "deep-equal": "1.0.1", "invariant": "2.2.2", - "query-string": "3.0.3", - "warning": "2.1.0" - }, - "dependencies": { - "warning": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-2.1.0.tgz", - "integrity": "sha1-ISINnGOvx3qMkhEeARr3Bc4MaQE=", - "requires": { - "loose-envify": "1.3.1" - } - } + "loose-envify": "1.3.1", + "query-string": "4.3.4", + "warning": "3.0.0" } }, "hmac-drbg": { @@ -9917,10 +9907,11 @@ "integrity": "sha1-O3hIwDwt7OaalSKw+ujEEm10Xzs=" }, "query-string": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-3.0.3.tgz", - "integrity": "sha1-ri4UtNBQcdTpuetIc8NbDc1C5jg=", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", "requires": { + "object-assign": "4.1.1", "strict-uri-encode": "1.1.0" } }, @@ -10423,14 +10414,33 @@ "dev": true }, "react-redux": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-4.4.5.tgz", - "integrity": "sha1-9QmimBviJS0QxinvfFWTR6SuxFc=", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz", + "integrity": "sha512-5VI8EV5hdgNgyjfmWzBbdrqUkrVRKlyTKk1sGH3jzM2M2Mhj/seQgPXaz6gVAj2lz/nz688AdTqMO18Lr24Zhg==", "requires": { - "hoist-non-react-statics": "1.2.0", + "hoist-non-react-statics": "2.5.5", "invariant": "2.2.2", - "lodash": "4.15.0", - "loose-envify": "1.3.1" + "lodash": "4.17.10", + "lodash-es": "4.17.10", + "loose-envify": "1.3.1", + "prop-types": "15.6.2" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "lodash-es": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.10.tgz", + "integrity": "sha512-iesFYPmxYYGTcmQK0sL8bX3TGHyM6b2qREaB4kamHfQyfPJP0xgoGxp19nsH16nsfquLdiyKyX3mQkfiSGV8Rg==" + } } }, "react-resize-detector": { @@ -10439,15 +10449,24 @@ "integrity": "sha1-ygdEMHIySENYZmbZRDpjVtp8BQE=" }, "react-router": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-2.7.0.tgz", - "integrity": "sha1-CsP3DKdP+PvkEKDLNksli4Th1kM=", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-3.2.1.tgz", + "integrity": "sha512-SXkhC0nr3G0ltzVU07IN8jYl0bB6FsrDIqlLC9dK3SITXqyTJyM7yhXlUqs89w3Nqi5OkXsfRUeHX+P874HQrg==", "requires": { - "history": "2.1.2", - "hoist-non-react-statics": "1.2.0", + "create-react-class": "15.6.0", + "history": "3.3.0", + "hoist-non-react-statics": "2.5.5", "invariant": "2.2.2", "loose-envify": "1.3.1", + "prop-types": "15.6.2", "warning": "3.0.0" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + } } }, "react-router-redux": { @@ -10715,9 +10734,31 @@ "dev": true, "requires": { "lodash": "4.15.0", - "react-redux": "4.4.5", + "react-redux": "4.4.9", "redux": "3.5.2", "redux-devtools-instrument": "1.8.2" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==", + "dev": true + }, + "react-redux": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-4.4.9.tgz", + "integrity": "sha512-3XS7mjTOcvaP2H5OE/LxEgDHRuEyTZxBRlwvXHzNqYkZdYd7Ra98AimWoDSHP9OcLoydjA1ocgiZxxcqeXj0Sw==", + "dev": true, + "requires": { + "create-react-class": "15.6.0", + "hoist-non-react-statics": "2.5.5", + "invariant": "2.2.2", + "lodash": "4.15.0", + "loose-envify": "1.3.1", + "prop-types": "15.6.2" + } + } } }, "redux-devtools-dock-monitor": { diff --git a/stemn-frontend-website/package.json b/stemn-frontend-website/package.json index 5ab53c55..6d170e64 100644 --- a/stemn-frontend-website/package.json +++ b/stemn-frontend-website/package.json @@ -128,8 +128,8 @@ "react-icons": "2.2.3", "react-modal": "1.7.3", "react-popover-wrapper": "1.0.0", - "react-redux": "4.4.5", - "react-router": "2.7.0", + "react-redux": "5.0.7", + "react-router": "3.2.1", "react-router-redux": "4.0.5", "react-select": "1.0.0-rc.3", "react-textarea-autosize": "4.0.5", diff --git a/stemn-frontend-website/src/client/assets/javascripts/app/index.js b/stemn-frontend-website/src/client/assets/javascripts/app/index.js index 04fe61cb..016e7e41 100644 --- a/stemn-frontend-website/src/client/assets/javascripts/app/index.js +++ b/stemn-frontend-website/src/client/assets/javascripts/app/index.js @@ -3,7 +3,6 @@ import React from 'react' import { render } from 'react-dom' import { browserHistory } from 'react-router' import { syncHistoryWithStore } from 'react-router-redux' - import Root from './Root' import configureStore from './store/configureStore' import getInitialState from './state/getInitialState' @@ -16,6 +15,7 @@ import { createPersistor } from 'redux-persist' import { getLatest } from 'stemn-shared/misc/DesktopReleases/DesktopReleases.actions' import { getNotifications } from 'stemn-shared/misc/Notifications/Notifications.actions' + const initReactAndRedux = (initialState) => { const store = configureStore(initialState) createPersistor(store, persistConfig) From d63bf97b3d97fe25de19d12655ce2d3d692a78ea Mon Sep 17 00:00:00 2001 From: David Revay Date: Tue, 3 Jul 2018 10:44:38 -0700 Subject: [PATCH 003/274] Remove createClass --- .../pages/AppAuthedPage/AppAuthedPage.jsx | 12 ++-- .../pages/AppEitherPage/AppEitherPage.jsx | 6 +- .../pages/AppUnAuthedPage/AppUnAuthedPage.jsx | 12 ++-- .../pages/DashboardPage/DashboardPage.jsx | 15 ++--- .../ProjectChangesPage/ProjectChangesPage.jsx | 50 +++++++------- .../pages/ProjectFeedPage/ProjectFeedPage.jsx | 20 +++--- .../ProjectFeedPageRevision.jsx | 6 +- .../ProjectFilesPage/ProjectFilesPage.jsx | 11 ++-- .../ProjectSettingsPage.jsx | 6 +- .../ProjectThreadPage/ProjectThreadPage.jsx | 6 +- .../SettingsAccountPage.jsx | 14 ++-- .../SettingsApplicationPage.jsx | 19 +++--- .../main/pages/SettingsPage/SettingsPage.jsx | 6 +- .../renderer/main/pages/Template/Template.jsx | 6 +- .../menubar/modules/Sidebar/Sidebar.jsx | 6 +- .../menubar/modules/Toolbar/Toolbar.jsx | 6 +- .../pages/AppAuthedPage/AppAuthedPage.jsx | 16 +++-- .../pages/AppUnAuthedPage/AppUnAuthedPage.jsx | 9 +-- .../menubar/pages/LoginPage/LoginPage.jsx | 6 +- .../menubar/pages/ProjectPage/ProjectPage.jsx | 36 +++++----- .../pages/AppAuthedPage/AppAuthedPage.jsx | 9 +-- .../pages/AppUnAuthedPage/AppUnAuthedPage.jsx | 9 +-- .../preview/pages/LoginPage/LoginPage.jsx | 6 +- .../src/misc/AnimateShow/AnimateShow.jsx | 18 ++--- .../src/misc/Avatar/UserAvatar/UserAvatar.jsx | 6 +- .../misc/Avatar/UserAvatars/UserAvatars.jsx | 6 +- .../src/misc/Banner/Banner.jsx | 6 +- .../Buttons/ProgressButton/ProgressButton.jsx | 62 ++++++++++-------- .../misc/Calendar/DatePicker/DatePicker.jsx | 27 ++++---- .../src/misc/Changes/CommitBox/CommitBox.jsx | 6 +- .../Changes/CommitChanges/CommitChanges.jsx | 6 +- .../Changes/CommitChanges/FileChangeRow.jsx | 6 +- .../CommitChanges/FileChangeTitleRow.jsx | 6 +- .../src/misc/ContextMenu/ContextMenu.jsx | 15 +++-- .../src/misc/DragResize/DragResize.jsx | 46 ++++++------- .../Editor/MarkdownButton/MarkdownButton.jsx | 6 +- .../FileCompareSlider/FileCompareSlider.jsx | 18 +++-- .../FileCompareMenu.desktop.jsx | 16 +++-- .../src/misc/FileList/components/FileIcon.jsx | 15 ++--- .../FileList/components/FileListPopup.jsx | 15 +++-- .../FileSelectModal/FileSelectModal.jsx | 43 +++++++----- .../misc/FileSelectInput/FileSelectInput.jsx | 16 +++-- .../FileSelectInputElectron.jsx | 11 ++-- .../Download/DownloadModal/DownloadModal.jsx | 12 ++-- .../AssemblyPartNotFound.jsx | 6 +- .../AssemblyPartNotFoundModal.jsx | 6 +- .../PreviewFile/Messages/File404/File404.jsx | 6 +- .../Messages/FileEmpty/FileEmpty.jsx | 6 +- .../Files/PreviewFile/Messages/Messages.jsx | 6 +- .../PreviewExpired/PreviewExpired.jsx | 6 +- .../PreviewExpiredModal.jsx | 6 +- .../AssemblyParts/AssemblyParts.jsx | 25 +++---- .../PreviewFile/PreviewCad/PreviewCad.jsx | 24 +++---- .../misc/Files/PreviewFile/PreviewFile.jsx | 6 +- .../PreviewFile/PreviewGdoc/PreviewGdoc.jsx | 6 +- .../PreviewGoogle/PreviewGoogle.jsx | 6 +- .../PreviewFile/PreviewImage/PreviewImage.jsx | 39 ++++++----- .../PreviewFile/PreviewPdf/PreviewPdf.jsx | 34 +++++----- .../PreviewFile/PreviewPdf/PreviewPdfPage.jsx | 65 ++++++++++--------- .../src/misc/Files/Readme/DisplayReadme.jsx | 18 ++--- .../src/misc/Guide/Guide.jsx | 6 +- .../src/misc/Header/Header.jsx | 6 +- .../src/misc/Input/Checkbox/Checkbox.jsx | 6 +- .../misc/Input/CheckboxAlt/CheckboxAlt.jsx | 6 +- .../src/misc/Input/Field/Field.jsx | 6 +- .../src/misc/Input/Input/Input.jsx | 26 ++++---- .../src/misc/Input/RadioAlt/RadioAlt.jsx | 6 +- .../src/misc/Input/Toggle/Toggle.jsx | 6 +- .../src/misc/Label/Label.jsx | 6 +- .../Loading/LoadingOverlay/LoadingOverlay.jsx | 31 +++++---- .../ThreadRow/ThreadRow.jsx | 16 +++-- .../src/misc/Modal/BetaModal/BetaModal.jsx | 26 ++++---- .../misc/Modal/ConfirmModal/ConfirmModal.jsx | 20 +++--- .../Modal/ConnectionModal/ConnectionModal.jsx | 6 +- .../src/misc/Modal/ErrorModal/ErrorModal.jsx | 6 +- .../src/misc/Modal/ModalContainer.jsx | 9 +-- .../ProviderAccessErrorModal.jsx | 6 +- .../ProviderAccessRevokedModal.jsx | 6 +- .../ReleaseNotesModal/ReleaseNotesModal.jsx | 20 +++--- .../PopoverDetails/PopoverDetails.jsx | 6 +- .../src/misc/Reactions/ReactionPopup.jsx | 6 +- .../src/misc/Reactions/Reactions.jsx | 6 +- .../src/misc/Scroll/ScrollZoom/ScrollZoom.jsx | 17 +++-- .../src/misc/Sidebar/Sidebar.jsx | 16 +++-- .../src/misc/Smooch/Smooch.jsx | 9 +-- .../SidebarTimeline/SidebarTimeline.jsx | 16 +++-- .../SidebarTimeline/SidebarTimelineRow.jsx | 20 +++--- .../TimelinePanel/TimelinePanel.jsx | 6 +- .../TimelineWrapper/TimelineWrapper.jsx | 6 +- .../Tables/StandardTable/StandardTable.jsx | 6 +- .../src/misc/Tabs/ArrowTabs/ArrowTabs.jsx | 23 ++++--- .../src/misc/Tags/Tag/Tag.jsx | 6 +- .../src/misc/Tags/TagEdit/TagEdit.jsx | 6 +- .../misc/TextDisplayBox/TextDisplayBox.jsx | 6 +- .../ThreadDisplayModal/ThreadDisplayModal.jsx | 26 ++++---- .../ThreadLabelDots/ThreadLabelDots.jsx | 6 +- .../ColorSelect/ColorSelect.jsx | 6 +- .../ThreadLabelsEditModal.jsx | 14 ++-- .../ThreadList/ThreadGroup/DragLayer.jsx | 14 ++-- .../misc/Threads/ThreadList/ThreadList.jsx | 56 +++++++++------- .../ThreadListItem/ThreadListItem.jsx | 30 +++++---- .../misc/Timeline/MoreButton/MoreButton.jsx | 6 +- .../src/misc/Timeline/MoreDots/MoreDots.jsx | 6 +- .../src/misc/Timeline/Timeline.jsx | 37 ++++++----- .../Timeline/TimelineInner/TimelineInner.jsx | 12 ++-- .../src/misc/TitleBar/TitleBar.jsx | 17 +++-- .../misc/Titles/SectionTitle/SectionTitle.jsx | 6 +- .../src/misc/Toasts/Toasts.jsx | 35 +++++----- .../src/misc/TogglePanel/TogglePanel.jsx | 16 +++-- .../Toggler/TogglerExpand/TogglerExpand.jsx | 6 +- .../src/misc/Users/UserSelect/UserSelect.jsx | 11 ++-- .../src/misc/Walkthrough/Walkthrough.jsx | 9 +-- .../src/pages/PasswordLost/PasswordLost.jsx | 11 ++-- .../src/pages/PasswordSet/PasswordSet.jsx | 11 ++-- .../src/pages/Register/Register.jsx | 11 ++-- 115 files changed, 881 insertions(+), 759 deletions(-) diff --git a/stemn-frontend-desktop/app/renderer/main/pages/AppAuthedPage/AppAuthedPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/AppAuthedPage/AppAuthedPage.jsx index 8d3e58e5..6223a075 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/AppAuthedPage/AppAuthedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/AppAuthedPage/AppAuthedPage.jsx @@ -18,12 +18,13 @@ import betaModalName from 'stemn-shared/misc/Modal/BetaModal' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { componentWillReceiveProps(nextProps, prevProps) { if (!nextProps.auth.authToken || !nextProps.auth.user._id) { nextProps.dispatch(push('/login')) } - }, + } + componentDidMount() { if (!this.props.auth.authToken || !this.props.auth.user._id) { this.props.dispatch(push('/login')) @@ -39,7 +40,8 @@ export const Component = React.createClass({ // limit: 1, // })) // } - }, + } + render() { const { children } = this.props return ( @@ -53,8 +55,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/AppEitherPage/AppEitherPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/AppEitherPage/AppEitherPage.jsx index 546753c1..ff1459e8 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/AppEitherPage/AppEitherPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/AppEitherPage/AppEitherPage.jsx @@ -14,7 +14,7 @@ import Sidebar from 'stemn-shared/misc/Sidebar/Sidebar.jsx' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { children, auth } = this.props const isAuthed = auth.authToken && auth.user._id @@ -30,8 +30,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/AppUnAuthedPage/AppUnAuthedPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/AppUnAuthedPage/AppUnAuthedPage.jsx index 8298b3c9..7fee4e83 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/AppUnAuthedPage/AppUnAuthedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/AppUnAuthedPage/AppUnAuthedPage.jsx @@ -14,17 +14,19 @@ import TitleBar from 'stemn-shared/misc/TitleBar/TitleBar' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { componentWillReceiveProps(nextProps, prevProps) { if (nextProps.auth.authToken && nextProps.auth.user._id) { nextProps.dispatch(push('/')) } - }, + } + componentDidMount() { if (this.props.auth.authToken && this.props.auth.user._id) { this.props.dispatch(push('/')) } - }, + } + render() { const { children } = this.props return ( @@ -33,8 +35,8 @@ export const Component = React.createClass({ {children} ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/DashboardPage/DashboardPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/DashboardPage/DashboardPage.jsx index 339e4d44..ca52b567 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/DashboardPage/DashboardPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/DashboardPage/DashboardPage.jsx @@ -23,12 +23,11 @@ import Tabs from 'stemn-shared/misc/Tabs/Tabs' // /////////////////////////////// COMPONENT ///////////////////////////////// // /////////////////////////////////////////////////////////////////////////// -export const Component = React.createClass({ - getInitialState() { - return { - date: moment(), - } - }, +export class Component extends React.Component { + state = { + date: moment(), + }; + render() { return (
@@ -60,8 +59,8 @@ export const Component = React.createClass({
) - }, -}) + } +} // /////////////////////////////////////////////////////////////////////////// // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectChangesPage/ProjectChangesPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectChangesPage/ProjectChangesPage.jsx index 64ad9782..73e0f35d 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectChangesPage/ProjectChangesPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectChangesPage/ProjectChangesPage.jsx @@ -51,19 +51,20 @@ const CommitBoxStyles = { background: 'rgba(0, 0, 0, 0.03)', } -export const Component = React.createClass({ - getInitialState() { - return { - hideGuide: false, - } - }, - getStarted() { +export class Component extends React.Component { + state = { + hideGuide: false, + }; + + getStarted = () => { this.props.walkthroughActions.activate({ name: 'commit.commitIntro' }) this.setState({ hideGuide: true }) - }, - componentWillMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, - onMount(nextProps, prevProps) { + }; + + componentWillMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } + + onMount = (nextProps, prevProps) => { // If the project is connected to a remote if (has(nextProps, 'project.data.remote.connected') && nextProps.project.data.remote.connected) { // And the project has changed @@ -77,30 +78,35 @@ export const Component = React.createClass({ }) } } - }, - refresh() { + }; + + refresh = () => { this.props.changesActions.fetchChanges({ projectId: this.props.project.data._id, }) - }, - toggleAll({ value }) { + }; + + toggleAll = ({ value }) => { return this.props.changesActions.toggleAll({ value, projectId: this.props.project.data._id, }) - }, - commitFn() { + }; + + commitFn = () => { this.props.changesActions.commit({ projectId: this.props.project.data._id, name: this.props.changes.name, body: this.props.changes.body, }) - }, - deselect() { + }; + + deselect = () => { this.props.changesActions.deselect({ projectId: this.props.project.data._id, }) - }, + }; + render() { const { changes, timeline, project, changesActions, entityModel, dispatch } = this.props const { hideGuide } = this.state @@ -206,8 +212,8 @@ export const Component = React.createClass({ {!isLoading ? getTemplate() : null} ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPage.jsx index ee90fb9c..639bc934 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPage.jsx @@ -23,10 +23,9 @@ import Button from 'stemn-shared/misc/Buttons/Button/Button' import timelineImg from 'stemn-shared/assets/images/pure-vectors/timeline.svg' import cloudProviders from 'stemn-shared/assets/images/illustrations/cloud-providers.svg' -export const Component = React.createClass({ - +export class Component extends React.Component { // Mounting - onMount(nextProps, prevProps) { + onMount = (nextProps, prevProps) => { if (nextProps.project && nextProps.project.data && nextProps.project.data.remote.connected) { if (!prevProps || nextProps.project.data._id !== prevProps.project.data._id) { nextProps.syncTimelineActions.fetchTimeline({ @@ -37,18 +36,19 @@ export const Component = React.createClass({ }) } } - }, - componentWillMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, + }; + + componentWillMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } - refresh() { + refresh = () => { this.props.syncTimelineActions.fetchTimeline({ types: ['commits'], size: 100, entityType: 'project', entityId: this.props.project.data._id, }) - }, + }; render() { const { timeline, timelineModel, project, location, children } = this.props @@ -95,8 +95,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} function mapStateToProps({ syncTimeline, projects }, { params }) { const project = projects.data[params.stub] diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPageRevision/ProjectFeedPageRevision.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPageRevision/ProjectFeedPageRevision.jsx index 453bda8d..ce44cb32 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPageRevision/ProjectFeedPageRevision.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectFeedPage/ProjectFeedPageRevision/ProjectFeedPageRevision.jsx @@ -2,7 +2,7 @@ import React from 'react' import i from 'icepick' import FileCompare from 'stemn-shared/misc/FileCompare' -export default React.createClass({ +export default class extends React.Component { render() { const { project, item } = this.props @@ -16,5 +16,5 @@ export default React.createClass({ file={ item } /> ) - }, -}) + } +} diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectFilesPage/ProjectFilesPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectFilesPage/ProjectFilesPage.jsx index f2d6fcd9..9164abb7 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectFilesPage/ProjectFilesPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectFilesPage/ProjectFilesPage.jsx @@ -6,8 +6,8 @@ import FileList from 'stemn-shared/misc/FileList' import Readme from 'stemn-shared/misc/Files/Readme/Readme.jsx' import { get } from 'lodash' -export default React.createClass({ - fileFolderClick({ file }) { +export default class extends React.Component { + fileFolderClick = ({ file }) => { const { project, create, pushRoute } = this.props const isFile = file.type == 'file' if (isFile) { @@ -25,7 +25,8 @@ export default React.createClass({ fileId: file.fileId, })) } - }, + }; + render() { const { entityModel, project, path, files, saveProject } = this.props const options = { @@ -58,5 +59,5 @@ export default React.createClass({ ) } return null - }, -}) + } +} diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsPage.jsx index 12227487..433d5d31 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectPage/ProjectSettingsPage/ProjectSettingsPage.jsx @@ -15,7 +15,7 @@ import classes from './ProjectSettingsPage.css' import NavPill from 'stemn-shared/misc/Buttons/NavPill/NavPill' -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { entityModel, project } = this.props const baseLink = project && project.data && project.data._id ? `project/${project.data._id}` : '' @@ -38,8 +38,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} function mapStateToProps({ projects }, otherProps) { diff --git a/stemn-frontend-desktop/app/renderer/main/pages/ProjectThreadPage/ProjectThreadPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/ProjectThreadPage/ProjectThreadPage.jsx index 47d84489..30356588 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/ProjectThreadPage/ProjectThreadPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/ProjectThreadPage/ProjectThreadPage.jsx @@ -16,14 +16,14 @@ import ThreadsDisplay from 'stemn-shared/misc/Threads/ThreadsDisplay' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { project, entityModel } = this.props return ( ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsAccountPage/SettingsAccountPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsAccountPage/SettingsAccountPage.jsx index b63e849a..191032ec 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsAccountPage/SettingsAccountPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsAccountPage/SettingsAccountPage.jsx @@ -17,16 +17,18 @@ import UserProfileSettings from 'stemn-shared/misc/UserSettings/UserProfileSetti import UserLinkedAccountSettings from 'stemn-shared/misc/UserSettings/UserLinkedAccountSettings' import UserCloudProviderSettings from 'stemn-shared/misc/UserSettings/UserCloudProviderSettings' -export const Component = React.createClass({ +export class Component extends React.Component { componentWillMount() { this.props.getUser({ userId: this.props.auth.user._id, force: true, }) - }, - saveUser() { + } + + saveUser = () => { this.props.saveUser({ user: this.props.user.data }) - }, + }; + render() { const { entityModel, user, auth, authenticate, unlink, logout } = this.props const getInner = () => ( @@ -67,8 +69,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} //
//

Beta

diff --git a/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsApplicationPage/SettingsApplicationPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsApplicationPage/SettingsApplicationPage.jsx index 7c2f47ce..c5769a37 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsApplicationPage/SettingsApplicationPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsApplicationPage/SettingsApplicationPage.jsx @@ -43,21 +43,24 @@ const toggleStyle = { } -export const Component = React.createClass({ +export class Component extends React.Component { componentDidMount() { this.props.getStatus() - }, - confirmReset() { + } + + confirmReset = () => { const { storeChange, showConfirm } = this.props showConfirm({ message: 'This will clear all data and reset the application back to factory settings. This can be useful if some data has been corrupted.', }).then(() => storeChange('', undefined)) - }, - showReleaseModal() { + }; + + showReleaseModal = () => { this.props.showModal({ modalType: releaseNotesModalName, }) - }, + }; + render() { const { system, autoLaunch, autoUpdate, getProviderPath, relaunch, toggle, installUpdate, checkForUpdates } = this.props @@ -162,8 +165,8 @@ export const Component = React.createClass({
) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsPage.jsx b/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsPage.jsx index 596fbdb3..17558c62 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsPage.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/SettingsPage/SettingsPage.jsx @@ -21,7 +21,7 @@ import NavPill from 'stemn-shared/misc/Buttons/NavPill/NavPill' // /////////////////////////////// COMPONENT ///////////////////////////////// // /////////////////////////////////////////////////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { auth } = this.props return ( @@ -47,8 +47,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////////////////////////////////////////////////// // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/main/pages/Template/Template.jsx b/stemn-frontend-desktop/app/renderer/main/pages/Template/Template.jsx index f93d438e..7879eef9 100644 --- a/stemn-frontend-desktop/app/renderer/main/pages/Template/Template.jsx +++ b/stemn-frontend-desktop/app/renderer/main/pages/Template/Template.jsx @@ -16,13 +16,13 @@ import classNames from 'classnames' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { return (
) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx b/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx index 6df16553..59739f68 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/modules/Sidebar/Sidebar.jsx @@ -24,7 +24,7 @@ import Input from 'stemn-shared/misc/Input/Input/Input' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { projects, sidebar, dispatch } = this.props @@ -61,8 +61,8 @@ export const Component = React.createClass({
) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/menubar/modules/Toolbar/Toolbar.jsx b/stemn-frontend-desktop/app/renderer/menubar/modules/Toolbar/Toolbar.jsx index 87a3f9d0..a47b7134 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/modules/Toolbar/Toolbar.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/modules/Toolbar/Toolbar.jsx @@ -24,7 +24,7 @@ import MdOpenInNew from 'react-icons/md/open-in-new' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { menu, children, dispatch } = this.props @@ -83,8 +83,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/menubar/pages/AppAuthedPage/AppAuthedPage.jsx b/stemn-frontend-desktop/app/renderer/menubar/pages/AppAuthedPage/AppAuthedPage.jsx index 1e0c9735..362e5636 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/pages/AppAuthedPage/AppAuthedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/pages/AppAuthedPage/AppAuthedPage.jsx @@ -12,17 +12,19 @@ import Sidebar from 'stemn-frontend-desktop/app/renderer/menubar/modu // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ - onMount(nextProps, prevProps) { +export class Component extends React.Component { + onMount = (nextProps, prevProps) => { if (!nextProps.auth.authToken || !nextProps.auth.user._id) { nextProps.dispatch(push('/login')) } if (!has(nextProps, 'params.stub') || nextProps.activeProject != nextProps.params.stub) { nextProps.dispatch(push(`/project/${nextProps.activeProject}`)) } - }, - componentWillMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, + }; + + componentWillMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } + render() { const { children } = this.props @@ -32,8 +34,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/menubar/pages/AppUnAuthedPage/AppUnAuthedPage.jsx b/stemn-frontend-desktop/app/renderer/menubar/pages/AppUnAuthedPage/AppUnAuthedPage.jsx index bc7c60c6..97085def 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/pages/AppUnAuthedPage/AppUnAuthedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/pages/AppUnAuthedPage/AppUnAuthedPage.jsx @@ -10,17 +10,18 @@ import React from 'react' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { componentWillReceiveProps(nextProps, prevProps) { if (nextProps.auth.authToken && nextProps.auth.user._id) { nextProps.dispatch(push('/')) } - }, + } + render() { const { children } = this.props return children - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/menubar/pages/LoginPage/LoginPage.jsx b/stemn-frontend-desktop/app/renderer/menubar/pages/LoginPage/LoginPage.jsx index dc18e7e8..81680137 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/pages/LoginPage/LoginPage.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/pages/LoginPage/LoginPage.jsx @@ -23,7 +23,7 @@ import Button from 'stemn-shared/misc/Buttons/Button/Button.jsx' // event.sender.send('tray-removed') // trayIcon.destroy() -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { AuthActions, auth, dispatch } = this.props return ( @@ -53,8 +53,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/menubar/pages/ProjectPage/ProjectPage.jsx b/stemn-frontend-desktop/app/renderer/menubar/pages/ProjectPage/ProjectPage.jsx index 2af1f39f..dd4b3fcf 100644 --- a/stemn-frontend-desktop/app/renderer/menubar/pages/ProjectPage/ProjectPage.jsx +++ b/stemn-frontend-desktop/app/renderer/menubar/pages/ProjectPage/ProjectPage.jsx @@ -21,8 +21,8 @@ import cloudLocked from 'stemn-shared/assets/images/pure-vectors/cloud-lo import * as stringConcat from 'stemn-shared/utils/stringConcat' -export const Component = React.createClass({ - onMount(nextProps, prevProps) { +export class Component extends React.Component { + onMount = (nextProps, prevProps) => { // If project has changed if (!prevProps || nextProps.projectId != prevProps.projectId) { // Set the project to active @@ -32,32 +32,38 @@ export const Component = React.createClass({ nextProps.changesActions.fetchChanges({ projectId: nextProps.projectId }) } } - }, - componentWillMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, - refresh() { + }; + + componentWillMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } + + refresh = () => { this.props.changesActions.fetchChanges({ projectId: this.props.project.data._id, }) - }, - toggleAll({ value }) { + }; + + toggleAll = ({ value }) => { return this.props.changesActions.toggleAll({ value, projectId: this.props.project.data._id, }) - }, - commitFn() { + }; + + commitFn = () => { this.props.changesActions.commit({ projectId: this.props.project.data._id, name: this.props.changes.name, body: this.props.changes.body, }) - }, - deselect() { + }; + + deselect = () => { this.props.changesActions.deselect({ projectId: this.props.project.data._id, }) - }, + }; + render() { const { changes, project, changesActions, entityModel, projectId, dispatch } = this.props @@ -121,8 +127,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/preview/pages/AppAuthedPage/AppAuthedPage.jsx b/stemn-frontend-desktop/app/renderer/preview/pages/AppAuthedPage/AppAuthedPage.jsx index 86d7fd76..35d77ed8 100644 --- a/stemn-frontend-desktop/app/renderer/preview/pages/AppAuthedPage/AppAuthedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/preview/pages/AppAuthedPage/AppAuthedPage.jsx @@ -7,17 +7,18 @@ import React from 'react' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { componentWillReceiveProps(nextProps, prevProps) { if (!nextProps.auth.authToken || !nextProps.auth.user._id) { nextProps.dispatch(push('/login')) } - }, + } + render() { const { children } = this.props return children - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/preview/pages/AppUnAuthedPage/AppUnAuthedPage.jsx b/stemn-frontend-desktop/app/renderer/preview/pages/AppUnAuthedPage/AppUnAuthedPage.jsx index 39ba4e07..45081ef3 100644 --- a/stemn-frontend-desktop/app/renderer/preview/pages/AppUnAuthedPage/AppUnAuthedPage.jsx +++ b/stemn-frontend-desktop/app/renderer/preview/pages/AppUnAuthedPage/AppUnAuthedPage.jsx @@ -7,17 +7,18 @@ import React from 'react' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { componentWillReceiveProps(nextProps, prevProps) { if (nextProps.auth.authToken && nextProps.auth.user._id) { nextProps.dispatch(push('/')) } - }, + } + render() { const { children } = this.props return children - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-desktop/app/renderer/preview/pages/LoginPage/LoginPage.jsx b/stemn-frontend-desktop/app/renderer/preview/pages/LoginPage/LoginPage.jsx index a612898f..0993ece0 100644 --- a/stemn-frontend-desktop/app/renderer/preview/pages/LoginPage/LoginPage.jsx +++ b/stemn-frontend-desktop/app/renderer/preview/pages/LoginPage/LoginPage.jsx @@ -23,7 +23,7 @@ import Button from 'stemn-shared/misc/Buttons/Button/Button.jsx' // event.sender.send('tray-removed') // trayIcon.destroy() -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { AuthActions, auth, dispatch } = this.props return ( @@ -36,8 +36,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-shared/src/misc/AnimateShow/AnimateShow.jsx b/stemn-frontend-shared/src/misc/AnimateShow/AnimateShow.jsx index 719141db..17691dbe 100644 --- a/stemn-frontend-shared/src/misc/AnimateShow/AnimateShow.jsx +++ b/stemn-frontend-shared/src/misc/AnimateShow/AnimateShow.jsx @@ -2,19 +2,19 @@ import React from 'react' import classNames from 'classnames' -export default React.createClass({ - getInitialState() { - return { - showContent: this.props.show, - } - }, +export default class extends React.Component { + state = { + showContent: this.props.show, + }; + componentWillReceiveProps(nextProps) { if (nextProps.show == false) { setTimeout(() => this.setState({ showContent: false }), 300) } else { this.setState({ showContent: true }) } - }, + } + render() { const getInner = () => { if (this.state.showContent) { @@ -26,5 +26,5 @@ export default React.createClass({ {getInner()} ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Avatar/UserAvatar/UserAvatar.jsx b/stemn-frontend-shared/src/misc/Avatar/UserAvatar/UserAvatar.jsx index 875b4ad8..e3579a02 100644 --- a/stemn-frontend-shared/src/misc/Avatar/UserAvatar/UserAvatar.jsx +++ b/stemn-frontend-shared/src/misc/Avatar/UserAvatar/UserAvatar.jsx @@ -7,7 +7,7 @@ const colours = [ '#A5D6A7', '#00C853', '#64DD17', '#E6EE9C', '#AEEA00', '#FFD600', '#FFAB00', '#FF6D00', '#FFAB91', '#DD2600', '#455A64', '#263238', ] -export default React.createClass({ +export default class extends React.Component { render() { // display: 'contain' (Default: 'cover') const { style, shape, size, className, picture, title, name, display } = this.props @@ -65,5 +65,5 @@ export default React.createClass({ {name ? initials : ''} ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Avatar/UserAvatars/UserAvatars.jsx b/stemn-frontend-shared/src/misc/Avatar/UserAvatars/UserAvatars.jsx index 11db0c52..a3ba93ae 100644 --- a/stemn-frontend-shared/src/misc/Avatar/UserAvatars/UserAvatars.jsx +++ b/stemn-frontend-shared/src/misc/Avatar/UserAvatars/UserAvatars.jsx @@ -2,7 +2,7 @@ import React from 'react' import UserAvatar from '../UserAvatar/UserAvatar.jsx' -export default React.createClass({ +export default class extends React.Component { render() { const { users, limit, shape, size, className } = this.props @@ -43,5 +43,5 @@ export default React.createClass({ } return null - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Banner/Banner.jsx b/stemn-frontend-shared/src/misc/Banner/Banner.jsx index 2430839e..56747c73 100644 --- a/stemn-frontend-shared/src/misc/Banner/Banner.jsx +++ b/stemn-frontend-shared/src/misc/Banner/Banner.jsx @@ -4,7 +4,7 @@ import React from 'react' import classNames from 'classnames' import classes from './Banner.css' -export default React.createClass({ +export default class extends React.Component { render() { const { children, type, style } = this.props return ( @@ -12,5 +12,5 @@ export default React.createClass({ {children} ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Buttons/ProgressButton/ProgressButton.jsx b/stemn-frontend-shared/src/misc/Buttons/ProgressButton/ProgressButton.jsx index 3a0d560b..e480f683 100644 --- a/stemn-frontend-shared/src/misc/Buttons/ProgressButton/ProgressButton.jsx +++ b/stemn-frontend-shared/src/misc/Buttons/ProgressButton/ProgressButton.jsx @@ -5,8 +5,9 @@ import classNames from 'classnames' import classes from './ProgressButton.css' -export const AnimateSvg = React.createClass({ - svgEl: '', +export class AnimateSvg extends React.Component { + svgEl = ''; + render() { const { children, draw } = this.props const newProps = { @@ -19,18 +20,17 @@ export const AnimateSvg = React.createClass({ this.svgEl.draw(draw) } return React.cloneElement(children, newProps) - }, -}) - -export default React.createClass({ - getInitialState() { - return { - status: '', - disabled: false, - drawLoading: 0, - drawSuccess: 0, - } - }, + } +} + +export default class extends React.Component { + state = { + status: '', + disabled: false, + drawLoading: 0, + drawSuccess: 0, + }; + componentWillReceiveProps(nextProps) { const prevProps = this.props @@ -42,21 +42,25 @@ export default React.createClass({ else if (prevProps && prevProps.loading && !nextProps.loading) { this.loadingComplete() } - }, - partialLoadTimeout: null, - completeTimeout: null, - completeIconTimeout: null, - resetTimeout: null, - clearTimeouts() { + } + + partialLoadTimeout = null; + completeTimeout = null; + completeIconTimeout = null; + resetTimeout = null; + + clearTimeouts = () => { clearTimeout(this.partialLoadTimeout) clearTimeout(this.completeTimeout) clearTimeout(this.completeIconTimeout) clearTimeout(this.resetTimeout) - }, + }; + componentWillUnmount() { this.clearTimeouts() - }, - startLoading() { + } + + startLoading = () => { this.clearTimeouts() this.setState({ status: 'loading', @@ -65,8 +69,9 @@ export default React.createClass({ drawComplete: 0, }) this.partialLoadTimeout = setTimeout(() => { this.setState({ drawLoading: 0.7 }) }, 100) - }, - loadingComplete() { + }; + + loadingComplete = () => { this.clearTimeouts() this.setState({ drawLoading: 1 }) @@ -79,7 +84,8 @@ export default React.createClass({ this.setState({ status: '', disabled: false, drawLoading: 0 }) }, 2000) }, 700) - }, + }; + render() { const { children, onClick, loading, className, href, error, ...otherProps } = this.props const { status, disabled, drawLoading, drawComplete } = this.state @@ -130,8 +136,8 @@ export default React.createClass({ { getIcon() } ) - }, -}) + } +} // ////////////////////////////////////////////////////////// diff --git a/stemn-frontend-shared/src/misc/Calendar/DatePicker/DatePicker.jsx b/stemn-frontend-shared/src/misc/Calendar/DatePicker/DatePicker.jsx index 6f806887..4660a053 100644 --- a/stemn-frontend-shared/src/misc/Calendar/DatePicker/DatePicker.jsx +++ b/stemn-frontend-shared/src/misc/Calendar/DatePicker/DatePicker.jsx @@ -12,20 +12,21 @@ import MdExpandMore from 'react-icons/md/expand-more' import MdClose from 'react-icons/md/close' import Button from 'stemn-shared/misc/Buttons/Button/Button' -export const Component = React.createClass({ - getInitialState() { - return { - viewDate: moment(), - calendarIsOpen: false, - } - }, - toggleCalendar(openStatus) { +export class Component extends React.Component { + state = { + viewDate: moment(), + calendarIsOpen: false, + }; + + toggleCalendar = (openStatus) => { this.setState({ calendarIsOpen: openStatus === undefined ? !this.state.calendarIsOpen : openStatus }) - }, - selectDate(date) { + }; + + selectDate = (date) => { this.props.dispatch(storeChange(this.props.model, date ? date.format() : '')) if (this.props.onChange) { this.props.onChange() } - }, + }; + render() { const { viewDate, calendarIsOpen } = this.state const { model, value, dispatch, onChange, className, style, ...otherProps } = this.props @@ -87,8 +88,8 @@ export const Component = React.createClass({ { content } ) - }, -}) + } +} export default connect()(Component) diff --git a/stemn-frontend-shared/src/misc/Changes/CommitBox/CommitBox.jsx b/stemn-frontend-shared/src/misc/Changes/CommitBox/CommitBox.jsx index d58f5510..408dee56 100644 --- a/stemn-frontend-shared/src/misc/Changes/CommitBox/CommitBox.jsx +++ b/stemn-frontend-shared/src/misc/Changes/CommitBox/CommitBox.jsx @@ -32,7 +32,7 @@ import { MentionsInput, Mention } from 'react-mentions' // /////////////////////////////////////////////////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { entityModel, changes, electronWindowsActions, changesActions, className } = this.props const noChangesChecked = !some(changes.checked) @@ -96,8 +96,8 @@ export const Component = React.createClass({ ) - }, -}) + } +} // /////////////////////////////////////////////////////////////////////////// diff --git a/stemn-frontend-shared/src/misc/Changes/CommitChanges/CommitChanges.jsx b/stemn-frontend-shared/src/misc/Changes/CommitChanges/CommitChanges.jsx index b91011ec..6824c3e9 100644 --- a/stemn-frontend-shared/src/misc/Changes/CommitChanges/CommitChanges.jsx +++ b/stemn-frontend-shared/src/misc/Changes/CommitChanges/CommitChanges.jsx @@ -26,7 +26,7 @@ const contextIdentifier = 'FileChangeCm' const FileChangeRowContext = ContextMenuLayer(contextIdentifier, props => props.item)(FileChangeRow) -export default React.createClass({ +export default class extends React.Component { render() { const { changes, project, toggleAll, refresh, selectedFileChange, deselect, loading, dispatch, initialSync } = this.props const isInitialSync = initialSync && changes.data.length == 0 @@ -95,5 +95,5 @@ export default React.createClass({ /> ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeRow.jsx b/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeRow.jsx index a6922018..30d1dc5a 100644 --- a/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeRow.jsx +++ b/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeRow.jsx @@ -14,7 +14,7 @@ import Change from 'stemn-shared/assets/icons/changes/change.js' // Styles import styles from './FileChangeRow.css' -export default React.createClass({ +export default class extends React.Component { render() { const { item, model, value, text, clickFn, isActive, status } = this.props // status == 'created' || 'modified' || 'deleted' @@ -60,5 +60,5 @@ export default React.createClass({ ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeTitleRow.jsx b/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeTitleRow.jsx index 3a80ffa8..b55f04b6 100644 --- a/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeTitleRow.jsx +++ b/stemn-frontend-shared/src/misc/Changes/CommitChanges/FileChangeTitleRow.jsx @@ -8,7 +8,7 @@ import Walkthrough from 'stemn-shared/misc/Walkthrough/Walkthrough.jsx' // Styles import styles from './FileChangeTitleRow.css' -export default React.createClass({ +export default class extends React.Component { render() { const { model, value, checkbox, changeAction, children, text } = this.props return ( @@ -29,5 +29,5 @@ export default React.createClass({ {children} ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/ContextMenu/ContextMenu.jsx b/stemn-frontend-shared/src/misc/ContextMenu/ContextMenu.jsx index d06f66f7..bceb1e5c 100644 --- a/stemn-frontend-shared/src/misc/ContextMenu/ContextMenu.jsx +++ b/stemn-frontend-shared/src/misc/ContextMenu/ContextMenu.jsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { ContextMenu, MenuItem, SubMenu, connect } from 'react-contextmenu' import './ContextMenu.global.css' -const AdvancedMenuItem = React.createClass({ +class AdvancedMenuItem extends React.Component { render() { const { menuItem, item } = this.props if (menuItem.subMenu) { @@ -28,11 +28,12 @@ const AdvancedMenuItem = React.createClass({ ) : null - }, -}) + } +} + +class Menu extends React.Component { + static displayName = 'Menu'; -const Menu = React.createClass({ - displayName: 'Menu', render() { const { menu, identifier, item } = this.props return ( @@ -40,7 +41,7 @@ const Menu = React.createClass({ {menu ? menu.map(menuItem => ) : null} ) - }, -}) + } +} export default connect(Menu) diff --git a/stemn-frontend-shared/src/misc/DragResize/DragResize.jsx b/stemn-frontend-shared/src/misc/DragResize/DragResize.jsx index e0be4049..d3fd28d2 100644 --- a/stemn-frontend-shared/src/misc/DragResize/DragResize.jsx +++ b/stemn-frontend-shared/src/misc/DragResize/DragResize.jsx @@ -7,13 +7,11 @@ import classNames from 'classnames' import classes from './DragResize.css' -const DraggerComponent = React.createClass({ - getInitialState() { - return { - lastEventId: null, - active: false, - } - }, +class DraggerComponent extends React.Component { + state = { + lastEventId: null, + active: false, + }; componentWillReceiveProps(nextProps) { if (nextProps.dataDrag.isMoving && nextProps.dataDrag.id && nextProps.dataDrag.id != this.state.lastEventId) { @@ -30,7 +28,7 @@ const DraggerComponent = React.createClass({ } else { this.setState({ active: false }) } - }, + } render() { const styles = { @@ -71,19 +69,22 @@ const DraggerComponent = React.createClass({ return (
) - }, -}) + } +} const Dragger = clickDrag(DraggerComponent, { touch: true }) -export default React.createClass({ - getInitialState() { - if (this.props.width) { - return { width: parseInt(this.props.width) } - } else if (this.props.height) { - return { height: parseInt(this.props.height) } +export default class extends React.Component { + constructor(props) { + super(props); + if (props.width) { + this.state = { width: parseInt(props.width) }; + return; + } else if (props.height) { + this.state = { height: parseInt(props.height) }; + return; } - }, + } componentWillReceiveProps(nextProps) { if (nextProps.animateHide != this.props.animateHide) { @@ -94,9 +95,9 @@ export default React.createClass({ } setTimeout(() => this.setState({ animate: false }), 300) } - }, + } - drag(change) { + drag = (change) => { const { widthRange, heightRange } = this.props if (change.deltaX) { let width = parseInt(this.state.width) + change.deltaX @@ -111,7 +112,8 @@ export default React.createClass({ } this.setState({ height }) } - }, + }; + render() { const style = { width: `${this.state.width}px`, @@ -124,5 +126,5 @@ export default React.createClass({
) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Editor/MarkdownButton/MarkdownButton.jsx b/stemn-frontend-shared/src/misc/Editor/MarkdownButton/MarkdownButton.jsx index dfd7881d..694c0a29 100644 --- a/stemn-frontend-shared/src/misc/Editor/MarkdownButton/MarkdownButton.jsx +++ b/stemn-frontend-shared/src/misc/Editor/MarkdownButton/MarkdownButton.jsx @@ -4,7 +4,7 @@ import classNames from 'classnames' import classes from './MarkdownButton.css' import Markdown from 'stemn-shared/assets/icons/editor/markdown.js' -export default React.createClass({ +export default class extends React.Component { render() { const { children, style, className } = this.props return ( @@ -20,5 +20,5 @@ export default React.createClass({ : null } ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/FileCompare/FileCompareInner/FileCompareSlider/FileCompareSlider.jsx b/stemn-frontend-shared/src/misc/FileCompare/FileCompareInner/FileCompareSlider/FileCompareSlider.jsx index 06326242..a589ecab 100644 --- a/stemn-frontend-shared/src/misc/FileCompare/FileCompareInner/FileCompareSlider/FileCompareSlider.jsx +++ b/stemn-frontend-shared/src/misc/FileCompare/FileCompareInner/FileCompareSlider/FileCompareSlider.jsx @@ -7,13 +7,11 @@ import classes from './FileCompareSlider.css' import clickDrag from 'react-clickdrag' -const Component = React.createClass({ - getInitialState() { - return { - active: false, - lastEventId: '', - } - }, +class Component extends React.Component { + state = { + active: false, + lastEventId: '', + }; componentWillReceiveProps(nextProps) { if (nextProps.dataDrag.isMoving && nextProps.dataDrag.id && nextProps.dataDrag.id != this.state.lastEventId) { @@ -28,15 +26,15 @@ const Component = React.createClass({ } else { this.setState({ active: false }) } - }, + } render() { const translation = `${this.props.position}%` return (
) - }, -}) + } +} export default clickDrag(Component, { touch: true }) diff --git a/stemn-frontend-shared/src/misc/FileCompare/FileCompareMenu/FileCompareMenu.desktop.jsx b/stemn-frontend-shared/src/misc/FileCompare/FileCompareMenu/FileCompareMenu.desktop.jsx index ecfd3912..1a14244b 100644 --- a/stemn-frontend-shared/src/misc/FileCompare/FileCompareMenu/FileCompareMenu.desktop.jsx +++ b/stemn-frontend-shared/src/misc/FileCompare/FileCompareMenu/FileCompareMenu.desktop.jsx @@ -17,8 +17,8 @@ import downloadModalName from 'stemn-shared/misc/Files/Download/DownloadModal' import MdMoreHoriz from 'react-icons/md/more-horiz' import MdOpenInNew from 'react-icons/md/open-in-new' -export const Component = React.createClass({ - menu() { +export class Component extends React.Component { + menu = () => { const { file1, revisions, dispatch, isChange } = this.props const discardChanges = { label: 'Discard Changes', @@ -69,8 +69,9 @@ export const Component = React.createClass({ })), } return isChange ? [discardChanges, openFile, openFolder] : [openFile, openFolder, downloadFile, viewOnline] - }, - preview() { + }; + + preview = () => { const { file1, dispatch } = this.props dispatch(ElectronWindowsActions.create({ type: 'PREVIEW', @@ -80,7 +81,8 @@ export const Component = React.createClass({ projectId: file1.project._id, }, })) - }, + }; + render() { const { enablePreview, mode, changeMode, revisions, file1, file2, dispatch } = this.props @@ -125,8 +127,8 @@ export const Component = React.createClass({
) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-shared/src/misc/FileList/components/FileIcon.jsx b/stemn-frontend-shared/src/misc/FileList/components/FileIcon.jsx index 5adde5c4..d23871c8 100644 --- a/stemn-frontend-shared/src/misc/FileList/components/FileIcon.jsx +++ b/stemn-frontend-shared/src/misc/FileList/components/FileIcon.jsx @@ -4,12 +4,11 @@ const fileTypeIcons = require.context('../filetype', true) // Styles import classNames from 'classnames' -export default React.createClass({ - getDefaultProps() { - return { - size: 30, - } - }, +export default class extends React.Component { + static defaultProps = { + size: 30, + }; + render() { let fileType let isOther = false @@ -56,5 +55,5 @@ export default React.createClass({ {isOther ? {fileType} : null} ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx b/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx index 4fd600ed..a03fbaa3 100644 --- a/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx +++ b/stemn-frontend-shared/src/misc/FileList/components/FileListPopup.jsx @@ -35,7 +35,7 @@ const propTypesObject = { } -export const FileRow = React.createClass({ +export class FileRow extends React.Component { render() { const { file, isActive, clickFn } = this.props return ( @@ -44,11 +44,12 @@ export const FileRow = React.createClass({
{file.name}
) - }, -}) + } +} + +export class FileListPopup extends React.Component { + static propTypes = propTypesObject; -export const FileListPopup = React.createClass({ - propTypes: propTypesObject, // componentWillMount() { // this.onMount(this.props) // }, @@ -107,8 +108,8 @@ export const FileListPopup = React.createClass({ } ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx b/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx index 83f7ee3a..80f9ff7d 100644 --- a/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx +++ b/stemn-frontend-shared/src/misc/FileSelect/FileSelectModal/FileSelectModal.jsx @@ -22,19 +22,21 @@ const propTypesObject = { }), } -export default React.createClass({ - propTypes: propTypesObject, - componentWillMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, - onMount(nextProps, prevProps) { +export default class extends React.Component { + static propTypes = propTypesObject; + componentWillMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } + + onMount = (nextProps, prevProps) => { if (!nextProps.fileSelect) { nextProps.init({ storeKey: nextProps.storeKey, path: nextProps.path, }) } - }, - singleClickFn({ file }) { + }; + + singleClickFn = ({ file }) => { if (file.type == 'file' || this.props.options.allowFolder && file.type == 'folder') { this.props.select({ storeKey: this.props.storeKey, @@ -46,8 +48,9 @@ export default React.createClass({ path: file.fileId, }) } - }, - doubleClickFn({ file }) { + }; + + doubleClickFn = ({ file }) => { if (file.type == 'folder') { this.props.changePath({ storeKey: this.props.storeKey, @@ -59,23 +62,27 @@ export default React.createClass({ file, }) } - }, - crumbClickFn({ file }) { + }; + + crumbClickFn = ({ file }) => { this.props.changePath({ storeKey: this.props.storeKey, path: file.fileId, }) - }, - submit() { + }; + + submit = () => { this.props.storeChange(this.props.model, { fileId: this.props.fileSelect.selected.fileId, path: this.props.fileSelect.selected.path, }) this.props.modalConfirm() - }, - cancel() { + }; + + cancel = () => { this.props.modalCancel() - }, + }; + render() { const { projectId, path, fileSelect, options } = this.props @@ -118,5 +125,5 @@ export default React.createClass({ ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx b/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx index 4730e22d..0b2ec6e9 100644 --- a/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx +++ b/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInput.jsx @@ -25,8 +25,8 @@ const propTypesObject = { disabled: PropTypes.bool, // Should we disable the input } -const FileSelectInput = React.createClass({ - showModal() { +class FileSelectInput extends React.Component { + showModal = () => { this.props.ModalActions.showModal({ modalType: fileSelectModalName, modalProps: { @@ -43,14 +43,16 @@ const FileSelectInput = React.createClass({ }, }, }) - }, - clearValue() { + }; + + clearValue = () => { const { storeChange, model } = this.props storeChange(model, { path: undefined, fileId: undefined, }) - }, + }; + render() { const { provider, model, value, disabled } = this.props @@ -96,8 +98,8 @@ const FileSelectInput = React.createClass({ ) - }, -}) + } +} function mapStateToProps() { diff --git a/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInputElectron.jsx b/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInputElectron.jsx index 4ec20c65..c9e6de25 100644 --- a/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInputElectron.jsx +++ b/stemn-frontend-shared/src/misc/FileSelectInput/FileSelectInputElectron.jsx @@ -10,8 +10,8 @@ import MdFolder from 'react-icons/md/folder' import SimpleIconButton from 'stemn-shared/misc/Buttons/SimpleIconButton/SimpleIconButton.jsx' import TextDisplayBox from 'stemn-shared/misc/TextDisplayBox/TextDisplayBox.jsx' -const Component = React.createClass({ - showModal() { +class Component extends React.Component { + showModal = () => { remote.dialog.showOpenDialog(null, { title: this.props.title, defaultPath: this.props.value, @@ -22,7 +22,8 @@ const Component = React.createClass({ this.props.dispatch(storeChange(this.props.model, files[0])) } }) - }, + }; + render() { const { model, value, children, placeholder } = this.props return ( @@ -37,8 +38,8 @@ const Component = React.createClass({ ) - }, -}) + } +} function mapStateToProps() { return {} diff --git a/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx b/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx index 0687dd00..def61ded 100644 --- a/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx +++ b/stemn-frontend-shared/src/misc/Files/Download/DownloadModal/DownloadModal.jsx @@ -19,8 +19,9 @@ const propTypesObject = { file: PropTypes.object.isRequired, // File object } -export default React.createClass({ - propTypes: propTypesObject, +export default class extends React.Component { + static propTypes = propTypesObject; + componentWillMount() { const { file, fetchTimeline } = this.props if (file.project && file.project._id) { @@ -39,7 +40,8 @@ export default React.createClass({ cacheKey: file.fileId, }) } - }, + } + render() { const { syncTimeline, modalCancel, modalConfirm } = this.props @@ -70,5 +72,5 @@ export default React.createClass({ ) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFound.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFound.jsx index f6b9dfd9..f78cd090 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFound.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFound.jsx @@ -5,7 +5,7 @@ import * as ModalActions from 'stemn-shared/misc/Modal/Modal.actions.js' import assemblyPartNotFoundModalName from 'stemn-shared/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFoundModal' import classes from './AssemblyPartNotFound.scss' -export const AssemblyPartNotFound = React.createClass({ +export class AssemblyPartNotFound extends React.Component { render() { const { dispatch, parts } = this.props @@ -26,8 +26,8 @@ export const AssemblyPartNotFound = React.createClass({ ) - }, -}) + } +} export default connect()(AssemblyPartNotFound) diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFoundModal/AssemblyPartNotFoundModal.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFoundModal/AssemblyPartNotFoundModal.jsx index d97110aa..6382bbb3 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFoundModal/AssemblyPartNotFoundModal.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/AssemblyPartNotFound/AssemblyPartNotFoundModal/AssemblyPartNotFoundModal.jsx @@ -3,7 +3,7 @@ import Button from 'stemn-shared/misc/Buttons/Button/Button' import StandardTable from 'stemn-shared/misc/Tables/StandardTable/StandardTable.jsx' import classNames from 'classnames' -const Component = React.createClass({ +class Component extends React.Component { render() { const { modalCancel, modalConfirm } = this.props const { parts } = this.props @@ -26,7 +26,7 @@ const Component = React.createClass({ ) - }, -}) + } +} export default Component diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/File404/File404.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/File404/File404.jsx index 21d44041..15084617 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/File404/File404.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/File404/File404.jsx @@ -2,7 +2,7 @@ import React from 'react' import file from 'stemn-shared/assets/images/pure-vectors/file.svg' -export const File404 = React.createClass({ +export class File404 extends React.Component { render() { return (
@@ -13,7 +13,7 @@ export const File404 = React.createClass({
) - }, -}) + } +} export default File404 diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/FileEmpty/FileEmpty.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/FileEmpty/FileEmpty.jsx index 4aeb9704..146c53a4 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/FileEmpty/FileEmpty.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/FileEmpty/FileEmpty.jsx @@ -2,7 +2,7 @@ import React from 'react' import file from 'stemn-shared/assets/images/pure-vectors/file.svg' -export const FileEmpty = React.createClass({ +export class FileEmpty extends React.Component { render() { return (
@@ -13,7 +13,7 @@ export const FileEmpty = React.createClass({
) - }, -}) + } +} export default FileEmpty diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/Messages.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/Messages.jsx index b0e2ec7c..6d8f4219 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/Messages.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/Messages.jsx @@ -3,7 +3,7 @@ import PreviewExpired from './PreviewExpired/PreviewExpired.jsx' import AssemblyPartNotFound from './AssemblyPartNotFound/AssemblyPartNotFound.jsx' import File404 from './File404/File404.jsx' -export default React.createClass({ +export default class extends React.Component { render() { const { error, fileMeta } = this.props @@ -23,5 +23,5 @@ export default React.createClass({
{error.message}
) - }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpired.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpired.jsx index b4689b3f..47c24a12 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpired.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpired.jsx @@ -5,7 +5,7 @@ import { connect } from 'react-redux' import * as ModalActions from 'stemn-shared/misc/Modal/Modal.actions.js' import previewExpiredModalName from 'stemn-shared/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpiredModal' -export const PreviewExpired = React.createClass({ +export class PreviewExpired extends React.Component { render() { const { provider, dispatch } = this.props @@ -21,7 +21,7 @@ export const PreviewExpired = React.createClass({ ) - }, -}) + } +} export default connect()(PreviewExpired) diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpiredModal/PreviewExpiredModal.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpiredModal/PreviewExpiredModal.jsx index d5be2c28..139bf431 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpiredModal/PreviewExpiredModal.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/Messages/PreviewExpired/PreviewExpiredModal/PreviewExpiredModal.jsx @@ -4,7 +4,7 @@ import Button from 'stemn-shared/misc/Buttons/Button/Button' import StandardTable from 'stemn-shared/misc/Tables/StandardTable/StandardTable.jsx' import classNames from 'classnames' -const Component = React.createClass({ +class Component extends React.Component { render() { const { modalCancel, modalConfirm } = this.props const { provider } = this.props @@ -72,7 +72,7 @@ const Component = React.createClass({ ) - }, -}) + } +} export default Component diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx index f371f883..441d8ee3 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/AssemblyParts/AssemblyParts.jsx @@ -18,7 +18,7 @@ const propTypesObject = { clickFn: PropTypes.func.isRequired, // clickFn(part) - Run when a part is clicked } -export const Row = React.createClass({ +export class Row extends React.Component { render() { const { file, clickFn } = this.props const timeFromNow = moment(file.modified).fromNow() @@ -28,12 +28,13 @@ export const Row = React.createClass({
{timeFromNow}
) - }, -}) + } +} -export const AssemblyParts = React.createClass({ - propTypes: propTypesObject, - onMount(nextProps, prevProps) { +export class AssemblyParts extends React.Component { + static propTypes = propTypesObject; + + onMount = (nextProps, prevProps) => { if (!prevProps || nextProps.fileMeta != prevProps.fileMeta && nextProps.fileMeta.data) { if (isAssembly(nextProps.fileMeta.data.extension)) { nextProps.dispatch(getAssemblyParts({ @@ -50,9 +51,11 @@ export const AssemblyParts = React.createClass({ })) } } - }, - componentDidMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, + }; + + componentDidMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } + render() { const { parts, assemblies, clickFn } = this.props @@ -86,8 +89,8 @@ export const AssemblyParts = React.createClass({ } return null - }, -}) + } +} const mapStateToProps = ({ files }, { fileMeta }) => { const cacheKey = `${fileMeta.data.fileId}-${fileMeta.data.revisionId}` diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/PreviewCad.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/PreviewCad.jsx index 60683026..2b11a6d0 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/PreviewCad.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewCad/PreviewCad.jsx @@ -7,13 +7,12 @@ import modelLocked from 'stemn-shared/assets/images/pure-vectors/model-locked.sv import modelGear from 'stemn-shared/assets/images/pure-vectors/model-gear.svg' -export default React.createClass({ - getInitialState() { - return { - status: 'pending', - } - }, - onMount(nextProps, prevProps) { +export default class extends React.Component { + state = { + status: 'pending', + }; + + onMount = (nextProps, prevProps) => { if (!prevProps || nextProps.fileMeta != prevProps.fileMeta) { const { fileMeta, fileRender, renderFn } = nextProps this.setState({ status: 'pending' }) @@ -23,9 +22,10 @@ export default React.createClass({ this.setState({ status: 'disabled' }) } } - }, - componentDidMount() { this.onMount(this.props) }, - componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) }, + }; + + componentDidMount() { this.onMount(this.props) } + componentWillReceiveProps(nextProps) { this.onMount(nextProps, this.props) } render() { const { fileMeta, fileRender } = this.props @@ -43,5 +43,5 @@ export default React.createClass({ return } return
{ fileRender && fileRender.status ? fileRender.status : 'Rendering file...' }
- }, -}) + } +} diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewFile.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewFile.jsx index 5dcb3eec..6255e6fa 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewFile.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewFile.jsx @@ -19,7 +19,7 @@ import ErrorMessages from './Messages/Messages.jsx' // /////////////////////////////// COMPONENT ///////////////////////////////// -export const Component = React.createClass({ +export class Component extends React.Component { render() { const { file, fileData, fileRender, filesActions, header, event } = this.props const previewId = `${file.project._id}-${file.fileId}-${file.revisionId}` @@ -123,8 +123,8 @@ export const Component = React.createClass({ { getPreview() } ) - }, -}) + } +} // /////////////////////////////// CONTAINER ///////////////////////////////// diff --git a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx index 0f786db1..25400179 100644 --- a/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx +++ b/stemn-frontend-shared/src/misc/Files/PreviewFile/PreviewGdoc/PreviewGdoc.jsx @@ -1,6 +1,6 @@ import React from 'react' -export default React.createClass({ +export default class extends React.Component { render() { const { fileMeta } = this.props return ( @@ -8,5 +8,5 @@ export default React.createClass({