@cometchat/chat-uikit-react-native 4.3.24 → 5.0.0-beta.1
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/.settings/org.eclipse.buildship.core.prefs +2 -0
- package/android/src/main/AndroidManifest.xml +0 -6
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +171 -27
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +31 -15
- package/ios/CometchatUiKit.mm +25 -25
- package/ios/FileManager.m +108 -4
- package/ios/SoundPlayer.m +32 -5
- package/package.json +13 -29
- package/react-native-cometchat-ui-kit.podspec +6 -6
- package/src/CometChatConversations/CometChatConversations.tsx +1376 -1263
- package/src/CometChatConversations/Skeleton.tsx +143 -0
- package/src/CometChatConversations/index.ts +7 -21
- package/src/CometChatConversations/resources/index.ts +22 -36
- package/src/CometChatConversations/style.ts +237 -62
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +844 -683
- package/src/CometChatGroupMembers/Skeleton.tsx +197 -0
- package/src/CometChatGroupMembers/index.ts +2 -8
- package/src/CometChatGroupMembers/resources/index.ts +3 -14
- package/src/CometChatGroupMembers/style.ts +532 -22
- package/src/CometChatGroups/CometChatGroups.tsx +417 -562
- package/src/CometChatGroups/GroupsStyle.ts +176 -109
- package/src/CometChatGroups/Skeleton.tsx +328 -0
- package/src/CometChatGroups/index.ts +3 -11
- package/src/CometChatGroups/resources/index.ts +17 -24
- package/src/CometChatGroups/style.ts +15 -16
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +586 -1045
- package/src/CometChatMessageComposer/index.ts +4 -8
- package/src/CometChatMessageComposer/resources/index.ts +21 -31
- package/src/CometChatMessageComposer/styles.tsx +152 -0
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +315 -422
- package/src/CometChatMessageHeader/index.ts +3 -15
- package/src/CometChatMessageHeader/listners.ts +50 -26
- package/src/CometChatMessageHeader/styles.ts +57 -10
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +350 -295
- package/src/CometChatMessageInformation/Skeleton.tsx +143 -0
- package/src/CometChatMessageInformation/index.ts +5 -9
- package/src/CometChatMessageInformation/resources/index.ts +1 -4
- package/src/CometChatMessageInformation/styles.ts +147 -16
- package/src/CometChatMessageList/CometChatMessageList.tsx +2344 -2080
- package/src/CometChatMessageList/Skeleton.tsx +98 -0
- package/src/CometChatMessageList/index.ts +5 -12
- package/src/CometChatMessageList/resources/index.ts +13 -20
- package/src/CometChatMessageList/style.ts +989 -51
- package/src/CometChatThreadHeader/CometChatThreadHeader.tsx +208 -0
- package/src/CometChatThreadHeader/Header.tsx +47 -0
- package/src/CometChatThreadHeader/index.ts +8 -0
- package/src/CometChatThreadHeader/resources/index.ts +14 -0
- package/src/CometChatThreadHeader/style.ts +70 -0
- package/src/CometChatUsers/CometChatUsers.tsx +276 -114
- package/src/CometChatUsers/Skeleton.tsx +195 -0
- package/src/CometChatUsers/index.ts +3 -11
- package/src/CometChatUsers/style.ts +181 -0
- package/src/calls/CallEvents.ts +9 -9
- package/src/calls/CallUtils.ts +102 -31
- package/src/calls/CallingConfiguration.ts +22 -4
- package/src/calls/CallingExtension.tsx +43 -40
- package/src/calls/CallingExtensionDecorator.tsx +416 -0
- package/src/calls/CallingPackage.ts +11 -12
- package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +121 -52
- package/src/calls/CometChatCallBubble/index.ts +8 -13
- package/src/calls/CometChatCallBubble/resources/index.ts +1 -8
- package/src/calls/CometChatCallBubble/styles.ts +155 -22
- package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +17 -36
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +319 -323
- package/src/calls/CometChatCallButtons/index.ts +9 -11
- package/src/calls/CometChatCallButtons/style.ts +34 -12
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +429 -377
- package/src/calls/CometChatCallLogs/Skeleton.tsx +143 -0
- package/src/calls/CometChatCallLogs/index.ts +4 -15
- package/src/calls/CometChatCallLogs/resources/index.ts +20 -31
- package/src/calls/CometChatCallLogs/style.ts +169 -22
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +279 -217
- package/src/calls/CometChatIncomingCall/index.ts +7 -9
- package/src/calls/CometChatIncomingCall/resources/index.ts +3 -12
- package/src/calls/CometChatIncomingCall/style.ts +75 -0
- package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +74 -56
- package/src/calls/CometChatOngoingCall/index.ts +3 -7
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +207 -171
- package/src/calls/CometChatOutgoingCall/OutgoingCallConfiguration.ts +31 -31
- package/src/calls/CometChatOutgoingCall/index.ts +5 -11
- package/src/calls/CometChatOutgoingCall/resources/index.ts +1 -4
- package/src/calls/CometChatOutgoingCall/styles.ts +58 -0
- package/src/calls/index.ts +14 -88
- package/src/calls/resources/index.ts +1 -8
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +72 -96
- package/src/extensions/CollaborativeBubble/resources/index.ts +2 -4
- package/src/extensions/CollaborativeBubble/style.ts +112 -0
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtension.tsx +21 -35
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +220 -189
- package/src/extensions/CollaborativeDocument/index.ts +2 -8
- package/src/extensions/CollaborativeDocument/resources/index.ts +4 -6
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.tsx +25 -35
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +298 -199
- package/src/extensions/CollaborativeWhiteboard/index.ts +2 -8
- package/src/extensions/CollaborativeWhiteboard/resources/index.ts +4 -6
- package/src/extensions/ExtensionConstants.tsx +3 -4
- package/src/extensions/ExtensionModerator.tsx +47 -47
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +187 -116
- package/src/extensions/LinkPreview/LinkPreviewExtension.tsx +22 -0
- package/src/extensions/LinkPreview/LinkPreviewExtensionDecorator.tsx +94 -0
- package/src/extensions/LinkPreview/index.ts +6 -16
- package/src/extensions/LinkPreview/resources/index.ts +1 -4
- package/src/extensions/LinkPreview/style.ts +100 -0
- package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +112 -116
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +235 -152
- package/src/extensions/MessageTranslation/MessageTranslationExtension.tsx +7 -25
- package/src/extensions/MessageTranslation/index.ts +3 -5
- package/src/extensions/MessageTranslation/resources/index.ts +2 -3
- package/src/extensions/Polls/Header.tsx +56 -21
- package/src/extensions/Polls/Polls.tsx +368 -332
- package/src/extensions/Polls/PollsBubble.tsx +250 -205
- package/src/extensions/Polls/PollsConfigurations.ts +0 -9
- package/src/extensions/Polls/PollsDecorator.tsx +148 -77
- package/src/extensions/Polls/PollsExtension.tsx +5 -12
- package/src/extensions/Polls/index.ts +6 -8
- package/src/extensions/Polls/resources/index.ts +6 -12
- package/src/extensions/Polls/style.ts +185 -1
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +249 -115
- package/src/extensions/Stickers/CometChatStickerKeyboard/Skeleton.tsx +167 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +2 -6
- package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +58 -64
- package/src/extensions/Stickers/CometChatStickerKeyboard/index.ts +2 -3
- package/src/extensions/Stickers/CometChatStickerKeyboard/style.ts +67 -41
- package/src/extensions/Stickers/StickerConfiguration.ts +5 -9
- package/src/extensions/Stickers/StickersBubble.tsx +22 -46
- package/src/extensions/Stickers/StickersExtension.ts +5 -6
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +290 -104
- package/src/extensions/Stickers/index.ts +7 -9
- package/src/extensions/Stickers/resources/index.ts +1 -4
- package/src/extensions/Stickers/style.ts +53 -0
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +83 -64
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.tsx +5 -25
- package/src/extensions/ThumbnailGeneration/index.ts +1 -3
- package/src/extensions/ThumbnailGeneration/resources/index.ts +1 -4
- package/src/extensions/index.ts +11 -50
- package/src/index.ts +193 -670
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +342 -486
- package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +147 -117
- package/src/shared/CometChatUiKit/UIKitSettings.ts +38 -38
- package/src/shared/CometChatUiKit/index.ts +2 -6
- package/src/shared/assets/images/index.ts +13 -29
- package/src/shared/base/BaseStyle.ts +9 -8
- package/src/shared/base/BorderStyle.ts +4 -4
- package/src/shared/base/FontStyle.ts +25 -3
- package/src/shared/base/ShadowStyle.ts +1 -1
- package/src/shared/base/Types.ts +15 -26
- package/src/shared/base/index.ts +7 -25
- package/src/shared/base/vars.ts +5 -5
- package/src/shared/constants/UIKitConstants.ts +322 -294
- package/src/shared/events/CometChatMessageEvents/index.ts +83 -87
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +260 -238
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +412 -377
- package/src/shared/events/CometChatUIEvents.ts +15 -16
- package/src/shared/events/ListenerInitializer.ts +79 -80
- package/src/shared/events/conversations.ts +2 -2
- package/src/shared/events/groups.ts +8 -8
- package/src/shared/events/index.ts +6 -6
- package/src/shared/events/messages.ts +26 -29
- package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +191 -121
- package/src/shared/formatters/CometChatMentionsFormatter/MentionTextStyle.ts +3 -3
- package/src/shared/formatters/CometChatMentionsFormatter/index.ts +3 -6
- package/src/shared/formatters/CometChatTextFormatter.ts +15 -14
- package/src/shared/formatters/CometChatUrlsFormatter/index.tsx +127 -131
- package/src/shared/formatters/index.ts +7 -8
- package/src/shared/framework/ChatConfigurator.ts +3 -4
- package/src/shared/framework/DataSource.ts +181 -92
- package/src/shared/framework/DataSourceDecorator.tsx +307 -233
- package/src/shared/framework/ExtensionsDataSource.tsx +8 -11
- package/src/shared/framework/MessageDataSource.tsx +1364 -867
- package/src/shared/framework/index.ts +8 -6
- package/src/shared/framework/resources/index.ts +37 -57
- package/src/shared/helper/Toast.tsx +20 -18
- package/src/shared/helper/dateHelper.ts +138 -0
- package/src/shared/helper/functions.js +1 -1
- package/src/shared/helper/helperFunctions.ts +71 -19
- package/src/shared/helper/types/index.ts +49 -15
- package/src/shared/helper/useKeyboard.tsx +12 -23
- package/src/shared/icons/Icon.tsx +73 -0
- package/src/shared/icons/components/ListItemCheck.tsx +18 -0
- package/src/shared/icons/components/StickerBase-icon.tsx +16 -0
- package/src/shared/icons/components/account-circle-fill.tsx +26 -0
- package/src/shared/icons/components/account-circle.tsx +11 -0
- package/src/shared/icons/components/activity.tsx +20 -0
- package/src/shared/icons/components/add-a-photo-fill.tsx +26 -0
- package/src/shared/icons/components/add-a-photo.tsx +11 -0
- package/src/shared/icons/components/add-box-fill.tsx +26 -0
- package/src/shared/icons/components/add-box.tsx +11 -0
- package/src/shared/icons/components/add-call-fill.tsx +26 -0
- package/src/shared/icons/components/add-call.tsx +11 -0
- package/src/shared/icons/components/add-circle-fill.tsx +11 -0
- package/src/shared/icons/components/add-circle.tsx +11 -0
- package/src/shared/icons/components/add-comment-fill.tsx +26 -0
- package/src/shared/icons/components/add-comment.tsx +11 -0
- package/src/shared/icons/components/add-fill.tsx +26 -0
- package/src/shared/icons/components/add-reaction-fill.tsx +26 -0
- package/src/shared/icons/components/add-reaction.tsx +11 -0
- package/src/shared/icons/components/add.tsx +11 -0
- package/src/shared/icons/components/ai-conversation-summary-fill.tsx +13 -0
- package/src/shared/icons/components/ai-conversation-summary.tsx +13 -0
- package/src/shared/icons/components/ai-fill.tsx +11 -0
- package/src/shared/icons/components/ai-suggest-reply-fill.tsx +13 -0
- package/src/shared/icons/components/ai-suggest-reply.tsx +20 -0
- package/src/shared/icons/components/ai.tsx +12 -0
- package/src/shared/icons/components/alternate-email-fill.tsx +26 -0
- package/src/shared/icons/components/alternate-email.tsx +11 -0
- package/src/shared/icons/components/animals-&-nature.tsx +18 -0
- package/src/shared/icons/components/archive-fill.tsx +26 -0
- package/src/shared/icons/components/archive.tsx +11 -0
- package/src/shared/icons/components/arrow-back-fill.tsx +26 -0
- package/src/shared/icons/components/arrow-back.tsx +11 -0
- package/src/shared/icons/components/arrow-forward-fill.tsx +26 -0
- package/src/shared/icons/components/arrow-forward.tsx +11 -0
- package/src/shared/icons/components/attach-file-fill.tsx +26 -0
- package/src/shared/icons/components/attach-file.tsx +11 -0
- package/src/shared/icons/components/audio-file-type.tsx +36 -0
- package/src/shared/icons/components/bar-chart-fill.tsx +11 -0
- package/src/shared/icons/components/bar-chart.tsx +11 -0
- package/src/shared/icons/components/base-icon.tsx +16 -0
- package/src/shared/icons/components/bedtime-fill.tsx +26 -0
- package/src/shared/icons/components/bedtime.tsx +11 -0
- package/src/shared/icons/components/block-fill.tsx +26 -0
- package/src/shared/icons/components/block.tsx +11 -0
- package/src/shared/icons/components/bookmark-add-fill.tsx +26 -0
- package/src/shared/icons/components/bookmark-add.tsx +11 -0
- package/src/shared/icons/components/bookmark-fill.tsx +26 -0
- package/src/shared/icons/components/bookmark.tsx +11 -0
- package/src/shared/icons/components/calendar-add-on-fill.tsx +26 -0
- package/src/shared/icons/components/calendar-add-on.tsx +11 -0
- package/src/shared/icons/components/calendar-today-fill.tsx +26 -0
- package/src/shared/icons/components/calendar-today.tsx +11 -0
- package/src/shared/icons/components/call-end-fill.tsx +26 -0
- package/src/shared/icons/components/call-end.tsx +11 -0
- package/src/shared/icons/components/call-fill.tsx +26 -0
- package/src/shared/icons/components/call-log-fill.tsx +26 -0
- package/src/shared/icons/components/call-log.tsx +11 -0
- package/src/shared/icons/components/call-made-fill.tsx +26 -0
- package/src/shared/icons/components/call-made.tsx +11 -0
- package/src/shared/icons/components/call-missed-fill.tsx +26 -0
- package/src/shared/icons/components/call-missed-outgoing-fill.tsx +26 -0
- package/src/shared/icons/components/call-missed-outgoing.tsx +11 -0
- package/src/shared/icons/components/call-missed.tsx +11 -0
- package/src/shared/icons/components/call-received-fill.tsx +26 -0
- package/src/shared/icons/components/call-received.tsx +11 -0
- package/src/shared/icons/components/call.tsx +11 -0
- package/src/shared/icons/components/cancel-fill.tsx +26 -0
- package/src/shared/icons/components/cancel.tsx +11 -0
- package/src/shared/icons/components/change-circle-fill.tsx +11 -0
- package/src/shared/icons/components/change-circle.tsx +11 -0
- package/src/shared/icons/components/chat-bot-fill.tsx +13 -0
- package/src/shared/icons/components/chat-bot.tsx +17 -0
- package/src/shared/icons/components/chat-fill.tsx +26 -0
- package/src/shared/icons/components/chat.tsx +11 -0
- package/src/shared/icons/components/check-circle-fill.tsx +11 -0
- package/src/shared/icons/components/check-circle.tsx +11 -0
- package/src/shared/icons/components/check-fill.tsx +26 -0
- package/src/shared/icons/components/check.tsx +11 -0
- package/src/shared/icons/components/chevron-left-fill.tsx +26 -0
- package/src/shared/icons/components/chevron-left.tsx +11 -0
- package/src/shared/icons/components/chevron-right-fill.tsx +26 -0
- package/src/shared/icons/components/chevron-right.tsx +11 -0
- package/src/shared/icons/components/close-fill.tsx +26 -0
- package/src/shared/icons/components/close.tsx +11 -0
- package/src/shared/icons/components/collaborative-document-fill.tsx +17 -0
- package/src/shared/icons/components/collaborative-document-icon.tsx +11 -0
- package/src/shared/icons/components/collaborative-document.tsx +13 -0
- package/src/shared/icons/components/collaborative-whiteboard-fill.tsx +15 -0
- package/src/shared/icons/components/collaborative-whiteboard-icon.tsx +15 -0
- package/src/shared/icons/components/collaborative-whiteboard.tsx +12 -0
- package/src/shared/icons/components/content-copy-fill.tsx +26 -0
- package/src/shared/icons/components/content-copy.tsx +11 -0
- package/src/shared/icons/components/crop-fill.tsx +26 -0
- package/src/shared/icons/components/crop.tsx +11 -0
- package/src/shared/icons/components/delete-fill.tsx +26 -0
- package/src/shared/icons/components/delete.tsx +11 -0
- package/src/shared/icons/components/description-fill.tsx +26 -0
- package/src/shared/icons/components/description.tsx +11 -0
- package/src/shared/icons/components/document-file-type.tsx +38 -0
- package/src/shared/icons/components/done-all-fill.tsx +26 -0
- package/src/shared/icons/components/done-all.tsx +11 -0
- package/src/shared/icons/components/download-fill.tsx +26 -0
- package/src/shared/icons/components/download.tsx +11 -0
- package/src/shared/icons/components/edit-calendar-fill.tsx +26 -0
- package/src/shared/icons/components/edit-calendar.tsx +11 -0
- package/src/shared/icons/components/edit-fill.tsx +26 -0
- package/src/shared/icons/components/edit-square-fill.tsx +11 -0
- package/src/shared/icons/components/edit-square.tsx +11 -0
- package/src/shared/icons/components/edit.tsx +11 -0
- package/src/shared/icons/components/empty-state.tsx +82 -0
- package/src/shared/icons/components/error-fill.tsx +34 -0
- package/src/shared/icons/components/error-state.tsx +92 -0
- package/src/shared/icons/components/error.tsx +11 -0
- package/src/shared/icons/components/event-available-fill.tsx +11 -0
- package/src/shared/icons/components/event-available.tsx +11 -0
- package/src/shared/icons/components/event-fill.tsx +26 -0
- package/src/shared/icons/components/event.tsx +11 -0
- package/src/shared/icons/components/favorite-fill.tsx +26 -0
- package/src/shared/icons/components/favorite.tsx +11 -0
- package/src/shared/icons/components/filter-list-fill.tsx +26 -0
- package/src/shared/icons/components/filter-list-off-fill.tsx +26 -0
- package/src/shared/icons/components/filter-list-off.tsx +11 -0
- package/src/shared/icons/components/filter-list.tsx +11 -0
- package/src/shared/icons/components/flags.tsx +13 -0
- package/src/shared/icons/components/flip-camera-ios-fill.tsx +26 -0
- package/src/shared/icons/components/flip-camera-ios.tsx +11 -0
- package/src/shared/icons/components/food-&-drink.tsx +18 -0
- package/src/shared/icons/components/forward-fill.tsx +26 -0
- package/src/shared/icons/components/forward.tsx +11 -0
- package/src/shared/icons/components/gif-fill.tsx +13 -0
- package/src/shared/icons/components/gif.tsx +12 -0
- package/src/shared/icons/components/graphic-eq-fill.tsx +11 -0
- package/src/shared/icons/components/graphic-eq.tsx +11 -0
- package/src/shared/icons/components/group-add.tsx +11 -0
- package/src/shared/icons/components/group-fill.tsx +26 -0
- package/src/shared/icons/components/group.tsx +11 -0
- package/src/shared/icons/components/help-fill.tsx +26 -0
- package/src/shared/icons/components/help.tsx +11 -0
- package/src/shared/icons/components/history-fill.tsx +26 -0
- package/src/shared/icons/components/history.tsx +11 -0
- package/src/shared/icons/components/image-file-type.tsx +35 -0
- package/src/shared/icons/components/incoming-audio-fill.tsx +11 -0
- package/src/shared/icons/components/incoming-audio.tsx +13 -0
- package/src/shared/icons/components/incoming-video-fill.tsx +28 -0
- package/src/shared/icons/components/incoming-video.tsx +15 -0
- package/src/shared/icons/components/info-fill.tsx +26 -0
- package/src/shared/icons/components/info.tsx +11 -0
- package/src/shared/icons/components/keep-fill.tsx +26 -0
- package/src/shared/icons/components/keep-off-fill.tsx +26 -0
- package/src/shared/icons/components/keep-off.tsx +11 -0
- package/src/shared/icons/components/keep.tsx +11 -0
- package/src/shared/icons/components/keyboard-arrow-down-fill.tsx +26 -0
- package/src/shared/icons/components/keyboard-arrow-down.tsx +11 -0
- package/src/shared/icons/components/keyboard-arrow-up-fill.tsx +26 -0
- package/src/shared/icons/components/keyboard-arrow-up.tsx +11 -0
- package/src/shared/icons/components/keyboard-fill.tsx +26 -0
- package/src/shared/icons/components/keyboard.tsx +11 -0
- package/src/shared/icons/components/language-fill.tsx +26 -0
- package/src/shared/icons/components/language.tsx +11 -0
- package/src/shared/icons/components/link-fill.tsx +26 -0
- package/src/shared/icons/components/link.tsx +11 -0
- package/src/shared/icons/components/loading-fill.tsx +12 -0
- package/src/shared/icons/components/loading.tsx +12 -0
- package/src/shared/icons/components/location-on-fill.tsx +26 -0
- package/src/shared/icons/components/location-on.tsx +11 -0
- package/src/shared/icons/components/lock-fill.tsx +26 -0
- package/src/shared/icons/components/lock-open-fill.tsx +26 -0
- package/src/shared/icons/components/lock-open.tsx +11 -0
- package/src/shared/icons/components/lock.tsx +11 -0
- package/src/shared/icons/components/logout-fill.tsx +11 -0
- package/src/shared/icons/components/logout.tsx +11 -0
- package/src/shared/icons/components/mail-fill.tsx +26 -0
- package/src/shared/icons/components/mail.tsx +11 -0
- package/src/shared/icons/components/mic-fill.tsx +26 -0
- package/src/shared/icons/components/mic-off-fill.tsx +26 -0
- package/src/shared/icons/components/mic-off.tsx +11 -0
- package/src/shared/icons/components/mic.tsx +11 -0
- package/src/shared/icons/components/missed-video-call-fill.tsx +26 -0
- package/src/shared/icons/components/missed-video-call.tsx +11 -0
- package/src/shared/icons/components/mood-fill.tsx +26 -0
- package/src/shared/icons/components/mood.tsx +11 -0
- package/src/shared/icons/components/more-vert-fill.tsx +26 -0
- package/src/shared/icons/components/more-vert.tsx +11 -0
- package/src/shared/icons/components/near-me-fill.tsx +11 -0
- package/src/shared/icons/components/near-me.tsx +11 -0
- package/src/shared/icons/components/no-photography-fill.tsx +26 -0
- package/src/shared/icons/components/no-photography.tsx +11 -0
- package/src/shared/icons/components/notifications-fill.tsx +26 -0
- package/src/shared/icons/components/notifications-off-fill.tsx +26 -0
- package/src/shared/icons/components/notifications-off.tsx +11 -0
- package/src/shared/icons/components/notifications.tsx +11 -0
- package/src/shared/icons/components/objects.tsx +20 -0
- package/src/shared/icons/components/outgoing-audio-fill.tsx +15 -0
- package/src/shared/icons/components/outgoing-audio.tsx +15 -0
- package/src/shared/icons/components/outgoing-video-fill.tsx +28 -0
- package/src/shared/icons/components/outgoing-video.tsx +15 -0
- package/src/shared/icons/components/pause-fill.tsx +26 -0
- package/src/shared/icons/components/pause.tsx +11 -0
- package/src/shared/icons/components/pdf-file-type.tsx +36 -0
- package/src/shared/icons/components/person-add-fill.tsx +26 -0
- package/src/shared/icons/components/person-add.tsx +11 -0
- package/src/shared/icons/components/person-fill.tsx +26 -0
- package/src/shared/icons/components/person-off.tsx +16 -0
- package/src/shared/icons/components/person.tsx +11 -0
- package/src/shared/icons/components/phone-in-talk-fill.tsx +26 -0
- package/src/shared/icons/components/phone-in-talk.tsx +11 -0
- package/src/shared/icons/components/phone-incoming-fill.tsx +11 -0
- package/src/shared/icons/components/phone-incoming.tsx +11 -0
- package/src/shared/icons/components/phone-missed-fill.tsx +26 -0
- package/src/shared/icons/components/phone-missed.tsx +11 -0
- package/src/shared/icons/components/phone-outgoing-fill.tsx +15 -0
- package/src/shared/icons/components/phone-outgoing.tsx +15 -0
- package/src/shared/icons/components/photo-camera-fill.tsx +26 -0
- package/src/shared/icons/components/photo-camera.tsx +11 -0
- package/src/shared/icons/components/photo-fill.tsx +26 -0
- package/src/shared/icons/components/photo.tsx +11 -0
- package/src/shared/icons/components/play-arrow-fill.tsx +26 -0
- package/src/shared/icons/components/play-arrow.tsx +11 -0
- package/src/shared/icons/components/play-circle-fill.tsx +26 -0
- package/src/shared/icons/components/play-circle.tsx +11 -0
- package/src/shared/icons/components/poll-Icon.tsx +10 -0
- package/src/shared/icons/components/poll-fill.tsx +11 -0
- package/src/shared/icons/components/poll.tsx +11 -0
- package/src/shared/icons/components/presentation-file-type.tsx +38 -0
- package/src/shared/icons/components/rearrange-fill.tsx +13 -0
- package/src/shared/icons/components/rearrange.tsx +13 -0
- package/src/shared/icons/components/refresh-fill.tsx +26 -0
- package/src/shared/icons/components/refresh.tsx +11 -0
- package/src/shared/icons/components/reply-all-fill.tsx +26 -0
- package/src/shared/icons/components/reply-all.tsx +11 -0
- package/src/shared/icons/components/reply-fill.tsx +26 -0
- package/src/shared/icons/components/reply.tsx +11 -0
- package/src/shared/icons/components/retry-fill.tsx +11 -0
- package/src/shared/icons/components/retry.tsx +11 -0
- package/src/shared/icons/components/schedule-fill.tsx +26 -0
- package/src/shared/icons/components/schedule.tsx +11 -0
- package/src/shared/icons/components/screen-share-fill.tsx +26 -0
- package/src/shared/icons/components/screen-share.tsx +11 -0
- package/src/shared/icons/components/search-fill.tsx +26 -0
- package/src/shared/icons/components/search.tsx +11 -0
- package/src/shared/icons/components/send-fill.tsx +26 -0
- package/src/shared/icons/components/send.tsx +11 -0
- package/src/shared/icons/components/settings-fill.tsx +26 -0
- package/src/shared/icons/components/settings.tsx +11 -0
- package/src/shared/icons/components/share-fill.tsx +26 -0
- package/src/shared/icons/components/share.tsx +11 -0
- package/src/shared/icons/components/shield-fill.tsx +11 -0
- package/src/shared/icons/components/shield.tsx +11 -0
- package/src/shared/icons/components/smileys-&-people.tsx +18 -0
- package/src/shared/icons/components/spreadsheet-file-type.tsx +38 -0
- package/src/shared/icons/components/star-fill.tsx +26 -0
- package/src/shared/icons/components/star.tsx +11 -0
- package/src/shared/icons/components/sticker-fill.tsx +12 -0
- package/src/shared/icons/components/sticker.tsx +11 -0
- package/src/shared/icons/components/stop-circle-fill.tsx +26 -0
- package/src/shared/icons/components/stop-circle.tsx +11 -0
- package/src/shared/icons/components/stop-fill.tsx +26 -0
- package/src/shared/icons/components/stop-screen-share-fill.tsx +26 -0
- package/src/shared/icons/components/stop-screen-share.tsx +11 -0
- package/src/shared/icons/components/stop.tsx +11 -0
- package/src/shared/icons/components/subdirectory-arrow-left-fill.tsx +26 -0
- package/src/shared/icons/components/subdirectory-arrow-left.tsx +11 -0
- package/src/shared/icons/components/subdirectory-arrow-right-fill.tsx +26 -0
- package/src/shared/icons/components/subdirectory-arrow-right.tsx +11 -0
- package/src/shared/icons/components/sunny-fill.tsx +26 -0
- package/src/shared/icons/components/sunny.tsx +11 -0
- package/src/shared/icons/components/symbols.tsx +15 -0
- package/src/shared/icons/components/text-file-type.tsx +35 -0
- package/src/shared/icons/components/thumb-down-fill.tsx +26 -0
- package/src/shared/icons/components/thumb-down.tsx +11 -0
- package/src/shared/icons/components/thumb-up-fill.tsx +26 -0
- package/src/shared/icons/components/thumb-up.tsx +11 -0
- package/src/shared/icons/components/translate-fill.tsx +11 -0
- package/src/shared/icons/components/translate.tsx +11 -0
- package/src/shared/icons/components/travel-&-places.tsx +18 -0
- package/src/shared/icons/components/unknown-file-type.tsx +38 -0
- package/src/shared/icons/components/upload-fill.tsx +11 -0
- package/src/shared/icons/components/upload.tsx +11 -0
- package/src/shared/icons/components/user-empty-icon.tsx +26 -0
- package/src/shared/icons/components/video-call-fill.tsx +26 -0
- package/src/shared/icons/components/video-call.tsx +11 -0
- package/src/shared/icons/components/video-file-type.tsx +38 -0
- package/src/shared/icons/components/videocam-fill.tsx +26 -0
- package/src/shared/icons/components/videocam-off-fill.tsx +26 -0
- package/src/shared/icons/components/videocam-off.tsx +11 -0
- package/src/shared/icons/components/videocam.tsx +11 -0
- package/src/shared/icons/components/visibility-off-fill.tsx +11 -0
- package/src/shared/icons/components/visibility-off.tsx +11 -0
- package/src/shared/icons/components/volume-down-fill.tsx +26 -0
- package/src/shared/icons/components/volume-down.tsx +11 -0
- package/src/shared/icons/components/volume-mute-fill.tsx +26 -0
- package/src/shared/icons/components/volume-mute.tsx +11 -0
- package/src/shared/icons/components/volume-off-fill.tsx +26 -0
- package/src/shared/icons/components/volume-off.tsx +11 -0
- package/src/shared/icons/components/volume-up-fill.tsx +26 -0
- package/src/shared/icons/components/volume-up.tsx +11 -0
- package/src/shared/icons/components/warning-fill.tsx +26 -0
- package/src/shared/icons/components/warning.tsx +11 -0
- package/src/shared/icons/components/wifi-fill.tsx +26 -0
- package/src/shared/icons/components/wifi.tsx +11 -0
- package/src/shared/icons/components/zip-file-type.tsx +38 -0
- package/src/shared/icons/components/zoom-in-map-fill.tsx +26 -0
- package/src/shared/icons/components/zoom-in-map.tsx +11 -0
- package/src/shared/icons/components/zoom-out-map-fill.tsx +26 -0
- package/src/shared/icons/components/zoom-out-map.tsx +11 -0
- package/src/shared/icons/icon-mapping.tsx +620 -0
- package/src/shared/index.ts +114 -333
- package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +0 -1
- package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +19 -26
- package/src/shared/libs/ImageZoom/helper.ts +11 -27
- package/src/shared/libs/ImageZoom/index.tsx +4 -7
- package/src/shared/libs/ImageZoom/types/index.ts +7 -17
- package/src/shared/libs/VideoPlayer/VideoResizeMode.js +1 -1
- package/src/shared/modals/CometChatMessageOption.ts +11 -8
- package/src/shared/modals/CometChatMessageTemplate.ts +180 -140
- package/src/shared/modals/index.ts +2 -57
- package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +153 -152
- package/src/shared/resources/CometChatLocalize/index.ts +2 -8
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +445 -315
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +445 -315
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +444 -316
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +445 -315
- package/src/shared/resources/CometChatLocalize/resources/hu/translation.json +444 -315
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +444 -316
- package/src/shared/resources/CometChatSoundManager/index.ts +1 -2
- package/src/shared/resources/index.ts +1 -9
- package/src/shared/utils/CometChatMessageHelper/index.ts +16 -14
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +50 -0
- package/src/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +1 -1
- package/src/shared/utils/CometChatMessagePreview/index.ts +1 -5
- package/src/shared/utils/CometChatMessagePreview/resources/index.ts +1 -4
- package/src/shared/utils/CometChatMessagePreview/style.ts +45 -0
- package/src/shared/utils/CommonUtils.ts +163 -172
- package/src/shared/utils/MessageUtils.tsx +326 -146
- package/src/shared/utils/NetworkUtils.tsx +32 -24
- package/src/shared/utils/PermissionUtil.ts +30 -30
- package/src/shared/utils/conversationUtils.ts +93 -86
- package/src/shared/utils/index.ts +4 -25
- package/src/shared/views/CometChatAICard/CometChatAICard.tsx +100 -66
- package/src/shared/views/CometChatAICard/resources/index.ts +2 -4
- package/src/shared/views/CometChatActionSheet/ActionItem.ts +12 -57
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +68 -249
- package/src/shared/views/CometChatActionSheet/hooks.ts +5 -3
- package/src/shared/views/CometChatActionSheet/index.ts +1 -4
- package/src/shared/views/CometChatActionSheet/resources/index.ts +5 -7
- package/src/shared/views/CometChatActionSheet/style.ts +2 -41
- package/src/shared/views/CometChatAudioBubble/AnimatedAudioWaves.tsx +131 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +211 -189
- package/src/shared/views/CometChatAudioBubble/index.ts +10 -10
- package/src/shared/views/CometChatAudioBubble/resources/index.ts +2 -7
- package/src/shared/views/CometChatAudioBubble/style.ts +203 -27
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +26 -104
- package/src/shared/views/CometChatAvatar/index.ts +3 -9
- package/src/shared/views/CometChatAvatar/styles.ts +37 -24
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +27 -46
- package/src/shared/views/CometChatBadge/index.ts +4 -8
- package/src/shared/views/CometChatBadge/styles.ts +29 -16
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +133 -152
- package/src/shared/views/CometChatBottomSheet/index.ts +2 -5
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +104 -106
- package/src/shared/views/CometChatConfirmDialog/index.ts +2 -9
- package/src/shared/views/CometChatConfirmDialog/style.ts +121 -62
- package/src/shared/views/CometChatDate/CometChatDate.tsx +23 -157
- package/src/shared/views/CometChatDate/index.ts +4 -12
- package/src/shared/views/CometChatDate/styles.ts +36 -0
- package/src/shared/views/CometChatDateSeperator/CometChatDateSeparator.tsx +48 -0
- package/src/shared/views/CometChatDateSeperator/index.ts +6 -0
- package/src/shared/views/CometChatDateSeperator/styles.ts +52 -0
- package/src/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.tsx +42 -0
- package/src/shared/views/CometChatDeletedBubble/index.ts +5 -0
- package/src/shared/views/CometChatDeletedBubble/styles.ts +42 -0
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +284 -205
- package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +169 -1405
- package/src/shared/views/CometChatEmojiKeyboard/index.ts +1 -3
- package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +8 -16
- package/src/shared/views/CometChatEmojiKeyboard/style.ts +72 -61
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +203 -173
- package/src/shared/views/CometChatFileBubble/index.ts +10 -6
- package/src/shared/views/CometChatFileBubble/resources/index.ts +1 -6
- package/src/shared/views/CometChatFileBubble/style.ts +120 -47
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +57 -251
- package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +154 -0
- package/src/shared/views/CometChatImageBubble/assets/index.ts +1 -5
- package/src/shared/views/CometChatImageBubble/index.ts +7 -9
- package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +28 -43
- package/src/shared/views/CometChatImageViewerModal/index.tsx +1 -1
- package/src/shared/views/CometChatImageViewerModal/resources/index.ts +1 -2
- package/src/shared/views/CometChatList/CometChatList.tsx +669 -702
- package/src/shared/views/CometChatList/Header.tsx +185 -110
- package/src/shared/views/CometChatList/index.ts +7 -4
- package/src/shared/views/CometChatList/resources/index.ts +4 -13
- package/src/shared/views/CometChatList/styles.ts +58 -44
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +132 -258
- package/src/shared/views/CometChatListItem/index.ts +3 -15
- package/src/shared/views/CometChatListItem/style.ts +25 -29
- package/src/shared/views/CometChatMediaRecorder/AnimatingMic.tsx +129 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatAudioPlayer.tsx +115 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.tsx +233 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +359 -284
- package/src/shared/views/CometChatMediaRecorder/Timer.tsx +83 -0
- package/src/shared/views/CometChatMediaRecorder/index.ts +4 -10
- package/src/shared/views/CometChatMediaRecorder/style.ts +69 -23
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +111 -124
- package/src/shared/views/CometChatMessageBubble/index.ts +2 -5
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +44 -85
- package/src/shared/views/CometChatMessageInput/index.ts +10 -3
- package/src/shared/views/CometChatMessageInput/styles.ts +2 -2
- package/src/shared/views/CometChatPanel/CometChatPanel.tsx +51 -45
- package/src/shared/views/CometChatPanel/PanelStyle.tsx +36 -36
- package/src/shared/views/CometChatPanel/resources/index.ts +1 -4
- package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +51 -73
- package/src/shared/views/CometChatQuickReactions/QuickReactionsStyle.tsx +33 -33
- package/src/shared/views/CometChatQuickReactions/index.ts +4 -5
- package/src/shared/views/CometChatQuickReactions/resources/index.ts +1 -2
- package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +365 -311
- package/src/shared/views/CometChatReactionList/ReactionListStyle.tsx +152 -64
- package/src/shared/views/CometChatReactionList/Skeleton.tsx +143 -0
- package/src/shared/views/CometChatReactionList/index.ts +6 -5
- package/src/shared/views/CometChatReactionList/resources/index.ts +1 -4
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +103 -171
- package/src/shared/views/CometChatReactions/index.ts +7 -14
- package/src/shared/views/CometChatReactions/style.ts +193 -41
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +75 -76
- package/src/shared/views/CometChatReceipt/index.ts +4 -10
- package/src/shared/views/CometChatReceipt/resources/blue-double-tick-icon.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/error.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/grey-double-tick-icon.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/grey-tick-icon.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/index.ts +5 -10
- package/src/shared/views/CometChatReceipt/resources/sending.png +0 -0
- package/src/shared/views/CometChatReceipt/style.ts +50 -9
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +56 -59
- package/src/shared/views/CometChatStatusIndicator/index.ts +6 -22
- package/src/shared/views/CometChatStatusIndicator/private.png +0 -0
- package/src/shared/views/CometChatStatusIndicator/protected.png +0 -0
- package/src/shared/views/CometChatStatusIndicator/styles.ts +47 -15
- package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +74 -56
- package/src/shared/views/CometChatSuggestionList/Skeleton.tsx +185 -0
- package/src/shared/views/CometChatSuggestionList/SuggestionItem.ts +44 -46
- package/src/shared/views/CometChatSuggestionList/index.ts +3 -7
- package/src/shared/views/CometChatSuggestionList/style.ts +69 -0
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +46 -101
- package/src/shared/views/CometChatTextBubble/index.ts +8 -7
- package/src/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.tsx +166 -0
- package/src/shared/views/CometChatTooltipMenu/index.ts +3 -0
- package/src/shared/views/CometChatTooltipMenu/styles.ts +24 -0
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +155 -195
- package/src/shared/views/CometChatVideoBubble/index.ts +7 -9
- package/src/shared/views/CometChatVideoBubble/resources/index.ts +2 -7
- package/src/shared/views/CometChatVideoBubble/style.ts +101 -5
- package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +135 -90
- package/src/shared/views/CometChatVideoPlayer/index.tsx +1 -1
- package/src/shared/views/ErrorEmptyView/ErrorEmptyView.tsx +47 -0
- package/src/shared/views/index.ts +72 -214
- package/src/theme/CometChatThemeHelper.ts +427 -0
- package/src/theme/context.ts +20 -0
- package/src/theme/default/color/dark.ts +99 -0
- package/src/theme/default/color/light.ts +105 -0
- package/src/theme/default/index.ts +242 -0
- package/src/theme/default/resources/icons/Base_Icon.png +0 -0
- package/src/theme/default/resources/icons/collaborative_document_1x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_document_2x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_document_3x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_whiteboard_1x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_whiteboard_2x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_whiteboard_3x.png +0 -0
- package/src/theme/default/resources/icons/dark_error_icon.png +0 -0
- package/src/theme/default/resources/icons/index.ts +19 -0
- package/src/theme/default/resources/icons/light_error_icon.png +0 -0
- package/src/theme/default/resources/icons/thread_replies.png +0 -0
- package/src/theme/default/spacing.ts +86 -0
- package/src/theme/default/typography.ts +184 -0
- package/src/theme/hook.ts +19 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/provider.tsx +135 -0
- package/src/theme/type.ts +446 -0
- package/screenshots/logo.png +0 -0
- package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +0 -166
- package/src/AI/AIAssistBot/AIAssistBotExtension.tsx +0 -22
- package/src/AI/AIAssistBot/AIAssistBotStyle.ts +0 -43
- package/src/AI/AIAssistBot/AIAssistBotView.tsx +0 -297
- package/src/AI/AIAssistBot/configuration.ts +0 -23
- package/src/AI/AIAssistBot/resources/CloseIcon.png +0 -0
- package/src/AI/AIAssistBot/resources/index.ts +0 -6
- package/src/AI/AIBaseConfiguration.ts +0 -15
- package/src/AI/AIBaseStyle.ts +0 -58
- package/src/AI/AIConversationStarter/AIConversationStarter.ts +0 -19
- package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +0 -249
- package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +0 -14
- package/src/AI/AIConversationStarter/configuration.ts +0 -11
- package/src/AI/AIConversationStarter/style.ts +0 -74
- package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +0 -179
- package/src/AI/AIConversationSummary/AIConversationSummaryExtension.ts +0 -21
- package/src/AI/AIConversationSummary/AIConversationSummaryStyle.tsx +0 -20
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +0 -195
- package/src/AI/AIConversationSummary/configuration.ts +0 -14
- package/src/AI/AIConversationSummary/resources/index.ts +0 -6
- package/src/AI/AIExtensionDataSource.ts +0 -18
- package/src/AI/AIOptionsStyle.ts +0 -14
- package/src/AI/AISmartReplies/AISmartReplies.ts +0 -19
- package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +0 -306
- package/src/AI/AISmartReplies/AISmartRepliesStyle.ts +0 -16
- package/src/AI/AISmartReplies/configuration.ts +0 -12
- package/src/AI/CardView.tsx +0 -83
- package/src/AI/CardViewStyle.ts +0 -37
- package/src/AI/resources/ai-empty.png +0 -0
- package/src/AI/resources/ai-error.png +0 -0
- package/src/AI/resources/index.ts +0 -12
- package/src/AI/resources/spineer.png +0 -0
- package/src/AI/style.ts +0 -165
- package/src/AI/utils.ts +0 -39
- package/src/CometChatAddMembers/AddMembersConfiguration.tsx +0 -58
- package/src/CometChatAddMembers/CometChatAddMembers.tsx +0 -114
- package/src/CometChatAddMembers/index.ts +0 -10
- package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +0 -61
- package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +0 -148
- package/src/CometChatBannedMembers/index.ts +0 -13
- package/src/CometChatBannedMembers/resources/clear.png +0 -0
- package/src/CometChatBannedMembers/resources/index.ts +0 -4
- package/src/CometChatContacts/CometChatContacts.tsx +0 -229
- package/src/CometChatContacts/ContactsConfiguration.tsx +0 -69
- package/src/CometChatContacts/ContactsStyle.ts +0 -60
- package/src/CometChatContacts/Header.tsx +0 -167
- package/src/CometChatContacts/index.ts +0 -13
- package/src/CometChatContacts/styles.ts +0 -105
- package/src/CometChatConversations/ConversationsConfiguration.ts +0 -226
- package/src/CometChatConversations/ConversationsStyle.ts +0 -88
- package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +0 -232
- package/src/CometChatConversationsWithMessages/index.ts +0 -6
- package/src/CometChatConversationsWithMessages/resources/index.ts +0 -6
- package/src/CometChatConversationsWithMessages/resources/start.png +0 -0
- package/src/CometChatConversationsWithMessages/styles.ts +0 -15
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +0 -382
- package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +0 -36
- package/src/CometChatCreateGroup/Header.tsx +0 -60
- package/src/CometChatCreateGroup/index.ts +0 -15
- package/src/CometChatCreateGroup/resources/close.png +0 -0
- package/src/CometChatCreateGroup/resources/index.ts +0 -11
- package/src/CometChatCreateGroup/resources/rightTick.png +0 -0
- package/src/CometChatCreateGroup/resources/warning.png +0 -0
- package/src/CometChatCreateGroup/style.ts +0 -44
- package/src/CometChatDetails/CometChatDetails.tsx +0 -983
- package/src/CometChatDetails/DetailsConfiguration.tsx +0 -72
- package/src/CometChatDetails/Header.tsx +0 -42
- package/src/CometChatDetails/index.ts +0 -19
- package/src/CometChatDetails/listners.ts +0 -109
- package/src/CometChatDetails/resources/close.png +0 -0
- package/src/CometChatDetails/resources/index.ts +0 -17
- package/src/CometChatDetails/styles.ts +0 -23
- package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +0 -118
- package/src/CometChatGroupMembers/GroupMemberStyle.ts +0 -91
- package/src/CometChatGroupMembers/GroupScopeStyle.ts +0 -68
- package/src/CometChatGroups/GroupsConfiguration.ts +0 -93
- package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +0 -234
- package/src/CometChatGroupsWithMessages/index.ts +0 -6
- package/src/CometChatGroupsWithMessages/resources/index.ts +0 -5
- package/src/CometChatGroupsWithMessages/resources/write.png +0 -0
- package/src/CometChatGroupsWithMessages/styles.ts +0 -15
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +0 -268
- package/src/CometChatJoinProtectedGroup/Header.tsx +0 -52
- package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +0 -30
- package/src/CometChatJoinProtectedGroup/index.ts +0 -15
- package/src/CometChatJoinProtectedGroup/resources/close.png +0 -0
- package/src/CometChatJoinProtectedGroup/resources/index.ts +0 -8
- package/src/CometChatJoinProtectedGroup/resources/rightTick.png +0 -0
- package/src/CometChatJoinProtectedGroup/style.ts +0 -11
- package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +0 -96
- package/src/CometChatMessageComposer/styles.ts +0 -28
- package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +0 -62
- package/src/CometChatMessageHeader/resources/Back.png +0 -0
- package/src/CometChatMessageHeader/resources/index.ts +0 -11
- package/src/CometChatMessageHeader/resources/password.png +0 -0
- package/src/CometChatMessageHeader/resources/private.png +0 -0
- package/src/CometChatMessageInformation/MessageInformationConfiguration.tsx +0 -32
- package/src/CometChatMessageInformation/MessageInformationStyle.ts +0 -12
- package/src/CometChatMessageList/MessageListConfiguration.ts +0 -250
- package/src/CometChatMessageList/MessageListStyle.ts +0 -75
- package/src/CometChatMessages/CometChatMessages.tsx +0 -347
- package/src/CometChatMessages/MessageStyle.ts +0 -34
- package/src/CometChatMessages/MessagesConfiguration.ts +0 -55
- package/src/CometChatMessages/index.ts +0 -16
- package/src/CometChatMessages/resources/index.ts +0 -6
- package/src/CometChatMessages/resources/info.png +0 -0
- package/src/CometChatMessages/style.ts +0 -23
- package/src/CometChatTabs/CometChatTabs.tsx +0 -178
- package/src/CometChatTabs/CometChatTabsStyle.ts +0 -45
- package/src/CometChatTabs/TabItemStyle.ts +0 -55
- package/src/CometChatTabs/TabItems.ts +0 -11
- package/src/CometChatTabs/index.ts +0 -6
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +0 -345
- package/src/CometChatThreadedMessages/Header.tsx +0 -57
- package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +0 -45
- package/src/CometChatThreadedMessages/index.ts +0 -15
- package/src/CometChatThreadedMessages/resources/Back.png +0 -0
- package/src/CometChatThreadedMessages/resources/close.png +0 -0
- package/src/CometChatThreadedMessages/resources/index.ts +0 -20
- package/src/CometChatThreadedMessages/resources/password.png +0 -0
- package/src/CometChatThreadedMessages/resources/private.png +0 -0
- package/src/CometChatThreadedMessages/resources/right-arrow.png +0 -0
- package/src/CometChatThreadedMessages/style.ts +0 -29
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +0 -145
- package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +0 -60
- package/src/CometChatTransferOwnership/index.ts +0 -14
- package/src/CometChatUsers/UsersConfiguration.tsx +0 -59
- package/src/CometChatUsers/UsersStyle.ts +0 -101
- package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +0 -130
- package/src/CometChatUsersWithMessages/index.ts +0 -6
- package/src/CometChatUsersWithMessages/styles.ts +0 -15
- package/src/calls/CallingDetailsUtils.tsx +0 -158
- package/src/calls/CallingExtentionDecorator.tsx +0 -222
- package/src/calls/CometChatCallBubble/CallBubbleConfiguration.ts +0 -23
- package/src/calls/CometChatCallBubble/CallBubbleStyle.ts +0 -47
- package/src/calls/CometChatCallButtons/CallButtonStyle.ts +0 -35
- package/src/calls/CometChatCallButtons/resources/Call.png +0 -0
- package/src/calls/CometChatCallButtons/resources/Video.png +0 -0
- package/src/calls/CometChatCallButtons/resources/index.ts +0 -9
- package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +0 -118
- package/src/calls/CometChatCallLogDetails/CallLogDetailsStyle.ts +0 -36
- package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +0 -309
- package/src/calls/CometChatCallLogDetails/index.ts +0 -23
- package/src/calls/CometChatCallLogDetails/resources/CloseIcon.png +0 -0
- package/src/calls/CometChatCallLogDetails/resources/index.ts +0 -5
- package/src/calls/CometChatCallLogDetails/style.ts +0 -15
- package/src/calls/CometChatCallLogHistory/CallLogHistoryConfiguration.ts +0 -67
- package/src/calls/CometChatCallLogHistory/CallLogHistoryStyle.ts +0 -46
- package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +0 -350
- package/src/calls/CometChatCallLogHistory/index.ts +0 -23
- package/src/calls/CometChatCallLogHistory/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Call.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Info.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Selection.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Spineer.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Video.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/check.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/incomingcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/incomingvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/index.ts +0 -42
- package/src/calls/CometChatCallLogHistory/resources/missedcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/missedvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/outgoingcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/outgoingvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/style.ts +0 -24
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +0 -63
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsStyle.ts +0 -59
- package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +0 -221
- package/src/calls/CometChatCallLogParticipants/index.ts +0 -23
- package/src/calls/CometChatCallLogParticipants/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogParticipants/resources/index.ts +0 -5
- package/src/calls/CometChatCallLogParticipants/style.ts +0 -24
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +0 -65
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsStyle.ts +0 -63
- package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +0 -254
- package/src/calls/CometChatCallLogRecordings/index.ts +0 -23
- package/src/calls/CometChatCallLogRecordings/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/download.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/index.ts +0 -8
- package/src/calls/CometChatCallLogRecordings/style.ts +0 -24
- package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +0 -89
- package/src/calls/CometChatCallLogs/CallLogsStyle.ts +0 -95
- package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +0 -10
- package/src/calls/CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx +0 -56
- package/src/calls/CometChatCallLogsWithDetails/index.ts +0 -5
- package/src/calls/CometChatCallLogsWithDetails/style.ts +0 -11
- package/src/calls/CometChatIncomingCall/IncomingCallStyle.ts +0 -75
- package/src/calls/CometChatIncomingCall/styles.ts +0 -10
- package/src/calls/CometChatOngoingCall/OngoingCallStyle.ts +0 -25
- package/src/calls/CometChatOutgoingCall/OutgoingCallStyle.ts +0 -39
- package/src/extensions/CollaborativeBubble/CollaborativeBubbleStyle.ts +0 -97
- package/src/extensions/CollaborativeBubble/styles.ts +0 -82
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +0 -26
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +0 -26
- package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +0 -82
- package/src/extensions/ImageModeration/ImageModerationExtension.tsx +0 -43
- package/src/extensions/ImageModeration/ImageModerationFilter.tsx +0 -145
- package/src/extensions/ImageModeration/index.ts +0 -18
- package/src/extensions/ImageModeration/resources/index.ts +0 -4
- package/src/extensions/ImageModeration/resources/unsafe.png +0 -0
- package/src/extensions/LinkPreview/LInkPreviewBubbleStyle.ts +0 -28
- package/src/extensions/LinkPreview/LinkPreviewConfiguration.ts +0 -27
- package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +0 -25
- package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +0 -55
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +0 -144
- package/src/extensions/SmartReplies/SmartRepliesExtension.tsx +0 -52
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +0 -213
- package/src/extensions/SmartReplies/index.ts +0 -7
- package/src/extensions/SmartReplies/resources/close.png +0 -0
- package/src/extensions/SmartReplies/resources/index.ts +0 -6
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardStyle.ts +0 -52
- package/src/extensions/Stickers/StickerStyle.ts +0 -15
- package/src/extensions/TextModeration/TextModerationConfiguration.tsx +0 -25
- package/src/extensions/TextModeration/TextModerationExtension.tsx +0 -51
- package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +0 -93
- package/src/extensions/TextModeration/index.ts +0 -6
- package/src/shared/CometChatContext.tsx +0 -43
- package/src/shared/helper/SwipeRow.js +0 -944
- package/src/shared/libs/CometChatCalendar/Calendars/BaseCalendar.tsx +0 -229
- package/src/shared/libs/CometChatCalendar/Calendars/DateSelectionCalendar.tsx +0 -90
- package/src/shared/libs/CometChatCalendar/Calendars/MultiDateSelectionCalendar.tsx +0 -108
- package/src/shared/libs/CometChatCalendar/Calendars/Providers.tsx +0 -27
- package/src/shared/libs/CometChatCalendar/Calendars/index.ts +0 -3
- package/src/shared/libs/CometChatCalendar/Components/Arrow.tsx +0 -46
- package/src/shared/libs/CometChatCalendar/Components/Day.tsx +0 -95
- package/src/shared/libs/CometChatCalendar/Components/Days.tsx +0 -110
- package/src/shared/libs/CometChatCalendar/Components/Month.tsx +0 -47
- package/src/shared/libs/CometChatCalendar/Components/Months.tsx +0 -79
- package/src/shared/libs/CometChatCalendar/Components/Title.tsx +0 -47
- package/src/shared/libs/CometChatCalendar/Components/Weekdays.tsx +0 -29
- package/src/shared/libs/CometChatCalendar/Components/index.ts +0 -7
- package/src/shared/libs/CometChatCalendar/Constants/View.ts +0 -4
- package/src/shared/libs/CometChatCalendar/Constants/index.ts +0 -1
- package/src/shared/libs/CometChatCalendar/Contexts/LocaleContext.tsx +0 -7
- package/src/shared/libs/CometChatCalendar/Contexts/ThemeContext.tsx +0 -7
- package/src/shared/libs/CometChatCalendar/Contexts/index.ts +0 -2
- package/src/shared/libs/CometChatCalendar/Entities/ArrowDirections.ts +0 -1
- package/src/shared/libs/CometChatCalendar/Entities/Calendar.ts +0 -26
- package/src/shared/libs/CometChatCalendar/Entities/Components.ts +0 -13
- package/src/shared/libs/CometChatCalendar/Entities/DateProperties.ts +0 -6
- package/src/shared/libs/CometChatCalendar/Entities/Locale.ts +0 -12
- package/src/shared/libs/CometChatCalendar/Entities/Theme.ts +0 -70
- package/src/shared/libs/CometChatCalendar/Entities/index.ts +0 -6
- package/src/shared/libs/CometChatCalendar/Hooks/index.ts +0 -1
- package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.ts +0 -63
- package/src/shared/libs/CometChatCalendar/Icons/BackArrow.png +0 -0
- package/src/shared/libs/CometChatCalendar/Icons/chevron-left-16.png +0 -0
- package/src/shared/libs/CometChatCalendar/Icons/index.ts +0 -7
- package/src/shared/libs/CometChatCalendar/Locales/index.ts +0 -4
- package/src/shared/libs/CometChatCalendar/Themes/Colors.ts +0 -31
- package/src/shared/libs/CometChatCalendar/Themes/DarkTheme.ts +0 -79
- package/src/shared/libs/CometChatCalendar/Themes/DefaultTheme.ts +0 -164
- package/src/shared/libs/CometChatCalendar/Themes/index.ts +0 -3
- package/src/shared/libs/CometChatCalendar/Utils/addOpacity.ts +0 -15
- package/src/shared/libs/CometChatCalendar/Utils/checkChangedProps.ts +0 -10
- package/src/shared/libs/CometChatCalendar/Utils/clamp.ts +0 -5
- package/src/shared/libs/CometChatCalendar/Utils/dateRange.ts +0 -23
- package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.ts +0 -25
- package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.ts +0 -20
- package/src/shared/libs/CometChatCalendar/Utils/index.ts +0 -6
- package/src/shared/libs/CometChatCalendar/index.ts +0 -5
- package/src/shared/libs/VideoPlayer/Video.js +0 -494
- package/src/shared/libs/VideoPlayerControls/OSSupport/PlatformSupport.tsx +0 -43
- package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +0 -17
- package/src/shared/libs/VideoPlayerControls/OSSupport/index.tsx +0 -1
- package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +0 -512
- package/src/shared/libs/VideoPlayerControls/assets/img/back.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/error-icon.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/expand.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/expand@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/expand@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/forward.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/forward@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/forward@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/pause.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/pause@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/pause@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/play.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/play@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/play@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/rewind.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/rewind@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/rewind@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/shrink.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/shrink@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/shrink@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/volume.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/volume@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/volume@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/components/Back/Back.tsx +0 -28
- package/src/shared/libs/VideoPlayerControls/components/Back/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/BottomControls.tsx +0 -142
- package/src/shared/libs/VideoPlayerControls/components/Control.tsx +0 -45
- package/src/shared/libs/VideoPlayerControls/components/Error/Error.tsx +0 -22
- package/src/shared/libs/VideoPlayerControls/components/Error/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Error/styles.ts +0 -21
- package/src/shared/libs/VideoPlayerControls/components/Fullscreen.tsx +0 -36
- package/src/shared/libs/VideoPlayerControls/components/Loader/Loader.tsx +0 -15
- package/src/shared/libs/VideoPlayerControls/components/Loader/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Loader/styles.ts +0 -16
- package/src/shared/libs/VideoPlayerControls/components/NullControl.tsx +0 -7
- package/src/shared/libs/VideoPlayerControls/components/Overlay.tsx +0 -23
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/PlayPause.tsx +0 -109
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/styles.ts +0 -21
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/Seekbar.tsx +0 -47
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/styles.ts +0 -37
- package/src/shared/libs/VideoPlayerControls/components/Timer/Timer.tsx +0 -28
- package/src/shared/libs/VideoPlayerControls/components/Timer/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Timer/styles.ts +0 -12
- package/src/shared/libs/VideoPlayerControls/components/Title.tsx +0 -35
- package/src/shared/libs/VideoPlayerControls/components/TopControls.tsx +0 -110
- package/src/shared/libs/VideoPlayerControls/components/Volume/Volume.tsx +0 -37
- package/src/shared/libs/VideoPlayerControls/components/Volume/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Volume/styles.ts +0 -31
- package/src/shared/libs/VideoPlayerControls/components/index.ts +0 -14
- package/src/shared/libs/VideoPlayerControls/components/styles.ts +0 -30
- package/src/shared/libs/VideoPlayerControls/hooks/index.ts +0 -3
- package/src/shared/libs/VideoPlayerControls/hooks/useAnimations.ts +0 -68
- package/src/shared/libs/VideoPlayerControls/hooks/useControlTimeout.tsx +0 -67
- package/src/shared/libs/VideoPlayerControls/hooks/usePanResponders.tsx +0 -96
- package/src/shared/libs/VideoPlayerControls/index.ts +0 -4
- package/src/shared/libs/VideoPlayerControls/styles.ts +0 -19
- package/src/shared/libs/VideoPlayerControls/types.ts +0 -290
- package/src/shared/libs/VideoPlayerControls/utils.ts +0 -76
- package/src/shared/libs/datePickerModal/DateTimePickerModal.android.js +0 -75
- package/src/shared/libs/datePickerModal/DateTimePickerModal.ios.js +0 -363
- package/src/shared/libs/datePickerModal/DateTimePickerModal.js +0 -9
- package/src/shared/libs/datePickerModal/Modal.js +0 -180
- package/src/shared/libs/datePickerModal/index.d.ts +0 -310
- package/src/shared/libs/datePickerModal/index.js +0 -5
- package/src/shared/libs/datePickerModal/utils.js +0 -25
- package/src/shared/libs/luxon/src/datetime.js +0 -2422
- package/src/shared/libs/luxon/src/duration.js +0 -990
- package/src/shared/libs/luxon/src/errors.js +0 -61
- package/src/shared/libs/luxon/src/impl/conversions.js +0 -206
- package/src/shared/libs/luxon/src/impl/diff.js +0 -95
- package/src/shared/libs/luxon/src/impl/digits.js +0 -75
- package/src/shared/libs/luxon/src/impl/english.js +0 -233
- package/src/shared/libs/luxon/src/impl/formats.js +0 -176
- package/src/shared/libs/luxon/src/impl/formatter.js +0 -409
- package/src/shared/libs/luxon/src/impl/invalid.js +0 -14
- package/src/shared/libs/luxon/src/impl/locale.js +0 -542
- package/src/shared/libs/luxon/src/impl/regexParser.js +0 -335
- package/src/shared/libs/luxon/src/impl/tokenParser.js +0 -473
- package/src/shared/libs/luxon/src/impl/util.js +0 -309
- package/src/shared/libs/luxon/src/impl/zoneUtil.js +0 -30
- package/src/shared/libs/luxon/src/info.js +0 -205
- package/src/shared/libs/luxon/src/interval.js +0 -657
- package/src/shared/libs/luxon/src/luxon.js +0 -26
- package/src/shared/libs/luxon/src/package.json +0 -4
- package/src/shared/libs/luxon/src/settings.js +0 -175
- package/src/shared/libs/luxon/src/zone.js +0 -91
- package/src/shared/libs/luxon/src/zones/IANAZone.js +0 -189
- package/src/shared/libs/luxon/src/zones/fixedOffsetZone.js +0 -102
- package/src/shared/libs/luxon/src/zones/invalidZone.js +0 -53
- package/src/shared/libs/luxon/src/zones/systemZone.js +0 -61
- package/src/shared/modals/CometChatCallLogDetailsOptions.ts +0 -23
- package/src/shared/modals/CometChatCallLogDetailsTemplate.ts +0 -16
- package/src/shared/modals/CometChatDetailsOption.ts +0 -24
- package/src/shared/modals/CometChatDetailsTemplate.ts +0 -16
- package/src/shared/modals/CometChatOptions.ts +0 -13
- package/src/shared/modals/InteractiveData/InteractiveActions/APIAction.ts +0 -118
- package/src/shared/modals/InteractiveData/InteractiveActions/CustomAction.ts +0 -19
- package/src/shared/modals/InteractiveData/InteractiveActions/URLNavigationAction.ts +0 -34
- package/src/shared/modals/InteractiveData/InteractiveActions/index.ts +0 -3
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveCardData.ts +0 -69
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveFormData.ts +0 -119
- package/src/shared/modals/InteractiveData/InteractiveData/index.ts +0 -2
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInputElement.ts +0 -102
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInteractiveElement.ts +0 -45
- package/src/shared/modals/InteractiveData/InteractiveElements/ButtonElement.ts +0 -61
- package/src/shared/modals/InteractiveData/InteractiveElements/CheckboxElement.ts +0 -75
- package/src/shared/modals/InteractiveData/InteractiveElements/DateTimeElement.ts +0 -103
- package/src/shared/modals/InteractiveData/InteractiveElements/DropdownElement.ts +0 -83
- package/src/shared/modals/InteractiveData/InteractiveElements/LabelElement.ts +0 -32
- package/src/shared/modals/InteractiveData/InteractiveElements/OptionElement.ts +0 -39
- package/src/shared/modals/InteractiveData/InteractiveElements/RadioButtonElement.ts +0 -76
- package/src/shared/modals/InteractiveData/InteractiveElements/SingleSelectElement.ts +0 -76
- package/src/shared/modals/InteractiveData/InteractiveElements/TextInputElement.ts +0 -101
- package/src/shared/modals/InteractiveData/InteractiveElements/index.ts +0 -11
- package/src/shared/modals/InteractiveData/InteractiveEntities/ActionEntity.ts +0 -41
- package/src/shared/modals/InteractiveData/InteractiveEntities/ElementEntity.ts +0 -66
- package/src/shared/modals/InteractiveData/InteractiveEntities/index.ts +0 -2
- package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +0 -143
- package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +0 -39
- package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +0 -153
- package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +0 -150
- package/src/shared/modals/InteractiveData/InteractiveMessage/index.ts +0 -4
- package/src/shared/modals/InteractiveData/index.ts +0 -30
- package/src/shared/resources/CometChatTheme/CometChatTheme.ts +0 -28
- package/src/shared/resources/CometChatTheme/Palette.ts +0 -584
- package/src/shared/resources/CometChatTheme/Typography.ts +0 -396
- package/src/shared/resources/CometChatTheme/index.ts +0 -2
- package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +0 -124
- package/src/shared/utils/CometChatLiveReactions/LiveReactionstyles.ts +0 -37
- package/src/shared/utils/CometChatLiveReactions/index.ts +0 -1
- package/src/shared/utils/CometChatLiveReactions/resources/heart.png +0 -0
- package/src/shared/utils/CometChatLiveReactions/resources/index.ts +0 -5
- package/src/shared/utils/CometChatLiveReactions/style.ts +0 -8
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +0 -109
- package/src/shared/utils/CometChatMessagePreview/MessagePreviewConfiguration.js +0 -30
- package/src/shared/utils/CometChatMessagePreview/style.js +0 -71
- package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +0 -399
- package/src/shared/utils/DetailsUtils/resources/Back.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/banIcon.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/close.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/index.ts +0 -23
- package/src/shared/utils/DetailsUtils/resources/kickIcon.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/password.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/private.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/right-arrow.png +0 -0
- package/src/shared/utils/InteractiveMessageUtils.ts +0 -60
- package/src/shared/utils/SchedulerUtils.ts +0 -198
- package/src/shared/utils/TypeUtils.ts +0 -3
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +0 -61
- package/src/shared/views/CometChatAudioBubble/AudioBubbleStyle.ts +0 -43
- package/src/shared/views/CometChatAvatar/AvatarConfiguration.ts +0 -27
- package/src/shared/views/CometChatAvatar/AvatarStyle.ts +0 -57
- package/src/shared/views/CometChatAvatar/resources/default.jpg +0 -0
- package/src/shared/views/CometChatAvatar/resources/index.ts +0 -5
- package/src/shared/views/CometChatBadge/BadgeConfiguration.ts +0 -55
- package/src/shared/views/CometChatBadge/BadgeStyle.ts +0 -39
- package/src/shared/views/CometChatBottomSheet/style.ts +0 -50
- package/src/shared/views/CometChatButton/CometChatButton.tsx +0 -76
- package/src/shared/views/CometChatButton/CometChatButtonStyle.ts +0 -47
- package/src/shared/views/CometChatButton/index.ts +0 -5
- package/src/shared/views/CometChatButton/style.ts +0 -8
- package/src/shared/views/CometChatCard/CometChatCard.tsx +0 -77
- package/src/shared/views/CometChatCard/CometChatCardStyle.ts +0 -31
- package/src/shared/views/CometChatCard/index.ts +0 -8
- package/src/shared/views/CometChatCard/style.ts +0 -13
- package/src/shared/views/CometChatCardBubble/CardBubbleStyle.tsx +0 -47
- package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +0 -174
- package/src/shared/views/CometChatCardBubble/index.tsx +0 -2
- package/src/shared/views/CometChatCheckBox/CheckBoxStyle.tsx +0 -43
- package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +0 -79
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +0 -36
- package/src/shared/views/CometChatDate/DateConfiguration.ts +0 -32
- package/src/shared/views/CometChatDate/DateStyle.ts +0 -26
- package/src/shared/views/CometChatDate/style.ts +0 -8
- package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +0 -206
- package/src/shared/views/CometChatDateTimePicker/DateTimePickerStyle.ts +0 -19
- package/src/shared/views/CometChatDateTimePicker/index.ts +0 -3
- package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +0 -127
- package/src/shared/views/CometChatDropDown/DropDownStyle.tsx +0 -39
- package/src/shared/views/CometChatDropDown/resources/downArrowIcon.png +0 -0
- package/src/shared/views/CometChatDropDown/resources/index.js +0 -5
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +0 -27
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +0 -44
- package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +0 -58
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +0 -542
- package/src/shared/views/CometChatFormBubble/FormBubbleStyle.tsx +0 -96
- package/src/shared/views/CometChatFormBubble/index.tsx +0 -2
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +0 -34
- package/src/shared/views/CometChatImageBubble/assets/default_image.png +0 -0
- package/src/shared/views/CometChatLabel/CometChatLabel.tsx +0 -27
- package/src/shared/views/CometChatLabel/LabelStyle.ts +0 -19
- package/src/shared/views/CometChatList/resources/Back.png +0 -0
- package/src/shared/views/CometChatList/resources/Search.png +0 -0
- package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +0 -21
- package/src/shared/views/CometChatListItem/ListItemStyle.ts +0 -47
- package/src/shared/views/CometChatMediaRecorder/MediaRecorderStyle.ts +0 -63
- package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +0 -26
- package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +0 -13
- package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +0 -66
- package/src/shared/views/CometChatQuickView/QuickViewStyle.ts +0 -55
- package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +0 -67
- package/src/shared/views/CometChatRadioButton/RadioButtonStyle.tsx +0 -38
- package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +0 -15
- package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +0 -13
- package/src/shared/views/CometChatReactions/ReactionsStyle.tsx +0 -43
- package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +0 -65
- package/src/shared/views/CometChatReceipt/ReceiptStyle.ts +0 -3
- package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +0 -1519
- package/src/shared/views/CometChatSchedulerBubble/index.ts +0 -3
- package/src/shared/views/CometChatSchedulerBubble/styles.ts +0 -92
- package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +0 -63
- package/src/shared/views/CometChatSingleSelect/SingleStyle.tsx +0 -35
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +0 -25
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorStyle.ts +0 -37
- package/src/shared/views/CometChatSuggestionList/SuggestionListConfiguration.ts +0 -23
- package/src/shared/views/CometChatTextBubble/TextBubbleStyle.ts +0 -37
- package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +0 -67
- package/src/shared/views/CometChatTextInput/TextInputStyle.tsx +0 -26
- package/src/shared/views/CometChatTimeSlotSelector/CometChatTimeSlotSelector.tsx +0 -113
- package/src/shared/views/CometChatTimeSlotSelector/index.ts +0 -3
- package/src/shared/views/CometChatTimeSlotSelector/styles.ts +0 -30
- package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +0 -87
- package/src/shared/views/SwipeRow/SwipeRow.tsx +0 -126
- package/src/shared/views/SwipeRow/index.ts +0 -3
- package/src/shared/views/SwipeRow/style.ts +0 -30
- /package/src/{shared/assets/images → CometChatGroups/resources}/search.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/Back.png +0 -0
- /package/src/{AI/AIConversationSummary → CometChatThreadHeader}/resources/close.png +0 -0
- /package/src/{CometChatThreadedMessages → CometChatThreadHeader}/resources/more.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/password.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/private.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/right-arrow.png +0 -0
|
@@ -1,950 +1,1447 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
//@ts-ignore
|
|
3
2
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
4
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CometChatMentionsFormatter,
|
|
5
|
+
CometChatTextFormatter,
|
|
6
|
+
CometChatUIKit,
|
|
7
|
+
CometChatUrlsFormatter,
|
|
8
|
+
} from "../..";
|
|
9
|
+
import { CometChatTheme } from "../../theme/type";
|
|
10
|
+
import { AdditionalParams, MessageBubbleAlignmentType } from "../base/Types";
|
|
11
|
+
import {
|
|
12
|
+
CometChatMessageTypes,
|
|
13
|
+
GroupMemberScope,
|
|
14
|
+
MentionsTargetElement,
|
|
15
|
+
MessageCategoryConstants,
|
|
16
|
+
MessageOptionConstants,
|
|
17
|
+
MessageTypeConstants,
|
|
18
|
+
} from "../constants/UIKitConstants";
|
|
19
|
+
import { CometChatMessageComposerAction } from "../helper/types";
|
|
20
|
+
import { Icon } from "../icons/Icon";
|
|
5
21
|
import { CometChatMessageOption } from "../modals/CometChatMessageOption";
|
|
6
22
|
import { CometChatMessageTemplate } from "../modals/CometChatMessageTemplate";
|
|
7
|
-
import { DataSource } from "./DataSource";
|
|
8
23
|
import { localize } from "../resources/CometChatLocalize";
|
|
9
|
-
import { CometChatTextBubble } from "../views/CometChatTextBubble"
|
|
10
|
-
import { CometChatVideoBubble, VideoBubbleStyleInterface } from "../views/CometChatVideoBubble";
|
|
11
|
-
import { CometChatTheme } from "../resources/CometChatTheme";
|
|
12
|
-
import { CometChatImageBubble, ImageBubbleStyleInterface } from "../views/CometChatImageBubble";
|
|
13
|
-
import { AudioBubbleStyleInterface, CometChatAudioBubble } from "../views/CometChatAudioBubble";
|
|
14
|
-
import { CometChatFileBubble, FileBubbleStyleInterface } from "../views/CometChatFileBubble";
|
|
15
|
-
import { ChatConfigurator } from "./ChatConfigurator";
|
|
16
|
-
import { CometChatMessageComposerActionInterface } from "../helper/types";
|
|
17
|
-
import { ICONS } from "./resources";
|
|
18
24
|
import { CometChatConversationUtils } from "../utils/conversationUtils";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
25
|
+
import { CometChatAudioBubble } from "../views/CometChatAudioBubble";
|
|
26
|
+
import { CometChatDeletedBubble } from "../views/CometChatDeletedBubble";
|
|
27
|
+
import { CometChatFileBubble } from "../views/CometChatFileBubble";
|
|
28
|
+
import { CometChatImageBubble } from "../views/CometChatImageBubble";
|
|
29
|
+
import { CometChatTextBubble } from "../views/CometChatTextBubble";
|
|
30
|
+
import { CometChatVideoBubble } from "../views/CometChatVideoBubble";
|
|
31
|
+
import { ChatConfigurator } from "./ChatConfigurator";
|
|
32
|
+
import { DataSource } from "./DataSource";
|
|
26
33
|
import { CommonUtils } from "../utils/CommonUtils";
|
|
27
|
-
import {
|
|
28
|
-
import { AdditionalBubbleStylingParams, MessageBubbleAlignmentType } from "../base/Types";
|
|
29
|
-
import { MessageUtils } from "../utils/MessageUtils";
|
|
34
|
+
import { DimensionValue, ViewStyle } from "react-native";
|
|
30
35
|
|
|
31
36
|
function isAudioMessage(message: CometChat.BaseMessage): message is CometChat.MediaMessage {
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
return (
|
|
38
|
+
message.getCategory() == CometChat.CATEGORY_MESSAGE &&
|
|
39
|
+
message.getType() == CometChat.MESSAGE_TYPE.AUDIO
|
|
40
|
+
);
|
|
34
41
|
}
|
|
35
42
|
|
|
36
43
|
function isVideoMessage(message: CometChat.BaseMessage): message is CometChat.MediaMessage {
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
return (
|
|
45
|
+
message.getCategory() == CometChat.CATEGORY_MESSAGE &&
|
|
46
|
+
message.getType() == CometChat.MESSAGE_TYPE.VIDEO
|
|
47
|
+
);
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
function isFileMessage(message: CometChat.BaseMessage): message is CometChat.MediaMessage {
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
return (
|
|
52
|
+
message.getCategory() == CometChat.CATEGORY_MESSAGE &&
|
|
53
|
+
message.getType() == CometChat.MESSAGE_TYPE.FILE
|
|
54
|
+
);
|
|
44
55
|
}
|
|
45
56
|
|
|
46
57
|
function isActionMessage(message: CometChat.BaseMessage): message is CometChat.Action {
|
|
47
|
-
|
|
58
|
+
return message.getCategory() == CometChat.CATEGORY_ACTION;
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
function isTextMessage(message: CometChat.BaseMessage): message is CometChat.TextMessage {
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
return (
|
|
63
|
+
message.getCategory() == CometChat.CATEGORY_MESSAGE &&
|
|
64
|
+
message.getType() == CometChat.MESSAGE_TYPE.TEXT
|
|
65
|
+
);
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
function isImageMessage(message: CometChat.BaseMessage): message is CometChat.MediaMessage {
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
return (
|
|
70
|
+
message.getCategory() == CometChat.CATEGORY_MESSAGE &&
|
|
71
|
+
message.getType() == CometChat.MESSAGE_TYPE.IMAGE
|
|
72
|
+
);
|
|
58
73
|
}
|
|
59
74
|
|
|
60
75
|
function isDeletedMessage(message: CometChat.BaseMessage): boolean {
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function isMessageSent(message: CometChat.BaseMessage): boolean {
|
|
65
|
-
return message.getSentAt() ? true : false;
|
|
76
|
+
return message.getDeletedBy() != null;
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
export class MessageDataSource implements DataSource {
|
|
80
|
+
getEditOption(theme: CometChatTheme): CometChatMessageOption {
|
|
81
|
+
return {
|
|
82
|
+
id: MessageOptionConstants.editMessage,
|
|
83
|
+
title: localize("EDIT"),
|
|
84
|
+
icon: (
|
|
85
|
+
<Icon
|
|
86
|
+
name='edit'
|
|
87
|
+
color={
|
|
88
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
|
|
89
|
+
}
|
|
90
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
91
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
92
|
+
containerStyle={
|
|
93
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
94
|
+
}
|
|
95
|
+
></Icon>
|
|
96
|
+
),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
getDeleteOption(theme: CometChatTheme): CometChatMessageOption {
|
|
101
|
+
return {
|
|
102
|
+
id: MessageOptionConstants.deleteMessage,
|
|
103
|
+
title: localize("DELETE"),
|
|
104
|
+
icon: (
|
|
105
|
+
<Icon
|
|
106
|
+
name='delete'
|
|
107
|
+
color={theme.color.error}
|
|
108
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
109
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
110
|
+
containerStyle={
|
|
111
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
112
|
+
}
|
|
113
|
+
></Icon>
|
|
114
|
+
),
|
|
115
|
+
style: {
|
|
116
|
+
titleStyle: {
|
|
117
|
+
color: theme.color.error,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
getReplyOption(theme: CometChatTheme): CometChatMessageOption {
|
|
123
|
+
return {
|
|
124
|
+
id: MessageOptionConstants.replyMessage,
|
|
125
|
+
title: localize("REPLY"),
|
|
126
|
+
icon: (
|
|
127
|
+
<Icon
|
|
128
|
+
name='reply'
|
|
129
|
+
color={
|
|
130
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
|
|
131
|
+
}
|
|
132
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
133
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
134
|
+
containerStyle={
|
|
135
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
136
|
+
}
|
|
137
|
+
></Icon>
|
|
138
|
+
),
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
getReplyInThreadOption(theme: CometChatTheme): CometChatMessageOption {
|
|
142
|
+
return {
|
|
143
|
+
id: MessageOptionConstants.replyInThread,
|
|
144
|
+
title: localize("REPLY_IN_THREAD"),
|
|
145
|
+
icon: (
|
|
146
|
+
<Icon
|
|
147
|
+
name='subdirectory-arrow-right'
|
|
148
|
+
color={
|
|
149
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
|
|
150
|
+
}
|
|
151
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
152
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
153
|
+
containerStyle={
|
|
154
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
155
|
+
}
|
|
156
|
+
></Icon>
|
|
157
|
+
),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
getShareOption(theme: CometChatTheme): CometChatMessageOption {
|
|
161
|
+
return {
|
|
162
|
+
id: MessageOptionConstants.shareMessage,
|
|
163
|
+
title: localize("SHARE"),
|
|
164
|
+
icon: (
|
|
165
|
+
<Icon
|
|
166
|
+
name='share'
|
|
167
|
+
color={
|
|
168
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
|
|
169
|
+
}
|
|
170
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
171
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
172
|
+
containerStyle={
|
|
173
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
174
|
+
}
|
|
175
|
+
></Icon>
|
|
176
|
+
),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
getCopyOption(theme: CometChatTheme): CometChatMessageOption {
|
|
180
|
+
return {
|
|
181
|
+
id: MessageOptionConstants.copyMessage,
|
|
182
|
+
title: localize("COPY"),
|
|
183
|
+
icon: (
|
|
184
|
+
<Icon
|
|
185
|
+
name='content-copy'
|
|
186
|
+
color={
|
|
187
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
|
|
188
|
+
}
|
|
189
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
190
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
191
|
+
containerStyle={
|
|
192
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
193
|
+
}
|
|
194
|
+
></Icon>
|
|
195
|
+
),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
// getForwardOption(): CometChatMessageOption {
|
|
199
|
+
// return {
|
|
200
|
+
// id: MessageOptionConstants.forwardMessage,
|
|
201
|
+
// title: localize("FORWARD"),
|
|
202
|
+
// icon: ICONS.FORWARD
|
|
203
|
+
// }
|
|
204
|
+
// }
|
|
205
|
+
getInformationOption(theme: CometChatTheme): CometChatMessageOption {
|
|
206
|
+
return {
|
|
207
|
+
id: MessageOptionConstants.messageInformation,
|
|
208
|
+
title: localize("INFO"),
|
|
209
|
+
icon: (
|
|
210
|
+
<Icon
|
|
211
|
+
name='info'
|
|
212
|
+
color={
|
|
213
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
|
|
214
|
+
}
|
|
215
|
+
height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
|
|
216
|
+
width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
|
|
217
|
+
containerStyle={
|
|
218
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
219
|
+
}
|
|
220
|
+
></Icon>
|
|
221
|
+
),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
getPrivateMessageOption(theme: CometChatTheme): CometChatMessageOption {
|
|
226
|
+
return {
|
|
227
|
+
id: MessageOptionConstants.sendMessagePrivately,
|
|
228
|
+
title: localize("MESSAGE_PRIVATELY"),
|
|
229
|
+
icon: (
|
|
230
|
+
<Icon
|
|
231
|
+
name='reply'
|
|
232
|
+
imageStyle={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle}
|
|
233
|
+
containerStyle={
|
|
234
|
+
theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
|
|
235
|
+
}
|
|
236
|
+
></Icon>
|
|
237
|
+
),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
isSentByMe(loggedInUser: CometChat.User, message: CometChat.BaseMessage) {
|
|
242
|
+
if (!loggedInUser) return false;
|
|
243
|
+
return loggedInUser.getUid() == message?.getSender()?.getUid();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
getTextMessageOptions(
|
|
247
|
+
loggedInUser: CometChat.User,
|
|
248
|
+
messageObject: CometChat.BaseMessage,
|
|
249
|
+
theme: CometChatTheme,
|
|
250
|
+
group?: CometChat.Group
|
|
251
|
+
): CometChatMessageOption[] {
|
|
252
|
+
let messageOptionList: CometChatMessageOption[] = [];
|
|
253
|
+
|
|
254
|
+
if (isDeletedMessage(messageObject)) return messageOptionList;
|
|
255
|
+
|
|
256
|
+
if (
|
|
257
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.replyInThread, group)
|
|
258
|
+
) {
|
|
259
|
+
messageOptionList.push(this.getReplyInThreadOption(theme));
|
|
260
|
+
}
|
|
69
261
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
icon: ICONS.EDIT
|
|
75
|
-
}
|
|
262
|
+
if (
|
|
263
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.shareMessage, group)
|
|
264
|
+
) {
|
|
265
|
+
messageOptionList.push(this.getShareOption(theme));
|
|
76
266
|
}
|
|
77
267
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
268
|
+
messageOptionList.push(this.getCopyOption(theme));
|
|
269
|
+
|
|
270
|
+
if (
|
|
271
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.editMessage, group)
|
|
272
|
+
) {
|
|
273
|
+
messageOptionList.push(this.getEditOption(theme));
|
|
84
274
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
275
|
+
|
|
276
|
+
if (
|
|
277
|
+
this.validateOption(
|
|
278
|
+
loggedInUser,
|
|
279
|
+
messageObject,
|
|
280
|
+
MessageOptionConstants.messageInformation,
|
|
281
|
+
group
|
|
282
|
+
)
|
|
283
|
+
) {
|
|
284
|
+
messageOptionList.push(this.getInformationOption(theme));
|
|
91
285
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
286
|
+
|
|
287
|
+
if (
|
|
288
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.deleteMessage, group)
|
|
289
|
+
) {
|
|
290
|
+
messageOptionList.push(this.getDeleteOption(theme));
|
|
98
291
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
292
|
+
|
|
293
|
+
if (
|
|
294
|
+
this.validateOption(
|
|
295
|
+
loggedInUser,
|
|
296
|
+
messageObject,
|
|
297
|
+
MessageOptionConstants.sendMessagePrivately,
|
|
298
|
+
group
|
|
299
|
+
)
|
|
300
|
+
) {
|
|
301
|
+
messageOptionList.push(this.getPrivateMessageOption(theme));
|
|
105
302
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
303
|
+
|
|
304
|
+
return messageOptionList;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
getAudioMessageOptions(
|
|
308
|
+
loggedInUser: CometChat.User,
|
|
309
|
+
messageObject: CometChat.BaseMessage,
|
|
310
|
+
theme: CometChatTheme,
|
|
311
|
+
group?: CometChat.Group
|
|
312
|
+
): CometChatMessageOption[] {
|
|
313
|
+
let optionsList: Array<CometChatMessageOption> = [];
|
|
314
|
+
if (!isDeletedMessage(messageObject))
|
|
315
|
+
optionsList.push(
|
|
316
|
+
...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group)
|
|
317
|
+
);
|
|
318
|
+
return optionsList;
|
|
319
|
+
}
|
|
320
|
+
getVideoMessageOptions(
|
|
321
|
+
loggedInUser: CometChat.User,
|
|
322
|
+
messageObject: CometChat.BaseMessage,
|
|
323
|
+
theme: CometChatTheme,
|
|
324
|
+
group?: CometChat.Group
|
|
325
|
+
): CometChatMessageOption[] {
|
|
326
|
+
let optionsList: Array<CometChatMessageOption> = [];
|
|
327
|
+
if (!isDeletedMessage(messageObject))
|
|
328
|
+
optionsList.push(
|
|
329
|
+
...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group)
|
|
330
|
+
);
|
|
331
|
+
return optionsList;
|
|
332
|
+
}
|
|
333
|
+
getImageMessageOptions(
|
|
334
|
+
loggedInUser: CometChat.User,
|
|
335
|
+
messageObject: CometChat.BaseMessage,
|
|
336
|
+
theme: CometChatTheme,
|
|
337
|
+
group?: CometChat.Group
|
|
338
|
+
): CometChatMessageOption[] {
|
|
339
|
+
let optionsList: Array<CometChatMessageOption> = [];
|
|
340
|
+
if (!isDeletedMessage(messageObject))
|
|
341
|
+
optionsList.push(
|
|
342
|
+
...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group)
|
|
343
|
+
);
|
|
344
|
+
return optionsList;
|
|
345
|
+
}
|
|
346
|
+
getFileMessageOptions(
|
|
347
|
+
loggedInUser: CometChat.User,
|
|
348
|
+
messageObject: CometChat.BaseMessage,
|
|
349
|
+
theme: CometChatTheme,
|
|
350
|
+
group?: CometChat.Group
|
|
351
|
+
): CometChatMessageOption[] {
|
|
352
|
+
let optionsList: Array<CometChatMessageOption> = [];
|
|
353
|
+
if (!isDeletedMessage(messageObject))
|
|
354
|
+
optionsList.push(
|
|
355
|
+
...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group)
|
|
356
|
+
);
|
|
357
|
+
return optionsList;
|
|
358
|
+
}
|
|
359
|
+
getMessageOptions(
|
|
360
|
+
loggedInUser: CometChat.User,
|
|
361
|
+
messageObject: CometChat.BaseMessage,
|
|
362
|
+
theme: CometChatTheme,
|
|
363
|
+
group?: CometChat.Group
|
|
364
|
+
): CometChatMessageOption[] {
|
|
365
|
+
let optionsList: Array<CometChatMessageOption> = [];
|
|
366
|
+
if (isDeletedMessage(messageObject)) return optionsList;
|
|
367
|
+
if (messageObject.getCategory() == MessageCategoryConstants.message) {
|
|
368
|
+
let type: string = messageObject.getType();
|
|
369
|
+
switch (type) {
|
|
370
|
+
case MessageTypeConstants.audio:
|
|
371
|
+
optionsList.push(
|
|
372
|
+
...ChatConfigurator.dataSource.getAudioMessageOptions(
|
|
373
|
+
loggedInUser,
|
|
374
|
+
messageObject,
|
|
375
|
+
theme,
|
|
376
|
+
group
|
|
377
|
+
)
|
|
378
|
+
);
|
|
379
|
+
break;
|
|
380
|
+
case MessageTypeConstants.video:
|
|
381
|
+
optionsList.push(
|
|
382
|
+
...ChatConfigurator.dataSource.getVideoMessageOptions(
|
|
383
|
+
loggedInUser,
|
|
384
|
+
messageObject,
|
|
385
|
+
theme,
|
|
386
|
+
group
|
|
387
|
+
)
|
|
388
|
+
);
|
|
389
|
+
break;
|
|
390
|
+
case MessageTypeConstants.image:
|
|
391
|
+
optionsList.push(
|
|
392
|
+
...ChatConfigurator.dataSource.getImageMessageOptions(
|
|
393
|
+
loggedInUser,
|
|
394
|
+
messageObject,
|
|
395
|
+
theme,
|
|
396
|
+
group
|
|
397
|
+
)
|
|
398
|
+
);
|
|
399
|
+
break;
|
|
400
|
+
case MessageTypeConstants.text:
|
|
401
|
+
optionsList.push(
|
|
402
|
+
...ChatConfigurator.dataSource.getTextMessageOptions(
|
|
403
|
+
loggedInUser,
|
|
404
|
+
messageObject,
|
|
405
|
+
theme,
|
|
406
|
+
group
|
|
407
|
+
)
|
|
408
|
+
);
|
|
409
|
+
break;
|
|
410
|
+
case MessageTypeConstants.file:
|
|
411
|
+
optionsList.push(
|
|
412
|
+
...ChatConfigurator.dataSource.getFileMessageOptions(
|
|
413
|
+
loggedInUser,
|
|
414
|
+
messageObject,
|
|
415
|
+
theme,
|
|
416
|
+
group
|
|
417
|
+
)
|
|
418
|
+
);
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
} else if (messageObject.getCategory() == MessageCategoryConstants.custom) {
|
|
422
|
+
optionsList.push(
|
|
423
|
+
...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, theme, group)
|
|
424
|
+
);
|
|
425
|
+
} else if (messageObject.getCategory() == MessageCategoryConstants.interactive) {
|
|
426
|
+
let type: string = messageObject.getType();
|
|
427
|
+
//todo: unsupportedBubble
|
|
112
428
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
429
|
+
return optionsList;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
private validateOption(
|
|
433
|
+
loggedInUser: CometChat.User,
|
|
434
|
+
messageObject: CometChat.BaseMessage,
|
|
435
|
+
optionId: string,
|
|
436
|
+
group?: CometChat.Group | null
|
|
437
|
+
): boolean {
|
|
438
|
+
if (
|
|
439
|
+
MessageOptionConstants.replyInThread === optionId &&
|
|
440
|
+
(!messageObject.getParentMessageId() || messageObject.getParentMessageId() === 0)
|
|
441
|
+
) {
|
|
442
|
+
return true;
|
|
126
443
|
}
|
|
127
444
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
445
|
+
if (
|
|
446
|
+
MessageOptionConstants.shareMessage === optionId &&
|
|
447
|
+
(messageObject instanceof CometChat.TextMessage ||
|
|
448
|
+
messageObject instanceof CometChat.MediaMessage)
|
|
449
|
+
) {
|
|
450
|
+
return true;
|
|
134
451
|
}
|
|
135
452
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
453
|
+
if (
|
|
454
|
+
MessageOptionConstants.copyMessage === optionId &&
|
|
455
|
+
messageObject instanceof CometChat.TextMessage
|
|
456
|
+
) {
|
|
457
|
+
return true;
|
|
139
458
|
}
|
|
140
459
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
let messageOptionList: CometChatMessageOption[] = [];
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (isDeletedMessage(messageObject) || !isMessageSent(messageObject))
|
|
147
|
-
return messageOptionList;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (this.validateOption(loggedInUser, messageObject, MessageOptionConstants.replyInThread, group)) {
|
|
151
|
-
messageOptionList.push(this.getReplyInThreadOption());
|
|
152
|
-
}
|
|
460
|
+
let isSentByMe: boolean = this.isSentByMe(loggedInUser, messageObject);
|
|
153
461
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
messageOptionList.push(this.getCopyOption());
|
|
159
|
-
|
|
160
|
-
if (this.validateOption(loggedInUser, messageObject, MessageOptionConstants.editMessage, group)) {
|
|
161
|
-
messageOptionList.push(this.getEditOption());
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (this.validateOption(loggedInUser, messageObject, MessageOptionConstants.messageInformation, group)) {
|
|
165
|
-
messageOptionList.push(this.getInformationOption());
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (this.validateOption(loggedInUser, messageObject, MessageOptionConstants.deleteMessage, group)) {
|
|
169
|
-
messageOptionList.push(this.getDeleteOption());
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (this.validateOption(loggedInUser, messageObject, MessageOptionConstants.sendMessagePrivately, group)) {
|
|
173
|
-
messageOptionList.push(this.getPrivateMessageOption());
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return messageOptionList;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
getFormMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
180
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
181
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
182
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
183
|
-
return optionsList;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
getSchedulerMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
187
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
188
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
189
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
190
|
-
return optionsList;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
getCardMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
194
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
195
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
196
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
197
|
-
return optionsList;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
201
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
202
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
203
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
204
|
-
return optionsList;
|
|
205
|
-
}
|
|
206
|
-
getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
207
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
208
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
209
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
210
|
-
return optionsList
|
|
211
|
-
}
|
|
212
|
-
getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
213
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
214
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
215
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
216
|
-
return optionsList;
|
|
217
|
-
}
|
|
218
|
-
getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
219
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
220
|
-
if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
|
|
221
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
222
|
-
return optionsList;
|
|
223
|
-
}
|
|
224
|
-
getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
|
|
225
|
-
let optionsList: Array<CometChatMessageOption> = [];
|
|
226
|
-
if (isDeletedMessage(messageObject) || !isMessageSent(messageObject))
|
|
227
|
-
return optionsList;
|
|
228
|
-
if (messageObject.getCategory() == MessageCategoryConstants.message) {
|
|
229
|
-
let type: string = messageObject.getType();
|
|
230
|
-
switch (type) {
|
|
231
|
-
case MessageTypeConstants.audio:
|
|
232
|
-
optionsList.push(...ChatConfigurator.dataSource.getAudioMessageOptions(loggedInUser, messageObject, group));
|
|
233
|
-
break;
|
|
234
|
-
case MessageTypeConstants.video:
|
|
235
|
-
optionsList.push(...ChatConfigurator.dataSource.getVideoMessageOptions(loggedInUser, messageObject, group));
|
|
236
|
-
break;
|
|
237
|
-
case MessageTypeConstants.image:
|
|
238
|
-
optionsList.push(...ChatConfigurator.dataSource.getImageMessageOptions(loggedInUser, messageObject, group));
|
|
239
|
-
break;
|
|
240
|
-
case MessageTypeConstants.text:
|
|
241
|
-
optionsList.push(...ChatConfigurator.dataSource.getTextMessageOptions(loggedInUser, messageObject, group));
|
|
242
|
-
break;
|
|
243
|
-
case MessageTypeConstants.file:
|
|
244
|
-
optionsList.push(...ChatConfigurator.dataSource.getFileMessageOptions(loggedInUser, messageObject, group));
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
else if (messageObject.getCategory() == MessageCategoryConstants.custom) {
|
|
250
|
-
optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
|
|
251
|
-
} else if (messageObject.getCategory() == MessageCategoryConstants.interactive) {
|
|
252
|
-
let type: string = messageObject.getType();
|
|
253
|
-
switch (type) {
|
|
254
|
-
case MessageTypeConstants.form:
|
|
255
|
-
optionsList.push(...ChatConfigurator.dataSource.getFormMessageOptions(loggedInUser, messageObject, group));
|
|
256
|
-
break;
|
|
257
|
-
case MessageTypeConstants.card:
|
|
258
|
-
optionsList.push(...ChatConfigurator.dataSource.getCardMessageOptions(loggedInUser, messageObject, group));
|
|
259
|
-
break;
|
|
260
|
-
case MessageTypeConstants.scheduler:
|
|
261
|
-
optionsList.push(...ChatConfigurator.dataSource.getSchedulerMessageOptions(loggedInUser, messageObject, group));
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return optionsList;
|
|
462
|
+
if (MessageOptionConstants.messageInformation === optionId && isSentByMe) {
|
|
463
|
+
return true;
|
|
266
464
|
}
|
|
267
465
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if (MessageOptionConstants.copyMessage === optionId && messageObject instanceof CometChat.TextMessage) {
|
|
280
|
-
return true;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
let isSentByMe: boolean = this.isSentByMe(loggedInUser, messageObject);
|
|
284
|
-
|
|
285
|
-
if (MessageOptionConstants.messageInformation === optionId && isSentByMe) {
|
|
286
|
-
return true;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
let memberIsNotParticipant: boolean | any = group && ((group as any).owner === (loggedInUser as any).uid || (group as any).scope !== GroupMemberScope.participant);
|
|
290
|
-
|
|
291
|
-
if (MessageOptionConstants.deleteMessage === optionId && (isSentByMe || memberIsNotParticipant)) {
|
|
292
|
-
return true;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
if (MessageOptionConstants.editMessage === optionId && (isSentByMe || memberIsNotParticipant)) {
|
|
296
|
-
return true;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (MessageOptionConstants.copyMessage === optionId && messageObject instanceof CometChat.TextMessage) {
|
|
300
|
-
return true;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (MessageOptionConstants.sendMessagePrivately === optionId && group
|
|
304
|
-
&& loggedInUser.getUid() != messageObject.getSender()?.getUid()) {
|
|
305
|
-
return true;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
return false;
|
|
466
|
+
let memberIsNotParticipant: boolean = !!(
|
|
467
|
+
group &&
|
|
468
|
+
(group.getOwner() === loggedInUser.getUid() ||
|
|
469
|
+
group.getScope() !== GroupMemberScope.participant)
|
|
470
|
+
);
|
|
471
|
+
|
|
472
|
+
if (
|
|
473
|
+
MessageOptionConstants.deleteMessage === optionId &&
|
|
474
|
+
(isSentByMe || memberIsNotParticipant)
|
|
475
|
+
) {
|
|
476
|
+
return true;
|
|
309
477
|
}
|
|
310
478
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
if (isDeletedMessage(messageObject) || !isMessageSent(messageObject)) return messageOptionList;
|
|
479
|
+
if (MessageOptionConstants.editMessage === optionId && (isSentByMe || memberIsNotParticipant)) {
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
315
482
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
483
|
+
if (
|
|
484
|
+
MessageOptionConstants.copyMessage === optionId &&
|
|
485
|
+
messageObject instanceof CometChat.TextMessage
|
|
486
|
+
) {
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
319
489
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
490
|
+
if (
|
|
491
|
+
MessageOptionConstants.sendMessagePrivately === optionId &&
|
|
492
|
+
group &&
|
|
493
|
+
loggedInUser.getUid() != messageObject.getSender()?.getUid()
|
|
494
|
+
) {
|
|
495
|
+
return true;
|
|
496
|
+
}
|
|
323
497
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
327
500
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
501
|
+
getCommonOptions(
|
|
502
|
+
loggedInUser: CometChat.User,
|
|
503
|
+
messageObject: CometChat.BaseMessage,
|
|
504
|
+
theme: CometChatTheme,
|
|
505
|
+
group?: CometChat.Group
|
|
506
|
+
): CometChatMessageOption[] {
|
|
507
|
+
let messageOptionList: CometChatMessageOption[] = [];
|
|
331
508
|
|
|
332
|
-
|
|
333
|
-
messageOptionList.push(this.getPrivateMessageOption());
|
|
334
|
-
}
|
|
509
|
+
if (isDeletedMessage(messageObject)) return messageOptionList;
|
|
335
510
|
|
|
336
|
-
|
|
511
|
+
if (
|
|
512
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.replyInThread, group)
|
|
513
|
+
) {
|
|
514
|
+
messageOptionList.push(this.getReplyInThreadOption(theme));
|
|
337
515
|
}
|
|
338
516
|
|
|
517
|
+
if (
|
|
518
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.shareMessage, group)
|
|
519
|
+
) {
|
|
520
|
+
messageOptionList.push(this.getShareOption(theme));
|
|
521
|
+
}
|
|
339
522
|
|
|
523
|
+
if (
|
|
524
|
+
this.validateOption(
|
|
525
|
+
loggedInUser,
|
|
526
|
+
messageObject,
|
|
527
|
+
MessageOptionConstants.messageInformation,
|
|
528
|
+
group
|
|
529
|
+
)
|
|
530
|
+
) {
|
|
531
|
+
messageOptionList.push(this.getInformationOption(theme));
|
|
532
|
+
}
|
|
340
533
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
text={messageText}
|
|
346
|
-
textContainerStyle={{ marginStart: 4, marginEnd: 4 }}
|
|
347
|
-
style={{
|
|
348
|
-
backgroundColor: theme?.palette?.getAccent50(),
|
|
349
|
-
textFont: {
|
|
350
|
-
fontSize: theme?.typography?.subtitle2?.fontSize,
|
|
351
|
-
fontWeight: theme?.typography?.subtitle2?.fontWeight,
|
|
352
|
-
},
|
|
353
|
-
textColor: theme?.palette?.getAccent600()
|
|
354
|
-
}}
|
|
355
|
-
/>;
|
|
356
|
-
}
|
|
357
|
-
return null;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
getBottomView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType): JSX.Element | null {
|
|
361
|
-
return null;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
getDeleteMessageBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element {
|
|
365
|
-
return <View style={{ paddingBottom: 8, borderWidth: 1, borderStyle: "dashed", borderRadius: 8, borderColor: theme?.palette?.getAccent600() }}>
|
|
366
|
-
<CometChatTextBubble
|
|
367
|
-
textContainerStyle={{ marginStart: 4, marginEnd: 4 }}
|
|
368
|
-
text={localize("MESSAGE_IS_DELETED")}
|
|
369
|
-
style={{
|
|
370
|
-
backgroundColor: "transparent",
|
|
371
|
-
textFont: {
|
|
372
|
-
fontSize: theme?.typography?.subtitle2?.fontSize,
|
|
373
|
-
fontWeight: theme?.typography?.subtitle2?.fontWeight,
|
|
374
|
-
},
|
|
375
|
-
textColor: theme?.palette?.getAccent600()
|
|
376
|
-
}}
|
|
377
|
-
/>
|
|
378
|
-
</View>
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
getVideoMessageBubble(videoUrl: string, thumbnailUrl: string, message: CometChat.MediaMessage, theme: CometChatTheme, videoBubbleStyle: VideoBubbleStyleInterface) {
|
|
382
|
-
if (isVideoMessage(message)) {
|
|
383
|
-
return <CometChatVideoBubble
|
|
384
|
-
videoUrl={videoUrl}
|
|
385
|
-
thumbnailUrl={{ uri: thumbnailUrl }}
|
|
386
|
-
style={{ height: 200, width: 200, borderRadius: 8, ...videoBubbleStyle }}
|
|
387
|
-
/>
|
|
388
|
-
}
|
|
389
|
-
return null;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
getTextMessageBubble(messageText: string, message: CometChat.TextMessage, alignment: MessageBubbleAlignmentType, theme: CometChatTheme, additionalParams?: AdditionalBubbleStylingParams): JSX.Element | null {
|
|
393
|
-
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
394
|
-
if(loggedInUser) {
|
|
395
|
-
let mentionedUsers = message.getMentionedUsers();
|
|
396
|
-
let textFormatters = [...(additionalParams?.textFormatters ?? [])];
|
|
397
|
-
|
|
398
|
-
let linksTextFormatter = ChatConfigurator.getDataSource().getUrlsFormatter(loggedInUser);
|
|
399
|
-
linksTextFormatter.setMessage(message);
|
|
400
|
-
linksTextFormatter.setId("ccDefaultUrlsFormatterId")
|
|
401
|
-
textFormatters.push(linksTextFormatter);
|
|
402
|
-
|
|
403
|
-
if (!additionalParams?.disableMentions && mentionedUsers && mentionedUsers.length ) {
|
|
404
|
-
|
|
405
|
-
let mentionsTextFormatter = ChatConfigurator.getDataSource().getMentionsFormatter(loggedInUser);
|
|
406
|
-
mentionsTextFormatter.setLoggedInUser(loggedInUser);
|
|
407
|
-
mentionsTextFormatter.setId("ccDefaultMentionFormatterId")
|
|
408
|
-
let isUserSentMessage = alignment === "right";
|
|
409
|
-
if (isUserSentMessage) {
|
|
410
|
-
mentionsTextFormatter.setMentionsStyle(
|
|
411
|
-
new MentionTextStyle({
|
|
412
|
-
loggedInUserTextStyle: {
|
|
413
|
-
color: theme.palette.getTertiary(),
|
|
414
|
-
...theme.typography.title2,
|
|
415
|
-
fontSize: 16
|
|
416
|
-
} as TextStyle,
|
|
417
|
-
textStyle: {
|
|
418
|
-
color: theme.palette.getTertiary(),
|
|
419
|
-
...theme.typography.subtitle1,
|
|
420
|
-
fontSize: 16
|
|
421
|
-
} as TextStyle,
|
|
422
|
-
})
|
|
423
|
-
);
|
|
424
|
-
} else {
|
|
425
|
-
mentionsTextFormatter.setMentionsStyle(
|
|
426
|
-
new MentionTextStyle({
|
|
427
|
-
loggedInUserTextStyle: {
|
|
428
|
-
color: theme.palette.getPrimary(),
|
|
429
|
-
...theme.typography.title2,
|
|
430
|
-
fontSize: 16
|
|
431
|
-
} as TextStyle,
|
|
432
|
-
textStyle: {
|
|
433
|
-
color: theme.palette.getPrimary(),
|
|
434
|
-
...theme.typography.subtitle1,
|
|
435
|
-
fontSize: 16
|
|
436
|
-
} as TextStyle,
|
|
437
|
-
})
|
|
438
|
-
);
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
textFormatters.push(mentionsTextFormatter);
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
let finalFormatters: any[] = [];
|
|
446
|
-
|
|
447
|
-
let customerHasPassedUrlsFormatter;
|
|
448
|
-
|
|
449
|
-
textFormatters.forEach(formatter => {
|
|
450
|
-
if (formatter instanceof CometChatUrlsFormatter) {
|
|
451
|
-
if (formatter.getId() !== "ccDefaultUrlsFormatterId") {
|
|
452
|
-
customerHasPassedUrlsFormatter = true
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
formatter.setMessage(message);
|
|
456
|
-
let suggestionUsers = formatter.getSuggestionItems();
|
|
457
|
-
suggestionUsers.length > 0 && formatter.setSuggestionItems(suggestionUsers);
|
|
458
|
-
let _formatter = CommonUtils.clone(formatter);
|
|
459
|
-
finalFormatters.push(_formatter);
|
|
460
|
-
})
|
|
461
|
-
|
|
462
|
-
if (customerHasPassedUrlsFormatter) {
|
|
463
|
-
let customUrlsIndex = finalFormatters.findIndex((formatter: CometChatTextFormatter[]) => (formatter instanceof CometChatUrlsFormatter && formatter.getId() === "ccDefaultUrlsFormatterId"));
|
|
464
|
-
if (customUrlsIndex > -1) {
|
|
465
|
-
finalFormatters.splice(customUrlsIndex, 1);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
return <CometChatTextBubble
|
|
470
|
-
text={messageText}
|
|
471
|
-
style={{
|
|
472
|
-
backgroundColor: "transparent",
|
|
473
|
-
textFont: theme?.typography.body,
|
|
474
|
-
textColor: alignment == "right" ? theme?.palette.getSecondary() : theme?.palette?.getAccent(),
|
|
475
|
-
borderRadius: 8
|
|
476
|
-
}}
|
|
477
|
-
textFormatters={finalFormatters}
|
|
478
|
-
/>
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
return null
|
|
534
|
+
if (
|
|
535
|
+
this.validateOption(loggedInUser, messageObject, MessageOptionConstants.deleteMessage, group)
|
|
536
|
+
) {
|
|
537
|
+
messageOptionList.push(this.getDeleteOption(theme));
|
|
482
538
|
}
|
|
483
539
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
540
|
+
if (
|
|
541
|
+
this.validateOption(
|
|
542
|
+
loggedInUser,
|
|
543
|
+
messageObject,
|
|
544
|
+
MessageOptionConstants.sendMessagePrivately,
|
|
545
|
+
group
|
|
546
|
+
)
|
|
547
|
+
) {
|
|
548
|
+
messageOptionList.push(this.getPrivateMessageOption(theme));
|
|
490
549
|
}
|
|
491
550
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
551
|
+
return messageOptionList;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
getGroupActionBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element | null {
|
|
555
|
+
if (isActionMessage(message)) {
|
|
556
|
+
return (
|
|
557
|
+
<CometChatTextBubble
|
|
558
|
+
text={`${message.getMessage()}`}
|
|
559
|
+
textContainerStyle={theme.messageListStyles.groupActionBubbleStyles.textContainerStyle}
|
|
560
|
+
textStyle={theme.messageListStyles.groupActionBubbleStyles.textStyle}
|
|
497
561
|
/>
|
|
562
|
+
);
|
|
498
563
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
564
|
+
return null;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
getBottomView(
|
|
568
|
+
message: CometChat.BaseMessage,
|
|
569
|
+
alignment: MessageBubbleAlignmentType
|
|
570
|
+
): JSX.Element | null {
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
getDeleteMessageBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element {
|
|
575
|
+
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
576
|
+
|
|
577
|
+
const _style =
|
|
578
|
+
loggedInUser && message.getSender().getUid() === loggedInUser.getUid()
|
|
579
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles
|
|
580
|
+
: theme.messageListStyles.incomingMessageBubbleStyles;
|
|
581
|
+
return <CometChatDeletedBubble style={_style?.deletedBubbleStyles} />;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
getVideoMessageBubble(
|
|
585
|
+
videoUrl: string,
|
|
586
|
+
thumbnailUrl: string,
|
|
587
|
+
message: CometChat.MediaMessage,
|
|
588
|
+
theme: CometChatTheme
|
|
589
|
+
): JSX.Element | null {
|
|
590
|
+
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
591
|
+
if (isVideoMessage(message)) {
|
|
592
|
+
const _style =
|
|
593
|
+
message.getSender().getUid() === loggedInUser!.getUid()
|
|
594
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles?.videoBubbleStyles
|
|
595
|
+
: theme.messageListStyles.incomingMessageBubbleStyles?.videoBubbleStyles;
|
|
596
|
+
return (
|
|
597
|
+
<CometChatVideoBubble
|
|
598
|
+
videoUrl={videoUrl}
|
|
599
|
+
thumbnailUrl={{ uri: thumbnailUrl }}
|
|
600
|
+
imageStyle={_style?.imageStyle}
|
|
601
|
+
playIcon={_style?.playIcon}
|
|
602
|
+
playIconStyle={_style?.playIconStyle}
|
|
603
|
+
playIconContainerStyle={_style?.playIconContainerStyle}
|
|
604
|
+
placeholderImage={_style?.placeholderImage}
|
|
505
605
|
/>
|
|
606
|
+
);
|
|
607
|
+
}
|
|
608
|
+
return null;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
getTextMessageBubble(
|
|
612
|
+
messageText: string,
|
|
613
|
+
message: CometChat.TextMessage,
|
|
614
|
+
alignment: MessageBubbleAlignmentType,
|
|
615
|
+
theme: CometChatTheme,
|
|
616
|
+
additionalParams?: AdditionalParams
|
|
617
|
+
): JSX.Element {
|
|
618
|
+
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
619
|
+
let mentionedUsers = message.getMentionedUsers();
|
|
620
|
+
let textFormatters = [...(additionalParams?.textFormatters || [])];
|
|
621
|
+
const isMessageSentByLoggedInUser = message.getSender().getUid() === loggedInUser!.getUid();
|
|
622
|
+
const _style: Partial<CometChatTheme["textBubbleStyles"]> = isMessageSentByLoggedInUser
|
|
623
|
+
? (theme.messageListStyles.outgoingMessageBubbleStyles
|
|
624
|
+
.textBubbleStyles as CometChatTheme["textBubbleStyles"])
|
|
625
|
+
: (theme.messageListStyles.incomingMessageBubbleStyles
|
|
626
|
+
.textBubbleStyles as CometChatTheme["textBubbleStyles"]);
|
|
627
|
+
|
|
628
|
+
let linksTextFormatter = ChatConfigurator.getDataSource().getUrlsFormatter(loggedInUser!);
|
|
629
|
+
let mentionsTextFormatter = ChatConfigurator.getDataSource().getMentionsFormatter(
|
|
630
|
+
loggedInUser!
|
|
631
|
+
);
|
|
632
|
+
linksTextFormatter.setMessage(message);
|
|
633
|
+
linksTextFormatter.setId("ccDefaultUrlsFormatterId");
|
|
634
|
+
linksTextFormatter.setStyle({ linkTextColor: theme.color.receiveBubbleLink });
|
|
635
|
+
if (isMessageSentByLoggedInUser) {
|
|
636
|
+
linksTextFormatter.setStyle({ linkTextColor: theme.color.sendBubbleText });
|
|
506
637
|
}
|
|
507
638
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
639
|
+
if (!additionalParams?.disableMentions && mentionedUsers && mentionedUsers.length) {
|
|
640
|
+
mentionsTextFormatter.setLoggedInUser(loggedInUser!);
|
|
641
|
+
mentionsTextFormatter.setMessage(message);
|
|
642
|
+
mentionsTextFormatter.setId("ccDefaultMentionFormatterId");
|
|
643
|
+
let isUserSentMessage = message.getSender().getUid() == loggedInUser!.getUid();
|
|
644
|
+
if (isUserSentMessage) {
|
|
645
|
+
mentionsTextFormatter.setMentionsStyle(_style?.mentionsStyle);
|
|
646
|
+
} else {
|
|
647
|
+
mentionsTextFormatter.setMentionsStyle(_style?.mentionsStyle);
|
|
648
|
+
}
|
|
649
|
+
mentionsTextFormatter.setTextStyle(_style?.textStyle);
|
|
516
650
|
}
|
|
517
651
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
652
|
+
let finalFormatters: CometChatTextFormatter[] = [];
|
|
653
|
+
|
|
654
|
+
let urlFormatterExists = false;
|
|
655
|
+
let mentionsFormatterExists = false;
|
|
656
|
+
|
|
657
|
+
for (const formatter of textFormatters) {
|
|
658
|
+
if (formatter instanceof CometChatUrlsFormatter) {
|
|
659
|
+
urlFormatterExists = true;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
if (formatter instanceof CometChatMentionsFormatter) {
|
|
663
|
+
mentionsFormatterExists = true;
|
|
664
|
+
formatter.setMessage(message);
|
|
665
|
+
formatter.setTargetElement(MentionsTargetElement.textbubble);
|
|
666
|
+
formatter.setMentionsStyle();
|
|
667
|
+
formatter.setLoggedInUser(CometChatUIKit.loggedInUser!);
|
|
668
|
+
}
|
|
669
|
+
if (formatter instanceof CometChatUrlsFormatter) {
|
|
670
|
+
}
|
|
671
|
+
formatter.setMessage(message);
|
|
672
|
+
finalFormatters.push(CommonUtils.clone(formatter));
|
|
673
|
+
if (urlFormatterExists && mentionsFormatterExists) {
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
527
676
|
}
|
|
528
677
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
678
|
+
if (!urlFormatterExists) {
|
|
679
|
+
finalFormatters.push(linksTextFormatter);
|
|
680
|
+
}
|
|
681
|
+
if (!mentionsFormatterExists) {
|
|
682
|
+
finalFormatters.push(mentionsTextFormatter);
|
|
683
|
+
}
|
|
684
|
+
return (
|
|
685
|
+
<CometChatTextBubble
|
|
686
|
+
text={messageText}
|
|
687
|
+
textStyle={_style?.textStyle}
|
|
688
|
+
textFormatters={finalFormatters}
|
|
689
|
+
/>
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
getImageMessageBubble(
|
|
694
|
+
imageUrl: string,
|
|
695
|
+
caption: string,
|
|
696
|
+
message: CometChat.MediaMessage,
|
|
697
|
+
theme: CometChatTheme
|
|
698
|
+
): JSX.Element {
|
|
699
|
+
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
700
|
+
if (isImageMessage(message)) {
|
|
701
|
+
const _style =
|
|
702
|
+
message.getSender().getUid() === loggedInUser!.getUid()
|
|
703
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles?.imageBubbleStyles
|
|
704
|
+
: theme.messageListStyles.incomingMessageBubbleStyles?.imageBubbleStyles;
|
|
705
|
+
|
|
706
|
+
return <CometChatImageBubble imageUrl={{ uri: imageUrl }} style={_style?.imageStyle} />;
|
|
707
|
+
}
|
|
708
|
+
return <></>;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
getAudioMessageBubble(
|
|
712
|
+
audioUrl: string,
|
|
713
|
+
title: string,
|
|
714
|
+
style: any, //ToDoM: remove any
|
|
715
|
+
message: CometChat.MediaMessage,
|
|
716
|
+
theme: CometChatTheme
|
|
717
|
+
): JSX.Element {
|
|
718
|
+
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
719
|
+
if (isAudioMessage(message)) {
|
|
720
|
+
const _style =
|
|
721
|
+
message.getSender().getUid() === loggedInUser!.getUid()
|
|
722
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles?.audioBubbleStyles
|
|
723
|
+
: theme.messageListStyles.incomingMessageBubbleStyles?.audioBubbleStyles;
|
|
724
|
+
return (
|
|
725
|
+
<CometChatAudioBubble
|
|
726
|
+
audioUrl={audioUrl}
|
|
727
|
+
//title={title}
|
|
728
|
+
playViewContainerStyle={_style?.playViewContainerStyle}
|
|
729
|
+
playIconStyle={_style?.playIconStyle}
|
|
730
|
+
playIconContainerStyle={_style?.playIconContainerStyle}
|
|
731
|
+
waveStyle={_style?.waveStyle}
|
|
732
|
+
waveContainerStyle={_style?.waveContainerStyle}
|
|
733
|
+
playProgressTextStyle={_style?.playProgressTextStyle}
|
|
734
|
+
/>
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
return <></>;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
getFileMessageBubble(
|
|
741
|
+
fileUrl: string,
|
|
742
|
+
title: string,
|
|
743
|
+
style: any, //ToDoM: remove any
|
|
744
|
+
message: CometChat.MediaMessage,
|
|
745
|
+
theme: CometChatTheme
|
|
746
|
+
): JSX.Element {
|
|
747
|
+
let loggedInUser = CometChatUIKit.loggedInUser;
|
|
748
|
+
if (isFileMessage(message)) {
|
|
749
|
+
const metaData = {
|
|
750
|
+
attachmentObject: message.getAttachment(),
|
|
751
|
+
timeStamp: message.getSentAt(),
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
let subtitle: string = "";
|
|
755
|
+
|
|
756
|
+
if (
|
|
757
|
+
metaData.attachmentObject &&
|
|
758
|
+
Object.keys(metaData.attachmentObject).length &&
|
|
759
|
+
metaData.timeStamp
|
|
760
|
+
) {
|
|
761
|
+
const timestamp = metaData.timeStamp * 1000;
|
|
762
|
+
const date = new Date(timestamp);
|
|
763
|
+
|
|
764
|
+
// Format the date as "15 Oct, 2024"
|
|
765
|
+
const formattedDate = date
|
|
766
|
+
.toLocaleDateString("en-GB", {
|
|
767
|
+
day: "2-digit",
|
|
768
|
+
month: "short",
|
|
769
|
+
year: "numeric",
|
|
770
|
+
})
|
|
771
|
+
.replace(/(\w{3}) (\d{4})/, "$1, $2");
|
|
772
|
+
|
|
773
|
+
const attachmentObject = metaData.attachmentObject;
|
|
774
|
+
let fileSizeInKB, extension, fileType;
|
|
775
|
+
if (attachmentObject && Object.keys(attachmentObject).length) {
|
|
776
|
+
fileSizeInKB = Math.round(attachmentObject.getSize() / 1024);
|
|
777
|
+
extension =
|
|
778
|
+
attachmentObject.getExtension() && attachmentObject.getExtension().toUpperCase();
|
|
779
|
+
fileType = extension === "PDF" ? "PDF" : extension;
|
|
536
780
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
781
|
+
subtitle = `${formattedDate} • ${fileSizeInKB ? fileSizeInKB + " KB" : "----"} • ${
|
|
782
|
+
fileType ? fileType : "----"
|
|
783
|
+
}`;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
const _style =
|
|
787
|
+
message.getSender().getUid() === loggedInUser!.getUid()
|
|
788
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles?.fileBubbleStyles
|
|
789
|
+
: theme.messageListStyles.incomingMessageBubbleStyles?.fileBubbleStyles;
|
|
790
|
+
return (
|
|
791
|
+
<CometChatFileBubble
|
|
792
|
+
fileUrl={fileUrl}
|
|
793
|
+
title={title}
|
|
794
|
+
titleStyle={_style?.titleStyle}
|
|
795
|
+
subtitleStyle={_style?.subtitleStyle}
|
|
796
|
+
downloadIcon={_style?.downloadIcon}
|
|
797
|
+
downloadIconStyle={_style?.downloadIconStyle}
|
|
798
|
+
subtitle={subtitle}
|
|
799
|
+
/>
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
return <></>;
|
|
803
|
+
}
|
|
804
|
+
getTextMessageContentView(
|
|
805
|
+
message: CometChat.TextMessage,
|
|
806
|
+
alignment: MessageBubbleAlignmentType,
|
|
807
|
+
theme: CometChatTheme,
|
|
808
|
+
additionalParams?: AdditionalParams
|
|
809
|
+
): JSX.Element {
|
|
810
|
+
return ChatConfigurator.dataSource.getTextMessageBubble(
|
|
811
|
+
message.getText(),
|
|
812
|
+
message,
|
|
813
|
+
alignment,
|
|
814
|
+
theme,
|
|
815
|
+
additionalParams
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
getAudioMessageContentView(
|
|
819
|
+
message: CometChat.MediaMessage,
|
|
820
|
+
alignment: MessageBubbleAlignmentType,
|
|
821
|
+
theme: CometChatTheme
|
|
822
|
+
): JSX.Element {
|
|
823
|
+
let attachment = message.getAttachment();
|
|
824
|
+
return ChatConfigurator.dataSource.getAudioMessageBubble(
|
|
825
|
+
attachment.getUrl(),
|
|
826
|
+
attachment.getName(),
|
|
827
|
+
{},
|
|
828
|
+
message,
|
|
829
|
+
theme
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
getVideoMessageContentView(
|
|
833
|
+
message: CometChat.MediaMessage,
|
|
834
|
+
alignment: MessageBubbleAlignmentType,
|
|
835
|
+
theme: CometChatTheme
|
|
836
|
+
): JSX.Element | null {
|
|
837
|
+
let attachment = message.getAttachment();
|
|
838
|
+
return ChatConfigurator.dataSource.getVideoMessageBubble(
|
|
839
|
+
attachment.getUrl(),
|
|
840
|
+
"",
|
|
841
|
+
message,
|
|
842
|
+
theme
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
getImageMessageContentView(
|
|
846
|
+
message: CometChat.MediaMessage,
|
|
847
|
+
alignment: MessageBubbleAlignmentType,
|
|
848
|
+
theme: CometChatTheme
|
|
849
|
+
): JSX.Element | null {
|
|
850
|
+
let attachment = message.getAttachment();
|
|
851
|
+
let url: string = attachment.getUrl();
|
|
852
|
+
if (url == undefined) url = message["data"]["url"];
|
|
853
|
+
|
|
854
|
+
return ChatConfigurator.dataSource.getImageMessageBubble(
|
|
855
|
+
url,
|
|
856
|
+
attachment.getName(),
|
|
857
|
+
message,
|
|
858
|
+
theme
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
getFileMessageContentView(
|
|
862
|
+
message: CometChat.MediaMessage,
|
|
863
|
+
alignment: MessageBubbleAlignmentType,
|
|
864
|
+
theme: CometChatTheme
|
|
865
|
+
): JSX.Element {
|
|
866
|
+
let attachment = message.getAttachment();
|
|
867
|
+
return ChatConfigurator.dataSource.getFileMessageBubble(
|
|
868
|
+
attachment.getUrl(),
|
|
869
|
+
attachment.getName(),
|
|
870
|
+
{},
|
|
871
|
+
message,
|
|
872
|
+
theme
|
|
873
|
+
);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
getTextMessageTemplate(
|
|
877
|
+
theme: CometChatTheme,
|
|
878
|
+
additionalParams?: AdditionalParams
|
|
879
|
+
): CometChatMessageTemplate {
|
|
880
|
+
return new CometChatMessageTemplate({
|
|
881
|
+
type: MessageTypeConstants.text,
|
|
882
|
+
category: MessageCategoryConstants.message,
|
|
883
|
+
ContentView: (message: CometChat.BaseMessage, _alignment: MessageBubbleAlignmentType) => {
|
|
884
|
+
if (isDeletedMessage(message)) {
|
|
885
|
+
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
886
|
+
} else {
|
|
887
|
+
return ChatConfigurator.dataSource.getTextMessageContentView(
|
|
567
888
|
message,
|
|
889
|
+
_alignment,
|
|
568
890
|
theme,
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
891
|
+
additionalParams
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
options: (loggedInuser, message, theme, group) =>
|
|
896
|
+
ChatConfigurator.dataSource.getTextMessageOptions(loggedInuser, message, theme, group),
|
|
897
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
898
|
+
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
899
|
+
},
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
904
|
+
return new CometChatMessageTemplate({
|
|
905
|
+
type: MessageTypeConstants.audio,
|
|
906
|
+
category: MessageCategoryConstants.message,
|
|
907
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
908
|
+
if (isDeletedMessage(message)) {
|
|
909
|
+
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
910
|
+
} else
|
|
911
|
+
return ChatConfigurator.dataSource.getAudioMessageContentView(message, alignment, theme);
|
|
912
|
+
},
|
|
913
|
+
options: (loggedInuser, message, theme, group) =>
|
|
914
|
+
ChatConfigurator.dataSource.getAudioMessageOptions(loggedInuser, message, theme, group),
|
|
915
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
916
|
+
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
917
|
+
},
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
921
|
+
return new CometChatMessageTemplate({
|
|
922
|
+
type: MessageTypeConstants.video,
|
|
923
|
+
category: MessageCategoryConstants.message,
|
|
924
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
925
|
+
if (isDeletedMessage(message)) {
|
|
926
|
+
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
927
|
+
} else
|
|
928
|
+
return ChatConfigurator.dataSource.getVideoMessageContentView(message, alignment, theme);
|
|
929
|
+
},
|
|
930
|
+
options: (loggedInuser, message, theme, group) =>
|
|
931
|
+
ChatConfigurator.dataSource.getVideoMessageOptions(loggedInuser, message, theme, group),
|
|
932
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
933
|
+
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
934
|
+
},
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
938
|
+
return new CometChatMessageTemplate({
|
|
939
|
+
type: MessageTypeConstants.image,
|
|
940
|
+
category: MessageCategoryConstants.message,
|
|
941
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
942
|
+
if (isDeletedMessage(message)) {
|
|
943
|
+
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
944
|
+
} else
|
|
945
|
+
return ChatConfigurator.dataSource.getImageMessageContentView(message, alignment, theme);
|
|
946
|
+
},
|
|
947
|
+
options: (loggedInuser, message, theme, group) =>
|
|
948
|
+
ChatConfigurator.dataSource.getImageMessageOptions(loggedInuser, message, theme, group),
|
|
949
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
950
|
+
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
951
|
+
},
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
955
|
+
return new CometChatMessageTemplate({
|
|
956
|
+
type: MessageTypeConstants.file,
|
|
957
|
+
category: MessageCategoryConstants.message,
|
|
958
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
959
|
+
if (isDeletedMessage(message)) {
|
|
960
|
+
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
961
|
+
} else
|
|
962
|
+
return ChatConfigurator.dataSource.getFileMessageContentView(message, alignment, theme);
|
|
963
|
+
},
|
|
964
|
+
options: (loggedInuser, message, theme, group) =>
|
|
965
|
+
ChatConfigurator.dataSource.getFileMessageOptions(loggedInuser, message, theme, group),
|
|
966
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
967
|
+
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
968
|
+
},
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
973
|
+
return new CometChatMessageTemplate({
|
|
974
|
+
type: MessageTypeConstants.form,
|
|
975
|
+
category: MessageCategoryConstants.interactive,
|
|
976
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
977
|
+
const loggedInUser = CometChatUIKit.loggedInUser;
|
|
978
|
+
const _style =
|
|
979
|
+
loggedInUser && message.getSender().getUid() === loggedInUser.getUid()
|
|
980
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles
|
|
981
|
+
: theme.messageListStyles.incomingMessageBubbleStyles;
|
|
982
|
+
return (
|
|
983
|
+
<CometChatDeletedBubble
|
|
984
|
+
text={localize("NOT_SUPPORTED") ?? "This message type is not supported"}
|
|
985
|
+
style={_style?.deletedBubbleStyles}
|
|
986
|
+
/>
|
|
574
987
|
);
|
|
988
|
+
},
|
|
989
|
+
options: (loggedInuser, message, theme, group) => [],
|
|
990
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
991
|
+
return <></>;
|
|
992
|
+
},
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
997
|
+
return new CometChatMessageTemplate({
|
|
998
|
+
type: MessageTypeConstants.scheduler,
|
|
999
|
+
category: MessageCategoryConstants.interactive,
|
|
1000
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
1001
|
+
const loggedInUser = CometChatUIKit.loggedInUser;
|
|
1002
|
+
const _style =
|
|
1003
|
+
loggedInUser && message.getSender().getUid() === loggedInUser.getUid()
|
|
1004
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles
|
|
1005
|
+
: theme.messageListStyles.incomingMessageBubbleStyles;
|
|
1006
|
+
return (
|
|
1007
|
+
<CometChatDeletedBubble
|
|
1008
|
+
text={localize("NOT_SUPPORTED") ?? "This message type is not supported"}
|
|
1009
|
+
style={_style?.deletedBubbleStyles}
|
|
1010
|
+
/>
|
|
1011
|
+
);
|
|
1012
|
+
},
|
|
1013
|
+
options: (loggedInuser, message, theme, group) => [],
|
|
1014
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
1015
|
+
return <></>;
|
|
1016
|
+
},
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
1021
|
+
return new CometChatMessageTemplate({
|
|
1022
|
+
type: MessageTypeConstants.card,
|
|
1023
|
+
category: MessageCategoryConstants.interactive,
|
|
1024
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
1025
|
+
const loggedInUser = CometChatUIKit.loggedInUser;
|
|
1026
|
+
const _style =
|
|
1027
|
+
loggedInUser && message.getSender().getUid() === loggedInUser.getUid()
|
|
1028
|
+
? theme.messageListStyles.outgoingMessageBubbleStyles
|
|
1029
|
+
: theme.messageListStyles.incomingMessageBubbleStyles;
|
|
1030
|
+
return (
|
|
1031
|
+
<CometChatDeletedBubble
|
|
1032
|
+
text={localize("NOT_SUPPORTED") ?? "This message type is not supported"}
|
|
1033
|
+
style={_style?.deletedBubbleStyles}
|
|
1034
|
+
/>
|
|
1035
|
+
);
|
|
1036
|
+
},
|
|
1037
|
+
options: (loggedInuser, message, theme, group) => [],
|
|
1038
|
+
BottomView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
1039
|
+
return <></>;
|
|
1040
|
+
},
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
1045
|
+
return new CometChatMessageTemplate({
|
|
1046
|
+
type: MessageTypeConstants.groupMember,
|
|
1047
|
+
category: MessageCategoryConstants.action,
|
|
1048
|
+
ContentView: (message: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => {
|
|
1049
|
+
return ChatConfigurator.dataSource.getGroupActionBubble(message, theme);
|
|
1050
|
+
},
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
getAllMessageTemplates(
|
|
1055
|
+
theme: CometChatTheme,
|
|
1056
|
+
additionalParams?: AdditionalParams
|
|
1057
|
+
): CometChatMessageTemplate[] {
|
|
1058
|
+
return [
|
|
1059
|
+
ChatConfigurator.dataSource.getTextMessageTemplate(theme, additionalParams),
|
|
1060
|
+
ChatConfigurator.dataSource.getAudioMessageTemplate(theme),
|
|
1061
|
+
ChatConfigurator.dataSource.getVideoMessageTemplate(theme),
|
|
1062
|
+
ChatConfigurator.dataSource.getFileMessageTemplate(theme),
|
|
1063
|
+
ChatConfigurator.dataSource.getImageMessageTemplate(theme),
|
|
1064
|
+
ChatConfigurator.dataSource.getGroupActionTemplate(theme),
|
|
1065
|
+
ChatConfigurator.dataSource.getGroupActionTemplate(theme),
|
|
1066
|
+
ChatConfigurator.dataSource.getFormMessageTemplate(theme),
|
|
1067
|
+
ChatConfigurator.dataSource.getSchedulerMessageTemplate(theme),
|
|
1068
|
+
ChatConfigurator.dataSource.getCardMessageTemplate(theme),
|
|
1069
|
+
];
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
getMessageTemplate(
|
|
1073
|
+
messageType: string,
|
|
1074
|
+
MessageCategory: string,
|
|
1075
|
+
theme: CometChatTheme
|
|
1076
|
+
): CometChatMessageTemplate | null {
|
|
1077
|
+
// let _theme: CometChatTheme = useContext("theme") ???
|
|
1078
|
+
let template: CometChatMessageTemplate;
|
|
1079
|
+
|
|
1080
|
+
//in case of call message return undefined
|
|
1081
|
+
if (MessageCategory == MessageCategoryConstants.call) return null;
|
|
1082
|
+
|
|
1083
|
+
switch (messageType) {
|
|
1084
|
+
case MessageTypeConstants.text:
|
|
1085
|
+
template = ChatConfigurator.dataSource.getTextMessageTemplate(theme);
|
|
1086
|
+
break;
|
|
1087
|
+
case MessageTypeConstants.audio:
|
|
1088
|
+
template = ChatConfigurator.dataSource.getAudioMessageTemplate(theme);
|
|
1089
|
+
break;
|
|
1090
|
+
case MessageTypeConstants.video:
|
|
1091
|
+
template = ChatConfigurator.dataSource.getVideoMessageTemplate(theme);
|
|
1092
|
+
break;
|
|
1093
|
+
case MessageTypeConstants.groupActions:
|
|
1094
|
+
case MessageTypeConstants.groupMember:
|
|
1095
|
+
template = ChatConfigurator.dataSource.getGroupActionTemplate(theme);
|
|
1096
|
+
break;
|
|
1097
|
+
case MessageTypeConstants.file:
|
|
1098
|
+
template = ChatConfigurator.dataSource.getFileMessageTemplate(theme);
|
|
1099
|
+
break;
|
|
1100
|
+
case MessageTypeConstants.form:
|
|
1101
|
+
template = ChatConfigurator.dataSource.getFormMessageTemplate(theme);
|
|
1102
|
+
break;
|
|
1103
|
+
case MessageTypeConstants.scheduler:
|
|
1104
|
+
template = ChatConfigurator.dataSource.getSchedulerMessageTemplate(theme);
|
|
1105
|
+
break;
|
|
1106
|
+
case MessageTypeConstants.card:
|
|
1107
|
+
template = ChatConfigurator.dataSource.getCardMessageTemplate(theme);
|
|
1108
|
+
break;
|
|
575
1109
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
backgroundColor: "transparent",
|
|
592
|
-
titleColor: theme?.palette.getAccent(),
|
|
593
|
-
titleFont: theme?.typography.body,
|
|
594
|
-
subtitleColor: theme?.palette.getAccent(),
|
|
595
|
-
subtitleFont: theme?.typography.subtitle1,
|
|
596
|
-
}
|
|
597
|
-
, message, theme);
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
getTextMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalBubbleStylingParams): CometChatMessageTemplate {
|
|
601
|
-
return new CometChatMessageTemplate({
|
|
602
|
-
type: MessageTypeConstants.text,
|
|
603
|
-
category: MessageCategoryConstants.message,
|
|
604
|
-
ContentView: (message: CometChat.BaseMessage, _alignment?: MessageBubbleAlignmentType) => {
|
|
605
|
-
if (isDeletedMessage(message)) {
|
|
606
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
607
|
-
} else {
|
|
608
|
-
return ChatConfigurator.dataSource.getTextMessageContentView(message, _alignment, theme, additionalParams);
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getTextMessageOptions(loggedInuser, message, group),
|
|
612
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
613
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
614
|
-
}
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
619
|
-
return new CometChatMessageTemplate({
|
|
620
|
-
type: MessageTypeConstants.form,
|
|
621
|
-
category: MessageCategoryConstants.interactive,
|
|
622
|
-
ContentView: (message: CometChat.BaseMessage, _alignment?: MessageBubbleAlignmentType) => {
|
|
623
|
-
if (isDeletedMessage(message)) {
|
|
624
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
625
|
-
} else {
|
|
626
|
-
return ChatConfigurator.dataSource.getFormMessageContentView(message, _alignment, theme);
|
|
627
|
-
}
|
|
628
|
-
},
|
|
629
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getFormMessageOptions(loggedInuser, message, group),
|
|
630
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
631
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
632
|
-
}
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
637
|
-
return new CometChatMessageTemplate({
|
|
638
|
-
type: MessageTypeConstants.scheduler,
|
|
639
|
-
category: MessageCategoryConstants.interactive,
|
|
640
|
-
ContentView: (message: CometChat.BaseMessage, _alignment?: MessageBubbleAlignmentType) => {
|
|
641
|
-
if (isDeletedMessage(message)) {
|
|
642
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
643
|
-
} else {
|
|
644
|
-
return ChatConfigurator.dataSource.getSchedulerMessageContentView(message, _alignment, theme);
|
|
645
|
-
}
|
|
646
|
-
},
|
|
647
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getSchedulerMessageOptions(loggedInuser, message, group),
|
|
648
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
649
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
655
|
-
return new CometChatMessageTemplate({
|
|
656
|
-
type: MessageTypeConstants.card,
|
|
657
|
-
category: MessageCategoryConstants.interactive,
|
|
658
|
-
ContentView: (message: CometChat.BaseMessage, _alignment?: MessageBubbleAlignmentType) => {
|
|
659
|
-
if (isDeletedMessage(message)) {
|
|
660
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
661
|
-
} else {
|
|
662
|
-
return ChatConfigurator.dataSource.getCardMessageContentView(message, _alignment, theme);
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getCardMessageOptions(loggedInuser, message, group),
|
|
666
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
667
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
673
|
-
return new CometChatMessageTemplate({
|
|
674
|
-
type: MessageTypeConstants.audio,
|
|
675
|
-
category: MessageCategoryConstants.message,
|
|
676
|
-
ContentView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
677
|
-
if (isDeletedMessage(message)) {
|
|
678
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
679
|
-
} else
|
|
680
|
-
return ChatConfigurator.dataSource.getAudioMessageContentView(message, alignment, theme);
|
|
681
|
-
},
|
|
682
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getAudioMessageOptions(loggedInuser, message, group),
|
|
683
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
684
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
685
|
-
}
|
|
686
|
-
})
|
|
687
|
-
}
|
|
688
|
-
getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
689
|
-
return new CometChatMessageTemplate({
|
|
690
|
-
type: MessageTypeConstants.video,
|
|
691
|
-
category: MessageCategoryConstants.message,
|
|
692
|
-
ContentView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
693
|
-
if (isDeletedMessage(message)) {
|
|
694
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
695
|
-
} else
|
|
696
|
-
return ChatConfigurator.dataSource.getVideoMessageContentView(message, alignment, theme);
|
|
697
|
-
},
|
|
698
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getVideoMessageOptions(loggedInuser, message, group),
|
|
699
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
700
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
701
|
-
}
|
|
702
|
-
})
|
|
703
|
-
}
|
|
704
|
-
getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
705
|
-
return new CometChatMessageTemplate({
|
|
706
|
-
type: MessageTypeConstants.image,
|
|
707
|
-
category: MessageCategoryConstants.message,
|
|
708
|
-
ContentView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
709
|
-
if (isDeletedMessage(message)) {
|
|
710
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
711
|
-
} else
|
|
712
|
-
return ChatConfigurator.dataSource.getImageMessageContentView(message, alignment, theme);
|
|
713
|
-
},
|
|
714
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getImageMessageOptions(loggedInuser, message, group),
|
|
715
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
716
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
717
|
-
}
|
|
718
|
-
})
|
|
719
|
-
}
|
|
720
|
-
getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
721
|
-
return new CometChatMessageTemplate({
|
|
722
|
-
type: MessageTypeConstants.file,
|
|
723
|
-
category: MessageCategoryConstants.message,
|
|
724
|
-
ContentView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
725
|
-
if (isDeletedMessage(message)) {
|
|
726
|
-
return ChatConfigurator.dataSource.getDeleteMessageBubble(message, theme);
|
|
727
|
-
} else
|
|
728
|
-
return ChatConfigurator.dataSource.getFileMessageContentView(message, alignment, theme);
|
|
729
|
-
},
|
|
730
|
-
options: (loggedInuser, message, group) => ChatConfigurator.dataSource.getFileMessageOptions(loggedInuser, message, group),
|
|
731
|
-
BottomView: (message: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => {
|
|
732
|
-
return ChatConfigurator.dataSource.getBottomView(message, alignment);
|
|
733
|
-
}
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
737
|
-
return new CometChatMessageTemplate({
|
|
738
|
-
type: MessageTypeConstants.groupMember,
|
|
739
|
-
category: MessageCategoryConstants.action,
|
|
740
|
-
ContentView: (message: CometChat.BaseMessage,
|
|
741
|
-
alignment?: MessageBubbleAlignmentType) => {
|
|
742
|
-
return ChatConfigurator.dataSource.getGroupActionBubble(message, theme);
|
|
743
|
-
}
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
getAllMessageTemplates(theme: CometChatTheme, additionalParams?: AdditionalBubbleStylingParams): CometChatMessageTemplate[] | any[] {
|
|
748
|
-
return [
|
|
749
|
-
ChatConfigurator.dataSource.getTextMessageTemplate(theme, additionalParams),
|
|
750
|
-
ChatConfigurator.dataSource.getFormMessageTemplate(theme),
|
|
751
|
-
ChatConfigurator.dataSource.getSchedulerMessageTemplate(theme),
|
|
752
|
-
ChatConfigurator.dataSource.getCardMessageTemplate(theme),
|
|
753
|
-
ChatConfigurator.dataSource.getAudioMessageTemplate(theme),
|
|
754
|
-
ChatConfigurator.dataSource.getVideoMessageTemplate(theme),
|
|
755
|
-
ChatConfigurator.dataSource.getFileMessageTemplate(theme),
|
|
756
|
-
ChatConfigurator.dataSource.getImageMessageTemplate(theme),
|
|
757
|
-
ChatConfigurator.dataSource.getGroupActionTemplate(theme)
|
|
758
|
-
];
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
getMessageTemplate(messageType: string, MessageCategory: string, theme: CometChatTheme): CometChatMessageTemplate | null {
|
|
762
|
-
// let _theme: CometChatTheme = useContext("theme") ???
|
|
763
|
-
let template!: CometChatMessageTemplate | null;
|
|
764
|
-
|
|
765
|
-
//in case of call message return undefined
|
|
766
|
-
if (MessageCategory == MessageCategoryConstants.call) return template;
|
|
767
|
-
|
|
768
|
-
switch (messageType) {
|
|
769
|
-
case MessageTypeConstants.text:
|
|
770
|
-
template = ChatConfigurator.dataSource.getTextMessageTemplate(theme)
|
|
771
|
-
break;
|
|
772
|
-
case MessageTypeConstants.audio:
|
|
773
|
-
template = ChatConfigurator.dataSource.getAudioMessageTemplate(theme)
|
|
774
|
-
break;
|
|
775
|
-
case MessageTypeConstants.video:
|
|
776
|
-
template = ChatConfigurator.dataSource.getVideoMessageTemplate(theme)
|
|
777
|
-
break;
|
|
778
|
-
case MessageTypeConstants.groupActions:
|
|
779
|
-
case MessageTypeConstants.groupMember:
|
|
780
|
-
template = ChatConfigurator.dataSource.getGroupActionTemplate(theme)
|
|
781
|
-
break;
|
|
782
|
-
case MessageTypeConstants.file:
|
|
783
|
-
template = ChatConfigurator.dataSource.getFileMessageTemplate(theme)
|
|
784
|
-
break;
|
|
785
|
-
case MessageTypeConstants.form:
|
|
786
|
-
template = ChatConfigurator.dataSource.getFormMessageTemplate(theme)
|
|
787
|
-
break;
|
|
788
|
-
case MessageTypeConstants.scheduler:
|
|
789
|
-
template = ChatConfigurator.dataSource.getSchedulerMessageTemplate(theme)
|
|
790
|
-
break;
|
|
791
|
-
case MessageTypeConstants.card:
|
|
792
|
-
template = ChatConfigurator.dataSource.getCardMessageTemplate(theme)
|
|
793
|
-
break;
|
|
794
|
-
}
|
|
795
|
-
return template;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
getAllMessageTypes(): string[] {
|
|
799
|
-
return [
|
|
800
|
-
CometChatMessageTypes.text,
|
|
801
|
-
CometChatMessageTypes.image,
|
|
802
|
-
CometChatMessageTypes.audio,
|
|
803
|
-
CometChatMessageTypes.video,
|
|
804
|
-
CometChatMessageTypes.file,
|
|
805
|
-
MessageTypeConstants.groupActions,
|
|
806
|
-
MessageTypeConstants.groupMember,
|
|
807
|
-
MessageTypeConstants.form,
|
|
808
|
-
MessageTypeConstants.card,
|
|
809
|
-
MessageTypeConstants.scheduler
|
|
810
|
-
];
|
|
811
|
-
}
|
|
812
|
-
getAllMessageCategories(): string[] {
|
|
813
|
-
return [MessageCategoryConstants.message, MessageCategoryConstants.action, MessageCategoryConstants.interactive];
|
|
814
|
-
}
|
|
815
|
-
getAuxiliaryOptions(user: CometChat.User, group: CometChat.Group, id: Map<string, any>, theme?: CometChatTheme): JSX.Element[] {
|
|
816
|
-
return [];
|
|
817
|
-
}
|
|
818
|
-
getAuxiliaryHeaderAppbarOptions(user?: CometChat.User, group?: CometChat.Group): JSX.Element | null {
|
|
819
|
-
return null;
|
|
820
|
-
}
|
|
821
|
-
getId(): string {
|
|
822
|
-
return "messageUtils";
|
|
823
|
-
}
|
|
824
|
-
getMessageTypeToSubtitle(messageType: string): string {
|
|
825
|
-
let subtitle: string = messageType;
|
|
826
|
-
switch (messageType) {
|
|
827
|
-
case MessageTypeConstants.text:
|
|
828
|
-
subtitle = localize("TEXT");
|
|
829
|
-
break;
|
|
830
|
-
case MessageTypeConstants.image:
|
|
831
|
-
subtitle = localize("MESSAGE_IMAGE");
|
|
832
|
-
break;
|
|
833
|
-
case MessageTypeConstants.video:
|
|
834
|
-
subtitle = localize("MESSAGE_VIDEO");
|
|
835
|
-
break;
|
|
836
|
-
case MessageTypeConstants.file:
|
|
837
|
-
subtitle = localize("MESSAGE_FILE");
|
|
838
|
-
break;
|
|
839
|
-
case MessageTypeConstants.audio:
|
|
840
|
-
subtitle = localize("MESSAGE_AUDIO");
|
|
841
|
-
break;
|
|
842
|
-
default:
|
|
843
|
-
subtitle = messageType;
|
|
844
|
-
break;
|
|
845
|
-
}
|
|
846
|
-
return subtitle;
|
|
847
|
-
}
|
|
848
|
-
usersActionList = () => [
|
|
849
|
-
{
|
|
850
|
-
id: MessageTypeConstants.takePhoto,
|
|
851
|
-
title: localize('TAKE_PHOTO'),
|
|
852
|
-
iconUrl: ICONS.IMAGE,
|
|
853
|
-
onClick: null,
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
id: MessageTypeConstants.image,
|
|
857
|
-
title: localize('ATTACH_IMAGE'),
|
|
858
|
-
iconUrl: ICONS.IMAGE,
|
|
859
|
-
onClick: null,
|
|
860
|
-
},
|
|
861
|
-
{
|
|
862
|
-
id: MessageTypeConstants.audio,
|
|
863
|
-
title: localize('ATTACH_AUDIO'),
|
|
864
|
-
iconUrl: ICONS.AUDIO,
|
|
865
|
-
onClick: null,
|
|
866
|
-
},
|
|
867
|
-
{
|
|
868
|
-
id: MessageTypeConstants.video,
|
|
869
|
-
title: localize('ATTACH_VIDEO'),
|
|
870
|
-
iconUrl: ICONS.VIDEO,
|
|
871
|
-
onClick: null,
|
|
872
|
-
},
|
|
873
|
-
{
|
|
874
|
-
id: MessageTypeConstants.file,
|
|
875
|
-
title: localize('ATTACH_FILE'),
|
|
876
|
-
iconUrl: ICONS.FILE,
|
|
877
|
-
onClick: null,
|
|
878
|
-
},
|
|
1110
|
+
return null;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
getAllMessageTypes(): string[] {
|
|
1114
|
+
return [
|
|
1115
|
+
CometChatMessageTypes.text,
|
|
1116
|
+
CometChatMessageTypes.image,
|
|
1117
|
+
CometChatMessageTypes.audio,
|
|
1118
|
+
CometChatMessageTypes.video,
|
|
1119
|
+
CometChatMessageTypes.file,
|
|
1120
|
+
MessageTypeConstants.groupActions,
|
|
1121
|
+
MessageTypeConstants.groupMember,
|
|
1122
|
+
MessageTypeConstants.form,
|
|
1123
|
+
MessageTypeConstants.card,
|
|
1124
|
+
MessageTypeConstants.scheduler,
|
|
879
1125
|
];
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
id: MessageTypeConstants.image,
|
|
889
|
-
title: localize('ATTACH_IMAGE'),
|
|
890
|
-
iconUrl: ICONS.IMAGE,
|
|
891
|
-
onClick: null,
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
id: MessageTypeConstants.audio,
|
|
895
|
-
title: localize('ATTACH_AUDIO'),
|
|
896
|
-
iconUrl: ICONS.AUDIO,
|
|
897
|
-
onClick: null,
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
id: MessageTypeConstants.video,
|
|
901
|
-
title: localize('ATTACH_VIDEO'),
|
|
902
|
-
iconUrl: ICONS.VIDEO,
|
|
903
|
-
onClick: null,
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
id: MessageTypeConstants.file,
|
|
907
|
-
title: localize('ATTACH_FILE'),
|
|
908
|
-
iconUrl: ICONS.FILE,
|
|
909
|
-
onClick: null,
|
|
910
|
-
},
|
|
1126
|
+
}
|
|
1127
|
+
getAllMessageCategories(): string[] {
|
|
1128
|
+
return [
|
|
1129
|
+
MessageCategoryConstants.message,
|
|
1130
|
+
MessageCategoryConstants.action,
|
|
1131
|
+
MessageCategoryConstants.interactive,
|
|
911
1132
|
];
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
1133
|
+
}
|
|
1134
|
+
getAuxiliaryOptions(
|
|
1135
|
+
user: CometChat.User,
|
|
1136
|
+
group: CometChat.Group,
|
|
1137
|
+
id: Map<string, any>,
|
|
1138
|
+
additionalParams?: AdditionalParams
|
|
1139
|
+
): JSX.Element[] {
|
|
1140
|
+
return [];
|
|
1141
|
+
}
|
|
1142
|
+
getAuxiliaryHeaderAppbarOptions(
|
|
1143
|
+
user?: CometChat.User,
|
|
1144
|
+
group?: CometChat.Group,
|
|
1145
|
+
additionalParams?: AdditionalParams
|
|
1146
|
+
): JSX.Element | null {
|
|
1147
|
+
return null;
|
|
1148
|
+
}
|
|
1149
|
+
getId(): string {
|
|
1150
|
+
return "messageUtils";
|
|
1151
|
+
}
|
|
1152
|
+
getMessageTypeToSubtitle(messageType: string): string {
|
|
1153
|
+
let subtitle: string = messageType;
|
|
1154
|
+
switch (messageType) {
|
|
1155
|
+
case MessageTypeConstants.text:
|
|
1156
|
+
subtitle = localize("TEXT");
|
|
1157
|
+
break;
|
|
1158
|
+
case MessageTypeConstants.image:
|
|
1159
|
+
subtitle = localize("MESSAGE_IMAGE");
|
|
1160
|
+
break;
|
|
1161
|
+
case MessageTypeConstants.video:
|
|
1162
|
+
subtitle = localize("MESSAGE_VIDEO");
|
|
1163
|
+
break;
|
|
1164
|
+
case MessageTypeConstants.file:
|
|
1165
|
+
subtitle = localize("MESSAGE_FILE");
|
|
1166
|
+
break;
|
|
1167
|
+
case MessageTypeConstants.audio:
|
|
1168
|
+
subtitle = localize("MESSAGE_AUDIO");
|
|
1169
|
+
break;
|
|
1170
|
+
default:
|
|
1171
|
+
subtitle = messageType;
|
|
1172
|
+
break;
|
|
940
1173
|
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1174
|
+
return subtitle;
|
|
1175
|
+
}
|
|
1176
|
+
usersActionList = (theme: CometChatTheme) => [
|
|
1177
|
+
{
|
|
1178
|
+
id: MessageTypeConstants.takePhoto,
|
|
1179
|
+
title: localize("CAMERA"),
|
|
1180
|
+
icon: (
|
|
1181
|
+
<Icon
|
|
1182
|
+
name='photo-camera-fill'
|
|
1183
|
+
color={theme.color.primary}
|
|
1184
|
+
height={
|
|
1185
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1186
|
+
?.height as DimensionValue
|
|
1187
|
+
}
|
|
1188
|
+
width={
|
|
1189
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1190
|
+
?.width as DimensionValue
|
|
1191
|
+
}
|
|
1192
|
+
containerStyle={
|
|
1193
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1194
|
+
?.iconContainerStyle as ViewStyle
|
|
1195
|
+
}
|
|
1196
|
+
/>
|
|
1197
|
+
),
|
|
1198
|
+
onClick: null,
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
id: MessageTypeConstants.image,
|
|
1202
|
+
title: localize("ATTACH_IMAGE"),
|
|
1203
|
+
icon: (
|
|
1204
|
+
<Icon
|
|
1205
|
+
name='photo-fill'
|
|
1206
|
+
color={theme.color.primary}
|
|
1207
|
+
height={
|
|
1208
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1209
|
+
?.height as DimensionValue
|
|
1210
|
+
}
|
|
1211
|
+
width={
|
|
1212
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1213
|
+
?.width as DimensionValue
|
|
1214
|
+
}
|
|
1215
|
+
containerStyle={
|
|
1216
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1217
|
+
?.iconContainerStyle as ViewStyle
|
|
1218
|
+
}
|
|
1219
|
+
/>
|
|
1220
|
+
),
|
|
1221
|
+
onClick: null,
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
id: MessageTypeConstants.video,
|
|
1225
|
+
title: localize("ATTACH_VIDEO"),
|
|
1226
|
+
icon: (
|
|
1227
|
+
<Icon
|
|
1228
|
+
name='videocam-fill'
|
|
1229
|
+
color={theme.color.primary}
|
|
1230
|
+
height={
|
|
1231
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1232
|
+
?.height as DimensionValue
|
|
1233
|
+
}
|
|
1234
|
+
width={
|
|
1235
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1236
|
+
?.width as DimensionValue
|
|
1237
|
+
}
|
|
1238
|
+
containerStyle={
|
|
1239
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1240
|
+
?.iconContainerStyle as ViewStyle
|
|
1241
|
+
}
|
|
1242
|
+
/>
|
|
1243
|
+
),
|
|
1244
|
+
onClick: null,
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
id: MessageTypeConstants.audio,
|
|
1248
|
+
title: localize("ATTACH_AUDIO"),
|
|
1249
|
+
icon: (
|
|
1250
|
+
<Icon
|
|
1251
|
+
name='play-circle-fill'
|
|
1252
|
+
color={theme.color.primary}
|
|
1253
|
+
height={
|
|
1254
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1255
|
+
?.height as DimensionValue
|
|
1256
|
+
}
|
|
1257
|
+
width={
|
|
1258
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1259
|
+
?.width as DimensionValue
|
|
1260
|
+
}
|
|
1261
|
+
containerStyle={
|
|
1262
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1263
|
+
?.iconContainerStyle as ViewStyle
|
|
1264
|
+
}
|
|
1265
|
+
/>
|
|
1266
|
+
),
|
|
1267
|
+
onClick: null,
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
id: MessageTypeConstants.file,
|
|
1271
|
+
title: localize("ATTACH_DOCUMENT"),
|
|
1272
|
+
icon: (
|
|
1273
|
+
<Icon
|
|
1274
|
+
name='description-fill'
|
|
1275
|
+
color={theme.color.primary}
|
|
1276
|
+
height={
|
|
1277
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1278
|
+
?.height as DimensionValue
|
|
1279
|
+
}
|
|
1280
|
+
width={
|
|
1281
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1282
|
+
?.width as DimensionValue
|
|
1283
|
+
}
|
|
1284
|
+
containerStyle={
|
|
1285
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1286
|
+
?.iconContainerStyle as ViewStyle
|
|
1287
|
+
}
|
|
1288
|
+
/>
|
|
1289
|
+
),
|
|
1290
|
+
onClick: null,
|
|
1291
|
+
},
|
|
1292
|
+
];
|
|
1293
|
+
groupActionList = (theme: CometChatTheme) => [
|
|
1294
|
+
{
|
|
1295
|
+
id: MessageTypeConstants.takePhoto,
|
|
1296
|
+
title: localize("CAMERA"),
|
|
1297
|
+
icon: (
|
|
1298
|
+
<Icon
|
|
1299
|
+
name='photo-camera-fill'
|
|
1300
|
+
color={theme.color.primary}
|
|
1301
|
+
height={
|
|
1302
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1303
|
+
?.height
|
|
1304
|
+
}
|
|
1305
|
+
width={
|
|
1306
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle?.width
|
|
1307
|
+
}
|
|
1308
|
+
containerStyle={
|
|
1309
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1310
|
+
?.iconContainerStyle
|
|
1311
|
+
}
|
|
1312
|
+
/>
|
|
1313
|
+
),
|
|
1314
|
+
onClick: null,
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
id: MessageTypeConstants.image,
|
|
1318
|
+
title: localize("ATTACH_IMAGE"),
|
|
1319
|
+
icon: (
|
|
1320
|
+
<Icon
|
|
1321
|
+
name='photo-fill'
|
|
1322
|
+
color={theme.color.primary}
|
|
1323
|
+
height={
|
|
1324
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1325
|
+
?.height
|
|
1326
|
+
}
|
|
1327
|
+
width={
|
|
1328
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle?.width
|
|
1329
|
+
}
|
|
1330
|
+
containerStyle={
|
|
1331
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1332
|
+
?.iconContainerStyle
|
|
1333
|
+
}
|
|
1334
|
+
/>
|
|
1335
|
+
),
|
|
1336
|
+
onClick: null,
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
id: MessageTypeConstants.audio,
|
|
1340
|
+
title: localize("ATTACH_AUDIO"),
|
|
1341
|
+
icon: (
|
|
1342
|
+
<Icon
|
|
1343
|
+
name='play-circle-fill'
|
|
1344
|
+
color={theme.color.primary}
|
|
1345
|
+
height={
|
|
1346
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1347
|
+
?.height
|
|
1348
|
+
}
|
|
1349
|
+
width={
|
|
1350
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle?.width
|
|
1351
|
+
}
|
|
1352
|
+
containerStyle={
|
|
1353
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1354
|
+
?.iconContainerStyle
|
|
1355
|
+
}
|
|
1356
|
+
/>
|
|
1357
|
+
),
|
|
1358
|
+
onClick: null,
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
id: MessageTypeConstants.video,
|
|
1362
|
+
title: localize("ATTACH_VIDEO"),
|
|
1363
|
+
icon: (
|
|
1364
|
+
<Icon
|
|
1365
|
+
name='videocam-fill'
|
|
1366
|
+
color={theme.color.primary}
|
|
1367
|
+
height={
|
|
1368
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1369
|
+
?.height
|
|
1370
|
+
}
|
|
1371
|
+
width={
|
|
1372
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle?.width
|
|
1373
|
+
}
|
|
1374
|
+
containerStyle={
|
|
1375
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1376
|
+
?.iconContainerStyle
|
|
1377
|
+
}
|
|
1378
|
+
/>
|
|
1379
|
+
),
|
|
1380
|
+
onClick: null,
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
id: MessageTypeConstants.file,
|
|
1384
|
+
title: localize("ATTACH_DOCUMENT"),
|
|
1385
|
+
icon: (
|
|
1386
|
+
<Icon
|
|
1387
|
+
name='description-fill'
|
|
1388
|
+
color={theme.color.primary}
|
|
1389
|
+
height={
|
|
1390
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle
|
|
1391
|
+
?.height
|
|
1392
|
+
}
|
|
1393
|
+
width={
|
|
1394
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle?.iconStyle?.width
|
|
1395
|
+
}
|
|
1396
|
+
containerStyle={
|
|
1397
|
+
theme.messageComposerStyles?.attachmentOptionsStyles?.optionsItemStyle
|
|
1398
|
+
?.iconContainerStyle
|
|
1399
|
+
}
|
|
1400
|
+
/>
|
|
1401
|
+
),
|
|
1402
|
+
onClick: null,
|
|
1403
|
+
},
|
|
1404
|
+
];
|
|
1405
|
+
getAttachmentOptions(
|
|
1406
|
+
theme: CometChatTheme,
|
|
1407
|
+
user?: any,
|
|
1408
|
+
group?: any,
|
|
1409
|
+
composerId?: any
|
|
1410
|
+
): CometChatMessageComposerAction[] {
|
|
1411
|
+
if (user) {
|
|
1412
|
+
return this.usersActionList(theme);
|
|
1413
|
+
} else if (group) {
|
|
1414
|
+
return this.groupActionList(theme);
|
|
1415
|
+
} else {
|
|
1416
|
+
return this.usersActionList(theme);
|
|
944
1417
|
}
|
|
1418
|
+
}
|
|
1419
|
+
getAuxiliaryButtonOptions() {
|
|
1420
|
+
return null;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
getLastConversationMessage(
|
|
1424
|
+
conversation: CometChat.Conversation,
|
|
1425
|
+
theme?: CometChatTheme
|
|
1426
|
+
): string | JSX.Element {
|
|
1427
|
+
return CometChatConversationUtils.getMessagePreview(
|
|
1428
|
+
conversation.getLastMessage(),
|
|
1429
|
+
theme
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
getAllTextFormatters(loggedInUser?: CometChat.User): CometChatTextFormatter[] {
|
|
1434
|
+
return [
|
|
1435
|
+
ChatConfigurator.getDataSource().getMentionsFormatter(loggedInUser),
|
|
1436
|
+
ChatConfigurator.getDataSource().getUrlsFormatter(loggedInUser),
|
|
1437
|
+
];
|
|
1438
|
+
}
|
|
945
1439
|
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1440
|
+
getMentionsFormatter(loggedInUser?: CometChat.User): CometChatMentionsFormatter {
|
|
1441
|
+
return new CometChatMentionsFormatter(loggedInUser);
|
|
1442
|
+
}
|
|
949
1443
|
|
|
950
|
-
|
|
1444
|
+
getUrlsFormatter(loggedInUser?: CometChat.User): CometChatUrlsFormatter {
|
|
1445
|
+
return new CometChatUrlsFormatter(loggedInUser);
|
|
1446
|
+
}
|
|
1447
|
+
}
|