@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.
Files changed (98) hide show
  1. package/README.md +2 -3
  2. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  3. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  4. package/android/src/main/java/com/reactnativecometchatuikit/CometChatSoundModule.java +29 -44
  5. package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +12 -0
  6. package/ios/FileManager.m +26 -9
  7. package/package.json +11 -36
  8. package/src/CometChatConversations/CometChatConversations.tsx +287 -147
  9. package/src/CometChatConversations/Skeleton.tsx +116 -73
  10. package/src/CometChatConversations/style.ts +17 -22
  11. package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +439 -227
  12. package/src/CometChatGroupMembers/style.ts +2 -4
  13. package/src/CometChatGroups/CometChatGroups.tsx +239 -135
  14. package/src/CometChatGroups/GroupsStyle.ts +20 -17
  15. package/src/CometChatGroups/Skeleton.tsx +198 -288
  16. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +208 -73
  17. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +97 -43
  18. package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +4 -2
  19. package/src/CometChatMessageList/CometChatMessageList.tsx +200 -76
  20. package/src/CometChatMessageList/style.ts +4 -4
  21. package/src/CometChatThreadHeader/CometChatThreadHeader.tsx +77 -11
  22. package/src/CometChatThreadHeader/style.ts +2 -2
  23. package/src/CometChatUsers/CometChatUsers.tsx +203 -51
  24. package/src/CometChatUsers/Skeleton.tsx +174 -159
  25. package/src/CometChatUsers/style.ts +21 -18
  26. package/src/calls/CallingConfiguration.ts +4 -3
  27. package/src/calls/CallingExtensionDecorator.tsx +5 -3
  28. package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +4 -2
  29. package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +10 -8
  30. package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +240 -97
  31. package/src/calls/CometChatCallLogs/Skeleton.tsx +175 -91
  32. package/src/calls/CometChatCallLogs/index.ts +1 -0
  33. package/src/calls/CometChatCallLogs/style.ts +85 -43
  34. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +42 -29
  35. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +36 -10
  36. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +39 -12
  37. package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +5 -4
  38. package/src/extensions/Polls/PollsDecorator.tsx +30 -9
  39. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +34 -16
  40. package/src/index.ts +3 -1
  41. package/src/shared/base/Types.ts +31 -1
  42. package/src/shared/framework/DataSource.ts +64 -20
  43. package/src/shared/framework/DataSourceDecorator.tsx +46 -37
  44. package/src/shared/framework/MessageDataSource.tsx +518 -316
  45. package/src/shared/index.ts +3 -1
  46. package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +3 -2
  47. package/src/shared/resources/CometChatLocalize/resources/de/translation.json +3 -2
  48. package/src/shared/resources/CometChatLocalize/resources/en/translation.json +3 -2
  49. package/src/shared/resources/CometChatLocalize/resources/es/translation.json +3 -2
  50. package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +3 -2
  51. package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +3 -2
  52. package/src/shared/resources/CometChatLocalize/resources/hu/translation.json +3 -2
  53. package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +3 -2
  54. package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +3 -2
  55. package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +3 -2
  56. package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +3 -2
  57. package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +3 -2
  58. package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +3 -2
  59. package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +3 -2
  60. package/src/shared/utils/MessageUtils.tsx +41 -20
  61. package/src/shared/utils/conversationUtils.ts +2 -2
  62. package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +22 -1
  63. package/src/shared/views/CometChatBadge/CometChatBadge.tsx +20 -8
  64. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +177 -123
  65. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +76 -10
  66. package/src/shared/views/CometChatConfirmDialog/style.ts +2 -2
  67. package/src/shared/views/CometChatDate/CometChatDate.tsx +26 -18
  68. package/src/shared/views/CometChatDateSeperator/CometChatDateSeparator.tsx +22 -16
  69. package/src/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.tsx +17 -5
  70. package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +65 -35
  71. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +22 -11
  72. package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +47 -18
  73. package/src/shared/views/CometChatList/CometChatList.tsx +70 -46
  74. package/src/shared/views/CometChatList/Header.tsx +122 -37
  75. package/src/shared/views/CometChatList/styles.ts +1 -0
  76. package/src/shared/views/CometChatListItem/CometChatListItem.tsx +116 -30
  77. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +52 -30
  78. package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +36 -22
  79. package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +41 -13
  80. package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +132 -17
  81. package/src/shared/views/CometChatReactions/CometChatReactions.tsx +30 -2
  82. package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +10 -6
  83. package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +20 -13
  84. package/src/shared/views/CometChatStatusIndicator/styles.ts +26 -13
  85. package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +25 -2
  86. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +94 -14
  87. package/src/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.tsx +52 -16
  88. package/src/shared/views/CometChatTooltipMenu/index.ts +2 -1
  89. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +29 -9
  90. package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +20 -2
  91. package/src/shared/views/ErrorEmptyView/ErrorEmptyView.tsx +29 -14
  92. package/src/shared/views/index.ts +2 -0
  93. package/src/theme/default/index.ts +5 -5
  94. package/src/theme/type.ts +2 -2
  95. package/src/shared/views/CometChatPanel/CometChatPanel.tsx +0 -57
  96. package/src/shared/views/CometChatPanel/PanelStyle.tsx +0 -43
  97. package/src/shared/views/CometChatPanel/resources/CloseIcon.png +0 -0
  98. 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
- additionalParams?: AdditionalParams
268
+ additionalAuxiliaryParams?: AdditionalAuxiliaryOptionsParams
261
269
  ) {
262
- return this.dataSource.getAuxiliaryOptions(user, group, id, additionalParams);
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
- additionalParams?: AdditionalParams
301
+ additionalAuxiliaryHeaderOptionsParams?: AdditionalAuxiliaryHeaderOptionsParams
293
302
  ) {
294
- return this.dataSource.getAuxiliaryHeaderAppbarOptions(user, group, additionalParams);
303
+ return this.dataSource.getAuxiliaryHeaderAppbarOptions(user, group, additionalAuxiliaryHeaderOptionsParams);
295
304
  }
296
305
 
297
306
  getAllTextFormatters(loggedInUser?: CometChat.User): CometChatTextFormatter[] {