react-native-gifted-chat
Advanced tools
Comparing version 0.2.7 to 0.2.8
{ | ||
"name": "react-native-gifted-chat", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "The most complete chat UI for React Native", | ||
@@ -39,10 +39,10 @@ "main": "index.js", | ||
"dependencies": { | ||
"@expo/react-native-action-sheet": "cribspot/react-native-action-sheet#b422c54f26d30b9e85eb14a882ea9cec38600730", | ||
"@expo/react-native-action-sheet": "^1.0.1", | ||
"md5": "2.2.1", | ||
"moment": "2.18.1", | ||
"moment": "^2.19.0", | ||
"prop-types": "15.5.10", | ||
"react-native-communications": "2.2.1", | ||
"react-native-invertible-scroll-view": "1.0.0", | ||
"react-native-lightbox": "oblador/react-native-lightbox#c84a8543d4511fe6a44c3d7820747c9c1bddd875", | ||
"react-native-parsed-text": "0.0.18", | ||
"react-native-invertible-scroll-view": "^1.1.0", | ||
"react-native-lightbox": "^0.7.0", | ||
"react-native-parsed-text": "^0.0.19", | ||
"shallowequal": "1.0.2", | ||
@@ -49,0 +49,0 @@ "uuid": "3.1.0" |
@@ -130,3 +130,3 @@ # Gifted Chat | ||
- **`renderBubble`** _(Function)_ - Custom message bubble | ||
- **`onLongPress`** _(Function(`context`, `message`))_ - Callback when a message bubble is long-pressed; default is to show an ActionSheet with "Copy Text" (see [example using `showActionSheetWithOptions()`](https://github.com/FaridSafi/react-native-gifted-chat/blob/master/example/CustomActions.js)) | ||
- **`onLongPress`** _(Function(`context`, `message`))_ - Callback when a message bubble is long-pressed; default is to show an ActionSheet with "Copy Text" (see [example using `showActionSheetWithOptions()`](https://github.com/FaridSafi/react-native-gifted-chat/blob/master@%7B2017-09-25%7D/src/Bubble.js#L96-L119)) | ||
- **`renderMessage`** _(Function)_ - Custom message container | ||
@@ -154,3 +154,13 @@ - **`renderMessageText`** _(Function)_ - Custom message text | ||
- **`maxInputLength`** _(Integer)_ - Max message composer TextInput length | ||
- **`parsePatterns`** _(Function)_ - Custom parse patterns for [react-native-parsed-text](https://github.com/taskrabbit/react-native-parsed-text) used to linkify message content (like URLs and phone numbers), e.g.: | ||
```js | ||
<GiftedChat | ||
parsePatterns={(linkStyle) => [ | ||
{ type: 'phone', style: linkStyle, onPress: this.onPressPhoneNumber }, | ||
{ pattern: /#(\w+)/, style: { ...linkStyle, styles.hashtag }, onPress: this.onPressHashtag }, | ||
]} | ||
/> | ||
``` | ||
## Imperative methods | ||
@@ -157,0 +167,0 @@ |
@@ -68,2 +68,3 @@ import PropTypes from 'prop-types'; | ||
render() { | ||
const linkStyle = StyleSheet.flatten([styles[this.props.position].link, this.props.linkStyle[this.props.position]]); | ||
return ( | ||
@@ -74,5 +75,6 @@ <View style={[styles[this.props.position].container, this.props.containerStyle[this.props.position]]}> | ||
parse={[ | ||
{type: 'url', style: StyleSheet.flatten([styles[this.props.position].link, this.props.linkStyle[this.props.position]]), onPress: this.onUrlPress}, | ||
{type: 'phone', style: StyleSheet.flatten([styles[this.props.position].link, this.props.linkStyle[this.props.position]]), onPress: this.onPhonePress}, | ||
{type: 'email', style: StyleSheet.flatten([styles[this.props.position].link, this.props.linkStyle[this.props.position]]), onPress: this.onEmailPress}, | ||
...this.props.parsePatterns(linkStyle), | ||
{type: 'url', style: linkStyle, onPress: this.onUrlPress}, | ||
{type: 'phone', style: linkStyle, onPress: this.onPhonePress}, | ||
{type: 'email', style: linkStyle, onPress: this.onEmailPress}, | ||
]} | ||
@@ -135,2 +137,3 @@ > | ||
linkStyle: {}, | ||
parsePatterns: () => [], | ||
}; | ||
@@ -153,2 +156,3 @@ | ||
}), | ||
parsePatterns: PropTypes.func, | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 2 instances in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 2 instances in 1 package
2146
220
0
1
117602
27
+ Added@expo/react-native-action-sheet@1.1.2(transitive)
+ Addedcreate-react-class@15.7.0(transitive)
+ Addedhoist-non-react-statics@2.5.5(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedreact-native-invertible-scroll-view@1.1.1(transitive)
+ Addedreact-native-lightbox@0.7.0(transitive)
+ Addedreact-native-parsed-text@0.0.19(transitive)
- Removedmoment@2.18.1(transitive)
- Removedreact-native-invertible-scroll-view@1.0.0(transitive)
- Removedreact-native-parsed-text@0.0.18(transitive)
Updatedmoment@^2.19.0
Updatedreact-native-lightbox@^0.7.0