@cometchat/chat-uikit-react-native 4.2.2 → 4.3.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/README.md +26 -67
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +2 -1
- package/android/src/main/java/com/reactnativecometchatuikit/ReactVideoView.java +796 -0
- package/android/src/main/java/com/reactnativecometchatuikit/ReactVideoViewManager.java +172 -0
- package/android/src/main/java/com/scalablevideoview/BuildConfig.java +10 -0
- package/android/src/main/java/com/scalablevideoview/PivotPoint.java +13 -0
- package/android/src/main/java/com/scalablevideoview/ScalableType.java +34 -0
- package/android/src/main/java/com/scalablevideoview/ScalableVideoView.java +255 -0
- package/android/src/main/java/com/scalablevideoview/ScaleManager.java +188 -0
- package/android/src/main/java/com/scalablevideoview/Size.java +20 -0
- package/android/src/main/java/com/zipfile/APEZProvider.java +287 -0
- package/android/src/main/java/com/zipfile/APKExpansionSupport.java +81 -0
- package/android/src/main/java/com/zipfile/ZipResourceFile.java +428 -0
- package/android/src/main/res/values/attrs.xml +37 -0
- package/ios/FileManager.m +75 -5
- package/ios/Video/CCRCTVideo.h +67 -0
- package/ios/Video/CCRCTVideo.m +2031 -0
- package/ios/Video/CCRCTVideoManager.h +6 -0
- package/ios/Video/CCRCTVideoManager.m +133 -0
- package/ios/Video/CCRCTVideoPlayerViewController.h +20 -0
- package/ios/Video/CCRCTVideoPlayerViewController.m +43 -0
- package/ios/Video/CCRCTVideoPlayerViewControllerDelegate.h +7 -0
- package/ios/Video/UIView+FindUIViewController.h +15 -0
- package/ios/Video/UIView+FindUIViewController.m +21 -0
- package/ios/VideoCaching/RCTVideoCache.h +38 -0
- package/ios/VideoCaching/RCTVideoCache.m +174 -0
- package/ios/VideoPickerModule.h +7 -0
- package/ios/VideoPickerModule.mm +95 -0
- package/package.json +3 -4
- package/react-native-cometchat-ui-kit.podspec +24 -10
- package/src/CometChatContacts/CometChatContacts.tsx +12 -9
- package/src/CometChatConversations/CometChatConversations.tsx +84 -64
- package/src/CometChatDetails/CometChatDetails.tsx +14 -12
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +8 -4
- package/src/CometChatGroupMembers/resources/check.png +0 -0
- package/src/CometChatGroupMembers/resources/index.ts +2 -0
- package/src/CometChatGroups/CometChatGroups.tsx +4 -4
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +57 -15
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +9 -2
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +1 -1
- package/src/CometChatMessageList/CometChatMessageList.tsx +596 -181
- package/src/CometChatMessageList/MessageListConfiguration.ts +55 -4
- package/src/CometChatMessageList/resources/index.ts +5 -1
- package/src/CometChatMessageList/resources/leftarrowcurve.png +0 -0
- package/src/CometChatMessageList/resources/rightarrowcurve.png +0 -0
- package/src/CometChatMessages/CometChatMessages.tsx +1 -1
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +4 -12
- package/src/CometChatThreadedMessages/style.ts +3 -1
- package/src/CometChatUsers/CometChatUsers.tsx +1 -1
- package/src/calls/CallUtils.ts +4 -8
- package/src/calls/CallingExtentionDecorator.tsx +5 -2
- package/src/calls/CometChatCallBubble/styles.ts +2 -1
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +14 -3
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +9 -9
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +80 -73
- package/src/extensions/CollaborativeBubble/styles.ts +2 -0
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +11 -0
- package/src/extensions/index.ts +0 -4
- package/src/index.ts +53 -8
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +14 -2
- package/src/shared/constants/UIKitConstants.ts +1 -0
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +6 -0
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +8 -0
- package/src/shared/events/ListenerInitializer.ts +6 -0
- package/src/shared/events/messages.ts +2 -0
- package/src/shared/framework/MessageDataSource.tsx +29 -25
- package/src/shared/index.ts +49 -1
- package/src/shared/libs/VideoPlayer/DRMType.js +6 -0
- package/src/shared/libs/VideoPlayer/FilterType.js +18 -0
- package/src/shared/libs/VideoPlayer/TextTrackType.js +5 -0
- package/src/shared/libs/VideoPlayer/Video.js +519 -0
- package/src/shared/libs/VideoPlayer/VideoResizeMode.js +5 -0
- package/src/shared/libs/VideoPlayerControls/OSSupport/PlatformSupport.tsx +43 -0
- package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +16 -0
- package/src/shared/libs/VideoPlayerControls/OSSupport/index.tsx +1 -0
- package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +511 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/back.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/back@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/back@3x.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 +28 -0
- package/src/shared/libs/VideoPlayerControls/components/Back/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/BottomControls.tsx +142 -0
- package/src/shared/libs/VideoPlayerControls/components/Control.tsx +45 -0
- package/src/shared/libs/VideoPlayerControls/components/Error/Error.tsx +22 -0
- package/src/shared/libs/VideoPlayerControls/components/Error/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/Error/styles.ts +21 -0
- package/src/shared/libs/VideoPlayerControls/components/Fullscreen.tsx +36 -0
- package/src/shared/libs/VideoPlayerControls/components/Loader/Loader.tsx +15 -0
- package/src/shared/libs/VideoPlayerControls/components/Loader/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/Loader/styles.ts +16 -0
- package/src/shared/libs/VideoPlayerControls/components/NullControl.tsx +7 -0
- package/src/shared/libs/VideoPlayerControls/components/Overlay.tsx +23 -0
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/PlayPause.tsx +109 -0
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/styles.ts +21 -0
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/Seekbar.tsx +47 -0
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/styles.ts +37 -0
- package/src/shared/libs/VideoPlayerControls/components/Timer/Timer.tsx +28 -0
- package/src/shared/libs/VideoPlayerControls/components/Timer/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/Timer/styles.ts +12 -0
- package/src/shared/libs/VideoPlayerControls/components/Title.tsx +35 -0
- package/src/shared/libs/VideoPlayerControls/components/TopControls.tsx +110 -0
- package/src/shared/libs/VideoPlayerControls/components/Volume/Volume.tsx +37 -0
- package/src/shared/libs/VideoPlayerControls/components/Volume/index.ts +1 -0
- package/src/shared/libs/VideoPlayerControls/components/Volume/styles.ts +31 -0
- package/src/shared/libs/VideoPlayerControls/components/index.ts +14 -0
- package/src/shared/libs/VideoPlayerControls/components/styles.ts +30 -0
- package/src/shared/libs/VideoPlayerControls/hooks/index.ts +3 -0
- package/src/shared/libs/VideoPlayerControls/hooks/useAnimations.ts +68 -0
- package/src/shared/libs/VideoPlayerControls/hooks/useControlTimeout.tsx +67 -0
- package/src/shared/libs/VideoPlayerControls/hooks/usePanResponders.tsx +96 -0
- package/src/shared/libs/VideoPlayerControls/index.ts +4 -0
- package/src/shared/libs/VideoPlayerControls/styles.ts +19 -0
- package/src/shared/libs/VideoPlayerControls/types.ts +290 -0
- package/src/shared/libs/VideoPlayerControls/utils.ts +76 -0
- package/src/shared/modals/CometChatMessageTemplate.ts +113 -9
- package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +23 -21
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +6 -3
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +4 -1
- package/src/shared/resources/CometChatTheme/Palette.ts +79 -45
- package/src/shared/resources/CometChatTheme/Typography.ts +18 -0
- package/src/shared/utils/CommonUtils.ts +71 -0
- package/src/shared/utils/PermissionUtilIOS.ts +104 -0
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +3 -1
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +6 -6
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +28 -5
- package/src/shared/views/CometChatAudioBubble/style.ts +4 -2
- package/src/shared/views/CometChatAvatar/AvatarStyle.ts +1 -1
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +4 -3
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +47 -31
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +5 -5
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +12 -13
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +52 -5
- package/src/shared/views/CometChatFileBubble/style.ts +4 -2
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +25 -2
- package/src/shared/views/CometChatList/CometChatList.tsx +2 -1
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +51 -2
- package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +76 -0
- package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +12 -0
- package/src/shared/views/CometChatQuickReactions/QuickReactionsStyle.tsx +35 -0
- package/src/shared/views/CometChatQuickReactions/index.ts +12 -0
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +166 -0
- package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +12 -0
- package/src/shared/views/CometChatReactions/ReactionsStyle.tsx +43 -0
- package/src/shared/views/CometChatReactions/index.ts +12 -0
- package/src/{extensions/Reactions/CometChatMessageReactions → shared/views/CometChatReactions}/style.ts +7 -7
- package/src/shared/views/CometChatReactionsList/CometChatReactionsList.tsx +335 -0
- package/src/shared/views/CometChatReactionsList/ReactionsListConfiguration.tsx +14 -0
- package/src/shared/views/CometChatReactionsList/ReactionsListStyle.tsx +67 -0
- package/src/shared/views/CometChatReactionsList/index.ts +12 -0
- package/src/shared/views/CometChatReactionsList/resources/Spineer.png +0 -0
- package/src/shared/views/CometChatReactionsList/resources/index.ts +5 -0
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +21 -4
- package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +12 -0
- package/src/shared/views/CometChatReceipt/resources/error.png +0 -0
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +1 -1
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +78 -12
- package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +52 -2
- package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +134 -0
- package/src/shared/views/CometChatVideoPlayer/index.tsx +1 -0
- package/src/shared/views/index.ts +30 -0
- package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4.2/gc.properties +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.idea/gradle.xml +0 -13
- package/android/.idea/misc.xml +0 -8
- package/android/.idea/modules/android.iml +0 -18
- package/android/.idea/modules.xml +0 -8
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
- package/src/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.tsx +0 -249
- package/src/extensions/Reactions/CometChatMessageReactions/index.ts +0 -3
- package/src/extensions/Reactions/ReactionsDecorator.tsx +0 -164
- package/src/extensions/Reactions/ReactionsExtension.tsx +0 -48
- package/src/extensions/Reactions/index.ts +0 -4
- /package/src/{extensions/Reactions → shared/views/CometChatQuickReactions}/resources/AddReactions.png +0 -0
- /package/src/{extensions/Reactions → shared/views/CometChatQuickReactions}/resources/index.ts +0 -0
package/src/index.ts
CHANGED
|
@@ -141,7 +141,31 @@ import {
|
|
|
141
141
|
RadioButtonElement,
|
|
142
142
|
SingleSelectElement,
|
|
143
143
|
TextInputElement,
|
|
144
|
-
URLNavigationAction
|
|
144
|
+
URLNavigationAction,
|
|
145
|
+
|
|
146
|
+
CometChatReactions,
|
|
147
|
+
CometChatReactionsInterface,
|
|
148
|
+
ReactionsConfiguration,
|
|
149
|
+
ReactionsConfigurationInterface,
|
|
150
|
+
ReactionsStyle,
|
|
151
|
+
ReactionsStyleInterface,
|
|
152
|
+
CometChatReactionsList,
|
|
153
|
+
CometChatReactionsListInterface,
|
|
154
|
+
ReactionsListConfiguration,
|
|
155
|
+
ReactionsListConfigurationInterface,
|
|
156
|
+
ReactionListStyle,
|
|
157
|
+
ReactionListStyleInterface,
|
|
158
|
+
CometChatQuickReactions,
|
|
159
|
+
CometChatQuickReactionsInterface,
|
|
160
|
+
QuickReactionsConfiguration,
|
|
161
|
+
QuickReactionsConfigurationInterface,
|
|
162
|
+
QuickReactionsStyle,
|
|
163
|
+
QuickReactionsStyleInterface,
|
|
164
|
+
|
|
165
|
+
CometChatEmojiKeyboard,
|
|
166
|
+
EmojiKeyboardConfiguration,
|
|
167
|
+
EmojiKeyboardStyle,
|
|
168
|
+
|
|
145
169
|
} from './shared';
|
|
146
170
|
|
|
147
171
|
import {
|
|
@@ -357,9 +381,6 @@ import {
|
|
|
357
381
|
CometChatCreatePoll,
|
|
358
382
|
CometChatCreatePollInterface,
|
|
359
383
|
PollsConfigurationInterface, PollsExtension, PollsStyleInterface,
|
|
360
|
-
CometChatMessageReactions,
|
|
361
|
-
ReactionsExtension,
|
|
362
|
-
ReactionsConfigurationInterface,
|
|
363
384
|
SmartRepliesExtension,
|
|
364
385
|
SmartRepliesConfigurationInterface,
|
|
365
386
|
SmartRepliesInterface,
|
|
@@ -383,7 +404,6 @@ export {
|
|
|
383
404
|
LinkPreviewBubble,
|
|
384
405
|
LinkPreviewBubbleInterface,
|
|
385
406
|
LinkPreviewBubbleStyleInterface,
|
|
386
|
-
ReactionsConfigurationInterface,
|
|
387
407
|
TextModerationExtensionDecorator,
|
|
388
408
|
TextModerationExtension,
|
|
389
409
|
TextModerationConfigurationInterface,
|
|
@@ -422,8 +442,6 @@ export {
|
|
|
422
442
|
CometChatCreatePoll,
|
|
423
443
|
CometChatCreatePollInterface,
|
|
424
444
|
PollsConfigurationInterface, PollsExtension,
|
|
425
|
-
CometChatMessageReactions,
|
|
426
|
-
ReactionsExtension,
|
|
427
445
|
SmartRepliesExtension,
|
|
428
446
|
SmartRepliesInterface,
|
|
429
447
|
SmartRepliesView,
|
|
@@ -671,8 +689,35 @@ export {
|
|
|
671
689
|
CallLogRecordingsConfigurationInterface,
|
|
672
690
|
CallRecordingsStyle,
|
|
673
691
|
CallRecordingsStyleInterface,
|
|
674
|
-
CometChatCallLogRecordingsConfigurationInterface
|
|
692
|
+
CometChatCallLogRecordingsConfigurationInterface,
|
|
675
693
|
/*Call Logs */
|
|
694
|
+
|
|
695
|
+
/* Reactions */
|
|
696
|
+
CometChatReactions,
|
|
697
|
+
CometChatReactionsInterface,
|
|
698
|
+
ReactionsConfiguration,
|
|
699
|
+
ReactionsConfigurationInterface,
|
|
700
|
+
ReactionsStyle,
|
|
701
|
+
ReactionsStyleInterface,
|
|
702
|
+
CometChatReactionsList,
|
|
703
|
+
CometChatReactionsListInterface,
|
|
704
|
+
ReactionsListConfiguration,
|
|
705
|
+
ReactionsListConfigurationInterface,
|
|
706
|
+
ReactionListStyle,
|
|
707
|
+
ReactionListStyleInterface,
|
|
708
|
+
CometChatQuickReactions,
|
|
709
|
+
CometChatQuickReactionsInterface,
|
|
710
|
+
QuickReactionsConfiguration,
|
|
711
|
+
QuickReactionsConfigurationInterface,
|
|
712
|
+
QuickReactionsStyle,
|
|
713
|
+
QuickReactionsStyleInterface,
|
|
714
|
+
/* Reactions */
|
|
715
|
+
|
|
716
|
+
/* Emoji Keyboard */
|
|
717
|
+
CometChatEmojiKeyboard,
|
|
718
|
+
EmojiKeyboardConfiguration,
|
|
719
|
+
EmojiKeyboardStyle,
|
|
720
|
+
/* Emoji Keyboard */
|
|
676
721
|
|
|
677
722
|
};
|
|
678
723
|
|
|
@@ -8,7 +8,6 @@ import { CallingPackage } from "../../calls/CallingPackage";
|
|
|
8
8
|
import { StickersExtension } from "../../extensions/Stickers";
|
|
9
9
|
import { CollaborativeWhiteboardExtension } from "../../extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension";
|
|
10
10
|
import { LinkPreviewExtention } from "../../extensions/LinkPreview";
|
|
11
|
-
import { ReactionsExtension } from "../../extensions/Reactions";
|
|
12
11
|
import { CollaborativeDocumentExtension } from "../../extensions/CollaborativeDocument/CollaborativeDocumentExtension";
|
|
13
12
|
import { PollsExtension } from "../../extensions/Polls/PollsExtension";
|
|
14
13
|
import { SmartRepliesExtension } from "../../extensions/SmartReplies";
|
|
@@ -27,6 +26,7 @@ import { AISmartRepliesExtension } from "../../AI/AISmartReplies/AISmartReplies"
|
|
|
27
26
|
import { AIConversationSummaryExtension } from "../../AI/AIConversationSummary/AIConversationSummaryExtension";
|
|
28
27
|
import { AIAssistBotExtension } from "../../AI/AIAssistBot/AIAssistBotExtension";
|
|
29
28
|
import { SchedulerMessage } from "../modals/InteractiveData/InteractiveMessage";
|
|
29
|
+
import { permissionUtilIOS } from "../utils/PermissionUtilIOS";
|
|
30
30
|
|
|
31
31
|
export class CometChatUIKit {
|
|
32
32
|
static uiKitSettings: UIKitSettings;
|
|
@@ -51,6 +51,13 @@ export class CometChatUIKit {
|
|
|
51
51
|
() => {
|
|
52
52
|
CometChat.setSource("uikit-v4", Platform.OS, "react-native")
|
|
53
53
|
ListenerInitializer.attachListeners();
|
|
54
|
+
if (Platform.OS === "ios") {
|
|
55
|
+
permissionUtilIOS.init().then(res => {
|
|
56
|
+
if (res !== true) {
|
|
57
|
+
console.warn("[IOS] Permission initialization failed.");
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
}
|
|
54
61
|
}, error => {
|
|
55
62
|
// console.log("Initialization failed with error:", error);
|
|
56
63
|
}
|
|
@@ -67,7 +74,6 @@ export class CometChatUIKit {
|
|
|
67
74
|
new ThumbnailGenerationExtension(),
|
|
68
75
|
new LinkPreviewExtention(),
|
|
69
76
|
new PollsExtension(),
|
|
70
|
-
new ReactionsExtension(),
|
|
71
77
|
new ImageModerationExtension()
|
|
72
78
|
]
|
|
73
79
|
|
|
@@ -183,6 +189,8 @@ export class CometChatUIKit {
|
|
|
183
189
|
resolve(customMessage);
|
|
184
190
|
})
|
|
185
191
|
.catch(err => {
|
|
192
|
+
if(message.data)
|
|
193
|
+
message.data.metaData = { ...(message.data.metaData ? message.data.metaData : {}), error: true }
|
|
186
194
|
CometChatUIKitHelper.onMessageSent(message, messageStatus.error);
|
|
187
195
|
reject(err);
|
|
188
196
|
});
|
|
@@ -223,6 +231,8 @@ export class CometChatUIKit {
|
|
|
223
231
|
resolve(mediaMessage);
|
|
224
232
|
})
|
|
225
233
|
.catch(err => {
|
|
234
|
+
if(message.data)
|
|
235
|
+
message.data.metaData = { ...(message.data.metaData ? message.data.metaData : {}), error: true }
|
|
226
236
|
CometChatUIKitHelper.onMessageSent(message, messageStatus.error);
|
|
227
237
|
reject(err);
|
|
228
238
|
});
|
|
@@ -239,6 +249,8 @@ export class CometChatUIKit {
|
|
|
239
249
|
resolve(textMessage);
|
|
240
250
|
})
|
|
241
251
|
.catch(err => {
|
|
252
|
+
if(message.data)
|
|
253
|
+
message.data.metaData = { ...(message.data.metaData ? message.data.metaData : {}), error: true }
|
|
242
254
|
CometChatUIKitHelper.onMessageSent(message, messageStatus.error);
|
|
243
255
|
reject(err);
|
|
244
256
|
});
|
|
@@ -175,6 +175,12 @@ export class CometChatUIEventHandler {
|
|
|
175
175
|
case listener._eventListener.onInteractionGoalCompleted?.name:
|
|
176
176
|
listener._eventListener.onInteractionGoalCompleted(param);
|
|
177
177
|
break
|
|
178
|
+
case listener._eventListener.onMessageReactionRemoved?.name:
|
|
179
|
+
listener._eventListener.onMessageReactionRemoved(param);
|
|
180
|
+
break
|
|
181
|
+
case listener._eventListener.onMessageReactionAdded?.name:
|
|
182
|
+
listener._eventListener.onMessageReactionAdded(param);
|
|
183
|
+
break
|
|
178
184
|
|
|
179
185
|
}
|
|
180
186
|
});
|
|
@@ -31,6 +31,8 @@ type MessageUIEvents = {
|
|
|
31
31
|
onSchedulerMessageReceived?: Function,
|
|
32
32
|
onCustomInteractiveMessageReceived?: Function,
|
|
33
33
|
onInteractionGoalCompleted?: Function,
|
|
34
|
+
onMessageReactionAdded?: Function,
|
|
35
|
+
onMessageReactionRemoved?: Function,
|
|
34
36
|
|
|
35
37
|
// ccMessageForwarded?:Function,
|
|
36
38
|
}
|
|
@@ -58,6 +60,8 @@ export class MessageUIEventListener {
|
|
|
58
60
|
onSchedulerMessageReceived?: Function = undefined;
|
|
59
61
|
onCustomInteractiveMessageReceived?: Function = undefined;
|
|
60
62
|
onInteractionGoalCompleted?: Function = undefined;
|
|
63
|
+
onMessageReactionAdded?: Function = undefined;
|
|
64
|
+
onMessageReactionRemoved?: Function = undefined;
|
|
61
65
|
// ccMessageForwarded?:Function = undefined;
|
|
62
66
|
constructor({
|
|
63
67
|
ccMessageSent,
|
|
@@ -83,6 +87,8 @@ export class MessageUIEventListener {
|
|
|
83
87
|
onSchedulerMessageReceived,
|
|
84
88
|
onCustomInteractiveMessageReceived,
|
|
85
89
|
onInteractionGoalCompleted,
|
|
90
|
+
onMessageReactionAdded,
|
|
91
|
+
onMessageReactionRemoved,
|
|
86
92
|
// ccMessageForwarded,
|
|
87
93
|
}: MessageUIEvents) {
|
|
88
94
|
if (!isFalsy(ccMessageError)) this.ccMessageError = ccMessageError;
|
|
@@ -109,6 +115,8 @@ export class MessageUIEventListener {
|
|
|
109
115
|
if (!isFalsy(onSchedulerMessageReceived)) this.onSchedulerMessageReceived = onSchedulerMessageReceived;
|
|
110
116
|
if (!isFalsy(onCustomInteractiveMessageReceived)) this.onCustomInteractiveMessageReceived = onCustomInteractiveMessageReceived;
|
|
111
117
|
if (!isFalsy(onInteractionGoalCompleted)) this.onInteractionGoalCompleted = onInteractionGoalCompleted;
|
|
118
|
+
if (!isFalsy(onMessageReactionAdded)) this.onMessageReactionAdded = onMessageReactionAdded;
|
|
119
|
+
if (!isFalsy(onMessageReactionRemoved)) this.onMessageReactionRemoved = onMessageReactionRemoved;
|
|
112
120
|
|
|
113
121
|
// if (!isFalsy(ccMessageForwarded)) this.ccMessageForwarded = ccMessageForwarded;
|
|
114
122
|
}
|
|
@@ -70,6 +70,12 @@ export class ListenerInitializer {
|
|
|
70
70
|
},
|
|
71
71
|
onInteractionGoalCompleted: (reciept: CometChat.InteractionReceipt) => {
|
|
72
72
|
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onInteractionGoalCompleted, reciept);
|
|
73
|
+
},
|
|
74
|
+
onMessageReactionAdded: (message: CometChat.ReactionEvent) => {
|
|
75
|
+
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onMessageReactionAdded, message);
|
|
76
|
+
},
|
|
77
|
+
onMessageReactionRemoved: (message: CometChat.ReactionEvent) => {
|
|
78
|
+
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onMessageReactionRemoved, message);
|
|
73
79
|
}
|
|
74
80
|
});
|
|
75
81
|
}
|
|
@@ -23,4 +23,6 @@ export enum MessageEvents {
|
|
|
23
23
|
onSchedulerMessageReceived = "onSchedulerMessageReceived",
|
|
24
24
|
onInteractionGoalCompleted = "onInteractionGoalCompleted",
|
|
25
25
|
onCustomInteractiveMessageReceived = "onCustomInteractiveMessageReceived",
|
|
26
|
+
onMessageReactionAdded = "onMessageReactionAdded",
|
|
27
|
+
onMessageReactionRemoved = "onMessageReactionRemoved",
|
|
26
28
|
}
|
|
@@ -23,6 +23,7 @@ import { FormBubbleStyle } from "../views/CometChatFormBubble/FormBubbleStyle";
|
|
|
23
23
|
import { CardBubbleStyle } from "../views/CometChatCardBubble/CardBubbleStyle";
|
|
24
24
|
import { SchedulerMessage } from "../modals/InteractiveData/InteractiveMessage";
|
|
25
25
|
import { CometChatSchedulerBubble, SchedulerBubbleStyles } from "../views/CometChatSchedulerBubble";
|
|
26
|
+
import { View } from "react-native";
|
|
26
27
|
|
|
27
28
|
function isAudioMessage(message: CometChat.BaseMessage): message is CometChat.MediaMessage {
|
|
28
29
|
return message.getCategory() == CometChat.CATEGORY_MESSAGE &&
|
|
@@ -126,7 +127,7 @@ export class MessageDataSource implements DataSource {
|
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
isSentByMe(loggedInUser: CometChat.User, message: CometChat.BaseMessage) {
|
|
129
|
-
return loggedInUser.getUid() == message
|
|
130
|
+
return loggedInUser.getUid() == message?.getSender()?.getUid();
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group: CometChat.Group): CometChatMessageOption[] {
|
|
@@ -223,6 +224,7 @@ export class MessageDataSource implements DataSource {
|
|
|
223
224
|
let optionsList: Array<CometChatMessageOption> = [];
|
|
224
225
|
let _isSentByMe = this.isSentByMe(loggedInUser, messageObject);
|
|
225
226
|
let canDelete = false;
|
|
227
|
+
if (isDeletedMessage(messageObject)) return optionsList;
|
|
226
228
|
if ((group?.getScope() != undefined && group?.getScope() != GroupMemberScope.participant) || _isSentByMe) {
|
|
227
229
|
canDelete = true;
|
|
228
230
|
}
|
|
@@ -276,18 +278,20 @@ export class MessageDataSource implements DataSource {
|
|
|
276
278
|
}
|
|
277
279
|
|
|
278
280
|
getDeleteMessageBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element {
|
|
279
|
-
return <
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
281
|
+
return <View style={{ paddingBottom: 8, borderWidth: 1, borderStyle: "dashed", borderRadius: 8, borderColor: theme?.palette?.getAccent600() }}>
|
|
282
|
+
<CometChatTextBubble
|
|
283
|
+
textContainerStyle={{ marginStart: 4, marginEnd: 4 }}
|
|
284
|
+
text={localize("MESSAGE_IS_DELETED")}
|
|
285
|
+
style={{
|
|
286
|
+
backgroundColor: "transparent",
|
|
287
|
+
textFont: {
|
|
288
|
+
fontSize: theme?.typography?.subtitle2?.fontSize,
|
|
289
|
+
fontWeight: theme?.typography?.subtitle2?.fontWeight,
|
|
290
|
+
},
|
|
291
|
+
textColor: theme?.palette?.getAccent600()
|
|
292
|
+
}}
|
|
293
|
+
/>
|
|
294
|
+
</View>
|
|
291
295
|
}
|
|
292
296
|
|
|
293
297
|
getVideoMessageBubble(videoUrl: string, thumbnailUrl: string, message: CometChat.MediaMessage, theme: CometChatTheme, videoBubbleStyle: VideoBubbleStyleInterface) {
|
|
@@ -383,11 +387,11 @@ export class MessageDataSource implements DataSource {
|
|
|
383
387
|
getAudioMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignmentType, theme: CometChatTheme): JSX.Element {
|
|
384
388
|
let attachment = message.getAttachment();
|
|
385
389
|
return ChatConfigurator.dataSource.getAudioMessageBubble(attachment.getUrl(), attachment.getName(), {
|
|
386
|
-
iconTint:
|
|
387
|
-
backgroundColor:
|
|
388
|
-
titleColor:
|
|
390
|
+
iconTint: theme?.palette?.getPrimary(),
|
|
391
|
+
backgroundColor: "transparent",
|
|
392
|
+
titleColor: theme?.palette.getAccent(),
|
|
389
393
|
titleFont: theme?.typography.body,
|
|
390
|
-
subtitleColor:
|
|
394
|
+
subtitleColor: theme?.palette.getAccent(),
|
|
391
395
|
subtitleFont: theme?.typography.subtitle1,
|
|
392
396
|
}, message, theme);
|
|
393
397
|
}
|
|
@@ -399,9 +403,9 @@ export class MessageDataSource implements DataSource {
|
|
|
399
403
|
message,
|
|
400
404
|
theme,
|
|
401
405
|
{
|
|
402
|
-
backgroundColor:
|
|
406
|
+
backgroundColor: "transparent",
|
|
403
407
|
playIconBackgroundColor: theme?.palette?.getAccent50(),
|
|
404
|
-
playIconTint:
|
|
408
|
+
playIconTint: theme?.palette.getPrimary(),
|
|
405
409
|
}
|
|
406
410
|
);
|
|
407
411
|
}
|
|
@@ -412,18 +416,18 @@ export class MessageDataSource implements DataSource {
|
|
|
412
416
|
url = message['data']['url'];
|
|
413
417
|
|
|
414
418
|
return ChatConfigurator.dataSource.getImageMessageBubble(url, attachment.getName(), {
|
|
415
|
-
backgroundColor:
|
|
419
|
+
backgroundColor: theme?.palette.getAccent50()
|
|
416
420
|
}, message, theme);
|
|
417
421
|
}
|
|
418
422
|
getFileMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignmentType, theme: CometChatTheme): JSX.Element {
|
|
419
423
|
let attachment = message.getAttachment();
|
|
420
424
|
return ChatConfigurator.dataSource.getFileMessageBubble(attachment.getUrl(), attachment.getName(),
|
|
421
425
|
{
|
|
422
|
-
iconTint:
|
|
423
|
-
backgroundColor:
|
|
424
|
-
titleColor:
|
|
426
|
+
iconTint: theme?.palette?.getPrimary(),
|
|
427
|
+
backgroundColor: "transparent",
|
|
428
|
+
titleColor: theme?.palette.getAccent(),
|
|
425
429
|
titleFont: theme?.typography.body,
|
|
426
|
-
subtitleColor:
|
|
430
|
+
subtitleColor: theme?.palette.getAccent(),
|
|
427
431
|
subtitleFont: theme?.typography.subtitle1,
|
|
428
432
|
}
|
|
429
433
|
, message, theme);
|
|
@@ -620,7 +624,7 @@ export class MessageDataSource implements DataSource {
|
|
|
620
624
|
getAllMessageCategories(): string[] {
|
|
621
625
|
return [MessageCategoryConstants.message, MessageCategoryConstants.action, MessageCategoryConstants.interactive];
|
|
622
626
|
}
|
|
623
|
-
getAuxiliaryOptions(user: CometChat.User, group: CometChat.Group, id: Map<string, any>, theme?:CometChatTheme): JSX.Element[] {
|
|
627
|
+
getAuxiliaryOptions(user: CometChat.User, group: CometChat.Group, id: Map<string, any>, theme?: CometChatTheme): JSX.Element[] {
|
|
624
628
|
return [];
|
|
625
629
|
}
|
|
626
630
|
getAuxiliaryHeaderAppbarOptions(user?: CometChat.User, group?: CometChat.Group): JSX.Element {
|
package/src/shared/index.ts
CHANGED
|
@@ -138,6 +138,30 @@ import {
|
|
|
138
138
|
CometChatFormBubbleInterface,
|
|
139
139
|
CometChatCardBubble,
|
|
140
140
|
CometChatCardBubbleInterface,
|
|
141
|
+
|
|
142
|
+
CometChatReactions,
|
|
143
|
+
CometChatReactionsInterface,
|
|
144
|
+
ReactionsConfiguration,
|
|
145
|
+
ReactionsConfigurationInterface,
|
|
146
|
+
ReactionsStyle,
|
|
147
|
+
ReactionsStyleInterface,
|
|
148
|
+
CometChatReactionsList,
|
|
149
|
+
CometChatReactionsListInterface,
|
|
150
|
+
ReactionsListConfiguration,
|
|
151
|
+
ReactionsListConfigurationInterface,
|
|
152
|
+
ReactionListStyle,
|
|
153
|
+
ReactionListStyleInterface,
|
|
154
|
+
CometChatQuickReactions,
|
|
155
|
+
CometChatQuickReactionsInterface,
|
|
156
|
+
QuickReactionsConfiguration,
|
|
157
|
+
QuickReactionsConfigurationInterface,
|
|
158
|
+
QuickReactionsStyle,
|
|
159
|
+
QuickReactionsStyleInterface,
|
|
160
|
+
|
|
161
|
+
CometChatEmojiKeyboard,
|
|
162
|
+
EmojiKeyboardConfiguration,
|
|
163
|
+
EmojiKeyboardStyle,
|
|
164
|
+
|
|
141
165
|
CometChatSchedulerBubble,
|
|
142
166
|
CometChatSchedulerBubbleInterface
|
|
143
167
|
} from './views';
|
|
@@ -312,5 +336,29 @@ export {
|
|
|
312
336
|
RadioButtonElement,
|
|
313
337
|
SingleSelectElement,
|
|
314
338
|
TextInputElement,
|
|
315
|
-
URLNavigationAction
|
|
339
|
+
URLNavigationAction,
|
|
340
|
+
|
|
341
|
+
CometChatReactions,
|
|
342
|
+
CometChatReactionsInterface,
|
|
343
|
+
ReactionsConfiguration,
|
|
344
|
+
ReactionsConfigurationInterface,
|
|
345
|
+
ReactionsStyle,
|
|
346
|
+
ReactionsStyleInterface,
|
|
347
|
+
CometChatReactionsList,
|
|
348
|
+
CometChatReactionsListInterface,
|
|
349
|
+
ReactionsListConfiguration,
|
|
350
|
+
ReactionsListConfigurationInterface,
|
|
351
|
+
ReactionListStyle,
|
|
352
|
+
ReactionListStyleInterface,
|
|
353
|
+
CometChatQuickReactions,
|
|
354
|
+
CometChatQuickReactionsInterface,
|
|
355
|
+
QuickReactionsConfiguration,
|
|
356
|
+
QuickReactionsConfigurationInterface,
|
|
357
|
+
QuickReactionsStyle,
|
|
358
|
+
QuickReactionsStyleInterface,
|
|
359
|
+
|
|
360
|
+
CometChatEmojiKeyboard,
|
|
361
|
+
EmojiKeyboardConfiguration,
|
|
362
|
+
EmojiKeyboardStyle,
|
|
363
|
+
|
|
316
364
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
NONE: '',
|
|
3
|
+
INVERT: 'CIColorInvert',
|
|
4
|
+
MONOCHROME: 'CIColorMonochrome',
|
|
5
|
+
POSTERIZE: 'CIColorPosterize',
|
|
6
|
+
FALSE: 'CIFalseColor',
|
|
7
|
+
MAXIMUMCOMPONENT: 'CIMaximumComponent',
|
|
8
|
+
MINIMUMCOMPONENT: 'CIMinimumComponent',
|
|
9
|
+
CHROME: 'CIPhotoEffectChrome',
|
|
10
|
+
FADE: 'CIPhotoEffectFade',
|
|
11
|
+
INSTANT: 'CIPhotoEffectInstant',
|
|
12
|
+
MONO: 'CIPhotoEffectMono',
|
|
13
|
+
NOIR: 'CIPhotoEffectNoir',
|
|
14
|
+
PROCESS: 'CIPhotoEffectProcess',
|
|
15
|
+
TONAL: 'CIPhotoEffectTonal',
|
|
16
|
+
TRANSFER: 'CIPhotoEffectTransfer',
|
|
17
|
+
SEPIA: 'CISepiaTone',
|
|
18
|
+
};
|