react-native-gifted-chat 0.16.3 → 1.0.0-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.eslintrc.js +21 -0
- package/README.md +18 -15
- package/jest.config.js +15 -0
- package/lib/Actions.d.ts +4 -10
- package/lib/Actions.js +27 -41
- package/lib/Actions.js.map +1 -1
- package/lib/Avatar.d.ts +5 -6
- package/lib/Avatar.js +29 -34
- package/lib/Avatar.js.map +1 -1
- package/lib/Bubble.d.ts +24 -20
- package/lib/Bubble.js +26 -19
- package/lib/Bubble.js.map +1 -1
- package/lib/Composer.d.ts +4 -24
- package/lib/Composer.js +22 -44
- package/lib/Composer.js.map +1 -1
- package/lib/Day.d.ts +5 -19
- package/lib/Day.js +14 -29
- package/lib/Day.js.map +1 -1
- package/lib/GiftedAvatar.js +9 -9
- package/lib/GiftedAvatar.js.map +1 -1
- package/lib/GiftedChat.d.ts +54 -42
- package/lib/GiftedChat.js +69 -42
- package/lib/GiftedChat.js.flow +8 -0
- package/lib/GiftedChat.js.map +1 -1
- package/lib/GiftedChatContext.d.ts +9 -0
- package/lib/GiftedChatContext.js +9 -0
- package/lib/GiftedChatContext.js.map +1 -0
- package/lib/InputToolbar.d.ts +13 -37
- package/lib/InputToolbar.js +27 -93
- package/lib/InputToolbar.js.map +1 -1
- package/lib/LoadEarlier.d.ts +3 -15
- package/lib/LoadEarlier.js +11 -36
- package/lib/LoadEarlier.js.map +1 -1
- package/lib/Message.d.ts +13 -10
- package/lib/Message.js +16 -14
- package/lib/Message.js.map +1 -1
- package/lib/MessageAudio.d.ts +1 -3
- package/lib/MessageAudio.js +11 -9
- package/lib/MessageAudio.js.map +1 -1
- package/lib/MessageContainer.d.ts +10 -13
- package/lib/MessageContainer.js +11 -48
- package/lib/MessageContainer.js.map +1 -1
- package/lib/MessageImage.d.ts +5 -14
- package/lib/MessageImage.js +11 -24
- package/lib/MessageImage.js.map +1 -1
- package/lib/MessageText.d.ts +4 -25
- package/lib/MessageText.js +77 -93
- package/lib/MessageText.js.map +1 -1
- package/lib/MessageVideo.d.ts +1 -3
- package/lib/MessageVideo.js +11 -9
- package/lib/MessageVideo.js.map +1 -1
- package/lib/Models.d.ts +5 -5
- package/lib/Models.js +1 -0
- package/lib/QuickReplies.d.ts +6 -27
- package/lib/QuickReplies.js +65 -97
- package/lib/QuickReplies.js.map +1 -1
- package/lib/Send.d.ts +5 -17
- package/lib/Send.js +15 -31
- package/lib/Send.js.map +1 -1
- package/lib/SystemMessage.d.ts +3 -12
- package/lib/SystemMessage.js +8 -19
- package/lib/SystemMessage.js.map +1 -1
- package/lib/Time.d.ts +4 -17
- package/lib/Time.js +30 -41
- package/lib/Time.js.map +1 -1
- package/lib/TypingIndicator.d.ts +0 -1
- package/lib/TypingIndicator.js +11 -11
- package/lib/TypingIndicator.js.map +1 -1
- package/lib/hooks/useUpdateLayoutEffect.d.ts +3 -2
- package/lib/hooks/useUpdateLayoutEffect.js +1 -1
- package/lib/hooks/useUpdateLayoutEffect.js.map +1 -1
- package/package.json +41 -67
package/lib/MessageText.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import { TextProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
4
3
|
import { LeftRightStyle, IMessage } from './Models';
|
|
5
4
|
export interface MessageTextProps<TMessage extends IMessage> {
|
|
6
|
-
position
|
|
5
|
+
position?: 'left' | 'right';
|
|
7
6
|
optionTitles?: string[];
|
|
8
7
|
currentMessage?: TMessage;
|
|
9
8
|
containerStyle?: LeftRightStyle<ViewStyle>;
|
|
@@ -13,24 +12,9 @@ export interface MessageTextProps<TMessage extends IMessage> {
|
|
|
13
12
|
customTextStyle?: StyleProp<TextStyle>;
|
|
14
13
|
parsePatterns?(linkStyle: TextStyle): any;
|
|
15
14
|
}
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
static defaultProps: {
|
|
21
|
-
position: string;
|
|
22
|
-
optionTitles: string[];
|
|
23
|
-
currentMessage: {
|
|
24
|
-
text: string;
|
|
25
|
-
};
|
|
26
|
-
containerStyle: {};
|
|
27
|
-
textStyle: {};
|
|
28
|
-
linkStyle: {};
|
|
29
|
-
customTextStyle: {};
|
|
30
|
-
textProps: {};
|
|
31
|
-
parsePatterns: () => never[];
|
|
32
|
-
};
|
|
33
|
-
static propTypes: {
|
|
15
|
+
export declare function MessageText<TMessage extends IMessage = IMessage>({ currentMessage, optionTitles, position, containerStyle, textStyle, linkStyle: linkStyleProp, customTextStyle, parsePatterns, textProps, }: MessageTextProps<TMessage>): JSX.Element;
|
|
16
|
+
export declare namespace MessageText {
|
|
17
|
+
var propTypes: {
|
|
34
18
|
position: PropTypes.Requireable<string>;
|
|
35
19
|
optionTitles: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
36
20
|
currentMessage: PropTypes.Requireable<object>;
|
|
@@ -50,9 +34,4 @@ export default class MessageText<TMessage extends IMessage = IMessage> extends R
|
|
|
50
34
|
textProps: PropTypes.Requireable<object>;
|
|
51
35
|
customTextStyle: PropTypes.Requireable<number | boolean | object>;
|
|
52
36
|
};
|
|
53
|
-
shouldComponentUpdate(nextProps: MessageTextProps<TMessage>): boolean;
|
|
54
|
-
onUrlPress: (url: string) => void;
|
|
55
|
-
onPhonePress: (phone: string) => void;
|
|
56
|
-
onEmailPress: (email: string) => void;
|
|
57
|
-
render(): JSX.Element;
|
|
58
37
|
}
|
package/lib/MessageText.js
CHANGED
|
@@ -5,15 +5,18 @@ import { Linking, StyleSheet, View, } from 'react-native';
|
|
|
5
5
|
import ParsedText from 'react-native-parsed-text';
|
|
6
6
|
import Communications from 'react-native-communications';
|
|
7
7
|
import { StylePropType } from './utils';
|
|
8
|
+
import { useChatContext } from './GiftedChatContext';
|
|
8
9
|
const WWW_URL_PATTERN = /^www\./i;
|
|
9
|
-
const textStyle = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const { textStyle } = StyleSheet.create({
|
|
11
|
+
textStyle: {
|
|
12
|
+
fontSize: 16,
|
|
13
|
+
lineHeight: 20,
|
|
14
|
+
marginTop: 5,
|
|
15
|
+
marginBottom: 5,
|
|
16
|
+
marginLeft: 10,
|
|
17
|
+
marginRight: 10,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
17
20
|
const styles = {
|
|
18
21
|
left: StyleSheet.create({
|
|
19
22
|
container: {},
|
|
@@ -39,96 +42,77 @@ const styles = {
|
|
|
39
42
|
}),
|
|
40
43
|
};
|
|
41
44
|
const DEFAULT_OPTION_TITLES = ['Call', 'Text', 'Cancel'];
|
|
42
|
-
export
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
? optionTitles.slice(0, 3)
|
|
66
|
-
: DEFAULT_OPTION_TITLES;
|
|
67
|
-
const cancelButtonIndex = options.length - 1;
|
|
68
|
-
this.context.actionSheet().showActionSheetWithOptions({
|
|
69
|
-
options,
|
|
70
|
-
cancelButtonIndex,
|
|
71
|
-
}, (buttonIndex) => {
|
|
72
|
-
switch (buttonIndex) {
|
|
73
|
-
case 0:
|
|
74
|
-
Communications.phonecall(phone, true);
|
|
75
|
-
break;
|
|
76
|
-
case 1:
|
|
77
|
-
Communications.text(phone);
|
|
78
|
-
break;
|
|
79
|
-
default:
|
|
80
|
-
break;
|
|
45
|
+
export function MessageText({ currentMessage = {}, optionTitles = DEFAULT_OPTION_TITLES, position = 'left', containerStyle, textStyle, linkStyle: linkStyleProp, customTextStyle, parsePatterns = () => [], textProps, }) {
|
|
46
|
+
const { actionSheet } = useChatContext();
|
|
47
|
+
// TODO: React.memo
|
|
48
|
+
// const shouldComponentUpdate = (nextProps: MessageTextProps<TMessage>) => {
|
|
49
|
+
// return (
|
|
50
|
+
// !!currentMessage &&
|
|
51
|
+
// !!nextProps.currentMessage &&
|
|
52
|
+
// currentMessage.text !== nextProps.currentMessage.text
|
|
53
|
+
// )
|
|
54
|
+
// }
|
|
55
|
+
const onUrlPress = (url) => {
|
|
56
|
+
// When someone sends a message that includes a website address beginning with "www." (omitting the scheme),
|
|
57
|
+
// react-native-parsed-text recognizes it as a valid url, but Linking fails to open due to the missing scheme.
|
|
58
|
+
if (WWW_URL_PATTERN.test(url)) {
|
|
59
|
+
onUrlPress(`https://${url}`);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
Linking.canOpenURL(url).then(supported => {
|
|
63
|
+
if (!supported) {
|
|
64
|
+
console.error('No handler for URL:', url);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
Linking.openURL(url);
|
|
81
68
|
}
|
|
82
69
|
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const onPhonePress = (phone) => {
|
|
73
|
+
const options = optionTitles && optionTitles.length > 0
|
|
74
|
+
? optionTitles.slice(0, 3)
|
|
75
|
+
: DEFAULT_OPTION_TITLES;
|
|
76
|
+
const cancelButtonIndex = options.length - 1;
|
|
77
|
+
actionSheet().showActionSheetWithOptions({
|
|
78
|
+
options,
|
|
79
|
+
cancelButtonIndex,
|
|
80
|
+
}, (buttonIndex) => {
|
|
81
|
+
switch (buttonIndex) {
|
|
82
|
+
case 0:
|
|
83
|
+
Communications.phonecall(phone, true);
|
|
84
|
+
break;
|
|
85
|
+
case 1:
|
|
86
|
+
Communications.text(phone);
|
|
87
|
+
break;
|
|
88
|
+
default:
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const onEmailPress = (email) => Communications.email([email], null, null, null, null);
|
|
94
|
+
const linkStyle = [
|
|
95
|
+
styles[position].link,
|
|
96
|
+
linkStyleProp && linkStyleProp[position],
|
|
97
|
+
];
|
|
98
|
+
return (<View style={[
|
|
99
|
+
styles[position].container,
|
|
100
|
+
containerStyle && containerStyle[position],
|
|
100
101
|
]}>
|
|
101
|
-
|
|
102
|
-
styles[
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
<ParsedText style={[
|
|
103
|
+
styles[position].text,
|
|
104
|
+
textStyle && textStyle[position],
|
|
105
|
+
customTextStyle,
|
|
105
106
|
]} parse={[
|
|
106
|
-
...
|
|
107
|
-
{ type: 'url', style: linkStyle, onPress:
|
|
108
|
-
{ type: 'phone', style: linkStyle, onPress:
|
|
109
|
-
{ type: 'email', style: linkStyle, onPress:
|
|
110
|
-
]} childrenProps={{ ...
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
107
|
+
...parsePatterns(linkStyle),
|
|
108
|
+
{ type: 'url', style: linkStyle, onPress: onUrlPress },
|
|
109
|
+
{ type: 'phone', style: linkStyle, onPress: onPhonePress },
|
|
110
|
+
{ type: 'email', style: linkStyle, onPress: onEmailPress },
|
|
111
|
+
]} childrenProps={{ ...textProps }}>
|
|
112
|
+
{currentMessage.text}
|
|
113
|
+
</ParsedText>
|
|
114
|
+
</View>);
|
|
115
115
|
}
|
|
116
|
-
MessageText.contextTypes = {
|
|
117
|
-
actionSheet: PropTypes.func,
|
|
118
|
-
};
|
|
119
|
-
MessageText.defaultProps = {
|
|
120
|
-
position: 'left',
|
|
121
|
-
optionTitles: DEFAULT_OPTION_TITLES,
|
|
122
|
-
currentMessage: {
|
|
123
|
-
text: '',
|
|
124
|
-
},
|
|
125
|
-
containerStyle: {},
|
|
126
|
-
textStyle: {},
|
|
127
|
-
linkStyle: {},
|
|
128
|
-
customTextStyle: {},
|
|
129
|
-
textProps: {},
|
|
130
|
-
parsePatterns: () => [],
|
|
131
|
-
};
|
|
132
116
|
MessageText.propTypes = {
|
|
133
117
|
position: PropTypes.oneOf(['left', 'right']),
|
|
134
118
|
optionTitles: PropTypes.arrayOf(PropTypes.string),
|
package/lib/MessageText.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageText.js","sourceRoot":"","sources":["../src/MessageText.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,OAAO,EACP,UAAU,EACV,IAAI,GAKL,MAAM,cAAc,CAAA;AAErB,aAAa;AACb,OAAO,UAAU,MAAM,0BAA0B,CAAA;AACjD,OAAO,cAAc,MAAM,6BAA6B,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"MessageText.js","sourceRoot":"","sources":["../src/MessageText.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,OAAO,EACP,UAAU,EACV,IAAI,GAKL,MAAM,cAAc,CAAA;AAErB,aAAa;AACb,OAAO,UAAU,MAAM,0BAA0B,CAAA;AACjD,OAAO,cAAc,MAAM,6BAA6B,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,eAAe,GAAG,SAAS,CAAA;AAEjC,MAAM,EAAE,SAAS,EAAE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AAI,EAAE,aAAa;QACnB,KAAK,EAAE,aAAa;KACrB,CAAC;IACF,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC;QACzB,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,aAAa;KACrB,CAAC;IACF,aAAa,EAAE,SAAS,CAAC,IAAI;IAC7B,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,eAAe,EAAE,aAAa;CAC/B,CAAA"}
|
package/lib/MessageVideo.d.ts
CHANGED
package/lib/MessageVideo.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Color from './Color';
|
|
3
3
|
import { View, Text } from 'react-native';
|
|
4
|
-
export
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
export function MessageVideo(_props) {
|
|
5
|
+
return (<View style={{ padding: 20 }}>
|
|
6
|
+
<Text style={{ color: Color.alizarin, fontWeight: '600' }}>
|
|
7
|
+
Video is not implemented by GiftedChat.
|
|
8
|
+
</Text>
|
|
9
|
+
<Text style={{ color: Color.alizarin, fontWeight: '600' }}>
|
|
10
|
+
You need to provide your own implementation by using renderMessageVideo
|
|
11
|
+
prop.
|
|
12
|
+
</Text>
|
|
13
|
+
</View>);
|
|
14
|
+
}
|
|
13
15
|
//# sourceMappingURL=MessageVideo.js.map
|
package/lib/MessageVideo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageVideo.js","sourceRoot":"","sources":["../src/MessageVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEzC,
|
|
1
|
+
{"version":3,"file":"MessageVideo.js","sourceRoot":"","sources":["../src/MessageVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,YAAY,CAAC,MAAW;IACtC,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC3B;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CACxD;;MACF,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CACxD;;;MAEF,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC"}
|
package/lib/Models.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { LightboxProps } from 'react-native-lightbox-v2';
|
|
3
3
|
export { ActionsProps } from './Actions';
|
|
4
4
|
export { AvatarProps } from './Avatar';
|
|
5
5
|
export { BubbleProps, RenderMessageImageProps, RenderMessageVideoProps, RenderMessageAudioProps, RenderMessageTextProps, } from './Bubble';
|
|
@@ -18,14 +18,14 @@ export { SystemMessageProps } from './SystemMessage';
|
|
|
18
18
|
export { TimeProps } from './Time';
|
|
19
19
|
export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
20
20
|
export interface LeftRightStyle<T> {
|
|
21
|
-
left
|
|
22
|
-
right
|
|
21
|
+
left?: StyleProp<T>;
|
|
22
|
+
right?: StyleProp<T>;
|
|
23
23
|
}
|
|
24
24
|
declare type renderFunction = (x: any) => JSX.Element;
|
|
25
25
|
export interface User {
|
|
26
26
|
_id: string | number;
|
|
27
27
|
name?: string;
|
|
28
|
-
avatar?: string | renderFunction;
|
|
28
|
+
avatar?: string | number | renderFunction;
|
|
29
29
|
}
|
|
30
30
|
export interface Reply {
|
|
31
31
|
title: string;
|
|
@@ -57,7 +57,7 @@ export interface MessageVideoProps<TMessage extends IMessage> {
|
|
|
57
57
|
containerStyle?: StyleProp<ViewStyle>;
|
|
58
58
|
videoStyle?: StyleProp<ViewStyle>;
|
|
59
59
|
videoProps?: object;
|
|
60
|
-
lightboxProps?:
|
|
60
|
+
lightboxProps?: LightboxProps;
|
|
61
61
|
}
|
|
62
62
|
export interface MessageAudioProps<TMessage extends IMessage> {
|
|
63
63
|
currentMessage?: TMessage;
|
package/lib/Models.js
CHANGED
package/lib/QuickReplies.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import React
|
|
3
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
4
4
|
import { IMessage, Reply } from './Models';
|
|
5
5
|
export interface QuickRepliesProps {
|
|
6
6
|
nextMessage?: IMessage;
|
|
@@ -8,39 +8,18 @@ export interface QuickRepliesProps {
|
|
|
8
8
|
color?: string;
|
|
9
9
|
sendText?: string;
|
|
10
10
|
quickReplyStyle?: StyleProp<ViewStyle>;
|
|
11
|
+
quickReplyTextStyle?: StyleProp<TextStyle>;
|
|
11
12
|
onQuickReply?(reply: Reply[]): void;
|
|
12
13
|
renderQuickReplySend?(): React.ReactNode;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export default class QuickReplies extends Component<QuickRepliesProps, QuickRepliesState> {
|
|
18
|
-
static defaultProps: {
|
|
19
|
-
currentMessage: {
|
|
20
|
-
quickReplies: never[];
|
|
21
|
-
};
|
|
22
|
-
onQuickReply: () => void;
|
|
23
|
-
color: string;
|
|
24
|
-
sendText: string;
|
|
25
|
-
keepReplies: boolean;
|
|
26
|
-
renderQuickReplySend: undefined;
|
|
27
|
-
quickReplyStyle: undefined;
|
|
28
|
-
};
|
|
29
|
-
static propTypes: {
|
|
15
|
+
export declare function QuickReplies({ currentMessage, nextMessage, color, quickReplyStyle, quickReplyTextStyle, onQuickReply, sendText, renderQuickReplySend, }: QuickRepliesProps): JSX.Element | null;
|
|
16
|
+
export declare namespace QuickReplies {
|
|
17
|
+
var propTypes: {
|
|
30
18
|
currentMessage: PropTypes.Validator<object>;
|
|
31
19
|
onQuickReply: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
20
|
color: PropTypes.Requireable<string>;
|
|
33
21
|
sendText: PropTypes.Requireable<string>;
|
|
34
|
-
keepReplies: PropTypes.Requireable<boolean>;
|
|
35
22
|
renderQuickReplySend: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
23
|
quickReplyStyle: PropTypes.Requireable<number | boolean | object>;
|
|
37
24
|
};
|
|
38
|
-
state: {
|
|
39
|
-
replies: never[];
|
|
40
|
-
};
|
|
41
|
-
handlePress: (reply: Reply) => () => void;
|
|
42
|
-
handleSend: (replies: Reply[]) => () => void;
|
|
43
|
-
shouldComponentDisplay: () => boolean;
|
|
44
|
-
renderQuickReplySend: () => JSX.Element;
|
|
45
|
-
render(): JSX.Element | null;
|
|
46
25
|
}
|
package/lib/QuickReplies.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useState, useMemo } from 'react';
|
|
3
3
|
import { Text, StyleSheet, View, TouchableOpacity, } from 'react-native';
|
|
4
4
|
import Color from './Color';
|
|
5
5
|
import { warning, StylePropType } from './utils';
|
|
6
|
+
import { useCallbackOne } from 'use-memo-one';
|
|
6
7
|
const styles = StyleSheet.create({
|
|
7
8
|
container: {
|
|
8
9
|
flexDirection: 'row',
|
|
@@ -34,115 +35,82 @@ const styles = StyleSheet.create({
|
|
|
34
35
|
});
|
|
35
36
|
const sameReply = (currentReply) => (reply) => currentReply.value === reply.value;
|
|
36
37
|
const diffReply = (currentReply) => (reply) => currentReply.value !== reply.value;
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
export function QuickReplies({ currentMessage, nextMessage, color = Color.peterRiver, quickReplyStyle, quickReplyTextStyle, onQuickReply, sendText = 'Send', renderQuickReplySend, }) {
|
|
39
|
+
const { type } = currentMessage.quickReplies;
|
|
40
|
+
const [replies, setReplies] = useState([]);
|
|
41
|
+
const shouldComponentDisplay = useMemo(() => {
|
|
42
|
+
const hasReplies = !!currentMessage && !!currentMessage.quickReplies;
|
|
43
|
+
const hasNext = !!nextMessage && !!nextMessage._id;
|
|
44
|
+
const keepIt = currentMessage.quickReplies.keepIt;
|
|
45
|
+
if (hasReplies && !hasNext) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
if (hasReplies && hasNext && keepIt) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}, [currentMessage, nextMessage]);
|
|
53
|
+
if (!shouldComponentDisplay) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const handlePress = useCallbackOne((reply) => () => {
|
|
57
|
+
if (currentMessage) {
|
|
58
|
+
const { type } = currentMessage.quickReplies;
|
|
59
|
+
switch (type) {
|
|
60
|
+
case 'radio': {
|
|
61
|
+
handleSend([reply])();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
case 'checkbox': {
|
|
65
|
+
if (replies.find(sameReply(reply))) {
|
|
66
|
+
setReplies(replies.filter(diffReply(reply)));
|
|
63
67
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return;
|
|
68
|
+
else {
|
|
69
|
+
setReplies([...replies, reply]);
|
|
67
70
|
}
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
default: {
|
|
74
|
+
warning(`onQuickReply unknown type: ${type}`);
|
|
75
|
+
return;
|
|
68
76
|
}
|
|
69
77
|
}
|
|
70
|
-
};
|
|
71
|
-
this.handleSend = (replies) => () => {
|
|
72
|
-
const { currentMessage } = this.props;
|
|
73
|
-
if (this.props.onQuickReply) {
|
|
74
|
-
this.props.onQuickReply(replies.map((reply) => ({
|
|
75
|
-
...reply,
|
|
76
|
-
messageId: currentMessage._id,
|
|
77
|
-
})));
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
this.shouldComponentDisplay = () => {
|
|
81
|
-
const { currentMessage, nextMessage } = this.props;
|
|
82
|
-
const hasReplies = !!currentMessage && !!currentMessage.quickReplies;
|
|
83
|
-
const hasNext = !!nextMessage && !!nextMessage._id;
|
|
84
|
-
const keepIt = currentMessage.quickReplies.keepIt;
|
|
85
|
-
if (hasReplies && !hasNext) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
if (hasReplies && hasNext && keepIt) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
};
|
|
93
|
-
this.renderQuickReplySend = () => {
|
|
94
|
-
const { replies } = this.state;
|
|
95
|
-
const { sendText, renderQuickReplySend: customSend } = this.props;
|
|
96
|
-
return (<TouchableOpacity style={[styles.quickReply, styles.sendLink]} onPress={this.handleSend(replies)}>
|
|
97
|
-
{customSend ? (customSend()) : (<Text style={styles.sendLinkText}>{sendText}</Text>)}
|
|
98
|
-
</TouchableOpacity>);
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
render() {
|
|
102
|
-
const { currentMessage, color, quickReplyStyle } = this.props;
|
|
103
|
-
const { replies } = this.state;
|
|
104
|
-
if (!this.shouldComponentDisplay()) {
|
|
105
|
-
return null;
|
|
106
78
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
79
|
+
}, [replies, currentMessage]);
|
|
80
|
+
const handleSend = (repliesData) => () => {
|
|
81
|
+
onQuickReply === null || onQuickReply === void 0 ? void 0 : onQuickReply(repliesData.map((reply) => ({
|
|
82
|
+
...reply,
|
|
83
|
+
messageId: currentMessage._id,
|
|
84
|
+
})));
|
|
85
|
+
};
|
|
86
|
+
return (<View style={styles.container}>
|
|
87
|
+
{currentMessage.quickReplies.values.map((reply, index) => {
|
|
110
88
|
const selected = type === 'checkbox' && replies.find(sameReply(reply));
|
|
111
|
-
return (<TouchableOpacity onPress={
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
</
|
|
89
|
+
return (<TouchableOpacity onPress={handlePress(reply)} style={[
|
|
90
|
+
styles.quickReply,
|
|
91
|
+
quickReplyStyle,
|
|
92
|
+
{ borderColor: color },
|
|
93
|
+
selected && { backgroundColor: color },
|
|
94
|
+
]} key={`${reply.value}-${index}`}>
|
|
95
|
+
<Text numberOfLines={10} ellipsizeMode={'tail'} style={[
|
|
96
|
+
styles.quickReplyText,
|
|
97
|
+
{ color: selected ? Color.white : color },
|
|
98
|
+
quickReplyTextStyle,
|
|
99
|
+
]}>
|
|
100
|
+
{reply.title}
|
|
101
|
+
</Text>
|
|
102
|
+
</TouchableOpacity>);
|
|
124
103
|
})}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
104
|
+
{replies.length > 0 && (<TouchableOpacity style={[styles.quickReply, styles.sendLink]} onPress={handleSend(replies)}>
|
|
105
|
+
{(renderQuickReplySend === null || renderQuickReplySend === void 0 ? void 0 : renderQuickReplySend()) || (<Text style={styles.sendLinkText}>{sendText}</Text>)}
|
|
106
|
+
</TouchableOpacity>)}
|
|
107
|
+
</View>);
|
|
128
108
|
}
|
|
129
|
-
QuickReplies.defaultProps = {
|
|
130
|
-
currentMessage: {
|
|
131
|
-
quickReplies: [],
|
|
132
|
-
},
|
|
133
|
-
onQuickReply: () => { },
|
|
134
|
-
color: Color.peterRiver,
|
|
135
|
-
sendText: 'Send',
|
|
136
|
-
keepReplies: false,
|
|
137
|
-
renderQuickReplySend: undefined,
|
|
138
|
-
quickReplyStyle: undefined,
|
|
139
|
-
};
|
|
140
109
|
QuickReplies.propTypes = {
|
|
141
110
|
currentMessage: PropTypes.object.isRequired,
|
|
142
111
|
onQuickReply: PropTypes.func,
|
|
143
112
|
color: PropTypes.string,
|
|
144
113
|
sendText: PropTypes.string,
|
|
145
|
-
keepReplies: PropTypes.bool,
|
|
146
114
|
renderQuickReplySend: PropTypes.func,
|
|
147
115
|
quickReplyStyle: StylePropType,
|
|
148
116
|
};
|
package/lib/QuickReplies.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickReplies.js","sourceRoot":"","sources":["../src/QuickReplies.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"QuickReplies.js","sourceRoot":"","sources":["../src/QuickReplies.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,gBAAgB,GAIjB,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAA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