@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.
Files changed (227) hide show
  1. package/README.md +26 -67
  2. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  3. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  4. package/android/build.gradle +1 -1
  5. package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +2 -1
  6. package/android/src/main/java/com/reactnativecometchatuikit/ReactVideoView.java +796 -0
  7. package/android/src/main/java/com/reactnativecometchatuikit/ReactVideoViewManager.java +172 -0
  8. package/android/src/main/java/com/scalablevideoview/BuildConfig.java +10 -0
  9. package/android/src/main/java/com/scalablevideoview/PivotPoint.java +13 -0
  10. package/android/src/main/java/com/scalablevideoview/ScalableType.java +34 -0
  11. package/android/src/main/java/com/scalablevideoview/ScalableVideoView.java +255 -0
  12. package/android/src/main/java/com/scalablevideoview/ScaleManager.java +188 -0
  13. package/android/src/main/java/com/scalablevideoview/Size.java +20 -0
  14. package/android/src/main/java/com/zipfile/APEZProvider.java +287 -0
  15. package/android/src/main/java/com/zipfile/APKExpansionSupport.java +81 -0
  16. package/android/src/main/java/com/zipfile/ZipResourceFile.java +428 -0
  17. package/android/src/main/res/values/attrs.xml +37 -0
  18. package/ios/FileManager.m +75 -5
  19. package/ios/Video/CCRCTVideo.h +67 -0
  20. package/ios/Video/CCRCTVideo.m +2031 -0
  21. package/ios/Video/CCRCTVideoManager.h +6 -0
  22. package/ios/Video/CCRCTVideoManager.m +133 -0
  23. package/ios/Video/CCRCTVideoPlayerViewController.h +20 -0
  24. package/ios/Video/CCRCTVideoPlayerViewController.m +43 -0
  25. package/ios/Video/CCRCTVideoPlayerViewControllerDelegate.h +7 -0
  26. package/ios/Video/UIView+FindUIViewController.h +15 -0
  27. package/ios/Video/UIView+FindUIViewController.m +21 -0
  28. package/ios/VideoCaching/RCTVideoCache.h +38 -0
  29. package/ios/VideoCaching/RCTVideoCache.m +174 -0
  30. package/ios/VideoPickerModule.h +7 -0
  31. package/ios/VideoPickerModule.mm +95 -0
  32. package/package.json +3 -4
  33. package/react-native-cometchat-ui-kit.podspec +24 -10
  34. package/src/CometChatContacts/CometChatContacts.tsx +12 -9
  35. package/src/CometChatConversations/CometChatConversations.tsx +84 -64
  36. package/src/CometChatDetails/CometChatDetails.tsx +14 -12
  37. package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +8 -4
  38. package/src/CometChatGroupMembers/resources/check.png +0 -0
  39. package/src/CometChatGroupMembers/resources/index.ts +2 -0
  40. package/src/CometChatGroups/CometChatGroups.tsx +4 -4
  41. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +57 -15
  42. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +9 -2
  43. package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +1 -1
  44. package/src/CometChatMessageList/CometChatMessageList.tsx +596 -181
  45. package/src/CometChatMessageList/MessageListConfiguration.ts +55 -4
  46. package/src/CometChatMessageList/resources/index.ts +5 -1
  47. package/src/CometChatMessageList/resources/leftarrowcurve.png +0 -0
  48. package/src/CometChatMessageList/resources/rightarrowcurve.png +0 -0
  49. package/src/CometChatMessages/CometChatMessages.tsx +1 -1
  50. package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +4 -12
  51. package/src/CometChatThreadedMessages/style.ts +3 -1
  52. package/src/CometChatUsers/CometChatUsers.tsx +1 -1
  53. package/src/calls/CallUtils.ts +4 -8
  54. package/src/calls/CallingExtentionDecorator.tsx +5 -2
  55. package/src/calls/CometChatCallBubble/styles.ts +2 -1
  56. package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +14 -3
  57. package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +9 -9
  58. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +80 -73
  59. package/src/extensions/CollaborativeBubble/styles.ts +2 -0
  60. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +11 -0
  61. package/src/extensions/index.ts +0 -4
  62. package/src/index.ts +53 -8
  63. package/src/shared/CometChatUiKit/CometChatUIKit.ts +14 -2
  64. package/src/shared/constants/UIKitConstants.ts +1 -0
  65. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +6 -0
  66. package/src/shared/events/CometChatUIEventHandler/Listener.ts +8 -0
  67. package/src/shared/events/ListenerInitializer.ts +6 -0
  68. package/src/shared/events/messages.ts +2 -0
  69. package/src/shared/framework/MessageDataSource.tsx +29 -25
  70. package/src/shared/index.ts +49 -1
  71. package/src/shared/libs/VideoPlayer/DRMType.js +6 -0
  72. package/src/shared/libs/VideoPlayer/FilterType.js +18 -0
  73. package/src/shared/libs/VideoPlayer/TextTrackType.js +5 -0
  74. package/src/shared/libs/VideoPlayer/Video.js +519 -0
  75. package/src/shared/libs/VideoPlayer/VideoResizeMode.js +5 -0
  76. package/src/shared/libs/VideoPlayerControls/OSSupport/PlatformSupport.tsx +43 -0
  77. package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +16 -0
  78. package/src/shared/libs/VideoPlayerControls/OSSupport/index.tsx +1 -0
  79. package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +511 -0
  80. package/src/shared/libs/VideoPlayerControls/assets/img/back.png +0 -0
  81. package/src/shared/libs/VideoPlayerControls/assets/img/back@2x.png +0 -0
  82. package/src/shared/libs/VideoPlayerControls/assets/img/back@3x.png +0 -0
  83. package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette.png +0 -0
  84. package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@2x.png +0 -0
  85. package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@3x.png +0 -0
  86. package/src/shared/libs/VideoPlayerControls/assets/img/error-icon.png +0 -0
  87. package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@2x.png +0 -0
  88. package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@3x.png +0 -0
  89. package/src/shared/libs/VideoPlayerControls/assets/img/expand.png +0 -0
  90. package/src/shared/libs/VideoPlayerControls/assets/img/expand@2x.png +0 -0
  91. package/src/shared/libs/VideoPlayerControls/assets/img/expand@3x.png +0 -0
  92. package/src/shared/libs/VideoPlayerControls/assets/img/forward.png +0 -0
  93. package/src/shared/libs/VideoPlayerControls/assets/img/forward@2x.png +0 -0
  94. package/src/shared/libs/VideoPlayerControls/assets/img/forward@3x.png +0 -0
  95. package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon.png +0 -0
  96. package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@2x.png +0 -0
  97. package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@3x.png +0 -0
  98. package/src/shared/libs/VideoPlayerControls/assets/img/pause.png +0 -0
  99. package/src/shared/libs/VideoPlayerControls/assets/img/pause@2x.png +0 -0
  100. package/src/shared/libs/VideoPlayerControls/assets/img/pause@3x.png +0 -0
  101. package/src/shared/libs/VideoPlayerControls/assets/img/play.png +0 -0
  102. package/src/shared/libs/VideoPlayerControls/assets/img/play@2x.png +0 -0
  103. package/src/shared/libs/VideoPlayerControls/assets/img/play@3x.png +0 -0
  104. package/src/shared/libs/VideoPlayerControls/assets/img/rewind.png +0 -0
  105. package/src/shared/libs/VideoPlayerControls/assets/img/rewind@2x.png +0 -0
  106. package/src/shared/libs/VideoPlayerControls/assets/img/rewind@3x.png +0 -0
  107. package/src/shared/libs/VideoPlayerControls/assets/img/shrink.png +0 -0
  108. package/src/shared/libs/VideoPlayerControls/assets/img/shrink@2x.png +0 -0
  109. package/src/shared/libs/VideoPlayerControls/assets/img/shrink@3x.png +0 -0
  110. package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette.png +0 -0
  111. package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@2x.png +0 -0
  112. package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@3x.png +0 -0
  113. package/src/shared/libs/VideoPlayerControls/assets/img/volume.png +0 -0
  114. package/src/shared/libs/VideoPlayerControls/assets/img/volume@2x.png +0 -0
  115. package/src/shared/libs/VideoPlayerControls/assets/img/volume@3x.png +0 -0
  116. package/src/shared/libs/VideoPlayerControls/components/Back/Back.tsx +28 -0
  117. package/src/shared/libs/VideoPlayerControls/components/Back/index.ts +1 -0
  118. package/src/shared/libs/VideoPlayerControls/components/BottomControls.tsx +142 -0
  119. package/src/shared/libs/VideoPlayerControls/components/Control.tsx +45 -0
  120. package/src/shared/libs/VideoPlayerControls/components/Error/Error.tsx +22 -0
  121. package/src/shared/libs/VideoPlayerControls/components/Error/index.ts +1 -0
  122. package/src/shared/libs/VideoPlayerControls/components/Error/styles.ts +21 -0
  123. package/src/shared/libs/VideoPlayerControls/components/Fullscreen.tsx +36 -0
  124. package/src/shared/libs/VideoPlayerControls/components/Loader/Loader.tsx +15 -0
  125. package/src/shared/libs/VideoPlayerControls/components/Loader/index.ts +1 -0
  126. package/src/shared/libs/VideoPlayerControls/components/Loader/styles.ts +16 -0
  127. package/src/shared/libs/VideoPlayerControls/components/NullControl.tsx +7 -0
  128. package/src/shared/libs/VideoPlayerControls/components/Overlay.tsx +23 -0
  129. package/src/shared/libs/VideoPlayerControls/components/PlayPause/PlayPause.tsx +109 -0
  130. package/src/shared/libs/VideoPlayerControls/components/PlayPause/index.ts +1 -0
  131. package/src/shared/libs/VideoPlayerControls/components/PlayPause/styles.ts +21 -0
  132. package/src/shared/libs/VideoPlayerControls/components/Seekbar/Seekbar.tsx +47 -0
  133. package/src/shared/libs/VideoPlayerControls/components/Seekbar/index.ts +1 -0
  134. package/src/shared/libs/VideoPlayerControls/components/Seekbar/styles.ts +37 -0
  135. package/src/shared/libs/VideoPlayerControls/components/Timer/Timer.tsx +28 -0
  136. package/src/shared/libs/VideoPlayerControls/components/Timer/index.ts +1 -0
  137. package/src/shared/libs/VideoPlayerControls/components/Timer/styles.ts +12 -0
  138. package/src/shared/libs/VideoPlayerControls/components/Title.tsx +35 -0
  139. package/src/shared/libs/VideoPlayerControls/components/TopControls.tsx +110 -0
  140. package/src/shared/libs/VideoPlayerControls/components/Volume/Volume.tsx +37 -0
  141. package/src/shared/libs/VideoPlayerControls/components/Volume/index.ts +1 -0
  142. package/src/shared/libs/VideoPlayerControls/components/Volume/styles.ts +31 -0
  143. package/src/shared/libs/VideoPlayerControls/components/index.ts +14 -0
  144. package/src/shared/libs/VideoPlayerControls/components/styles.ts +30 -0
  145. package/src/shared/libs/VideoPlayerControls/hooks/index.ts +3 -0
  146. package/src/shared/libs/VideoPlayerControls/hooks/useAnimations.ts +68 -0
  147. package/src/shared/libs/VideoPlayerControls/hooks/useControlTimeout.tsx +67 -0
  148. package/src/shared/libs/VideoPlayerControls/hooks/usePanResponders.tsx +96 -0
  149. package/src/shared/libs/VideoPlayerControls/index.ts +4 -0
  150. package/src/shared/libs/VideoPlayerControls/styles.ts +19 -0
  151. package/src/shared/libs/VideoPlayerControls/types.ts +290 -0
  152. package/src/shared/libs/VideoPlayerControls/utils.ts +76 -0
  153. package/src/shared/modals/CometChatMessageTemplate.ts +113 -9
  154. package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +23 -21
  155. package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +4 -1
  156. package/src/shared/resources/CometChatLocalize/resources/de/translation.json +4 -1
  157. package/src/shared/resources/CometChatLocalize/resources/en/translation.json +6 -3
  158. package/src/shared/resources/CometChatLocalize/resources/es/translation.json +4 -1
  159. package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +4 -1
  160. package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +4 -1
  161. package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +4 -1
  162. package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +4 -1
  163. package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +4 -1
  164. package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +4 -1
  165. package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +4 -1
  166. package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +4 -1
  167. package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +4 -1
  168. package/src/shared/resources/CometChatTheme/Palette.ts +79 -45
  169. package/src/shared/resources/CometChatTheme/Typography.ts +18 -0
  170. package/src/shared/utils/CommonUtils.ts +71 -0
  171. package/src/shared/utils/PermissionUtilIOS.ts +104 -0
  172. package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +3 -1
  173. package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +6 -6
  174. package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +28 -5
  175. package/src/shared/views/CometChatAudioBubble/style.ts +4 -2
  176. package/src/shared/views/CometChatAvatar/AvatarStyle.ts +1 -1
  177. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +4 -3
  178. package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +47 -31
  179. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +5 -5
  180. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +12 -13
  181. package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +52 -5
  182. package/src/shared/views/CometChatFileBubble/style.ts +4 -2
  183. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +25 -2
  184. package/src/shared/views/CometChatList/CometChatList.tsx +2 -1
  185. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +51 -2
  186. package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +76 -0
  187. package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +12 -0
  188. package/src/shared/views/CometChatQuickReactions/QuickReactionsStyle.tsx +35 -0
  189. package/src/shared/views/CometChatQuickReactions/index.ts +12 -0
  190. package/src/shared/views/CometChatReactions/CometChatReactions.tsx +166 -0
  191. package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +12 -0
  192. package/src/shared/views/CometChatReactions/ReactionsStyle.tsx +43 -0
  193. package/src/shared/views/CometChatReactions/index.ts +12 -0
  194. package/src/{extensions/Reactions/CometChatMessageReactions → shared/views/CometChatReactions}/style.ts +7 -7
  195. package/src/shared/views/CometChatReactionsList/CometChatReactionsList.tsx +335 -0
  196. package/src/shared/views/CometChatReactionsList/ReactionsListConfiguration.tsx +14 -0
  197. package/src/shared/views/CometChatReactionsList/ReactionsListStyle.tsx +67 -0
  198. package/src/shared/views/CometChatReactionsList/index.ts +12 -0
  199. package/src/shared/views/CometChatReactionsList/resources/Spineer.png +0 -0
  200. package/src/shared/views/CometChatReactionsList/resources/index.ts +5 -0
  201. package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +21 -4
  202. package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +12 -0
  203. package/src/shared/views/CometChatReceipt/resources/error.png +0 -0
  204. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +1 -1
  205. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +78 -12
  206. package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +52 -2
  207. package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +134 -0
  208. package/src/shared/views/CometChatVideoPlayer/index.tsx +1 -0
  209. package/src/shared/views/index.ts +30 -0
  210. package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
  211. package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
  212. package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
  213. package/android/.gradle/7.4.2/gc.properties +0 -0
  214. package/android/.gradle/checksums/checksums.lock +0 -0
  215. package/android/.idea/gradle.xml +0 -13
  216. package/android/.idea/misc.xml +0 -8
  217. package/android/.idea/modules/android.iml +0 -18
  218. package/android/.idea/modules.xml +0 -8
  219. package/android/.idea/vcs.xml +0 -6
  220. package/android/local.properties +0 -8
  221. package/src/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.tsx +0 -249
  222. package/src/extensions/Reactions/CometChatMessageReactions/index.ts +0 -3
  223. package/src/extensions/Reactions/ReactionsDecorator.tsx +0 -164
  224. package/src/extensions/Reactions/ReactionsExtension.tsx +0 -48
  225. package/src/extensions/Reactions/index.ts +0 -4
  226. /package/src/{extensions/Reactions → shared/views/CometChatQuickReactions}/resources/AddReactions.png +0 -0
  227. /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
  });
@@ -284,6 +284,7 @@ export type MessageTimeAlignmentType = "top" | "bottom"
284
284
  export const MessageStatusConstants = Object.freeze({
285
285
  inprogress: "inprogress",
286
286
  success: "success",
287
+ error: "error"
287
288
  });
288
289
 
289
290
  export const GroupsConstants = {
@@ -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.getSender().getUid();
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 <CometChatTextBubble
280
- textContainerStyle={{ marginStart: 4, marginEnd: 4 }}
281
- text={localize("MESSAGE_IS_DELETED")}
282
- style={{
283
- backgroundColor: "transparent",
284
- textFont: {
285
- fontSize: theme?.typography?.subtitle2?.fontSize,
286
- fontWeight: theme?.typography?.subtitle2?.fontWeight,
287
- },
288
- textColor: theme?.palette?.getAccent600()
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: alignment == "right" ? theme?.palette?.getSecondary() : theme?.palette?.getPrimary(),
387
- backgroundColor: alignment == "left" ? theme?.palette?.getAccent50() : theme?.palette?.getPrimary(),
388
- titleColor: alignment == "right" ? theme?.palette.getSecondary() : theme?.palette.getAccent(),
390
+ iconTint: theme?.palette?.getPrimary(),
391
+ backgroundColor: "transparent",
392
+ titleColor: theme?.palette.getAccent(),
389
393
  titleFont: theme?.typography.body,
390
- subtitleColor: alignment == "right" ? theme?.palette.getSecondary() : theme?.palette.getAccent(),
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: alignment == "left" ? theme?.palette.getAccent50() : theme?.palette.getPrimary(),
406
+ backgroundColor: "transparent",
403
407
  playIconBackgroundColor: theme?.palette?.getAccent50(),
404
- playIconTint: alignment == "left" ? theme?.palette.getPrimary() : theme?.palette.getSecondary(),
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: alignment == "left" ? theme?.palette.getAccent50() : theme?.palette.getPrimary()
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: alignment == "right" ? theme?.palette.getSecondary() : theme?.palette?.getPrimary(),
423
- backgroundColor: alignment == "left" ? theme?.palette.getAccent50() : theme?.palette.getPrimary(),
424
- titleColor: alignment == "right" ? theme?.palette.getSecondary() : theme?.palette.getAccent(),
426
+ iconTint: theme?.palette?.getPrimary(),
427
+ backgroundColor: "transparent",
428
+ titleColor: theme?.palette.getAccent(),
425
429
  titleFont: theme?.typography.body,
426
- subtitleColor: alignment == "right" ? theme?.palette.getSecondary() : theme?.palette.getAccent(),
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 {
@@ -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,6 @@
1
+ export default {
2
+ WIDEVINE: 'widevine',
3
+ PLAYREADY: 'playready',
4
+ CLEARKEY: 'clearkey',
5
+ FAIRPLAY: 'fairplay'
6
+ };
@@ -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
+ };
@@ -0,0 +1,5 @@
1
+ export default {
2
+ SRT: 'application/x-subrip',
3
+ TTML: 'application/ttml+xml',
4
+ VTT: 'text/vtt',
5
+ };