Skip to content

Commit

Permalink
filter out emoji and update emojimart
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaap committed Mar 26, 2020
1 parent 7de6db5 commit 333ed77
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"anchorme": "^1.1.2",
"dayjs": "^1.8.23",
"deep-equal": "^2.0.1",
"emoji-mart": "2.11.0",
"emoji-mart": "3.0.0",
"emoji-regex": "^8.0.0",
"i18next": "^19.3.3",
"isomorphic-ws": "^4.0.1",
Expand Down
3 changes: 3 additions & 0 deletions src/components/EditMessageForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
FileUploadButton,
} from 'react-file-utils';
import { withTranslationContext } from '../context';
import { filterEmoji } from '../utils';

/**
* @example ./docs/EditMessageForm.md
Expand Down Expand Up @@ -130,6 +131,7 @@ class EditMessageForm extends React.Component {
onSelect={this.props.onSelectEmoji}
color="#006CFF"
showPreview={false}
emojisToShowFilter={filterEmoji}
/>
</div>
);
Expand Down Expand Up @@ -164,6 +166,7 @@ class EditMessageForm extends React.Component {
title={t('Pick your emoji')}
onSelect={this.props.onSelectEmoji}
color="#006CFF"
emojisToShowFilter={filterEmoji}
/>
</div>
)}
Expand Down
2 changes: 2 additions & 0 deletions src/components/MessageInputFlat.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
FilePreviewer,
FileUploadButton,
} from 'react-file-utils';
import { filterEmoji } from '../utils';

import { Picker } from 'emoji-mart';

Expand Down Expand Up @@ -134,6 +135,7 @@ class MessageInputFlat extends PureComponent {
onSelect={this.props.onSelectEmoji}
color="#006CFF"
showPreview={false}
emojisToShowFilter={filterEmoji}
/>
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion src/components/MessageInputLarge.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { ChatAutoComplete } from './ChatAutoComplete';
import { withTranslationContext } from '../context';

import { filterEmoji } from '../utils';
import {
ImageDropzone,
ImagePreviewer,
Expand Down Expand Up @@ -131,6 +131,8 @@ class MessageInputLarge extends PureComponent {
onSelect={this.props.onSelectEmoji}
color="#006CFF"
showPreview={false}
useButton={true}
emojisToShowFilter={filterEmoji}
/>
</div>
);
Expand Down
2 changes: 2 additions & 0 deletions src/components/MessageInputSmall.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
FilePreviewer,
FileUploadButton,
} from 'react-file-utils';
import { filterEmoji } from '../utils';

/**
* MessageInputSmall - compact design to be used for the MessageInput. It has all the features of MessageInput minus the typing indicator.
Expand Down Expand Up @@ -131,6 +132,7 @@ class MessageInputSmall extends PureComponent {
onSelect={this.props.onSelectEmoji}
color="#006CFF"
showPreview={false}
emojisToShowFilter={filterEmoji}
/>
</div>
);
Expand Down
9 changes: 5 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3738,11 +3738,12 @@ elliptic@^6.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.0"

emoji-mart@2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/emoji-mart/-/emoji-mart-2.11.0.tgz#fed7c44d3a642b5de08848e8833d65a656ea8414"
integrity sha512-ol1ABg0xfDwCeKVu0Mmr/iTRHUMvqlyLZJFRQy+e6aWV83/Y+TEbJpBbtk7NxaW3BLAOyJ8r0NWthRQwxTtT1A==
emoji-mart@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/emoji-mart/-/emoji-mart-3.0.0.tgz#eca24a04881e27752a6921e09f65a86ce8539a50"
integrity sha512-r5DXyzOLJttdwRYfJmPq/XL3W5tiAE/VsRnS0Hqyn27SqPA/GOYwVUSx50px/dXdJyDSnvmoPbuJ/zzhwSaU4A==
dependencies:
"@babel/runtime" "^7.0.0"
prop-types "^15.6.0"

"emoji-regex@>=6.0.0 <=6.1.1":
Expand Down

0 comments on commit 333ed77

Please sign in to comment.