@cometchat/chat-uikit-react-native 5.1.0 → 5.1.2

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 (642) hide show
  1. package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +2 -0
  2. package/android/src/main/java/com/reactnativecometchatuikit/ProximityModule.java +53 -0
  3. package/ios/Proximity.h +5 -0
  4. package/ios/Proximity.m +25 -0
  5. package/lib/CometChatConversations/CometChatConversations.js +27 -19
  6. package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
  7. package/lib/CometChatConversations/Skeleton.js +1 -1
  8. package/lib/CometChatConversations/Skeleton.js.map +1 -1
  9. package/lib/CometChatConversations/style.js.map +1 -1
  10. package/lib/CometChatGroupMembers/CometChatGroupMembers.js +52 -41
  11. package/lib/CometChatGroupMembers/CometChatGroupMembers.js.map +1 -1
  12. package/lib/CometChatGroups/CometChatGroups.js +8 -6
  13. package/lib/CometChatGroups/CometChatGroups.js.map +1 -1
  14. package/lib/CometChatGroups/Skeleton.js +1 -1
  15. package/lib/CometChatGroups/Skeleton.js.map +1 -1
  16. package/lib/CometChatMessageComposer/CometChatMessageComposer.js +178 -44
  17. package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
  18. package/lib/CometChatMessageComposer/styles.d.ts +1 -1
  19. package/lib/CometChatMessageComposer/styles.js +1 -5
  20. package/lib/CometChatMessageComposer/styles.js.map +1 -1
  21. package/lib/CometChatMessageHeader/CometChatMessageHeader.js +14 -52
  22. package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
  23. package/lib/CometChatMessageInformation/CometChatMessageInformation.js +7 -12
  24. package/lib/CometChatMessageInformation/CometChatMessageInformation.js.map +1 -1
  25. package/lib/CometChatMessageList/CometChatMessageList.js +35 -13
  26. package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
  27. package/lib/CometChatMessageList/style.js +0 -16
  28. package/lib/CometChatMessageList/style.js.map +1 -1
  29. package/lib/CometChatThreadHeader/CometChatThreadHeader.js +4 -2
  30. package/lib/CometChatThreadHeader/CometChatThreadHeader.js.map +1 -1
  31. package/lib/CometChatThreadHeader/Header.d.ts +4 -4
  32. package/lib/CometChatUsers/CometChatUsers.js +7 -5
  33. package/lib/CometChatUsers/CometChatUsers.js.map +1 -1
  34. package/lib/CometChatUsers/Skeleton.js +1 -1
  35. package/lib/CometChatUsers/Skeleton.js.map +1 -1
  36. package/lib/calls/CallUtils.js +24 -17
  37. package/lib/calls/CallUtils.js.map +1 -1
  38. package/lib/calls/CallingExtensionDecorator.js +14 -11
  39. package/lib/calls/CallingExtensionDecorator.js.map +1 -1
  40. package/lib/calls/CallingPackage.js.map +1 -1
  41. package/lib/calls/CometChatCallBubble/CometChatCallBubble.js +4 -3
  42. package/lib/calls/CometChatCallBubble/CometChatCallBubble.js.map +1 -1
  43. package/lib/calls/CometChatCallButtons/CometChatCallButtons.js.map +1 -1
  44. package/lib/calls/CometChatCallButtons/style.d.ts +1 -1
  45. package/lib/calls/CometChatCallLogs/CometChatCallLogs.js +9 -7
  46. package/lib/calls/CometChatCallLogs/CometChatCallLogs.js.map +1 -1
  47. package/lib/calls/CometChatCallLogs/Skeleton.js +1 -1
  48. package/lib/calls/CometChatCallLogs/Skeleton.js.map +1 -1
  49. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +8 -6
  50. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
  51. package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.js +10 -0
  52. package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.js.map +1 -1
  53. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +4 -2
  54. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
  55. package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.js.map +1 -1
  56. package/lib/extensions/CollaborativeBubble/style.js +2 -2
  57. package/lib/extensions/CollaborativeBubble/style.js.map +1 -1
  58. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.js +5 -4
  59. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.js.map +1 -1
  60. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.js +5 -4
  61. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.js.map +1 -1
  62. package/lib/extensions/ExtensionConstants.js +1 -1
  63. package/lib/extensions/ExtensionConstants.js.map +1 -1
  64. package/lib/extensions/ExtensionModerator.js.map +1 -1
  65. package/lib/extensions/LinkPreview/LinkPreviewBubble.js +3 -2
  66. package/lib/extensions/LinkPreview/LinkPreviewBubble.js.map +1 -1
  67. package/lib/extensions/LinkPreview/LinkPreviewExtensionDecorator.js.map +1 -1
  68. package/lib/extensions/MessageTranslation/MessageTranslationBubble.js +3 -2
  69. package/lib/extensions/MessageTranslation/MessageTranslationBubble.js.map +1 -1
  70. package/lib/extensions/MessageTranslation/MessageTranslationDecorator.js +17 -17
  71. package/lib/extensions/MessageTranslation/MessageTranslationDecorator.js.map +1 -1
  72. package/lib/extensions/Polls/Polls.js +48 -19
  73. package/lib/extensions/Polls/Polls.js.map +1 -1
  74. package/lib/extensions/Polls/PollsBubble.js.map +1 -1
  75. package/lib/extensions/Polls/PollsDecorator.js +4 -3
  76. package/lib/extensions/Polls/PollsDecorator.js.map +1 -1
  77. package/lib/extensions/Polls/PollsExtension.js.map +1 -1
  78. package/lib/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.js +4 -3
  79. package/lib/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.js.map +1 -1
  80. package/lib/extensions/Stickers/CometChatStickerKeyboard/Skeleton.js.map +1 -1
  81. package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.d.ts +2 -1
  82. package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.js +3 -2
  83. package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.js.map +1 -1
  84. package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +2 -1
  85. package/lib/extensions/Stickers/StickersExtensionDecorator.js +5 -3
  86. package/lib/extensions/Stickers/StickersExtensionDecorator.js.map +1 -1
  87. package/lib/extensions/Stickers/style.js +3 -3
  88. package/lib/extensions/Stickers/style.js.map +1 -1
  89. package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.js.map +1 -1
  90. package/lib/index.d.ts +7 -3
  91. package/lib/index.js +9 -4
  92. package/lib/index.js.map +1 -1
  93. package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +1 -3
  94. package/lib/shared/CometChatUiKit/CometChatUIKit.js +2 -5
  95. package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
  96. package/lib/shared/constants/UIKitConstants.js.map +1 -1
  97. package/lib/shared/events/CometChatMessageEvents/index.js +1 -2
  98. package/lib/shared/events/CometChatMessageEvents/index.js.map +1 -1
  99. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +1 -2
  100. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
  101. package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
  102. package/lib/shared/events/ListenerInitializer.js +1 -2
  103. package/lib/shared/events/ListenerInitializer.js.map +1 -1
  104. package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.d.ts +21 -7
  105. package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.js +92 -31
  106. package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.js.map +1 -1
  107. package/lib/shared/formatters/CometChatTextFormatter.js.map +1 -1
  108. package/lib/shared/formatters/CometChatUrlsFormatter/index.js.map +1 -1
  109. package/lib/shared/framework/ChatConfigurator.js +1 -2
  110. package/lib/shared/framework/ChatConfigurator.js.map +1 -1
  111. package/lib/shared/framework/DataSource.d.ts +2 -2
  112. package/lib/shared/framework/DataSourceDecorator.d.ts +2 -2
  113. package/lib/shared/framework/DataSourceDecorator.js +4 -4
  114. package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
  115. package/lib/shared/framework/MessageDataSource.d.ts +10 -2
  116. package/lib/shared/framework/MessageDataSource.js +144 -44
  117. package/lib/shared/framework/MessageDataSource.js.map +1 -1
  118. package/lib/shared/helper/LocalizedDateHelper.d.ts +70 -0
  119. package/lib/shared/helper/LocalizedDateHelper.js +265 -0
  120. package/lib/shared/helper/LocalizedDateHelper.js.map +1 -0
  121. package/lib/shared/helper/dateHelper.js +1 -2
  122. package/lib/shared/helper/dateHelper.js.map +1 -1
  123. package/lib/shared/helper/functions.d.ts +1 -0
  124. package/lib/shared/helper/functions.js +48 -0
  125. package/lib/shared/helper/functions.js.map +1 -1
  126. package/lib/shared/helper/helperFunctions.d.ts +1 -1
  127. package/lib/shared/helper/helperFunctions.js.map +1 -1
  128. package/lib/shared/helper/useKeyboard.js.map +1 -1
  129. package/lib/shared/helper/useLocalizedDateHook.d.ts +6 -0
  130. package/lib/shared/helper/useLocalizedDateHook.js +15 -0
  131. package/lib/shared/helper/useLocalizedDateHook.js.map +1 -0
  132. package/lib/shared/icons/Icon.js.map +1 -1
  133. package/lib/shared/icons/components/ListItemCheck.d.ts +0 -1
  134. package/lib/shared/icons/components/StickerBase-icon.d.ts +0 -1
  135. package/lib/shared/icons/components/account-circle-fill.d.ts +0 -1
  136. package/lib/shared/icons/components/account-circle.d.ts +0 -1
  137. package/lib/shared/icons/components/activity.d.ts +0 -1
  138. package/lib/shared/icons/components/add-a-photo-fill.d.ts +0 -1
  139. package/lib/shared/icons/components/add-a-photo.d.ts +0 -1
  140. package/lib/shared/icons/components/add-box-fill.d.ts +0 -1
  141. package/lib/shared/icons/components/add-box.d.ts +0 -1
  142. package/lib/shared/icons/components/add-call-fill.d.ts +0 -1
  143. package/lib/shared/icons/components/add-call.d.ts +0 -1
  144. package/lib/shared/icons/components/add-circle-fill.d.ts +0 -1
  145. package/lib/shared/icons/components/add-circle.d.ts +0 -1
  146. package/lib/shared/icons/components/add-comment-fill.d.ts +0 -1
  147. package/lib/shared/icons/components/add-comment.d.ts +0 -1
  148. package/lib/shared/icons/components/add-fill.d.ts +0 -1
  149. package/lib/shared/icons/components/add-reaction-fill.d.ts +0 -1
  150. package/lib/shared/icons/components/add-reaction.d.ts +0 -1
  151. package/lib/shared/icons/components/add.d.ts +0 -1
  152. package/lib/shared/icons/components/ai-conversation-summary-fill.d.ts +0 -1
  153. package/lib/shared/icons/components/ai-conversation-summary.d.ts +0 -1
  154. package/lib/shared/icons/components/ai-fill.d.ts +0 -1
  155. package/lib/shared/icons/components/ai-suggest-reply-fill.d.ts +0 -1
  156. package/lib/shared/icons/components/ai-suggest-reply.d.ts +0 -1
  157. package/lib/shared/icons/components/ai.d.ts +0 -1
  158. package/lib/shared/icons/components/alternate-email-fill.d.ts +0 -1
  159. package/lib/shared/icons/components/alternate-email.d.ts +0 -1
  160. package/lib/shared/icons/components/animals-&-nature.d.ts +0 -1
  161. package/lib/shared/icons/components/archive-fill.d.ts +0 -1
  162. package/lib/shared/icons/components/archive.d.ts +0 -1
  163. package/lib/shared/icons/components/arrow-back-fill.d.ts +0 -1
  164. package/lib/shared/icons/components/arrow-back.d.ts +0 -1
  165. package/lib/shared/icons/components/arrow-forward-fill.d.ts +0 -1
  166. package/lib/shared/icons/components/arrow-forward.d.ts +0 -1
  167. package/lib/shared/icons/components/attach-file-fill.d.ts +0 -1
  168. package/lib/shared/icons/components/attach-file.d.ts +0 -1
  169. package/lib/shared/icons/components/audio-file-type.d.ts +0 -1
  170. package/lib/shared/icons/components/bar-chart-fill.d.ts +0 -1
  171. package/lib/shared/icons/components/bar-chart.d.ts +0 -1
  172. package/lib/shared/icons/components/base-icon.d.ts +0 -1
  173. package/lib/shared/icons/components/bedtime-fill.d.ts +0 -1
  174. package/lib/shared/icons/components/bedtime.d.ts +0 -1
  175. package/lib/shared/icons/components/block-fill.d.ts +0 -1
  176. package/lib/shared/icons/components/block.d.ts +0 -1
  177. package/lib/shared/icons/components/bookmark-add-fill.d.ts +0 -1
  178. package/lib/shared/icons/components/bookmark-add.d.ts +0 -1
  179. package/lib/shared/icons/components/bookmark-fill.d.ts +0 -1
  180. package/lib/shared/icons/components/bookmark.d.ts +0 -1
  181. package/lib/shared/icons/components/calendar-add-on-fill.d.ts +0 -1
  182. package/lib/shared/icons/components/calendar-add-on.d.ts +0 -1
  183. package/lib/shared/icons/components/calendar-today-fill.d.ts +0 -1
  184. package/lib/shared/icons/components/calendar-today.d.ts +0 -1
  185. package/lib/shared/icons/components/call-end-fill.d.ts +0 -1
  186. package/lib/shared/icons/components/call-end.d.ts +0 -1
  187. package/lib/shared/icons/components/call-fill.d.ts +0 -1
  188. package/lib/shared/icons/components/call-log-fill.d.ts +0 -1
  189. package/lib/shared/icons/components/call-log.d.ts +0 -1
  190. package/lib/shared/icons/components/call-made-fill.d.ts +0 -1
  191. package/lib/shared/icons/components/call-made.d.ts +0 -1
  192. package/lib/shared/icons/components/call-missed-fill.d.ts +0 -1
  193. package/lib/shared/icons/components/call-missed-outgoing-fill.d.ts +0 -1
  194. package/lib/shared/icons/components/call-missed-outgoing.d.ts +0 -1
  195. package/lib/shared/icons/components/call-missed.d.ts +0 -1
  196. package/lib/shared/icons/components/call-received-fill.d.ts +0 -1
  197. package/lib/shared/icons/components/call-received.d.ts +0 -1
  198. package/lib/shared/icons/components/call.d.ts +0 -1
  199. package/lib/shared/icons/components/cancel-fill.d.ts +0 -1
  200. package/lib/shared/icons/components/cancel.d.ts +0 -1
  201. package/lib/shared/icons/components/change-circle-fill.d.ts +0 -1
  202. package/lib/shared/icons/components/change-circle.d.ts +0 -1
  203. package/lib/shared/icons/components/chat-bot-fill.d.ts +0 -1
  204. package/lib/shared/icons/components/chat-bot.d.ts +0 -1
  205. package/lib/shared/icons/components/chat-fill.d.ts +0 -1
  206. package/lib/shared/icons/components/chat.d.ts +0 -1
  207. package/lib/shared/icons/components/check-circle-fill.d.ts +0 -1
  208. package/lib/shared/icons/components/check-circle.d.ts +0 -1
  209. package/lib/shared/icons/components/check-fill.d.ts +0 -1
  210. package/lib/shared/icons/components/check.d.ts +0 -1
  211. package/lib/shared/icons/components/chevron-left-fill.d.ts +0 -1
  212. package/lib/shared/icons/components/chevron-left.d.ts +0 -1
  213. package/lib/shared/icons/components/chevron-right-fill.d.ts +0 -1
  214. package/lib/shared/icons/components/chevron-right.d.ts +0 -1
  215. package/lib/shared/icons/components/close-fill.d.ts +0 -1
  216. package/lib/shared/icons/components/close.d.ts +0 -1
  217. package/lib/shared/icons/components/collaborative-document-fill.d.ts +0 -1
  218. package/lib/shared/icons/components/collaborative-document-icon.d.ts +0 -1
  219. package/lib/shared/icons/components/collaborative-document.d.ts +0 -1
  220. package/lib/shared/icons/components/collaborative-whiteboard-fill.d.ts +0 -1
  221. package/lib/shared/icons/components/collaborative-whiteboard-icon.d.ts +0 -1
  222. package/lib/shared/icons/components/collaborative-whiteboard.d.ts +0 -1
  223. package/lib/shared/icons/components/content-copy-fill.d.ts +0 -1
  224. package/lib/shared/icons/components/content-copy.d.ts +0 -1
  225. package/lib/shared/icons/components/crop-fill.d.ts +0 -1
  226. package/lib/shared/icons/components/crop.d.ts +0 -1
  227. package/lib/shared/icons/components/delete-fill.d.ts +0 -1
  228. package/lib/shared/icons/components/delete.d.ts +0 -1
  229. package/lib/shared/icons/components/description-fill.d.ts +0 -1
  230. package/lib/shared/icons/components/description.d.ts +0 -1
  231. package/lib/shared/icons/components/document-file-type.d.ts +0 -1
  232. package/lib/shared/icons/components/done-all-fill.d.ts +0 -1
  233. package/lib/shared/icons/components/done-all.d.ts +0 -1
  234. package/lib/shared/icons/components/download-fill.d.ts +0 -1
  235. package/lib/shared/icons/components/download.d.ts +0 -1
  236. package/lib/shared/icons/components/edit-calendar-fill.d.ts +0 -1
  237. package/lib/shared/icons/components/edit-calendar.d.ts +0 -1
  238. package/lib/shared/icons/components/edit-fill.d.ts +0 -1
  239. package/lib/shared/icons/components/edit-square-fill.d.ts +0 -1
  240. package/lib/shared/icons/components/edit-square.d.ts +0 -1
  241. package/lib/shared/icons/components/edit.d.ts +0 -1
  242. package/lib/shared/icons/components/empty-state.d.ts +0 -1
  243. package/lib/shared/icons/components/error-fill.d.ts +0 -1
  244. package/lib/shared/icons/components/error-state.d.ts +0 -1
  245. package/lib/shared/icons/components/error.d.ts +0 -1
  246. package/lib/shared/icons/components/event-available-fill.d.ts +0 -1
  247. package/lib/shared/icons/components/event-available.d.ts +0 -1
  248. package/lib/shared/icons/components/event-fill.d.ts +0 -1
  249. package/lib/shared/icons/components/event.d.ts +0 -1
  250. package/lib/shared/icons/components/favorite-fill.d.ts +0 -1
  251. package/lib/shared/icons/components/favorite.d.ts +0 -1
  252. package/lib/shared/icons/components/filter-list-fill.d.ts +0 -1
  253. package/lib/shared/icons/components/filter-list-off-fill.d.ts +0 -1
  254. package/lib/shared/icons/components/filter-list-off.d.ts +0 -1
  255. package/lib/shared/icons/components/filter-list.d.ts +0 -1
  256. package/lib/shared/icons/components/flags.d.ts +0 -1
  257. package/lib/shared/icons/components/flip-camera-ios-fill.d.ts +0 -1
  258. package/lib/shared/icons/components/flip-camera-ios.d.ts +0 -1
  259. package/lib/shared/icons/components/food-&-drink.d.ts +0 -1
  260. package/lib/shared/icons/components/forward-fill.d.ts +0 -1
  261. package/lib/shared/icons/components/forward.d.ts +0 -1
  262. package/lib/shared/icons/components/gif-fill.d.ts +0 -1
  263. package/lib/shared/icons/components/gif.d.ts +0 -1
  264. package/lib/shared/icons/components/graphic-eq-fill.d.ts +0 -1
  265. package/lib/shared/icons/components/graphic-eq.d.ts +0 -1
  266. package/lib/shared/icons/components/group-add.d.ts +0 -1
  267. package/lib/shared/icons/components/group-fill.d.ts +0 -1
  268. package/lib/shared/icons/components/group.d.ts +0 -1
  269. package/lib/shared/icons/components/help-fill.d.ts +0 -1
  270. package/lib/shared/icons/components/help.d.ts +0 -1
  271. package/lib/shared/icons/components/history-fill.d.ts +0 -1
  272. package/lib/shared/icons/components/history.d.ts +0 -1
  273. package/lib/shared/icons/components/image-file-type.d.ts +0 -1
  274. package/lib/shared/icons/components/incoming-audio-fill.d.ts +0 -1
  275. package/lib/shared/icons/components/incoming-audio.d.ts +0 -1
  276. package/lib/shared/icons/components/incoming-video-fill.d.ts +0 -1
  277. package/lib/shared/icons/components/incoming-video.d.ts +0 -1
  278. package/lib/shared/icons/components/info-fill.d.ts +0 -1
  279. package/lib/shared/icons/components/info.d.ts +0 -1
  280. package/lib/shared/icons/components/keep-fill.d.ts +0 -1
  281. package/lib/shared/icons/components/keep-off-fill.d.ts +0 -1
  282. package/lib/shared/icons/components/keep-off.d.ts +0 -1
  283. package/lib/shared/icons/components/keep.d.ts +0 -1
  284. package/lib/shared/icons/components/keyboard-arrow-down-fill.d.ts +0 -1
  285. package/lib/shared/icons/components/keyboard-arrow-down.d.ts +0 -1
  286. package/lib/shared/icons/components/keyboard-arrow-up-fill.d.ts +0 -1
  287. package/lib/shared/icons/components/keyboard-arrow-up.d.ts +0 -1
  288. package/lib/shared/icons/components/keyboard-fill.d.ts +0 -1
  289. package/lib/shared/icons/components/keyboard.d.ts +0 -1
  290. package/lib/shared/icons/components/language-fill.d.ts +0 -1
  291. package/lib/shared/icons/components/language.d.ts +0 -1
  292. package/lib/shared/icons/components/link-fill.d.ts +0 -1
  293. package/lib/shared/icons/components/link.d.ts +0 -1
  294. package/lib/shared/icons/components/loading-fill.d.ts +0 -1
  295. package/lib/shared/icons/components/loading.d.ts +0 -1
  296. package/lib/shared/icons/components/location-on-fill.d.ts +0 -1
  297. package/lib/shared/icons/components/location-on.d.ts +0 -1
  298. package/lib/shared/icons/components/lock-fill.d.ts +0 -1
  299. package/lib/shared/icons/components/lock-open-fill.d.ts +0 -1
  300. package/lib/shared/icons/components/lock-open.d.ts +0 -1
  301. package/lib/shared/icons/components/lock.d.ts +0 -1
  302. package/lib/shared/icons/components/logout-fill.d.ts +0 -1
  303. package/lib/shared/icons/components/logout.d.ts +0 -1
  304. package/lib/shared/icons/components/mail-fill.d.ts +0 -1
  305. package/lib/shared/icons/components/mail.d.ts +0 -1
  306. package/lib/shared/icons/components/mic-fill.d.ts +0 -1
  307. package/lib/shared/icons/components/mic-off-fill.d.ts +0 -1
  308. package/lib/shared/icons/components/mic-off.d.ts +0 -1
  309. package/lib/shared/icons/components/mic.d.ts +0 -1
  310. package/lib/shared/icons/components/missed-video-call-fill.d.ts +0 -1
  311. package/lib/shared/icons/components/missed-video-call.d.ts +0 -1
  312. package/lib/shared/icons/components/mood-fill.d.ts +0 -1
  313. package/lib/shared/icons/components/mood.d.ts +0 -1
  314. package/lib/shared/icons/components/more-vert-fill.d.ts +0 -1
  315. package/lib/shared/icons/components/more-vert.d.ts +0 -1
  316. package/lib/shared/icons/components/near-me-fill.d.ts +0 -1
  317. package/lib/shared/icons/components/near-me.d.ts +0 -1
  318. package/lib/shared/icons/components/no-photography-fill.d.ts +0 -1
  319. package/lib/shared/icons/components/no-photography.d.ts +0 -1
  320. package/lib/shared/icons/components/notifications-fill.d.ts +0 -1
  321. package/lib/shared/icons/components/notifications-off-fill.d.ts +0 -1
  322. package/lib/shared/icons/components/notifications-off.d.ts +0 -1
  323. package/lib/shared/icons/components/notifications.d.ts +0 -1
  324. package/lib/shared/icons/components/objects.d.ts +0 -1
  325. package/lib/shared/icons/components/outgoing-audio-fill.d.ts +0 -1
  326. package/lib/shared/icons/components/outgoing-audio.d.ts +0 -1
  327. package/lib/shared/icons/components/outgoing-video-fill.d.ts +0 -1
  328. package/lib/shared/icons/components/outgoing-video.d.ts +0 -1
  329. package/lib/shared/icons/components/pause-fill.d.ts +0 -1
  330. package/lib/shared/icons/components/pause.d.ts +0 -1
  331. package/lib/shared/icons/components/pdf-file-type.d.ts +0 -1
  332. package/lib/shared/icons/components/person-add-fill.d.ts +0 -1
  333. package/lib/shared/icons/components/person-add.d.ts +0 -1
  334. package/lib/shared/icons/components/person-fill.d.ts +0 -1
  335. package/lib/shared/icons/components/person-off.d.ts +0 -1
  336. package/lib/shared/icons/components/person.d.ts +0 -1
  337. package/lib/shared/icons/components/phone-in-talk-fill.d.ts +0 -1
  338. package/lib/shared/icons/components/phone-in-talk.d.ts +0 -1
  339. package/lib/shared/icons/components/phone-incoming-fill.d.ts +0 -1
  340. package/lib/shared/icons/components/phone-incoming.d.ts +0 -1
  341. package/lib/shared/icons/components/phone-missed-fill.d.ts +0 -1
  342. package/lib/shared/icons/components/phone-missed.d.ts +0 -1
  343. package/lib/shared/icons/components/phone-outgoing-fill.d.ts +0 -1
  344. package/lib/shared/icons/components/phone-outgoing.d.ts +0 -1
  345. package/lib/shared/icons/components/photo-camera-fill.d.ts +0 -1
  346. package/lib/shared/icons/components/photo-camera.d.ts +0 -1
  347. package/lib/shared/icons/components/photo-fill.d.ts +0 -1
  348. package/lib/shared/icons/components/photo.d.ts +0 -1
  349. package/lib/shared/icons/components/play-arrow-fill.d.ts +0 -1
  350. package/lib/shared/icons/components/play-arrow.d.ts +0 -1
  351. package/lib/shared/icons/components/play-circle-fill.d.ts +0 -1
  352. package/lib/shared/icons/components/play-circle.d.ts +0 -1
  353. package/lib/shared/icons/components/poll-Icon.d.ts +0 -1
  354. package/lib/shared/icons/components/poll-fill.d.ts +0 -1
  355. package/lib/shared/icons/components/poll.d.ts +0 -1
  356. package/lib/shared/icons/components/presentation-file-type.d.ts +0 -1
  357. package/lib/shared/icons/components/rearrange-fill.d.ts +0 -1
  358. package/lib/shared/icons/components/rearrange.d.ts +0 -1
  359. package/lib/shared/icons/components/refresh-fill.d.ts +0 -1
  360. package/lib/shared/icons/components/refresh.d.ts +0 -1
  361. package/lib/shared/icons/components/reply-all-fill.d.ts +0 -1
  362. package/lib/shared/icons/components/reply-all.d.ts +0 -1
  363. package/lib/shared/icons/components/reply-fill.d.ts +0 -1
  364. package/lib/shared/icons/components/reply.d.ts +0 -1
  365. package/lib/shared/icons/components/retry-fill.d.ts +0 -1
  366. package/lib/shared/icons/components/retry.d.ts +0 -1
  367. package/lib/shared/icons/components/schedule-fill.d.ts +0 -1
  368. package/lib/shared/icons/components/schedule.d.ts +0 -1
  369. package/lib/shared/icons/components/screen-share-fill.d.ts +0 -1
  370. package/lib/shared/icons/components/screen-share.d.ts +0 -1
  371. package/lib/shared/icons/components/search-fill.d.ts +0 -1
  372. package/lib/shared/icons/components/search.d.ts +0 -1
  373. package/lib/shared/icons/components/send-fill.d.ts +0 -1
  374. package/lib/shared/icons/components/send.d.ts +0 -1
  375. package/lib/shared/icons/components/settings-fill.d.ts +0 -1
  376. package/lib/shared/icons/components/settings.d.ts +0 -1
  377. package/lib/shared/icons/components/share-fill.d.ts +0 -1
  378. package/lib/shared/icons/components/share.d.ts +0 -1
  379. package/lib/shared/icons/components/shield-fill.d.ts +0 -1
  380. package/lib/shared/icons/components/shield.d.ts +0 -1
  381. package/lib/shared/icons/components/smileys-&-people.d.ts +0 -1
  382. package/lib/shared/icons/components/spreadsheet-file-type.d.ts +0 -1
  383. package/lib/shared/icons/components/star-fill.d.ts +0 -1
  384. package/lib/shared/icons/components/star.d.ts +0 -1
  385. package/lib/shared/icons/components/sticker-fill.d.ts +0 -1
  386. package/lib/shared/icons/components/sticker.d.ts +0 -1
  387. package/lib/shared/icons/components/stop-circle-fill.d.ts +0 -1
  388. package/lib/shared/icons/components/stop-circle.d.ts +0 -1
  389. package/lib/shared/icons/components/stop-fill.d.ts +0 -1
  390. package/lib/shared/icons/components/stop-screen-share-fill.d.ts +0 -1
  391. package/lib/shared/icons/components/stop-screen-share.d.ts +0 -1
  392. package/lib/shared/icons/components/stop.d.ts +0 -1
  393. package/lib/shared/icons/components/subdirectory-arrow-left-fill.d.ts +0 -1
  394. package/lib/shared/icons/components/subdirectory-arrow-left.d.ts +0 -1
  395. package/lib/shared/icons/components/subdirectory-arrow-right-fill.d.ts +0 -1
  396. package/lib/shared/icons/components/subdirectory-arrow-right.d.ts +0 -1
  397. package/lib/shared/icons/components/sunny-fill.d.ts +0 -1
  398. package/lib/shared/icons/components/sunny.d.ts +0 -1
  399. package/lib/shared/icons/components/symbols.d.ts +0 -1
  400. package/lib/shared/icons/components/text-file-type.d.ts +0 -1
  401. package/lib/shared/icons/components/thumb-down-fill.d.ts +0 -1
  402. package/lib/shared/icons/components/thumb-down.d.ts +0 -1
  403. package/lib/shared/icons/components/thumb-up-fill.d.ts +0 -1
  404. package/lib/shared/icons/components/thumb-up.d.ts +0 -1
  405. package/lib/shared/icons/components/translate-fill.d.ts +0 -1
  406. package/lib/shared/icons/components/translate.d.ts +0 -1
  407. package/lib/shared/icons/components/travel-&-places.d.ts +0 -1
  408. package/lib/shared/icons/components/unknown-file-type.d.ts +0 -1
  409. package/lib/shared/icons/components/upload-fill.d.ts +0 -1
  410. package/lib/shared/icons/components/upload.d.ts +0 -1
  411. package/lib/shared/icons/components/user-empty-icon.d.ts +0 -1
  412. package/lib/shared/icons/components/video-call-fill.d.ts +0 -1
  413. package/lib/shared/icons/components/video-call.d.ts +0 -1
  414. package/lib/shared/icons/components/video-file-type.d.ts +0 -1
  415. package/lib/shared/icons/components/videocam-fill.d.ts +0 -1
  416. package/lib/shared/icons/components/videocam-off-fill.d.ts +0 -1
  417. package/lib/shared/icons/components/videocam-off.d.ts +0 -1
  418. package/lib/shared/icons/components/videocam.d.ts +0 -1
  419. package/lib/shared/icons/components/visibility-off-fill.d.ts +0 -1
  420. package/lib/shared/icons/components/visibility-off.d.ts +0 -1
  421. package/lib/shared/icons/components/volume-down-fill.d.ts +0 -1
  422. package/lib/shared/icons/components/volume-down.d.ts +0 -1
  423. package/lib/shared/icons/components/volume-mute-fill.d.ts +0 -1
  424. package/lib/shared/icons/components/volume-mute.d.ts +0 -1
  425. package/lib/shared/icons/components/volume-off-fill.d.ts +0 -1
  426. package/lib/shared/icons/components/volume-off.d.ts +0 -1
  427. package/lib/shared/icons/components/volume-up-fill.d.ts +0 -1
  428. package/lib/shared/icons/components/volume-up.d.ts +0 -1
  429. package/lib/shared/icons/components/warning-fill.d.ts +0 -1
  430. package/lib/shared/icons/components/warning.d.ts +0 -1
  431. package/lib/shared/icons/components/wifi-fill.d.ts +0 -1
  432. package/lib/shared/icons/components/wifi.d.ts +0 -1
  433. package/lib/shared/icons/components/zip-file-type.d.ts +0 -1
  434. package/lib/shared/icons/components/zoom-in-map-fill.d.ts +0 -1
  435. package/lib/shared/icons/components/zoom-in-map.d.ts +0 -1
  436. package/lib/shared/icons/components/zoom-out-map-fill.d.ts +0 -1
  437. package/lib/shared/icons/components/zoom-out-map.d.ts +0 -1
  438. package/lib/shared/icons/icon-mapping.d.ts +0 -1
  439. package/lib/shared/index.d.ts +20 -14
  440. package/lib/shared/index.js +15 -29
  441. package/lib/shared/index.js.map +1 -1
  442. package/lib/shared/libs/ImageZoom/ReactNativeZoomableView.js.map +1 -1
  443. package/lib/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.js.map +1 -1
  444. package/lib/shared/libs/ImageZoom/helper.js.map +1 -1
  445. package/lib/shared/libs/VideoPlayer/DRMType.d.ts +4 -4
  446. package/lib/shared/libs/VideoPlayer/FilterType.d.ts +16 -16
  447. package/lib/shared/libs/VideoPlayer/TextTrackType.d.ts +3 -3
  448. package/lib/shared/libs/VideoPlayer/VideoResizeMode.d.ts +3 -3
  449. package/lib/shared/modals/CometChatMessageTemplate.d.ts +3 -1
  450. package/lib/shared/modals/CometChatMessageTemplate.js +3 -1
  451. package/lib/shared/modals/CometChatMessageTemplate.js.map +1 -1
  452. package/lib/shared/resources/CometChatLocalizeNew/CometChatI18nProvider.d.ts +15 -0
  453. package/lib/shared/resources/CometChatLocalizeNew/CometChatI18nProvider.js +75 -0
  454. package/lib/shared/resources/CometChatLocalizeNew/CometChatI18nProvider.js.map +1 -0
  455. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.d.ts +9601 -0
  456. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.js +66 -0
  457. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.js.map +1 -0
  458. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizeContext.d.ts +3 -0
  459. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizeContext.js +12 -0
  460. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizeContext.js.map +1 -0
  461. package/lib/shared/resources/CometChatLocalizeNew/LocalizationManager.d.ts +5 -0
  462. package/lib/shared/resources/CometChatLocalizeNew/LocalizationManager.js +47 -0
  463. package/lib/shared/resources/CometChatLocalizeNew/LocalizationManager.js.map +1 -0
  464. package/lib/shared/resources/CometChatLocalizeNew/index.d.ts +6 -0
  465. package/lib/shared/resources/CometChatLocalizeNew/index.js +6 -0
  466. package/lib/shared/resources/CometChatLocalizeNew/index.js.map +1 -0
  467. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/de/translation.json +11 -1
  468. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/en/translation.json +10 -1
  469. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/es/translation.json +11 -1
  470. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/fr/translation.json +412 -401
  471. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/hi/translation.json +10 -1
  472. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/hu/translation.json +412 -402
  473. package/lib/shared/resources/CometChatLocalizeNew/resources/it/translation.json +456 -0
  474. package/lib/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +456 -0
  475. package/lib/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +456 -0
  476. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/lt/translation.json +412 -402
  477. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/ms/translation.json +412 -402
  478. package/lib/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +456 -0
  479. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/pt/translation.json +412 -402
  480. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/ru/translation.json +412 -402
  481. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/sv/translation.json +412 -402
  482. package/lib/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +456 -0
  483. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/zh/translation.json +412 -402
  484. package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/zh-tw/translation.json +412 -401
  485. package/lib/shared/resources/CometChatLocalizeNew/type.d.ts +5 -0
  486. package/lib/shared/resources/CometChatLocalizeNew/type.js +2 -0
  487. package/lib/shared/resources/CometChatLocalizeNew/type.js.map +1 -0
  488. package/lib/shared/resources/CometChatLocalizeNew/useCometChatTranslationHook.d.ts +5 -0
  489. package/lib/shared/resources/CometChatLocalizeNew/useCometChatTranslationHook.js +19 -0
  490. package/lib/shared/resources/CometChatLocalizeNew/useCometChatTranslationHook.js.map +1 -0
  491. package/lib/shared/resources/CometChatSoundManager/CometChatSoundManager.js +1 -2
  492. package/lib/shared/resources/CometChatSoundManager/CometChatSoundManager.js.map +1 -1
  493. package/lib/shared/resources/CometChatSoundManager/sound.d.ts +17 -17
  494. package/lib/shared/resources/CometChatSoundManager/sound.js.map +1 -1
  495. package/lib/shared/resources/index.d.ts +1 -2
  496. package/lib/shared/resources/index.js +1 -2
  497. package/lib/shared/resources/index.js.map +1 -1
  498. package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.d.ts +1 -10
  499. package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +0 -8
  500. package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js.map +1 -1
  501. package/lib/shared/utils/CometChatMessagePreview/index.d.ts +1 -2
  502. package/lib/shared/utils/CometChatMessagePreview/index.js +1 -3
  503. package/lib/shared/utils/CometChatMessagePreview/index.js.map +1 -1
  504. package/lib/shared/utils/CometChatMessagePreview/style.d.ts +60 -450
  505. package/lib/shared/utils/CommonUtils.d.ts +1 -1
  506. package/lib/shared/utils/CommonUtils.js.map +1 -1
  507. package/lib/shared/utils/MessageUtils.d.ts +2 -2
  508. package/lib/shared/utils/MessageUtils.js +10 -11
  509. package/lib/shared/utils/MessageUtils.js.map +1 -1
  510. package/lib/shared/utils/NetworkUtils.js.map +1 -1
  511. package/lib/shared/utils/PermissionUtil.js +5 -4
  512. package/lib/shared/utils/PermissionUtil.js.map +1 -1
  513. package/lib/shared/utils/conversationUtils.js +11 -11
  514. package/lib/shared/utils/conversationUtils.js.map +1 -1
  515. package/lib/shared/utils/icsToJson.js.map +1 -1
  516. package/lib/shared/utils/index.d.ts +2 -2
  517. package/lib/shared/utils/index.js +2 -2
  518. package/lib/shared/utils/index.js.map +1 -1
  519. package/lib/shared/views/CometChatAudioBubble/AnimatedAudioWaves.d.ts +1 -1
  520. package/lib/shared/views/CometChatAudioBubble/AnimatedAudioWaves.js.map +1 -1
  521. package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js +5 -3
  522. package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js.map +1 -1
  523. package/lib/shared/views/CometChatAvatar/CometChatAvatar.js +2 -1
  524. package/lib/shared/views/CometChatAvatar/CometChatAvatar.js.map +1 -1
  525. package/lib/shared/views/CometChatBadge/CometChatBadge.js.map +1 -1
  526. package/lib/shared/views/CometChatBottomSheet/CometChatBottomSheet.js +1 -1
  527. package/lib/shared/views/CometChatBottomSheet/CometChatBottomSheet.js.map +1 -1
  528. package/lib/shared/views/CometChatDate/CometChatDate.d.ts +11 -11
  529. package/lib/shared/views/CometChatDate/CometChatDate.js +5 -2
  530. package/lib/shared/views/CometChatDate/CometChatDate.js.map +1 -1
  531. package/lib/shared/views/CometChatDateSeperator/CometChatDateSeparator.d.ts +2 -2
  532. package/lib/shared/views/CometChatDateSeperator/CometChatDateSeparator.js +3 -2
  533. package/lib/shared/views/CometChatDateSeperator/CometChatDateSeparator.js.map +1 -1
  534. package/lib/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.js +3 -2
  535. package/lib/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.js.map +1 -1
  536. package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
  537. package/lib/shared/views/CometChatEmojiKeyboard/emojis.js +10 -8
  538. package/lib/shared/views/CometChatEmojiKeyboard/emojis.js.map +1 -1
  539. package/lib/shared/views/CometChatFileBubble/CometChatFileBubble.js.map +1 -1
  540. package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js +2 -2
  541. package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js.map +1 -1
  542. package/lib/shared/views/CometChatList/CometChatList.js +44 -9
  543. package/lib/shared/views/CometChatList/CometChatList.js.map +1 -1
  544. package/lib/shared/views/CometChatList/Header.js.map +1 -1
  545. package/lib/shared/views/CometChatListItem/CometChatListItem.js.map +1 -1
  546. package/lib/shared/views/CometChatMediaRecorder/AnimatingMic.d.ts +2 -2
  547. package/lib/shared/views/CometChatMediaRecorder/CometChatAudioPlayer.js.map +1 -1
  548. package/lib/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.js +13 -6
  549. package/lib/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.js.map +1 -1
  550. package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js +5 -4
  551. package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js.map +1 -1
  552. package/lib/shared/views/CometChatMediaRecorder/Timer.js.map +1 -1
  553. package/lib/shared/views/CometChatMessageBubble/CometChatMessageBubble.js +1 -1
  554. package/lib/shared/views/CometChatMessageBubble/CometChatMessageBubble.js.map +1 -1
  555. package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js +3 -2
  556. package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js.map +1 -1
  557. package/lib/shared/views/CometChatReactionList/CometChatReactionList.d.ts +4 -0
  558. package/lib/shared/views/CometChatReactionList/CometChatReactionList.js +13 -7
  559. package/lib/shared/views/CometChatReactionList/CometChatReactionList.js.map +1 -1
  560. package/lib/shared/views/CometChatReactions/CometChatReactions.js.map +1 -1
  561. package/lib/shared/views/CometChatReceipt/CometChatReceipt.js.map +1 -1
  562. package/lib/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.d.ts +1 -1
  563. package/lib/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.js.map +1 -1
  564. package/lib/shared/views/CometChatSuggestionList/CometChatSuggestionList.js.map +1 -1
  565. package/lib/shared/views/CometChatSuggestionList/Skeleton.js +18 -18
  566. package/lib/shared/views/CometChatSuggestionList/Skeleton.js.map +1 -1
  567. package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js +11 -9
  568. package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js.map +1 -1
  569. package/lib/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.d.ts +1 -0
  570. package/lib/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.js.map +1 -1
  571. package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js +9 -24
  572. package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js.map +1 -1
  573. package/lib/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.js +61 -61
  574. package/lib/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.js.map +1 -1
  575. package/lib/theme/CometChatThemeHelper.d.ts +69 -69
  576. package/lib/theme/CometChatThemeHelper.js.map +1 -1
  577. package/lib/theme/context.d.ts +3025 -2834
  578. package/lib/theme/context.js +1 -1
  579. package/lib/theme/context.js.map +1 -1
  580. package/lib/theme/default/default.d.ts +6 -0
  581. package/lib/theme/default/default.js +147 -0
  582. package/lib/theme/default/default.js.map +1 -0
  583. package/lib/theme/default/index.d.ts +0 -6
  584. package/lib/theme/default/index.js +0 -178
  585. package/lib/theme/default/index.js.map +1 -1
  586. package/lib/theme/provider.js +1 -1
  587. package/lib/theme/provider.js.map +1 -1
  588. package/package.json +4 -4
  589. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +15 -9
  590. package/src/CometChatMessageList/CometChatMessageList.tsx +120 -53
  591. package/src/calls/CallUtils.ts +1 -1
  592. package/src/calls/CallingExtensionDecorator.tsx +4 -2
  593. package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +13 -29
  594. package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +13 -0
  595. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +8 -5
  596. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +1 -1
  597. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +1 -1
  598. package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +1 -1
  599. package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +1 -1
  600. package/src/extensions/Polls/Polls.tsx +50 -22
  601. package/src/extensions/Polls/PollsDecorator.tsx +1 -1
  602. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +1 -1
  603. package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +1 -1
  604. package/src/shared/framework/MessageDataSource.tsx +1 -1
  605. package/src/shared/helper/LocalizedDateHelper.ts +1 -1
  606. package/src/shared/helper/functions.js +1 -1
  607. package/src/shared/modals/CometChatMessageTemplate.ts +12 -0
  608. package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +1 -0
  609. package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +1 -0
  610. package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +456 -454
  611. package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +416 -415
  612. package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +415 -414
  613. package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +414 -413
  614. package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +414 -413
  615. package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +414 -413
  616. package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +414 -414
  617. package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +415 -415
  618. package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +415 -413
  619. package/src/shared/utils/PermissionUtil.ts +1 -1
  620. package/src/shared/utils/conversationUtils.ts +1 -1
  621. package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +4 -2
  622. package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +5 -1
  623. package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +1 -1
  624. package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +1 -0
  625. package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +57 -45
  626. package/src/shared/views/CometChatList/CometChatList.tsx +44 -7
  627. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +121 -74
  628. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  629. package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
  630. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  631. package/android/.gradle/7.4/gc.properties +0 -0
  632. package/android/.gradle/vcs-1/gc.properties +0 -0
  633. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +0 -79
  634. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.js +0 -152
  635. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.js.map +0 -1
  636. package/lib/shared/resources/CometChatLocalize/index.d.ts +0 -2
  637. package/lib/shared/resources/CometChatLocalize/index.js +0 -3
  638. package/lib/shared/resources/CometChatLocalize/index.js.map +0 -1
  639. package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +0 -447
  640. package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.d.ts +0 -29
  641. package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +0 -29
  642. package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js.map +0 -1
@@ -515,7 +515,7 @@ export const CometChatMessageList = memo(
515
515
  }, [hideGroupActionMessages]);
516
516
 
517
517
  const theme = useTheme();
518
- const {t}=useCometChatTranslation()
518
+ const { t } = useCometChatTranslation();
519
519
 
520
520
  const mergedTheme: CometChatTheme = useMemo(() => {
521
521
  const themeClone = deepClone(theme);
@@ -1423,11 +1423,11 @@ export const CometChatMessageList = memo(
1423
1423
  });
1424
1424
  CometChatUIEventHandler.addGroupListener(groupEventListener, {
1425
1425
  ccGroupMemberUnBanned: ({ message }: any) => {
1426
- message["action"] = "unbanned";
1426
+ message["action"] = "unbanned";
1427
1427
  newMessage(message, false);
1428
1428
  },
1429
1429
  ccGroupMemberBanned: ({ message }: any) => {
1430
- message["action"] = "banned";
1430
+ message["action"] = "banned";
1431
1431
  newMessage(message, false);
1432
1432
  },
1433
1433
  ccGroupMemberAdded: ({ message, usersAdded, userAddedIn }: any) => {
@@ -1436,12 +1436,12 @@ export const CometChatMessageList = memo(
1436
1436
  message["muid"] = String(getUnixTimestamp());
1437
1437
  message["sentAt"] = getUnixTimestamp();
1438
1438
  message["actionOn"] = user;
1439
- message["action"] = "added";
1439
+ message["action"] = "added";
1440
1440
  newMessage(message, false);
1441
1441
  });
1442
1442
  },
1443
1443
  ccGroupMemberKicked: ({ message }: any) => {
1444
- message["action"] = "kicked";
1444
+ message["action"] = "kicked";
1445
1445
  newMessage(message, false);
1446
1446
  },
1447
1447
  ccGroupMemberScopeChanged: ({
@@ -1451,9 +1451,9 @@ export const CometChatMessageList = memo(
1451
1451
  scopeChangedFrom,
1452
1452
  group,
1453
1453
  }: any) => {
1454
- action["action"] = "scopeChanged";
1455
- action["newScope"] = scopeChangedTo;
1456
- action["oldScope"] = scopeChangedFrom;
1454
+ action["action"] = "scopeChanged";
1455
+ action["newScope"] = scopeChangedTo;
1456
+ action["oldScope"] = scopeChangedFrom;
1457
1457
  newMessage(action, false);
1458
1458
  },
1459
1459
  ccOwnershipChanged: ({ group, message }: any) => {
@@ -1465,7 +1465,7 @@ export const CometChatMessageList = memo(
1465
1465
  callListenerId,
1466
1466
  new CometChat.CallListener({
1467
1467
  onIncomingCallReceived: (call: any) => {
1468
- Platform.OS === 'ios' && Keyboard.dismiss();
1468
+ Platform.OS === "ios" && Keyboard.dismiss();
1469
1469
  newMessage(call);
1470
1470
  },
1471
1471
  onOutgoingCallAccepted: (call: any) => {
@@ -2135,8 +2135,11 @@ export const CometChatMessageList = memo(
2135
2135
  }, [isThreaded, message, getThreadView, bubbleAlignment]);
2136
2136
 
2137
2137
  const LeadingView = useMemo(() => {
2138
+ if (hasTemplate?.LeadingView) {
2139
+ return hasTemplate.LeadingView(message, bubbleAlignment);
2140
+ }
2138
2141
  return !isThreaded ? getLeadingView(message) : undefined;
2139
- }, [isThreaded, message, getLeadingView]);
2142
+ }, [isThreaded, message, getLeadingView, hasTemplate, bubbleAlignment]);
2140
2143
 
2141
2144
  const BottomView = useMemo(() => {
2142
2145
  return hasTemplate?.BottomView && hasTemplate?.BottomView(message, bubbleAlignment);
@@ -2154,6 +2157,11 @@ export const CometChatMessageList = memo(
2154
2157
 
2155
2158
  const onLongPress = useCallback(() => {
2156
2159
  if (message.getDeletedBy() != null) return;
2160
+
2161
+ if (!message.getId()) {
2162
+ return;
2163
+ }
2164
+
2157
2165
  setSelectedMessage(message);
2158
2166
  hasTemplate && openOptionsForMessage(message, hasTemplate);
2159
2167
  }, [hasTemplate, message, openOptionsForMessage]);
@@ -2284,51 +2292,94 @@ export const CometChatMessageList = memo(
2284
2292
  setShowMessageOptions([]);
2285
2293
  };
2286
2294
 
2295
+ const sentAtToMs = (msg?: any): number | undefined => {
2296
+ if (!msg) return undefined;
2297
+ // try CometChat getter first
2298
+ const raw =
2299
+ typeof msg.getSentAt === "function"
2300
+ ? msg.getSentAt()
2301
+ : (msg?.sentAt ?? msg?.sent_at ?? msg?.sentOn ?? msg?.senton);
2302
+ if (raw === undefined || raw === null) return undefined;
2303
+ // if raw looks like seconds (10 digits) convert to ms
2304
+ return raw < 1e12 ? raw * 1000 : raw;
2305
+ };
2306
+
2307
+ const makeDayKey = (ms?: number | undefined) => {
2308
+ if (!ms) return null;
2309
+ const d = new Date(ms);
2310
+ // use local date parts so "Today" follows user's timezone
2311
+ return `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
2312
+ };
2313
+
2314
+ const messageDayKeys = useMemo(() => {
2315
+ return messagesList.map((m) => {
2316
+ const ms = sentAtToMs(m);
2317
+ return makeDayKey(ms); // null if no timestamp
2318
+ });
2319
+ }, [messagesList]);
2320
+
2321
+ const showDateSeparatorAtIndex = useMemo(() => {
2322
+ const n = messagesList.length;
2323
+ const flags = new Array<boolean>(n).fill(false);
2324
+ // helper to find next non-null key to the right
2325
+ const nextNonNullKey = (startIdx: number) => {
2326
+ for (let j = startIdx; j < n; j++) {
2327
+ if (messageDayKeys[j] != null) return messageDayKeys[j];
2328
+ }
2329
+ return null;
2330
+ };
2331
+
2332
+ for (let i = 0; i < n; i++) {
2333
+ const currKey = messageDayKeys[i] ?? nextNonNullKey(i);
2334
+ const nextKey = i + 1 < n ? (messageDayKeys[i + 1] ?? nextNonNullKey(i + 1)) : null;
2335
+ if (currKey != null && currKey !== nextKey) {
2336
+ flags[i] = true;
2337
+ } else if (i === n - 1 && currKey != null) {
2338
+ // last message in list show header
2339
+ flags[i] = true;
2340
+ }
2341
+ }
2342
+ return flags;
2343
+ }, [messageDayKeys, messagesList.length]);
2344
+
2345
+ const isSameLocalDay = (ms?: number) => {
2346
+ if (!ms) return false;
2347
+ const a = new Date(ms);
2348
+ const b = new Date();
2349
+ return (
2350
+ a.getFullYear() === b.getFullYear() &&
2351
+ a.getMonth() === b.getMonth() &&
2352
+ a.getDate() === b.getDate()
2353
+ );
2354
+ };
2355
+
2356
+ const getDayHeaderString = (ms?: number | undefined) => {
2357
+ if (!ms) return undefined;
2358
+ if (isSameLocalDay(ms)) return t("TODAY") || "Today";
2359
+ return dateSeparatorPattern ? dateSeparatorPattern(ms) : undefined;
2360
+ };
2361
+
2287
2362
  const RenderMessageItem = useCallback(
2288
- ({ item, theme }: { item: CometChat.BaseMessage; theme: CometChatTheme }) => {
2289
- const index = useMemo(() => {
2290
- return messagesContentListRef.current.findIndex(
2291
- (msg) => msg.getId() === item.getId() || msg.getMuid() === item.getMuid()
2292
- );
2293
- }, [item]);
2294
-
2295
- const separatorView = useMemo(() => {
2296
- const previousMessageDate = messagesContentListRef.current[index + 1]
2297
- ? new Date(getSentAtTimestamp(messagesContentListRef.current[index + 1]))
2298
- : null;
2299
- const currentMessageDate = new Date(getSentAtTimestamp(item));
2300
- const currentDate = isNaN(currentMessageDate.getDate())
2301
- ? undefined
2302
- : `${currentMessageDate.getDate()}-${currentMessageDate.getMonth()}-${currentMessageDate.getFullYear()}`;
2303
-
2304
- const previousDate = `${previousMessageDate?.getDate()}-${previousMessageDate?.getMonth()}-${previousMessageDate?.getFullYear()}`;
2305
- if (currentDate !== undefined && previousDate !== currentDate) {
2306
- return (
2307
- <View style={{ marginBottom: 10 }}>
2308
- <CometChatDateSeparator
2309
- timeStamp={getSentAtTimestamp(item)}
2310
- pattern={"dayDateFormat"}
2311
- customDateString={
2312
- dateSeparatorPattern ? dateSeparatorPattern(item.getSentAt()) : undefined
2313
- }
2314
- style={theme.messageListStyles.dateSeparatorStyle}
2315
- />
2316
- </View>
2317
- );
2318
- }
2319
- return null;
2320
- }, [item, dateSeparatorPattern, theme]);
2363
+ ({
2364
+ item,
2365
+ theme,
2366
+ idx,
2367
+ }: {
2368
+ item: CometChat.BaseMessage;
2369
+ theme: CometChatTheme;
2370
+ idx: number;
2371
+ }) => {
2372
+ const index = idx;
2321
2373
 
2322
2374
  lastMessageDate.current = getSentAtTimestamp(item);
2323
2375
 
2324
2376
  return (
2325
- <React.Fragment key={index}>
2326
- {separatorView}
2377
+ <React.Fragment key={`${item.getId()}_${item.getMuid()}`}>
2327
2378
  <MessageView message={item} currentIndex={index} />
2328
2379
  </React.Fragment>
2329
2380
  );
2330
2381
  },
2331
- [mergedTheme]
2382
+ [mergedTheme, messagesList, getSentAtTimestamp, dateSeparatorPattern]
2332
2383
  );
2333
2384
 
2334
2385
  const keyExtractor = useCallback((item: any) => `${item?.getId()}_${item.getMuid()}`, []);
@@ -2453,13 +2504,29 @@ export const CometChatMessageList = memo(
2453
2504
  // }, [messagesList]);
2454
2505
 
2455
2506
  const memoizedRenderItem = useCallback(
2456
- ({ item, index, separators }: any) => (
2457
- <View style={{ flex: 1, paddingHorizontal: 16, paddingVertical: 8 }}>
2458
- <RenderMessageItem item={item} theme={mergedTheme} />
2459
- {itemSeparator()}
2460
- </View>
2461
- ),
2462
- [mergedTheme]
2507
+ ({ item, index, separators }: any) => {
2508
+ // index here is FlatList's index in messagesList (newest-first)
2509
+ const showSeparator = showDateSeparatorAtIndex[index];
2510
+ const ms = sentAtToMs(item) ?? Date.now();
2511
+
2512
+ return (
2513
+ <View style={{ flex: 1, paddingHorizontal: 16, paddingVertical: 8 }}>
2514
+ {showSeparator && (
2515
+ <View style={{ alignItems: "center", marginBottom: 8 }}>
2516
+ <CometChatDateSeparator
2517
+ timeStamp={ms}
2518
+ pattern={"dayDateFormat"}
2519
+ customDateString={getDayHeaderString(ms)}
2520
+ style={mergedTheme.messageListStyles.dateSeparatorStyle}
2521
+ />
2522
+ </View>
2523
+ )}
2524
+ <RenderMessageItem item={item} theme={mergedTheme} idx={index} />
2525
+ {itemSeparator()}
2526
+ </View>
2527
+ );
2528
+ },
2529
+ [mergedTheme, showDateSeparatorAtIndex, dateSeparatorPattern, messageDayKeys]
2463
2530
  );
2464
2531
 
2465
2532
  return (
@@ -8,7 +8,7 @@ import {
8
8
  CALL_REJECTED,
9
9
  CALL_UNANSWERED,
10
10
  } from "../shared/constants/UIKitConstants";
11
- import { getCometChatTranslation} from "../shared";
11
+ import { getCometChatTranslation } from "../shared/resources/CometChatLocalizeNew/LocalizationManager";
12
12
  import { IconName } from "../shared/icons/Icon";
13
13
  const t = getCometChatTranslation()
14
14
  export class CallUtils {
@@ -1,7 +1,9 @@
1
1
  import { CometChat } from "@cometchat/chat-sdk-react-native";
2
2
  import React, { JSX } from "react";
3
3
  import { Modal, View } from "react-native";
4
- import { ChatConfigurator, CometChatUIEventHandler, CometChatUIKit } from "../shared";
4
+ import { ChatConfigurator } from "../shared/framework/ChatConfigurator";
5
+ import { CometChatUIEventHandler } from "../shared/events/CometChatUIEventHandler/CometChatUIEventHandler";
6
+ import { CometChatUIKit } from "../shared/CometChatUiKit/CometChatUIKit";
5
7
  import { AdditionalAuxiliaryHeaderOptionsParams, AdditionalParams } from "../shared/base/Types";
6
8
  import {
7
9
  CallContstatnts,
@@ -11,7 +13,7 @@ import {
11
13
  import { DataSource } from "../shared/framework/DataSource";
12
14
  import { DataSourceDecorator } from "../shared/framework/DataSourceDecorator";
13
15
  import { CometChatMessageTemplate } from "../shared/modals";
14
- import { getCometChatTranslation, getCurrentLanguage } from "../shared";
16
+ import { getCometChatTranslation, getCurrentLanguage } from "../shared/resources/CometChatLocalizeNew/LocalizationManager";
15
17
  import { permissionUtil } from "../shared/utils/PermissionUtil";
16
18
  import { CallUIEvents } from "./CallEvents";
17
19
  import { CallingConfiguration } from "./CallingConfiguration";
@@ -1,12 +1,6 @@
1
1
  import { CometChat } from "@cometchat/chat-sdk-react-native";
2
2
  import React, { useEffect, useMemo, useRef, useState } from "react";
3
- import {
4
- Text,
5
- TouchableOpacity,
6
- View,
7
- SafeAreaView,
8
- StyleSheet,
9
- } from "react-native";
3
+ import { Text, TouchableOpacity, View, StyleSheet } from "react-native";
10
4
  import { CometChatAvatar, CometChatSoundManager } from "../../shared";
11
5
  import {
12
6
  CallTypeConstants,
@@ -24,6 +18,7 @@ import { deepMerge } from "../../shared/helper/helperFunctions";
24
18
  import { DeepPartial } from "../../shared/helper/types";
25
19
  import { JSX } from "react";
26
20
  import { useCometChatTranslation } from "../../shared/resources/CometChatLocalizeNew";
21
+ import { SafeAreaView } from "react-native-safe-area-context";
27
22
 
28
23
  const listnerID = "CALL_LISTENER_" + new Date().getTime();
29
24
  const CometChatCalls = CallingPackage.CometChatCalls;
@@ -90,7 +85,7 @@ export const CometChatIncomingCall = (props: CometChatIncomingCallInterface): JS
90
85
  } = props;
91
86
 
92
87
  const theme = useTheme();
93
- const {t}= useCometChatTranslation()
88
+ const { t } = useCometChatTranslation();
94
89
  const [showCallScreen, setShowCallScreen] = useState(false);
95
90
  const acceptedCall = useRef<CometChat.Call>(undefined);
96
91
 
@@ -260,12 +255,7 @@ export const CometChatIncomingCall = (props: CometChatIncomingCallInterface): JS
260
255
  */
261
256
  return (
262
257
  <SafeAreaView style={styles.overlay}>
263
- <View
264
- style={[
265
- incomingCallStyle.containerStyle,
266
- { width: "100%" },
267
- ]}
268
- >
258
+ <View style={[incomingCallStyle.containerStyle, { width: "100%" }]}>
269
259
  {/* Top row: LeadingView, Title/Subtitle, TrailingView */}
270
260
  <View style={styles.topRow}>
271
261
  {LeadingView && LeadingView(call)}
@@ -282,7 +272,11 @@ export const CometChatIncomingCall = (props: CometChatIncomingCallInterface): JS
282
272
  SubtitleView(call)
283
273
  ) : (
284
274
  <View style={styles.rowInline}>
285
- <Icon name="call-fill" size={16} containerStyle={{ marginTop: 4, marginRight: 4 }} />
275
+ <Icon
276
+ name='call-fill'
277
+ size={16}
278
+ containerStyle={{ marginTop: 4, marginRight: 4 }}
279
+ />
286
280
  <Text style={incomingCallStyle.subtitleTextStyle}>
287
281
  {call?.["type"] === CallTypeConstants.audio
288
282
  ? t("INCOMING_AUDIO_CALL")
@@ -305,22 +299,12 @@ export const CometChatIncomingCall = (props: CometChatIncomingCallInterface): JS
305
299
 
306
300
  {/* Buttons row */}
307
301
  <View style={[styles.bottomRow, { marginTop: 16 }]}>
308
- <TouchableOpacity
309
- onPress={endCall}
310
- style={incomingCallStyle.declineCallButtonStyle}
311
- >
312
- <Text style={incomingCallStyle.declineCallTextStyle}>
313
- {t("DECLINE")}
314
- </Text>
302
+ <TouchableOpacity onPress={endCall} style={incomingCallStyle.declineCallButtonStyle}>
303
+ <Text style={incomingCallStyle.declineCallTextStyle}>{t("DECLINE")}</Text>
315
304
  </TouchableOpacity>
316
305
 
317
- <TouchableOpacity
318
- onPress={acceptCall}
319
- style={incomingCallStyle.acceptCallButtonStyle}
320
- >
321
- <Text style={incomingCallStyle.acceptCallTextStyle}>
322
- {t("ACCEPT")}
323
- </Text>
306
+ <TouchableOpacity onPress={acceptCall} style={incomingCallStyle.acceptCallButtonStyle}>
307
+ <Text style={incomingCallStyle.acceptCallTextStyle}>{t("ACCEPT")}</Text>
324
308
  </TouchableOpacity>
325
309
  </View>
326
310
  </View>
@@ -4,6 +4,8 @@ import { ActivityIndicator, View } from "react-native";
4
4
  import { CallingPackage } from "../CallingPackage";
5
5
  import { useTheme } from "../../theme";
6
6
  import { JSX } from "react";
7
+ import { NativeModules } from "react-native";
8
+ const { Proximity } = NativeModules;
7
9
 
8
10
  const CometChatCalls = CallingPackage.CometChatCalls;
9
11
 
@@ -66,6 +68,17 @@ export const CometChatOngoingCall = (props: CometChatOngoingCallInterface): JSX.
66
68
  };
67
69
  }, [sessionID, onError]);
68
70
 
71
+
72
+ useEffect(() => {
73
+ if (callToken) {
74
+ Proximity?.setEnabled(true);
75
+ }
76
+
77
+ return () => {
78
+ Proximity?.setEnabled(false);
79
+ };
80
+ }, [callToken]);
81
+
69
82
  return (
70
83
  <View style={[{ height: "100%", width: "100%", position: "relative" }]}>
71
84
  {(callSettings.current && callToken && (
@@ -1,6 +1,6 @@
1
1
  import { CometChat } from "@cometchat/chat-sdk-react-native";
2
2
  import React, { JSX, useEffect, useMemo, useRef, useState } from "react";
3
- import { Modal, SafeAreaView, Text, TouchableOpacity, View } from "react-native";
3
+ import { Modal, Text, TouchableOpacity, View } from "react-native";
4
4
  import {
5
5
  MessageCategoryConstants,
6
6
  MessageTypeConstants,
@@ -17,6 +17,7 @@ import { deepMerge } from "../../shared/helper/helperFunctions";
17
17
  import { OutgoingCallStyle } from "./styles";
18
18
  import { DeepPartial } from "../../shared/helper/types";
19
19
  import { useCometChatTranslation } from "../../shared/resources/CometChatLocalizeNew";
20
+ import { SafeAreaView } from "react-native-safe-area-context";
20
21
 
21
22
  const listenerId = "callListener_" + new Date().getTime();
22
23
  const CometChatCalls = CallingPackage.CometChatCalls;
@@ -113,7 +114,7 @@ export const CometChatOutgoingCall = (props: CometChatOutgoingCallInterface): JS
113
114
  const isCallEnded = useRef<null | boolean>(undefined);
114
115
 
115
116
  const theme = useTheme();
116
- const {t}= useCometChatTranslation()
117
+ const { t } = useCometChatTranslation();
117
118
 
118
119
  // Merge default and custom styles for the outgoing call.
119
120
  const outgoingCallStyle = useMemo(() => {
@@ -154,7 +155,9 @@ export const CometChatOutgoingCall = (props: CometChatOutgoingCallInterface): JS
154
155
  ) {
155
156
  ongoingCall.current = call;
156
157
  if (call.getType() == MessageTypeConstants.meeting) {
157
- callSessionId.current = ((call as CometChat.CustomMessage).getCustomData() as any)?.sessionId;
158
+ callSessionId.current = (
159
+ (call as CometChat.CustomMessage).getCustomData() as any
160
+ )?.sessionId;
158
161
  }
159
162
  if (call.getCategory() === MessageCategoryConstants.call) {
160
163
  callSessionId.current = call["sessionId"];
@@ -273,7 +276,7 @@ export const CometChatOutgoingCall = (props: CometChatOutgoingCallInterface): JS
273
276
  return (
274
277
  <Modal
275
278
  transparent
276
- animationType="fade"
279
+ animationType='fade'
277
280
  visible={isModalVisible}
278
281
  onRequestClose={handleModalClose}
279
282
  >
@@ -317,7 +320,7 @@ export const CometChatOutgoingCall = (props: CometChatOutgoingCallInterface): JS
317
320
  onPress={handleModalClose}
318
321
  >
319
322
  <Icon
320
- name="call-end-fill"
323
+ name='call-end-fill'
321
324
  size={32}
322
325
  height={outgoingCallStyle.endCallIconStyle.height}
323
326
  width={outgoingCallStyle.endCallIconStyle.width}
@@ -24,7 +24,7 @@ import { CometChatTheme } from "../../theme/type";
24
24
  import { CometChatCollaborativeBubble } from "../CollaborativeBubble/CometChatCollaborativeBubble";
25
25
  import { ExtensionConstants, ExtensionTypeConstants } from "../ExtensionConstants";
26
26
  import { getExtensionData } from "../ExtensionModerator";
27
- import { getCometChatTranslation } from "../../shared";
27
+ import { getCometChatTranslation } from "../../shared/resources/CometChatLocalizeNew/LocalizationManager"
28
28
  const t = getCometChatTranslation();
29
29
 
30
30
  export class CollaborativeDocumentExtensionDecorator extends DataSourceDecorator {
@@ -25,7 +25,7 @@ import { Icon } from "../../shared/icons/Icon";
25
25
  import { getMessagePreviewInternal } from "../../shared/utils/MessageUtils";
26
26
  import { DEFAULT_ICONS } from "../../theme/default/resources/icons";
27
27
  import { CometChatTheme } from "../../theme/type";
28
- import { getCometChatTranslation } from "../../shared";
28
+ import { getCometChatTranslation } from "../../shared/resources/CometChatLocalizeNew/LocalizationManager"
29
29
  const t = getCometChatTranslation();
30
30
 
31
31
  /**
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { StyleSheet, Text, TextStyle, View, ViewStyle } from "react-native";
2
+ import { Text, TextStyle, View, ViewStyle } from "react-native";
3
3
  import {
4
4
  CometChatMentionsFormatter,
5
5
  CometChatTextFormatter,
@@ -25,7 +25,7 @@ import { CometChatTheme } from "../../theme/type";
25
25
  import { Icon } from "../../shared/icons/Icon";
26
26
  import { MentionContext } from "../../shared/framework/MessageDataSource";
27
27
  import { DeepPartial } from "../../shared/helper/types";
28
- import { getCometChatTranslation } from "../../shared";
28
+ import { getCometChatTranslation } from "../../shared/resources/CometChatLocalizeNew/LocalizationManager"
29
29
 
30
30
  const t = getCometChatTranslation();
31
31
 
@@ -7,7 +7,6 @@ import {
7
7
  KeyboardAvoidingView,
8
8
  NativeModules,
9
9
  Platform,
10
- SafeAreaView,
11
10
  Text,
12
11
  TextInput,
13
12
  TouchableOpacity,
@@ -19,6 +18,7 @@ import { commonVars } from "../../shared/base/vars";
19
18
  import { Icon } from "../../shared/icons/Icon";
20
19
  import { useTheme } from "../../theme";
21
20
  import { useCometChatTranslation } from "../../shared/resources/CometChatLocalizeNew";
21
+ import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
22
22
 
23
23
  const { CommonUtil } = NativeModules;
24
24
 
@@ -128,11 +128,13 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
128
128
  const [loader, setLoader] = useState(false);
129
129
  const loggedInUser = useRef<CometChat.User | null>(null);
130
130
  const theme = useTheme();
131
- const {t} =useCometChatTranslation()
131
+ const { t } = useCometChatTranslation();
132
132
  const answerRefs = useRef<(TextInput | null)[]>([]);
133
133
  const [lastRemovedIndex, setLastRemovedIndex] = useState<number | null>(null);
134
134
  const [newlyAddedIndex, setNewlyAddedIndex] = useState<number | null>(null);
135
135
  const flatListRef = useRef<FlatList>(null);
136
+ const insets = useSafeAreaInsets();
137
+ const LIMIT_ERROR = t("REACHED_MAX_LIMIT");
136
138
 
137
139
  /**
138
140
  * Validates the poll question and answer inputs.
@@ -204,12 +206,9 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
204
206
  paddingHorizontal: 15,
205
207
  }}
206
208
  >
207
- <Icon name="info" color={theme.color.error} size={20} />
209
+ <Icon name='info' color={theme.color.error} size={20} />
208
210
  <Text
209
- style={[
210
- theme.typography.caption1.regular,
211
- { color: theme.color.error, marginLeft: 10 },
212
- ]}
211
+ style={[theme.typography.caption1.regular, { color: theme.color.error, marginLeft: 10 }]}
213
212
  >
214
213
  {error}
215
214
  </Text>
@@ -239,7 +238,7 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
239
238
  let existingAnswers = [...answers];
240
239
  existingAnswers[index] = text;
241
240
  setAnswers(existingAnswers);
242
- if (error) {
241
+ if (error && error !== LIMIT_ERROR) {
243
242
  setError("");
244
243
  }
245
244
  if (index >= 2 && text.trim() === "") {
@@ -274,7 +273,7 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
274
273
  setAnswers(existingAnswers);
275
274
  setNewlyAddedIndex(existingAnswers.length - 1);
276
275
  } else {
277
- setError("You can only add up to 12 options.");
276
+ setError(LIMIT_ERROR);
278
277
  }
279
278
  }
280
279
 
@@ -325,7 +324,7 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
325
324
  */
326
325
  function AddAnswer() {
327
326
  if (answers.length >= 12) {
328
- return null;
327
+ return <View style={{ height: 10 }} />;
329
328
  }
330
329
  return (
331
330
  <TouchableOpacity
@@ -398,6 +397,20 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
398
397
  }
399
398
  }, [answers.length]);
400
399
 
400
+ useEffect(() => {
401
+ if (error === LIMIT_ERROR && answers.length < 12) {
402
+ setError("");
403
+ }
404
+ }, [answers, error]);
405
+
406
+ useEffect(() => {
407
+ const isMaxAndAllFilled = answers.length >= 12 && answers.every((a) => a.trim() !== "");
408
+ if (isMaxAndAllFilled) {
409
+ setError(LIMIT_ERROR);
410
+ }
411
+ // do nothing when condition not met — the other effect you already added clears LIMIT_ERROR when answers < 12
412
+ }, [answers]);
413
+
401
414
  useEffect(() => {
402
415
  let answerslist = new Array(defaultAnswers).fill("");
403
416
  setAnswers(answerslist);
@@ -420,7 +433,10 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
420
433
  }, []);
421
434
 
422
435
  return (
423
- <SafeAreaView style={{ flex: 1, backgroundColor: theme.color.background1 }}>
436
+ <SafeAreaView
437
+ style={{ flex: 1, backgroundColor: theme.color.background1 }}
438
+ edges={["top", "left", "right"]}
439
+ >
424
440
  <KeyboardAvoidingView
425
441
  style={{ flex: 1 }}
426
442
  enabled={Platform.OS === "ios"}
@@ -429,12 +445,18 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
429
445
  <TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
430
446
  <View style={{ flex: 1 }}>
431
447
  {/* Header */}
432
- <View style={{ flexDirection: "row", alignItems: "center" }}>
448
+ <View
449
+ style={{
450
+ flexDirection: "row",
451
+ alignItems: "center",
452
+ paddingTop: Platform.OS === "ios" ? insets.top : 0,
453
+ }}
454
+ >
433
455
  <TouchableOpacity
434
456
  onPress={onClose}
435
457
  style={{ flexDirection: "row", paddingVertical: 20, paddingLeft: 10 }}
436
458
  >
437
- <Icon name="arrow-back" />
459
+ <Icon name='arrow-back' />
438
460
  </TouchableOpacity>
439
461
  <Text
440
462
  style={[
@@ -490,16 +512,17 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
490
512
  data={answers}
491
513
  keyExtractor={(item, index) => index.toString()}
492
514
  renderItem={renderAnswerItem}
493
- ListFooterComponent={
494
- <View style={{ paddingBottom: 20 }}>
515
+ // render a footer only when needed, avoiding a permanently present wrapper that causes extra space
516
+ ListFooterComponent={() => (
517
+ <View style={{ paddingBottom: answers.length >= 12 ? 10 : 20 }}>
495
518
  <AddAnswer />
496
519
  </View>
497
- }
520
+ )}
498
521
  removeClippedSubviews={false}
499
- keyboardShouldPersistTaps="always"
500
- keyboardDismissMode="interactive"
522
+ keyboardShouldPersistTaps='always'
523
+ keyboardDismissMode='interactive'
501
524
  contentContainerStyle={{
502
- paddingBottom: 100,
525
+ paddingBottom: 20,
503
526
  paddingTop: 10,
504
527
  paddingHorizontal: 20,
505
528
  }}
@@ -523,15 +546,18 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
523
546
  backgroundColor: "rgba(0,0,0,0.3)",
524
547
  }}
525
548
  >
526
- <ActivityIndicator size="large" color={theme.color.primary} />
549
+ <ActivityIndicator size='large' color={theme.color.primary} />
527
550
  </View>
528
551
  )}
529
552
  {/* Fixed Create Button */}
530
553
  <View
531
554
  style={{
532
555
  paddingHorizontal: 20,
533
- paddingVertical: 10,
534
556
  backgroundColor: theme.color.background1,
557
+ paddingBottom: Platform.select({
558
+ ios: Math.max(insets.bottom, 10),
559
+ android: 10,
560
+ }),
535
561
  }}
536
562
  >
537
563
  {error && <ErrorView />}
@@ -546,7 +572,9 @@ export const CometChatCreatePoll = (props: CometChatCreatePollInterface) => {
546
572
  marginBottom: Platform.select({ ios: 0, android: 10 }),
547
573
  }}
548
574
  >
549
- <Text style={[theme.typography.button.medium, { color: theme.color.primaryButtonText }]}>
575
+ <Text
576
+ style={[theme.typography.button.medium, { color: theme.color.primaryButtonText }]}
577
+ >
550
578
  {t("CREATE")}
551
579
  </Text>
552
580
  </TouchableOpacity>