+ );
}
diff --git a/webapp/components/get_link_modal.jsx b/webapp/components/get_link_modal.jsx
index a7ce31f53..f9866c500 100644
--- a/webapp/components/get_link_modal.jsx
+++ b/webapp/components/get_link_modal.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -125,11 +127,11 @@ export default class GetLinkModal extends React.Component {
}
GetLinkModal.propTypes = {
- show: React.PropTypes.bool.isRequired,
- onHide: React.PropTypes.func.isRequired,
- title: React.PropTypes.string.isRequired,
- helpText: React.PropTypes.string,
- link: React.PropTypes.string.isRequired
+ show: PropTypes.bool.isRequired,
+ onHide: PropTypes.func.isRequired,
+ title: PropTypes.string.isRequired,
+ helpText: PropTypes.string,
+ link: PropTypes.string.isRequired
};
GetLinkModal.defaultProps = {
diff --git a/webapp/components/header_footer_template.jsx b/webapp/components/header_footer_template.jsx
index 6fb9c9046..9f6d40631 100644
--- a/webapp/components/header_footer_template.jsx
+++ b/webapp/components/header_footer_template.jsx
@@ -4,6 +4,8 @@
import $ from 'jquery';
import {FormattedMessage} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class NotLoggedIn extends React.Component {
@@ -104,5 +106,5 @@ NotLoggedIn.defaultProps = {
};
NotLoggedIn.propTypes = {
- children: React.PropTypes.object
+ children: PropTypes.object
};
diff --git a/webapp/components/help/components/attaching.jsx b/webapp/components/help/components/attaching.jsx
index 84c50004d..3013d744d 100644
--- a/webapp/components/help/components/attaching.jsx
+++ b/webapp/components/help/components/attaching.jsx
@@ -8,79 +8,77 @@ import {Link} from 'react-router/es6';
import React from 'react';
-export default class HelpAttaching extends React.Component {
- render() {
- const message = [];
- message.push(localizeMessage('help.attaching.title', '# Attaching Files\n_____'));
- message.push(localizeMessage('help.attaching.methods', '## Attachment Methods\nAttach a file by drag and drop or by clicking the attachment icon in the message input box.'));
- message.push(localizeMessage('help.attaching.dragdrop', '#### Drag and Drop\nUpload a file or selection of files by dragging the files from your computer into the RHS or center pane. Dragging and dropping attaches the files to the message input box, then you can optionally type a message and press **ENTER** to post.'));
- message.push(localizeMessage('help.attaching.icon', '#### Attachment Icon\nAlternatively, upload files by clicking the grey paperclip icon inside the message input box. This opens up your system file viewer where you can navigate to the desired files and then click **Open** to upload the files to the message input box. Optionally type a message and then press **ENTER** to post.'));
- message.push(localizeMessage('help.attaching.pasting', '#### Pasting Images\nOn Chrome and Edge browsers, it is also possible to upload files by pasting them from the clipboard. This is not yet supported on other browsers.'));
- message.push(localizeMessage('help.attaching.previewer', '## File Previewer\nMattermost has a built in file previewer that is used to view media, download files and share public links. Click the thumbnail of an attached file to open it in the file previewer.'));
- message.push('\n');
- message.push(localizeMessage('help.attaching.publicLinks', '#### Sharing Public Links\nPublic links allow you to share file attachments with people outside your Mattermost team. Open the file previewer by clicking on the thumbnail of an attachment, then click **Get Public Link**. This opens a dialog box with a link to copy. When the link is shared and opened by another user, the file will automatically download.'));
- message.push(localizeMessage('help.attaching.publicLinks2', 'If **Get Public Link** is not visible in the file previewer and you prefer the feature enabled, you can request that your System Admin enable the feature from the System Console under **Security** > **Public Links**.'));
- message.push('\n');
- message.push(localizeMessage('help.attaching.downloading', '#### Downloading Files\nDownload an attached file by clicking the download icon next to the file thumbnail or by opening the file previewer and clicking **Download**.'));
- message.push(localizeMessage('help.attaching.supported', '#### Supported Media Types\nIf you are trying to preview a media type that is not supported, the file previewer will open a standard media attachment icon. Supported media formats depend heavily on your browser and operating system, but the following formats are supported by Mattermost on most browsers:'));
- message.push(localizeMessage('help.attaching.supportedList', '- Images: BMP, GIF, JPG, JPEG, PNG\n- Video: MP4\n- Audio: MP3, M4A\n- Documents: PDF'));
- message.push(localizeMessage('help.attaching.notSupported', 'Document preview (Word, Excel, PPT) is not yet supported.'));
- message.push(localizeMessage('help.attaching.limitations', '## File Size Limitations\nMattermost supports a maximum of five attached files per post, each with a maximum file size of 50Mb.'));
+export default function HelpAttaching() {
+ const message = [];
+ message.push(localizeMessage('help.attaching.title', '# Attaching Files\n_____'));
+ message.push(localizeMessage('help.attaching.methods', '## Attachment Methods\nAttach a file by drag and drop or by clicking the attachment icon in the message input box.'));
+ message.push(localizeMessage('help.attaching.dragdrop', '#### Drag and Drop\nUpload a file or selection of files by dragging the files from your computer into the RHS or center pane. Dragging and dropping attaches the files to the message input box, then you can optionally type a message and press **ENTER** to post.'));
+ message.push(localizeMessage('help.attaching.icon', '#### Attachment Icon\nAlternatively, upload files by clicking the grey paperclip icon inside the message input box. This opens up your system file viewer where you can navigate to the desired files and then click **Open** to upload the files to the message input box. Optionally type a message and then press **ENTER** to post.'));
+ message.push(localizeMessage('help.attaching.pasting', '#### Pasting Images\nOn Chrome and Edge browsers, it is also possible to upload files by pasting them from the clipboard. This is not yet supported on other browsers.'));
+ message.push(localizeMessage('help.attaching.previewer', '## File Previewer\nMattermost has a built in file previewer that is used to view media, download files and share public links. Click the thumbnail of an attached file to open it in the file previewer.'));
+ message.push('\n');
+ message.push(localizeMessage('help.attaching.publicLinks', '#### Sharing Public Links\nPublic links allow you to share file attachments with people outside your Mattermost team. Open the file previewer by clicking on the thumbnail of an attachment, then click **Get Public Link**. This opens a dialog box with a link to copy. When the link is shared and opened by another user, the file will automatically download.'));
+ message.push(localizeMessage('help.attaching.publicLinks2', 'If **Get Public Link** is not visible in the file previewer and you prefer the feature enabled, you can request that your System Admin enable the feature from the System Console under **Security** > **Public Links**.'));
+ message.push('\n');
+ message.push(localizeMessage('help.attaching.downloading', '#### Downloading Files\nDownload an attached file by clicking the download icon next to the file thumbnail or by opening the file previewer and clicking **Download**.'));
+ message.push(localizeMessage('help.attaching.supported', '#### Supported Media Types\nIf you are trying to preview a media type that is not supported, the file previewer will open a standard media attachment icon. Supported media formats depend heavily on your browser and operating system, but the following formats are supported by Mattermost on most browsers:'));
+ message.push(localizeMessage('help.attaching.supportedList', '- Images: BMP, GIF, JPG, JPEG, PNG\n- Video: MP4\n- Audio: MP3, M4A\n- Documents: PDF'));
+ message.push(localizeMessage('help.attaching.notSupported', 'Document preview (Word, Excel, PPT) is not yet supported.'));
+ message.push(localizeMessage('help.attaching.limitations', '## File Size Limitations\nMattermost supports a maximum of five attached files per post, each with a maximum file size of 50Mb.'));
- return (
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/webapp/components/help/components/commands.jsx b/webapp/components/help/components/commands.jsx
index 1c670ed77..41dc736b5 100644
--- a/webapp/components/help/components/commands.jsx
+++ b/webapp/components/help/components/commands.jsx
@@ -8,72 +8,70 @@ import {Link} from 'react-router/es6';
import React from 'react';
-export default class HelpCommands extends React.Component {
- render() {
- const message = [];
- message.push(localizeMessage('help.commands.title', '# Executing Commands\n___'));
- message.push(localizeMessage('help.commands.intro', 'Slash commands perform operations in Mattermost by typing into the text input box. Enter a `/` followed by a command and some arguments to perform actions.\n\nBuilt-in slash commands come with all Mattermost installations and custom slash commands are configurable to interact with external applications. Learn about configuring custom slash commands on the [developer slash command documentation page](http://docs.mattermost.com/developer/slash-commands.html).'));
- message.push(localizeMessage('help.commands.builtin', '## Built-in Commands\nThe following slash commands are available on all Mattermost installations:'));
- message.push('![commands](https://docs.mattermost.com/_images/slashCommandsTable1.PNG)');
- message.push(localizeMessage('help.commands.builtin2', 'Begin by typing `/` and a list of slash command options appears above the text input box. The autocomplete suggestions help by providing a format example in black text and a short description of the slash command in grey text.'));
- message.push('![autocomplete](https://docs.mattermost.com/_images/slashCommandsAutocomplete.PNG)');
- message.push(localizeMessage('help.commands.custom', '## Custom Commands\nCustom slash commands integrate with external applications. For example, a team might configure a custom slash command to check internal health records with `/patient joe smith` or check the weekly weather forecast in a city with `/weather toronto week`. Check with your System Admin or open the autocomplete list by typing `/` to determine if your team configured any custom slash commands.'));
- message.push(localizeMessage('help.commands.custom2', 'Custom slash commands are disabled by default and can be enabled by the System Admin in the **System Console** > **Integrations** > **Webhooks and Commands**. Learn about configuring custom slash commands on the [developer slash command documentation page](http://docs.mattermost.com/developer/slash-commands.html).'));
+export default function HelpCommands() {
+ const message = [];
+ message.push(localizeMessage('help.commands.title', '# Executing Commands\n___'));
+ message.push(localizeMessage('help.commands.intro', 'Slash commands perform operations in Mattermost by typing into the text input box. Enter a `/` followed by a command and some arguments to perform actions.\n\nBuilt-in slash commands come with all Mattermost installations and custom slash commands are configurable to interact with external applications. Learn about configuring custom slash commands on the [developer slash command documentation page](http://docs.mattermost.com/developer/slash-commands.html).'));
+ message.push(localizeMessage('help.commands.builtin', '## Built-in Commands\nThe following slash commands are available on all Mattermost installations:'));
+ message.push('![commands](https://docs.mattermost.com/_images/slashCommandsTable1.PNG)');
+ message.push(localizeMessage('help.commands.builtin2', 'Begin by typing `/` and a list of slash command options appears above the text input box. The autocomplete suggestions help by providing a format example in black text and a short description of the slash command in grey text.'));
+ message.push('![autocomplete](https://docs.mattermost.com/_images/slashCommandsAutocomplete.PNG)');
+ message.push(localizeMessage('help.commands.custom', '## Custom Commands\nCustom slash commands integrate with external applications. For example, a team might configure a custom slash command to check internal health records with `/patient joe smith` or check the weekly weather forecast in a city with `/weather toronto week`. Check with your System Admin or open the autocomplete list by typing `/` to determine if your team configured any custom slash commands.'));
+ message.push(localizeMessage('help.commands.custom2', 'Custom slash commands are disabled by default and can be enabled by the System Admin in the **System Console** > **Integrations** > **Webhooks and Commands**. Learn about configuring custom slash commands on the [developer slash command documentation page](http://docs.mattermost.com/developer/slash-commands.html).'));
- return (
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/webapp/components/help/components/composing.jsx b/webapp/components/help/components/composing.jsx
index f3b16c76d..41b620d26 100644
--- a/webapp/components/help/components/composing.jsx
+++ b/webapp/components/help/components/composing.jsx
@@ -8,72 +8,70 @@ import {Link} from 'react-router/es6';
import React from 'react';
-export default class HelpComposing extends React.Component {
- render() {
- const message = [];
- message.push(localizeMessage('help.composing.title', '# Sending Messages\n_____'));
- message.push(localizeMessage('help.composing.types', '## Message Types\nReply to posts to keep conversations organized in threads.'));
- message.push(localizeMessage('help.composing.posts', '#### Posts\nPosts can be considered parent messages. They are the messages that often start a thread of replies. Posts are composed and sent from the text input box at the bottom of the center pane.'));
- message.push(localizeMessage('help.composing.replies', '#### Replies\nReply to a message by clicking the reply icon next to any message text. This action opens the right-hand-side (RHS) where you can see the message thread, then compose and send your reply. Replies are indented slightly in the center pane to indicate that they are child messages of a parent post.\n\nWhen composing a reply in the right-hand side, click the expand/collapse icon with two arrows at the top of the sidebar to make things easier to read.'));
- message.push(localizeMessage('help.composing.posting', '## Posting a Message\nWrite a message by typing into the text input box, then press ENTER to send it. Use SHIFT+ENTER to create a new line without sending a message. To send messages by pressing CTRL+ENTER go to **Main Menu > Account Settings > Send messages on CTRL+ENTER**.'));
- message.push(localizeMessage('help.composing.editing', '## Editing a Message\nEdit a message by clicking the **[...]** icon next to any message text that you’ve composed, then click **Edit**. After making modifications to the message text, press **ENTER** to save the modifications. Message edits do not trigger new @mention notifications, desktop notifications or notification sounds.'));
- message.push(localizeMessage('help.composing.deleting', '## Deleting a message\nDelete a message by clicking the **[...]** icon next to any message text that you’ve composed, then click **Delete**. System and Team Admins can delete any message on their system or team.'));
- message.push(localizeMessage('help.composing.linking', '## Linking to a message\nThe **Permalink** feature creates a link to any message. Sharing this link with other users in the channel lets them view the linked message in the Message Archives. Users who are not a member of the channel where the message was posted cannot view the permalink. Get the permalink to any message by clicking the **[...]** icon next to the message text > **Permalink** > **Copy Link**.'));
+export default function HelpComposing() {
+ const message = [];
+ message.push(localizeMessage('help.composing.title', '# Sending Messages\n_____'));
+ message.push(localizeMessage('help.composing.types', '## Message Types\nReply to posts to keep conversations organized in threads.'));
+ message.push(localizeMessage('help.composing.posts', '#### Posts\nPosts can be considered parent messages. They are the messages that often start a thread of replies. Posts are composed and sent from the text input box at the bottom of the center pane.'));
+ message.push(localizeMessage('help.composing.replies', '#### Replies\nReply to a message by clicking the reply icon next to any message text. This action opens the right-hand-side (RHS) where you can see the message thread, then compose and send your reply. Replies are indented slightly in the center pane to indicate that they are child messages of a parent post.\n\nWhen composing a reply in the right-hand side, click the expand/collapse icon with two arrows at the top of the sidebar to make things easier to read.'));
+ message.push(localizeMessage('help.composing.posting', '## Posting a Message\nWrite a message by typing into the text input box, then press ENTER to send it. Use SHIFT+ENTER to create a new line without sending a message. To send messages by pressing CTRL+ENTER go to **Main Menu > Account Settings > Send messages on CTRL+ENTER**.'));
+ message.push(localizeMessage('help.composing.editing', '## Editing a Message\nEdit a message by clicking the **[...]** icon next to any message text that you’ve composed, then click **Edit**. After making modifications to the message text, press **ENTER** to save the modifications. Message edits do not trigger new @mention notifications, desktop notifications or notification sounds.'));
+ message.push(localizeMessage('help.composing.deleting', '## Deleting a message\nDelete a message by clicking the **[...]** icon next to any message text that you’ve composed, then click **Delete**. System and Team Admins can delete any message on their system or team.'));
+ message.push(localizeMessage('help.composing.linking', '## Linking to a message\nThe **Permalink** feature creates a link to any message. Sharing this link with other users in the channel lets them view the linked message in the Message Archives. Users who are not a member of the channel where the message was posted cannot view the permalink. Get the permalink to any message by clicking the **[...]** icon next to the message text > **Permalink** > **Copy Link**.'));
- return (
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/webapp/components/help/components/formatting.jsx b/webapp/components/help/components/formatting.jsx
index 52ad89772..312df252a 100644
--- a/webapp/components/help/components/formatting.jsx
+++ b/webapp/components/help/components/formatting.jsx
@@ -8,128 +8,126 @@ import {Link} from 'react-router/es6';
import React from 'react';
-export default class HelpFormatting extends React.Component {
- render() {
- const message = [];
- message.push(localizeMessage('help.formatting.title', '# Formatting Text\n_____'));
- message.push(localizeMessage('help.formatting.intro', 'Markdown makes it easy to format messages. Type a message as you normally would, and use these rules to render it with special formatting.'));
- message.push(localizeMessage('help.formatting.style', '## Text Style\n\nYou can use either `_` or `*` around a word to make it italic. Use two to make it bold.\n\n* `_italics_` renders as _italics_\n* `**bold**` renders as **bold**\n* `**_bold-italic_**` renders as **_bold-italics_**\n* `~~strikethrough~~` renders as ~~strikethrough~~'));
- message.push(localizeMessage('help.formatting.code', '## Code Block\n\nCreate a code block by indenting each line by four spaces, or by placing ``` on the line above and below your code.'));
- message.push(localizeMessage('help.formatting.example', 'Example:') + '\n\n');
- message.push(' ```\n ' + localizeMessage('help.formatting.codeBlock', 'code block') + '\n ```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push('```\n' + localizeMessage('help.formatting.codeBlock', 'code block') + '\n```');
- message.push(localizeMessage('help.formatting.syntax', '### Syntax Highlighting\n\nTo add syntax highlighting, type the language to be highlighted after the ``` at the beginning of the code block. Mattermost also offers four different code themes (GitHub, Solarized Dark, Solarized Light, Monokai) that can be changed in **Account Settings** > **Display** > **Theme** > **Custom Theme** > **Center Channel Styles**'));
- message.push(localizeMessage('help.formatting.supportedSyntax', 'Supported languages are:\n`as`, `applescript`, `osascript`, `scpt`, `bash`, `sh`, `zsh`, `clj`, `boot`, `cl2`, `cljc`, `cljs`, `cljs.hl`, `cljscm`, `cljx`, `hic`, `coffee`, `_coffee`, `cake`, `cjsx`, `cson`, `iced`, `cpp`, `c`, `cc`, `h`, `c++`, `h++`, `hpp`, `cs`, `csharp`, `css`, `d`, `di`, `dart`, `delphi`, `dpr`, `dfm`, `pas`, `pascal`, `freepascal`, `lazarus`, `lpr`, `lfm`, `diff`, `django`, `jinja`, `dockerfile`, `docker`, `erl`, `f90`, `f95`, `fsharp`, `fs`, `gcode`, `nc`, `go`, `groovy`, `handlebars`, `hbs`, `html.hbs`, `html.handlebars`, `hs`, `hx`, `java`, `jsp`, `js`, `jsx`, `json`, `jl`, `kt`, `ktm`, `kts`, `less`, `lisp`, `lua`, `mk`, `mak`, `md`, `mkdown`, `mkd`, `matlab`, `m`, `mm`, `objc`, `obj-c`, `ml`, `perl`, `pl`, `php`, `php3`, `php4`, `php5`, `php6`, `ps`, `ps1`, `pp`, `py`, `gyp`, `r`, `ruby`, `rb`, `gemspec`, `podspec`, `thor`, `irb`, `rs`, `scala`, `scm`, `sld`, `scss`, `st`, `sql`, `swift`, `tex`, `vbnet`, `vb`, `bas`, `vbs`, `v`, `veo`, `xml`, `html`, `xhtml`, `rss`, `atom`, `xsl`, `plist`, `yaml`'));
- message.push(localizeMessage('help.formatting.example', 'Example:') + '\n\n');
- message.push(' ```go\n' + localizeMessage('help.formatting.syntaxEx', ' package main\n import "fmt"\n func main() {\n fmt.Println("Hello, 世界")\n }') + '\n ```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.githubTheme', '**GitHub Theme**'));
- message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-github.PNG)');
- message.push(localizeMessage('help.formatting.solirizedDarkTheme', '**Solarized Dark Theme**'));
- message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-sol-dark.PNG)');
- message.push(localizeMessage('help.formatting.solirizedLightTheme', '**Solarized Light Theme**'));
- message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-sol-light.PNG)');
- message.push(localizeMessage('help.formatting.monokaiTheme', '**Monokai Theme**'));
- message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-monokai.PNG)');
- message.push(localizeMessage('help.formatting.inline', '## In-line Code\n\nCreate in-line monospaced font by surrounding it with backticks.'));
- message.push('```\n`monospace`\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:') + ' `monospace`');
- message.push(localizeMessage('help.formatting.links', '## Links\n\nCreate labeled links by putting the desired text in square brackets and the associated link in normal brackets.'));
- message.push('`' + localizeMessage('help.formatting.linkEx', '[Check out Mattermost!](https://about.mattermost.com/)') + '`');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:') + ' ' + localizeMessage('help.formatting.linkEx', '[Check out Mattermost!](https://about.mattermost.com/)'));
- message.push(localizeMessage('help.formatting.images', '## In-line Images\n\nCreate in-line images using an `!` followed by the alt text in square brackets and the link in normal brackets. Add hover text by placing it in quotes after the link.'));
- message.push('```\n' + localizeMessage('help.formatting.imagesExample', '![alt text](link "hover text")\n\nand\n\n[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.imagesExample', '![alt text](link "hover text")\n\nand\n\n[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)'));
- message.push(localizeMessage('help.formatting.emojis', '## Emojis\n\nOpen the emoji autocomplete by typing `:`. A full list of emojis can be found [here](http://www.emoji-cheat-sheet.com/). It is also possible to create your own [Custom Emoji](http://docs.mattermost.com/help/settings/custom-emoji.html) if the emoji you want to use doesn\'t exist.'));
- message.push('```\n' + localizeMessage('help.formatting.emojiExample', ':smile: :+1: :sheep:') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.emojiExample', ':smile: :+1: :sheep:'));
- message.push(localizeMessage('help.formatting.lines', '## Lines\n\nCreate a line by using three `*`, `_`, or `-`.'));
- message.push('`***` ' + localizeMessage('help.formatting.renders', 'Renders as:') + '\n***');
- message.push(localizeMessage('help.formatting.quotes', '## Block quotes\n\nCreate block quotes using `>`.'));
- message.push(localizeMessage('help.formatting.quotesExample', '`> block quotes` renders as:'));
- message.push(localizeMessage('help.formatting.quotesRender', '> block quotes'));
- message.push(localizeMessage('help.formatting.lists', '## Lists\n\nCreate a list by using `*` or `-` as bullets. Indent a bullet point by adding two spaces in front of it.'));
- message.push('```\n' + localizeMessage('help.formatting.listExample', '* list item one\n* list item two\n * item two sub-point') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.listExample', '* list item one\n* list item two\n * item two sub-point'));
- message.push(localizeMessage('help.formatting.ordered', 'Make it an ordered list by using numbers instead:'));
- message.push('```\n' + localizeMessage('help.formatting.orderedExample', '1. Item one\n2. Item two') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.orderedExample', '1. Item one\n2. Item two'));
- message.push(localizeMessage('help.formatting.checklist', 'Make a task list by including square brackets:'));
- message.push('```\n' + localizeMessage('help.formatting.checklistExample', '- [ ] Item one\n- [ ] Item two\n- [x] Completed item') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.checklistExample', '- [ ] Item one\n- [ ] Item two\n- [x] Completed item'));
- message.push(localizeMessage('help.formatting.tables', '## Tables\n\nCreate a table by placing a dashed line under the header row and separating the columns with a pipe `|`. (The columns don’t need to line up exactly for it to work). Choose how to align table columns by including colons `:` within the header row.'));
- message.push('```\n' + localizeMessage('help.formatting.tableExample', '| Left-Aligned | Center Aligned | Right Aligned |\n| :------------ |:---------------:| -----:|\n| Left column 1 | this text | $100 |\n| Left column 2 | is | $10 |\n| Left column 3 | centered | $1 |') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.tableExample', '| Left-Aligned | Center Aligned | Right Aligned |\n| :------------ |:---------------:| -----:|\n| Left column 1 | this text | $100 |\n| Left column 2 | is | $10 |\n| Left column 3 | centered | $1 |'));
- message.push(localizeMessage('help.formatting.headings', '## Headings\n\nMake a heading by typing # and a space before your title. For smaller headings, use more #’s.'));
- message.push('```\n' + localizeMessage('help.formatting.headingsExample', '## Large Heading\n### Smaller Heading\n#### Even Smaller Heading') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.headingsExample', '## Large Heading\n### Smaller Heading\n#### Even Smaller Heading'));
- message.push(localizeMessage('help.formatting.headings2', 'Alternatively, you can underline the text using `===` or `---` to create headings.'));
- message.push('```\n' + localizeMessage('help.formatting.headings2Example', 'Large Heading\n-------------') + '\n```');
- message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
- message.push(localizeMessage('help.formatting.headings2Example', 'Large Heading\n-------------'));
+export default function HelpFormatting() {
+ const message = [];
+ message.push(localizeMessage('help.formatting.title', '# Formatting Text\n_____'));
+ message.push(localizeMessage('help.formatting.intro', 'Markdown makes it easy to format messages. Type a message as you normally would, and use these rules to render it with special formatting.'));
+ message.push(localizeMessage('help.formatting.style', '## Text Style\n\nYou can use either `_` or `*` around a word to make it italic. Use two to make it bold.\n\n* `_italics_` renders as _italics_\n* `**bold**` renders as **bold**\n* `**_bold-italic_**` renders as **_bold-italics_**\n* `~~strikethrough~~` renders as ~~strikethrough~~'));
+ message.push(localizeMessage('help.formatting.code', '## Code Block\n\nCreate a code block by indenting each line by four spaces, or by placing ``` on the line above and below your code.'));
+ message.push(localizeMessage('help.formatting.example', 'Example:') + '\n\n');
+ message.push(' ```\n ' + localizeMessage('help.formatting.codeBlock', 'code block') + '\n ```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push('```\n' + localizeMessage('help.formatting.codeBlock', 'code block') + '\n```');
+ message.push(localizeMessage('help.formatting.syntax', '### Syntax Highlighting\n\nTo add syntax highlighting, type the language to be highlighted after the ``` at the beginning of the code block. Mattermost also offers four different code themes (GitHub, Solarized Dark, Solarized Light, Monokai) that can be changed in **Account Settings** > **Display** > **Theme** > **Custom Theme** > **Center Channel Styles**'));
+ message.push(localizeMessage('help.formatting.supportedSyntax', 'Supported languages are:\n`as`, `applescript`, `osascript`, `scpt`, `bash`, `sh`, `zsh`, `clj`, `boot`, `cl2`, `cljc`, `cljs`, `cljs.hl`, `cljscm`, `cljx`, `hic`, `coffee`, `_coffee`, `cake`, `cjsx`, `cson`, `iced`, `cpp`, `c`, `cc`, `h`, `c++`, `h++`, `hpp`, `cs`, `csharp`, `css`, `d`, `di`, `dart`, `delphi`, `dpr`, `dfm`, `pas`, `pascal`, `freepascal`, `lazarus`, `lpr`, `lfm`, `diff`, `django`, `jinja`, `dockerfile`, `docker`, `erl`, `f90`, `f95`, `fsharp`, `fs`, `gcode`, `nc`, `go`, `groovy`, `handlebars`, `hbs`, `html.hbs`, `html.handlebars`, `hs`, `hx`, `java`, `jsp`, `js`, `jsx`, `json`, `jl`, `kt`, `ktm`, `kts`, `less`, `lisp`, `lua`, `mk`, `mak`, `md`, `mkdown`, `mkd`, `matlab`, `m`, `mm`, `objc`, `obj-c`, `ml`, `perl`, `pl`, `php`, `php3`, `php4`, `php5`, `php6`, `ps`, `ps1`, `pp`, `py`, `gyp`, `r`, `ruby`, `rb`, `gemspec`, `podspec`, `thor`, `irb`, `rs`, `scala`, `scm`, `sld`, `scss`, `st`, `sql`, `swift`, `tex`, `vbnet`, `vb`, `bas`, `vbs`, `v`, `veo`, `xml`, `html`, `xhtml`, `rss`, `atom`, `xsl`, `plist`, `yaml`'));
+ message.push(localizeMessage('help.formatting.example', 'Example:') + '\n\n');
+ message.push(' ```go\n' + localizeMessage('help.formatting.syntaxEx', ' package main\n import "fmt"\n func main() {\n fmt.Println("Hello, 世界")\n }') + '\n ```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.githubTheme', '**GitHub Theme**'));
+ message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-github.PNG)');
+ message.push(localizeMessage('help.formatting.solirizedDarkTheme', '**Solarized Dark Theme**'));
+ message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-sol-dark.PNG)');
+ message.push(localizeMessage('help.formatting.solirizedLightTheme', '**Solarized Light Theme**'));
+ message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-sol-light.PNG)');
+ message.push(localizeMessage('help.formatting.monokaiTheme', '**Monokai Theme**'));
+ message.push('![go syntax-highlighting](https://docs.mattermost.com/_images/syntax-highlighting-monokai.PNG)');
+ message.push(localizeMessage('help.formatting.inline', '## In-line Code\n\nCreate in-line monospaced font by surrounding it with backticks.'));
+ message.push('```\n`monospace`\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:') + ' `monospace`');
+ message.push(localizeMessage('help.formatting.links', '## Links\n\nCreate labeled links by putting the desired text in square brackets and the associated link in normal brackets.'));
+ message.push('`' + localizeMessage('help.formatting.linkEx', '[Check out Mattermost!](https://about.mattermost.com/)') + '`');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:') + ' ' + localizeMessage('help.formatting.linkEx', '[Check out Mattermost!](https://about.mattermost.com/)'));
+ message.push(localizeMessage('help.formatting.images', '## In-line Images\n\nCreate in-line images using an `!` followed by the alt text in square brackets and the link in normal brackets. Add hover text by placing it in quotes after the link.'));
+ message.push('```\n' + localizeMessage('help.formatting.imagesExample', '![alt text](link "hover text")\n\nand\n\n[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.imagesExample', '![alt text](link "hover text")\n\nand\n\n[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)'));
+ message.push(localizeMessage('help.formatting.emojis', '## Emojis\n\nOpen the emoji autocomplete by typing `:`. A full list of emojis can be found [here](http://www.emoji-cheat-sheet.com/). It is also possible to create your own [Custom Emoji](http://docs.mattermost.com/help/settings/custom-emoji.html) if the emoji you want to use doesn\'t exist.'));
+ message.push('```\n' + localizeMessage('help.formatting.emojiExample', ':smile: :+1: :sheep:') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.emojiExample', ':smile: :+1: :sheep:'));
+ message.push(localizeMessage('help.formatting.lines', '## Lines\n\nCreate a line by using three `*`, `_`, or `-`.'));
+ message.push('`***` ' + localizeMessage('help.formatting.renders', 'Renders as:') + '\n***');
+ message.push(localizeMessage('help.formatting.quotes', '## Block quotes\n\nCreate block quotes using `>`.'));
+ message.push(localizeMessage('help.formatting.quotesExample', '`> block quotes` renders as:'));
+ message.push(localizeMessage('help.formatting.quotesRender', '> block quotes'));
+ message.push(localizeMessage('help.formatting.lists', '## Lists\n\nCreate a list by using `*` or `-` as bullets. Indent a bullet point by adding two spaces in front of it.'));
+ message.push('```\n' + localizeMessage('help.formatting.listExample', '* list item one\n* list item two\n * item two sub-point') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.listExample', '* list item one\n* list item two\n * item two sub-point'));
+ message.push(localizeMessage('help.formatting.ordered', 'Make it an ordered list by using numbers instead:'));
+ message.push('```\n' + localizeMessage('help.formatting.orderedExample', '1. Item one\n2. Item two') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.orderedExample', '1. Item one\n2. Item two'));
+ message.push(localizeMessage('help.formatting.checklist', 'Make a task list by including square brackets:'));
+ message.push('```\n' + localizeMessage('help.formatting.checklistExample', '- [ ] Item one\n- [ ] Item two\n- [x] Completed item') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.checklistExample', '- [ ] Item one\n- [ ] Item two\n- [x] Completed item'));
+ message.push(localizeMessage('help.formatting.tables', '## Tables\n\nCreate a table by placing a dashed line under the header row and separating the columns with a pipe `|`. (The columns don’t need to line up exactly for it to work). Choose how to align table columns by including colons `:` within the header row.'));
+ message.push('```\n' + localizeMessage('help.formatting.tableExample', '| Left-Aligned | Center Aligned | Right Aligned |\n| :------------ |:---------------:| -----:|\n| Left column 1 | this text | $100 |\n| Left column 2 | is | $10 |\n| Left column 3 | centered | $1 |') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.tableExample', '| Left-Aligned | Center Aligned | Right Aligned |\n| :------------ |:---------------:| -----:|\n| Left column 1 | this text | $100 |\n| Left column 2 | is | $10 |\n| Left column 3 | centered | $1 |'));
+ message.push(localizeMessage('help.formatting.headings', '## Headings\n\nMake a heading by typing # and a space before your title. For smaller headings, use more #’s.'));
+ message.push('```\n' + localizeMessage('help.formatting.headingsExample', '## Large Heading\n### Smaller Heading\n#### Even Smaller Heading') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.headingsExample', '## Large Heading\n### Smaller Heading\n#### Even Smaller Heading'));
+ message.push(localizeMessage('help.formatting.headings2', 'Alternatively, you can underline the text using `===` or `---` to create headings.'));
+ message.push('```\n' + localizeMessage('help.formatting.headings2Example', 'Large Heading\n-------------') + '\n```');
+ message.push(localizeMessage('help.formatting.renders', 'Renders as:'));
+ message.push(localizeMessage('help.formatting.headings2Example', 'Large Heading\n-------------'));
- return (
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/webapp/components/help/components/mentioning.jsx b/webapp/components/help/components/mentioning.jsx
index 83e19d14b..a7aa37bf6 100644
--- a/webapp/components/help/components/mentioning.jsx
+++ b/webapp/components/help/components/mentioning.jsx
@@ -8,74 +8,72 @@ import {Link} from 'react-router/es6';
import React from 'react';
-export default class HelpMentioning extends React.Component {
- render() {
- const message = [];
- message.push(localizeMessage('help.mentioning.title', '# Mentioning Teammates\n_____'));
- message.push(localizeMessage('help.mentioning.mentions', '## @Mentions\nUse @mentions to get the attention of specific team members.'));
- message.push(localizeMessage('help.mentioning.username', '#### @Username\nYou can mention a teammate by using the `@` symbol plus their username to send them a mention notification.\n\nType `@` to bring up a list of team members who can be mentioned. To filter the list, type the first few letters of any username, first name, last name, or nickname. The **Up** and **Down** arrow keys can then be used to scroll through entries in the list, and pressing **ENTER** will select which user to mention. Once selected, the username will automatically replace the full name or nickname.\nThe following example sends a special mention notification to **alice** that alerts her of the channel and message where she has been mentioned. If **alice** is away from Mattermost and has [email notifications](http://docs.mattermost.com/help/getting-started/configuring-notifications.html#email-notifications) turned on, then she will receive an email alert of her mention along with the message text.'));
- message.push('```\n' + localizeMessage('help.mentioning.usernameExample', '@alice how did your interview go with the new candidate?') + '\n```');
- message.push('\n\n ');
- message.push(localizeMessage('help.mentioning.usernameCont', 'If the user you mentioned does not belong to the channel, a System Message will be posted to let you know. This is a temporary message only seen by the person who triggered it. To add the mentioned user to the channel, go to the dropdown menu beside the channel name and select **Add Members**.'));
- message.push(localizeMessage('help.mentioning.channel', '#### @Channel\nYou can mention an entire channel by typing `@channel`. All members of the channel will receive a mention notification that behaves the same way as if the members had been mentioned personally.'));
- message.push('```\n' + localizeMessage('help.mentioning.channelExample', '@channel great work on interviews this week. I think we found some excellent potential candidates!') + '```\n');
- message.push(localizeMessage('help.mentioning.triggers', '## Words That Trigger Mentions\nIn addition to being notified by @username and @channel, you can customize words that trigger mention notifications in **Account Settings** > **Notifications** > **Words that trigger mentions**. By default, you will receive mention notifications on your first name, and you can add more words by typing them into the input box separated by commas. This is useful if you want to be notified of all posts on certain topics, for example, “interviewing” or “marketing”.'));
- message.push(localizeMessage('help.mentioning.recent', '## Recent Mentions\nClick `@` next to the search box to query for your most recent @mentions and words that trigger mentions. Click **Jump** next to a search result in the RHS to jump the center pane to the channel and location of the message with the mention.'));
+export default function HelpMentioning() {
+ const message = [];
+ message.push(localizeMessage('help.mentioning.title', '# Mentioning Teammates\n_____'));
+ message.push(localizeMessage('help.mentioning.mentions', '## @Mentions\nUse @mentions to get the attention of specific team members.'));
+ message.push(localizeMessage('help.mentioning.username', '#### @Username\nYou can mention a teammate by using the `@` symbol plus their username to send them a mention notification.\n\nType `@` to bring up a list of team members who can be mentioned. To filter the list, type the first few letters of any username, first name, last name, or nickname. The **Up** and **Down** arrow keys can then be used to scroll through entries in the list, and pressing **ENTER** will select which user to mention. Once selected, the username will automatically replace the full name or nickname.\nThe following example sends a special mention notification to **alice** that alerts her of the channel and message where she has been mentioned. If **alice** is away from Mattermost and has [email notifications](http://docs.mattermost.com/help/getting-started/configuring-notifications.html#email-notifications) turned on, then she will receive an email alert of her mention along with the message text.'));
+ message.push('```\n' + localizeMessage('help.mentioning.usernameExample', '@alice how did your interview go with the new candidate?') + '\n```');
+ message.push('\n\n ');
+ message.push(localizeMessage('help.mentioning.usernameCont', 'If the user you mentioned does not belong to the channel, a System Message will be posted to let you know. This is a temporary message only seen by the person who triggered it. To add the mentioned user to the channel, go to the dropdown menu beside the channel name and select **Add Members**.'));
+ message.push(localizeMessage('help.mentioning.channel', '#### @Channel\nYou can mention an entire channel by typing `@channel`. All members of the channel will receive a mention notification that behaves the same way as if the members had been mentioned personally.'));
+ message.push('```\n' + localizeMessage('help.mentioning.channelExample', '@channel great work on interviews this week. I think we found some excellent potential candidates!') + '```\n');
+ message.push(localizeMessage('help.mentioning.triggers', '## Words That Trigger Mentions\nIn addition to being notified by @username and @channel, you can customize words that trigger mention notifications in **Account Settings** > **Notifications** > **Words that trigger mentions**. By default, you will receive mention notifications on your first name, and you can add more words by typing them into the input box separated by commas. This is useful if you want to be notified of all posts on certain topics, for example, “interviewing” or “marketing”.'));
+ message.push(localizeMessage('help.mentioning.recent', '## Recent Mentions\nClick `@` next to the search box to query for your most recent @mentions and words that trigger mentions. Click **Jump** next to a search result in the RHS to jump the center pane to the channel and location of the message with the mention.'));
- return (
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/webapp/components/help/components/messaging.jsx b/webapp/components/help/components/messaging.jsx
index 5f26f32ba..a36e8e772 100644
--- a/webapp/components/help/components/messaging.jsx
+++ b/webapp/components/help/components/messaging.jsx
@@ -8,73 +8,71 @@ import {Link} from 'react-router/es6';
import React from 'react';
-export default class HelpMessaging extends React.Component {
- render() {
- const message = [];
- message.push(localizeMessage('help.messaging.title', '# Messaging Basics\n_____'));
- message.push(localizeMessage('help.messaging.write', '**Write messages** using the text input box at the bottom of Mattermost. Press ENTER to send a message. Use SHIFT+ENTER to create a new line without sending a message.'));
- message.push(localizeMessage('help.messaging.reply', '**Reply to messages** by clicking the reply arrow next to the message text.'));
- message.push('![reply arrow](https://docs.mattermost.com/_images/replyIcon.PNG)');
- message.push(localizeMessage('help.messaging.notify', '**Notify teammates** when they are needed by typing `@username`.'));
- message.push(localizeMessage('help.messaging.format', '**Format your messages** using Markdown that supports text styling, headings, links, emoticons, code blocks, block quotes, tables, lists and in-line images.'));
- message.push('![markdown](https://docs.mattermost.com/_images/messagesTable1.PNG)');
- message.push(localizeMessage('help.messaging.emoji', '**Quickly add emoji** by typing ":", which will open an emoji autocomplete. If the existing emoji don\'t cover what you want to express, you can also create your own [Custom Emoji](http://docs.mattermost.com/help/settings/custom-emoji.html).'));
- message.push(localizeMessage('help.messaging.attach', '**Attach files** by dragging and dropping into Mattermost or clicking the attachment icon in the text input box.'));
+export default function HelpMessaging() {
+ const message = [];
+ message.push(localizeMessage('help.messaging.title', '# Messaging Basics\n_____'));
+ message.push(localizeMessage('help.messaging.write', '**Write messages** using the text input box at the bottom of Mattermost. Press ENTER to send a message. Use SHIFT+ENTER to create a new line without sending a message.'));
+ message.push(localizeMessage('help.messaging.reply', '**Reply to messages** by clicking the reply arrow next to the message text.'));
+ message.push('![reply arrow](https://docs.mattermost.com/_images/replyIcon.PNG)');
+ message.push(localizeMessage('help.messaging.notify', '**Notify teammates** when they are needed by typing `@username`.'));
+ message.push(localizeMessage('help.messaging.format', '**Format your messages** using Markdown that supports text styling, headings, links, emoticons, code blocks, block quotes, tables, lists and in-line images.'));
+ message.push('![markdown](https://docs.mattermost.com/_images/messagesTable1.PNG)');
+ message.push(localizeMessage('help.messaging.emoji', '**Quickly add emoji** by typing ":", which will open an emoji autocomplete. If the existing emoji don\'t cover what you want to express, you can also create your own [Custom Emoji](http://docs.mattermost.com/help/settings/custom-emoji.html).'));
+ message.push(localizeMessage('help.messaging.attach', '**Attach files** by dragging and dropping into Mattermost or clicking the attachment icon in the text input box.'));
- return (
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/webapp/components/help/help_controller.jsx b/webapp/components/help/help_controller.jsx
index 2e21861c1..b58a93320 100644
--- a/webapp/components/help/help_controller.jsx
+++ b/webapp/components/help/help_controller.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -7,7 +9,7 @@ import ReactDOM from 'react-dom';
export default class HelpController extends React.Component {
static get propTypes() {
return {
- children: React.PropTypes.node.isRequired
+ children: PropTypes.node.isRequired
};
}
diff --git a/webapp/components/integrations/components/abstract_incoming_webhook.jsx b/webapp/components/integrations/components/abstract_incoming_webhook.jsx
index a4d9e94f4..9c73ae6d6 100644
--- a/webapp/components/integrations/components/abstract_incoming_webhook.jsx
+++ b/webapp/components/integrations/components/abstract_incoming_webhook.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -13,7 +15,7 @@ import {Link} from 'react-router/es6';
export default class AbstractIncomingWebhook extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object
+ team: PropTypes.object
};
}
diff --git a/webapp/components/integrations/components/abstract_outgoing_webhook.jsx b/webapp/components/integrations/components/abstract_outgoing_webhook.jsx
index 46178adde..9f3902e2c 100644
--- a/webapp/components/integrations/components/abstract_outgoing_webhook.jsx
+++ b/webapp/components/integrations/components/abstract_outgoing_webhook.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -15,7 +17,7 @@ import SpinnerButton from 'components/spinner_button.jsx';
export default class AbstractOutgoingWebhook extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object
+ team: PropTypes.object
};
}
diff --git a/webapp/components/integrations/components/add_command.jsx b/webapp/components/integrations/components/add_command.jsx
index 31f99976c..204b45ca4 100644
--- a/webapp/components/integrations/components/add_command.jsx
+++ b/webapp/components/integrations/components/add_command.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -19,7 +21,7 @@ const REQUEST_GET = 'G';
export default class AddCommand extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object
+ team: PropTypes.object
};
}
diff --git a/webapp/components/integrations/components/add_oauth_app.jsx b/webapp/components/integrations/components/add_oauth_app.jsx
index 4d91caf76..a74d577c3 100644
--- a/webapp/components/integrations/components/add_oauth_app.jsx
+++ b/webapp/components/integrations/components/add_oauth_app.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -14,7 +16,7 @@ import SpinnerButton from 'components/spinner_button.jsx';
export default class AddOAuthApp extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object
+ team: PropTypes.object
};
}
diff --git a/webapp/components/integrations/components/commands_container.jsx b/webapp/components/integrations/components/commands_container.jsx
index 29d1e9b33..a831bc8f2 100644
--- a/webapp/components/integrations/components/commands_container.jsx
+++ b/webapp/components/integrations/components/commands_container.jsx
@@ -6,15 +6,17 @@ import UserStore from 'stores/user_store.jsx';
import {loadTeamCommands} from 'actions/integration_actions.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class CommandsContainer extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- user: React.PropTypes.object,
- children: React.PropTypes.node.isRequired,
- isAdmin: React.PropTypes.bool
+ team: PropTypes.object,
+ user: PropTypes.object,
+ children: PropTypes.node.isRequired,
+ isAdmin: PropTypes.bool
};
}
diff --git a/webapp/components/integrations/components/confirm_integration.jsx b/webapp/components/integrations/components/confirm_integration.jsx
index 70dc787e1..30f6034d5 100644
--- a/webapp/components/integrations/components/confirm_integration.jsx
+++ b/webapp/components/integrations/components/confirm_integration.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -15,9 +17,9 @@ import Constants from 'utils/constants.jsx';
export default class ConfirmIntegration extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- location: React.PropTypes.object,
- loading: React.PropTypes.bool
+ team: PropTypes.object,
+ location: PropTypes.object,
+ loading: PropTypes.bool
};
}
diff --git a/webapp/components/integrations/components/delete_integration.jsx b/webapp/components/integrations/components/delete_integration.jsx
index 06ef7802a..592f415d6 100644
--- a/webapp/components/integrations/components/delete_integration.jsx
+++ b/webapp/components/integrations/components/delete_integration.jsx
@@ -1,3 +1,4 @@
+import PropTypes from 'prop-types';
import React from 'react';
import {FormattedMessage} from 'react-intl';
@@ -45,6 +46,6 @@ export default class DeleteIntegration extends DeleteModalTrigger {
}
DeleteIntegration.propTypes = {
- messageId: React.PropTypes.string.isRequired,
- onDelete: React.PropTypes.func.isRequired
+ messageId: PropTypes.string.isRequired,
+ onDelete: PropTypes.func.isRequired
};
diff --git a/webapp/components/integrations/components/edit_command.jsx b/webapp/components/integrations/components/edit_command.jsx
index 7979f659d..f4c05e4eb 100644
--- a/webapp/components/integrations/components/edit_command.jsx
+++ b/webapp/components/integrations/components/edit_command.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -23,8 +25,8 @@ const REQUEST_GET = 'G';
export default class EditCommand extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- location: React.PropTypes.object
+ team: PropTypes.object,
+ location: PropTypes.object
};
}
diff --git a/webapp/components/integrations/components/installed_command.jsx b/webapp/components/integrations/components/installed_command.jsx
index 60ea116cb..691ae75fb 100644
--- a/webapp/components/integrations/components/installed_command.jsx
+++ b/webapp/components/integrations/components/installed_command.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -10,13 +12,13 @@ import DeleteIntegration from './delete_integration.jsx';
export default class InstalledCommand extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object.isRequired,
- command: React.PropTypes.object.isRequired,
- onRegenToken: React.PropTypes.func.isRequired,
- onDelete: React.PropTypes.func.isRequired,
- filter: React.PropTypes.string,
- creator: React.PropTypes.object.isRequired,
- canChange: React.PropTypes.bool.isRequired
+ team: PropTypes.object.isRequired,
+ command: PropTypes.object.isRequired,
+ onRegenToken: PropTypes.func.isRequired,
+ onDelete: PropTypes.func.isRequired,
+ filter: PropTypes.string,
+ creator: PropTypes.object.isRequired,
+ canChange: PropTypes.bool.isRequired
};
}
diff --git a/webapp/components/integrations/components/installed_commands.jsx b/webapp/components/integrations/components/installed_commands.jsx
index 27d91f204..9d7b16c88 100644
--- a/webapp/components/integrations/components/installed_commands.jsx
+++ b/webapp/components/integrations/components/installed_commands.jsx
@@ -7,18 +7,20 @@ import InstalledCommand from './installed_command.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import * as Utils from 'utils/utils.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import {FormattedMessage} from 'react-intl';
export default class InstalledCommands extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- user: React.PropTypes.object,
- users: React.PropTypes.object,
- commands: React.PropTypes.array,
- loading: React.PropTypes.bool,
- isAdmin: React.PropTypes.bool
+ team: PropTypes.object,
+ user: PropTypes.object,
+ users: PropTypes.object,
+ commands: PropTypes.array,
+ loading: PropTypes.bool,
+ isAdmin: PropTypes.bool
};
}
diff --git a/webapp/components/integrations/components/installed_incoming_webhook.jsx b/webapp/components/integrations/components/installed_incoming_webhook.jsx
index 68ac7b7ed..241205b3f 100644
--- a/webapp/components/integrations/components/installed_incoming_webhook.jsx
+++ b/webapp/components/integrations/components/installed_incoming_webhook.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -14,12 +16,12 @@ import {Link} from 'react-router';
export default class InstalledIncomingWebhook extends React.Component {
static get propTypes() {
return {
- incomingWebhook: React.PropTypes.object.isRequired,
- onDelete: React.PropTypes.func.isRequired,
- filter: React.PropTypes.string,
- creator: React.PropTypes.object.isRequired,
- canChange: React.PropTypes.bool.isRequired,
- team: React.PropTypes.object.isRequired
+ incomingWebhook: PropTypes.object.isRequired,
+ onDelete: PropTypes.func.isRequired,
+ filter: PropTypes.string,
+ creator: PropTypes.object.isRequired,
+ canChange: PropTypes.bool.isRequired,
+ team: PropTypes.object.isRequired
};
}
diff --git a/webapp/components/integrations/components/installed_incoming_webhooks.jsx b/webapp/components/integrations/components/installed_incoming_webhooks.jsx
index 93ebf3066..5667979e1 100644
--- a/webapp/components/integrations/components/installed_incoming_webhooks.jsx
+++ b/webapp/components/integrations/components/installed_incoming_webhooks.jsx
@@ -14,15 +14,17 @@ import {loadIncomingHooks} from 'actions/integration_actions.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import * as Utils from 'utils/utils.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import {FormattedMessage} from 'react-intl';
export default class InstalledIncomingWebhooks extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- user: React.PropTypes.object,
- isAdmin: React.PropTypes.bool
+ team: PropTypes.object,
+ user: PropTypes.object,
+ isAdmin: PropTypes.bool
};
}
diff --git a/webapp/components/integrations/components/installed_oauth_app.jsx b/webapp/components/integrations/components/installed_oauth_app.jsx
index 01cf345f4..100d82043 100644
--- a/webapp/components/integrations/components/installed_oauth_app.jsx
+++ b/webapp/components/integrations/components/installed_oauth_app.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -17,9 +19,9 @@ const FAKE_SECRET = '***************';
export default class InstalledOAuthApp extends React.Component {
static get propTypes() {
return {
- oauthApp: React.PropTypes.object.isRequired,
- onDelete: React.PropTypes.func.isRequired,
- filter: React.PropTypes.string
+ oauthApp: PropTypes.object.isRequired,
+ onDelete: PropTypes.func.isRequired,
+ filter: PropTypes.string
};
}
diff --git a/webapp/components/integrations/components/installed_oauth_apps.jsx b/webapp/components/integrations/components/installed_oauth_apps.jsx
index 8a0b4678c..33494c464 100644
--- a/webapp/components/integrations/components/installed_oauth_apps.jsx
+++ b/webapp/components/integrations/components/installed_oauth_apps.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -15,7 +17,7 @@ import InstalledOAuthApp from './installed_oauth_app.jsx';
export default class InstalledOAuthApps extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object
+ team: PropTypes.object
};
}
diff --git a/webapp/components/integrations/components/installed_outgoing_webhook.jsx b/webapp/components/integrations/components/installed_outgoing_webhook.jsx
index c840b1fa9..70c606b97 100644
--- a/webapp/components/integrations/components/installed_outgoing_webhook.jsx
+++ b/webapp/components/integrations/components/installed_outgoing_webhook.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -13,13 +15,13 @@ import DeleteIntegration from './delete_integration.jsx';
export default class InstalledOutgoingWebhook extends React.Component {
static get propTypes() {
return {
- outgoingWebhook: React.PropTypes.object.isRequired,
- onRegenToken: React.PropTypes.func.isRequired,
- onDelete: React.PropTypes.func.isRequired,
- filter: React.PropTypes.string,
- creator: React.PropTypes.object.isRequired,
- canChange: React.PropTypes.bool.isRequired,
- team: React.PropTypes.object.isRequired
+ outgoingWebhook: PropTypes.object.isRequired,
+ onRegenToken: PropTypes.func.isRequired,
+ onDelete: PropTypes.func.isRequired,
+ filter: PropTypes.string,
+ creator: PropTypes.object.isRequired,
+ canChange: PropTypes.bool.isRequired,
+ team: PropTypes.object.isRequired
};
}
diff --git a/webapp/components/integrations/components/installed_outgoing_webhooks.jsx b/webapp/components/integrations/components/installed_outgoing_webhooks.jsx
index bcf203b2a..0750b5157 100644
--- a/webapp/components/integrations/components/installed_outgoing_webhooks.jsx
+++ b/webapp/components/integrations/components/installed_outgoing_webhooks.jsx
@@ -14,15 +14,17 @@ import {loadOutgoingHooks} from 'actions/integration_actions.jsx';
import * as Utils from 'utils/utils.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import {FormattedMessage} from 'react-intl';
export default class InstalledOutgoingWebhooks extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- user: React.PropTypes.object,
- isAdmin: React.PropTypes.bool
+ team: PropTypes.object,
+ user: PropTypes.object,
+ isAdmin: PropTypes.bool
};
}
diff --git a/webapp/components/integrations/components/integration_option.jsx b/webapp/components/integrations/components/integration_option.jsx
index 49474d939..dc411cb07 100644
--- a/webapp/components/integrations/components/integration_option.jsx
+++ b/webapp/components/integrations/components/integration_option.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -8,10 +10,10 @@ import {Link} from 'react-router/es6';
export default class IntegrationOption extends React.Component {
static get propTypes() {
return {
- image: React.PropTypes.string.isRequired,
- title: React.PropTypes.node.isRequired,
- description: React.PropTypes.node.isRequired,
- link: React.PropTypes.string.isRequired
+ image: PropTypes.string.isRequired,
+ title: PropTypes.node.isRequired,
+ description: PropTypes.node.isRequired,
+ link: PropTypes.string.isRequired
};
}
diff --git a/webapp/components/integrations/components/integrations.jsx b/webapp/components/integrations/components/integrations.jsx
index 4d6c5e919..6fe809086 100644
--- a/webapp/components/integrations/components/integrations.jsx
+++ b/webapp/components/integrations/components/integrations.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -16,8 +18,8 @@ import * as Utils from 'utils/utils.jsx';
export default class Integrations extends React.Component {
static get propTypes() {
return {
- team: React.PropTypes.object,
- user: React.PropTypes.object
+ team: PropTypes.object,
+ user: PropTypes.object
};
}
diff --git a/webapp/components/loading_screen.jsx b/webapp/components/loading_screen.jsx
index 2807cb0a7..e4821c07b 100644
--- a/webapp/components/loading_screen.jsx
+++ b/webapp/components/loading_screen.jsx
@@ -3,6 +3,8 @@
import {FormattedMessage} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class LoadingScreen extends React.Component {
@@ -44,6 +46,6 @@ LoadingScreen.defaultProps = {
position: 'relative'
};
LoadingScreen.propTypes = {
- position: React.PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'inherit']),
- message: React.PropTypes.node
+ position: PropTypes.oneOf(['absolute', 'fixed', 'relative', 'static', 'inherit']),
+ message: PropTypes.node
};
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index 3dfab57b3..8d753b13f 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -16,6 +16,7 @@ import Constants from 'utils/constants.jsx';
const BACKSPACE_CHAR = 8;
import $ from 'jquery';
+import PropTypes from 'prop-types';
import React from 'react';
// import the EmojiStore so that it'll register to receive the results of the listEmojis call further down
@@ -157,5 +158,5 @@ export default class LoggedIn extends React.Component {
}
LoggedIn.propTypes = {
- children: React.PropTypes.object
+ children: PropTypes.object
};
diff --git a/webapp/components/login/components/login_mfa.jsx b/webapp/components/login/components/login_mfa.jsx
index f945d3e07..3d8d1edc4 100644
--- a/webapp/components/login/components/login_mfa.jsx
+++ b/webapp/components/login/components/login_mfa.jsx
@@ -5,6 +5,8 @@ import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class LoginMfa extends React.Component {
@@ -87,7 +89,7 @@ LoginMfa.defaultProps = {
};
LoginMfa.propTypes = {
- loginId: React.PropTypes.string.isRequired,
- password: React.PropTypes.string.isRequired,
- submit: React.PropTypes.func.isRequired
+ loginId: PropTypes.string.isRequired,
+ password: PropTypes.string.isRequired,
+ submit: PropTypes.func.isRequired
};
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index 4b6757294..c9930c406 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -21,14 +21,16 @@ import Constants from 'utils/constants.jsx';
import {FormattedMessage} from 'react-intl';
import {browserHistory, Link} from 'react-router/es6';
+import PropTypes from 'prop-types';
+
import React from 'react';
import logoImage from 'images/logo.png';
export default class LoginController extends React.Component {
static get propTypes() {
return {
- location: React.PropTypes.object.isRequired,
- params: React.PropTypes.object.isRequired
+ location: PropTypes.object.isRequired,
+ params: PropTypes.object.isRequired
};
}
diff --git a/webapp/components/member_list_channel/member_list_channel.jsx b/webapp/components/member_list_channel/member_list_channel.jsx
index af2304433..8dbdd37f2 100644
--- a/webapp/components/member_list_channel/member_list_channel.jsx
+++ b/webapp/components/member_list_channel/member_list_channel.jsx
@@ -14,6 +14,8 @@ import Constants from 'utils/constants.jsx';
import * as UserAgent from 'utils/user_agent.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import store from 'stores/redux_store.jsx';
@@ -23,9 +25,9 @@ const USERS_PER_PAGE = 50;
export default class MemberListChannel extends React.Component {
static propTypes = {
- channel: React.PropTypes.object.isRequired,
- actions: React.PropTypes.shape({
- getChannelStats: React.PropTypes.func.isRequired
+ channel: PropTypes.object.isRequired,
+ actions: PropTypes.shape({
+ getChannelStats: PropTypes.func.isRequired
}).isRequired
}
diff --git a/webapp/components/member_list_team/member_list_team.jsx b/webapp/components/member_list_team/member_list_team.jsx
index bce6ade1b..60342ab83 100644
--- a/webapp/components/member_list_team/member_list_team.jsx
+++ b/webapp/components/member_list_team/member_list_team.jsx
@@ -13,6 +13,8 @@ import Constants from 'utils/constants.jsx';
import * as UserAgent from 'utils/user_agent.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import store from 'stores/redux_store.jsx';
@@ -22,9 +24,9 @@ const USERS_PER_PAGE = 50;
export default class MemberListTeam extends React.Component {
static propTypes = {
- isAdmin: React.PropTypes.bool,
- actions: React.PropTypes.shape({
- getTeamStats: React.PropTypes.func.isRequired
+ isAdmin: PropTypes.bool,
+ actions: PropTypes.shape({
+ getTeamStats: PropTypes.func.isRequired
}).isRequired
}
diff --git a/webapp/components/message_wrapper.jsx b/webapp/components/message_wrapper.jsx
index 95205de82..22f409783 100644
--- a/webapp/components/message_wrapper.jsx
+++ b/webapp/components/message_wrapper.jsx
@@ -5,6 +5,8 @@ import * as TextFormatting from 'utils/text_formatting.jsx';
import * as Utils from 'utils/utils.jsx';
import {getSiteURL} from 'utils/url.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class MessageWrapper extends React.Component {
@@ -35,6 +37,6 @@ MessageWrapper.defaultProps = {
message: ''
};
MessageWrapper.propTypes = {
- message: React.PropTypes.string,
- options: React.PropTypes.object
+ message: PropTypes.string,
+ options: PropTypes.object
};
diff --git a/webapp/components/mfa/mfa_controller.jsx b/webapp/components/mfa/mfa_controller.jsx
index 5c41fdfbb..a3d098abd 100644
--- a/webapp/components/mfa/mfa_controller.jsx
+++ b/webapp/components/mfa/mfa_controller.jsx
@@ -3,6 +3,8 @@
import {emitUserLoggedOutEvent} from 'actions/global_actions.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import {FormattedMessage} from 'react-intl';
import {browserHistory, Link} from 'react-router/es6';
@@ -82,6 +84,6 @@ export default class MFAController extends React.Component {
MFAController.defaultProps = {
};
MFAController.propTypes = {
- location: React.PropTypes.object.isRequired,
- children: React.PropTypes.node
+ location: PropTypes.object.isRequired,
+ children: PropTypes.node
};
diff --git a/webapp/components/more_channels/more_channels.jsx b/webapp/components/more_channels/more_channels.jsx
index 4a1d487c0..3ba8f41c0 100644
--- a/webapp/components/more_channels/more_channels.jsx
+++ b/webapp/components/more_channels/more_channels.jsx
@@ -11,6 +11,8 @@ import Constants from 'utils/constants.jsx';
import {joinChannel, searchMoreChannels} from 'actions/channel_actions.jsx';
import {showCreateOption} from 'utils/channel_utils.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {Modal} from 'react-bootstrap';
@@ -23,10 +25,10 @@ const SEARCH_TIMEOUT_MILLISECONDS = 100;
export default class MoreChannels extends React.Component {
static propTypes = {
- onModalDismissed: React.PropTypes.func,
- handleNewChannel: React.PropTypes.func,
- actions: React.PropTypes.shape({
- getChannels: React.PropTypes.func.isRequired
+ onModalDismissed: PropTypes.func,
+ handleNewChannel: PropTypes.func,
+ actions: PropTypes.shape({
+ getChannels: PropTypes.func.isRequired
}).isRequired
}
diff --git a/webapp/components/more_direct_channels/more_direct_channels.jsx b/webapp/components/more_direct_channels/more_direct_channels.jsx
index 16a45aa9a..f4134f077 100644
--- a/webapp/components/more_direct_channels/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels/more_direct_channels.jsx
@@ -14,6 +14,8 @@ import Constants from 'utils/constants.jsx';
import {displayUsernameForUser} from 'utils/utils.jsx';
import Client from 'client/web_client.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
import {Modal} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl';
@@ -27,11 +29,11 @@ const MAX_SELECTABLE_VALUES = Constants.MAX_USERS_IN_GM - 1;
export default class MoreDirectChannels extends React.Component {
static propTypes = {
- startingUsers: React.PropTypes.arrayOf(React.PropTypes.object),
- onModalDismissed: React.PropTypes.func,
- actions: React.PropTypes.shape({
- getProfiles: React.PropTypes.func.isRequired,
- getProfilesInTeam: React.PropTypes.func.isRequired
+ startingUsers: PropTypes.arrayOf(PropTypes.object),
+ onModalDismissed: PropTypes.func,
+ actions: PropTypes.shape({
+ getProfiles: PropTypes.func.isRequired,
+ getProfilesInTeam: PropTypes.func.isRequired
}).isRequired
}
diff --git a/webapp/components/msg_typing.jsx b/webapp/components/msg_typing.jsx
index 503af1dc7..ee278c5f6 100644
--- a/webapp/components/msg_typing.jsx
+++ b/webapp/components/msg_typing.jsx
@@ -5,6 +5,8 @@ import UserTypingStore from 'stores/user_typing_store.jsx';
import {FormattedMessage} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
class MsgTyping extends React.Component {
@@ -90,8 +92,8 @@ class MsgTyping extends React.Component {
}
MsgTyping.propTypes = {
- channelId: React.PropTypes.string,
- parentId: React.PropTypes.string
+ channelId: PropTypes.string,
+ parentId: PropTypes.string
};
export default MsgTyping;
diff --git a/webapp/components/multiselect/multiselect.jsx b/webapp/components/multiselect/multiselect.jsx
index c2bf60172..e22e0ac52 100644
--- a/webapp/components/multiselect/multiselect.jsx
+++ b/webapp/components/multiselect/multiselect.jsx
@@ -7,6 +7,8 @@ import {localizeMessage} from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
const KeyCodes = Constants.KeyCodes;
+import PropTypes from 'prop-types';
+
import React from 'react';
import ReactSelect from 'react-select';
import {FormattedMessage} from 'react-intl';
@@ -262,18 +264,18 @@ export default class MultiSelect extends React.Component {
}
MultiSelect.propTypes = {
- options: React.PropTypes.arrayOf(React.PropTypes.object),
- optionRenderer: React.PropTypes.func,
- values: React.PropTypes.arrayOf(React.PropTypes.object),
- valueRenderer: React.PropTypes.func,
- handleInput: React.PropTypes.func,
- handleDelete: React.PropTypes.func,
- perPage: React.PropTypes.number,
- handlePageChange: React.PropTypes.func,
- handleAdd: React.PropTypes.func,
- handleSubmit: React.PropTypes.func,
- noteText: React.PropTypes.node,
- maxValues: React.PropTypes.number,
- numRemainingText: React.PropTypes.node,
- buttonSubmitText: React.PropTypes.node
+ options: PropTypes.arrayOf(PropTypes.object),
+ optionRenderer: PropTypes.func,
+ values: PropTypes.arrayOf(PropTypes.object),
+ valueRenderer: PropTypes.func,
+ handleInput: PropTypes.func,
+ handleDelete: PropTypes.func,
+ perPage: PropTypes.number,
+ handlePageChange: PropTypes.func,
+ handleAdd: PropTypes.func,
+ handleSubmit: PropTypes.func,
+ noteText: PropTypes.node,
+ maxValues: PropTypes.number,
+ numRemainingText: PropTypes.node,
+ buttonSubmitText: PropTypes.node
};
diff --git a/webapp/components/multiselect/multiselect_list.jsx b/webapp/components/multiselect/multiselect_list.jsx
index e5faecb5a..4e5878790 100644
--- a/webapp/components/multiselect/multiselect_list.jsx
+++ b/webapp/components/multiselect/multiselect_list.jsx
@@ -5,6 +5,8 @@ import {cmdOrCtrlPressed} from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
const KeyCodes = Constants.KeyCodes;
+import PropTypes from 'prop-types';
+
import React from 'react';
import {FormattedMessage} from 'react-intl';
@@ -159,11 +161,11 @@ MultiSelectList.defaultProps = {
};
MultiSelectList.propTypes = {
- options: React.PropTypes.arrayOf(React.PropTypes.object),
- optionRenderer: React.PropTypes.func,
- page: React.PropTypes.number,
- perPage: React.PropTypes.number,
- onPageChange: React.PropTypes.func,
- onAdd: React.PropTypes.func,
- onSelect: React.PropTypes.func
+ options: PropTypes.arrayOf(PropTypes.object),
+ optionRenderer: PropTypes.func,
+ page: PropTypes.number,
+ perPage: PropTypes.number,
+ onPageChange: PropTypes.func,
+ onAdd: PropTypes.func,
+ onSelect: PropTypes.func
};
diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx
index 6a306dafd..67b681193 100644
--- a/webapp/components/navbar.jsx
+++ b/webapp/components/navbar.jsx
@@ -41,6 +41,8 @@ import {Popover, OverlayTrigger} from 'react-bootstrap';
import {Link} from 'react-router/es6';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class Navbar extends React.Component {
@@ -934,5 +936,5 @@ Navbar.defaultProps = {
teamDisplayName: ''
};
Navbar.propTypes = {
- teamDisplayName: React.PropTypes.string
+ teamDisplayName: PropTypes.string
};
diff --git a/webapp/components/needs_team/needs_team.jsx b/webapp/components/needs_team/needs_team.jsx
index 6c18ee4e4..aa3ea46e8 100644
--- a/webapp/components/needs_team/needs_team.jsx
+++ b/webapp/components/needs_team/needs_team.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -48,19 +50,19 @@ const UNREAD_CHECK_TIME_MILLISECONDS = 10000;
export default class NeedsTeam extends React.Component {
static propTypes = {
- children: React.PropTypes.oneOfType([
- React.PropTypes.arrayOf(React.PropTypes.element),
- React.PropTypes.element
+ children: PropTypes.oneOfType([
+ PropTypes.arrayOf(PropTypes.element),
+ PropTypes.element
]),
- navbar: React.PropTypes.element,
- sidebar: React.PropTypes.element,
- team_sidebar: React.PropTypes.element,
- center: React.PropTypes.element,
- params: React.PropTypes.object,
- user: React.PropTypes.object,
- actions: React.PropTypes.shape({
- viewChannel: React.PropTypes.func.isRequired,
- getMyChannelMembers: React.PropTypes.func.isRequired
+ navbar: PropTypes.element,
+ sidebar: PropTypes.element,
+ team_sidebar: PropTypes.element,
+ center: PropTypes.element,
+ params: PropTypes.object,
+ user: PropTypes.object,
+ actions: PropTypes.shape({
+ viewChannel: PropTypes.func.isRequired,
+ getMyChannelMembers: PropTypes.func.isRequired
}).isRequired
}
diff --git a/webapp/components/new_channel_flow.jsx b/webapp/components/new_channel_flow.jsx
index 69c2f1c4c..1a5c77132 100644
--- a/webapp/components/new_channel_flow.jsx
+++ b/webapp/components/new_channel_flow.jsx
@@ -16,6 +16,8 @@ const SHOW_NEW_CHANNEL = 1;
const SHOW_EDIT_URL = 2;
const SHOW_EDIT_URL_THEN_COMPLETE = 3;
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class NewChannelFlow extends React.Component {
@@ -239,7 +241,7 @@ NewChannelFlow.defaultProps = {
};
NewChannelFlow.propTypes = {
- show: React.PropTypes.bool.isRequired,
- channelType: React.PropTypes.string.isRequired,
- onModalDismissed: React.PropTypes.func.isRequired
+ show: PropTypes.bool.isRequired,
+ channelType: PropTypes.string.isRequired,
+ onModalDismissed: PropTypes.func.isRequired
};
diff --git a/webapp/components/password_reset_form.jsx b/webapp/components/password_reset_form.jsx
index 546dce1b3..5b77cb3e6 100644
--- a/webapp/components/password_reset_form.jsx
+++ b/webapp/components/password_reset_form.jsx
@@ -9,6 +9,8 @@ import {FormattedMessage} from 'react-intl';
import {resetPassword} from 'actions/user_actions.jsx';
+import PropTypes from 'prop-types';
+
import React from 'react';
class PasswordResetForm extends React.Component {
@@ -122,8 +124,8 @@ class PasswordResetForm extends React.Component {
PasswordResetForm.defaultProps = {
};
PasswordResetForm.propTypes = {
- params: React.PropTypes.object.isRequired,
- location: React.PropTypes.object.isRequired
+ params: PropTypes.object.isRequired,
+ location: PropTypes.object.isRequired
};
export default PasswordResetForm;
diff --git a/webapp/components/password_reset_send_link.jsx b/webapp/components/password_reset_send_link.jsx
index 260ef7250..a301fb7d4 100644
--- a/webapp/components/password_reset_send_link.jsx
+++ b/webapp/components/password_reset_send_link.jsx
@@ -8,6 +8,8 @@ import client from 'client/web_client.jsx';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
import {Link} from 'react-router/es6';
@@ -148,7 +150,7 @@ class PasswordResetSendLink extends React.Component {
PasswordResetSendLink.defaultProps = {
};
PasswordResetSendLink.propTypes = {
- params: React.PropTypes.object.isRequired
+ params: PropTypes.object.isRequired
};
export default PasswordResetSendLink;
diff --git a/webapp/components/pdf_preview.jsx b/webapp/components/pdf_preview.jsx
index 26444fe1f..790355561 100644
--- a/webapp/components/pdf_preview.jsx
+++ b/webapp/components/pdf_preview.jsx
@@ -5,6 +5,8 @@ import FileInfoPreview from './file_info_preview.jsx';
import loadingGif from 'images/load.gif';
+import PropTypes from 'prop-types';
+
import React from 'react';
import PDFJS from 'pdfjs-dist';
import {FormattedMessage} from 'react-intl';
@@ -171,6 +173,6 @@ export default class PDFPreview extends React.Component {
}
PDFPreview.propTypes = {
- fileInfo: React.PropTypes.object.isRequired,
- fileUrl: React.PropTypes.string.isRequired
+ fileInfo: PropTypes.object.isRequired,
+ fileUrl: PropTypes.string.isRequired
};
diff --git a/webapp/components/permalink_view.jsx b/webapp/components/permalink_view.jsx
index d57564350..ebcd83916 100644
--- a/webapp/components/permalink_view.jsx
+++ b/webapp/components/permalink_view.jsx
@@ -2,6 +2,7 @@
// See License.txt for license information.
import $ from 'jquery';
+import PropTypes from 'prop-types';
import React from 'react';
import ChannelHeader from 'components/channel_header.jsx';
@@ -90,5 +91,5 @@ export default class PermalinkView extends React.Component {
}
PermalinkView.propTypes = {
- params: React.PropTypes.object.isRequired
+ params: PropTypes.object.isRequired
};
diff --git a/webapp/components/popover_list_members/popover_list_members.jsx b/webapp/components/popover_list_members/popover_list_members.jsx
index cf6042943..6a3fe737b 100644
--- a/webapp/components/popover_list_members/popover_list_members.jsx
+++ b/webapp/components/popover_list_members/popover_list_members.jsx
@@ -19,6 +19,7 @@ import Constants from 'utils/constants.jsx';
import {canManageMembers} from 'utils/channel_utils.jsx';
import $ from 'jquery';
+import PropTypes from 'prop-types';
import React from 'react';
import {Popover, Overlay} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl';
@@ -26,11 +27,11 @@ import {browserHistory} from 'react-router/es6';
export default class PopoverListMembers extends React.Component {
static propTypes = {
- channel: React.PropTypes.object.isRequired,
- members: React.PropTypes.array.isRequired,
- memberCount: React.PropTypes.number,
- actions: React.PropTypes.shape({
- getProfilesInChannel: React.PropTypes.func.isRequired
+ channel: PropTypes.object.isRequired,
+ members: PropTypes.array.isRequired,
+ memberCount: PropTypes.number,
+ actions: PropTypes.shape({
+ getProfilesInChannel: PropTypes.func.isRequired
}).isRequired
}
diff --git a/webapp/components/post_deleted_modal.jsx b/webapp/components/post_deleted_modal.jsx
index 9f3125ffa..5b5984140 100644
--- a/webapp/components/post_deleted_modal.jsx
+++ b/webapp/components/post_deleted_modal.jsx
@@ -5,6 +5,8 @@ import {FormattedMessage} from 'react-intl';
import {Modal} from 'react-bootstrap';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class PostDeletedModal extends React.Component {
@@ -64,6 +66,6 @@ export default class PostDeletedModal extends React.Component {
}
PostDeletedModal.propTypes = {
- show: React.PropTypes.bool.isRequired,
- onHide: React.PropTypes.func.isRequired
+ show: PropTypes.bool.isRequired,
+ onHide: PropTypes.func.isRequired
};
diff --git a/webapp/components/post_view/components/commented_on_files_message_container.jsx b/webapp/components/post_view/components/commented_on_files_message_container.jsx
index d1fa455c7..6ba1de3de 100644
--- a/webapp/components/post_view/components/commented_on_files_message_container.jsx
+++ b/webapp/components/post_view/components/commented_on_files_message_container.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
@@ -9,8 +11,8 @@ import * as Utils from 'utils/utils.jsx';
export default class CommentedOnFilesMessageContainer extends React.Component {
static propTypes = {
- parentPostChannelId: React.PropTypes.string.isRequired,
- parentPostId: React.PropTypes.string.isRequired
+ parentPostChannelId: PropTypes.string.isRequired,
+ parentPostId: PropTypes.string.isRequired
}
constructor(props) {
diff --git a/webapp/components/post_view/components/date_separator.jsx b/webapp/components/post_view/components/date_separator.jsx
index 18dc0c7ff..4648f456c 100644
--- a/webapp/components/post_view/components/date_separator.jsx
+++ b/webapp/components/post_view/components/date_separator.jsx
@@ -1,27 +1,26 @@
+import PropTypes from 'prop-types';
import React from 'react';
import {FormattedDate} from 'react-intl';
-export default class DateSeparator extends React.Component {
- render() {
- return (
-
-
-
-
-
+export default function DateSeparator(props) {
+ return (
+
+
+
+
- );
- }
+
+ );
}
DateSeparator.propTypes = {
- date: React.PropTypes.instanceOf(Date)
+ date: PropTypes.instanceOf(Date)
};
diff --git a/webapp/components/post_view/components/floating_timestamp.jsx b/webapp/components/post_view/components/floating_timestamp.jsx
index d2d26c0bd..34e6ce006 100644
--- a/webapp/components/post_view/components/floating_timestamp.jsx
+++ b/webapp/components/post_view/components/floating_timestamp.jsx
@@ -3,6 +3,8 @@
import {FormattedDate} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
@@ -52,8 +54,8 @@ export default class FloatingTimestamp extends React.Component {
}
FloatingTimestamp.propTypes = {
- isScrolling: React.PropTypes.bool.isRequired,
- isMobile: React.PropTypes.bool,
- createAt: React.PropTypes.number,
- isRhsPost: React.PropTypes.bool
+ isScrolling: PropTypes.bool.isRequired,
+ isMobile: PropTypes.bool,
+ createAt: PropTypes.number,
+ isRhsPost: PropTypes.bool
};
diff --git a/webapp/components/post_view/components/new_message_indicator.jsx b/webapp/components/post_view/components/new_message_indicator.jsx
index 488a38b1b..cafdc128a 100644
--- a/webapp/components/post_view/components/new_message_indicator.jsx
+++ b/webapp/components/post_view/components/new_message_indicator.jsx
@@ -1,3 +1,5 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
@@ -59,6 +61,6 @@ NewMessageIndicator.defaultProps = {
};
NewMessageIndicator.propTypes = {
- onClick: React.PropTypes.func.isRequired,
- newMessages: React.PropTypes.number
+ onClick: PropTypes.func.isRequired,
+ newMessages: PropTypes.number
};
diff --git a/webapp/components/post_view/components/pending_post_options.jsx b/webapp/components/post_view/components/pending_post_options.jsx
index 0085a16f2..9742a74bf 100644
--- a/webapp/components/post_view/components/pending_post_options.jsx
+++ b/webapp/components/post_view/components/pending_post_options.jsx
@@ -9,6 +9,8 @@ import Constants from 'utils/constants.jsx';
import {FormattedMessage} from 'react-intl';
+import PropTypes from 'prop-types';
+
import React from 'react';
export default class PendingPostOptions extends React.Component {
@@ -83,5 +85,5 @@ export default class PendingPostOptions extends React.Component {
}
PendingPostOptions.propTypes = {
- post: React.PropTypes.object
+ post: PropTypes.object
};
diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx
index 38f95a85b..c1b932774 100644
--- a/webapp/components/post_view/components/post.jsx
+++ b/webapp/components/post_view/components/post.jsx
@@ -1,7 +1,9 @@
+import PropTypes from 'prop-types';
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import React, {Component, PropTypes} from 'react';
+import React, {Component} from 'react';
import ProfilePicture from 'components/profile_picture.jsx';
diff --git a/webapp/components/post_view/components/post_attachment.jsx b/webapp/components/post_view/components/post_attachment.jsx
index 930e75b41..e873ef9c7 100644
--- a/webapp/components/post_view/components/post_attachment.jsx
+++ b/webapp/components/post_view/components/post_attachment.jsx
@@ -17,6 +17,8 @@ const holders = defineMessages({
}
});
+import PropTypes from 'prop-types';
+
import React from 'react';
class PostAttachment extends React.Component {
@@ -315,7 +317,7 @@ class PostAttachment extends React.Component {
PostAttachment.propTypes = {
intl: intlShape.isRequired,
- attachment: React.PropTypes.object.isRequired
+ attachment: PropTypes.object.isRequired
};
export default injectIntl(PostAttachment);
diff --git a/webapp/components/post_view/components/post_attachment_list.jsx b/webapp/components/post_view/components/post_attachment_list.jsx
index 5223fb2b3..3d7c0e4cd 100644
--- a/webapp/components/post_view/components/post_attachment_list.jsx
+++ b/webapp/components/post_view/components/post_attachment_list.jsx
@@ -3,28 +3,28 @@
import PostAttachment from './post_attachment.jsx';
-import React from 'react';
+import PropTypes from 'prop-types';
-export default class PostAttachmentList extends React.Component {
- render() {
- const content = [];
- this.props.attachments.forEach((attachment, i) => {
- content.push(
-
- );
- });
+import React from 'react';
- return (
-