@cometchat/chat-uikit-react-native 5.3.9 → 5.4.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/android/.gradle/7.4/checksums/checksums.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/vcs-1/gc.properties +0 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatClipboardModule.kt +52 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +95 -8
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorView.kt +237 -6
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorViewManager.kt +2 -1
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +85 -47
- package/ios/CometChatClipboardModule.m +11 -0
- package/ios/CometChatClipboardModule.swift +41 -0
- package/ios/FileManager.m +201 -39
- package/ios/RichTextEditorView.swift +312 -4
- package/ios/RichTextEditorViewManager.m +1 -0
- package/ios/SoundPlayer.m +18 -6
- package/package.json +9 -7
- package/react-native-cometchat-ui-kit.podspec +1 -0
- package/src/CometChatCompactMessageComposer/CometChatCompactMessageComposer.tsx +692 -107
- package/src/CometChatConversations/CometChatConversations.tsx +28 -6
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +649 -49
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +23 -4
- package/src/CometChatMessageList/CometChatMessageList.tsx +530 -58
- package/src/CometChatMessageList/MANUAL_TEST_CASES.md +154 -0
- package/src/CometChatMessageList/components/MessageListItem.tsx +30 -17
- package/src/CometChatMessageList/style.ts +33 -5
- package/src/CometChatRichTextEditor/RichTextEditorViewNativeComponent.ts +13 -0
- package/src/CometChatRichTextEditor/index.tsx +25 -0
- package/src/CometChatSearch/CometChatSearch.tsx +296 -154
- package/src/calls/CallingExtension.tsx +19 -13
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +20 -1
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +20 -9
- package/src/index.ts +39 -0
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -34
- package/src/shared/base/Types.ts +3 -0
- package/src/shared/constants/UIKitConstants.ts +15 -1
- package/src/shared/framework/DataSource.ts +14 -4
- package/src/shared/framework/DataSourceDecorator.tsx +17 -8
- package/src/shared/framework/MessageDataSource.tsx +321 -62
- package/src/shared/helper/useToast.tsx +29 -0
- package/src/shared/icons/components/audio-file-type.tsx +11 -22
- package/src/shared/icons/components/document-file-type.tsx +11 -24
- package/src/shared/icons/components/image-file-type.tsx +12 -21
- package/src/shared/icons/components/link-file-type.tsx +25 -0
- package/src/shared/icons/components/pdf-file-type.tsx +11 -22
- package/src/shared/icons/components/presentation-file-type.tsx +11 -24
- package/src/shared/icons/components/spreadsheet-file-type.tsx +11 -24
- package/src/shared/icons/components/text-file-type.tsx +11 -21
- package/src/shared/icons/components/unknown-file-type.tsx +21 -25
- package/src/shared/icons/components/video-file-type.tsx +11 -24
- package/src/shared/icons/components/zip-file-type.tsx +11 -24
- package/src/shared/icons/icon-mapping.tsx +2 -0
- package/src/shared/index.ts +28 -0
- package/src/shared/modals/AttachmentPickerConfiguration.ts +13 -0
- package/src/shared/modals/SelectedAttachment.ts +65 -0
- package/src/shared/modals/UploadState.ts +10 -0
- package/src/shared/modals/index.ts +4 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +43 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +43 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +44 -2
- package/src/shared/services/UploadQueueService.ts +145 -0
- package/src/shared/services/index.ts +2 -0
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +42 -18
- package/src/shared/utils/MessageUtils.tsx +13 -4
- package/src/shared/utils/attachmentLimits.ts +156 -0
- package/src/shared/utils/audioPlaybackCoordinator.ts +28 -0
- package/src/shared/utils/batchMediaContext.tsx +30 -0
- package/src/shared/utils/conversationUtils.ts +44 -4
- package/src/shared/utils/groupAttachments.ts +93 -0
- package/src/shared/utils/index.ts +8 -0
- package/src/shared/utils/openMultiFileChooser.ts +123 -0
- package/src/shared/utils/partitionAttachmentsByKind.ts +44 -0
- package/src/shared/views/ClipboardPasteHandler/ClipboardPasteHandler.ts +28 -0
- package/src/shared/views/ClipboardPasteHandler/NativeCometChatClipboardModule.ts +16 -0
- package/src/shared/views/ClipboardPasteHandler/index.ts +2 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +1 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.style.ts +32 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.tsx +90 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreviewItem.tsx +276 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTile.tsx +827 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTray.tsx +110 -0
- package/src/shared/views/CometChatAttachmentPreview/StagedVideoDurationProbe.tsx +53 -0
- package/src/shared/views/CometChatAttachmentPreview/index.ts +8 -0
- package/src/shared/views/CometChatAttachmentViewer/CometChatAttachmentViewer.tsx +305 -0
- package/src/shared/views/CometChatAttachmentViewer/index.ts +2 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +71 -74
- package/src/shared/views/CometChatAudiosBubble/CometChatAudiosBubble.tsx +587 -0
- package/src/shared/views/CometChatAudiosBubble/index.ts +2 -0
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +5 -7
- package/src/shared/views/CometChatCaptionText/CometChatCaptionText.tsx +182 -0
- package/src/shared/views/CometChatCaptionText/index.ts +2 -0
- package/src/shared/views/CometChatComposerErrorBanner.tsx +83 -0
- package/src/shared/views/CometChatConversationStarter/CometChatConversationStarter.tsx +141 -0
- package/src/shared/views/CometChatConversationStarter/index.ts +2 -0
- package/src/shared/views/CometChatConversationSummary/CometChatConversationSummary.tsx +155 -0
- package/src/shared/views/CometChatConversationSummary/index.ts +2 -0
- package/src/shared/views/CometChatFileBubble/style.ts +6 -4
- package/src/shared/views/CometChatFilesBubble/CometChatFilesBubble.tsx +316 -0
- package/src/shared/views/CometChatFilesBubble/index.ts +2 -0
- package/src/shared/views/CometChatImagesBubble/CometChatImagesBubble.tsx +323 -0
- package/src/shared/views/CometChatImagesBubble/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/CometChatMediaViewer.tsx +425 -0
- package/src/shared/views/CometChatMediaViewer/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/mediaViewerUtils.ts +30 -0
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +14 -4
- package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +1 -0
- package/src/shared/views/CometChatSmartReplies/CometChatSmartReplies.tsx +172 -0
- package/src/shared/views/CometChatSmartReplies/index.ts +2 -0
- package/src/shared/views/CometChatVideoBubble/style.ts +3 -3
- package/src/shared/views/CometChatVideosBubble/CometChatVideosBubble.tsx +441 -0
- package/src/shared/views/CometChatVideosBubble/index.ts +2 -0
- package/src/shared/views/CometChatVoiceNoteBubble/CometChatVoiceNoteBubble.tsx +78 -0
- package/src/shared/views/CometChatVoiceNoteBubble/index.ts +2 -0
- package/src/shared/views/index.ts +37 -1
- package/src/theme/CometChatThemeHelper.ts +8 -0
- package/src/theme/default/color/dark.ts +9 -0
- package/src/theme/default/color/light.ts +10 -0
- package/src/theme/type.ts +73 -0
- package/src/CometChatMessageList/PERFORMANCE_ARCHITECTURE.md +0 -478
- package/src/CometChatMessageList/SEARCH_NAV_PERF_PLAN.md +0 -613
|
@@ -1047,7 +1047,7 @@ export const CometChatConversations = (props: ConversationInterface) => {
|
|
|
1047
1047
|
<>
|
|
1048
1048
|
{groupText && (
|
|
1049
1049
|
<Text
|
|
1050
|
-
style={[mergedStyles.itemStyle.subtitleStyle,
|
|
1050
|
+
style={[mergedStyles.itemStyle.subtitleStyle, conversationPreviewStyles.subtitleClamp]}
|
|
1051
1051
|
numberOfLines={1}
|
|
1052
1052
|
ellipsizeMode='tail'
|
|
1053
1053
|
>
|
|
@@ -1177,10 +1177,10 @@ export const CometChatConversations = (props: ConversationInterface) => {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
|
|
1179
1179
|
return (
|
|
1180
|
-
<View style={[Style.row,
|
|
1180
|
+
<View style={[Style.row, conversationPreviewStyles.iconRowGap]}>
|
|
1181
1181
|
{threadView}
|
|
1182
|
-
<View style={[Style.row,
|
|
1183
|
-
{!["call", "action"].includes(
|
|
1182
|
+
<View style={[Style.row, conversationPreviewStyles.iconRowGap]}>
|
|
1183
|
+
{lastMessage && !["call", "action"].includes(lastMessage.getCategory())
|
|
1184
1184
|
? readReceipt
|
|
1185
1185
|
: null}
|
|
1186
1186
|
{getMessagePreview(params["conversations"], theme)}
|
|
@@ -1202,7 +1202,7 @@ export const CometChatConversations = (props: ConversationInterface) => {
|
|
|
1202
1202
|
return (
|
|
1203
1203
|
<View
|
|
1204
1204
|
style={[
|
|
1205
|
-
|
|
1205
|
+
conversationPreviewStyles.trailingContainer,
|
|
1206
1206
|
mergedStyles.itemStyle.trailingViewContainerStyle,
|
|
1207
1207
|
]}
|
|
1208
1208
|
>
|
|
@@ -1558,6 +1558,15 @@ export const CometChatConversations = (props: ConversationInterface) => {
|
|
|
1558
1558
|
messageEventHandler(customInteractiveMessage);
|
|
1559
1559
|
!disableSoundForMessages && CometChatSoundManager.play("incomingMessage");
|
|
1560
1560
|
},
|
|
1561
|
+
// Agent (agentic/assistant) reply — update the conversation's last message + unread
|
|
1562
|
+
// count in real time, otherwise the subtitle only refreshes after a re-fetch.
|
|
1563
|
+
onAIAssistantMessageReceived: (aiAssistantMessage: any) => {
|
|
1564
|
+
if (!shouldUpdateLastMessageAndUnreadCount(aiAssistantMessage)) {
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
messageEventHandler(aiAssistantMessage);
|
|
1568
|
+
!disableSoundForMessages && CometChatSoundManager.play("incomingMessage");
|
|
1569
|
+
},
|
|
1561
1570
|
onMessageModerated: (moderatedMessage: CometChat.BaseMessage) => {
|
|
1562
1571
|
checkAndUpdateLastMessage(moderatedMessage);
|
|
1563
1572
|
},
|
|
@@ -1787,7 +1796,7 @@ export const CometChatConversations = (props: ConversationInterface) => {
|
|
|
1787
1796
|
const withObj = conv.getConversationWith();
|
|
1788
1797
|
const avatarURL = withObj instanceof CometChat.User ? withObj.getAvatar() : withObj.getIcon();
|
|
1789
1798
|
const name = withObj.getName();
|
|
1790
|
-
|
|
1799
|
+
|
|
1791
1800
|
return (
|
|
1792
1801
|
<>
|
|
1793
1802
|
<CometChatAvatar
|
|
@@ -1999,4 +2008,17 @@ const conversationPreviewStyles = StyleSheet.create({
|
|
|
1999
2008
|
paddingHorizontal: 5,
|
|
2000
2009
|
lineHeight: 18,
|
|
2001
2010
|
},
|
|
2011
|
+
trailingContainer: {
|
|
2012
|
+
marginHorizontal: 6,
|
|
2013
|
+
justifyContent: 'center',
|
|
2014
|
+
alignItems: 'flex-end',
|
|
2015
|
+
},
|
|
2016
|
+
iconRowGap: {
|
|
2017
|
+
gap: 2,
|
|
2018
|
+
alignItems: 'center',
|
|
2019
|
+
},
|
|
2020
|
+
subtitleClamp: {
|
|
2021
|
+
flexShrink: 0,
|
|
2022
|
+
maxWidth: '40%',
|
|
2023
|
+
},
|
|
2002
2024
|
});
|