@cometchat/chat-uikit-react-native 4.0.0-beta.1.1 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1044) hide show
  1. package/LICENSE.md +3 -0
  2. package/README.md +10 -4
  3. package/android/build.gradle +2 -0
  4. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  5. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  6. package/android/gradlew +234 -0
  7. package/android/gradlew.bat +89 -0
  8. package/android/src/main/AndroidManifest.xml +19 -2
  9. package/android/src/main/java/com/reactnativecometchatuikit/CometChatImageViewer.java +1 -0
  10. package/android/src/main/java/com/reactnativecometchatuikit/CometChatVideoPlayer.java +1 -0
  11. package/android/src/main/java/com/reactnativecometchatuikit/CometChatWebView.java +38 -0
  12. package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -0
  13. package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +223 -1
  14. package/android/src/main/java/com/reactnativecometchatuikit/WebViewManager.java +38 -0
  15. package/android/src/main/res/xml/filepaths.xml +6 -0
  16. package/ios/CometchatUiKit.xcodeproj/project.pbxproj +12 -0
  17. package/ios/CometchatUiKit.xcodeproj/project.xcworkspace/xcuserdata/ashishjajoo.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  18. package/ios/FileManager.m +265 -37
  19. package/ios/WebViewManager.h +7 -0
  20. package/ios/WebViewManager.m +33 -0
  21. package/lib/AI/AIConversationStarter/AIConversationStarter.d.ts +12 -0
  22. package/lib/AI/AIConversationStarter/AIConversationStarter.js +31 -0
  23. package/lib/AI/AIConversationStarter/AIConversationStarter.js.map +1 -0
  24. package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +25 -0
  25. package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js +175 -0
  26. package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js.map +1 -0
  27. package/lib/AI/AIConversationStarter/AIConversationStarterStyle.d.ts +4 -0
  28. package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js +8 -0
  29. package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js.map +1 -0
  30. package/lib/AI/AIConversationStarter/configuration.d.ts +14 -0
  31. package/lib/AI/AIConversationStarter/configuration.js +16 -0
  32. package/lib/AI/AIConversationStarter/configuration.js.map +1 -0
  33. package/lib/AI/AIConversationStarter/style.d.ts +31 -0
  34. package/lib/AI/AIConversationStarter/style.js +62 -0
  35. package/lib/AI/AIConversationStarter/style.js.map +1 -0
  36. package/lib/AI/AIEnabler.d.ts +10 -0
  37. package/lib/AI/AIEnabler.js +102 -0
  38. package/lib/AI/AIEnabler.js.map +1 -0
  39. package/lib/AI/AIEnablerDecorator.d.ts +43 -0
  40. package/lib/AI/AIEnablerDecorator.js +251 -0
  41. package/lib/AI/AIEnablerDecorator.js.map +1 -0
  42. package/lib/AI/AIExtensionDataSource.d.ts +6 -0
  43. package/lib/AI/AIExtensionDataSource.js +10 -0
  44. package/lib/AI/AIExtensionDataSource.js.map +1 -0
  45. package/lib/AI/AISmartReplies/AISmartReplies.d.ts +10 -0
  46. package/lib/AI/AISmartReplies/AISmartReplies.js +23 -0
  47. package/lib/AI/AISmartReplies/AISmartReplies.js.map +1 -0
  48. package/lib/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +7 -0
  49. package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js +12 -0
  50. package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js.map +1 -0
  51. package/lib/AI/AISmartReplies/AISmartRepliesStyle.d.ts +12 -0
  52. package/lib/AI/AISmartReplies/AISmartRepliesStyle.js +15 -0
  53. package/lib/AI/AISmartReplies/AISmartRepliesStyle.js.map +1 -0
  54. package/lib/AI/AISmartReplies/configuration.d.ts +14 -0
  55. package/lib/AI/AISmartReplies/configuration.js +16 -0
  56. package/lib/AI/AISmartReplies/configuration.js.map +1 -0
  57. package/lib/AI/CardView.d.ts +19 -0
  58. package/lib/AI/CardView.js +45 -0
  59. package/lib/AI/CardView.js.map +1 -0
  60. package/lib/AI/CardViewStyle.d.ts +29 -0
  61. package/lib/AI/CardViewStyle.js +36 -0
  62. package/lib/AI/CardViewStyle.js.map +1 -0
  63. package/lib/AI/configuration.d.ts +14 -0
  64. package/lib/AI/configuration.js +16 -0
  65. package/lib/AI/configuration.js.map +1 -0
  66. package/lib/AI/resources/index.d.ts +5 -0
  67. package/lib/AI/resources/index.js +6 -0
  68. package/lib/AI/resources/index.js.map +1 -0
  69. package/lib/AI/style.d.ts +115 -0
  70. package/lib/AI/style.js +139 -0
  71. package/lib/AI/style.js.map +1 -0
  72. package/lib/AI/utils.d.ts +38 -0
  73. package/lib/AI/utils.js +28 -0
  74. package/lib/AI/utils.js.map +1 -0
  75. package/lib/CometChatAddMembers/AddMembersConfiguration.d.ts +1 -1
  76. package/lib/CometChatAddMembers/CometChatAddMembers.d.ts +1 -1
  77. package/lib/CometChatAddMembers/CometChatAddMembers.js +1 -1
  78. package/lib/CometChatBannedMembers/BannedMembersConfiguration.d.ts +1 -1
  79. package/lib/CometChatBannedMembers/CometChatBannedMembers.d.ts +1 -1
  80. package/lib/CometChatBannedMembers/CometChatBannedMembers.js +1 -1
  81. package/lib/CometChatContacts/CometChatContacts.d.ts +75 -0
  82. package/lib/CometChatContacts/CometChatContacts.js +84 -0
  83. package/lib/CometChatContacts/CometChatContacts.js.map +1 -0
  84. package/lib/CometChatContacts/ContactsConfiguration.d.ts +73 -0
  85. package/lib/CometChatContacts/ContactsConfiguration.js +2 -0
  86. package/lib/CometChatContacts/ContactsConfiguration.js.map +1 -0
  87. package/lib/CometChatContacts/ContactsStyle.d.ts +59 -0
  88. package/lib/CometChatContacts/ContactsStyle.js +2 -0
  89. package/lib/CometChatContacts/ContactsStyle.js.map +1 -0
  90. package/lib/CometChatContacts/Header.d.ts +31 -0
  91. package/lib/CometChatContacts/Header.js +72 -0
  92. package/lib/CometChatContacts/Header.js.map +1 -0
  93. package/lib/CometChatContacts/index.d.ts +4 -0
  94. package/lib/CometChatContacts/index.js +3 -0
  95. package/lib/CometChatContacts/index.js.map +1 -0
  96. package/lib/CometChatContacts/styles.d.ts +101 -0
  97. package/lib/CometChatContacts/styles.js +104 -0
  98. package/lib/CometChatContacts/styles.js.map +1 -0
  99. package/lib/CometChatConversations/CometChatConversations.d.ts +5 -1
  100. package/lib/CometChatConversations/CometChatConversations.js +22 -7
  101. package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
  102. package/lib/CometChatConversations/ConversationsConfiguration.d.ts +1 -2
  103. package/lib/CometChatConversations/style.d.ts +4 -4
  104. package/lib/CometChatConversationsWithMessages/CometChatConversationsWithMessages.d.ts +3 -1
  105. package/lib/CometChatConversationsWithMessages/CometChatConversationsWithMessages.js +84 -5
  106. package/lib/CometChatConversationsWithMessages/CometChatConversationsWithMessages.js.map +1 -1
  107. package/lib/CometChatConversationsWithMessages/resources/index.d.ts +2 -0
  108. package/lib/CometChatConversationsWithMessages/resources/index.js +3 -0
  109. package/lib/CometChatConversationsWithMessages/resources/index.js.map +1 -0
  110. package/lib/CometChatConversationsWithMessages/styles.d.ts +4 -4
  111. package/lib/CometChatCreateGroup/CometChatCreateGroup.d.ts +1 -1
  112. package/lib/CometChatCreateGroup/CometChatCreateGroup.js +1 -1
  113. package/lib/CometChatCreateGroup/CreateGroupConfiguration.d.ts +1 -1
  114. package/lib/CometChatDetails/CometChatDetails.d.ts +1 -1
  115. package/lib/CometChatDetails/CometChatDetails.js +2 -1
  116. package/lib/CometChatDetails/CometChatDetails.js.map +1 -1
  117. package/lib/CometChatDetails/DetailsConfiguration.d.ts +1 -2
  118. package/lib/CometChatDetails/listners.js +1 -1
  119. package/lib/CometChatGroupMembers/CometChatGroupMembers.d.ts +1 -1
  120. package/lib/CometChatGroupMembers/CometChatGroupMembers.js +13 -1
  121. package/lib/CometChatGroupMembers/CometChatGroupMembers.js.map +1 -1
  122. package/lib/CometChatGroupMembers/GroupMemberConfiguration.d.ts +1 -2
  123. package/lib/CometChatGroupMembers/style.d.ts +5 -5
  124. package/lib/CometChatGroups/CometChatGroups.d.ts +5 -1
  125. package/lib/CometChatGroups/CometChatGroups.js +18 -5
  126. package/lib/CometChatGroups/CometChatGroups.js.map +1 -1
  127. package/lib/CometChatGroups/GroupsConfiguration.d.ts +1 -2
  128. package/lib/CometChatGroups/style.d.ts +1 -1
  129. package/lib/CometChatGroupsWithMessages/CometChatGroupsWithMessages.d.ts +1 -1
  130. package/lib/CometChatGroupsWithMessages/CometChatGroupsWithMessages.js +71 -8
  131. package/lib/CometChatGroupsWithMessages/CometChatGroupsWithMessages.js.map +1 -1
  132. package/lib/CometChatGroupsWithMessages/styles.d.ts +4 -4
  133. package/lib/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.d.ts +1 -1
  134. package/lib/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.js +1 -1
  135. package/lib/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.d.ts +1 -1
  136. package/lib/CometChatMessageComposer/CometChatMessageComposer.d.ts +65 -1
  137. package/lib/CometChatMessageComposer/CometChatMessageComposer.js +46 -6
  138. package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
  139. package/lib/CometChatMessageComposer/MessageComposerConfiguration.d.ts +11 -1
  140. package/lib/CometChatMessageComposer/MessageComposerConfiguration.js +9 -0
  141. package/lib/CometChatMessageComposer/MessageComposerConfiguration.js.map +1 -1
  142. package/lib/CometChatMessageComposer/resources/index.d.ts +1 -0
  143. package/lib/CometChatMessageComposer/resources/index.js +3 -1
  144. package/lib/CometChatMessageComposer/resources/index.js.map +1 -1
  145. package/lib/CometChatMessageComposer/styles.d.ts +1 -0
  146. package/lib/CometChatMessageComposer/styles.js +2 -1
  147. package/lib/CometChatMessageComposer/styles.js.map +1 -1
  148. package/lib/CometChatMessageHeader/CometChatMessageHeader.d.ts +1 -1
  149. package/lib/CometChatMessageHeader/CometChatMessageHeader.js +7 -1
  150. package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
  151. package/lib/CometChatMessageHeader/MessageHeaderConfiguration.d.ts +1 -2
  152. package/lib/CometChatMessageHeader/listners.js +1 -1
  153. package/lib/CometChatMessageHeader/styles.d.ts +1 -1
  154. package/lib/CometChatMessageInformation/CometChatMessageInformation.d.ts +36 -0
  155. package/lib/CometChatMessageInformation/CometChatMessageInformation.js +173 -0
  156. package/lib/CometChatMessageInformation/CometChatMessageInformation.js.map +1 -0
  157. package/lib/CometChatMessageInformation/MessageInformationConfiguration.d.ts +3 -0
  158. package/lib/CometChatMessageInformation/MessageInformationConfiguration.js +2 -0
  159. package/lib/CometChatMessageInformation/MessageInformationConfiguration.js.map +1 -0
  160. package/lib/CometChatMessageInformation/MessageInformationStyle.d.ts +11 -0
  161. package/lib/CometChatMessageInformation/MessageInformationStyle.js +2 -0
  162. package/lib/CometChatMessageInformation/MessageInformationStyle.js.map +1 -0
  163. package/lib/CometChatMessageInformation/index.d.ts +4 -0
  164. package/lib/CometChatMessageInformation/index.js +3 -0
  165. package/lib/CometChatMessageInformation/index.js.map +1 -0
  166. package/lib/CometChatMessageInformation/resources/index.d.ts +2 -0
  167. package/lib/CometChatMessageInformation/resources/index.js +3 -0
  168. package/lib/CometChatMessageInformation/resources/index.js.map +1 -0
  169. package/lib/CometChatMessageInformation/styles.d.ts +23 -0
  170. package/lib/CometChatMessageInformation/styles.js +26 -0
  171. package/lib/CometChatMessageInformation/styles.js.map +1 -0
  172. package/lib/CometChatMessageList/CometChatMessageList.d.ts +3 -1
  173. package/lib/CometChatMessageList/CometChatMessageList.js +303 -29
  174. package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
  175. package/lib/CometChatMessageList/MessageListConfiguration.d.ts +1 -2
  176. package/lib/CometChatMessageList/style.d.ts +3 -3
  177. package/lib/CometChatMessages/CometChatMessages.d.ts +1 -1
  178. package/lib/CometChatMessages/CometChatMessages.js +34 -1
  179. package/lib/CometChatMessages/CometChatMessages.js.map +1 -1
  180. package/lib/CometChatMessages/MessagesConfiguration.d.ts +1 -2
  181. package/lib/CometChatMessages/style.d.ts +2 -2
  182. package/lib/CometChatTabs/CometChatTabs.d.ts +1 -0
  183. package/lib/CometChatTabs/CometChatTabs.js +61 -22
  184. package/lib/CometChatTabs/CometChatTabs.js.map +1 -1
  185. package/lib/CometChatTabs/CometChatTabsStyle.d.ts +12 -2
  186. package/lib/CometChatTabs/CometChatTabsStyle.js +11 -1
  187. package/lib/CometChatTabs/CometChatTabsStyle.js.map +1 -1
  188. package/lib/CometChatTabs/TabItemStyle.d.ts +4 -2
  189. package/lib/CometChatTabs/TabItemStyle.js +3 -1
  190. package/lib/CometChatTabs/TabItemStyle.js.map +1 -1
  191. package/lib/CometChatTabs/TabItems.d.ts +0 -1
  192. package/lib/CometChatThreadedMessages/CometChatThreadedMessages.d.ts +1 -1
  193. package/lib/CometChatThreadedMessages/CometChatThreadedMessages.js +5 -3
  194. package/lib/CometChatThreadedMessages/CometChatThreadedMessages.js.map +1 -1
  195. package/lib/CometChatThreadedMessages/ThreadedMessagesConfiguration.d.ts +1 -2
  196. package/lib/CometChatThreadedMessages/style.d.ts +3 -2
  197. package/lib/CometChatThreadedMessages/style.js +4 -2
  198. package/lib/CometChatThreadedMessages/style.js.map +1 -1
  199. package/lib/CometChatTransferOwnership/CometChatTransferOwnership.d.ts +1 -1
  200. package/lib/CometChatTransferOwnership/CometChatTransferOwnership.js +1 -1
  201. package/lib/CometChatTransferOwnership/TransferOwnershipConfiguration.d.ts +1 -1
  202. package/lib/CometChatUsers/CometChatUsers.d.ts +1 -1
  203. package/lib/CometChatUsers/CometChatUsers.js +1 -1
  204. package/lib/CometChatUsers/UsersConfiguration.d.ts +1 -1
  205. package/lib/CometChatUsersWithMessages/CometChatUsersWithMessages.d.ts +1 -1
  206. package/lib/CometChatUsersWithMessages/CometChatUsersWithMessages.js +29 -3
  207. package/lib/CometChatUsersWithMessages/CometChatUsersWithMessages.js.map +1 -1
  208. package/lib/CometChatUsersWithMessages/styles.d.ts +4 -4
  209. package/lib/calls/CallUtils.d.ts +1 -1
  210. package/lib/calls/CallUtils.js +1 -1
  211. package/lib/calls/CallingDetailsUtils.d.ts +1 -1
  212. package/lib/calls/CallingExtension.d.ts +3 -1
  213. package/lib/calls/CallingExtension.js +8 -2
  214. package/lib/calls/CallingExtension.js.map +1 -1
  215. package/lib/calls/CallingExtentionDecorator.d.ts +1 -1
  216. package/lib/calls/CallingExtentionDecorator.js +5 -2
  217. package/lib/calls/CallingExtentionDecorator.js.map +1 -1
  218. package/lib/calls/CometChatCallButtons/CometChatCallButtonConfiguration.d.ts +1 -1
  219. package/lib/calls/CometChatCallButtons/CometChatCallButtons.d.ts +1 -1
  220. package/lib/calls/CometChatCallButtons/CometChatCallButtons.js +1 -1
  221. package/lib/calls/CometChatCallDetails/CallDetailsConfiguration.d.ts +1 -2
  222. package/lib/calls/CometChatCallDetails/CometChatCallDetails.js +1 -1
  223. package/lib/calls/CometChatCallHistory/CallHistoryConfiguration.d.ts +1 -2
  224. package/lib/calls/CometChatCallHistory/CometChatCallHistory.js +1 -1
  225. package/lib/calls/CometChatCallHistoryWithDetails/style.d.ts +2 -2
  226. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -1
  227. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +4 -4
  228. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
  229. package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.d.ts +1 -1
  230. package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.js +1 -1
  231. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -1
  232. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +23 -15
  233. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
  234. package/lib/extensions/CollaborativeBubble/CollaborativeBubbleStyle.js +1 -1
  235. package/lib/extensions/CollaborativeBubble/CollaborativeBubbleStyle.js.map +1 -1
  236. package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.d.ts +1 -1
  237. package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.js +5 -4
  238. package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.js.map +1 -1
  239. package/lib/extensions/CollaborativeBubble/styles.js +1 -1
  240. package/lib/extensions/CollaborativeBubble/styles.js.map +1 -1
  241. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtension.d.ts +3 -2
  242. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtension.js +8 -3
  243. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtension.js.map +1 -1
  244. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +1 -1
  245. package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.js +1 -1
  246. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.d.ts +3 -2
  247. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.js +10 -3
  248. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.js.map +1 -1
  249. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +1 -1
  250. package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.js +1 -1
  251. package/lib/extensions/ImageModeration/ImageModerationDecorator.d.ts +1 -2
  252. package/lib/extensions/ImageModeration/ImageModerationDecorator.js +1 -1
  253. package/lib/extensions/ImageModeration/ImageModerationExtension.d.ts +3 -2
  254. package/lib/extensions/ImageModeration/ImageModerationExtension.js +10 -3
  255. package/lib/extensions/ImageModeration/ImageModerationExtension.js.map +1 -1
  256. package/lib/extensions/ImageModeration/ImageModerationFilter.d.ts +1 -1
  257. package/lib/extensions/ImageModeration/ImageModerationFilter.js +4 -4
  258. package/lib/extensions/ImageModeration/ImageModerationFilter.js.map +1 -1
  259. package/lib/extensions/LinkPreview/LinkPreviewExtention.d.ts +3 -2
  260. package/lib/extensions/LinkPreview/LinkPreviewExtention.js +10 -3
  261. package/lib/extensions/LinkPreview/LinkPreviewExtention.js.map +1 -1
  262. package/lib/extensions/LinkPreview/LinkPreviewExtentionDecorator.d.ts +1 -2
  263. package/lib/extensions/MessageTranslation/MessageTranslationDecorator.d.ts +1 -2
  264. package/lib/extensions/MessageTranslation/MessageTranslationDecorator.js +1 -1
  265. package/lib/extensions/MessageTranslation/MessageTranslationExtension.d.ts +3 -2
  266. package/lib/extensions/MessageTranslation/MessageTranslationExtension.js +10 -3
  267. package/lib/extensions/MessageTranslation/MessageTranslationExtension.js.map +1 -1
  268. package/lib/extensions/Polls/Polls.d.ts +1 -1
  269. package/lib/extensions/Polls/Polls.js +1 -1
  270. package/lib/extensions/Polls/PollsBubble.d.ts +1 -1
  271. package/lib/extensions/Polls/PollsDecorator.d.ts +1 -1
  272. package/lib/extensions/Polls/PollsDecorator.js +1 -1
  273. package/lib/extensions/Polls/PollsExtension.d.ts +3 -2
  274. package/lib/extensions/Polls/PollsExtension.js +10 -3
  275. package/lib/extensions/Polls/PollsExtension.js.map +1 -1
  276. package/lib/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.d.ts +1 -1
  277. package/lib/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.js +0 -2
  278. package/lib/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.js.map +1 -1
  279. package/lib/extensions/Reactions/ReactionsDecorator.d.ts +1 -1
  280. package/lib/extensions/Reactions/ReactionsDecorator.js +1 -1
  281. package/lib/extensions/Reactions/ReactionsExtension.d.ts +3 -2
  282. package/lib/extensions/Reactions/ReactionsExtension.js +10 -3
  283. package/lib/extensions/Reactions/ReactionsExtension.js.map +1 -1
  284. package/lib/extensions/SmartReplies/SmartRepliesDecorator.d.ts +1 -1
  285. package/lib/extensions/SmartReplies/SmartRepliesDecorator.js +2 -2
  286. package/lib/extensions/SmartReplies/SmartRepliesDecorator.js.map +1 -1
  287. package/lib/extensions/SmartReplies/SmartRepliesExtension.d.ts +3 -2
  288. package/lib/extensions/SmartReplies/SmartRepliesExtension.js +10 -3
  289. package/lib/extensions/SmartReplies/SmartRepliesExtension.js.map +1 -1
  290. package/lib/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.d.ts +1 -1
  291. package/lib/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.d.ts +1 -1
  292. package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.js +1 -1
  293. package/lib/extensions/Stickers/CometChatStickerKeyboard/style.d.ts +6 -6
  294. package/lib/extensions/Stickers/StickersExtension.d.ts +3 -2
  295. package/lib/extensions/Stickers/StickersExtension.js +10 -4
  296. package/lib/extensions/Stickers/StickersExtension.js.map +1 -1
  297. package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +2 -2
  298. package/lib/extensions/Stickers/StickersExtensionDecorator.js +5 -3
  299. package/lib/extensions/Stickers/StickersExtensionDecorator.js.map +1 -1
  300. package/lib/extensions/TextModeration/TextModerationExtension.d.ts +3 -1
  301. package/lib/extensions/TextModeration/TextModerationExtension.js +19 -2
  302. package/lib/extensions/TextModeration/TextModerationExtension.js.map +1 -1
  303. package/lib/extensions/TextModeration/TextModerationExtensionDecorator.d.ts +1 -2
  304. package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.d.ts +1 -1
  305. package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.d.ts +3 -2
  306. package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.js +10 -3
  307. package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.js.map +1 -1
  308. package/lib/index.d.ts +17 -2
  309. package/lib/index.js +20 -4
  310. package/lib/index.js.map +1 -1
  311. package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +10 -1
  312. package/lib/shared/CometChatUiKit/CometChatUIKit.js +63 -16
  313. package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
  314. package/lib/shared/CometChatUiKit/CometChatUIKitHelper.d.ts +1 -1
  315. package/lib/shared/CometChatUiKit/UIKitSettings.d.ts +6 -2
  316. package/lib/shared/CometChatUiKit/UIKitSettings.js +5 -11
  317. package/lib/shared/CometChatUiKit/UIKitSettings.js.map +1 -1
  318. package/lib/shared/assets/images/index.d.ts +9 -0
  319. package/lib/shared/assets/images/index.js +17 -0
  320. package/lib/shared/assets/images/index.js.map +1 -0
  321. package/lib/shared/constants/UIKitConstants.d.ts +0 -1
  322. package/lib/shared/constants/UIKitConstants.js +3 -3
  323. package/lib/shared/constants/UIKitConstants.js.map +1 -1
  324. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +8 -0
  325. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
  326. package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +6 -2
  327. package/lib/shared/events/CometChatUIEventHandler/Listener.js +12 -2
  328. package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
  329. package/lib/shared/events/CometChatUIEvents.d.ts +3 -1
  330. package/lib/shared/events/CometChatUIEvents.js +2 -0
  331. package/lib/shared/events/CometChatUIEvents.js.map +1 -1
  332. package/lib/shared/framework/DataSource.d.ts +2 -3
  333. package/lib/shared/framework/DataSourceDecorator.d.ts +2 -3
  334. package/lib/shared/framework/DataSourceDecorator.js +2 -2
  335. package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
  336. package/lib/shared/framework/ExtensionsDataSource.d.ts +5 -2
  337. package/lib/shared/framework/ExtensionsDataSource.js +13 -1
  338. package/lib/shared/framework/ExtensionsDataSource.js.map +1 -1
  339. package/lib/shared/framework/MessageDataSource.d.ts +3 -3
  340. package/lib/shared/framework/MessageDataSource.js +41 -19
  341. package/lib/shared/framework/MessageDataSource.js.map +1 -1
  342. package/lib/shared/framework/index.js +2 -1
  343. package/lib/shared/framework/index.js.map +1 -1
  344. package/lib/shared/framework/resources/index.d.ts +5 -1
  345. package/lib/shared/framework/resources/index.js +13 -3
  346. package/lib/shared/framework/resources/index.js.map +1 -1
  347. package/lib/shared/helper/Toast.d.ts +4 -0
  348. package/lib/shared/helper/Toast.js +23 -0
  349. package/lib/shared/helper/Toast.js.map +1 -0
  350. package/lib/shared/helper/types/index.d.ts +3 -5
  351. package/lib/shared/index.d.ts +2 -2
  352. package/lib/shared/index.js +4 -4
  353. package/lib/shared/index.js.map +1 -1
  354. package/lib/shared/modals/CometChatDetailsOption.d.ts +0 -1
  355. package/lib/shared/modals/CometChatMessageOption.d.ts +1 -2
  356. package/lib/shared/modals/CometChatMessageTemplate.d.ts +1 -2
  357. package/lib/shared/modals/CometChatMessageTemplate.js +1 -1
  358. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +308 -153
  359. package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +11 -1
  360. package/lib/shared/resources/CometChatLocalize/resources/de/translation.json +11 -1
  361. package/lib/shared/resources/CometChatLocalize/resources/en/translation.json +13 -3
  362. package/lib/shared/resources/CometChatLocalize/resources/es/translation.json +11 -1
  363. package/lib/shared/resources/CometChatLocalize/resources/fr/translation.json +11 -1
  364. package/lib/shared/resources/CometChatLocalize/resources/hi/translation.json +11 -1
  365. package/lib/shared/resources/CometChatLocalize/resources/lt/translation.json +11 -1
  366. package/lib/shared/resources/CometChatLocalize/resources/ms/translation.json +11 -1
  367. package/lib/shared/resources/CometChatLocalize/resources/pt/translation.json +11 -1
  368. package/lib/shared/resources/CometChatLocalize/resources/ru/translation.json +11 -1
  369. package/lib/shared/resources/CometChatLocalize/resources/sv/translation.json +11 -1
  370. package/lib/shared/resources/CometChatLocalize/resources/zh/translation.json +11 -1
  371. package/lib/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +11 -1
  372. package/lib/shared/utils/CometChatMessageHelper/index.js +1 -1
  373. package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +2 -1
  374. package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js.map +1 -1
  375. package/lib/shared/utils/CometChatMessagePreview/style.d.ts +1 -0
  376. package/lib/shared/utils/CometChatMessagePreview/style.js +19 -5
  377. package/lib/shared/utils/CometChatMessagePreview/style.js.map +1 -1
  378. package/lib/shared/utils/DetailsUtils/DetailsUtils.d.ts +1 -1
  379. package/lib/shared/utils/MessageUtils.d.ts +15 -0
  380. package/lib/shared/utils/MessageUtils.js +31 -0
  381. package/lib/shared/utils/MessageUtils.js.map +1 -0
  382. package/lib/shared/utils/conversationUtils.d.ts +1 -1
  383. package/lib/shared/utils/conversationUtils.js +1 -1
  384. package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js +3 -3
  385. package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js.map +1 -1
  386. package/lib/shared/views/CometChatAvatar/styles.d.ts +2 -2
  387. package/lib/shared/views/CometChatBottomSheet/CometChatBottomSheet.js +1 -1
  388. package/lib/shared/views/CometChatBottomSheet/style.d.ts +1 -1
  389. package/lib/shared/views/CometChatCard/style.d.ts +2 -2
  390. package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js +38 -21
  391. package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
  392. package/lib/shared/views/CometChatEmojiKeyboard/style.d.ts +1 -1
  393. package/lib/shared/views/CometChatFileBubble/CometChatFileBubble.js +12 -9
  394. package/lib/shared/views/CometChatFileBubble/CometChatFileBubble.js.map +1 -1
  395. package/lib/shared/views/CometChatFileBubble/resources/index.d.ts +2 -1
  396. package/lib/shared/views/CometChatFileBubble/resources/index.js +2 -1
  397. package/lib/shared/views/CometChatFileBubble/resources/index.js.map +1 -1
  398. package/lib/shared/views/CometChatImageBubble/CometChatImageBubble.js +28 -10
  399. package/lib/shared/views/CometChatImageBubble/CometChatImageBubble.js.map +1 -1
  400. package/lib/shared/views/CometChatList/CometChatList.d.ts +2 -0
  401. package/lib/shared/views/CometChatList/CometChatList.js +51 -4
  402. package/lib/shared/views/CometChatList/CometChatList.js.map +1 -1
  403. package/lib/shared/views/CometChatList/Header.d.ts +1 -1
  404. package/lib/shared/views/CometChatList/Header.js +2 -2
  405. package/lib/shared/views/CometChatList/Header.js.map +1 -1
  406. package/lib/shared/views/CometChatList/styles.d.ts +8 -8
  407. package/lib/shared/views/CometChatListItem/style.d.ts +5 -5
  408. package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.d.ts +25 -0
  409. package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js +151 -0
  410. package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js.map +1 -0
  411. package/lib/shared/views/CometChatMediaRecorder/MediaRecorderStyle.d.ts +26 -0
  412. package/lib/shared/views/CometChatMediaRecorder/MediaRecorderStyle.js +33 -0
  413. package/lib/shared/views/CometChatMediaRecorder/MediaRecorderStyle.js.map +1 -0
  414. package/lib/shared/views/CometChatMediaRecorder/index.d.ts +3 -0
  415. package/lib/shared/views/CometChatMediaRecorder/index.js +4 -0
  416. package/lib/shared/views/CometChatMediaRecorder/index.js.map +1 -0
  417. package/lib/shared/views/CometChatMediaRecorder/style.d.ts +27 -0
  418. package/lib/shared/views/CometChatMediaRecorder/style.js +28 -0
  419. package/lib/shared/views/CometChatMediaRecorder/style.js.map +1 -0
  420. package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js +2 -2
  421. package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js.map +1 -1
  422. package/lib/shared/views/CometChatMessageInput/styles.d.ts +1 -0
  423. package/lib/shared/views/CometChatMessageInput/styles.js +1 -0
  424. package/lib/shared/views/CometChatMessageInput/styles.js.map +1 -1
  425. package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js +23 -4
  426. package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js.map +1 -1
  427. package/lib/shared/views/SwipeRow/style.d.ts +3 -3
  428. package/lib/shared/views/index.d.ts +2 -1
  429. package/lib/shared/views/index.js +2 -1
  430. package/lib/shared/views/index.js.map +1 -1
  431. package/package.json +8 -7
  432. package/src/AI/AIConversationStarter/AIConversationStarter.ts +33 -0
  433. package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +232 -0
  434. package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +8 -0
  435. package/src/AI/AIConversationStarter/configuration.ts +18 -0
  436. package/src/AI/AIConversationStarter/style.ts +76 -0
  437. package/src/AI/AIEnabler.ts +115 -0
  438. package/src/AI/AIEnablerDecorator.tsx +324 -0
  439. package/src/AI/AIExtensionDataSource.ts +12 -0
  440. package/src/AI/AISmartReplies/AISmartReplies.ts +28 -0
  441. package/src/AI/AISmartReplies/AISmartRepliesDecorator.ts +18 -0
  442. package/src/AI/AISmartReplies/AISmartRepliesStyle.ts +16 -0
  443. package/src/AI/AISmartReplies/configuration.ts +17 -0
  444. package/src/AI/CardView.tsx +81 -0
  445. package/src/AI/CardViewStyle.ts +37 -0
  446. package/src/AI/configuration.ts +17 -0
  447. package/src/AI/resources/ai-empty.png +0 -0
  448. package/src/AI/resources/ai-error.png +0 -0
  449. package/src/AI/resources/ai.png +0 -0
  450. package/src/AI/resources/index.ts +11 -0
  451. package/src/AI/style.ts +177 -0
  452. package/src/AI/utils.ts +39 -0
  453. package/src/CometChatAddMembers/AddMembersConfiguration.tsx +57 -0
  454. package/src/CometChatAddMembers/CometChatAddMembers.tsx +100 -0
  455. package/src/CometChatAddMembers/index.ts +8 -0
  456. package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +60 -0
  457. package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +142 -0
  458. package/src/CometChatBannedMembers/index.ts +8 -0
  459. package/src/CometChatBannedMembers/resources/index.ts +3 -0
  460. package/src/CometChatContacts/CometChatContacts.tsx +226 -0
  461. package/src/CometChatContacts/ContactsConfiguration.tsx +68 -0
  462. package/src/CometChatContacts/ContactsStyle.ts +60 -0
  463. package/src/CometChatContacts/Header.tsx +167 -0
  464. package/src/CometChatContacts/index.ts +11 -0
  465. package/src/CometChatContacts/styles.ts +105 -0
  466. package/src/CometChatConversations/CometChatConversations.tsx +1034 -0
  467. package/src/CometChatConversations/ConversationsConfiguration.ts +181 -0
  468. package/src/CometChatConversations/ConversationsStyle.ts +88 -0
  469. package/src/CometChatConversations/index.ts +12 -0
  470. package/src/CometChatConversations/resources/index.ts +29 -0
  471. package/src/CometChatConversations/style.ts +63 -0
  472. package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +230 -0
  473. package/src/CometChatConversationsWithMessages/index.ts +5 -0
  474. package/src/CometChatConversationsWithMessages/resources/index.ts +5 -0
  475. package/src/CometChatConversationsWithMessages/resources/start.png +0 -0
  476. package/src/CometChatConversationsWithMessages/styles.ts +15 -0
  477. package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +387 -0
  478. package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +35 -0
  479. package/src/CometChatCreateGroup/Header.tsx +60 -0
  480. package/src/CometChatCreateGroup/index.ts +16 -0
  481. package/src/CometChatCreateGroup/resources/index.ts +8 -0
  482. package/src/CometChatCreateGroup/style.ts +44 -0
  483. package/src/CometChatDetails/CometChatDetails.tsx +980 -0
  484. package/src/CometChatDetails/DetailsConfiguration.tsx +71 -0
  485. package/src/CometChatDetails/Header.tsx +42 -0
  486. package/src/CometChatDetails/index.ts +17 -0
  487. package/src/CometChatDetails/listners.ts +88 -0
  488. package/src/CometChatDetails/resources/index.ts +12 -0
  489. package/src/CometChatDetails/styles.ts +23 -0
  490. package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +639 -0
  491. package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +94 -0
  492. package/src/CometChatGroupMembers/GroupMemberStyle.ts +91 -0
  493. package/src/CometChatGroupMembers/GroupScopeStyle.ts +68 -0
  494. package/src/CometChatGroupMembers/index.ts +16 -0
  495. package/src/CometChatGroupMembers/resources/index.ts +11 -0
  496. package/src/CometChatGroupMembers/style.ts +31 -0
  497. package/src/CometChatGroups/CometChatGroups.tsx +611 -0
  498. package/src/CometChatGroups/GroupsConfiguration.ts +121 -0
  499. package/src/CometChatGroups/GroupsStyle.ts +112 -0
  500. package/src/CometChatGroups/index.ts +12 -0
  501. package/src/CometChatGroups/resources/index.ts +21 -0
  502. package/src/CometChatGroups/resources/spineer.png +0 -0
  503. package/src/CometChatGroups/style.ts +19 -0
  504. package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +231 -0
  505. package/src/CometChatGroupsWithMessages/index.ts +5 -0
  506. package/src/CometChatGroupsWithMessages/resources/index.ts +4 -0
  507. package/src/CometChatGroupsWithMessages/styles.ts +15 -0
  508. package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +270 -0
  509. package/src/CometChatJoinProtectedGroup/Header.tsx +52 -0
  510. package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +29 -0
  511. package/src/CometChatJoinProtectedGroup/index.ts +16 -0
  512. package/src/CometChatJoinProtectedGroup/resources/index.ts +6 -0
  513. package/src/CometChatJoinProtectedGroup/style.ts +11 -0
  514. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +1271 -0
  515. package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +81 -0
  516. package/src/CometChatMessageComposer/index.ts +17 -0
  517. package/src/CometChatMessageComposer/resources/index.ts +19 -0
  518. package/src/CometChatMessageComposer/resources/microphone.png +0 -0
  519. package/src/CometChatMessageComposer/styles.ts +31 -0
  520. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +504 -0
  521. package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +61 -0
  522. package/src/CometChatMessageHeader/index.ts +16 -0
  523. package/src/CometChatMessageHeader/listners.ts +73 -0
  524. package/src/CometChatMessageHeader/resources/index.ts +8 -0
  525. package/src/CometChatMessageHeader/styles.ts +16 -0
  526. package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +302 -0
  527. package/src/CometChatMessageInformation/MessageInformationConfiguration.tsx +13 -0
  528. package/src/CometChatMessageInformation/MessageInformationStyle.ts +12 -0
  529. package/src/CometChatMessageInformation/index.ts +13 -0
  530. package/src/CometChatMessageInformation/resources/index.ts +5 -0
  531. package/src/CometChatMessageInformation/styles.ts +26 -0
  532. package/src/CometChatMessageList/CometChatMessageList.tsx +1415 -0
  533. package/src/CometChatMessageList/MessageListConfiguration.ts +130 -0
  534. package/src/CometChatMessageList/MessageListStyle.ts +75 -0
  535. package/src/CometChatMessageList/index.ts +23 -0
  536. package/src/CometChatMessageList/resources/index.ts +13 -0
  537. package/src/CometChatMessageList/style.ts +55 -0
  538. package/src/CometChatMessages/CometChatMessages.tsx +334 -0
  539. package/src/CometChatMessages/MessageStyle.ts +34 -0
  540. package/src/CometChatMessages/MessagesConfiguration.ts +53 -0
  541. package/src/CometChatMessages/index.ts +15 -0
  542. package/src/CometChatMessages/resources/index.ts +5 -0
  543. package/src/CometChatMessages/style.ts +24 -0
  544. package/src/CometChatTabs/CometChatTabs.tsx +190 -0
  545. package/src/CometChatTabs/CometChatTabsStyle.ts +43 -0
  546. package/src/CometChatTabs/TabItemStyle.ts +55 -0
  547. package/src/CometChatTabs/TabItems.ts +11 -0
  548. package/src/CometChatTabs/index.ts +11 -0
  549. package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +294 -0
  550. package/src/CometChatThreadedMessages/Header.tsx +57 -0
  551. package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +29 -0
  552. package/src/CometChatThreadedMessages/index.ts +16 -0
  553. package/src/CometChatThreadedMessages/resources/index.ts +14 -0
  554. package/src/CometChatThreadedMessages/style.ts +27 -0
  555. package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +144 -0
  556. package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +59 -0
  557. package/src/CometChatTransferOwnership/index.ts +15 -0
  558. package/src/CometChatUsers/CometChatUsers.tsx +173 -0
  559. package/src/CometChatUsers/UsersConfiguration.tsx +58 -0
  560. package/src/CometChatUsers/index.ts +14 -0
  561. package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +127 -0
  562. package/src/CometChatUsersWithMessages/index.ts +5 -0
  563. package/src/CometChatUsersWithMessages/styles.ts +15 -0
  564. package/src/calls/CallEvents.ts +9 -0
  565. package/src/calls/CallUtils.ts +71 -0
  566. package/src/calls/CallingConfiguration.ts +5 -0
  567. package/src/calls/CallingDetailsUtils.tsx +39 -0
  568. package/src/calls/CallingExtension.tsx +48 -0
  569. package/src/calls/CallingExtentionDecorator.tsx +204 -0
  570. package/src/calls/CallingPackage.ts +8 -0
  571. package/src/calls/CometChatCallBubble/CallBubbleConfiguration.ts +23 -0
  572. package/src/calls/CometChatCallBubble/CallBubbleStyle.ts +47 -0
  573. package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +54 -0
  574. package/src/calls/CometChatCallBubble/index.ts +11 -0
  575. package/src/calls/CometChatCallBubble/resources/index.ts +9 -0
  576. package/src/calls/CometChatCallBubble/styles.ts +22 -0
  577. package/src/calls/CometChatCallButtons/CallButtonStyle.ts +35 -0
  578. package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +41 -0
  579. package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +340 -0
  580. package/src/calls/CometChatCallButtons/index.ts +11 -0
  581. package/src/calls/CometChatCallButtons/resources/index.ts +7 -0
  582. package/src/calls/CometChatCallButtons/style.ts +14 -0
  583. package/src/calls/CometChatCallDetails/CallDetailsConfiguration.ts +68 -0
  584. package/src/calls/CometChatCallDetails/CallDetailsStyle.ts +52 -0
  585. package/src/calls/CometChatCallDetails/CometChatCallDetails.tsx +268 -0
  586. package/src/calls/CometChatCallDetails/index.ts +9 -0
  587. package/src/calls/CometChatCallDetails/resources/index.ts +4 -0
  588. package/src/calls/CometChatCallDetails/style.ts +14 -0
  589. package/src/calls/CometChatCallHistory/CallHistoryConfiguration.ts +77 -0
  590. package/src/calls/CometChatCallHistory/CallHistoryStyle.ts +34 -0
  591. package/src/calls/CometChatCallHistory/CometChatCallHistory.tsx +422 -0
  592. package/src/calls/CometChatCallHistory/index.ts +9 -0
  593. package/src/calls/CometChatCallHistory/resources/index.ts +17 -0
  594. package/src/calls/CometChatCallHistory/style.ts +23 -0
  595. package/src/calls/CometChatCallHistoryWithDetails/CometChatCallHistoryWithDetails.tsx +54 -0
  596. package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsConfiguration.ts +7 -0
  597. package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsStyle.ts +3 -0
  598. package/src/calls/CometChatCallHistoryWithDetails/index.ts +8 -0
  599. package/src/calls/CometChatCallHistoryWithDetails/style.ts +11 -0
  600. package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +276 -0
  601. package/src/calls/CometChatIncomingCall/IncomingCallStyle.ts +75 -0
  602. package/src/calls/CometChatIncomingCall/index.ts +9 -0
  603. package/src/calls/CometChatIncomingCall/resources/index.ts +11 -0
  604. package/src/calls/CometChatIncomingCall/styles.ts +11 -0
  605. package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +67 -0
  606. package/src/calls/CometChatOngoingCall/OngoingCallStyle.ts +25 -0
  607. package/src/calls/CometChatOngoingCall/index.ts +8 -0
  608. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +263 -0
  609. package/src/calls/CometChatOutgoingCall/OutgoingCallConfiguration.ts +33 -0
  610. package/src/calls/CometChatOutgoingCall/OutgoingCallStyle.ts +39 -0
  611. package/src/calls/CometChatOutgoingCall/index.ts +9 -0
  612. package/src/calls/CometChatOutgoingCall/resources/index.ts +5 -0
  613. package/src/calls/index.ts +39 -0
  614. package/src/calls/resources/index.ts +7 -0
  615. package/src/extensions/CollaborativeBubble/CollaborativeBubbleStyle.ts +97 -0
  616. package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +106 -0
  617. package/src/extensions/CollaborativeBubble/resources/index.ts +4 -0
  618. package/src/extensions/CollaborativeBubble/styles.ts +80 -0
  619. package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +26 -0
  620. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtension.tsx +38 -0
  621. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +204 -0
  622. package/src/extensions/CollaborativeDocument/index.ts +12 -0
  623. package/src/extensions/CollaborativeDocument/resources/index.ts +5 -0
  624. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +26 -0
  625. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.tsx +38 -0
  626. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +209 -0
  627. package/src/extensions/CollaborativeWhiteboard/index.ts +12 -0
  628. package/src/extensions/CollaborativeWhiteboard/resources/index.ts +5 -0
  629. package/src/extensions/ExtensionConstants.tsx +54 -0
  630. package/src/extensions/ExtensionModerator.tsx +60 -0
  631. package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +82 -0
  632. package/src/extensions/ImageModeration/ImageModerationExtension.tsx +43 -0
  633. package/src/extensions/ImageModeration/ImageModerationFilter.tsx +145 -0
  634. package/src/extensions/ImageModeration/index.ts +10 -0
  635. package/src/extensions/ImageModeration/resources/index.ts +3 -0
  636. package/src/extensions/LinkPreview/LInkPreviewBubbleStyle.ts +28 -0
  637. package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +73 -0
  638. package/src/extensions/LinkPreview/LinkPreviewConfiguration.ts +27 -0
  639. package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +25 -0
  640. package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +54 -0
  641. package/src/extensions/LinkPreview/index.ts +15 -0
  642. package/src/extensions/LinkPreview/resources/index.ts +5 -0
  643. package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +128 -0
  644. package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +216 -0
  645. package/src/extensions/MessageTranslation/MessageTranslationExtension.tsx +47 -0
  646. package/src/extensions/MessageTranslation/index.ts +13 -0
  647. package/src/extensions/MessageTranslation/resources/index.ts +5 -0
  648. package/src/extensions/Polls/Header.tsx +71 -0
  649. package/src/extensions/Polls/Polls.tsx +454 -0
  650. package/src/extensions/Polls/PollsBubble.tsx +330 -0
  651. package/src/extensions/Polls/PollsConfigurations.ts +16 -0
  652. package/src/extensions/Polls/PollsDecorator.tsx +172 -0
  653. package/src/extensions/Polls/PollsExtension.tsx +39 -0
  654. package/src/extensions/Polls/index.ts +14 -0
  655. package/src/extensions/Polls/resources/index.ts +14 -0
  656. package/src/extensions/Polls/style.ts +40 -0
  657. package/src/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.tsx +249 -0
  658. package/src/extensions/Reactions/CometChatMessageReactions/index.ts +3 -0
  659. package/src/extensions/Reactions/CometChatMessageReactions/style.ts +42 -0
  660. package/src/extensions/Reactions/ReactionsDecorator.tsx +164 -0
  661. package/src/extensions/Reactions/ReactionsExtension.tsx +48 -0
  662. package/src/extensions/Reactions/index.ts +4 -0
  663. package/src/extensions/Reactions/resources/index.ts +2 -0
  664. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +135 -0
  665. package/src/extensions/SmartReplies/SmartRepliesExtension.tsx +52 -0
  666. package/src/extensions/SmartReplies/SmartRepliesView.tsx +218 -0
  667. package/src/extensions/SmartReplies/index.ts +3 -0
  668. package/src/extensions/SmartReplies/resources/index.ts +5 -0
  669. package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +152 -0
  670. package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +20 -0
  671. package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardStyle.ts +52 -0
  672. package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +93 -0
  673. package/src/extensions/Stickers/CometChatStickerKeyboard/index.ts +5 -0
  674. package/src/extensions/Stickers/CometChatStickerKeyboard/resources/close.svg +4 -0
  675. package/src/extensions/Stickers/CometChatStickerKeyboard/style.ts +55 -0
  676. package/src/extensions/Stickers/StickerConfiguration.ts +17 -0
  677. package/src/extensions/Stickers/StickerStyle.ts +15 -0
  678. package/src/extensions/Stickers/StickersBubble.tsx +54 -0
  679. package/src/extensions/Stickers/StickersExtension.ts +32 -0
  680. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +144 -0
  681. package/src/extensions/Stickers/index.ts +12 -0
  682. package/src/extensions/Stickers/resources/index.ts +5 -0
  683. package/src/extensions/TextModeration/TextModerationConfiguration.tsx +25 -0
  684. package/src/extensions/TextModeration/TextModerationExtension.tsx +50 -0
  685. package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +92 -0
  686. package/src/extensions/TextModeration/index.ts +5 -0
  687. package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +109 -0
  688. package/src/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.tsx +45 -0
  689. package/src/extensions/ThumbnailGeneration/index.ts +3 -0
  690. package/src/extensions/index.ts +55 -0
  691. package/src/index.ts +576 -0
  692. package/src/shared/CometChatContext.tsx +39 -0
  693. package/src/shared/CometChatUiKit/CometChatUIKit.ts +233 -0
  694. package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +121 -0
  695. package/src/shared/CometChatUiKit/UIKitSettings.ts +47 -0
  696. package/src/shared/CometChatUiKit/index.ts +9 -0
  697. package/src/shared/assets/images/index.ts +17 -0
  698. package/src/shared/base/BaseStyle.ts +40 -0
  699. package/src/shared/base/BorderStyle.ts +28 -0
  700. package/src/shared/base/FontStyle.ts +27 -0
  701. package/src/shared/base/ShadowStyle.ts +40 -0
  702. package/src/shared/base/Types.ts +21 -0
  703. package/src/shared/base/index.ts +28 -0
  704. package/src/shared/constants/UIKitConstants.ts +348 -0
  705. package/src/shared/events/CometChatMessageEvents/index.ts +100 -0
  706. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +334 -0
  707. package/src/shared/events/CometChatUIEventHandler/Listener.ts +354 -0
  708. package/src/shared/events/CometChatUIEvents.ts +19 -0
  709. package/src/shared/events/conversations.ts +3 -0
  710. package/src/shared/events/groups.ts +10 -0
  711. package/src/shared/events/index.ts +13 -0
  712. package/src/shared/events/messages.ts +11 -0
  713. package/src/shared/framework/ChatConfigurator.ts +28 -0
  714. package/src/shared/framework/DataSource.ts +72 -0
  715. package/src/shared/framework/DataSourceDecorator.tsx +164 -0
  716. package/src/shared/framework/ExtensionsDataSource.tsx +20 -0
  717. package/src/shared/framework/MessageDataSource.tsx +621 -0
  718. package/src/shared/framework/index.ts +6 -0
  719. package/src/shared/framework/resources/index.ts +45 -0
  720. package/src/shared/framework/resources/messageInPrivate.png +0 -0
  721. package/src/shared/framework/resources/microphone.png +0 -0
  722. package/src/shared/framework/resources/stop_player.png +0 -0
  723. package/src/shared/helper/SwipeRow.js +944 -0
  724. package/src/shared/helper/Toast.tsx +24 -0
  725. package/src/shared/helper/functions.js +36 -0
  726. package/src/shared/helper/helperFunctions.ts +18 -0
  727. package/src/shared/helper/types/index.ts +26 -0
  728. package/src/shared/helper/useKeyboard.tsx +38 -0
  729. package/src/shared/index.ts +262 -0
  730. package/src/shared/modals/CometChatDetailsOption.ts +24 -0
  731. package/src/shared/modals/CometChatDetailsTemplate.ts +16 -0
  732. package/src/shared/modals/CometChatMessageOption.ts +14 -0
  733. package/src/shared/modals/CometChatMessageTemplate.ts +42 -0
  734. package/src/shared/modals/CometChatOptions.ts +13 -0
  735. package/src/shared/modals/index.ts +13 -0
  736. package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +180 -0
  737. package/src/shared/resources/CometChatLocalize/index.ts +9 -0
  738. package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +274 -0
  739. package/src/shared/resources/CometChatLocalize/resources/de/translation.json +274 -0
  740. package/src/shared/resources/CometChatLocalize/resources/en/translation.json +274 -0
  741. package/src/shared/resources/CometChatLocalize/resources/es/translation.json +274 -0
  742. package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +274 -0
  743. package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +274 -0
  744. package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +274 -0
  745. package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +274 -0
  746. package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +274 -0
  747. package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +274 -0
  748. package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +274 -0
  749. package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +274 -0
  750. package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +274 -0
  751. package/src/shared/resources/CometChatSoundManager/CometChatSoundManager.js +95 -0
  752. package/src/shared/resources/CometChatSoundManager/index.ts +2 -0
  753. package/src/shared/resources/CometChatSoundManager/resources/index.js +5 -0
  754. package/src/shared/resources/CometChatSoundManager/sound.js +336 -0
  755. package/src/shared/resources/CometChatTheme/CometChatTheme.ts +28 -0
  756. package/src/shared/resources/CometChatTheme/Palette.ts +501 -0
  757. package/src/shared/resources/CometChatTheme/Typography.ts +269 -0
  758. package/src/shared/resources/CometChatTheme/index.ts +2 -0
  759. package/src/shared/resources/index.ts +12 -0
  760. package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +120 -0
  761. package/src/shared/utils/CometChatLiveReactions/LiveReactionstyles.ts +37 -0
  762. package/src/shared/utils/CometChatLiveReactions/index.ts +1 -0
  763. package/src/shared/utils/CometChatLiveReactions/resources/index.ts +4 -0
  764. package/src/shared/utils/CometChatLiveReactions/style.ts +8 -0
  765. package/src/shared/utils/CometChatMessageHelper/index.ts +55 -0
  766. package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +117 -0
  767. package/src/shared/utils/CometChatMessagePreview/MessagePreviewConfiguration.js +30 -0
  768. package/src/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +42 -0
  769. package/src/shared/utils/CometChatMessagePreview/index.js +5 -0
  770. package/src/shared/utils/CometChatMessagePreview/resources/index.ts +5 -0
  771. package/src/shared/utils/CometChatMessagePreview/style.js +71 -0
  772. package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +353 -0
  773. package/src/shared/utils/DetailsUtils/resources/index.ts +16 -0
  774. package/src/shared/utils/MessageUtils.tsx +57 -0
  775. package/src/shared/utils/conversationUtils.ts +82 -0
  776. package/src/shared/utils/index.ts +28 -0
  777. package/src/shared/views/CometChatActionSheet/ActionItem.ts +60 -0
  778. package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +76 -0
  779. package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +275 -0
  780. package/src/shared/views/CometChatActionSheet/hooks.ts +10 -0
  781. package/src/shared/views/CometChatActionSheet/index.ts +3 -0
  782. package/src/shared/views/CometChatActionSheet/resources/index.ts +7 -0
  783. package/src/shared/views/CometChatActionSheet/style.ts +47 -0
  784. package/src/shared/views/CometChatAudioBubble/AudioBubbleStyle.ts +43 -0
  785. package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +166 -0
  786. package/src/shared/views/CometChatAudioBubble/index.ts +16 -0
  787. package/src/shared/views/CometChatAudioBubble/resources/index.ts +7 -0
  788. package/src/shared/views/CometChatAudioBubble/resources/pause.png +0 -0
  789. package/src/shared/views/CometChatAudioBubble/style.ts +29 -0
  790. package/src/shared/views/CometChatAvatar/AvatarConfiguration.ts +27 -0
  791. package/src/shared/views/CometChatAvatar/AvatarStyle.ts +57 -0
  792. package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +122 -0
  793. package/src/shared/views/CometChatAvatar/index.ts +11 -0
  794. package/src/shared/views/CometChatAvatar/resources/index.ts +5 -0
  795. package/src/shared/views/CometChatAvatar/styles.ts +25 -0
  796. package/src/shared/views/CometChatBadge/BadgeConfiguration.ts +55 -0
  797. package/src/shared/views/CometChatBadge/BadgeStyle.ts +39 -0
  798. package/src/shared/views/CometChatBadge/CometChatBadge.tsx +70 -0
  799. package/src/shared/views/CometChatBadge/index.ts +10 -0
  800. package/src/shared/views/CometChatBadge/styles.ts +18 -0
  801. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +173 -0
  802. package/src/shared/views/CometChatBottomSheet/index.ts +3 -0
  803. package/src/shared/views/CometChatBottomSheet/style.ts +52 -0
  804. package/src/shared/views/CometChatButton/CometChatButton.tsx +66 -0
  805. package/src/shared/views/CometChatButton/CometChatButtonStyle.ts +47 -0
  806. package/src/shared/views/CometChatButton/index.ts +15 -0
  807. package/src/shared/views/CometChatButton/style.ts +8 -0
  808. package/src/shared/views/CometChatCard/CometChatCard.tsx +77 -0
  809. package/src/shared/views/CometChatCard/CometChatCardStyle.ts +31 -0
  810. package/src/shared/views/CometChatCard/index.ts +9 -0
  811. package/src/shared/views/CometChatCard/style.ts +13 -0
  812. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +138 -0
  813. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +35 -0
  814. package/src/shared/views/CometChatConfirmDialog/index.ts +7 -0
  815. package/src/shared/views/CometChatConfirmDialog/style.ts +63 -0
  816. package/src/shared/views/CometChatDate/CometChatDate.tsx +188 -0
  817. package/src/shared/views/CometChatDate/DateConfiguration.ts +28 -0
  818. package/src/shared/views/CometChatDate/DateStyle.ts +26 -0
  819. package/src/shared/views/CometChatDate/index.ts +11 -0
  820. package/src/shared/views/CometChatDate/style.ts +8 -0
  821. package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +242 -0
  822. package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +17 -0
  823. package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +22 -0
  824. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +26 -0
  825. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +44 -0
  826. package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +8225 -0
  827. package/src/shared/views/CometChatEmojiKeyboard/index.ts +5 -0
  828. package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +10 -0
  829. package/src/shared/views/CometChatEmojiKeyboard/style.ts +64 -0
  830. package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +131 -0
  831. package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +58 -0
  832. package/src/shared/views/CometChatFileBubble/index.ts +9 -0
  833. package/src/shared/views/CometChatFileBubble/resources/file_upload.png +0 -0
  834. package/src/shared/views/CometChatFileBubble/resources/index.ts +7 -0
  835. package/src/shared/views/CometChatFileBubble/style.ts +48 -0
  836. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +106 -0
  837. package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +23 -0
  838. package/src/shared/views/CometChatImageBubble/index.ts +9 -0
  839. package/src/shared/views/CometChatList/CometChatList.tsx +727 -0
  840. package/src/shared/views/CometChatList/Header.tsx +139 -0
  841. package/src/shared/views/CometChatList/index.ts +12 -0
  842. package/src/shared/views/CometChatList/resources/Back.png +0 -0
  843. package/src/shared/views/CometChatList/resources/Spinner.png +0 -0
  844. package/src/shared/views/CometChatList/resources/checkmark.png +0 -0
  845. package/src/shared/views/CometChatList/resources/index.ts +12 -0
  846. package/src/shared/views/CometChatList/styles.ts +103 -0
  847. package/src/shared/views/CometChatListItem/CometChatListItem.tsx +304 -0
  848. package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +20 -0
  849. package/src/shared/views/CometChatListItem/ListItemStyle.ts +47 -0
  850. package/src/shared/views/CometChatListItem/index.ts +14 -0
  851. package/src/shared/views/CometChatListItem/style.ts +65 -0
  852. package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +253 -0
  853. package/src/shared/views/CometChatMediaRecorder/MediaRecorderStyle.ts +63 -0
  854. package/src/shared/views/CometChatMediaRecorder/index.ts +11 -0
  855. package/src/shared/views/CometChatMediaRecorder/style.ts +31 -0
  856. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +94 -0
  857. package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +22 -0
  858. package/src/shared/views/CometChatMessageBubble/index.ts +6 -0
  859. package/src/shared/views/CometChatMessageBubble/style.ts +0 -0
  860. package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +184 -0
  861. package/src/shared/views/CometChatMessageInput/index.ts +2 -0
  862. package/src/shared/views/CometChatMessageInput/styles.ts +9 -0
  863. package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +72 -0
  864. package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +53 -0
  865. package/src/shared/views/CometChatReceipt/ReceiptStyle.ts +3 -0
  866. package/src/shared/views/CometChatReceipt/index.ts +9 -0
  867. package/src/shared/views/CometChatReceipt/resources/blue-double-tick-icon.png +0 -0
  868. package/src/shared/views/CometChatReceipt/resources/error.png +0 -0
  869. package/src/shared/views/CometChatReceipt/resources/grey-double-tick-icon.png +0 -0
  870. package/src/shared/views/CometChatReceipt/resources/grey-tick-icon.png +0 -0
  871. package/src/shared/views/CometChatReceipt/resources/index.ts +18 -0
  872. package/src/shared/views/CometChatReceipt/resources/sending.png +0 -0
  873. package/src/shared/views/CometChatReceipt/style.ts +9 -0
  874. package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +64 -0
  875. package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +25 -0
  876. package/src/shared/views/CometChatStatusIndicator/StatusIndicatorStyle.ts +37 -0
  877. package/src/shared/views/CometChatStatusIndicator/index.ts +12 -0
  878. package/src/shared/views/CometChatStatusIndicator/styles.ts +15 -0
  879. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +125 -0
  880. package/src/shared/views/CometChatTextBubble/TextBubbleStyle.ts +51 -0
  881. package/src/shared/views/CometChatTextBubble/index.ts +11 -0
  882. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +113 -0
  883. package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +37 -0
  884. package/src/shared/views/CometChatVideoBubble/index.ts +9 -0
  885. package/src/shared/views/CometChatVideoBubble/resources/index.ts +5 -0
  886. package/src/shared/views/CometChatVideoBubble/resources/play.png +0 -0
  887. package/src/shared/views/CometChatVideoBubble/style.ts +10 -0
  888. package/src/shared/views/SwipeRow/SwipeRow.tsx +133 -0
  889. package/src/shared/views/SwipeRow/index.ts +3 -0
  890. package/src/shared/views/SwipeRow/style.ts +30 -0
  891. package/src/shared/views/index.ts +163 -0
  892. package/LICENSE +0 -21
  893. /package/{lib/CometChatConversations → src/AI}/resources/spineer.png +0 -0
  894. /package/{lib → src}/CometChatBannedMembers/resources/clear.png +0 -0
  895. /package/{lib → src}/CometChatConversations/resources/back.png +0 -0
  896. /package/{lib → src}/CometChatConversations/resources/blue-double-tick-icon.png +0 -0
  897. /package/{lib → src}/CometChatConversations/resources/close.png +0 -0
  898. /package/{lib → src}/CometChatConversations/resources/delete.png +0 -0
  899. /package/{lib → src}/CometChatConversations/resources/error.png +0 -0
  900. /package/{lib → src}/CometChatConversations/resources/grey-double-tick-icon.png +0 -0
  901. /package/{lib → src}/CometChatConversations/resources/grey-tick-icon.png +0 -0
  902. /package/{lib → src}/CometChatConversations/resources/new.png +0 -0
  903. /package/{lib → src}/CometChatConversations/resources/password.png +0 -0
  904. /package/{lib → src}/CometChatConversations/resources/private.png +0 -0
  905. /package/{lib → src}/CometChatConversations/resources/rightTick.png +0 -0
  906. /package/{lib → src}/CometChatConversations/resources/sending.png +0 -0
  907. /package/{lib/CometChatGroups → src/CometChatConversations}/resources/spineer.png +0 -0
  908. /package/{lib → src}/CometChatCreateGroup/resources/close.png +0 -0
  909. /package/{lib → src}/CometChatCreateGroup/resources/rightTick.png +0 -0
  910. /package/{lib → src}/CometChatCreateGroup/resources/warning.png +0 -0
  911. /package/{lib → src}/CometChatDetails/resources/Back.png +0 -0
  912. /package/{lib → src}/CometChatDetails/resources/close.png +0 -0
  913. /package/{lib → src}/CometChatDetails/resources/password.png +0 -0
  914. /package/{lib → src}/CometChatDetails/resources/private.png +0 -0
  915. /package/{lib → src}/CometChatDetails/resources/right-arrow.png +0 -0
  916. /package/{lib → src}/CometChatGroupMembers/resources/banIcon.png +0 -0
  917. /package/{lib → src}/CometChatGroupMembers/resources/downArrowIcon.png +0 -0
  918. /package/{lib → src}/CometChatGroupMembers/resources/kickIcon.png +0 -0
  919. /package/{lib → src}/CometChatGroupMembers/resources/rightTick.png +0 -0
  920. /package/{lib → src}/CometChatGroups/resources/back.png +0 -0
  921. /package/{lib → src}/CometChatGroups/resources/close.png +0 -0
  922. /package/{lib → src}/CometChatGroups/resources/create.png +0 -0
  923. /package/{lib → src}/CometChatGroups/resources/more.png +0 -0
  924. /package/{lib → src}/CometChatGroups/resources/password.png +0 -0
  925. /package/{lib → src}/CometChatGroups/resources/private.png +0 -0
  926. /package/{lib → src}/CometChatGroups/resources/rightTick.png +0 -0
  927. /package/{lib → src}/CometChatGroups/resources/search.png +0 -0
  928. /package/{lib → src}/CometChatGroupsWithMessages/resources/write.png +0 -0
  929. /package/{lib → src}/CometChatJoinProtectedGroup/resources/close.png +0 -0
  930. /package/{lib → src}/CometChatJoinProtectedGroup/resources/rightTick.png +0 -0
  931. /package/{lib → src}/CometChatMessageComposer/resources/circle_add.png +0 -0
  932. /package/{lib → src}/CometChatMessageComposer/resources/close.png +0 -0
  933. /package/{lib → src}/CometChatMessageComposer/resources/emoji.png +0 -0
  934. /package/{lib → src}/CometChatMessageComposer/resources/heart.png +0 -0
  935. /package/{lib → src}/CometChatMessageComposer/resources/image.png +0 -0
  936. /package/{lib → src}/CometChatMessageComposer/resources/send_message.png +0 -0
  937. /package/{lib → src}/CometChatMessageComposer/resources/stickers.png +0 -0
  938. /package/{lib → src}/CometChatMessageHeader/resources/Back.png +0 -0
  939. /package/{lib → src}/CometChatMessageHeader/resources/password.png +0 -0
  940. /package/{lib → src}/CometChatMessageHeader/resources/private.png +0 -0
  941. /package/{lib/calls/CometChatCallHistory → src/CometChatMessageInformation}/resources/Spineer.png +0 -0
  942. /package/{lib → src}/CometChatMessageList/resources/back.png +0 -0
  943. /package/{lib → src}/CometChatMessageList/resources/close.png +0 -0
  944. /package/{lib → src}/CometChatMessageList/resources/downArrowIcon.png +0 -0
  945. /package/{lib → src}/CometChatMessageList/resources/rightArrowIcon.png +0 -0
  946. /package/{lib → src}/CometChatMessageList/resources/spineer.png +0 -0
  947. /package/{lib → src}/CometChatMessages/resources/info.png +0 -0
  948. /package/{lib → src}/CometChatThreadedMessages/resources/Back.png +0 -0
  949. /package/{lib → src}/CometChatThreadedMessages/resources/close.png +0 -0
  950. /package/{lib → src}/CometChatThreadedMessages/resources/more.png +0 -0
  951. /package/{lib → src}/CometChatThreadedMessages/resources/password.png +0 -0
  952. /package/{lib → src}/CometChatThreadedMessages/resources/private.png +0 -0
  953. /package/{lib → src}/CometChatThreadedMessages/resources/right-arrow.png +0 -0
  954. /package/{lib → src}/calls/CometChatCallBubble/resources/avatar.png +0 -0
  955. /package/{lib → src}/calls/CometChatCallBubble/resources/incomingaudiocall.png +0 -0
  956. /package/{lib → src}/calls/CometChatCallBubble/resources/incomingvideocall.png +0 -0
  957. /package/{lib → src}/calls/CometChatCallButtons/resources/Call.png +0 -0
  958. /package/{lib → src}/calls/CometChatCallButtons/resources/Video.png +0 -0
  959. /package/{lib → src}/calls/CometChatCallDetails/resources/CloseIcon.png +0 -0
  960. /package/{lib → src}/calls/CometChatCallHistory/resources/Back.png +0 -0
  961. /package/{lib → src}/calls/CometChatCallHistory/resources/Call.png +0 -0
  962. /package/{lib → src}/calls/CometChatCallHistory/resources/Info.png +0 -0
  963. /package/{lib → src}/calls/CometChatCallHistory/resources/Selection.png +0 -0
  964. /package/{lib/shared/views/CometChatList/resources/Spinner.png → src/calls/CometChatCallHistory/resources/Spineer.png} +0 -0
  965. /package/{lib → src}/calls/CometChatCallHistory/resources/Video.png +0 -0
  966. /package/{lib → src}/calls/CometChatCallHistory/resources/check.png +0 -0
  967. /package/{lib → src}/calls/CometChatIncomingCall/resources/Call.png +0 -0
  968. /package/{lib → src}/calls/CometChatIncomingCall/resources/close.png +0 -0
  969. /package/{lib → src}/calls/CometChatIncomingCall/resources/incomingaudiocall.png +0 -0
  970. /package/{lib → src}/calls/CometChatIncomingCall/resources/incomingvideocall.png +0 -0
  971. /package/{lib → src}/calls/CometChatOutgoingCall/resources/Close.png +0 -0
  972. /package/{lib → src}/calls/resources/Call.png +0 -0
  973. /package/{lib → src}/calls/resources/Video.png +0 -0
  974. /package/{lib → src}/extensions/CollaborativeBubble/resources/whiteboard.png +0 -0
  975. /package/{lib → src}/extensions/CollaborativeDocument/resources/collaborative_document.png +0 -0
  976. /package/{lib → src}/extensions/CollaborativeDocument/resources/collaborative_document_2x.png +0 -0
  977. /package/{lib → src}/extensions/CollaborativeWhiteboard/resources/collaborative_whiteboard.png +0 -0
  978. /package/{lib → src}/extensions/CollaborativeWhiteboard/resources/whiteboard.png +0 -0
  979. /package/{lib → src}/extensions/ImageModeration/resources/unsafe.png +0 -0
  980. /package/{lib → src}/extensions/LinkPreview/resources/defaultImage.png +0 -0
  981. /package/{lib → src}/extensions/MessageTranslation/resources/translate.png +0 -0
  982. /package/{lib → src}/extensions/Polls/resources/close.png +0 -0
  983. /package/{lib → src}/extensions/Polls/resources/document.png +0 -0
  984. /package/{lib → src}/extensions/Polls/resources/kickIcon.png +0 -0
  985. /package/{lib → src}/extensions/Polls/resources/rightTick.png +0 -0
  986. /package/{lib → src}/extensions/Polls/resources/warning.png +0 -0
  987. /package/{lib → src}/extensions/Reactions/resources/AddReactions.png +0 -0
  988. /package/{lib → src}/extensions/SmartReplies/resources/close.png +0 -0
  989. /package/{lib → src}/extensions/Stickers/resources/Stickers.png +0 -0
  990. /package/{lib/shared/views/CometChatList/resources → src/shared/assets/images}/Back.png +0 -0
  991. /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/blue-double-tick-icon.png +0 -0
  992. /package/{lib/shared/views/CometChatList/resources → src/shared/assets/images}/checkmark.png +0 -0
  993. /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/error.png +0 -0
  994. /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/grey-double-tick-icon.png +0 -0
  995. /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/grey-tick-icon.png +0 -0
  996. /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/sending.png +0 -0
  997. /package/{lib → src}/shared/framework/resources/audio-file.png +0 -0
  998. /package/{lib → src}/shared/framework/resources/circle_add.png +0 -0
  999. /package/{lib → src}/shared/framework/resources/copy.png +0 -0
  1000. /package/{lib → src}/shared/framework/resources/delete.png +0 -0
  1001. /package/{lib → src}/shared/framework/resources/edit.png +0 -0
  1002. /package/{lib → src}/shared/framework/resources/emoji.png +0 -0
  1003. /package/{lib → src}/shared/framework/resources/file_upload.png +0 -0
  1004. /package/{lib → src}/shared/framework/resources/forward.png +0 -0
  1005. /package/{lib → src}/shared/framework/resources/heart.png +0 -0
  1006. /package/{lib → src}/shared/framework/resources/image.png +0 -0
  1007. /package/{lib → src}/shared/framework/resources/info.png +0 -0
  1008. /package/{lib → src}/shared/framework/resources/location.png +0 -0
  1009. /package/{lib/shared/views/CometChatAudioBubble → src/shared/framework}/resources/pause.png +0 -0
  1010. /package/{lib/shared/views/CometChatAudioBubble → src/shared/framework}/resources/play.png +0 -0
  1011. /package/{lib → src}/shared/framework/resources/reply.png +0 -0
  1012. /package/{lib → src}/shared/framework/resources/send_message.png +0 -0
  1013. /package/{lib → src}/shared/framework/resources/share.png +0 -0
  1014. /package/{lib → src}/shared/framework/resources/thread.png +0 -0
  1015. /package/{lib → src}/shared/framework/resources/video_upload.png +0 -0
  1016. /package/{lib → src}/shared/resources/CometChatSoundManager/resources/incomingcall.wav +0 -0
  1017. /package/{lib → src}/shared/resources/CometChatSoundManager/resources/incomingmessage.wav +0 -0
  1018. /package/{lib → src}/shared/resources/CometChatSoundManager/resources/incomingothermessage.wav +0 -0
  1019. /package/{lib → src}/shared/resources/CometChatSoundManager/resources/outgoingcall.wav +0 -0
  1020. /package/{lib → src}/shared/resources/CometChatSoundManager/resources/outgoingmessage.wav +0 -0
  1021. /package/{lib → src}/shared/utils/CometChatLiveReactions/resources/heart.png +0 -0
  1022. /package/{lib → src}/shared/utils/CometChatMessagePreview/resources/close.png +0 -0
  1023. /package/{lib → src}/shared/utils/DetailsUtils/resources/Back.png +0 -0
  1024. /package/{lib → src}/shared/utils/DetailsUtils/resources/banIcon.png +0 -0
  1025. /package/{lib → src}/shared/utils/DetailsUtils/resources/close.png +0 -0
  1026. /package/{lib → src}/shared/utils/DetailsUtils/resources/kickIcon.png +0 -0
  1027. /package/{lib → src}/shared/utils/DetailsUtils/resources/password.png +0 -0
  1028. /package/{lib → src}/shared/utils/DetailsUtils/resources/private.png +0 -0
  1029. /package/{lib → src}/shared/utils/DetailsUtils/resources/right-arrow.png +0 -0
  1030. /package/{lib → src}/shared/views/CometChatActionSheet/resources/grid.png +0 -0
  1031. /package/{lib → src}/shared/views/CometChatActionSheet/resources/list.png +0 -0
  1032. /package/{lib/shared/views/CometChatVideoBubble → src/shared/views/CometChatAudioBubble}/resources/play.png +0 -0
  1033. /package/{lib → src}/shared/views/CometChatAvatar/resources/default.jpg +0 -0
  1034. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/activity.png +0 -0
  1035. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/animals.png +0 -0
  1036. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/flags.png +0 -0
  1037. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/food.png +0 -0
  1038. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/objects.png +0 -0
  1039. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/smileys.png +0 -0
  1040. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/symbols.png +0 -0
  1041. /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/travel.png +0 -0
  1042. /package/{lib → src}/shared/views/CometChatFileBubble/resources/download.png +0 -0
  1043. /package/{lib → src}/shared/views/CometChatList/resources/Search.png +0 -0
  1044. /package/{lib → src}/shared/views/CometChatList/resources/check.png +0 -0
@@ -0,0 +1,52 @@
1
+ import {
2
+ ExtensionsDataSource,
3
+ ChatConfigurator,
4
+ DataSource,
5
+ } from '../../shared/framework';
6
+ import { ExtensionConstants } from '../ExtensionConstants';
7
+ import { SmartRepliesDecorator } from './SmartRepliesDecorator';
8
+ import { SmartRepliesInterface } from './SmartRepliesView';
9
+ export interface SmartRepliesConfigurationInterface
10
+ extends Omit<
11
+ SmartRepliesInterface,
12
+ | 'customOutgoingMessageSound'
13
+ | 'enableSoundForMessages'
14
+ | 'onClose'
15
+ | 'replies'
16
+ | 'onClick'
17
+ | 'closeIcon'
18
+ > {}
19
+
20
+ export class SmartRepliesExtension extends ExtensionsDataSource {
21
+ SmartRepliesConfigurationInterface?: SmartRepliesConfigurationInterface;
22
+
23
+ constructor(
24
+ SmartRepliesConfigurationConfiguration?: SmartRepliesConfigurationInterface
25
+ ) {
26
+ super();
27
+ if (SmartRepliesConfigurationConfiguration != null) {
28
+ this.SmartRepliesConfigurationInterface =
29
+ SmartRepliesConfigurationConfiguration;
30
+ }
31
+ }
32
+
33
+ /**
34
+ * enable
35
+ * @description enables the Text moderation extension which includes Data profanity and data masking
36
+ */
37
+
38
+ //override addExtension method from ExtensionsDataSource interface
39
+ override addExtension(): void {
40
+ ChatConfigurator.enable((dataSource: DataSource) => {
41
+ return new SmartRepliesDecorator(
42
+ dataSource,
43
+ this.SmartRepliesConfigurationInterface
44
+ );
45
+ });
46
+ }
47
+
48
+ //override getExtensionId method from ExtensionsDataSource interface
49
+ override getExtensionId(): string {
50
+ return ExtensionConstants.smartReply;
51
+ }
52
+ }
@@ -0,0 +1,218 @@
1
+ import React, { useContext, useEffect, useState } from 'react';
2
+ import {
3
+ View,
4
+ Image,
5
+ ScrollView,
6
+ TouchableOpacity,
7
+ StyleSheet,
8
+ Text,
9
+ } from 'react-native';
10
+ import {
11
+ FontStyleInterface,
12
+ ImageType,
13
+ } from '../../shared/base';
14
+ import { CometChatSoundManager } from "../../shared/resources";
15
+ import { CometChatContext } from "../../shared/CometChatContext";
16
+ import { ICONS } from './resources';
17
+
18
+ export interface SmartRepliesInterface {
19
+ customOutgoingMessageSound?: any;
20
+ enableSoundForMessages?: boolean;
21
+ onClose?: () => void;
22
+ replies?: any[];
23
+ style?: {
24
+ textBackground?: string;
25
+ textFont?: FontStyleInterface;
26
+ textColor?: string;
27
+ backgroundColor?: string;
28
+ iconTint?: string;
29
+ };
30
+ onClick?: (option) => void;
31
+ closeIcon?: ImageType;
32
+ }
33
+ const SmartRepliesView = (props: SmartRepliesInterface) => {
34
+ const {
35
+ customOutgoingMessageSound,
36
+ enableSoundForMessages,
37
+ onClose,
38
+ replies,
39
+ style,
40
+ onClick,
41
+ closeIcon,
42
+ } = props;
43
+ const { theme } = useContext(CometChatContext);
44
+
45
+ /**
46
+ * Play Outgoing Audio sound on send
47
+ */
48
+ const playOutgoingAudio = () => {
49
+ if (enableSoundForMessages) {
50
+ if (customOutgoingMessageSound) {
51
+ CometChatSoundManager.play(
52
+ CometChatSoundManager.SoundOutput.outgoingMessage,
53
+ customOutgoingMessageSound
54
+ );
55
+ } else {
56
+ CometChatSoundManager.play(
57
+ CometChatSoundManager.SoundOutput.outgoingMessage
58
+ );
59
+ }
60
+ }
61
+ };
62
+
63
+ /**
64
+ *
65
+ * @param {*} smartReply
66
+ * performs send Message Function
67
+ */
68
+
69
+ /**
70
+ *
71
+ * @returns Single smart reply option
72
+ */
73
+ const CometChatSmartReplyOptions = () => {
74
+ if (replies && replies.length) {
75
+ return replies.map((option) => {
76
+ return (
77
+ <TouchableOpacity
78
+ onPress={() => {
79
+ playOutgoingAudio();
80
+ onClick(option);
81
+ }}
82
+ style={[
83
+ Styles.buttonWrapperStyle,
84
+ {
85
+ shadowColor: theme?.palette?.getAccent(),
86
+ shadowOffset: {
87
+ width: 0,
88
+ height: 1,
89
+ },
90
+ shadowOpacity: 0.22,
91
+ shadowRadius: 2.22,
92
+ elevation: 3,
93
+ },
94
+ ]}
95
+ key={option}
96
+ >
97
+ <View
98
+ style={[
99
+ Styles.previewOptionStyle,
100
+ {
101
+ backgroundColor:
102
+ style?.textBackground ||
103
+ theme?.palette?.getBackgroundColor(),
104
+ borderWidth: 0.2,
105
+ borderColor: theme?.palette?.getAccent100(),
106
+ },
107
+ ]}
108
+ >
109
+ <Text
110
+ style={[
111
+ style?.textFont || theme?.typography?.subtitle1,
112
+ {
113
+ color: style?.textColor || theme?.palette?.getAccent(),
114
+ },
115
+ ]}
116
+ >
117
+ {option}
118
+ </Text>
119
+ </View>
120
+ </TouchableOpacity>
121
+ );
122
+ });
123
+ }
124
+ return null;
125
+ };
126
+
127
+ /**
128
+ *
129
+ * @returns items to be rendered
130
+ */
131
+ const renderItems = () => {
132
+ if (replies?.length) {
133
+ return (
134
+ <View
135
+ style={[
136
+ Styles.previewWrapperStyle,
137
+ {
138
+ backgroundColor:
139
+ style?.backgroundColor || theme?.palette?.getBackgroundColor(),
140
+ },
141
+ ]}
142
+ >
143
+ <ScrollView
144
+ horizontal
145
+ showsHorizontalScrollIndicator={false}
146
+ contentContainerStyle={{
147
+ justifyContent: 'center',
148
+ alignItems: 'center',
149
+ height: 50,
150
+ }}
151
+ >
152
+ {CometChatSmartReplyOptions()}
153
+ </ScrollView>
154
+
155
+ <TouchableOpacity onPress={onClose ? onClose : () => {}}>
156
+ <Image
157
+ source={closeIcon ?? ICONS.CLOSE}
158
+ style={[
159
+ Styles.previewCloseStyle,
160
+ {
161
+ tintColor: style?.iconTint || theme?.palette?.getAccent600(),
162
+ },
163
+ ]}
164
+ />
165
+ </TouchableOpacity>
166
+ </View>
167
+ );
168
+ } else {
169
+ return null;
170
+ }
171
+ };
172
+
173
+ return renderItems();
174
+ };
175
+
176
+ const Styles = StyleSheet.create({
177
+ previewWrapperStyle: {
178
+ flexDirection: 'row',
179
+ justifyContent: 'flex-end',
180
+ alignItems: 'center',
181
+ paddingVertical: 10,
182
+ },
183
+ previewHeadingStyle: {
184
+ alignSelf: 'flex-start',
185
+ alignItems: 'baseline',
186
+ justifyContent: 'space-between',
187
+ },
188
+ previewCloseStyle: {
189
+ width: 16,
190
+ height: 16,
191
+ borderRadius: 15,
192
+ marginHorizontal: 5,
193
+ },
194
+ buttonWrapperStyle: {
195
+ shadowOffset: {
196
+ width: 0,
197
+ height: 10,
198
+ },
199
+ shadowOpacity: 0.51,
200
+ shadowRadius: 13.16,
201
+ elevation: 3,
202
+ marginHorizontal: 4,
203
+ borderRadius: 50,
204
+ },
205
+ previewOptionStyle: {
206
+ padding: 10,
207
+ marginVertical: 0,
208
+ borderRadius: 20,
209
+ textAlign: 'center',
210
+ },
211
+ });
212
+ SmartRepliesView.defaultProps = {
213
+ customOutgoingMessageSound: null,
214
+ enableSoundForMessages: false,
215
+ style: {},
216
+ replies: [],
217
+ };
218
+ export { SmartRepliesView };
@@ -0,0 +1,3 @@
1
+ import { SmartRepliesExtension, SmartRepliesConfigurationInterface } from './SmartRepliesExtension';
2
+ import { SmartRepliesInterface, SmartRepliesView } from "./SmartRepliesView";
3
+ export { SmartRepliesExtension, SmartRepliesInterface, SmartRepliesView, SmartRepliesConfigurationInterface };
@@ -0,0 +1,5 @@
1
+ import CLOSE from './close.png';
2
+
3
+ export const ICONS = {
4
+ CLOSE,
5
+ };
@@ -0,0 +1,152 @@
1
+ import React from "react";
2
+ import { View, Text, Image, ScrollView, TouchableOpacity, Dimensions } from "react-native";
3
+ import { Hooks } from "./hooks";
4
+ import { Styles } from "./style";
5
+ import { localize } from "../../../shared/resources/CometChatLocalize";
6
+ import { CometChatTheme } from "../../../shared/resources/CometChatTheme";
7
+ import { ExtensionConstants } from "../../ExtensionConstants";
8
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
9
+
10
+ export interface CometChatStickerKeyboardInterface {
11
+ loadingText?: string,
12
+ theme?: CometChatTheme,
13
+ onPress?: (item: CometChat.CustomMessage) => void,
14
+ emptyText?: string,
15
+ errorText?: string,
16
+ }
17
+
18
+ /**
19
+ *
20
+ * CometChatStickerKeyboard is a component that fetches stickers from Stickers extension
21
+ * and displays it.
22
+ *
23
+ * @version 1.0.0
24
+ * @author CometChatTeam
25
+ * @copyright © 2022 CometChat Inc.
26
+ *
27
+ */
28
+
29
+ export const CometChatStickerKeyboard = (props: CometChatStickerKeyboardInterface) => {
30
+ const [stickerList, setStickerList] = React.useState([]);
31
+ const [stickerSet, setStickerSet] = React.useState(null);
32
+ const [activeStickerList, setActiveStickerList] = React.useState([]);
33
+ const [activeStickerSetName, setActiveStickerSetName] = React.useState();
34
+ const [decoratorMessage, setDecoratorMessage] = React.useState(
35
+ props?.loadingText || localize("LOADING")
36
+ );
37
+
38
+ const theme = new CometChatTheme(props?.theme || {});
39
+ const sendStickerMessage = (stickerItem) => {
40
+ props?.onPress(stickerItem);
41
+ };
42
+
43
+ const onStickerSetClicked = (sectionItem) => {
44
+ setActiveStickerList(stickerSet[sectionItem]);
45
+ setActiveStickerSetName(sectionItem);
46
+ };
47
+
48
+ const getStickerList = () => {
49
+ let activeStickers = [];
50
+ if (activeStickerList && activeStickerList?.length) {
51
+ const stickerList = [...activeStickerList];
52
+ activeStickers = stickerList.map((stickerItem, key) => {
53
+ return (
54
+ <TouchableOpacity
55
+ key={key}
56
+ style={Styles.stickerItemStyle}
57
+ onPress={sendStickerMessage.bind(this, stickerItem)}
58
+ >
59
+ <Image
60
+ source={{ uri: stickerItem?.stickerUrl }}
61
+ style={Styles.stickerImageStyle}
62
+ />
63
+ </TouchableOpacity>
64
+ );
65
+ });
66
+ }
67
+
68
+ return activeStickers;
69
+ };
70
+
71
+ const getStickerCategory = () => {
72
+ let sectionItems = null;
73
+ if (stickerSet && Object.keys(stickerSet).length) {
74
+ sectionItems = Object.keys(stickerSet).map((sectionItem, key) => {
75
+ const stickerSetThumbnail =
76
+ stickerSet[sectionItem][0][ExtensionConstants.stickerUrl];
77
+ return (
78
+ <TouchableOpacity
79
+ key={key}
80
+ style={Styles.sectionListItemStyle}
81
+ onPress={onStickerSetClicked.bind(this, sectionItem)}
82
+ >
83
+ <Image
84
+ source={{ uri: stickerSetThumbnail }}
85
+ style={Styles.stickerCategoryImageStyle}
86
+ />
87
+ </TouchableOpacity>
88
+ );
89
+ });
90
+ }
91
+ return sectionItems;
92
+ };
93
+
94
+ const getDecoratorMessage = () => {
95
+ let messageContainer = null;
96
+ if (activeStickerList?.length === 0) {
97
+ messageContainer = (
98
+ <View style={Styles.stickerMsgStyle}>
99
+ <Text
100
+ style={Styles.stickerMsgTxtStyle}
101
+ >
102
+ {decoratorMessage}
103
+ </Text>
104
+ </View>
105
+ );
106
+ }
107
+ return messageContainer;
108
+ };
109
+
110
+ Hooks(
111
+ props,
112
+ stickerList,
113
+ stickerSet,
114
+ activeStickerSetName,
115
+ setStickerList,
116
+ setStickerSet,
117
+ setActiveStickerList,
118
+ setActiveStickerSetName,
119
+ setDecoratorMessage,
120
+ decoratorMessage,
121
+ );
122
+
123
+ return (
124
+ <View
125
+ style={Styles.stickerWrapperStyle}
126
+ >
127
+ {activeStickerList?.length > 0 ?
128
+ <ScrollView
129
+ style={Styles.stickerSectionListStyle}
130
+ horizontal
131
+ >
132
+ {getStickerCategory()}
133
+ </ScrollView>
134
+ : getDecoratorMessage()}
135
+ <ScrollView contentContainerStyle={Styles.stickerListStyle}>
136
+ {getStickerList()}
137
+ </ScrollView>
138
+ </View>
139
+ );
140
+ };
141
+
142
+ // Specifies the default values for props:
143
+ CometChatStickerKeyboard.defaultProps = {
144
+ emptyText: localize("NO_STICKERS_FOUND"),
145
+ errorText: localize("SOMETHING_WRONG"),
146
+ loadingText: localize("LOADING"),
147
+ style: {
148
+ width: "100%",
149
+ height: Dimensions.get("screen").height * 0.5,
150
+ borderRadius: 8,
151
+ },
152
+ };
@@ -0,0 +1,20 @@
1
+ import { StickerKeyboardStyle, StickerKeyboardStyleInterface } from "./StickerKeyboardStyle";
2
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
3
+
4
+ /**
5
+ * @class StickerKeyboardConfiguration
6
+ * @description StickerKeyboardConfiguration class is used for defining the StickerKeyboard templates.
7
+ * @param {Function} onPress
8
+ * @param {Object} style
9
+ */
10
+
11
+ class StickerKeyboardConfiguration {
12
+ onPress: (item: CometChat.CustomMessage) => void
13
+ style: StickerKeyboardStyleInterface
14
+ constructor({ onPress = null, style = new StickerKeyboardStyle({}) }) {
15
+ this.onPress = onPress;
16
+ this.style = new StickerKeyboardStyle(style ?? {});
17
+ }
18
+ }
19
+
20
+ export { StickerKeyboardConfiguration };
@@ -0,0 +1,52 @@
1
+ import { BaseStyle, BaseStyleInterface, BorderStyle, FontStyle, FontStyleInterface } from "../../../shared/base";
2
+
3
+ export interface StickerKeyboardStyleInterface extends BaseStyleInterface {
4
+ categoryBackground?: string;
5
+ emptyTextFont?: FontStyleInterface;
6
+ emptyTextColor?: string;
7
+ errorTextFont?: FontStyleInterface;
8
+ errorTextColor?: string;
9
+ loadingTextFont?: FontStyleInterface;
10
+ loadingTextColor?: string;
11
+ }
12
+
13
+ export class StickerKeyboardStyle extends BaseStyle {
14
+ categoryBackground: string;
15
+ emptyTextFont: FontStyleInterface;
16
+ emptyTextColor: string;
17
+ errorTextFont: FontStyleInterface;
18
+ errorTextColor: string;
19
+ loadingTextFont: FontStyleInterface;
20
+ loadingTextColor: string;
21
+
22
+ constructor({
23
+ categoryBackground = "",
24
+ emptyTextFont = new FontStyle({}),
25
+ emptyTextColor = "",
26
+ errorTextFont = new FontStyle({}),
27
+ errorTextColor = "",
28
+ loadingTextFont = new FontStyle({}),
29
+ loadingTextColor = "",
30
+ width = "100%",
31
+ height = "auto",
32
+ backgroundColor = "",
33
+ border = new BorderStyle({}),
34
+ borderRadius = 8,
35
+ }: StickerKeyboardStyleInterface) {
36
+ super({
37
+ width,
38
+ height,
39
+ backgroundColor,
40
+ border,
41
+ borderRadius,
42
+ });
43
+
44
+ this.categoryBackground = categoryBackground;
45
+ this.emptyTextFont = new FontStyle(emptyTextFont ?? {});
46
+ this.emptyTextColor = emptyTextColor;
47
+ this.errorTextFont = new FontStyle(errorTextFont ?? {});
48
+ this.errorTextColor = errorTextColor;
49
+ this.loadingTextFont = new FontStyle(loadingTextFont ?? {});
50
+ this.loadingTextColor = loadingTextColor;
51
+ }
52
+ }
@@ -0,0 +1,93 @@
1
+ import React from "react";
2
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
3
+ import { ExtensionConstants, ExtensionURLs } from "../../ExtensionConstants";
4
+ import { CometChatUIEventHandler } from "../../../shared/events/CometChatUIEventHandler/CometChatUIEventHandler";
5
+ import { localize } from "../../../shared/resources/CometChatLocalize";
6
+ import { MessageEvents } from "../../../shared/events";
7
+
8
+ export const Hooks = (
9
+ props,
10
+ stickerList,
11
+ stickerSet,
12
+ activeStickerSetName,
13
+ setStickerList,
14
+ setStickerSet,
15
+ setActiveStickerList,
16
+ setActiveStickerSetName,
17
+ setDecoratorMessage,
18
+ decoratorMessage
19
+ ) => {
20
+ React.useEffect(() => {
21
+ CometChat.callExtension(
22
+ ExtensionConstants.stickers,
23
+ "GET",
24
+ ExtensionURLs.stickers,
25
+ // ExtensionURLs.stickers,
26
+ null
27
+ )
28
+ .then((stickers) => {
29
+ // Stickers received
30
+ const customStickers = stickers.hasOwnProperty(
31
+ ExtensionConstants.customStickers
32
+ )
33
+ ? stickers[ExtensionConstants.customStickers]
34
+ : [];
35
+ const defaultStickers = stickers.hasOwnProperty(
36
+ ExtensionConstants.defaultStickers
37
+ )
38
+ ? stickers[ExtensionConstants.defaultStickers]
39
+ : [];
40
+
41
+ defaultStickers.sort(function (a, b) {
42
+ return a.stickerSetOrder - b.stickerSetOrder;
43
+ });
44
+
45
+ customStickers.sort(function (a, b) {
46
+ return a.stickerSetOrder - b.stickerSetOrder;
47
+ });
48
+
49
+ setStickerList([...defaultStickers, ...customStickers]);
50
+
51
+ if (stickerList?.length === 0 && !(decoratorMessage === props?.loadingText || localize("NO_STICKERS_FOUND"))) {
52
+ setDecoratorMessage(props?.emptyText || localize("NO_STICKERS_FOUND"));
53
+ }
54
+ })
55
+
56
+ .catch((error) => {
57
+ console.log(error);
58
+ setDecoratorMessage(props?.errorText || localize("SOMETHING_WRONG"));
59
+ CometChatUIEventHandler.emitMessageEvent(
60
+ MessageEvents.ccMessageError,
61
+ error
62
+ );
63
+ });
64
+ }, []);
65
+
66
+ React.useEffect(() => {
67
+ const stickerSet = stickerList?.reduce((r, sticker, index) => {
68
+ const { stickerSetName } = sticker;
69
+
70
+ if (index === 0) {
71
+ setActiveStickerSetName(stickerSetName);
72
+ }
73
+
74
+ r[stickerSetName] = [...(r[stickerSetName] || []), { ...sticker }];
75
+
76
+ return r;
77
+ }, {});
78
+ setStickerSet(stickerSet);
79
+ }, [stickerList]);
80
+
81
+ React.useEffect(() => {
82
+ if (stickerSet && Object.keys(stickerSet).length) {
83
+ let activeStickerList = [];
84
+ Object.keys(stickerSet).forEach((key) => {
85
+ stickerSet[key].sort(function (a, b) {
86
+ return a.stickerOrder - b.stickerOrder;
87
+ });
88
+ });
89
+ activeStickerList = stickerSet[activeStickerSetName];
90
+ setActiveStickerList(activeStickerList);
91
+ }
92
+ }, [stickerSet]);
93
+ };
@@ -0,0 +1,5 @@
1
+ import { CometChatStickerKeyboard } from "./CometChatStickerKeyboard";
2
+ import { StickerKeyboardConfiguration } from './StickerKeyboardConfiguration';
3
+ import { StickerKeyboardStyle } from "./StickerKeyboardStyle";
4
+
5
+ export { CometChatStickerKeyboard, StickerKeyboardConfiguration, StickerKeyboardStyle }
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5 19L19 5" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M5 5L19 19" stroke="#808080" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,55 @@
1
+ import { StyleSheet } from "react-native";
2
+ // import { localize } from "../../shared";
3
+
4
+ export const Styles = StyleSheet.create({
5
+ stickerWrapperStyle: {
6
+ padding: 0,
7
+ borderTopRightRadius: 12,
8
+ borderTopLeftRadius: 12,
9
+ },
10
+ stickerSectionListStyle: {
11
+ shadowColor: '#000',
12
+ shadowOffset: { width: 0, height: 2 },
13
+ shadowOpacity: 0.5,
14
+ shadowRadius: 2,
15
+ elevation: 2,
16
+ },
17
+ sectionListItemStyle: {
18
+ flexShrink: 0,
19
+ padding: 8,
20
+ },
21
+ stickerListStyle: {
22
+ flexWrap: "wrap",
23
+ width: "100%",
24
+ padding: 0,
25
+ margin: 0,
26
+ justifyContent: "flex-start",
27
+ alignItems: "center",
28
+ flexDirection: "row",
29
+ },
30
+ stickerItemStyle: {
31
+ width: "20%",
32
+ height: 60,
33
+ margin: 8,
34
+ padding: 0,
35
+ },
36
+ stickerMsgStyle: {
37
+ overflow: "hidden",
38
+ width: "100%",
39
+ justifyContent: "center",
40
+ alignItems: "center",
41
+ top: "45%",
42
+ },
43
+ stickerMsgTxtStyle: {
44
+ margin: 0,
45
+ height: 30,
46
+ },
47
+ stickerImageStyle: {
48
+ width: "100%",
49
+ height: "100%",
50
+ },
51
+ stickerCategoryImageStyle: {
52
+ width: 24,
53
+ height: 24,
54
+ }
55
+ })
@@ -0,0 +1,17 @@
1
+ import { StickerStyle, StickerStyleInterface } from './StickerStyle';
2
+
3
+ export interface StickerConfigurationInterface {
4
+ style?: StickerStyleInterface;
5
+ }
6
+
7
+ export class StickerConfiguration implements StickerConfigurationInterface {
8
+ style?: StickerStyleInterface;
9
+
10
+ constructor({ style }: StickerConfigurationInterface) {
11
+ this.style = new StickerStyle({
12
+ height: 100,
13
+ width: 100,
14
+ ...style,
15
+ });
16
+ }
17
+ }
@@ -0,0 +1,15 @@
1
+ import { BaseStyle, BaseStyleInterface } from "../../shared/base";
2
+
3
+ export interface StickerStyleInterface extends BaseStyle {}
4
+
5
+ export class StickerStyle extends BaseStyle {
6
+ constructor({
7
+ height = 100,
8
+ width = 100,
9
+ }: BaseStyleInterface) {
10
+ super({
11
+ height,
12
+ width
13
+ });
14
+ }
15
+ }