@cometchat/chat-uikit-react-native 5.0.0-beta.1 → 5.0.0
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/README.md +2 -3
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatSoundModule.java +29 -44
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +12 -0
- package/ios/FileManager.m +26 -9
- package/package.json +11 -36
- package/src/CometChatConversations/CometChatConversations.tsx +287 -147
- package/src/CometChatConversations/Skeleton.tsx +116 -73
- package/src/CometChatConversations/style.ts +17 -22
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +439 -227
- package/src/CometChatGroupMembers/style.ts +2 -4
- package/src/CometChatGroups/CometChatGroups.tsx +239 -135
- package/src/CometChatGroups/GroupsStyle.ts +20 -17
- package/src/CometChatGroups/Skeleton.tsx +198 -288
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +208 -73
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +97 -43
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +4 -2
- package/src/CometChatMessageList/CometChatMessageList.tsx +200 -76
- package/src/CometChatMessageList/style.ts +4 -4
- package/src/CometChatThreadHeader/CometChatThreadHeader.tsx +77 -11
- package/src/CometChatThreadHeader/style.ts +2 -2
- package/src/CometChatUsers/CometChatUsers.tsx +203 -51
- package/src/CometChatUsers/Skeleton.tsx +174 -159
- package/src/CometChatUsers/style.ts +21 -18
- package/src/calls/CallingConfiguration.ts +4 -3
- package/src/calls/CallingExtensionDecorator.tsx +5 -3
- package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +4 -2
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +10 -8
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +240 -97
- package/src/calls/CometChatCallLogs/Skeleton.tsx +175 -91
- package/src/calls/CometChatCallLogs/index.ts +1 -0
- package/src/calls/CometChatCallLogs/style.ts +85 -43
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +42 -29
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +36 -10
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +39 -12
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +5 -4
- package/src/extensions/Polls/PollsDecorator.tsx +30 -9
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +34 -16
- package/src/index.ts +3 -1
- package/src/shared/base/Types.ts +31 -1
- package/src/shared/framework/DataSource.ts +64 -20
- package/src/shared/framework/DataSourceDecorator.tsx +46 -37
- package/src/shared/framework/MessageDataSource.tsx +518 -316
- package/src/shared/index.ts +3 -1
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/hu/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +3 -2
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +3 -2
- package/src/shared/utils/MessageUtils.tsx +41 -20
- package/src/shared/utils/conversationUtils.ts +2 -2
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +22 -1
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +20 -8
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +177 -123
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +76 -10
- package/src/shared/views/CometChatConfirmDialog/style.ts +2 -2
- package/src/shared/views/CometChatDate/CometChatDate.tsx +26 -18
- package/src/shared/views/CometChatDateSeperator/CometChatDateSeparator.tsx +22 -16
- package/src/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.tsx +17 -5
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +65 -35
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +22 -11
- package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +47 -18
- package/src/shared/views/CometChatList/CometChatList.tsx +70 -46
- package/src/shared/views/CometChatList/Header.tsx +122 -37
- package/src/shared/views/CometChatList/styles.ts +1 -0
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +116 -30
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +52 -30
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +36 -22
- package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +41 -13
- package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +132 -17
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +30 -2
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +10 -6
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +20 -13
- package/src/shared/views/CometChatStatusIndicator/styles.ts +26 -13
- package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +25 -2
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +94 -14
- package/src/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.tsx +52 -16
- package/src/shared/views/CometChatTooltipMenu/index.ts +2 -1
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +29 -9
- package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +20 -2
- package/src/shared/views/ErrorEmptyView/ErrorEmptyView.tsx +29 -14
- package/src/shared/views/index.ts +2 -0
- package/src/theme/default/index.ts +5 -5
- package/src/theme/type.ts +2 -2
- package/src/shared/views/CometChatPanel/CometChatPanel.tsx +0 -57
- package/src/shared/views/CometChatPanel/PanelStyle.tsx +0 -43
- package/src/shared/views/CometChatPanel/resources/CloseIcon.png +0 -0
- package/src/shared/views/CometChatPanel/resources/index.ts +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
2
2
|
import { CometChatTheme } from "../../theme/type";
|
|
3
|
-
import { AdditionalParams, MessageBubbleAlignmentType } from "../base/Types";
|
|
3
|
+
import { AdditionalAttachmentOptionsParams, AdditionalAuxiliaryHeaderOptionsParams, AdditionalAuxiliaryOptionsParams, AdditionalParams, MessageBubbleAlignmentType } from "../base/Types";
|
|
4
4
|
import {
|
|
5
5
|
CometChatMentionsFormatter,
|
|
6
6
|
CometChatTextFormatter,
|
|
@@ -25,63 +25,70 @@ export class DataSourceDecorator implements DataSource {
|
|
|
25
25
|
loggedInUser: CometChat.User,
|
|
26
26
|
messageObject: CometChat.BaseMessage,
|
|
27
27
|
theme: CometChatTheme,
|
|
28
|
-
group?: CometChat.Group
|
|
28
|
+
group?: CometChat.Group,
|
|
29
|
+
additionalParams?: AdditionalParams,
|
|
29
30
|
): CometChatMessageOption[] {
|
|
30
|
-
return this.dataSource.getTextMessageOptions(loggedInUser, messageObject, theme, group);
|
|
31
|
+
return this.dataSource.getTextMessageOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
getAudioMessageOptions(
|
|
34
35
|
loggedInUser: CometChat.User,
|
|
35
36
|
messageObject: CometChat.BaseMessage,
|
|
36
37
|
theme: CometChatTheme,
|
|
37
|
-
group?: CometChat.Group
|
|
38
|
+
group?: CometChat.Group,
|
|
39
|
+
additionalParams?: AdditionalParams,
|
|
38
40
|
): CometChatMessageOption[] {
|
|
39
|
-
return this.dataSource.getAudioMessageOptions(loggedInUser, messageObject, theme, group);
|
|
41
|
+
return this.dataSource.getAudioMessageOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
getVideoMessageOptions(
|
|
43
45
|
loggedInUser: CometChat.User,
|
|
44
46
|
messageObject: CometChat.BaseMessage,
|
|
45
47
|
theme: CometChatTheme,
|
|
46
|
-
group?: CometChat.Group
|
|
48
|
+
group?: CometChat.Group,
|
|
49
|
+
additionalParams?: AdditionalParams,
|
|
47
50
|
): CometChatMessageOption[] {
|
|
48
|
-
return this.dataSource.getVideoMessageOptions(loggedInUser, messageObject, theme, group);
|
|
51
|
+
return this.dataSource.getVideoMessageOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
getImageMessageOptions(
|
|
52
55
|
loggedInUser: CometChat.User,
|
|
53
56
|
messageObject: CometChat.BaseMessage,
|
|
54
57
|
theme: CometChatTheme,
|
|
55
|
-
group?: CometChat.Group
|
|
58
|
+
group?: CometChat.Group,
|
|
59
|
+
additionalParams?: AdditionalParams,
|
|
56
60
|
): CometChatMessageOption[] {
|
|
57
|
-
return this.dataSource.getImageMessageOptions(loggedInUser, messageObject, theme, group);
|
|
61
|
+
return this.dataSource.getImageMessageOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
getFileMessageOptions(
|
|
61
65
|
loggedInUser: CometChat.User,
|
|
62
66
|
messageObject: CometChat.BaseMessage,
|
|
63
67
|
theme: CometChatTheme,
|
|
64
|
-
group?: CometChat.Group
|
|
68
|
+
group?: CometChat.Group,
|
|
69
|
+
additionalParams?: AdditionalParams,
|
|
65
70
|
): CometChatMessageOption[] {
|
|
66
|
-
return this.dataSource.getFileMessageOptions(loggedInUser, messageObject, theme, group);
|
|
71
|
+
return this.dataSource.getFileMessageOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
getMessageOptions(
|
|
70
75
|
loggedInUser: CometChat.User,
|
|
71
76
|
messageObject: CometChat.BaseMessage,
|
|
72
77
|
theme: CometChatTheme,
|
|
73
|
-
group?: CometChat.Group
|
|
78
|
+
group?: CometChat.Group,
|
|
79
|
+
additionalParams?: AdditionalParams,
|
|
74
80
|
): CometChatMessageOption[] {
|
|
75
|
-
return this.dataSource.getMessageOptions(loggedInUser, messageObject, theme, group);
|
|
81
|
+
return this.dataSource.getMessageOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
getCommonOptions(
|
|
79
85
|
loggedInUser: CometChat.User,
|
|
80
86
|
messageObject: CometChat.BaseMessage,
|
|
81
87
|
theme: CometChatTheme,
|
|
82
|
-
group?: CometChat.Group
|
|
88
|
+
group?: CometChat.Group,
|
|
89
|
+
additionalParams?: AdditionalParams,
|
|
83
90
|
): CometChatMessageOption[] {
|
|
84
|
-
return this.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group);
|
|
91
|
+
return this.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group, additionalParams);
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
getBottomView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) {
|
|
@@ -198,32 +205,32 @@ export class DataSourceDecorator implements DataSource {
|
|
|
198
205
|
return this.dataSource.getTextMessageTemplate(theme, additionalParams);
|
|
199
206
|
}
|
|
200
207
|
|
|
201
|
-
getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
202
|
-
return this.dataSource.getFormMessageTemplate(theme);
|
|
208
|
+
getFormMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
209
|
+
return this.dataSource.getFormMessageTemplate(theme, additionalParams);
|
|
203
210
|
}
|
|
204
211
|
|
|
205
|
-
getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
206
|
-
return this.dataSource.getSchedulerMessageTemplate(theme);
|
|
212
|
+
getSchedulerMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
213
|
+
return this.dataSource.getSchedulerMessageTemplate(theme, additionalParams);
|
|
207
214
|
}
|
|
208
215
|
|
|
209
|
-
getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
210
|
-
return this.dataSource.getCardMessageTemplate(theme);
|
|
216
|
+
getCardMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
217
|
+
return this.dataSource.getCardMessageTemplate(theme, additionalParams);
|
|
211
218
|
}
|
|
212
219
|
|
|
213
|
-
getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
214
|
-
return this.dataSource.getAudioMessageTemplate(theme);
|
|
220
|
+
getAudioMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
221
|
+
return this.dataSource.getAudioMessageTemplate(theme, additionalParams);
|
|
215
222
|
}
|
|
216
223
|
|
|
217
|
-
getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
218
|
-
return this.dataSource.getVideoMessageTemplate(theme);
|
|
224
|
+
getVideoMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
225
|
+
return this.dataSource.getVideoMessageTemplate(theme, additionalParams);
|
|
219
226
|
}
|
|
220
227
|
|
|
221
|
-
getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
222
|
-
return this.dataSource.getImageMessageTemplate(theme);
|
|
228
|
+
getImageMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
229
|
+
return this.dataSource.getImageMessageTemplate(theme, additionalParams);
|
|
223
230
|
}
|
|
224
231
|
|
|
225
|
-
getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
226
|
-
return this.dataSource.getFileMessageTemplate(theme);
|
|
232
|
+
getFileMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
233
|
+
return this.dataSource.getFileMessageTemplate(theme, additionalParams);
|
|
227
234
|
}
|
|
228
235
|
|
|
229
236
|
getAllMessageTemplates(
|
|
@@ -236,9 +243,10 @@ export class DataSourceDecorator implements DataSource {
|
|
|
236
243
|
getMessageTemplate(
|
|
237
244
|
messageType: string,
|
|
238
245
|
MessageCategory: string,
|
|
239
|
-
theme: CometChatTheme
|
|
246
|
+
theme: CometChatTheme,
|
|
247
|
+
additionalParams?: AdditionalParams
|
|
240
248
|
): CometChatMessageTemplate | null {
|
|
241
|
-
return this.dataSource.getMessageTemplate(messageType, MessageCategory, theme);
|
|
249
|
+
return this.dataSource.getMessageTemplate(messageType, MessageCategory, theme, additionalParams);
|
|
242
250
|
}
|
|
243
251
|
|
|
244
252
|
getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
@@ -257,9 +265,9 @@ export class DataSourceDecorator implements DataSource {
|
|
|
257
265
|
user: CometChat.User,
|
|
258
266
|
group: CometChat.Group,
|
|
259
267
|
id: Map<string, any>,
|
|
260
|
-
|
|
268
|
+
additionalAuxiliaryParams?: AdditionalAuxiliaryOptionsParams
|
|
261
269
|
) {
|
|
262
|
-
return this.dataSource.getAuxiliaryOptions(user, group, id,
|
|
270
|
+
return this.dataSource.getAuxiliaryOptions(user, group, id, additionalAuxiliaryParams);
|
|
263
271
|
}
|
|
264
272
|
|
|
265
273
|
getMessageTypeToSubtitle(messageType: string): string {
|
|
@@ -270,9 +278,10 @@ export class DataSourceDecorator implements DataSource {
|
|
|
270
278
|
theme: CometChatTheme,
|
|
271
279
|
user?: any,
|
|
272
280
|
group?: any,
|
|
273
|
-
composerId?: any
|
|
281
|
+
composerId?: any,
|
|
282
|
+
additionalAttachmentOptionsParams?: AdditionalAttachmentOptionsParams
|
|
274
283
|
): CometChatMessageComposerAction[] {
|
|
275
|
-
return this.dataSource.getAttachmentOptions(theme, user, group, composerId);
|
|
284
|
+
return this.dataSource.getAttachmentOptions(theme, user, group, composerId, additionalAttachmentOptionsParams);
|
|
276
285
|
}
|
|
277
286
|
|
|
278
287
|
getAuxiliaryButtonOptions() {
|
|
@@ -289,9 +298,9 @@ export class DataSourceDecorator implements DataSource {
|
|
|
289
298
|
getAuxiliaryHeaderAppbarOptions(
|
|
290
299
|
user?: CometChat.User,
|
|
291
300
|
group?: CometChat.Group,
|
|
292
|
-
|
|
301
|
+
additionalAuxiliaryHeaderOptionsParams?: AdditionalAuxiliaryHeaderOptionsParams
|
|
293
302
|
) {
|
|
294
|
-
return this.dataSource.getAuxiliaryHeaderAppbarOptions(user, group,
|
|
303
|
+
return this.dataSource.getAuxiliaryHeaderAppbarOptions(user, group, additionalAuxiliaryHeaderOptionsParams);
|
|
295
304
|
}
|
|
296
305
|
|
|
297
306
|
getAllTextFormatters(loggedInUser?: CometChat.User): CometChatTextFormatter[] {
|