@cometchat/chat-uikit-react-native 4.3.16 → 4.3.17

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 (388) hide show
  1. package/package.json +1 -1
  2. package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +20 -15
  3. package/src/AI/AIAssistBot/AIAssistBotStyle.ts +2 -2
  4. package/src/AI/AIAssistBot/AIAssistBotView.tsx +16 -14
  5. package/src/AI/AIAssistBot/configuration.ts +8 -7
  6. package/src/AI/AIAssistBot/resources/index.ts +1 -0
  7. package/src/AI/AIBaseConfiguration.ts +1 -0
  8. package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +27 -26
  9. package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +1 -0
  10. package/src/AI/AIConversationStarter/style.ts +29 -31
  11. package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +14 -13
  12. package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +5 -4
  13. package/src/AI/AIConversationSummary/resources/index.ts +1 -0
  14. package/src/AI/AIExtensionDataSource.ts +1 -0
  15. package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +28 -27
  16. package/src/AI/AISmartReplies/configuration.ts +2 -0
  17. package/src/AI/CardView.tsx +5 -5
  18. package/src/AI/resources/index.ts +3 -0
  19. package/src/AI/style.ts +68 -80
  20. package/src/CometChatAddMembers/AddMembersConfiguration.tsx +1 -0
  21. package/src/CometChatAddMembers/CometChatAddMembers.tsx +12 -12
  22. package/src/CometChatAddMembers/index.ts +10 -8
  23. package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +1 -0
  24. package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +8 -8
  25. package/src/CometChatBannedMembers/index.ts +12 -7
  26. package/src/CometChatBannedMembers/resources/index.ts +1 -0
  27. package/src/CometChatContacts/CometChatContacts.tsx +9 -9
  28. package/src/CometChatContacts/ContactsConfiguration.tsx +1 -0
  29. package/src/CometChatContacts/Header.tsx +4 -4
  30. package/src/CometChatContacts/index.ts +5 -3
  31. package/src/CometChatConversations/CometChatConversations.tsx +204 -172
  32. package/src/CometChatConversations/index.ts +21 -10
  33. package/src/CometChatConversations/resources/index.ts +14 -0
  34. package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +6 -5
  35. package/src/CometChatConversationsWithMessages/index.ts +6 -5
  36. package/src/CometChatConversationsWithMessages/resources/index.ts +1 -0
  37. package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +30 -30
  38. package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +1 -0
  39. package/src/CometChatCreateGroup/Header.tsx +1 -1
  40. package/src/CometChatCreateGroup/index.ts +5 -6
  41. package/src/CometChatCreateGroup/resources/index.ts +3 -0
  42. package/src/CometChatDetails/CometChatDetails.tsx +29 -28
  43. package/src/CometChatDetails/DetailsConfiguration.tsx +1 -0
  44. package/src/CometChatDetails/Header.tsx +1 -1
  45. package/src/CometChatDetails/index.ts +17 -15
  46. package/src/CometChatDetails/listners.ts +16 -16
  47. package/src/CometChatDetails/resources/index.ts +5 -0
  48. package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +52 -52
  49. package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +1 -1
  50. package/src/CometChatGroupMembers/GroupMemberStyle.ts +3 -3
  51. package/src/CometChatGroupMembers/index.ts +8 -16
  52. package/src/CometChatGroupMembers/resources/index.ts +5 -0
  53. package/src/CometChatGroups/CometChatGroups.tsx +46 -46
  54. package/src/CometChatGroups/GroupsConfiguration.ts +10 -9
  55. package/src/CometChatGroups/GroupsStyle.ts +1 -1
  56. package/src/CometChatGroups/index.ts +11 -10
  57. package/src/CometChatGroups/resources/index.ts +10 -0
  58. package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +9 -8
  59. package/src/CometChatGroupsWithMessages/index.ts +6 -5
  60. package/src/CometChatGroupsWithMessages/resources/index.ts +1 -0
  61. package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +22 -21
  62. package/src/CometChatJoinProtectedGroup/Header.tsx +1 -1
  63. package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +1 -0
  64. package/src/CometChatJoinProtectedGroup/index.ts +5 -6
  65. package/src/CometChatJoinProtectedGroup/resources/index.ts +2 -0
  66. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +62 -59
  67. package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +1 -0
  68. package/src/CometChatMessageComposer/index.ts +6 -7
  69. package/src/CometChatMessageComposer/resources/index.ts +10 -0
  70. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +33 -31
  71. package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +1 -0
  72. package/src/CometChatMessageHeader/index.ts +12 -13
  73. package/src/CometChatMessageHeader/listners.ts +18 -18
  74. package/src/CometChatMessageHeader/resources/index.ts +3 -0
  75. package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +28 -24
  76. package/src/CometChatMessageInformation/index.ts +8 -8
  77. package/src/CometChatMessageInformation/resources/index.ts +1 -0
  78. package/src/CometChatMessageList/CometChatMessageList.tsx +214 -195
  79. package/src/CometChatMessageList/MessageListConfiguration.ts +26 -25
  80. package/src/CometChatMessageList/index.ts +16 -18
  81. package/src/CometChatMessageList/resources/index.ts +7 -0
  82. package/src/CometChatMessages/CometChatMessages.tsx +29 -26
  83. package/src/CometChatMessages/MessagesConfiguration.ts +2 -0
  84. package/src/CometChatMessages/index.ts +8 -7
  85. package/src/CometChatMessages/resources/index.ts +1 -0
  86. package/src/CometChatTabs/CometChatTabs.tsx +13 -23
  87. package/src/CometChatTabs/CometChatTabsStyle.ts +2 -0
  88. package/src/CometChatTabs/index.ts +3 -8
  89. package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +37 -37
  90. package/src/CometChatThreadedMessages/Header.tsx +2 -2
  91. package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +1 -0
  92. package/src/CometChatThreadedMessages/index.ts +11 -12
  93. package/src/CometChatThreadedMessages/resources/index.ts +6 -0
  94. package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +5 -5
  95. package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +1 -0
  96. package/src/CometChatTransferOwnership/index.ts +10 -11
  97. package/src/CometChatUsers/CometChatUsers.tsx +11 -11
  98. package/src/CometChatUsers/UsersConfiguration.tsx +1 -0
  99. package/src/CometChatUsers/index.ts +8 -6
  100. package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +6 -5
  101. package/src/CometChatUsersWithMessages/index.ts +6 -5
  102. package/src/calls/CallUtils.ts +4 -3
  103. package/src/calls/CallingDetailsUtils.tsx +9 -8
  104. package/src/calls/CallingExtension.tsx +2 -2
  105. package/src/calls/CallingExtentionDecorator.tsx +17 -17
  106. package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +3 -2
  107. package/src/calls/CometChatCallBubble/index.ts +14 -10
  108. package/src/calls/CometChatCallBubble/resources/index.ts +3 -0
  109. package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +1 -0
  110. package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +19 -18
  111. package/src/calls/CometChatCallButtons/index.ts +10 -8
  112. package/src/calls/CometChatCallButtons/resources/index.ts +2 -0
  113. package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +2 -0
  114. package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +14 -13
  115. package/src/calls/CometChatCallLogDetails/index.ts +21 -10
  116. package/src/calls/CometChatCallLogDetails/resources/index.ts +1 -0
  117. package/src/calls/CometChatCallLogHistory/CallLogHistoryConfiguration.ts +3 -1
  118. package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +25 -24
  119. package/src/calls/CometChatCallLogHistory/index.ts +21 -10
  120. package/src/calls/CometChatCallLogHistory/resources/index.ts +13 -0
  121. package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +4 -2
  122. package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +13 -12
  123. package/src/calls/CometChatCallLogParticipants/index.ts +21 -10
  124. package/src/calls/CometChatCallLogParticipants/resources/index.ts +1 -0
  125. package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +5 -3
  126. package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +14 -13
  127. package/src/calls/CometChatCallLogRecordings/index.ts +21 -10
  128. package/src/calls/CometChatCallLogRecordings/resources/index.ts +2 -0
  129. package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +5 -3
  130. package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +37 -36
  131. package/src/calls/CometChatCallLogs/index.ts +14 -10
  132. package/src/calls/CometChatCallLogs/resources/index.ts +11 -0
  133. package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +1 -0
  134. package/src/calls/CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx +3 -2
  135. package/src/calls/CometChatCallLogsWithDetails/index.ts +2 -4
  136. package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +19 -15
  137. package/src/calls/CometChatIncomingCall/index.ts +10 -8
  138. package/src/calls/CometChatIncomingCall/resources/index.ts +4 -0
  139. package/src/calls/CometChatIncomingCall/styles.ts +0 -1
  140. package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +5 -4
  141. package/src/calls/CometChatOngoingCall/index.ts +6 -6
  142. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +15 -13
  143. package/src/calls/CometChatOutgoingCall/index.ts +8 -6
  144. package/src/calls/CometChatOutgoingCall/resources/index.ts +1 -0
  145. package/src/calls/index.ts +99 -60
  146. package/src/calls/resources/index.ts +3 -0
  147. package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +1 -0
  148. package/src/extensions/CollaborativeBubble/resources/index.ts +1 -0
  149. package/src/extensions/CollaborativeBubble/styles.ts +1 -1
  150. package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +1 -1
  151. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +10 -9
  152. package/src/extensions/CollaborativeDocument/index.ts +12 -9
  153. package/src/extensions/CollaborativeDocument/resources/index.ts +2 -0
  154. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +1 -1
  155. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +15 -14
  156. package/src/extensions/CollaborativeWhiteboard/index.ts +12 -9
  157. package/src/extensions/CollaborativeWhiteboard/resources/index.ts +2 -0
  158. package/src/extensions/ExtensionModerator.tsx +4 -4
  159. package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +1 -1
  160. package/src/extensions/ImageModeration/ImageModerationFilter.tsx +2 -1
  161. package/src/extensions/ImageModeration/index.ts +15 -7
  162. package/src/extensions/ImageModeration/resources/index.ts +1 -0
  163. package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +8 -8
  164. package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +1 -1
  165. package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +2 -1
  166. package/src/extensions/LinkPreview/index.ts +18 -10
  167. package/src/extensions/LinkPreview/resources/index.ts +1 -0
  168. package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +7 -7
  169. package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +19 -17
  170. package/src/extensions/MessageTranslation/index.ts +7 -7
  171. package/src/extensions/MessageTranslation/resources/index.ts +1 -0
  172. package/src/extensions/Polls/Header.tsx +8 -8
  173. package/src/extensions/Polls/Polls.tsx +38 -33
  174. package/src/extensions/Polls/PollsBubble.tsx +35 -33
  175. package/src/extensions/Polls/PollsDecorator.tsx +7 -7
  176. package/src/extensions/Polls/index.ts +4 -5
  177. package/src/extensions/Polls/resources/index.ts +5 -0
  178. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +11 -11
  179. package/src/extensions/SmartReplies/SmartRepliesView.tsx +4 -3
  180. package/src/extensions/SmartReplies/index.ts +6 -2
  181. package/src/extensions/SmartReplies/resources/index.ts +1 -0
  182. package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +12 -10
  183. package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +2 -1
  184. package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +19 -17
  185. package/src/extensions/Stickers/StickersBubble.tsx +4 -4
  186. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +11 -10
  187. package/src/extensions/Stickers/index.ts +13 -8
  188. package/src/extensions/Stickers/resources/index.ts +1 -0
  189. package/src/extensions/TextModeration/TextModerationConfiguration.tsx +1 -1
  190. package/src/extensions/TextModeration/TextModerationExtension.tsx +1 -0
  191. package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +1 -0
  192. package/src/extensions/TextModeration/index.ts +5 -4
  193. package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +5 -5
  194. package/src/extensions/ThumbnailGeneration/index.ts +6 -2
  195. package/src/extensions/ThumbnailGeneration/resources/index.ts +1 -0
  196. package/src/extensions/index.ts +92 -47
  197. package/src/index.ts +225 -232
  198. package/src/shared/CometChatContext.tsx +1 -1
  199. package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -36
  200. package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +1 -0
  201. package/src/shared/assets/images/index.ts +16 -0
  202. package/src/shared/assets/images/search.png +0 -0
  203. package/src/shared/base/FontStyle.ts +2 -2
  204. package/src/shared/base/index.ts +8 -11
  205. package/src/shared/base/vars.ts +2 -2
  206. package/src/shared/constants/UIKitConstants.ts +16 -1
  207. package/src/shared/events/CometChatMessageEvents/index.ts +6 -4
  208. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +221 -219
  209. package/src/shared/events/CometChatUIEventHandler/Listener.ts +39 -37
  210. package/src/shared/events/ListenerInitializer.ts +8 -1
  211. package/src/shared/events/messages.ts +2 -0
  212. package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +11 -15
  213. package/src/shared/formatters/CometChatTextFormatter.ts +6 -5
  214. package/src/shared/formatters/CometChatUrlsFormatter/index.tsx +8 -10
  215. package/src/shared/framework/DataSource.ts +17 -17
  216. package/src/shared/framework/DataSourceDecorator.tsx +3 -2
  217. package/src/shared/framework/ExtensionsDataSource.tsx +1 -0
  218. package/src/shared/framework/MessageDataSource.tsx +125 -117
  219. package/src/shared/framework/index.ts +12 -6
  220. package/src/shared/framework/resources/index.ts +20 -0
  221. package/src/shared/helper/helperFunctions.ts +7 -5
  222. package/src/shared/index.ts +109 -100
  223. package/src/shared/libs/CometChatCalendar/Calendars/BaseCalendar.tsx +6 -3
  224. package/src/shared/libs/CometChatCalendar/Calendars/DateSelectionCalendar.tsx +2 -0
  225. package/src/shared/libs/CometChatCalendar/Calendars/MultiDateSelectionCalendar.tsx +2 -0
  226. package/src/shared/libs/CometChatCalendar/Components/Day.tsx +2 -0
  227. package/src/shared/libs/CometChatCalendar/Components/Days.tsx +1 -0
  228. package/src/shared/libs/CometChatCalendar/Components/Month.tsx +1 -0
  229. package/src/shared/libs/CometChatCalendar/Components/Months.tsx +1 -0
  230. package/src/shared/libs/CometChatCalendar/Components/Title.tsx +2 -0
  231. package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.ts +3 -0
  232. package/src/shared/libs/CometChatCalendar/Locales/index.ts +1 -0
  233. package/src/shared/libs/CometChatCalendar/Utils/dateRange.ts +1 -0
  234. package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.ts +1 -0
  235. package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.ts +1 -0
  236. package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +45 -42
  237. package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +13 -11
  238. package/src/shared/libs/ImageZoom/types/index.ts +12 -12
  239. package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +1 -0
  240. package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +1 -0
  241. package/src/shared/libs/datePickerModal/Modal.js +1 -1
  242. package/src/shared/modals/CometChatDetailsOption.ts +2 -2
  243. package/src/shared/modals/CometChatMessageTemplate.ts +13 -12
  244. package/src/shared/modals/InteractiveData/InteractiveElements/DateTimeElement.ts +7 -7
  245. package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +1 -0
  246. package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +1 -0
  247. package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +1 -0
  248. package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +6 -7
  249. package/src/shared/modals/index.ts +37 -14
  250. package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +5 -5
  251. package/src/shared/resources/CometChatSoundManager/index.ts +1 -0
  252. package/src/shared/resources/CometChatTheme/Palette.ts +57 -55
  253. package/src/shared/resources/CometChatTheme/Typography.ts +30 -30
  254. package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +17 -13
  255. package/src/shared/utils/CometChatLiveReactions/resources/index.ts +1 -0
  256. package/src/shared/utils/CometChatMessageHelper/index.ts +2 -2
  257. package/src/shared/utils/CometChatMessagePreview/{index.js → index.ts} +3 -0
  258. package/src/shared/utils/CometChatMessagePreview/resources/index.ts +1 -0
  259. package/src/shared/utils/CommonUtils.ts +76 -0
  260. package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +3 -2
  261. package/src/shared/utils/DetailsUtils/resources/index.ts +7 -0
  262. package/src/shared/utils/InteractiveMessageUtils.ts +6 -5
  263. package/src/shared/utils/MessageUtils.tsx +103 -15
  264. package/src/shared/utils/NetworkUtils.tsx +1 -1
  265. package/src/shared/utils/PermissionUtil.ts +7 -6
  266. package/src/shared/utils/SchedulerUtils.ts +8 -6
  267. package/src/shared/utils/TypeUtils.ts +3 -0
  268. package/src/shared/utils/conversationUtils.ts +7 -5
  269. package/src/shared/utils/index.ts +2 -0
  270. package/src/shared/views/CometChatAICard/CometChatAICard.tsx +7 -6
  271. package/src/shared/views/CometChatAICard/resources/index.ts +2 -0
  272. package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +3 -0
  273. package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +5 -5
  274. package/src/shared/views/CometChatActionSheet/hooks.ts +2 -2
  275. package/src/shared/views/CometChatActionSheet/index.ts +5 -3
  276. package/src/shared/views/CometChatActionSheet/resources/index.ts +2 -0
  277. package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +6 -6
  278. package/src/shared/views/CometChatAudioBubble/index.ts +8 -12
  279. package/src/shared/views/CometChatAudioBubble/resources/index.ts +2 -0
  280. package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +6 -5
  281. package/src/shared/views/CometChatAvatar/index.ts +7 -9
  282. package/src/shared/views/CometChatBadge/CometChatBadge.tsx +3 -3
  283. package/src/shared/views/CometChatBadge/index.ts +7 -9
  284. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +51 -48
  285. package/src/shared/views/CometChatBottomSheet/index.ts +6 -2
  286. package/src/shared/views/CometChatButton/CometChatButton.tsx +5 -5
  287. package/src/shared/views/CometChatButton/index.ts +4 -14
  288. package/src/shared/views/CometChatCard/CometChatCard.tsx +3 -3
  289. package/src/shared/views/CometChatCard/index.ts +6 -7
  290. package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +11 -10
  291. package/src/shared/views/CometChatCardBubble/index.tsx +2 -1
  292. package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +6 -6
  293. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +9 -9
  294. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +1 -0
  295. package/src/shared/views/CometChatConfirmDialog/index.ts +9 -6
  296. package/src/shared/views/CometChatDate/CometChatDate.tsx +2 -2
  297. package/src/shared/views/CometChatDate/index.ts +12 -11
  298. package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +20 -17
  299. package/src/shared/views/CometChatDateTimePicker/index.ts +3 -5
  300. package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +8 -7
  301. package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +24 -33
  302. package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +1 -1
  303. package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +1 -1
  304. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +2 -1
  305. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +2 -1
  306. package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +8 -0
  307. package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +8 -0
  308. package/src/shared/views/CometChatEmojiKeyboard/style.ts +2 -2
  309. package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +3 -3
  310. package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +1 -1
  311. package/src/shared/views/CometChatFileBubble/index.ts +7 -8
  312. package/src/shared/views/CometChatFileBubble/resources/index.ts +2 -0
  313. package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +33 -29
  314. package/src/shared/views/CometChatFormBubble/index.tsx +2 -1
  315. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +63 -17
  316. package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +1 -1
  317. package/src/shared/views/CometChatImageBubble/assets/default_image.png +0 -0
  318. package/src/shared/views/CometChatImageBubble/assets/index.ts +3 -0
  319. package/src/shared/views/CometChatImageBubble/index.ts +10 -8
  320. package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +1 -1
  321. package/src/shared/views/CometChatImageViewerModal/resources/index.ts +1 -0
  322. package/src/shared/views/CometChatLabel/CometChatLabel.tsx +2 -2
  323. package/src/shared/views/CometChatList/CometChatList.tsx +46 -42
  324. package/src/shared/views/CometChatList/index.ts +3 -3
  325. package/src/shared/views/CometChatList/resources/index.ts +5 -0
  326. package/src/shared/views/CometChatListItem/CometChatListItem.tsx +18 -13
  327. package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +1 -0
  328. package/src/shared/views/CometChatListItem/index.ts +8 -7
  329. package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +34 -31
  330. package/src/shared/views/CometChatMediaRecorder/index.ts +8 -9
  331. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +19 -12
  332. package/src/shared/views/CometChatMessageBubble/index.ts +6 -5
  333. package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +10 -9
  334. package/src/shared/views/CometChatMessageInput/index.ts +2 -1
  335. package/src/shared/views/CometChatPanel/CometChatPanel.tsx +3 -3
  336. package/src/shared/views/CometChatPanel/resources/index.ts +1 -0
  337. package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +4 -4
  338. package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +1 -0
  339. package/src/shared/views/CometChatQuickReactions/index.ts +3 -7
  340. package/src/shared/views/CometChatQuickReactions/resources/index.ts +1 -0
  341. package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +6 -6
  342. package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +4 -4
  343. package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +29 -28
  344. package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +1 -0
  345. package/src/shared/views/CometChatReactionList/index.ts +3 -7
  346. package/src/shared/views/CometChatReactionList/resources/index.ts +1 -0
  347. package/src/shared/views/CometChatReactions/CometChatReactions.tsx +14 -14
  348. package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +1 -0
  349. package/src/shared/views/CometChatReactions/index.ts +15 -11
  350. package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +5 -5
  351. package/src/shared/views/CometChatReceipt/index.ts +10 -8
  352. package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +59 -53
  353. package/src/shared/views/CometChatSchedulerBubble/index.ts +3 -5
  354. package/src/shared/views/CometChatSchedulerBubble/styles.ts +1 -1
  355. package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +4 -4
  356. package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +4 -4
  357. package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +2 -2
  358. package/src/shared/views/CometChatStatusIndicator/index.ts +21 -10
  359. package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +1 -1
  360. package/src/shared/views/CometChatSuggestionList/SuggestionItem.ts +5 -5
  361. package/src/shared/views/CometChatSuggestionList/SuggestionListConfiguration.ts +3 -3
  362. package/src/shared/views/CometChatSuggestionList/index.ts +14 -10
  363. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +6 -5
  364. package/src/shared/views/CometChatTextBubble/index.ts +6 -7
  365. package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +2 -2
  366. package/src/shared/views/CometChatTimeSlotSelector/CometChatTimeSlotSelector.tsx +5 -5
  367. package/src/shared/views/CometChatTimeSlotSelector/index.ts +3 -5
  368. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +9 -8
  369. package/src/shared/views/CometChatVideoBubble/index.ts +10 -8
  370. package/src/shared/views/CometChatVideoBubble/resources/index.ts +2 -0
  371. package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +1 -1
  372. package/src/shared/views/SwipeRow/SwipeRow.tsx +4 -3
  373. package/src/shared/views/index.ts +151 -86
  374. package/ios/CometchatUiKit.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  375. package/ios/CometchatUiKit.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  376. package/src/shared/libs/CometChatCalendar/Components/Arrow.test.tsx +0 -112
  377. package/src/shared/libs/CometChatCalendar/Components/Day.test.tsx +0 -396
  378. package/src/shared/libs/CometChatCalendar/Components/Days.test.tsx +0 -216
  379. package/src/shared/libs/CometChatCalendar/Components/Month.test.tsx +0 -160
  380. package/src/shared/libs/CometChatCalendar/Components/Months.test.tsx +0 -262
  381. package/src/shared/libs/CometChatCalendar/Components/Title.test.tsx +0 -111
  382. package/src/shared/libs/CometChatCalendar/Components/Weekdays.test.tsx +0 -69
  383. package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.test.ts +0 -44
  384. package/src/shared/libs/CometChatCalendar/Utils/addOpacity.test.ts +0 -49
  385. package/src/shared/libs/CometChatCalendar/Utils/clamp.test.ts +0 -39
  386. package/src/shared/libs/CometChatCalendar/Utils/dateRange.test.ts +0 -20
  387. package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.test.ts +0 -48
  388. package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.test.ts +0 -60
@@ -10,6 +10,8 @@ import {
10
10
  KeyboardAvoidingViewProps,
11
11
  Dimensions,
12
12
  Text,
13
+ ViewProps,
14
+ TextStyle,
13
15
  } from 'react-native';
14
16
  import { Style } from './styles';
15
17
  import {
@@ -28,8 +30,9 @@ import {
28
30
  CometChatSuggestionList,
29
31
  SuggestionItem,
30
32
  CometChatUIKit,
33
+ CometChatMessageOption,
31
34
  } from '../shared';
32
-
35
+ //@ts-ignore
33
36
  import { CheckPropertyExists } from '../shared/helper/functions';
34
37
  //@ts-ignore
35
38
  import { CometChat } from '@cometchat/chat-sdk-react-native';
@@ -593,8 +596,8 @@ export const CometChatMessageComposer = React.forwardRef(
593
596
  const composerIdMap = new Map().set('parentMessageId', parentMessageId);
594
597
  const defaultAuxiliaryButtonOptions =
595
598
  ChatConfigurator.getDataSource().getAuxiliaryOptions(
596
- user,
597
- group,
599
+ user as CometChat.User,
600
+ group as CometChat.Group,
598
601
  composerIdMap,
599
602
  theme
600
603
  );
@@ -622,10 +625,10 @@ export const CometChatMessageComposer = React.forwardRef(
622
625
  const [AIOptionItems, setAIOptionItems] = React.useState([]);
623
626
  const [rootAIOptionItems, setRootAIOptionItems] = React.useState([]);
624
627
  const [actionSheetItems, setActionSheetItems] = React.useState([]);
625
- const [messagePreview, setMessagePreview] = React.useState(null);
626
- const [CustomView, setCustomView] = React.useState(null);
627
- const [CustomViewHeader, setCustomViewHeader] = React.useState(null);
628
- const [CustomViewFooter, setCustomViewFooter] = React.useState(null);
628
+ const [messagePreview, setMessagePreview] = React.useState<any>(null);
629
+ const [CustomView, setCustomView] = React.useState<any>(null);
630
+ const [CustomViewHeader, setCustomViewHeader] = React.useState<any>(null);
631
+ const [CustomViewFooter, setCustomViewFooter] = React.useState<any>(null);
629
632
  const [isVisible, setIsVisible] = React.useState(false);
630
633
  const [kbOffset, setKbOffset] = React.useState(59);
631
634
  const [showMentionList, setShowMentionList] = React.useState(false);
@@ -637,10 +640,10 @@ export const CometChatMessageComposer = React.forwardRef(
637
640
  useLayoutEffect(() => {
638
641
  if (Platform.OS === "ios") {
639
642
  if (Number.isInteger(commonVars.safeAreaInsets.top)) {
640
- setKbOffset(commonVars.safeAreaInsets.top)
643
+ setKbOffset(commonVars.safeAreaInsets.top as number);
641
644
  return;
642
645
  }
643
- CommonUtil.getSafeAreaInsets().then(res => {
646
+ CommonUtil.getSafeAreaInsets().then((res: any) => {
644
647
  if (Number.isInteger(res.top)) {
645
648
  commonVars.safeAreaInsets.top = res.top;
646
649
  commonVars.safeAreaInsets.bottom = res.bottom;
@@ -662,7 +665,7 @@ export const CometChatMessageComposer = React.forwardRef(
662
665
  ...aiOptionsStyle,
663
666
  })
664
667
 
665
- const isTyping = useRef<NodeJS.Timeout | null>(null);
668
+ let isTyping = useRef<any>(null);
666
669
 
667
670
  /**
668
671
  * Event callback
@@ -678,7 +681,7 @@ export const CometChatMessageComposer = React.forwardRef(
678
681
 
679
682
  let rawText = message?.text;
680
683
 
681
- let users: { key: string, value: SuggestionItem } = {};
684
+ let users: any = {};
682
685
  let regexes: Array<RegExp> = [];
683
686
 
684
687
  allFormatters.current.forEach((formatter: CometChatTextFormatter, key) => {
@@ -692,7 +695,7 @@ export const CometChatMessageComposer = React.forwardRef(
692
695
  textComponents = resp;
693
696
  })
694
697
 
695
- let edits = [];
698
+ let edits: any[] = [];
696
699
 
697
700
  regexes.forEach(regex => {
698
701
  let match;
@@ -779,7 +782,7 @@ export const CometChatMessageComposer = React.forwardRef(
779
782
  }
780
783
  }
781
784
  else if (Platform.OS === 'ios' && fileType === MessageTypeConstants.video) {
782
- NativeModules.VideoPickerModule.pickVideo(((file) => {
785
+ NativeModules.VideoPickerModule.pickVideo(((file: any) => {
783
786
  if (file.uri)
784
787
  sendMediaMessage(
785
788
  chatWithId.current,
@@ -867,7 +870,7 @@ export const CometChatMessageComposer = React.forwardRef(
867
870
 
868
871
  let finalTextInput = getRegexString(plainTextInput.current);
869
872
 
870
- let textMessage = new CometChat.TextMessage(
873
+ let textMessage: any = new CometChat.TextMessage(
871
874
  chatWithId.current,
872
875
  finalTextInput,
873
876
  chatWith.current
@@ -981,7 +984,7 @@ export const CometChatMessageComposer = React.forwardRef(
981
984
  receiverType?: any
982
985
  ) => {
983
986
  setShowActionSheet(false);
984
- let mediaMessage = new CometChat.MediaMessage(
987
+ let mediaMessage: any = new CometChat.MediaMessage(
985
988
  receiverId,
986
989
  messageInput,
987
990
  messageType,
@@ -1002,7 +1005,7 @@ export const CometChatMessageComposer = React.forwardRef(
1002
1005
  });
1003
1006
  parentMessageId && mediaMessage.setParentMessageId(parentMessageId as number);
1004
1007
 
1005
- let localMessage = new CometChat.MediaMessage(
1008
+ let localMessage: any = new CometChat.MediaMessage(
1006
1009
  receiverId,
1007
1010
  messageInput,
1008
1011
  messageType,
@@ -1132,7 +1135,7 @@ export const CometChatMessageComposer = React.forwardRef(
1132
1135
  }
1133
1136
 
1134
1137
  const AuxiliaryButtonViewElem = () => {
1135
- if (AuxiliaryButtonView)
1138
+ if (AuxiliaryButtonView && id)
1136
1139
  return (
1137
1140
  <AuxiliaryButtonView user={user} group={group} composerId={id} />
1138
1141
  );
@@ -1147,7 +1150,7 @@ export const CometChatMessageComposer = React.forwardRef(
1147
1150
  };
1148
1151
 
1149
1152
  const SendButtonViewElem = () => {
1150
- if (SendButtonView)
1153
+ if (SendButtonView && id)
1151
1154
  return <SendButtonView user={user} group={group} composerId={id} />;
1152
1155
  return (
1153
1156
  <ImageButton
@@ -1156,7 +1159,7 @@ export const CometChatMessageComposer = React.forwardRef(
1156
1159
  Style.imageStyle,
1157
1160
  {
1158
1161
  tintColor: ((inputMessage as String).length === 0) ? theme.palette.getAccent400() :
1159
- messageComposerStyle.sendIconTint ||
1162
+ messageComposerStyle?.sendIconTint ||
1160
1163
  theme.palette.getPrimary(),
1161
1164
  },
1162
1165
  ]}
@@ -1167,7 +1170,7 @@ export const CometChatMessageComposer = React.forwardRef(
1167
1170
  };
1168
1171
 
1169
1172
  const SecondaryButtonViewElem = () => {
1170
- if (SecondaryButtonView)
1173
+ if (SecondaryButtonView && id)
1171
1174
  return (
1172
1175
  <SecondaryButtonView user={user} group={group} composerId={id} />
1173
1176
  );
@@ -1180,7 +1183,7 @@ export const CometChatMessageComposer = React.forwardRef(
1180
1183
  height: 23,
1181
1184
  width: 23,
1182
1185
  resizeMode: 'contain',
1183
- tintColor: messageComposerStyle.attachIconTint
1186
+ tintColor: messageComposerStyle?.attachIconTint
1184
1187
  ? messageComposerStyle.attachIconTint
1185
1188
  : theme.palette.getAccent(),
1186
1189
  }}
@@ -1224,34 +1227,34 @@ export const CometChatMessageComposer = React.forwardRef(
1224
1227
 
1225
1228
  //fetch logged in user
1226
1229
  useEffect(() => {
1227
- CometChat.getLoggedinUser().then((user) => (loggedInUser.current = user));
1230
+ CometChat.getLoggedinUser().then((user: any) => (loggedInUser.current = user));
1228
1231
  let _formatter = [...(textFormatters || [])] || [];
1229
1232
 
1230
1233
  if (!disableMentions) {
1231
1234
  let mentionsFormatter = ChatConfigurator.getDataSource().getMentionsFormatter();
1232
- mentionsFormatter.setLoggedInUser(CometChatUIKit.loggedInUser);
1235
+ CometChatUIKit.loggedInUser && mentionsFormatter.setLoggedInUser(CometChatUIKit.loggedInUser);
1233
1236
  mentionsFormatter.setMentionsStyle(new MentionTextStyle({
1234
1237
  loggedInUserTextStyle: {
1235
1238
  color: theme.palette.getPrimary(),
1236
1239
  ...theme.typography.title2,
1237
1240
  fontSize: 17
1238
- },
1241
+ } as TextStyle,
1239
1242
  textStyle: {
1240
1243
  color: theme.palette.getPrimary(),
1241
1244
  ...theme.typography.subtitle1,
1242
1245
  fontSize: 17
1243
- }
1246
+ } as TextStyle
1244
1247
  }));
1245
- mentionsFormatter.setUser(user);
1246
- mentionsFormatter.setGroup(group);
1248
+ user && mentionsFormatter.setUser(user);
1249
+ group && mentionsFormatter.setGroup(group);
1247
1250
 
1248
1251
  _formatter.unshift(mentionsFormatter)
1249
1252
  }
1250
1253
 
1251
1254
  _formatter.forEach((formatter) => {
1252
- formatter.setComposerId(id);
1253
- formatter.setUser(user);
1254
- formatter.setGroup(group);
1255
+ id && formatter.setComposerId(id);
1256
+ user && formatter.setUser(user);
1257
+ group && formatter.setGroup(group);
1255
1258
  let trackingCharacter = formatter.getTrackingCharacter();
1256
1259
  trackingCharacters.current.push(trackingCharacter);
1257
1260
 
@@ -1279,7 +1282,7 @@ export const CometChatMessageComposer = React.forwardRef(
1279
1282
  }
1280
1283
  }, [user, group, chatRef]);
1281
1284
 
1282
- const handleOnClick = (CustomView) => {
1285
+ const handleOnClick = (CustomView: any) => {
1283
1286
  let view = CustomView(
1284
1287
  user,
1285
1288
  group,
@@ -1313,14 +1316,14 @@ export const CometChatMessageComposer = React.forwardRef(
1313
1316
  if (typeof item.onPress == 'function')
1314
1317
  return {
1315
1318
  ...item,
1316
- onPress: () => item.onPress(user, group),
1319
+ onPress: () => item.onPress?.(user, group),
1317
1320
  };
1318
1321
  return {
1319
1322
  ...item,
1320
1323
  onPress: () => fileInputHandler(item.id),
1321
1324
  };
1322
1325
  })
1323
- : defaultAttachmentOptions.map((item) => {
1326
+ : defaultAttachmentOptions.map((item: any) => {
1324
1327
  if (typeof item.CustomView === 'function')
1325
1328
  return {
1326
1329
  ...item,
@@ -1338,21 +1341,21 @@ export const CometChatMessageComposer = React.forwardRef(
1338
1341
  })
1339
1342
  );
1340
1343
 
1341
- const aiOptions = ChatConfigurator.dataSource.getAIOptions(user, group, theme, composerIdMap, AIStyles);
1342
- let newAiOptions = _getAIOptions(aiOptions);
1344
+ const aiOptions = ChatConfigurator.dataSource.getAIOptions(user as CometChat.User, group as CometChat.Group, theme, composerIdMap, AIStyles);
1345
+ let newAiOptions: any = _getAIOptions(aiOptions);
1343
1346
  setAIOptionItems(newAiOptions);
1344
1347
  setRootAIOptionItems(newAiOptions);
1345
1348
  }, [user, group, id, parentMessageId]);
1346
1349
 
1347
- const _getAIOptions = (options) => {
1350
+ const _getAIOptions = (options: (CometChatMessageOption | CometChatMessageComposerActionInterface)[]) => {
1348
1351
  let newOptions = [...options];
1349
- let newAiOptions = newOptions.map((item) => {
1352
+ let newAiOptions = newOptions.map((item: any) => {
1350
1353
  if (typeof item.onPress === 'function')
1351
1354
  return {
1352
1355
  ...item,
1353
1356
  onPress: () => {
1354
1357
  setShowAIOptions(false)
1355
- item.onPress(user)
1358
+ item?.onPress?.(user)
1356
1359
  },
1357
1360
  };
1358
1361
  return {
@@ -1366,12 +1369,12 @@ export const CometChatMessageComposer = React.forwardRef(
1366
1369
 
1367
1370
  useEffect(() => {
1368
1371
  CometChatUIEventHandler.addMessageListener(editMessageListenerID, {
1369
- ccMessageEdited: (item) => previewMessage(item),
1372
+ ccMessageEdited: (item: any) => previewMessage(item),
1370
1373
  });
1371
1374
  CometChatUIEventHandler.addUIListener(UiEventListenerID, {
1372
1375
  ccToggleBottomSheet: (item) => {
1373
1376
  if (item?.bots) {
1374
- let newAiOptions = _getAIOptions(item.bots)
1377
+ let newAiOptions: any = _getAIOptions(item.bots)
1375
1378
  setAIOptionItems(newAiOptions);
1376
1379
  setShowAIOptions(true)
1377
1380
  return;
@@ -1403,7 +1406,7 @@ export const CometChatMessageComposer = React.forwardRef(
1403
1406
  }
1404
1407
  }, []);
1405
1408
 
1406
- const handlePannel = (item) => {
1409
+ const handlePannel = (item: any) => {
1407
1410
  if (item.child) {
1408
1411
  if (item.alignment === ViewAlignment.composerTop)
1409
1412
  setCustomViewHeader(() => item.child);
@@ -1446,7 +1449,7 @@ export const CometChatMessageComposer = React.forwardRef(
1446
1449
  console.log("Send Audio");
1447
1450
  }
1448
1451
 
1449
- function isCursorWithinMentionRange(mentionRanges, cursorPosition) {
1452
+ function isCursorWithinMentionRange(mentionRanges: any, cursorPosition: number) {
1450
1453
  for (let [range, mention] of mentionRanges) {
1451
1454
  const [start, end] = range.split('_').map(Number);
1452
1455
  if (cursorPosition >= start && cursorPosition <= end) {
@@ -1468,7 +1471,7 @@ export const CometChatMessageComposer = React.forwardRef(
1468
1471
  )
1469
1472
  }
1470
1473
 
1471
- let timeoutId;
1474
+ let timeoutId: any;
1472
1475
  const openList = (selection: {
1473
1476
  start: number;
1474
1477
  end: number;
@@ -1490,7 +1493,7 @@ export const CometChatMessageComposer = React.forwardRef(
1490
1493
  formatter.search(searchString);
1491
1494
  }
1492
1495
  } else {
1493
- formatter.search(searchString);
1496
+ formatter?.search(searchString);
1494
1497
  }
1495
1498
 
1496
1499
  } else {
@@ -1593,7 +1596,7 @@ export const CometChatMessageComposer = React.forwardRef(
1593
1596
  newMentionMap.delete(newKey);
1594
1597
 
1595
1598
  if (!ifIdExists(value.id, newMentionMap)) {
1596
- let targetedFormatter = allFormatters.current.get(value.trackingCharacter);
1599
+ let targetedFormatter: any = allFormatters.current.get(value.trackingCharacter);
1597
1600
  let existingCCUsers = [...targetedFormatter.getSuggestionItems()];
1598
1601
  let userPosition = existingCCUsers.findIndex((item: SuggestionItem) => item.id === value.id);
1599
1602
  if (userPosition !== -1) {
@@ -1625,7 +1628,7 @@ export const CometChatMessageComposer = React.forwardRef(
1625
1628
 
1626
1629
  let newMentionMap = new Map(mentionMap.current);
1627
1630
 
1628
- let targetedFormatter = allFormatters.current.get(activeCharacter.current);
1631
+ let targetedFormatter: any = allFormatters.current.get(activeCharacter.current);
1629
1632
 
1630
1633
  let existingCCUsers = [...targetedFormatter.getSuggestionItems()];
1631
1634
  let userAlreadyExists = existingCCUsers.find((existingUser: SuggestionItem) => existingUser.id === item.id);
@@ -1675,9 +1678,9 @@ export const CometChatMessageComposer = React.forwardRef(
1675
1678
  }
1676
1679
 
1677
1680
  const setFormattedInputMessage = () => {
1678
- let textComponents = getRegexString(plainTextInput.current);
1681
+ let textComponents: any = getRegexString(plainTextInput.current);
1679
1682
 
1680
- allFormatters.current.forEach((formatter: CometChatMentionsFormatter, key) => {
1683
+ allFormatters.current.forEach((formatter, key) => {
1681
1684
  let resp = formatter.getFormattedText(textComponents);
1682
1685
  textComponents = resp;
1683
1686
  })
@@ -1743,7 +1746,7 @@ export const CometChatMessageComposer = React.forwardRef(
1743
1746
  }
1744
1747
 
1745
1748
  const getMentionLimitView = () => {
1746
- let targetedFormatter = allFormatters.current.get(activeCharacter.current);
1749
+ let targetedFormatter: any = allFormatters.current.get(activeCharacter.current);
1747
1750
  let shouldWarn;
1748
1751
  let limit;
1749
1752
  if (targetedFormatter?.getLimit && targetedFormatter?.getLimit()) {
@@ -1772,7 +1775,7 @@ export const CometChatMessageComposer = React.forwardRef(
1772
1775
  marginLeft: 5,
1773
1776
  color: theme.palette.getAccent500(),
1774
1777
  ...theme.typography.text1
1775
- }}>{errorString}</Text>
1778
+ } as TextStyle}>{errorString}</Text>
1776
1779
  </View>
1777
1780
  )
1778
1781
  }
@@ -1803,7 +1806,7 @@ export const CometChatMessageComposer = React.forwardRef(
1803
1806
  paddingTop: CustomViewHeader ? 0 : 8
1804
1807
  },
1805
1808
  messageComposerStyle,
1806
- ]}
1809
+ ] as ViewProps}
1807
1810
  >
1808
1811
  <EmojiBoard
1809
1812
  hideSearch={true}
@@ -1831,19 +1834,19 @@ export const CometChatMessageComposer = React.forwardRef(
1831
1834
  onClose={() => setShowActionSheet(false)}
1832
1835
  style={{
1833
1836
  // ...getActionSheetStyle(),
1834
- ...(messageComposerStyle.actionSheetSeparatorTint
1837
+ ...(messageComposerStyle?.actionSheetSeparatorTint
1835
1838
  ? {
1836
1839
  actionSheetSeparatorTint:
1837
1840
  messageComposerStyle.actionSheetSeparatorTint,
1838
1841
  }
1839
1842
  : {}),
1840
- layoutModeIconTint: messageComposerStyle.actionSheetLayoutModeIconTint,
1841
- titleColor: messageComposerStyle.actionSheetTitleColor,
1842
- listItemIconTint: messageComposerStyle.attachIconTint,
1843
- listItemTitleFont: messageComposerStyle.actionSheetTitleFont
1843
+ layoutModeIconTint: messageComposerStyle?.actionSheetLayoutModeIconTint,
1844
+ titleColor: messageComposerStyle?.actionSheetTitleColor,
1845
+ listItemIconTint: messageComposerStyle?.attachIconTint,
1846
+ listItemTitleFont: messageComposerStyle?.actionSheetTitleFont
1844
1847
  }}
1845
1848
  cometChatBottomSheetStyle={
1846
- messageComposerStyle.actionSheetCancelButtonIconTint
1849
+ messageComposerStyle?.actionSheetCancelButtonIconTint
1847
1850
  ? {
1848
1851
  lineColor:
1849
1852
  messageComposerStyle.actionSheetCancelButtonIconTint,
@@ -1860,7 +1863,7 @@ export const CometChatMessageComposer = React.forwardRef(
1860
1863
  }}
1861
1864
  onSend={_sendRecordedAudio}
1862
1865
  cometChatBottomSheetStyle={
1863
- messageComposerStyle.actionSheetCancelButtonIconTint
1866
+ messageComposerStyle?.actionSheetCancelButtonIconTint
1864
1867
  ? {
1865
1868
  lineColor:
1866
1869
  messageComposerStyle.actionSheetCancelButtonIconTint,
@@ -1934,7 +1937,7 @@ export const CometChatMessageComposer = React.forwardRef(
1934
1937
  openList(selection)
1935
1938
  }
1936
1939
  }
1937
- maxHeight={maxHeight ?? null}
1940
+ maxHeight={maxHeight ?? undefined}
1938
1941
  onChangeText={textChangeHandler}
1939
1942
  SecondaryButtonView={SecondaryButtonViewElem}
1940
1943
  AuxiliaryButtonView={AuxiliaryButtonViewElem}
@@ -89,6 +89,7 @@ export class MessageComposerConfiguration {
89
89
  constructor(props: MessageComposerConfigurationInterface) {
90
90
  if (props)
91
91
  for (const [key, value] of Object.entries(props)) {
92
+ //@ts-ignore
92
93
  this[key] = value;
93
94
  }
94
95
  }
@@ -1,17 +1,16 @@
1
1
  import {
2
2
  CometChatMessageComposer,
3
- CometChatMessageComposerInterface,
3
+ CometChatMessageComposerInterface,
4
4
  MessageComposerStyleInterface,
5
- } from './CometChatMessageComposer';
5
+ } from "./CometChatMessageComposer";
6
6
  import {
7
7
  MessageComposerConfiguration,
8
8
  MessageComposerConfigurationInterface,
9
- } from './MessageComposerConfiguration';
9
+ } from "./MessageComposerConfiguration";
10
10
 
11
- export {
12
- CometChatMessageComposer,
13
- MessageComposerConfiguration,
11
+ export { CometChatMessageComposer, MessageComposerConfiguration };
12
+ export type {
14
13
  MessageComposerConfigurationInterface,
15
- CometChatMessageComposerInterface,
14
+ CometChatMessageComposerInterface,
16
15
  MessageComposerStyleInterface,
17
16
  };
@@ -1,12 +1,22 @@
1
+ //@ts-ignore
1
2
  import HEART from'./heart.png'
3
+ //@ts-ignore
2
4
  import SEND from './send_message.png'
5
+ //@ts-ignore
3
6
  import EMOJI from './emoji.png'
7
+ //@ts-ignore
4
8
  import ADD from './circle_add.png'
9
+ //@ts-ignore
5
10
  import IMAGE from './image.png'
11
+ //@ts-ignore
6
12
  import CLOSE from './close.png';
13
+ //@ts-ignore
7
14
  import STICKER from "./stickers.png";
15
+ //@ts-ignore
8
16
  import MICROPHONE from "./microphone.png";
17
+ //@ts-ignore
9
18
  import AI from './ai.png'
19
+ //@ts-ignore
10
20
  import INFO from './Info.png';
11
21
 
12
22
  export const ICONS ={
@@ -5,6 +5,8 @@ import {
5
5
  Image,
6
6
  ViewStyle,
7
7
  StyleProp,
8
+ TextStyle,
9
+ ViewProps,
8
10
  //@ts-ignore
9
11
  } from 'react-native';
10
12
  import React, { useEffect, useState, useRef, useContext } from 'react';
@@ -246,7 +248,7 @@ export const CometChatMessageHeader = (
246
248
  }
247
249
  style={[
248
250
  styles.backButtonIconStyle,
249
- { tintColor: style.backIconTint ?? theme.palette.getPrimary() },
251
+ { tintColor: style?.backIconTint ?? theme.palette.getPrimary() },
250
252
  ]}
251
253
  />
252
254
  </TouchableOpacity>
@@ -260,10 +262,10 @@ export const CometChatMessageHeader = (
260
262
  style={[
261
263
  {
262
264
  color:
263
- style.typingIndicatorTextColor ?? theme.palette.getAccent600(),
265
+ style?.typingIndicatorTextColor ?? theme.palette.getAccent600(),
264
266
  },
265
- style.typingIndicatorTextFont ?? theme.typography.text1,
266
- ]}
267
+ style?.typingIndicatorTextFont ?? theme.typography.text1,
268
+ ] as TextStyle}
267
269
  >
268
270
  {typingText}
269
271
  </Text>
@@ -272,9 +274,9 @@ export const CometChatMessageHeader = (
272
274
  return (
273
275
  <Text
274
276
  style={[
275
- { color: style.subtitleTextColor ?? theme.palette.getAccent600() },
276
- style.subtitleTextFont ?? theme.typography.text1,
277
- ]}
277
+ { color: style?.subtitleTextColor ?? theme.palette.getAccent600() },
278
+ style?.subtitleTextFont ?? theme.typography.text1,
279
+ ] as TextStyle}
278
280
  >
279
281
  {receiverTypeRef.current === CometChat.RECEIVER_TYPE.GROUP &&
280
282
  (groupObj?.['membersCount'] || groupObj?.['membersCount'] === 0)
@@ -288,11 +290,11 @@ export const CometChatMessageHeader = (
288
290
  );
289
291
  };
290
292
 
291
- const handleUserStatus = (userDetails) => {
292
- if (userDetails.uid === user.getUid()) setUserStatus(userDetails.status);
293
+ const handleUserStatus = (userDetails: any) => {
294
+ if (userDetails.uid === user?.getUid()) setUserStatus(userDetails.status);
293
295
  };
294
296
 
295
- const msgTypingIndicator = (typist, status) => {
297
+ const msgTypingIndicator = (typist: any, status: string) => {
296
298
  if (
297
299
  receiverTypeRef.current === CometChat.RECEIVER_TYPE.GROUP &&
298
300
  receiverTypeRef.current === typist.receiverType &&
@@ -312,8 +314,8 @@ export const CometChatMessageHeader = (
312
314
  }
313
315
  };
314
316
 
315
- const handleGroupListener = (groupDetails) => {
316
- if (groupDetails?.guid === groupObj.getGuid() && groupDetails.membersCount) {
317
+ const handleGroupListener = (groupDetails: any) => {
318
+ if (groupDetails?.guid === groupObj?.getGuid() && groupDetails.membersCount) {
317
319
  setGroupObj(groupDetails);
318
320
  }
319
321
  };
@@ -353,7 +355,7 @@ export const CometChatMessageHeader = (
353
355
  kickedMember,
354
356
  kickedBy,
355
357
  kickedFrom,
356
- }) => {
358
+ }: any) => {
357
359
  setGroupObj(kickedFrom);
358
360
  };
359
361
  const handleGroupMemberBanned = ({
@@ -361,7 +363,7 @@ export const CometChatMessageHeader = (
361
363
  kickedUser,
362
364
  kickedBy,
363
365
  kickedFrom,
364
- }) => {
366
+ }: any) => {
365
367
  setGroupObj(kickedFrom);
366
368
  };
367
369
  const handleGroupMemberAdded = ({
@@ -369,19 +371,19 @@ export const CometChatMessageHeader = (
369
371
  message,
370
372
  usersAdded,
371
373
  userAddedIn,
372
- }) => {
374
+ }: any) => {
373
375
  setGroupObj(userAddedIn);
374
376
  };
375
- const handleOwnershipChanged = ({ group, newOwner, message }) => {
377
+ const handleOwnershipChanged = ({ group, newOwner, message }: any) => {
376
378
  setGroupObj(group);
377
379
  };
378
380
 
379
381
  useEffect(() => {
380
382
  CometChatUIEventHandler.addGroupListener(groupListenerId, {
381
- ccGroupMemberKicked: (item) => handleGroupMemberKicked(item),
382
- ccGroupMemberBanned: (item) => handleGroupMemberBanned(item),
383
- ccGroupMemberAdded: (item) => handleGroupMemberAdded(item),
384
- ccOwnershipChanged: (item) => handleOwnershipChanged(item),
383
+ ccGroupMemberKicked: (item: any) => handleGroupMemberKicked(item),
384
+ ccGroupMemberBanned: (item: any) => handleGroupMemberBanned(item),
385
+ ccGroupMemberAdded: (item: any) => handleGroupMemberAdded(item),
386
+ ccOwnershipChanged: (item: any) => handleOwnershipChanged(item),
385
387
  });
386
388
  return () => {
387
389
  CometChatUIEventHandler.removeGroupListener(groupListenerId);
@@ -393,14 +395,14 @@ export const CometChatMessageHeader = (
393
395
  style={[
394
396
  { flexDirection: 'row' },
395
397
  {
396
- width: style.width ?? 'auto',
397
- height: style.height ?? 'auto',
398
+ width: style?.width ?? 'auto',
399
+ height: style?.height ?? 'auto',
398
400
  backgroundColor:
399
- style.backgroundColor ?? theme.palette.getBackgroundColor(),
400
- borderRadius: style.borderRadius ?? 0,
401
+ style?.backgroundColor ?? theme.palette.getBackgroundColor(),
402
+ borderRadius: style?.borderRadius ?? 0,
401
403
  },
402
- style.border ?? {},
403
- ]}
404
+ style?.border ?? {},
405
+ ] as ViewProps}
404
406
  >
405
407
  {!hideBackIcon && <BackButton />}
406
408
  <View style={{ flex: 1 }}>
@@ -408,7 +410,7 @@ export const CometChatMessageHeader = (
408
410
  <ListItemView user={user} group={group} />
409
411
  ) : (
410
412
  <CometChatListItem
411
- id={user ? user.getUid() : groupObj ? groupObj.getGuid() : undefined}
413
+ id={user ? user.getUid() : groupObj ? groupObj.getGuid() : ''}
412
414
  title={user ? user.getName() : groupObj ? groupObj.getName() : ''}
413
415
  avatarName={user ? user.getName() : groupObj ? groupObj.getName() : ''}
414
416
  avatarURL={user ? user.getAvatar() ? { uri: user.getAvatar() } : undefined : groupObj ? groupObj.getIcon() ? { uri: groupObj.getIcon() } : undefined : undefined}
@@ -431,18 +433,18 @@ export const CometChatMessageHeader = (
431
433
  }}
432
434
  listItemStyle={{
433
435
  titleFont: { fontWeight: '700' },
434
- backgroundColor: style.backgroundColor,
436
+ backgroundColor: style?.backgroundColor,
435
437
  ...listItemStyle,
436
438
  }}
437
439
  statusIndicatorColor={
438
440
  disableUsersPresence
439
441
  ? 'transparent'
440
442
  : user && userStatus === UserStatusConstants.online
441
- ? style.onlineStatusColor || theme.palette.getSuccess()
443
+ ? style?.onlineStatusColor || theme.palette.getSuccess()
442
444
  : 'transparent'
443
445
  }
444
446
  statusIndicatorStyle={
445
- groupObj
447
+ (groupObj
446
448
  ? {
447
449
  height: 15,
448
450
  width: 15,
@@ -455,7 +457,7 @@ export const CometChatMessageHeader = (
455
457
  borderRadius: 15,
456
458
  ...statusIndicatorStyle,
457
459
  }
458
- : { ...statusIndicatorStyle }
460
+ : { ...statusIndicatorStyle }) as ViewProps
459
461
  }
460
462
  statusIndicatorIcon={
461
463
  groupObj
@@ -54,6 +54,7 @@ export class MessageHeaderConfiguration {
54
54
  constructor(props: MessageHeaderConfigurationInterface) {
55
55
  if (props) {
56
56
  for (const [key, value] of Object.entries(props)) {
57
+ //@ts-ignore
57
58
  this[key] = value;
58
59
  }
59
60
  }
@@ -1,16 +1,15 @@
1
1
  import {
2
- CometChatMessageHeader,
3
- CometChatMessageHeaderInterface,
4
- MessageHeaderStyleInterface,
5
- } from './CometChatMessageHeader';
2
+ CometChatMessageHeader,
3
+ CometChatMessageHeaderInterface,
4
+ MessageHeaderStyleInterface,
5
+ } from "./CometChatMessageHeader";
6
6
  import {
7
- MessageHeaderConfiguration,
8
- MessageHeaderConfigurationInterface,
9
- } from './MessageHeaderConfiguration';
10
- export {
11
- CometChatMessageHeader,
12
- MessageHeaderConfiguration,
13
- MessageHeaderConfigurationInterface,
14
- CometChatMessageHeaderInterface,
15
- MessageHeaderStyleInterface,
7
+ MessageHeaderConfiguration,
8
+ MessageHeaderConfigurationInterface,
9
+ } from "./MessageHeaderConfiguration";
10
+ export { CometChatMessageHeader, MessageHeaderConfiguration };
11
+ export type {
12
+ MessageHeaderConfigurationInterface,
13
+ CometChatMessageHeaderInterface,
14
+ MessageHeaderStyleInterface,
16
15
  };