@cometchat/chat-uikit-react-native 4.3.20 → 4.3.22
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/package.json +1 -1
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +171 -167
- package/src/AI/CardView.tsx +55 -53
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +8 -13
- package/src/CometChatGroups/CometChatGroups.tsx +545 -514
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +5 -8
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +544 -378
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +90 -72
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +3 -8
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +11 -13
- package/src/CometChatUsers/CometChatUsers.tsx +24 -23
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +24 -25
- package/src/extensions/Polls/Polls.tsx +8 -16
- package/src/extensions/Polls/PollsBubble.tsx +5 -10
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +16 -22
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +51 -51
- package/src/shared/libs/datePickerModal/DateTimePickerModal.android.js +1 -7
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +38 -46
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +19 -19
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +8 -20
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +8 -14
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +141 -140
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +47 -51
- package/src/shared/views/CometChatDate/CometChatDate.tsx +18 -17
- package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +65 -51
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +76 -72
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +3 -8
- package/src/shared/views/CometChatList/CometChatList.tsx +133 -134
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +62 -61
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +20 -10
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +3 -8
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +24 -23
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +107 -53
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +22 -14
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +15 -8
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +2 -6
- package/src/shared/views/SwipeRow/SwipeRow.tsx +6 -14
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useContext,
|
|
4
|
+
useEffect,
|
|
5
|
+
useImperativeHandle,
|
|
6
|
+
useState,
|
|
7
|
+
} from 'react';
|
|
2
8
|
import {
|
|
3
9
|
Animated,
|
|
4
10
|
BackHandler,
|
|
@@ -7,7 +13,10 @@ import {
|
|
|
7
13
|
PanResponder,
|
|
8
14
|
TouchableOpacity,
|
|
9
15
|
View,
|
|
10
|
-
Modal,
|
|
16
|
+
Modal,
|
|
17
|
+
ScrollView,
|
|
18
|
+
KeyboardAvoidingView,
|
|
19
|
+
Platform,
|
|
11
20
|
} from 'react-native';
|
|
12
21
|
import { Styles } from './style';
|
|
13
22
|
import { CometChatContext } from '../../CometChatContext';
|
|
@@ -26,161 +35,153 @@ export interface CometChatBottomSheetInterface {
|
|
|
26
35
|
shadowColor?: string;
|
|
27
36
|
backgroundColor?: string;
|
|
28
37
|
lineColor?: string;
|
|
29
|
-
lineHeight?: number
|
|
30
|
-
paddingHorizontal?: number
|
|
31
|
-
borderRadius?: number
|
|
38
|
+
lineHeight?: number;
|
|
39
|
+
paddingHorizontal?: number;
|
|
40
|
+
borderRadius?: number;
|
|
32
41
|
};
|
|
33
42
|
}
|
|
34
|
-
const CometChatBottomSheet = forwardRef(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
const CometChatBottomSheet = forwardRef(
|
|
44
|
+
(props: CometChatBottomSheetInterface, ref) => {
|
|
45
|
+
const { theme } = useContext<CometChatContextType>(CometChatContext);
|
|
46
|
+
const {
|
|
47
|
+
children = <View />,
|
|
48
|
+
isOpen = true,
|
|
49
|
+
sliderMaxHeight = Dimensions.get('screen').height * 0.9,
|
|
50
|
+
sliderMinHeight = 50,
|
|
51
|
+
animation = Easing.quad,
|
|
52
|
+
animationDuration = 200,
|
|
53
|
+
onOpen = undefined,
|
|
54
|
+
onClose = undefined,
|
|
55
|
+
style = {},
|
|
56
|
+
} = props;
|
|
47
57
|
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
const [contentHeight, setContentHeight] = useState(null);
|
|
59
|
+
const panelHeightValue = new Animated.Value(0);
|
|
50
60
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
useImperativeHandle(ref, () => {
|
|
66
|
-
return {
|
|
67
|
-
togglePanel
|
|
61
|
+
const togglePanel = () => {
|
|
62
|
+
Animated.timing(panelHeightValue, {
|
|
63
|
+
duration: animationDuration,
|
|
64
|
+
easing: animation,
|
|
65
|
+
toValue:
|
|
66
|
+
//@ts-ignore
|
|
67
|
+
panelHeightValue._value === 0 ? contentHeight - sliderMinHeight : 0,
|
|
68
|
+
useNativeDriver: false,
|
|
69
|
+
}).start(() => {
|
|
70
|
+
onClose && onClose();
|
|
71
|
+
});
|
|
72
|
+
return true;
|
|
68
73
|
};
|
|
69
|
-
});
|
|
70
|
-
const _onBackPress = () => {
|
|
71
|
-
isOpen && togglePanel();
|
|
72
|
-
return isOpen;
|
|
73
|
-
};
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
useImperativeHandle(ref, () => {
|
|
76
|
+
return {
|
|
77
|
+
togglePanel,
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
const _onBackPress = () => {
|
|
81
|
+
isOpen && togglePanel();
|
|
82
|
+
return isOpen;
|
|
83
|
+
};
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
const _handleScrollEndDrag = ({ nativeEvent }: any) => {
|
|
86
|
+
nativeEvent.contentOffset.y === 0 && togglePanel();
|
|
87
|
+
};
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
89
|
+
const _setSize = ({ nativeEvent }: any) => {
|
|
90
|
+
setContentHeight(nativeEvent.layout.height);
|
|
91
|
+
};
|
|
87
92
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
gestureState.dy > 0 && togglePanel(),
|
|
93
|
-
});
|
|
93
|
+
let _parentPanResponder = PanResponder.create({
|
|
94
|
+
onMoveShouldSetPanResponderCapture: () => !isOpen,
|
|
95
|
+
onPanResponderRelease: () => togglePanel(),
|
|
96
|
+
});
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
let _childPanResponder = PanResponder.create({
|
|
99
|
+
onMoveShouldSetPanResponderCapture: (_, gestureState) =>
|
|
100
|
+
gestureState.dy > 15,
|
|
101
|
+
onPanResponderRelease: (_, gestureState) =>
|
|
102
|
+
gestureState.dy > 0 && togglePanel(),
|
|
103
|
+
});
|
|
96
104
|
|
|
97
|
-
|
|
98
|
-
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
BackHandler.addEventListener('hardwareBackPress', _onBackPress);
|
|
107
|
+
// onOpen ? onOpen() : () => {};
|
|
99
108
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
return () => {
|
|
110
|
+
BackHandler.removeEventListener('hardwareBackPress', _onBackPress);
|
|
111
|
+
};
|
|
112
|
+
}, []);
|
|
104
113
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
>
|
|
111
|
-
<KeyboardAvoidingView style={{ flex: 1 }} behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
114
|
+
return (
|
|
115
|
+
<Modal
|
|
116
|
+
transparent={true}
|
|
117
|
+
visible={isOpen}
|
|
118
|
+
onRequestClose={() => togglePanel()}
|
|
112
119
|
>
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
120
|
+
<KeyboardAvoidingView
|
|
121
|
+
style={{ flex: 1 }}
|
|
122
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
123
|
+
>
|
|
124
|
+
<View style={Styles.wrapperStyle}>
|
|
125
|
+
<View
|
|
126
|
+
style={Styles.greyWrapperStyle}
|
|
127
|
+
onStartShouldSetResponder={() => togglePanel()}
|
|
128
|
+
/>
|
|
129
|
+
{
|
|
130
|
+
//@ts-ignore
|
|
131
|
+
<Animated.View
|
|
132
|
+
onLayout={_setSize}
|
|
133
|
+
{..._parentPanResponder?.panHandlers}
|
|
134
|
+
style={{
|
|
135
|
+
...Styles.containerStyle,
|
|
136
|
+
backgroundColor:
|
|
137
|
+
style?.backgroundColor ??
|
|
138
|
+
theme.palette.getBackgroundColor(),
|
|
139
|
+
shadowColor: style?.shadowColor ?? theme.palette.getAccent(),
|
|
140
|
+
maxHeight: sliderMaxHeight,
|
|
141
|
+
minHeight: sliderMinHeight,
|
|
142
|
+
transform: [
|
|
143
|
+
{ translateY: panelHeightValue },
|
|
144
|
+
{ scale: isOpen ? 1 : 0 },
|
|
145
|
+
],
|
|
146
|
+
paddingHorizontal: style?.paddingHorizontal || 5,
|
|
147
|
+
borderTopLeftRadius: style?.borderRadius || 30,
|
|
148
|
+
borderTopRightRadius: style?.borderRadius || 30,
|
|
149
|
+
}}
|
|
142
150
|
>
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
style={{ height: style?.lineHeight || 30 }}
|
|
151
|
+
<View
|
|
152
|
+
style={Styles.outerContentStyle}
|
|
153
|
+
// {..._childPanResponder?.panHandlers}
|
|
147
154
|
>
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
<TouchableOpacity
|
|
156
|
+
onPress={togglePanel.bind(this)}
|
|
157
|
+
activeOpacity={1}
|
|
158
|
+
style={{ height: style?.lineHeight || 30 }}
|
|
159
|
+
>
|
|
160
|
+
<View style={Styles.lineContainerStyle}>
|
|
161
|
+
<View
|
|
162
|
+
style={[
|
|
163
|
+
Styles.lineStyle,
|
|
164
|
+
{
|
|
165
|
+
backgroundColor:
|
|
166
|
+
style?.lineColor ?? theme.palette.getAccent200(),
|
|
167
|
+
},
|
|
168
|
+
]}
|
|
169
|
+
/>
|
|
170
|
+
</View>
|
|
171
|
+
</TouchableOpacity>
|
|
172
|
+
<View style={Styles.innerContentStyle}>
|
|
173
|
+
{typeof children === 'function'
|
|
174
|
+
? children(_handleScrollEndDrag)
|
|
175
|
+
: children}
|
|
158
176
|
</View>
|
|
159
|
-
</TouchableOpacity>
|
|
160
|
-
<View style={Styles.innerContentStyle}>
|
|
161
|
-
{typeof children === 'function'
|
|
162
|
-
? children(_handleScrollEndDrag)
|
|
163
|
-
: children}
|
|
164
177
|
</View>
|
|
165
|
-
</View>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
</
|
|
169
|
-
</
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
CometChatBottomSheet.defaultProps = {
|
|
175
|
-
children: <View />,
|
|
176
|
-
isOpen: true,
|
|
177
|
-
sliderMaxHeight: Dimensions.get('screen').height * 0.9,
|
|
178
|
-
sliderMinHeight: 50,
|
|
179
|
-
animation: Easing.quad,
|
|
180
|
-
animationDuration: 200,
|
|
181
|
-
onOpen: undefined,
|
|
182
|
-
onClose: undefined,
|
|
183
|
-
style: {},
|
|
184
|
-
};
|
|
178
|
+
</Animated.View>
|
|
179
|
+
}
|
|
180
|
+
</View>
|
|
181
|
+
</KeyboardAvoidingView>
|
|
182
|
+
</Modal>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
185
186
|
|
|
186
187
|
export { CometChatBottomSheet };
|
|
@@ -6,7 +6,6 @@ import { CometChatContext } from '../../CometChatContext';
|
|
|
6
6
|
import { CometChatContextType } from '../../base/Types';
|
|
7
7
|
import { CometChatConfirmDialogStyleInterface } from './CometChatConfirmDialogStyle';
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
export interface CometChatConfirmDialogInterface {
|
|
11
10
|
onConfirm?: Function;
|
|
12
11
|
onCancel?: Function;
|
|
@@ -22,14 +21,14 @@ export const CometChatConfirmDialog = (
|
|
|
22
21
|
) => {
|
|
23
22
|
const { theme } = useContext<CometChatContextType>(CometChatContext);
|
|
24
23
|
const {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
isOpen = false,
|
|
25
|
+
title = '',
|
|
26
|
+
confirmButtonText = 'Delete',
|
|
27
|
+
cancelButtonText = 'Cancel',
|
|
28
|
+
messageText = 'Are you sure?',
|
|
29
|
+
onConfirm = () => {},
|
|
30
|
+
onCancel = () => {},
|
|
31
|
+
style = {},
|
|
33
32
|
} = props;
|
|
34
33
|
const onClick = (option: any) => {
|
|
35
34
|
if (option === 'confirm') {
|
|
@@ -52,22 +51,27 @@ export const CometChatConfirmDialog = (
|
|
|
52
51
|
]}
|
|
53
52
|
>
|
|
54
53
|
<Text
|
|
55
|
-
style={
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
style={
|
|
55
|
+
[
|
|
56
|
+
Style.titleTextStyle,
|
|
57
|
+
{ color: style?.messageTextColor ?? theme.palette.getAccent() },
|
|
58
|
+
style?.titleTextStyle ?? theme.typography.text1,
|
|
59
|
+
] as TextStyle[]
|
|
60
|
+
}
|
|
60
61
|
>
|
|
61
62
|
{title}
|
|
62
63
|
</Text>
|
|
63
64
|
<Text
|
|
64
|
-
style={
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
style={
|
|
66
|
+
[
|
|
67
|
+
Style.messageTextStyle,
|
|
68
|
+
{
|
|
69
|
+
color:
|
|
70
|
+
style?.messageTextColor ?? theme.palette.getAccent700(),
|
|
71
|
+
},
|
|
72
|
+
style?.messageTextStyle ?? theme.typography.subtitle1,
|
|
73
|
+
] as TextStyle[]
|
|
74
|
+
}
|
|
71
75
|
>
|
|
72
76
|
{messageText}
|
|
73
77
|
</Text>
|
|
@@ -82,15 +86,17 @@ export const CometChatConfirmDialog = (
|
|
|
82
86
|
]}
|
|
83
87
|
>
|
|
84
88
|
<Text
|
|
85
|
-
style={
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
style={
|
|
90
|
+
[
|
|
91
|
+
Style.cancelButtonTextStyle,
|
|
92
|
+
{
|
|
93
|
+
color:
|
|
94
|
+
style?.cancelButtonTextColor ??
|
|
95
|
+
theme.palette.getPrimary(),
|
|
96
|
+
},
|
|
97
|
+
style?.cancelButtonTextFont ?? theme.typography.text2,
|
|
98
|
+
] as TextStyle[]
|
|
99
|
+
}
|
|
94
100
|
>
|
|
95
101
|
{cancelButtonText?.toUpperCase()}
|
|
96
102
|
</Text>
|
|
@@ -105,15 +111,17 @@ export const CometChatConfirmDialog = (
|
|
|
105
111
|
]}
|
|
106
112
|
>
|
|
107
113
|
<Text
|
|
108
|
-
style={
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
style={
|
|
115
|
+
[
|
|
116
|
+
Style.confirmButtonTextStyle,
|
|
117
|
+
{
|
|
118
|
+
color:
|
|
119
|
+
style?.confirmButtonTextColor ??
|
|
120
|
+
theme.palette.getPrimary(),
|
|
121
|
+
},
|
|
122
|
+
style?.confirmButtonTextFont ?? theme.typography.text2,
|
|
123
|
+
] as TextStyle[]
|
|
124
|
+
}
|
|
117
125
|
>
|
|
118
126
|
{confirmButtonText?.toUpperCase()}
|
|
119
127
|
</Text>
|
|
@@ -124,15 +132,3 @@ export const CometChatConfirmDialog = (
|
|
|
124
132
|
</Modal>
|
|
125
133
|
);
|
|
126
134
|
};
|
|
127
|
-
|
|
128
|
-
CometChatConfirmDialog.defaultProps = {
|
|
129
|
-
isOpen: false,
|
|
130
|
-
title: '',
|
|
131
|
-
confirmButtonText: 'Delete',
|
|
132
|
-
cancelButtonText: 'Cancel',
|
|
133
|
-
messageText: 'Are you sure?',
|
|
134
|
-
onConfirm: () => {},
|
|
135
|
-
onCancel: () => {},
|
|
136
|
-
style: {},
|
|
137
|
-
};
|
|
138
|
-
|
|
@@ -66,25 +66,27 @@ export interface CometChatDateInterface {
|
|
|
66
66
|
*/
|
|
67
67
|
style?: DateStyleInterface;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
*
|
|
70
70
|
*/
|
|
71
|
-
dateAlignment?:
|
|
71
|
+
dateAlignment?: 'auto' | 'left' | 'right' | 'center' | 'justify' | undefined;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export const CometChatDate = (props: CometChatDateInterface) => {
|
|
75
75
|
const { theme } = useContext<CometChatContextType>(CometChatContext);
|
|
76
|
-
const {
|
|
76
|
+
const {
|
|
77
|
+
dateAlignment,
|
|
78
|
+
timeStamp = 0,
|
|
79
|
+
pattern = patterns.timeFormat,
|
|
80
|
+
customDateString = null,
|
|
81
|
+
style: styleProps = new DateStyle({}),
|
|
82
|
+
} = props;
|
|
77
83
|
|
|
78
|
-
const
|
|
84
|
+
const style = new DateStyle({
|
|
79
85
|
textFont: theme.typography.caption1,
|
|
80
86
|
textColor: theme.palette.getAccent500(),
|
|
87
|
+
...styleProps,
|
|
81
88
|
});
|
|
82
89
|
|
|
83
|
-
const style = {
|
|
84
|
-
...defaultStyleProps,
|
|
85
|
-
...props.style,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
90
|
let date = new Date(timeStamp);
|
|
89
91
|
|
|
90
92
|
const getWeekOfDay = () => {
|
|
@@ -175,17 +177,16 @@ export const CometChatDate = (props: CometChatDateInterface) => {
|
|
|
175
177
|
]}
|
|
176
178
|
>
|
|
177
179
|
<Text
|
|
178
|
-
style={
|
|
180
|
+
style={
|
|
181
|
+
[
|
|
182
|
+
Style.textStyle,
|
|
183
|
+
style.textFont,
|
|
184
|
+
{ color: style.textColor, textAlign: dateAlignment },
|
|
185
|
+
] as TextStyle[]
|
|
186
|
+
}
|
|
179
187
|
>
|
|
180
188
|
{customDateString ? customDateString : getFormattedDate()}
|
|
181
189
|
</Text>
|
|
182
190
|
</View>
|
|
183
191
|
);
|
|
184
192
|
};
|
|
185
|
-
|
|
186
|
-
CometChatDate.defaultProps = {
|
|
187
|
-
timeStamp: 0,
|
|
188
|
-
pattern: patterns.timeFormat,
|
|
189
|
-
customDateString: null,
|
|
190
|
-
style: new DateStyle({}),
|
|
191
|
-
};
|