@cometchat/chat-uikit-react-native 4.3.23 → 5.0.0-beta.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 (1181) hide show
  1. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  2. package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
  3. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/7.4/gc.properties +0 -0
  5. package/android/.gradle/vcs-1/gc.properties +0 -0
  6. package/android/.settings/org.eclipse.buildship.core.prefs +2 -0
  7. package/android/src/main/AndroidManifest.xml +0 -6
  8. package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +171 -27
  9. package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +31 -15
  10. package/ios/CometchatUiKit.mm +25 -25
  11. package/ios/FileManager.m +108 -4
  12. package/ios/SoundPlayer.m +32 -5
  13. package/package.json +13 -29
  14. package/react-native-cometchat-ui-kit.podspec +6 -6
  15. package/src/CometChatConversations/CometChatConversations.tsx +1376 -1263
  16. package/src/CometChatConversations/Skeleton.tsx +143 -0
  17. package/src/CometChatConversations/index.ts +7 -21
  18. package/src/CometChatConversations/resources/index.ts +22 -36
  19. package/src/CometChatConversations/style.ts +237 -62
  20. package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +844 -683
  21. package/src/CometChatGroupMembers/Skeleton.tsx +197 -0
  22. package/src/CometChatGroupMembers/index.ts +2 -8
  23. package/src/CometChatGroupMembers/resources/index.ts +3 -14
  24. package/src/CometChatGroupMembers/style.ts +532 -22
  25. package/src/CometChatGroups/CometChatGroups.tsx +417 -562
  26. package/src/CometChatGroups/GroupsStyle.ts +176 -109
  27. package/src/CometChatGroups/Skeleton.tsx +328 -0
  28. package/src/CometChatGroups/index.ts +3 -11
  29. package/src/CometChatGroups/resources/index.ts +17 -24
  30. package/src/CometChatGroups/style.ts +15 -16
  31. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +585 -1044
  32. package/src/CometChatMessageComposer/index.ts +4 -8
  33. package/src/CometChatMessageComposer/resources/index.ts +21 -31
  34. package/src/CometChatMessageComposer/styles.tsx +152 -0
  35. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +315 -422
  36. package/src/CometChatMessageHeader/index.ts +3 -15
  37. package/src/CometChatMessageHeader/listners.ts +50 -26
  38. package/src/CometChatMessageHeader/styles.ts +57 -10
  39. package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +350 -295
  40. package/src/CometChatMessageInformation/Skeleton.tsx +143 -0
  41. package/src/CometChatMessageInformation/index.ts +5 -9
  42. package/src/CometChatMessageInformation/resources/index.ts +1 -4
  43. package/src/CometChatMessageInformation/styles.ts +147 -16
  44. package/src/CometChatMessageList/CometChatMessageList.tsx +2344 -2080
  45. package/src/CometChatMessageList/Skeleton.tsx +98 -0
  46. package/src/CometChatMessageList/index.ts +5 -12
  47. package/src/CometChatMessageList/resources/index.ts +13 -20
  48. package/src/CometChatMessageList/style.ts +989 -51
  49. package/src/CometChatThreadHeader/CometChatThreadHeader.tsx +208 -0
  50. package/src/CometChatThreadHeader/Header.tsx +47 -0
  51. package/src/CometChatThreadHeader/index.ts +8 -0
  52. package/src/CometChatThreadHeader/resources/index.ts +14 -0
  53. package/src/CometChatThreadHeader/style.ts +70 -0
  54. package/src/CometChatUsers/CometChatUsers.tsx +276 -114
  55. package/src/CometChatUsers/Skeleton.tsx +195 -0
  56. package/src/CometChatUsers/index.ts +3 -11
  57. package/src/CometChatUsers/style.ts +181 -0
  58. package/src/calls/CallEvents.ts +9 -9
  59. package/src/calls/CallUtils.ts +102 -31
  60. package/src/calls/CallingConfiguration.ts +22 -4
  61. package/src/calls/CallingExtension.tsx +43 -40
  62. package/src/calls/CallingExtensionDecorator.tsx +416 -0
  63. package/src/calls/CallingPackage.ts +11 -12
  64. package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +121 -52
  65. package/src/calls/CometChatCallBubble/index.ts +8 -13
  66. package/src/calls/CometChatCallBubble/resources/index.ts +1 -8
  67. package/src/calls/CometChatCallBubble/styles.ts +155 -22
  68. package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +17 -36
  69. package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +319 -323
  70. package/src/calls/CometChatCallButtons/index.ts +9 -11
  71. package/src/calls/CometChatCallButtons/style.ts +34 -12
  72. package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +429 -377
  73. package/src/calls/CometChatCallLogs/Skeleton.tsx +143 -0
  74. package/src/calls/CometChatCallLogs/index.ts +4 -15
  75. package/src/calls/CometChatCallLogs/resources/index.ts +20 -31
  76. package/src/calls/CometChatCallLogs/style.ts +169 -22
  77. package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +279 -217
  78. package/src/calls/CometChatIncomingCall/index.ts +7 -9
  79. package/src/calls/CometChatIncomingCall/resources/index.ts +3 -12
  80. package/src/calls/CometChatIncomingCall/style.ts +75 -0
  81. package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +74 -56
  82. package/src/calls/CometChatOngoingCall/index.ts +3 -7
  83. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +207 -171
  84. package/src/calls/CometChatOutgoingCall/OutgoingCallConfiguration.ts +31 -31
  85. package/src/calls/CometChatOutgoingCall/index.ts +5 -11
  86. package/src/calls/CometChatOutgoingCall/resources/index.ts +1 -4
  87. package/src/calls/CometChatOutgoingCall/styles.ts +58 -0
  88. package/src/calls/index.ts +14 -88
  89. package/src/calls/resources/index.ts +1 -8
  90. package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +72 -96
  91. package/src/extensions/CollaborativeBubble/resources/index.ts +2 -4
  92. package/src/extensions/CollaborativeBubble/style.ts +112 -0
  93. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtension.tsx +21 -35
  94. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +220 -189
  95. package/src/extensions/CollaborativeDocument/index.ts +2 -8
  96. package/src/extensions/CollaborativeDocument/resources/index.ts +4 -6
  97. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.tsx +25 -35
  98. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +298 -199
  99. package/src/extensions/CollaborativeWhiteboard/index.ts +2 -8
  100. package/src/extensions/CollaborativeWhiteboard/resources/index.ts +4 -6
  101. package/src/extensions/ExtensionConstants.tsx +3 -4
  102. package/src/extensions/ExtensionModerator.tsx +47 -47
  103. package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +187 -116
  104. package/src/extensions/LinkPreview/LinkPreviewExtension.tsx +22 -0
  105. package/src/extensions/LinkPreview/LinkPreviewExtensionDecorator.tsx +94 -0
  106. package/src/extensions/LinkPreview/index.ts +6 -16
  107. package/src/extensions/LinkPreview/resources/index.ts +1 -4
  108. package/src/extensions/LinkPreview/style.ts +100 -0
  109. package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +112 -116
  110. package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +235 -152
  111. package/src/extensions/MessageTranslation/MessageTranslationExtension.tsx +7 -25
  112. package/src/extensions/MessageTranslation/index.ts +3 -5
  113. package/src/extensions/MessageTranslation/resources/index.ts +2 -3
  114. package/src/extensions/Polls/Header.tsx +56 -21
  115. package/src/extensions/Polls/Polls.tsx +368 -332
  116. package/src/extensions/Polls/PollsBubble.tsx +250 -205
  117. package/src/extensions/Polls/PollsConfigurations.ts +0 -9
  118. package/src/extensions/Polls/PollsDecorator.tsx +148 -77
  119. package/src/extensions/Polls/PollsExtension.tsx +5 -12
  120. package/src/extensions/Polls/index.ts +6 -8
  121. package/src/extensions/Polls/resources/index.ts +6 -12
  122. package/src/extensions/Polls/style.ts +185 -1
  123. package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +249 -115
  124. package/src/extensions/Stickers/CometChatStickerKeyboard/Skeleton.tsx +167 -0
  125. package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +2 -6
  126. package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +58 -64
  127. package/src/extensions/Stickers/CometChatStickerKeyboard/index.ts +2 -3
  128. package/src/extensions/Stickers/CometChatStickerKeyboard/style.ts +67 -41
  129. package/src/extensions/Stickers/StickerConfiguration.ts +5 -9
  130. package/src/extensions/Stickers/StickersBubble.tsx +22 -46
  131. package/src/extensions/Stickers/StickersExtension.ts +5 -6
  132. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +290 -104
  133. package/src/extensions/Stickers/index.ts +7 -9
  134. package/src/extensions/Stickers/resources/index.ts +1 -4
  135. package/src/extensions/Stickers/style.ts +53 -0
  136. package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +83 -64
  137. package/src/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.tsx +5 -25
  138. package/src/extensions/ThumbnailGeneration/index.ts +1 -3
  139. package/src/extensions/ThumbnailGeneration/resources/index.ts +1 -4
  140. package/src/extensions/index.ts +11 -50
  141. package/src/index.ts +193 -670
  142. package/src/shared/CometChatUiKit/CometChatUIKit.ts +342 -491
  143. package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +147 -117
  144. package/src/shared/CometChatUiKit/UIKitSettings.ts +38 -38
  145. package/src/shared/CometChatUiKit/index.ts +2 -6
  146. package/src/shared/assets/images/index.ts +13 -29
  147. package/src/shared/base/BaseStyle.ts +9 -8
  148. package/src/shared/base/BorderStyle.ts +4 -4
  149. package/src/shared/base/FontStyle.ts +25 -3
  150. package/src/shared/base/ShadowStyle.ts +1 -1
  151. package/src/shared/base/Types.ts +16 -22
  152. package/src/shared/base/index.ts +7 -25
  153. package/src/shared/base/vars.ts +5 -5
  154. package/src/shared/constants/UIKitConstants.ts +322 -294
  155. package/src/shared/events/CometChatMessageEvents/index.ts +83 -87
  156. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +260 -238
  157. package/src/shared/events/CometChatUIEventHandler/Listener.ts +412 -377
  158. package/src/shared/events/CometChatUIEvents.ts +15 -16
  159. package/src/shared/events/ListenerInitializer.ts +79 -80
  160. package/src/shared/events/conversations.ts +2 -2
  161. package/src/shared/events/groups.ts +8 -8
  162. package/src/shared/events/index.ts +6 -6
  163. package/src/shared/events/messages.ts +26 -29
  164. package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +191 -121
  165. package/src/shared/formatters/CometChatMentionsFormatter/MentionTextStyle.ts +3 -3
  166. package/src/shared/formatters/CometChatMentionsFormatter/index.ts +3 -6
  167. package/src/shared/formatters/CometChatTextFormatter.ts +15 -14
  168. package/src/shared/formatters/CometChatUrlsFormatter/index.tsx +127 -131
  169. package/src/shared/formatters/index.ts +7 -8
  170. package/src/shared/framework/ChatConfigurator.ts +3 -4
  171. package/src/shared/framework/DataSource.ts +181 -92
  172. package/src/shared/framework/DataSourceDecorator.tsx +307 -233
  173. package/src/shared/framework/ExtensionsDataSource.tsx +8 -11
  174. package/src/shared/framework/MessageDataSource.tsx +1364 -867
  175. package/src/shared/framework/index.ts +8 -6
  176. package/src/shared/framework/resources/index.ts +37 -57
  177. package/src/shared/helper/Toast.tsx +20 -18
  178. package/src/shared/helper/dateHelper.ts +138 -0
  179. package/src/shared/helper/functions.js +1 -1
  180. package/src/shared/helper/helperFunctions.ts +71 -19
  181. package/src/shared/helper/types/index.ts +49 -15
  182. package/src/shared/helper/useKeyboard.tsx +12 -23
  183. package/src/shared/icons/Icon.tsx +73 -0
  184. package/src/shared/icons/components/ListItemCheck.tsx +18 -0
  185. package/src/shared/icons/components/StickerBase-icon.tsx +16 -0
  186. package/src/shared/icons/components/account-circle-fill.tsx +26 -0
  187. package/src/shared/icons/components/account-circle.tsx +11 -0
  188. package/src/shared/icons/components/activity.tsx +20 -0
  189. package/src/shared/icons/components/add-a-photo-fill.tsx +26 -0
  190. package/src/shared/icons/components/add-a-photo.tsx +11 -0
  191. package/src/shared/icons/components/add-box-fill.tsx +26 -0
  192. package/src/shared/icons/components/add-box.tsx +11 -0
  193. package/src/shared/icons/components/add-call-fill.tsx +26 -0
  194. package/src/shared/icons/components/add-call.tsx +11 -0
  195. package/src/shared/icons/components/add-circle-fill.tsx +11 -0
  196. package/src/shared/icons/components/add-circle.tsx +11 -0
  197. package/src/shared/icons/components/add-comment-fill.tsx +26 -0
  198. package/src/shared/icons/components/add-comment.tsx +11 -0
  199. package/src/shared/icons/components/add-fill.tsx +26 -0
  200. package/src/shared/icons/components/add-reaction-fill.tsx +26 -0
  201. package/src/shared/icons/components/add-reaction.tsx +11 -0
  202. package/src/shared/icons/components/add.tsx +11 -0
  203. package/src/shared/icons/components/ai-conversation-summary-fill.tsx +13 -0
  204. package/src/shared/icons/components/ai-conversation-summary.tsx +13 -0
  205. package/src/shared/icons/components/ai-fill.tsx +11 -0
  206. package/src/shared/icons/components/ai-suggest-reply-fill.tsx +13 -0
  207. package/src/shared/icons/components/ai-suggest-reply.tsx +20 -0
  208. package/src/shared/icons/components/ai.tsx +12 -0
  209. package/src/shared/icons/components/alternate-email-fill.tsx +26 -0
  210. package/src/shared/icons/components/alternate-email.tsx +11 -0
  211. package/src/shared/icons/components/animals-&-nature.tsx +18 -0
  212. package/src/shared/icons/components/archive-fill.tsx +26 -0
  213. package/src/shared/icons/components/archive.tsx +11 -0
  214. package/src/shared/icons/components/arrow-back-fill.tsx +26 -0
  215. package/src/shared/icons/components/arrow-back.tsx +11 -0
  216. package/src/shared/icons/components/arrow-forward-fill.tsx +26 -0
  217. package/src/shared/icons/components/arrow-forward.tsx +11 -0
  218. package/src/shared/icons/components/attach-file-fill.tsx +26 -0
  219. package/src/shared/icons/components/attach-file.tsx +11 -0
  220. package/src/shared/icons/components/audio-file-type.tsx +36 -0
  221. package/src/shared/icons/components/bar-chart-fill.tsx +11 -0
  222. package/src/shared/icons/components/bar-chart.tsx +11 -0
  223. package/src/shared/icons/components/base-icon.tsx +16 -0
  224. package/src/shared/icons/components/bedtime-fill.tsx +26 -0
  225. package/src/shared/icons/components/bedtime.tsx +11 -0
  226. package/src/shared/icons/components/block-fill.tsx +26 -0
  227. package/src/shared/icons/components/block.tsx +11 -0
  228. package/src/shared/icons/components/bookmark-add-fill.tsx +26 -0
  229. package/src/shared/icons/components/bookmark-add.tsx +11 -0
  230. package/src/shared/icons/components/bookmark-fill.tsx +26 -0
  231. package/src/shared/icons/components/bookmark.tsx +11 -0
  232. package/src/shared/icons/components/calendar-add-on-fill.tsx +26 -0
  233. package/src/shared/icons/components/calendar-add-on.tsx +11 -0
  234. package/src/shared/icons/components/calendar-today-fill.tsx +26 -0
  235. package/src/shared/icons/components/calendar-today.tsx +11 -0
  236. package/src/shared/icons/components/call-end-fill.tsx +26 -0
  237. package/src/shared/icons/components/call-end.tsx +11 -0
  238. package/src/shared/icons/components/call-fill.tsx +26 -0
  239. package/src/shared/icons/components/call-log-fill.tsx +26 -0
  240. package/src/shared/icons/components/call-log.tsx +11 -0
  241. package/src/shared/icons/components/call-made-fill.tsx +26 -0
  242. package/src/shared/icons/components/call-made.tsx +11 -0
  243. package/src/shared/icons/components/call-missed-fill.tsx +26 -0
  244. package/src/shared/icons/components/call-missed-outgoing-fill.tsx +26 -0
  245. package/src/shared/icons/components/call-missed-outgoing.tsx +11 -0
  246. package/src/shared/icons/components/call-missed.tsx +11 -0
  247. package/src/shared/icons/components/call-received-fill.tsx +26 -0
  248. package/src/shared/icons/components/call-received.tsx +11 -0
  249. package/src/shared/icons/components/call.tsx +11 -0
  250. package/src/shared/icons/components/cancel-fill.tsx +26 -0
  251. package/src/shared/icons/components/cancel.tsx +11 -0
  252. package/src/shared/icons/components/change-circle-fill.tsx +11 -0
  253. package/src/shared/icons/components/change-circle.tsx +11 -0
  254. package/src/shared/icons/components/chat-bot-fill.tsx +13 -0
  255. package/src/shared/icons/components/chat-bot.tsx +17 -0
  256. package/src/shared/icons/components/chat-fill.tsx +26 -0
  257. package/src/shared/icons/components/chat.tsx +11 -0
  258. package/src/shared/icons/components/check-circle-fill.tsx +11 -0
  259. package/src/shared/icons/components/check-circle.tsx +11 -0
  260. package/src/shared/icons/components/check-fill.tsx +26 -0
  261. package/src/shared/icons/components/check.tsx +11 -0
  262. package/src/shared/icons/components/chevron-left-fill.tsx +26 -0
  263. package/src/shared/icons/components/chevron-left.tsx +11 -0
  264. package/src/shared/icons/components/chevron-right-fill.tsx +26 -0
  265. package/src/shared/icons/components/chevron-right.tsx +11 -0
  266. package/src/shared/icons/components/close-fill.tsx +26 -0
  267. package/src/shared/icons/components/close.tsx +11 -0
  268. package/src/shared/icons/components/collaborative-document-fill.tsx +17 -0
  269. package/src/shared/icons/components/collaborative-document-icon.tsx +11 -0
  270. package/src/shared/icons/components/collaborative-document.tsx +13 -0
  271. package/src/shared/icons/components/collaborative-whiteboard-fill.tsx +15 -0
  272. package/src/shared/icons/components/collaborative-whiteboard-icon.tsx +15 -0
  273. package/src/shared/icons/components/collaborative-whiteboard.tsx +12 -0
  274. package/src/shared/icons/components/content-copy-fill.tsx +26 -0
  275. package/src/shared/icons/components/content-copy.tsx +11 -0
  276. package/src/shared/icons/components/crop-fill.tsx +26 -0
  277. package/src/shared/icons/components/crop.tsx +11 -0
  278. package/src/shared/icons/components/delete-fill.tsx +26 -0
  279. package/src/shared/icons/components/delete.tsx +11 -0
  280. package/src/shared/icons/components/description-fill.tsx +26 -0
  281. package/src/shared/icons/components/description.tsx +11 -0
  282. package/src/shared/icons/components/document-file-type.tsx +38 -0
  283. package/src/shared/icons/components/done-all-fill.tsx +26 -0
  284. package/src/shared/icons/components/done-all.tsx +11 -0
  285. package/src/shared/icons/components/download-fill.tsx +26 -0
  286. package/src/shared/icons/components/download.tsx +11 -0
  287. package/src/shared/icons/components/edit-calendar-fill.tsx +26 -0
  288. package/src/shared/icons/components/edit-calendar.tsx +11 -0
  289. package/src/shared/icons/components/edit-fill.tsx +26 -0
  290. package/src/shared/icons/components/edit-square-fill.tsx +11 -0
  291. package/src/shared/icons/components/edit-square.tsx +11 -0
  292. package/src/shared/icons/components/edit.tsx +11 -0
  293. package/src/shared/icons/components/empty-state.tsx +82 -0
  294. package/src/shared/icons/components/error-fill.tsx +34 -0
  295. package/src/shared/icons/components/error-state.tsx +92 -0
  296. package/src/shared/icons/components/error.tsx +11 -0
  297. package/src/shared/icons/components/event-available-fill.tsx +11 -0
  298. package/src/shared/icons/components/event-available.tsx +11 -0
  299. package/src/shared/icons/components/event-fill.tsx +26 -0
  300. package/src/shared/icons/components/event.tsx +11 -0
  301. package/src/shared/icons/components/favorite-fill.tsx +26 -0
  302. package/src/shared/icons/components/favorite.tsx +11 -0
  303. package/src/shared/icons/components/filter-list-fill.tsx +26 -0
  304. package/src/shared/icons/components/filter-list-off-fill.tsx +26 -0
  305. package/src/shared/icons/components/filter-list-off.tsx +11 -0
  306. package/src/shared/icons/components/filter-list.tsx +11 -0
  307. package/src/shared/icons/components/flags.tsx +13 -0
  308. package/src/shared/icons/components/flip-camera-ios-fill.tsx +26 -0
  309. package/src/shared/icons/components/flip-camera-ios.tsx +11 -0
  310. package/src/shared/icons/components/food-&-drink.tsx +18 -0
  311. package/src/shared/icons/components/forward-fill.tsx +26 -0
  312. package/src/shared/icons/components/forward.tsx +11 -0
  313. package/src/shared/icons/components/gif-fill.tsx +13 -0
  314. package/src/shared/icons/components/gif.tsx +12 -0
  315. package/src/shared/icons/components/graphic-eq-fill.tsx +11 -0
  316. package/src/shared/icons/components/graphic-eq.tsx +11 -0
  317. package/src/shared/icons/components/group-add.tsx +11 -0
  318. package/src/shared/icons/components/group-fill.tsx +26 -0
  319. package/src/shared/icons/components/group.tsx +11 -0
  320. package/src/shared/icons/components/help-fill.tsx +26 -0
  321. package/src/shared/icons/components/help.tsx +11 -0
  322. package/src/shared/icons/components/history-fill.tsx +26 -0
  323. package/src/shared/icons/components/history.tsx +11 -0
  324. package/src/shared/icons/components/image-file-type.tsx +35 -0
  325. package/src/shared/icons/components/incoming-audio-fill.tsx +11 -0
  326. package/src/shared/icons/components/incoming-audio.tsx +13 -0
  327. package/src/shared/icons/components/incoming-video-fill.tsx +28 -0
  328. package/src/shared/icons/components/incoming-video.tsx +15 -0
  329. package/src/shared/icons/components/info-fill.tsx +26 -0
  330. package/src/shared/icons/components/info.tsx +11 -0
  331. package/src/shared/icons/components/keep-fill.tsx +26 -0
  332. package/src/shared/icons/components/keep-off-fill.tsx +26 -0
  333. package/src/shared/icons/components/keep-off.tsx +11 -0
  334. package/src/shared/icons/components/keep.tsx +11 -0
  335. package/src/shared/icons/components/keyboard-arrow-down-fill.tsx +26 -0
  336. package/src/shared/icons/components/keyboard-arrow-down.tsx +11 -0
  337. package/src/shared/icons/components/keyboard-arrow-up-fill.tsx +26 -0
  338. package/src/shared/icons/components/keyboard-arrow-up.tsx +11 -0
  339. package/src/shared/icons/components/keyboard-fill.tsx +26 -0
  340. package/src/shared/icons/components/keyboard.tsx +11 -0
  341. package/src/shared/icons/components/language-fill.tsx +26 -0
  342. package/src/shared/icons/components/language.tsx +11 -0
  343. package/src/shared/icons/components/link-fill.tsx +26 -0
  344. package/src/shared/icons/components/link.tsx +11 -0
  345. package/src/shared/icons/components/loading-fill.tsx +12 -0
  346. package/src/shared/icons/components/loading.tsx +12 -0
  347. package/src/shared/icons/components/location-on-fill.tsx +26 -0
  348. package/src/shared/icons/components/location-on.tsx +11 -0
  349. package/src/shared/icons/components/lock-fill.tsx +26 -0
  350. package/src/shared/icons/components/lock-open-fill.tsx +26 -0
  351. package/src/shared/icons/components/lock-open.tsx +11 -0
  352. package/src/shared/icons/components/lock.tsx +11 -0
  353. package/src/shared/icons/components/logout-fill.tsx +11 -0
  354. package/src/shared/icons/components/logout.tsx +11 -0
  355. package/src/shared/icons/components/mail-fill.tsx +26 -0
  356. package/src/shared/icons/components/mail.tsx +11 -0
  357. package/src/shared/icons/components/mic-fill.tsx +26 -0
  358. package/src/shared/icons/components/mic-off-fill.tsx +26 -0
  359. package/src/shared/icons/components/mic-off.tsx +11 -0
  360. package/src/shared/icons/components/mic.tsx +11 -0
  361. package/src/shared/icons/components/missed-video-call-fill.tsx +26 -0
  362. package/src/shared/icons/components/missed-video-call.tsx +11 -0
  363. package/src/shared/icons/components/mood-fill.tsx +26 -0
  364. package/src/shared/icons/components/mood.tsx +11 -0
  365. package/src/shared/icons/components/more-vert-fill.tsx +26 -0
  366. package/src/shared/icons/components/more-vert.tsx +11 -0
  367. package/src/shared/icons/components/near-me-fill.tsx +11 -0
  368. package/src/shared/icons/components/near-me.tsx +11 -0
  369. package/src/shared/icons/components/no-photography-fill.tsx +26 -0
  370. package/src/shared/icons/components/no-photography.tsx +11 -0
  371. package/src/shared/icons/components/notifications-fill.tsx +26 -0
  372. package/src/shared/icons/components/notifications-off-fill.tsx +26 -0
  373. package/src/shared/icons/components/notifications-off.tsx +11 -0
  374. package/src/shared/icons/components/notifications.tsx +11 -0
  375. package/src/shared/icons/components/objects.tsx +20 -0
  376. package/src/shared/icons/components/outgoing-audio-fill.tsx +15 -0
  377. package/src/shared/icons/components/outgoing-audio.tsx +15 -0
  378. package/src/shared/icons/components/outgoing-video-fill.tsx +28 -0
  379. package/src/shared/icons/components/outgoing-video.tsx +15 -0
  380. package/src/shared/icons/components/pause-fill.tsx +26 -0
  381. package/src/shared/icons/components/pause.tsx +11 -0
  382. package/src/shared/icons/components/pdf-file-type.tsx +36 -0
  383. package/src/shared/icons/components/person-add-fill.tsx +26 -0
  384. package/src/shared/icons/components/person-add.tsx +11 -0
  385. package/src/shared/icons/components/person-fill.tsx +26 -0
  386. package/src/shared/icons/components/person-off.tsx +16 -0
  387. package/src/shared/icons/components/person.tsx +11 -0
  388. package/src/shared/icons/components/phone-in-talk-fill.tsx +26 -0
  389. package/src/shared/icons/components/phone-in-talk.tsx +11 -0
  390. package/src/shared/icons/components/phone-incoming-fill.tsx +11 -0
  391. package/src/shared/icons/components/phone-incoming.tsx +11 -0
  392. package/src/shared/icons/components/phone-missed-fill.tsx +26 -0
  393. package/src/shared/icons/components/phone-missed.tsx +11 -0
  394. package/src/shared/icons/components/phone-outgoing-fill.tsx +15 -0
  395. package/src/shared/icons/components/phone-outgoing.tsx +15 -0
  396. package/src/shared/icons/components/photo-camera-fill.tsx +26 -0
  397. package/src/shared/icons/components/photo-camera.tsx +11 -0
  398. package/src/shared/icons/components/photo-fill.tsx +26 -0
  399. package/src/shared/icons/components/photo.tsx +11 -0
  400. package/src/shared/icons/components/play-arrow-fill.tsx +26 -0
  401. package/src/shared/icons/components/play-arrow.tsx +11 -0
  402. package/src/shared/icons/components/play-circle-fill.tsx +26 -0
  403. package/src/shared/icons/components/play-circle.tsx +11 -0
  404. package/src/shared/icons/components/poll-Icon.tsx +10 -0
  405. package/src/shared/icons/components/poll-fill.tsx +11 -0
  406. package/src/shared/icons/components/poll.tsx +11 -0
  407. package/src/shared/icons/components/presentation-file-type.tsx +38 -0
  408. package/src/shared/icons/components/rearrange-fill.tsx +13 -0
  409. package/src/shared/icons/components/rearrange.tsx +13 -0
  410. package/src/shared/icons/components/refresh-fill.tsx +26 -0
  411. package/src/shared/icons/components/refresh.tsx +11 -0
  412. package/src/shared/icons/components/reply-all-fill.tsx +26 -0
  413. package/src/shared/icons/components/reply-all.tsx +11 -0
  414. package/src/shared/icons/components/reply-fill.tsx +26 -0
  415. package/src/shared/icons/components/reply.tsx +11 -0
  416. package/src/shared/icons/components/retry-fill.tsx +11 -0
  417. package/src/shared/icons/components/retry.tsx +11 -0
  418. package/src/shared/icons/components/schedule-fill.tsx +26 -0
  419. package/src/shared/icons/components/schedule.tsx +11 -0
  420. package/src/shared/icons/components/screen-share-fill.tsx +26 -0
  421. package/src/shared/icons/components/screen-share.tsx +11 -0
  422. package/src/shared/icons/components/search-fill.tsx +26 -0
  423. package/src/shared/icons/components/search.tsx +11 -0
  424. package/src/shared/icons/components/send-fill.tsx +26 -0
  425. package/src/shared/icons/components/send.tsx +11 -0
  426. package/src/shared/icons/components/settings-fill.tsx +26 -0
  427. package/src/shared/icons/components/settings.tsx +11 -0
  428. package/src/shared/icons/components/share-fill.tsx +26 -0
  429. package/src/shared/icons/components/share.tsx +11 -0
  430. package/src/shared/icons/components/shield-fill.tsx +11 -0
  431. package/src/shared/icons/components/shield.tsx +11 -0
  432. package/src/shared/icons/components/smileys-&-people.tsx +18 -0
  433. package/src/shared/icons/components/spreadsheet-file-type.tsx +38 -0
  434. package/src/shared/icons/components/star-fill.tsx +26 -0
  435. package/src/shared/icons/components/star.tsx +11 -0
  436. package/src/shared/icons/components/sticker-fill.tsx +12 -0
  437. package/src/shared/icons/components/sticker.tsx +11 -0
  438. package/src/shared/icons/components/stop-circle-fill.tsx +26 -0
  439. package/src/shared/icons/components/stop-circle.tsx +11 -0
  440. package/src/shared/icons/components/stop-fill.tsx +26 -0
  441. package/src/shared/icons/components/stop-screen-share-fill.tsx +26 -0
  442. package/src/shared/icons/components/stop-screen-share.tsx +11 -0
  443. package/src/shared/icons/components/stop.tsx +11 -0
  444. package/src/shared/icons/components/subdirectory-arrow-left-fill.tsx +26 -0
  445. package/src/shared/icons/components/subdirectory-arrow-left.tsx +11 -0
  446. package/src/shared/icons/components/subdirectory-arrow-right-fill.tsx +26 -0
  447. package/src/shared/icons/components/subdirectory-arrow-right.tsx +11 -0
  448. package/src/shared/icons/components/sunny-fill.tsx +26 -0
  449. package/src/shared/icons/components/sunny.tsx +11 -0
  450. package/src/shared/icons/components/symbols.tsx +15 -0
  451. package/src/shared/icons/components/text-file-type.tsx +35 -0
  452. package/src/shared/icons/components/thumb-down-fill.tsx +26 -0
  453. package/src/shared/icons/components/thumb-down.tsx +11 -0
  454. package/src/shared/icons/components/thumb-up-fill.tsx +26 -0
  455. package/src/shared/icons/components/thumb-up.tsx +11 -0
  456. package/src/shared/icons/components/translate-fill.tsx +11 -0
  457. package/src/shared/icons/components/translate.tsx +11 -0
  458. package/src/shared/icons/components/travel-&-places.tsx +18 -0
  459. package/src/shared/icons/components/unknown-file-type.tsx +38 -0
  460. package/src/shared/icons/components/upload-fill.tsx +11 -0
  461. package/src/shared/icons/components/upload.tsx +11 -0
  462. package/src/shared/icons/components/user-empty-icon.tsx +26 -0
  463. package/src/shared/icons/components/video-call-fill.tsx +26 -0
  464. package/src/shared/icons/components/video-call.tsx +11 -0
  465. package/src/shared/icons/components/video-file-type.tsx +38 -0
  466. package/src/shared/icons/components/videocam-fill.tsx +26 -0
  467. package/src/shared/icons/components/videocam-off-fill.tsx +26 -0
  468. package/src/shared/icons/components/videocam-off.tsx +11 -0
  469. package/src/shared/icons/components/videocam.tsx +11 -0
  470. package/src/shared/icons/components/visibility-off-fill.tsx +11 -0
  471. package/src/shared/icons/components/visibility-off.tsx +11 -0
  472. package/src/shared/icons/components/volume-down-fill.tsx +26 -0
  473. package/src/shared/icons/components/volume-down.tsx +11 -0
  474. package/src/shared/icons/components/volume-mute-fill.tsx +26 -0
  475. package/src/shared/icons/components/volume-mute.tsx +11 -0
  476. package/src/shared/icons/components/volume-off-fill.tsx +26 -0
  477. package/src/shared/icons/components/volume-off.tsx +11 -0
  478. package/src/shared/icons/components/volume-up-fill.tsx +26 -0
  479. package/src/shared/icons/components/volume-up.tsx +11 -0
  480. package/src/shared/icons/components/warning-fill.tsx +26 -0
  481. package/src/shared/icons/components/warning.tsx +11 -0
  482. package/src/shared/icons/components/wifi-fill.tsx +26 -0
  483. package/src/shared/icons/components/wifi.tsx +11 -0
  484. package/src/shared/icons/components/zip-file-type.tsx +38 -0
  485. package/src/shared/icons/components/zoom-in-map-fill.tsx +26 -0
  486. package/src/shared/icons/components/zoom-in-map.tsx +11 -0
  487. package/src/shared/icons/components/zoom-out-map-fill.tsx +26 -0
  488. package/src/shared/icons/components/zoom-out-map.tsx +11 -0
  489. package/src/shared/icons/icon-mapping.tsx +620 -0
  490. package/src/shared/index.ts +114 -333
  491. package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +0 -1
  492. package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +19 -26
  493. package/src/shared/libs/ImageZoom/helper.ts +11 -27
  494. package/src/shared/libs/ImageZoom/index.tsx +4 -7
  495. package/src/shared/libs/ImageZoom/types/index.ts +7 -17
  496. package/src/shared/libs/VideoPlayer/VideoResizeMode.js +1 -1
  497. package/src/shared/modals/CometChatMessageOption.ts +11 -8
  498. package/src/shared/modals/CometChatMessageTemplate.ts +180 -140
  499. package/src/shared/modals/index.ts +2 -57
  500. package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +153 -152
  501. package/src/shared/resources/CometChatLocalize/index.ts +2 -8
  502. package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +445 -315
  503. package/src/shared/resources/CometChatLocalize/resources/de/translation.json +445 -316
  504. package/src/shared/resources/CometChatLocalize/resources/en/translation.json +445 -315
  505. package/src/shared/resources/CometChatLocalize/resources/es/translation.json +445 -316
  506. package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +444 -316
  507. package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +445 -315
  508. package/src/shared/resources/CometChatLocalize/resources/hu/translation.json +444 -315
  509. package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +445 -316
  510. package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +445 -316
  511. package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +445 -316
  512. package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +445 -316
  513. package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +445 -316
  514. package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +445 -316
  515. package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +444 -316
  516. package/src/shared/resources/CometChatSoundManager/index.ts +1 -2
  517. package/src/shared/resources/index.ts +1 -9
  518. package/src/shared/utils/CometChatMessageHelper/index.ts +16 -14
  519. package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +50 -0
  520. package/src/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +1 -1
  521. package/src/shared/utils/CometChatMessagePreview/index.ts +1 -5
  522. package/src/shared/utils/CometChatMessagePreview/resources/index.ts +1 -4
  523. package/src/shared/utils/CometChatMessagePreview/style.ts +45 -0
  524. package/src/shared/utils/CommonUtils.ts +163 -172
  525. package/src/shared/utils/MessageUtils.tsx +326 -146
  526. package/src/shared/utils/NetworkUtils.tsx +32 -24
  527. package/src/shared/utils/PermissionUtil.ts +30 -30
  528. package/src/shared/utils/conversationUtils.ts +93 -86
  529. package/src/shared/utils/index.ts +4 -25
  530. package/src/shared/views/CometChatAICard/CometChatAICard.tsx +100 -66
  531. package/src/shared/views/CometChatAICard/resources/index.ts +2 -4
  532. package/src/shared/views/CometChatActionSheet/ActionItem.ts +12 -57
  533. package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +68 -249
  534. package/src/shared/views/CometChatActionSheet/hooks.ts +5 -3
  535. package/src/shared/views/CometChatActionSheet/index.ts +1 -4
  536. package/src/shared/views/CometChatActionSheet/resources/index.ts +5 -7
  537. package/src/shared/views/CometChatActionSheet/style.ts +2 -41
  538. package/src/shared/views/CometChatAudioBubble/AnimatedAudioWaves.tsx +131 -0
  539. package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +211 -189
  540. package/src/shared/views/CometChatAudioBubble/index.ts +10 -10
  541. package/src/shared/views/CometChatAudioBubble/resources/index.ts +2 -7
  542. package/src/shared/views/CometChatAudioBubble/style.ts +203 -27
  543. package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +26 -104
  544. package/src/shared/views/CometChatAvatar/index.ts +3 -9
  545. package/src/shared/views/CometChatAvatar/styles.ts +37 -24
  546. package/src/shared/views/CometChatBadge/CometChatBadge.tsx +27 -46
  547. package/src/shared/views/CometChatBadge/index.ts +4 -8
  548. package/src/shared/views/CometChatBadge/styles.ts +29 -16
  549. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +133 -152
  550. package/src/shared/views/CometChatBottomSheet/index.ts +2 -5
  551. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +104 -106
  552. package/src/shared/views/CometChatConfirmDialog/index.ts +2 -9
  553. package/src/shared/views/CometChatConfirmDialog/style.ts +121 -62
  554. package/src/shared/views/CometChatDate/CometChatDate.tsx +23 -157
  555. package/src/shared/views/CometChatDate/index.ts +4 -12
  556. package/src/shared/views/CometChatDate/styles.ts +36 -0
  557. package/src/shared/views/CometChatDateSeperator/CometChatDateSeparator.tsx +48 -0
  558. package/src/shared/views/CometChatDateSeperator/index.ts +6 -0
  559. package/src/shared/views/CometChatDateSeperator/styles.ts +52 -0
  560. package/src/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.tsx +42 -0
  561. package/src/shared/views/CometChatDeletedBubble/index.ts +5 -0
  562. package/src/shared/views/CometChatDeletedBubble/styles.ts +42 -0
  563. package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +284 -205
  564. package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +1 -1
  565. package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +1 -1
  566. package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +169 -1405
  567. package/src/shared/views/CometChatEmojiKeyboard/index.ts +1 -3
  568. package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +8 -16
  569. package/src/shared/views/CometChatEmojiKeyboard/style.ts +72 -61
  570. package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +203 -173
  571. package/src/shared/views/CometChatFileBubble/index.ts +10 -6
  572. package/src/shared/views/CometChatFileBubble/resources/index.ts +1 -6
  573. package/src/shared/views/CometChatFileBubble/style.ts +120 -47
  574. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +57 -251
  575. package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +154 -0
  576. package/src/shared/views/CometChatImageBubble/assets/index.ts +1 -5
  577. package/src/shared/views/CometChatImageBubble/index.ts +7 -9
  578. package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +28 -43
  579. package/src/shared/views/CometChatImageViewerModal/index.tsx +1 -1
  580. package/src/shared/views/CometChatImageViewerModal/resources/index.ts +1 -2
  581. package/src/shared/views/CometChatList/CometChatList.tsx +667 -700
  582. package/src/shared/views/CometChatList/Header.tsx +185 -110
  583. package/src/shared/views/CometChatList/index.ts +7 -4
  584. package/src/shared/views/CometChatList/resources/index.ts +4 -13
  585. package/src/shared/views/CometChatList/styles.ts +58 -44
  586. package/src/shared/views/CometChatListItem/CometChatListItem.tsx +132 -259
  587. package/src/shared/views/CometChatListItem/index.ts +3 -15
  588. package/src/shared/views/CometChatListItem/style.ts +25 -29
  589. package/src/shared/views/CometChatMediaRecorder/AnimatingMic.tsx +129 -0
  590. package/src/shared/views/CometChatMediaRecorder/CometChatAudioPlayer.tsx +115 -0
  591. package/src/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.tsx +233 -0
  592. package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +359 -284
  593. package/src/shared/views/CometChatMediaRecorder/Timer.tsx +83 -0
  594. package/src/shared/views/CometChatMediaRecorder/index.ts +4 -10
  595. package/src/shared/views/CometChatMediaRecorder/style.ts +69 -23
  596. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +111 -124
  597. package/src/shared/views/CometChatMessageBubble/index.ts +2 -5
  598. package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +44 -85
  599. package/src/shared/views/CometChatMessageInput/index.ts +10 -3
  600. package/src/shared/views/CometChatMessageInput/styles.ts +2 -2
  601. package/src/shared/views/CometChatPanel/CometChatPanel.tsx +51 -45
  602. package/src/shared/views/CometChatPanel/PanelStyle.tsx +36 -36
  603. package/src/shared/views/CometChatPanel/resources/index.ts +1 -4
  604. package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +51 -73
  605. package/src/shared/views/CometChatQuickReactions/QuickReactionsStyle.tsx +33 -33
  606. package/src/shared/views/CometChatQuickReactions/index.ts +4 -5
  607. package/src/shared/views/CometChatQuickReactions/resources/index.ts +1 -2
  608. package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +365 -311
  609. package/src/shared/views/CometChatReactionList/ReactionListStyle.tsx +152 -64
  610. package/src/shared/views/CometChatReactionList/Skeleton.tsx +143 -0
  611. package/src/shared/views/CometChatReactionList/index.ts +6 -5
  612. package/src/shared/views/CometChatReactionList/resources/index.ts +1 -4
  613. package/src/shared/views/CometChatReactions/CometChatReactions.tsx +103 -171
  614. package/src/shared/views/CometChatReactions/index.ts +7 -14
  615. package/src/shared/views/CometChatReactions/style.ts +193 -41
  616. package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +75 -76
  617. package/src/shared/views/CometChatReceipt/index.ts +4 -10
  618. package/src/shared/views/CometChatReceipt/resources/blue-double-tick-icon.png +0 -0
  619. package/src/shared/views/CometChatReceipt/resources/error.png +0 -0
  620. package/src/shared/views/CometChatReceipt/resources/grey-double-tick-icon.png +0 -0
  621. package/src/shared/views/CometChatReceipt/resources/grey-tick-icon.png +0 -0
  622. package/src/shared/views/CometChatReceipt/resources/index.ts +5 -10
  623. package/src/shared/views/CometChatReceipt/resources/sending.png +0 -0
  624. package/src/shared/views/CometChatReceipt/style.ts +50 -9
  625. package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +56 -59
  626. package/src/shared/views/CometChatStatusIndicator/index.ts +6 -22
  627. package/src/shared/views/CometChatStatusIndicator/private.png +0 -0
  628. package/src/shared/views/CometChatStatusIndicator/protected.png +0 -0
  629. package/src/shared/views/CometChatStatusIndicator/styles.ts +47 -15
  630. package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +74 -56
  631. package/src/shared/views/CometChatSuggestionList/Skeleton.tsx +185 -0
  632. package/src/shared/views/CometChatSuggestionList/SuggestionItem.ts +44 -46
  633. package/src/shared/views/CometChatSuggestionList/index.ts +3 -7
  634. package/src/shared/views/CometChatSuggestionList/style.ts +69 -0
  635. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +46 -101
  636. package/src/shared/views/CometChatTextBubble/index.ts +8 -7
  637. package/src/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.tsx +166 -0
  638. package/src/shared/views/CometChatTooltipMenu/index.ts +3 -0
  639. package/src/shared/views/CometChatTooltipMenu/styles.ts +24 -0
  640. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +155 -195
  641. package/src/shared/views/CometChatVideoBubble/index.ts +7 -9
  642. package/src/shared/views/CometChatVideoBubble/resources/index.ts +2 -7
  643. package/src/shared/views/CometChatVideoBubble/style.ts +101 -5
  644. package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +135 -90
  645. package/src/shared/views/CometChatVideoPlayer/index.tsx +1 -1
  646. package/src/shared/views/ErrorEmptyView/ErrorEmptyView.tsx +47 -0
  647. package/src/shared/views/index.ts +72 -214
  648. package/src/theme/CometChatThemeHelper.ts +427 -0
  649. package/src/theme/context.ts +20 -0
  650. package/src/theme/default/color/dark.ts +99 -0
  651. package/src/theme/default/color/light.ts +105 -0
  652. package/src/theme/default/index.ts +242 -0
  653. package/src/theme/default/resources/icons/Base_Icon.png +0 -0
  654. package/src/theme/default/resources/icons/collaborative_document_1x.png +0 -0
  655. package/src/theme/default/resources/icons/collaborative_document_2x.png +0 -0
  656. package/src/theme/default/resources/icons/collaborative_document_3x.png +0 -0
  657. package/src/theme/default/resources/icons/collaborative_whiteboard_1x.png +0 -0
  658. package/src/theme/default/resources/icons/collaborative_whiteboard_2x.png +0 -0
  659. package/src/theme/default/resources/icons/collaborative_whiteboard_3x.png +0 -0
  660. package/src/theme/default/resources/icons/dark_error_icon.png +0 -0
  661. package/src/theme/default/resources/icons/index.ts +19 -0
  662. package/src/theme/default/resources/icons/light_error_icon.png +0 -0
  663. package/src/theme/default/resources/icons/thread_replies.png +0 -0
  664. package/src/theme/default/spacing.ts +86 -0
  665. package/src/theme/default/typography.ts +184 -0
  666. package/src/theme/hook.ts +19 -0
  667. package/src/theme/index.ts +3 -0
  668. package/src/theme/provider.tsx +135 -0
  669. package/src/theme/type.ts +446 -0
  670. package/screenshots/logo.png +0 -0
  671. package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +0 -166
  672. package/src/AI/AIAssistBot/AIAssistBotExtension.tsx +0 -22
  673. package/src/AI/AIAssistBot/AIAssistBotStyle.ts +0 -43
  674. package/src/AI/AIAssistBot/AIAssistBotView.tsx +0 -297
  675. package/src/AI/AIAssistBot/configuration.ts +0 -23
  676. package/src/AI/AIAssistBot/resources/CloseIcon.png +0 -0
  677. package/src/AI/AIAssistBot/resources/index.ts +0 -6
  678. package/src/AI/AIBaseConfiguration.ts +0 -15
  679. package/src/AI/AIBaseStyle.ts +0 -58
  680. package/src/AI/AIConversationStarter/AIConversationStarter.ts +0 -19
  681. package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +0 -249
  682. package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +0 -14
  683. package/src/AI/AIConversationStarter/configuration.ts +0 -11
  684. package/src/AI/AIConversationStarter/style.ts +0 -74
  685. package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +0 -179
  686. package/src/AI/AIConversationSummary/AIConversationSummaryExtension.ts +0 -21
  687. package/src/AI/AIConversationSummary/AIConversationSummaryStyle.tsx +0 -20
  688. package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +0 -195
  689. package/src/AI/AIConversationSummary/configuration.ts +0 -14
  690. package/src/AI/AIConversationSummary/resources/index.ts +0 -6
  691. package/src/AI/AIExtensionDataSource.ts +0 -18
  692. package/src/AI/AIOptionsStyle.ts +0 -14
  693. package/src/AI/AISmartReplies/AISmartReplies.ts +0 -19
  694. package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +0 -306
  695. package/src/AI/AISmartReplies/AISmartRepliesStyle.ts +0 -16
  696. package/src/AI/AISmartReplies/configuration.ts +0 -12
  697. package/src/AI/CardView.tsx +0 -83
  698. package/src/AI/CardViewStyle.ts +0 -37
  699. package/src/AI/resources/ai-empty.png +0 -0
  700. package/src/AI/resources/ai-error.png +0 -0
  701. package/src/AI/resources/index.ts +0 -12
  702. package/src/AI/resources/spineer.png +0 -0
  703. package/src/AI/style.ts +0 -165
  704. package/src/AI/utils.ts +0 -39
  705. package/src/CometChatAddMembers/AddMembersConfiguration.tsx +0 -58
  706. package/src/CometChatAddMembers/CometChatAddMembers.tsx +0 -114
  707. package/src/CometChatAddMembers/index.ts +0 -10
  708. package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +0 -61
  709. package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +0 -148
  710. package/src/CometChatBannedMembers/index.ts +0 -13
  711. package/src/CometChatBannedMembers/resources/clear.png +0 -0
  712. package/src/CometChatBannedMembers/resources/index.ts +0 -4
  713. package/src/CometChatContacts/CometChatContacts.tsx +0 -229
  714. package/src/CometChatContacts/ContactsConfiguration.tsx +0 -69
  715. package/src/CometChatContacts/ContactsStyle.ts +0 -60
  716. package/src/CometChatContacts/Header.tsx +0 -167
  717. package/src/CometChatContacts/index.ts +0 -13
  718. package/src/CometChatContacts/styles.ts +0 -105
  719. package/src/CometChatConversations/ConversationsConfiguration.ts +0 -226
  720. package/src/CometChatConversations/ConversationsStyle.ts +0 -88
  721. package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +0 -232
  722. package/src/CometChatConversationsWithMessages/index.ts +0 -6
  723. package/src/CometChatConversationsWithMessages/resources/index.ts +0 -6
  724. package/src/CometChatConversationsWithMessages/resources/start.png +0 -0
  725. package/src/CometChatConversationsWithMessages/styles.ts +0 -15
  726. package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +0 -382
  727. package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +0 -36
  728. package/src/CometChatCreateGroup/Header.tsx +0 -60
  729. package/src/CometChatCreateGroup/index.ts +0 -15
  730. package/src/CometChatCreateGroup/resources/close.png +0 -0
  731. package/src/CometChatCreateGroup/resources/index.ts +0 -11
  732. package/src/CometChatCreateGroup/resources/rightTick.png +0 -0
  733. package/src/CometChatCreateGroup/resources/warning.png +0 -0
  734. package/src/CometChatCreateGroup/style.ts +0 -44
  735. package/src/CometChatDetails/CometChatDetails.tsx +0 -983
  736. package/src/CometChatDetails/DetailsConfiguration.tsx +0 -72
  737. package/src/CometChatDetails/Header.tsx +0 -42
  738. package/src/CometChatDetails/index.ts +0 -19
  739. package/src/CometChatDetails/listners.ts +0 -109
  740. package/src/CometChatDetails/resources/close.png +0 -0
  741. package/src/CometChatDetails/resources/index.ts +0 -17
  742. package/src/CometChatDetails/styles.ts +0 -23
  743. package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +0 -118
  744. package/src/CometChatGroupMembers/GroupMemberStyle.ts +0 -91
  745. package/src/CometChatGroupMembers/GroupScopeStyle.ts +0 -68
  746. package/src/CometChatGroups/GroupsConfiguration.ts +0 -93
  747. package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +0 -234
  748. package/src/CometChatGroupsWithMessages/index.ts +0 -6
  749. package/src/CometChatGroupsWithMessages/resources/index.ts +0 -5
  750. package/src/CometChatGroupsWithMessages/resources/write.png +0 -0
  751. package/src/CometChatGroupsWithMessages/styles.ts +0 -15
  752. package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +0 -268
  753. package/src/CometChatJoinProtectedGroup/Header.tsx +0 -52
  754. package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +0 -30
  755. package/src/CometChatJoinProtectedGroup/index.ts +0 -15
  756. package/src/CometChatJoinProtectedGroup/resources/close.png +0 -0
  757. package/src/CometChatJoinProtectedGroup/resources/index.ts +0 -8
  758. package/src/CometChatJoinProtectedGroup/resources/rightTick.png +0 -0
  759. package/src/CometChatJoinProtectedGroup/style.ts +0 -11
  760. package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +0 -96
  761. package/src/CometChatMessageComposer/styles.ts +0 -28
  762. package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +0 -62
  763. package/src/CometChatMessageHeader/resources/Back.png +0 -0
  764. package/src/CometChatMessageHeader/resources/index.ts +0 -11
  765. package/src/CometChatMessageHeader/resources/password.png +0 -0
  766. package/src/CometChatMessageHeader/resources/private.png +0 -0
  767. package/src/CometChatMessageInformation/MessageInformationConfiguration.tsx +0 -32
  768. package/src/CometChatMessageInformation/MessageInformationStyle.ts +0 -12
  769. package/src/CometChatMessageList/MessageListConfiguration.ts +0 -250
  770. package/src/CometChatMessageList/MessageListStyle.ts +0 -75
  771. package/src/CometChatMessages/CometChatMessages.tsx +0 -347
  772. package/src/CometChatMessages/MessageStyle.ts +0 -34
  773. package/src/CometChatMessages/MessagesConfiguration.ts +0 -55
  774. package/src/CometChatMessages/index.ts +0 -16
  775. package/src/CometChatMessages/resources/index.ts +0 -6
  776. package/src/CometChatMessages/resources/info.png +0 -0
  777. package/src/CometChatMessages/style.ts +0 -23
  778. package/src/CometChatTabs/CometChatTabs.tsx +0 -178
  779. package/src/CometChatTabs/CometChatTabsStyle.ts +0 -45
  780. package/src/CometChatTabs/TabItemStyle.ts +0 -55
  781. package/src/CometChatTabs/TabItems.ts +0 -11
  782. package/src/CometChatTabs/index.ts +0 -6
  783. package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +0 -345
  784. package/src/CometChatThreadedMessages/Header.tsx +0 -57
  785. package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +0 -45
  786. package/src/CometChatThreadedMessages/index.ts +0 -15
  787. package/src/CometChatThreadedMessages/resources/Back.png +0 -0
  788. package/src/CometChatThreadedMessages/resources/close.png +0 -0
  789. package/src/CometChatThreadedMessages/resources/index.ts +0 -20
  790. package/src/CometChatThreadedMessages/resources/password.png +0 -0
  791. package/src/CometChatThreadedMessages/resources/private.png +0 -0
  792. package/src/CometChatThreadedMessages/resources/right-arrow.png +0 -0
  793. package/src/CometChatThreadedMessages/style.ts +0 -29
  794. package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +0 -145
  795. package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +0 -60
  796. package/src/CometChatTransferOwnership/index.ts +0 -14
  797. package/src/CometChatUsers/UsersConfiguration.tsx +0 -59
  798. package/src/CometChatUsers/UsersStyle.ts +0 -101
  799. package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +0 -130
  800. package/src/CometChatUsersWithMessages/index.ts +0 -6
  801. package/src/CometChatUsersWithMessages/styles.ts +0 -15
  802. package/src/calls/CallingDetailsUtils.tsx +0 -158
  803. package/src/calls/CallingExtentionDecorator.tsx +0 -222
  804. package/src/calls/CometChatCallBubble/CallBubbleConfiguration.ts +0 -23
  805. package/src/calls/CometChatCallBubble/CallBubbleStyle.ts +0 -47
  806. package/src/calls/CometChatCallButtons/CallButtonStyle.ts +0 -35
  807. package/src/calls/CometChatCallButtons/resources/Call.png +0 -0
  808. package/src/calls/CometChatCallButtons/resources/Video.png +0 -0
  809. package/src/calls/CometChatCallButtons/resources/index.ts +0 -9
  810. package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +0 -118
  811. package/src/calls/CometChatCallLogDetails/CallLogDetailsStyle.ts +0 -36
  812. package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +0 -309
  813. package/src/calls/CometChatCallLogDetails/index.ts +0 -23
  814. package/src/calls/CometChatCallLogDetails/resources/CloseIcon.png +0 -0
  815. package/src/calls/CometChatCallLogDetails/resources/index.ts +0 -5
  816. package/src/calls/CometChatCallLogDetails/style.ts +0 -15
  817. package/src/calls/CometChatCallLogHistory/CallLogHistoryConfiguration.ts +0 -67
  818. package/src/calls/CometChatCallLogHistory/CallLogHistoryStyle.ts +0 -46
  819. package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +0 -350
  820. package/src/calls/CometChatCallLogHistory/index.ts +0 -23
  821. package/src/calls/CometChatCallLogHistory/resources/Back.png +0 -0
  822. package/src/calls/CometChatCallLogHistory/resources/Call.png +0 -0
  823. package/src/calls/CometChatCallLogHistory/resources/Info.png +0 -0
  824. package/src/calls/CometChatCallLogHistory/resources/Selection.png +0 -0
  825. package/src/calls/CometChatCallLogHistory/resources/Spineer.png +0 -0
  826. package/src/calls/CometChatCallLogHistory/resources/Video.png +0 -0
  827. package/src/calls/CometChatCallLogHistory/resources/check.png +0 -0
  828. package/src/calls/CometChatCallLogHistory/resources/incomingcall.png +0 -0
  829. package/src/calls/CometChatCallLogHistory/resources/incomingvideo.png +0 -0
  830. package/src/calls/CometChatCallLogHistory/resources/index.ts +0 -42
  831. package/src/calls/CometChatCallLogHistory/resources/missedcall.png +0 -0
  832. package/src/calls/CometChatCallLogHistory/resources/missedvideo.png +0 -0
  833. package/src/calls/CometChatCallLogHistory/resources/outgoingcall.png +0 -0
  834. package/src/calls/CometChatCallLogHistory/resources/outgoingvideo.png +0 -0
  835. package/src/calls/CometChatCallLogHistory/style.ts +0 -24
  836. package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +0 -63
  837. package/src/calls/CometChatCallLogParticipants/CallLogParticipantsStyle.ts +0 -59
  838. package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +0 -221
  839. package/src/calls/CometChatCallLogParticipants/index.ts +0 -23
  840. package/src/calls/CometChatCallLogParticipants/resources/Back.png +0 -0
  841. package/src/calls/CometChatCallLogParticipants/resources/index.ts +0 -5
  842. package/src/calls/CometChatCallLogParticipants/style.ts +0 -24
  843. package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +0 -65
  844. package/src/calls/CometChatCallLogRecordings/CallLogRecordingsStyle.ts +0 -63
  845. package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +0 -254
  846. package/src/calls/CometChatCallLogRecordings/index.ts +0 -23
  847. package/src/calls/CometChatCallLogRecordings/resources/Back.png +0 -0
  848. package/src/calls/CometChatCallLogRecordings/resources/download.png +0 -0
  849. package/src/calls/CometChatCallLogRecordings/resources/index.ts +0 -8
  850. package/src/calls/CometChatCallLogRecordings/style.ts +0 -24
  851. package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +0 -89
  852. package/src/calls/CometChatCallLogs/CallLogsStyle.ts +0 -95
  853. package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +0 -10
  854. package/src/calls/CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx +0 -56
  855. package/src/calls/CometChatCallLogsWithDetails/index.ts +0 -5
  856. package/src/calls/CometChatCallLogsWithDetails/style.ts +0 -11
  857. package/src/calls/CometChatIncomingCall/IncomingCallStyle.ts +0 -75
  858. package/src/calls/CometChatIncomingCall/styles.ts +0 -10
  859. package/src/calls/CometChatOngoingCall/OngoingCallStyle.ts +0 -25
  860. package/src/calls/CometChatOutgoingCall/OutgoingCallStyle.ts +0 -39
  861. package/src/extensions/CollaborativeBubble/CollaborativeBubbleStyle.ts +0 -97
  862. package/src/extensions/CollaborativeBubble/styles.ts +0 -82
  863. package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +0 -26
  864. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +0 -26
  865. package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +0 -82
  866. package/src/extensions/ImageModeration/ImageModerationExtension.tsx +0 -43
  867. package/src/extensions/ImageModeration/ImageModerationFilter.tsx +0 -145
  868. package/src/extensions/ImageModeration/index.ts +0 -18
  869. package/src/extensions/ImageModeration/resources/index.ts +0 -4
  870. package/src/extensions/ImageModeration/resources/unsafe.png +0 -0
  871. package/src/extensions/LinkPreview/LInkPreviewBubbleStyle.ts +0 -28
  872. package/src/extensions/LinkPreview/LinkPreviewConfiguration.ts +0 -27
  873. package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +0 -25
  874. package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +0 -55
  875. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +0 -144
  876. package/src/extensions/SmartReplies/SmartRepliesExtension.tsx +0 -52
  877. package/src/extensions/SmartReplies/SmartRepliesView.tsx +0 -213
  878. package/src/extensions/SmartReplies/index.ts +0 -7
  879. package/src/extensions/SmartReplies/resources/close.png +0 -0
  880. package/src/extensions/SmartReplies/resources/index.ts +0 -6
  881. package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardStyle.ts +0 -52
  882. package/src/extensions/Stickers/StickerStyle.ts +0 -15
  883. package/src/extensions/TextModeration/TextModerationConfiguration.tsx +0 -25
  884. package/src/extensions/TextModeration/TextModerationExtension.tsx +0 -51
  885. package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +0 -93
  886. package/src/extensions/TextModeration/index.ts +0 -6
  887. package/src/shared/CometChatContext.tsx +0 -43
  888. package/src/shared/helper/SwipeRow.js +0 -944
  889. package/src/shared/libs/CometChatCalendar/Calendars/BaseCalendar.tsx +0 -229
  890. package/src/shared/libs/CometChatCalendar/Calendars/DateSelectionCalendar.tsx +0 -90
  891. package/src/shared/libs/CometChatCalendar/Calendars/MultiDateSelectionCalendar.tsx +0 -108
  892. package/src/shared/libs/CometChatCalendar/Calendars/Providers.tsx +0 -27
  893. package/src/shared/libs/CometChatCalendar/Calendars/index.ts +0 -3
  894. package/src/shared/libs/CometChatCalendar/Components/Arrow.tsx +0 -46
  895. package/src/shared/libs/CometChatCalendar/Components/Day.tsx +0 -95
  896. package/src/shared/libs/CometChatCalendar/Components/Days.tsx +0 -110
  897. package/src/shared/libs/CometChatCalendar/Components/Month.tsx +0 -47
  898. package/src/shared/libs/CometChatCalendar/Components/Months.tsx +0 -79
  899. package/src/shared/libs/CometChatCalendar/Components/Title.tsx +0 -47
  900. package/src/shared/libs/CometChatCalendar/Components/Weekdays.tsx +0 -29
  901. package/src/shared/libs/CometChatCalendar/Components/index.ts +0 -7
  902. package/src/shared/libs/CometChatCalendar/Constants/View.ts +0 -4
  903. package/src/shared/libs/CometChatCalendar/Constants/index.ts +0 -1
  904. package/src/shared/libs/CometChatCalendar/Contexts/LocaleContext.tsx +0 -7
  905. package/src/shared/libs/CometChatCalendar/Contexts/ThemeContext.tsx +0 -7
  906. package/src/shared/libs/CometChatCalendar/Contexts/index.ts +0 -2
  907. package/src/shared/libs/CometChatCalendar/Entities/ArrowDirections.ts +0 -1
  908. package/src/shared/libs/CometChatCalendar/Entities/Calendar.ts +0 -26
  909. package/src/shared/libs/CometChatCalendar/Entities/Components.ts +0 -13
  910. package/src/shared/libs/CometChatCalendar/Entities/DateProperties.ts +0 -6
  911. package/src/shared/libs/CometChatCalendar/Entities/Locale.ts +0 -12
  912. package/src/shared/libs/CometChatCalendar/Entities/Theme.ts +0 -70
  913. package/src/shared/libs/CometChatCalendar/Entities/index.ts +0 -6
  914. package/src/shared/libs/CometChatCalendar/Hooks/index.ts +0 -1
  915. package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.ts +0 -63
  916. package/src/shared/libs/CometChatCalendar/Icons/BackArrow.png +0 -0
  917. package/src/shared/libs/CometChatCalendar/Icons/chevron-left-16.png +0 -0
  918. package/src/shared/libs/CometChatCalendar/Icons/index.ts +0 -7
  919. package/src/shared/libs/CometChatCalendar/Locales/index.ts +0 -4
  920. package/src/shared/libs/CometChatCalendar/Themes/Colors.ts +0 -31
  921. package/src/shared/libs/CometChatCalendar/Themes/DarkTheme.ts +0 -79
  922. package/src/shared/libs/CometChatCalendar/Themes/DefaultTheme.ts +0 -164
  923. package/src/shared/libs/CometChatCalendar/Themes/index.ts +0 -3
  924. package/src/shared/libs/CometChatCalendar/Utils/addOpacity.ts +0 -15
  925. package/src/shared/libs/CometChatCalendar/Utils/checkChangedProps.ts +0 -10
  926. package/src/shared/libs/CometChatCalendar/Utils/clamp.ts +0 -5
  927. package/src/shared/libs/CometChatCalendar/Utils/dateRange.ts +0 -23
  928. package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.ts +0 -25
  929. package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.ts +0 -20
  930. package/src/shared/libs/CometChatCalendar/Utils/index.ts +0 -6
  931. package/src/shared/libs/CometChatCalendar/index.ts +0 -5
  932. package/src/shared/libs/VideoPlayer/Video.js +0 -494
  933. package/src/shared/libs/VideoPlayerControls/OSSupport/PlatformSupport.tsx +0 -43
  934. package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +0 -17
  935. package/src/shared/libs/VideoPlayerControls/OSSupport/index.tsx +0 -1
  936. package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +0 -512
  937. package/src/shared/libs/VideoPlayerControls/assets/img/back.png +0 -0
  938. package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette.png +0 -0
  939. package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@2x.png +0 -0
  940. package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@3x.png +0 -0
  941. package/src/shared/libs/VideoPlayerControls/assets/img/error-icon.png +0 -0
  942. package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@2x.png +0 -0
  943. package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@3x.png +0 -0
  944. package/src/shared/libs/VideoPlayerControls/assets/img/expand.png +0 -0
  945. package/src/shared/libs/VideoPlayerControls/assets/img/expand@2x.png +0 -0
  946. package/src/shared/libs/VideoPlayerControls/assets/img/expand@3x.png +0 -0
  947. package/src/shared/libs/VideoPlayerControls/assets/img/forward.png +0 -0
  948. package/src/shared/libs/VideoPlayerControls/assets/img/forward@2x.png +0 -0
  949. package/src/shared/libs/VideoPlayerControls/assets/img/forward@3x.png +0 -0
  950. package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon.png +0 -0
  951. package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@2x.png +0 -0
  952. package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@3x.png +0 -0
  953. package/src/shared/libs/VideoPlayerControls/assets/img/pause.png +0 -0
  954. package/src/shared/libs/VideoPlayerControls/assets/img/pause@2x.png +0 -0
  955. package/src/shared/libs/VideoPlayerControls/assets/img/pause@3x.png +0 -0
  956. package/src/shared/libs/VideoPlayerControls/assets/img/play.png +0 -0
  957. package/src/shared/libs/VideoPlayerControls/assets/img/play@2x.png +0 -0
  958. package/src/shared/libs/VideoPlayerControls/assets/img/play@3x.png +0 -0
  959. package/src/shared/libs/VideoPlayerControls/assets/img/rewind.png +0 -0
  960. package/src/shared/libs/VideoPlayerControls/assets/img/rewind@2x.png +0 -0
  961. package/src/shared/libs/VideoPlayerControls/assets/img/rewind@3x.png +0 -0
  962. package/src/shared/libs/VideoPlayerControls/assets/img/shrink.png +0 -0
  963. package/src/shared/libs/VideoPlayerControls/assets/img/shrink@2x.png +0 -0
  964. package/src/shared/libs/VideoPlayerControls/assets/img/shrink@3x.png +0 -0
  965. package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette.png +0 -0
  966. package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@2x.png +0 -0
  967. package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@3x.png +0 -0
  968. package/src/shared/libs/VideoPlayerControls/assets/img/volume.png +0 -0
  969. package/src/shared/libs/VideoPlayerControls/assets/img/volume@2x.png +0 -0
  970. package/src/shared/libs/VideoPlayerControls/assets/img/volume@3x.png +0 -0
  971. package/src/shared/libs/VideoPlayerControls/components/Back/Back.tsx +0 -28
  972. package/src/shared/libs/VideoPlayerControls/components/Back/index.ts +0 -1
  973. package/src/shared/libs/VideoPlayerControls/components/BottomControls.tsx +0 -142
  974. package/src/shared/libs/VideoPlayerControls/components/Control.tsx +0 -45
  975. package/src/shared/libs/VideoPlayerControls/components/Error/Error.tsx +0 -22
  976. package/src/shared/libs/VideoPlayerControls/components/Error/index.ts +0 -1
  977. package/src/shared/libs/VideoPlayerControls/components/Error/styles.ts +0 -21
  978. package/src/shared/libs/VideoPlayerControls/components/Fullscreen.tsx +0 -36
  979. package/src/shared/libs/VideoPlayerControls/components/Loader/Loader.tsx +0 -15
  980. package/src/shared/libs/VideoPlayerControls/components/Loader/index.ts +0 -1
  981. package/src/shared/libs/VideoPlayerControls/components/Loader/styles.ts +0 -16
  982. package/src/shared/libs/VideoPlayerControls/components/NullControl.tsx +0 -7
  983. package/src/shared/libs/VideoPlayerControls/components/Overlay.tsx +0 -23
  984. package/src/shared/libs/VideoPlayerControls/components/PlayPause/PlayPause.tsx +0 -109
  985. package/src/shared/libs/VideoPlayerControls/components/PlayPause/index.ts +0 -1
  986. package/src/shared/libs/VideoPlayerControls/components/PlayPause/styles.ts +0 -21
  987. package/src/shared/libs/VideoPlayerControls/components/Seekbar/Seekbar.tsx +0 -47
  988. package/src/shared/libs/VideoPlayerControls/components/Seekbar/index.ts +0 -1
  989. package/src/shared/libs/VideoPlayerControls/components/Seekbar/styles.ts +0 -37
  990. package/src/shared/libs/VideoPlayerControls/components/Timer/Timer.tsx +0 -28
  991. package/src/shared/libs/VideoPlayerControls/components/Timer/index.ts +0 -1
  992. package/src/shared/libs/VideoPlayerControls/components/Timer/styles.ts +0 -12
  993. package/src/shared/libs/VideoPlayerControls/components/Title.tsx +0 -35
  994. package/src/shared/libs/VideoPlayerControls/components/TopControls.tsx +0 -110
  995. package/src/shared/libs/VideoPlayerControls/components/Volume/Volume.tsx +0 -37
  996. package/src/shared/libs/VideoPlayerControls/components/Volume/index.ts +0 -1
  997. package/src/shared/libs/VideoPlayerControls/components/Volume/styles.ts +0 -31
  998. package/src/shared/libs/VideoPlayerControls/components/index.ts +0 -14
  999. package/src/shared/libs/VideoPlayerControls/components/styles.ts +0 -30
  1000. package/src/shared/libs/VideoPlayerControls/hooks/index.ts +0 -3
  1001. package/src/shared/libs/VideoPlayerControls/hooks/useAnimations.ts +0 -68
  1002. package/src/shared/libs/VideoPlayerControls/hooks/useControlTimeout.tsx +0 -67
  1003. package/src/shared/libs/VideoPlayerControls/hooks/usePanResponders.tsx +0 -96
  1004. package/src/shared/libs/VideoPlayerControls/index.ts +0 -4
  1005. package/src/shared/libs/VideoPlayerControls/styles.ts +0 -19
  1006. package/src/shared/libs/VideoPlayerControls/types.ts +0 -290
  1007. package/src/shared/libs/VideoPlayerControls/utils.ts +0 -76
  1008. package/src/shared/libs/datePickerModal/DateTimePickerModal.android.js +0 -75
  1009. package/src/shared/libs/datePickerModal/DateTimePickerModal.ios.js +0 -363
  1010. package/src/shared/libs/datePickerModal/DateTimePickerModal.js +0 -9
  1011. package/src/shared/libs/datePickerModal/Modal.js +0 -180
  1012. package/src/shared/libs/datePickerModal/index.d.ts +0 -310
  1013. package/src/shared/libs/datePickerModal/index.js +0 -5
  1014. package/src/shared/libs/datePickerModal/utils.js +0 -25
  1015. package/src/shared/libs/luxon/src/datetime.js +0 -2422
  1016. package/src/shared/libs/luxon/src/duration.js +0 -990
  1017. package/src/shared/libs/luxon/src/errors.js +0 -61
  1018. package/src/shared/libs/luxon/src/impl/conversions.js +0 -206
  1019. package/src/shared/libs/luxon/src/impl/diff.js +0 -95
  1020. package/src/shared/libs/luxon/src/impl/digits.js +0 -75
  1021. package/src/shared/libs/luxon/src/impl/english.js +0 -233
  1022. package/src/shared/libs/luxon/src/impl/formats.js +0 -176
  1023. package/src/shared/libs/luxon/src/impl/formatter.js +0 -409
  1024. package/src/shared/libs/luxon/src/impl/invalid.js +0 -14
  1025. package/src/shared/libs/luxon/src/impl/locale.js +0 -542
  1026. package/src/shared/libs/luxon/src/impl/regexParser.js +0 -335
  1027. package/src/shared/libs/luxon/src/impl/tokenParser.js +0 -473
  1028. package/src/shared/libs/luxon/src/impl/util.js +0 -309
  1029. package/src/shared/libs/luxon/src/impl/zoneUtil.js +0 -30
  1030. package/src/shared/libs/luxon/src/info.js +0 -205
  1031. package/src/shared/libs/luxon/src/interval.js +0 -657
  1032. package/src/shared/libs/luxon/src/luxon.js +0 -26
  1033. package/src/shared/libs/luxon/src/package.json +0 -4
  1034. package/src/shared/libs/luxon/src/settings.js +0 -175
  1035. package/src/shared/libs/luxon/src/zone.js +0 -91
  1036. package/src/shared/libs/luxon/src/zones/IANAZone.js +0 -189
  1037. package/src/shared/libs/luxon/src/zones/fixedOffsetZone.js +0 -102
  1038. package/src/shared/libs/luxon/src/zones/invalidZone.js +0 -53
  1039. package/src/shared/libs/luxon/src/zones/systemZone.js +0 -61
  1040. package/src/shared/modals/CometChatCallLogDetailsOptions.ts +0 -23
  1041. package/src/shared/modals/CometChatCallLogDetailsTemplate.ts +0 -16
  1042. package/src/shared/modals/CometChatDetailsOption.ts +0 -24
  1043. package/src/shared/modals/CometChatDetailsTemplate.ts +0 -16
  1044. package/src/shared/modals/CometChatOptions.ts +0 -13
  1045. package/src/shared/modals/InteractiveData/InteractiveActions/APIAction.ts +0 -118
  1046. package/src/shared/modals/InteractiveData/InteractiveActions/CustomAction.ts +0 -19
  1047. package/src/shared/modals/InteractiveData/InteractiveActions/URLNavigationAction.ts +0 -34
  1048. package/src/shared/modals/InteractiveData/InteractiveActions/index.ts +0 -3
  1049. package/src/shared/modals/InteractiveData/InteractiveData/InteractiveCardData.ts +0 -69
  1050. package/src/shared/modals/InteractiveData/InteractiveData/InteractiveFormData.ts +0 -119
  1051. package/src/shared/modals/InteractiveData/InteractiveData/index.ts +0 -2
  1052. package/src/shared/modals/InteractiveData/InteractiveElements/BaseInputElement.ts +0 -102
  1053. package/src/shared/modals/InteractiveData/InteractiveElements/BaseInteractiveElement.ts +0 -45
  1054. package/src/shared/modals/InteractiveData/InteractiveElements/ButtonElement.ts +0 -61
  1055. package/src/shared/modals/InteractiveData/InteractiveElements/CheckboxElement.ts +0 -75
  1056. package/src/shared/modals/InteractiveData/InteractiveElements/DateTimeElement.ts +0 -103
  1057. package/src/shared/modals/InteractiveData/InteractiveElements/DropdownElement.ts +0 -83
  1058. package/src/shared/modals/InteractiveData/InteractiveElements/LabelElement.ts +0 -32
  1059. package/src/shared/modals/InteractiveData/InteractiveElements/OptionElement.ts +0 -39
  1060. package/src/shared/modals/InteractiveData/InteractiveElements/RadioButtonElement.ts +0 -76
  1061. package/src/shared/modals/InteractiveData/InteractiveElements/SingleSelectElement.ts +0 -76
  1062. package/src/shared/modals/InteractiveData/InteractiveElements/TextInputElement.ts +0 -101
  1063. package/src/shared/modals/InteractiveData/InteractiveElements/index.ts +0 -11
  1064. package/src/shared/modals/InteractiveData/InteractiveEntities/ActionEntity.ts +0 -41
  1065. package/src/shared/modals/InteractiveData/InteractiveEntities/ElementEntity.ts +0 -66
  1066. package/src/shared/modals/InteractiveData/InteractiveEntities/index.ts +0 -2
  1067. package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +0 -143
  1068. package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +0 -39
  1069. package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +0 -153
  1070. package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +0 -150
  1071. package/src/shared/modals/InteractiveData/InteractiveMessage/index.ts +0 -4
  1072. package/src/shared/modals/InteractiveData/index.ts +0 -30
  1073. package/src/shared/resources/CometChatTheme/CometChatTheme.ts +0 -28
  1074. package/src/shared/resources/CometChatTheme/Palette.ts +0 -584
  1075. package/src/shared/resources/CometChatTheme/Typography.ts +0 -396
  1076. package/src/shared/resources/CometChatTheme/index.ts +0 -2
  1077. package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +0 -124
  1078. package/src/shared/utils/CometChatLiveReactions/LiveReactionstyles.ts +0 -37
  1079. package/src/shared/utils/CometChatLiveReactions/index.ts +0 -1
  1080. package/src/shared/utils/CometChatLiveReactions/resources/heart.png +0 -0
  1081. package/src/shared/utils/CometChatLiveReactions/resources/index.ts +0 -5
  1082. package/src/shared/utils/CometChatLiveReactions/style.ts +0 -8
  1083. package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +0 -109
  1084. package/src/shared/utils/CometChatMessagePreview/MessagePreviewConfiguration.js +0 -30
  1085. package/src/shared/utils/CometChatMessagePreview/style.js +0 -71
  1086. package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +0 -399
  1087. package/src/shared/utils/DetailsUtils/resources/Back.png +0 -0
  1088. package/src/shared/utils/DetailsUtils/resources/banIcon.png +0 -0
  1089. package/src/shared/utils/DetailsUtils/resources/close.png +0 -0
  1090. package/src/shared/utils/DetailsUtils/resources/index.ts +0 -23
  1091. package/src/shared/utils/DetailsUtils/resources/kickIcon.png +0 -0
  1092. package/src/shared/utils/DetailsUtils/resources/password.png +0 -0
  1093. package/src/shared/utils/DetailsUtils/resources/private.png +0 -0
  1094. package/src/shared/utils/DetailsUtils/resources/right-arrow.png +0 -0
  1095. package/src/shared/utils/InteractiveMessageUtils.ts +0 -60
  1096. package/src/shared/utils/SchedulerUtils.ts +0 -198
  1097. package/src/shared/utils/TypeUtils.ts +0 -3
  1098. package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +0 -61
  1099. package/src/shared/views/CometChatAudioBubble/AudioBubbleStyle.ts +0 -43
  1100. package/src/shared/views/CometChatAvatar/AvatarConfiguration.ts +0 -27
  1101. package/src/shared/views/CometChatAvatar/AvatarStyle.ts +0 -57
  1102. package/src/shared/views/CometChatAvatar/resources/default.jpg +0 -0
  1103. package/src/shared/views/CometChatAvatar/resources/index.ts +0 -5
  1104. package/src/shared/views/CometChatBadge/BadgeConfiguration.ts +0 -55
  1105. package/src/shared/views/CometChatBadge/BadgeStyle.ts +0 -39
  1106. package/src/shared/views/CometChatBottomSheet/style.ts +0 -50
  1107. package/src/shared/views/CometChatButton/CometChatButton.tsx +0 -76
  1108. package/src/shared/views/CometChatButton/CometChatButtonStyle.ts +0 -47
  1109. package/src/shared/views/CometChatButton/index.ts +0 -5
  1110. package/src/shared/views/CometChatButton/style.ts +0 -8
  1111. package/src/shared/views/CometChatCard/CometChatCard.tsx +0 -77
  1112. package/src/shared/views/CometChatCard/CometChatCardStyle.ts +0 -31
  1113. package/src/shared/views/CometChatCard/index.ts +0 -8
  1114. package/src/shared/views/CometChatCard/style.ts +0 -13
  1115. package/src/shared/views/CometChatCardBubble/CardBubbleStyle.tsx +0 -47
  1116. package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +0 -174
  1117. package/src/shared/views/CometChatCardBubble/index.tsx +0 -2
  1118. package/src/shared/views/CometChatCheckBox/CheckBoxStyle.tsx +0 -43
  1119. package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +0 -79
  1120. package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +0 -36
  1121. package/src/shared/views/CometChatDate/DateConfiguration.ts +0 -32
  1122. package/src/shared/views/CometChatDate/DateStyle.ts +0 -26
  1123. package/src/shared/views/CometChatDate/style.ts +0 -8
  1124. package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +0 -206
  1125. package/src/shared/views/CometChatDateTimePicker/DateTimePickerStyle.ts +0 -19
  1126. package/src/shared/views/CometChatDateTimePicker/index.ts +0 -3
  1127. package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +0 -127
  1128. package/src/shared/views/CometChatDropDown/DropDownStyle.tsx +0 -39
  1129. package/src/shared/views/CometChatDropDown/resources/downArrowIcon.png +0 -0
  1130. package/src/shared/views/CometChatDropDown/resources/index.js +0 -5
  1131. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +0 -27
  1132. package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +0 -44
  1133. package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +0 -58
  1134. package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +0 -542
  1135. package/src/shared/views/CometChatFormBubble/FormBubbleStyle.tsx +0 -96
  1136. package/src/shared/views/CometChatFormBubble/index.tsx +0 -2
  1137. package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +0 -34
  1138. package/src/shared/views/CometChatImageBubble/assets/default_image.png +0 -0
  1139. package/src/shared/views/CometChatLabel/CometChatLabel.tsx +0 -27
  1140. package/src/shared/views/CometChatLabel/LabelStyle.ts +0 -19
  1141. package/src/shared/views/CometChatList/resources/Back.png +0 -0
  1142. package/src/shared/views/CometChatList/resources/Search.png +0 -0
  1143. package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +0 -21
  1144. package/src/shared/views/CometChatListItem/ListItemStyle.ts +0 -47
  1145. package/src/shared/views/CometChatMediaRecorder/MediaRecorderStyle.ts +0 -63
  1146. package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +0 -26
  1147. package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +0 -13
  1148. package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +0 -66
  1149. package/src/shared/views/CometChatQuickView/QuickViewStyle.ts +0 -55
  1150. package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +0 -67
  1151. package/src/shared/views/CometChatRadioButton/RadioButtonStyle.tsx +0 -38
  1152. package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +0 -15
  1153. package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +0 -13
  1154. package/src/shared/views/CometChatReactions/ReactionsStyle.tsx +0 -43
  1155. package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +0 -65
  1156. package/src/shared/views/CometChatReceipt/ReceiptStyle.ts +0 -3
  1157. package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +0 -1519
  1158. package/src/shared/views/CometChatSchedulerBubble/index.ts +0 -3
  1159. package/src/shared/views/CometChatSchedulerBubble/styles.ts +0 -92
  1160. package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +0 -63
  1161. package/src/shared/views/CometChatSingleSelect/SingleStyle.tsx +0 -35
  1162. package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +0 -25
  1163. package/src/shared/views/CometChatStatusIndicator/StatusIndicatorStyle.ts +0 -37
  1164. package/src/shared/views/CometChatSuggestionList/SuggestionListConfiguration.ts +0 -23
  1165. package/src/shared/views/CometChatTextBubble/TextBubbleStyle.ts +0 -37
  1166. package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +0 -67
  1167. package/src/shared/views/CometChatTextInput/TextInputStyle.tsx +0 -26
  1168. package/src/shared/views/CometChatTimeSlotSelector/CometChatTimeSlotSelector.tsx +0 -113
  1169. package/src/shared/views/CometChatTimeSlotSelector/index.ts +0 -3
  1170. package/src/shared/views/CometChatTimeSlotSelector/styles.ts +0 -30
  1171. package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +0 -87
  1172. package/src/shared/views/SwipeRow/SwipeRow.tsx +0 -126
  1173. package/src/shared/views/SwipeRow/index.ts +0 -3
  1174. package/src/shared/views/SwipeRow/style.ts +0 -30
  1175. /package/src/{shared/assets/images → CometChatGroups/resources}/search.png +0 -0
  1176. /package/src/{CometChatDetails → CometChatThreadHeader}/resources/Back.png +0 -0
  1177. /package/src/{AI/AIConversationSummary → CometChatThreadHeader}/resources/close.png +0 -0
  1178. /package/src/{CometChatThreadedMessages → CometChatThreadHeader}/resources/more.png +0 -0
  1179. /package/src/{CometChatDetails → CometChatThreadHeader}/resources/password.png +0 -0
  1180. /package/src/{CometChatDetails → CometChatThreadHeader}/resources/private.png +0 -0
  1181. /package/src/{CometChatDetails → CometChatThreadHeader}/resources/right-arrow.png +0 -0
@@ -1,122 +1,132 @@
1
- import React, {
2
- useContext,
3
- useEffect,
4
- useImperativeHandle,
5
- useRef,
6
- useState,
7
- } from 'react';
8
-
1
+ import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
9
2
  import {
10
- View,
11
- Text,
3
+ ActivityIndicator,
4
+ ColorValue,
12
5
  FlatList,
13
- Image,
14
- StyleProp,
15
- ViewStyle,
6
+ GestureResponderEvent,
7
+ ImageSourcePropType,
8
+ ImageStyle,
16
9
  ListRenderItem,
17
- ViewProps,
10
+ StyleProp,
11
+ Text,
18
12
  TextStyle,
19
- ActivityIndicator,
20
- //@ts-ignore
21
- } from 'react-native';
22
- import { CometChatContext } from '../../CometChatContext';
23
- import { localize } from '../../resources/CometChatLocalize';
13
+ View,
14
+ ViewStyle,
15
+ } from "react-native";
16
+ import { LOADING, NO_DATA_FOUND, SOMETHING_WRONG } from "../../constants/UIKitConstants";
17
+ import { localize } from "../../resources/CometChatLocalize";
18
+
19
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
20
+ import { useTheme } from "../../../theme";
21
+ import { CometChatTheme } from "../../../theme/type";
22
+ import { CometChatUIKit } from "../../CometChatUiKit";
23
+ import { DeepPartial } from "../../helper/types";
24
+ import { Icon } from "../../icons/Icon";
25
+ import { CometChatListItem } from "../CometChatListItem";
24
26
  import {
25
- LOADING,
26
- NO_DATA_FOUND,
27
- SOMETHING_WRONG,
28
- } from '../../constants/UIKitConstants';
29
-
30
- import { ICONS } from './resources';
31
- import styles from './styles';
32
- import { CometChatOptions } from '../../modals';
33
- import { CometChatListItem } from '../../views/CometChatListItem';
34
- import Header from './Header';
35
- import { ImageType } from '../../base';
36
- import { BorderStyleInterface, FontStyleInterface } from '../../base';
37
- import { ListItemStyleInterface } from '../CometChatListItem/ListItemStyle';
38
- import { AvatarStyleInterface } from '../CometChatAvatar/AvatarStyle';
39
- import { CometChatContextType } from '../../base/Types';
40
- //@ts-ignore
41
- import { CometChat } from '@cometchat/chat-sdk-react-native';
42
- import { StatusIndicatorStyleInterface } from '../CometChatStatusIndicator';
43
- import { anyObject } from '../../utils';
27
+ CometChatStatusIndicatorInterface,
28
+ StatusIndicatorStyles,
29
+ } from "../CometChatStatusIndicator";
30
+ import Header from "./Header";
31
+ import { ICONS } from "./resources";
32
+ import styles from "./styles";
44
33
 
45
34
  export interface CometChatListActionsInterface {
46
35
  updateList: (prop: any) => void;
47
36
  updateAndMoveToFirst: (item: any) => void;
48
37
  addItemToList: (item: any, position?: number) => void;
49
38
  removeItemFromList: (itemId: string | number) => void;
50
- getListItem: (itemId: string | number) => void;
39
+ getListItem: (itemId: string | number) => any;
51
40
  getSelectedItems: () => Array<any>;
52
41
  getAllListItems: () => Array<any>;
53
- clearSelection: () => void;
54
42
  }
55
43
 
56
44
  export interface CometChatListStylesInterface {
57
- width?: number | string;
58
- height?: number | string;
59
- background?: string;
60
- border?: BorderStyleInterface;
61
- borderRadius?: number;
62
- titleFont?: FontStyleInterface;
63
- titleColor?: string;
64
- backIconTint?: string;
65
- searchBorder?: BorderStyleInterface;
66
- searchBorderRadius?: number;
67
- searchBackground?: string;
68
- searchTextFont?: FontStyleInterface;
69
- searchTextColor?: string;
70
- searchIconTint?: string;
71
- onlineStatusColor?: string;
45
+ containerStyle: ViewStyle;
46
+ onlineStatusColor?: ColorValue;
72
47
  separatorColor?: string;
73
- loadingIconTint?: string;
74
- emptyTextColor?: string;
75
- emptyTextFont?: FontStyleInterface;
76
- errorTextColor?: string;
77
- errorTextFont?: FontStyleInterface;
78
- sectionHeaderTextFont?: FontStyleInterface;
79
- sectionHeaderTextColor?: string;
48
+ loadingIconTint?: ColorValue;
49
+ sectionHeaderTextStyle?: TextStyle;
50
+ selectionIcon?: ImageSourcePropType | JSX.Element;
51
+ selectionIconStyle: ImageStyle;
52
+ cancellationIcon?: ImageSourcePropType | JSX.Element;
53
+ cancellationIconStyle?: ImageStyle;
54
+ titleSeparatorStyle: ViewStyle;
55
+ searchStyle?: {
56
+ textStyle: TextStyle;
57
+ placehodlerTextStyle?: TextStyle;
58
+ containerStyle: ViewStyle;
59
+ icon?: ImageSourcePropType | JSX.Element;
60
+ iconStyle: ImageStyle;
61
+ };
62
+ titleStyle: TextStyle;
63
+ titleViewStyle?: ViewStyle;
64
+ backButtonIcon?: ImageSourcePropType | JSX.Element;
65
+ backButtonIconStyle: ImageStyle;
66
+ itemStyle: {
67
+ avatarStyle: CometChatTheme["avatarStyle"];
68
+ containerStyle: ViewStyle;
69
+ titleStyle: TextStyle;
70
+ subtitleStyle: TextStyle;
71
+ statusIndicatorStyle?: Partial<StatusIndicatorStyles>;
72
+ headViewContainerStyle?: StyleProp<ViewStyle>;
73
+ titleSubtitleContainerStyle?: StyleProp<ViewStyle>;
74
+ trailingViewContainerStyle?: StyleProp<ViewStyle>;
75
+ };
76
+ emptyStateStyle: Partial<{
77
+ titleStyle: TextStyle;
78
+ subTitleStyle: TextStyle;
79
+ containerStyle: ViewStyle;
80
+ icon: ImageSourcePropType | JSX.Element;
81
+ iconStyle?: ImageStyle;
82
+ iconContainerStyle?: ViewStyle;
83
+ }>;
84
+ errorStateStyle: Partial<{
85
+ titleStyle: TextStyle;
86
+ subTitleStyle: TextStyle;
87
+ containerStyle: ViewStyle;
88
+ icon: ImageSourcePropType | JSX.Element;
89
+ iconStyle?: ImageStyle;
90
+ iconContainerStyle?: ViewStyle;
91
+ }>;
92
+ headerContainerStyle?: ViewStyle;
93
+ backButtonIconContainerStyle: ViewStyle;
80
94
  }
95
+
81
96
  export interface CometChatListProps {
82
- SubtitleView?: (item: object | any) => JSX.Element;
83
- TailView?: (item: object | any) => JSX.Element;
97
+ ItemView?: (item: any) => JSX.Element;
98
+ LeadingView?: (item: any) => JSX.Element;
99
+ TitleView?: (item: any) => JSX.Element;
100
+ SubtitleView?: (item: any) => JSX.Element;
101
+ TrailingView?: (item: any) => JSX.Element;
84
102
  disableUsersPresence?: boolean;
85
- ListItemView?: (item: any) => JSX.Element | null;
86
103
  AppBarOptions?: React.FC;
87
- options?: (item: object | any) => Array<CometChatOptions>;
88
- hideSeparator?: boolean;
89
104
  searchPlaceholderText?: string;
90
- backButtonIcon?: ImageType;
91
- showBackButton?: boolean;
92
- selectionMode?: 'none' | 'single' | 'multiple';
105
+ hideBackButton?: boolean;
106
+ selectionMode?: "none" | "single" | "multiple";
93
107
  onSelection?: (list: any) => void;
94
- searchBoxIcon?: ImageType;
95
108
  hideSearch?: boolean;
109
+ hideHeader?: boolean;
96
110
  title?: string;
97
- EmptyStateView?: React.FC;
111
+ EmptyView?: React.FC;
98
112
  emptyStateText?: string;
99
113
  errorStateText?: string;
100
- ErrorStateView?: React.FC;
101
- LoadingStateView?: React.FC;
114
+ ErrorView?: React.FC;
115
+ LoadingView?: React.FC;
102
116
  requestBuilder?: any;
103
117
  searchRequestBuilder?: any;
104
118
  hideError?: boolean;
105
119
  onItemPress?: (user: any) => void;
106
- onItemLongPress?: (user: any) => void;
120
+ onItemLongPress?: (user: any, e: GestureResponderEvent) => void;
107
121
  onError?: (error: CometChat.CometChatException) => void;
108
- onBack?: Function;
109
- selectionIcon?: ImageType;
110
- listItemKey: 'uid' | 'guid' | 'conversationId';
111
- statusIndicatorStyle?: StatusIndicatorStyleInterface;
112
- avatarStyle?: AvatarStyleInterface;
113
- listItemStyle?: ListItemStyleInterface;
114
- headViewContainerStyle?: StyleProp<ViewStyle>;
115
- bodyViewContainerStyle?: StyleProp<ViewStyle>;
116
- tailViewContainerStyle?: StyleProp<ViewStyle>;
117
- listStyle?: CometChatListStylesInterface;
118
- hideSubmitIcon?: boolean;
122
+ onBack?: (() => void) | undefined;
123
+ listItemKey: "uid" | "guid" | "conversationId";
124
+ listStyle?: DeepPartial<CometChatListStylesInterface>;
125
+ hideSubmitButton?: boolean;
126
+ statusIndicatorType?: (item: any) => CometChatStatusIndicatorInterface["type"];
127
+ hideStickyHeader?: boolean;
119
128
  }
129
+
120
130
  let lastCall: any;
121
131
  let lastReject: Function;
122
132
 
@@ -128,665 +138,622 @@ let lastReject: Function;
128
138
  *
129
139
  */
130
140
 
131
- export const CometChatList = React.forwardRef<
132
- CometChatListActionsInterface,
133
- CometChatListProps
134
- >((props, ref) => {
135
- const connectionListenerId = 'connectionListener_' + new Date().getTime();
136
- const { theme } = useContext<CometChatContextType>(CometChatContext);
137
-
138
- const {
139
- SubtitleView,
140
- TailView,
141
- disableUsersPresence,
142
- ListItemView,
143
- AppBarOptions,
144
- options,
145
- hideSeparator,
146
- searchPlaceholderText,
147
- backButtonIcon,
148
- showBackButton,
149
- searchBoxIcon,
150
- EmptyStateView,
151
- ErrorStateView,
152
- LoadingStateView,
153
- onError,
154
- onBack,
155
- selectionIcon,
156
- statusIndicatorStyle,
157
- avatarStyle,
158
- listItemStyle,
159
- headViewContainerStyle,
160
- bodyViewContainerStyle,
161
- tailViewContainerStyle,
162
- hideSubmitIcon,
163
- title = '',
164
- hideSearch = false,
165
- requestBuilder = undefined,
166
- searchRequestBuilder = undefined,
167
- emptyStateText = '',
168
- errorStateText = localize('SOMETHING_WRONG'),
169
- hideError = false,
170
- onItemPress = () => {},
171
- onItemLongPress = () => {},
172
- onSelection = () => {},
173
- selectionMode = 'none',
174
- listItemKey = 'uid',
175
- listStyle = {},
176
- } = props;
177
-
178
- // functions which can be access by parents
179
- useImperativeHandle(ref, () => {
180
- return {
181
- updateList,
182
- addItemToList,
183
- removeItemFromList,
184
- getListItem,
185
- updateAndMoveToFirst,
186
- getSelectedItems,
187
- getAllListItems,
188
- clearSelection,
189
- };
190
- });
141
+ export const CometChatList = React.forwardRef<CometChatListActionsInterface, CometChatListProps>(
142
+ (props, ref) => {
143
+ const connectionListenerId = "connectionListener_" + new Date().getTime();
144
+ const theme = useTheme();
145
+ const [isLoadingMore, setIsLoadingMore] = useState(false);
146
+
147
+ const {
148
+ LeadingView,
149
+ TitleView,
150
+ SubtitleView,
151
+ TrailingView,
152
+ disableUsersPresence = false,
153
+ ItemView,
154
+ AppBarOptions,
155
+ searchPlaceholderText,
156
+ hideBackButton,
157
+ selectionMode = "none",
158
+ onSelection = () => {},
159
+ hideSearch = false,
160
+ title = "Title",
161
+ EmptyView,
162
+ emptyStateText = localize("NO_USERS_FOUND"),
163
+ errorStateText = localize("SOMETHING_WRONG"),
164
+ ErrorView,
165
+ LoadingView,
166
+ requestBuilder,
167
+ hideHeader,
168
+ searchRequestBuilder = undefined,
169
+ hideError = false,
170
+ onItemPress = () => {},
171
+ onItemLongPress = () => {},
172
+ onError,
173
+ onBack,
174
+ listItemKey = "uid",
175
+ listStyle,
176
+ hideSubmitButton,
177
+ statusIndicatorType,
178
+ hideStickyHeader = false,
179
+ } = props;
180
+
181
+ // functions which can be accessed by parents
182
+ useImperativeHandle(ref, () => {
183
+ return {
184
+ updateList,
185
+ addItemToList,
186
+ removeItemFromList,
187
+ getListItem,
188
+ updateAndMoveToFirst,
189
+ getSelectedItems,
190
+ getAllListItems,
191
+ };
192
+ });
191
193
 
192
- const [searchInput, setSearchInput] = React.useState(
193
- requestBuilder && searchRequestBuilder
194
- ? searchRequestBuilder.searchKeyword
194
+ const [searchInput, setSearchInput] = useState(
195
+ requestBuilder && searchRequestBuilder
195
196
  ? searchRequestBuilder.searchKeyword
196
- : ''
197
- : requestBuilder
198
- ? requestBuilder.searchKeyword
197
+ ? searchRequestBuilder.searchKeyword
198
+ : ""
199
+ : requestBuilder
199
200
  ? requestBuilder.searchKeyword
200
- : ''
201
- : searchRequestBuilder
202
- ? searchRequestBuilder.searchKeyword
201
+ ? requestBuilder.searchKeyword
202
+ : ""
203
+ : searchRequestBuilder
203
204
  ? searchRequestBuilder.searchKeyword
204
- : ''
205
- : ''
206
- );
207
- const searchInputRef = useRef(
208
- requestBuilder && searchRequestBuilder
209
- ? searchRequestBuilder.searchKeyword
205
+ ? searchRequestBuilder.searchKeyword
206
+ : ""
207
+ : ""
208
+ );
209
+ const searchInputRef = useRef(
210
+ requestBuilder && searchRequestBuilder
210
211
  ? searchRequestBuilder.searchKeyword
211
- : ''
212
- : requestBuilder
213
- ? requestBuilder.searchKeyword
212
+ ? searchRequestBuilder.searchKeyword
213
+ : ""
214
+ : requestBuilder
214
215
  ? requestBuilder.searchKeyword
215
- : ''
216
- : searchRequestBuilder
217
- ? searchRequestBuilder.searchKeyword
216
+ ? requestBuilder.searchKeyword
217
+ : ""
218
+ : searchRequestBuilder
218
219
  ? searchRequestBuilder.searchKeyword
219
- : ''
220
- : ''
221
- );
222
-
223
- const [shouldSelect, setShouldSelect] = React.useState(
224
- selectionMode !== 'none' ? true : false
225
- );
226
- const [selectedItems, setSelectedItems] = useState<anyObject>({});
227
- const listHandlerRef = React.useRef(null);
228
- const initialRunRef = React.useRef(true);
229
-
230
- const activeSwipeRows = React.useRef<anyObject>({});
231
-
232
- const [list, setList] = React.useState<any>([]);
233
- const [decoratorMessage, setDecoratorMessage] = React.useState(LOADING);
234
-
235
- const searchHandler = (searchText: string) => {
236
- setSearchInput(searchText);
237
- let _searchRequestBuilder = searchRequestBuilder || requestBuilder;
238
- if (searchRequestBuilder && searchText) {
239
- _searchRequestBuilder = searchRequestBuilder
240
- .setSearchKeyword(searchText ? searchText : '')
241
- .build();
242
- } else if (requestBuilder) {
243
- _searchRequestBuilder = requestBuilder
244
- .setSearchKeyword(searchText ? searchText : '')
245
- .build();
246
- }
247
- getSearch(_searchRequestBuilder);
248
- };
220
+ ? searchRequestBuilder.searchKeyword
221
+ : ""
222
+ : ""
223
+ );
249
224
 
250
- const getSearch = (builder: any) => {
251
- getList(builder)
252
- .then((newlist: any) => {
253
- setDecoratorMessage(NO_DATA_FOUND);
254
- setList(newlist);
255
- })
256
- .catch((error) => {
257
- if (error && error['message'] == 'Promise cancelled') {
258
- } else {
259
- setDecoratorMessage(SOMETHING_WRONG);
260
- errorHandler(error);
261
- }
262
- });
263
- };
225
+ const [selectedItems, setSelectedItems] = useState<{ [key: string]: any }>({});
226
+ const shouldSelect = props.selectionMode === "single" || props.selectionMode === "multiple";
264
227
 
265
- const getSelectedItems = () => {
266
- let markedItems: any[] = [];
267
- Object.keys(selectedItems).forEach((item) => {
268
- return markedItems.push(getListItem(item));
269
- });
270
- return markedItems;
271
- };
228
+ const listHandlerRef = useRef<any>(null);
229
+ const initialRunRef = useRef(true);
230
+
231
+ const [list, setList] = useState<any[]>([]);
232
+ const [dataLoadingStatus, setDataLoadingStatus] = useState<string>(LOADING);
233
+
234
+ useEffect(() => {
235
+ if (props.onSelection) {
236
+ const selectedArray = Object.values(selectedItems);
237
+ props.onSelection(selectedArray);
238
+ }
239
+ }, [selectedItems]);
240
+
241
+ // Debounced search handler
242
+ const searchHandler = (searchText: string) => {
243
+ setSearchInput(searchText);
244
+ let _searchRequestBuilder = searchRequestBuilder || requestBuilder;
245
+ if (searchRequestBuilder && searchText) {
246
+ _searchRequestBuilder = searchRequestBuilder.setSearchKeyword(searchText).build();
247
+ } else if (requestBuilder) {
248
+ _searchRequestBuilder = requestBuilder.setSearchKeyword(searchText).build();
249
+ }
250
+ getSearch(_searchRequestBuilder);
251
+ };
272
252
 
273
- useEffect(() => {
274
- CometChat.addConnectionListener(
275
- connectionListenerId,
276
- new CometChat.ConnectionListener({
277
- onConnected: () => {
278
- console.log('ConnectionListener => On Connected');
279
- if (requestBuilder) {
280
- if (searchInputRef.current)
281
- listHandlerRef.current = requestBuilder
282
- .setSearchKeyword(searchInputRef.current)
283
- .build();
284
- else listHandlerRef.current = requestBuilder.build();
253
+ const getSearch = (builder: any) => {
254
+ getList(builder)
255
+ .then((newlist: any) => {
256
+ setDataLoadingStatus(NO_DATA_FOUND);
257
+ setList(newlist);
258
+ })
259
+ .catch((error) => {
260
+ if (error && error["message"] == "Promise cancelled") {
261
+ // Handle promise cancellation if necessary
262
+ } else {
263
+ setDataLoadingStatus(SOMETHING_WRONG);
264
+ errorHandler(error);
285
265
  }
286
- getList(listHandlerRef.current)
287
- .then((newlist: any) => {
288
- setDecoratorMessage(NO_DATA_FOUND);
289
- setList(newlist);
290
- })
291
- .catch((error) => {
292
- if (error && error['message'] == 'Promise cancelled') {
293
- } else {
294
- setDecoratorMessage(SOMETHING_WRONG);
295
- errorHandler(error);
296
- }
297
- });
298
- },
299
- inConnecting: () => {
300
- console.log('ConnectionListener => In connecting');
301
- },
302
- onDisconnected: () => {
303
- console.log('ConnectionListener => On Disconnected');
304
- },
305
- })
306
- );
307
- return () => {
308
- CometChat.removeConnectionListener(connectionListenerId);
266
+ });
309
267
  };
310
- }, []);
311
-
312
- useEffect(() => {
313
- if (initialRunRef.current === true) {
314
- if (requestBuilder) {
315
- if (searchInput)
316
- listHandlerRef.current = requestBuilder
317
- .setSearchKeyword(searchInput)
318
- .build();
319
- else listHandlerRef.current = requestBuilder.build();
320
- }
321
- initialRunRef.current = false;
322
- handleList(false);
323
- }
324
- }, []);
325
-
326
- useEffect(() => {
327
- setShouldSelect(selectionMode !== 'none' ? true : false);
328
- }, [selectionMode]);
329
-
330
- useEffect(() => {
331
- searchInputRef.current = searchInput;
332
- }, [searchInput]);
333
-
334
- /**
335
- * Updates the list of users to be displayed
336
- * @param
337
- */
338
- const updateList = (item: any) => {
339
- let newList = [...list];
340
- let itemKey = newList.findIndex(
341
- (u) => u[listItemKey] === item[listItemKey]
342
- );
343
- if (itemKey > -1) {
344
- newList.splice(itemKey, 1, item);
345
- if (newList?.length === 0) setDecoratorMessage(NO_DATA_FOUND);
346
- setList(newList);
347
- }
348
- };
349
268
 
350
- /**
351
- * This will move item to first location if item doesn't exits then add it to first location.
352
- * @param item
353
- */
354
- const updateAndMoveToFirst = (item: any) => {
355
- let newList = [...list];
356
- let itemKey = newList.findIndex(
357
- (u) => u[listItemKey] === item[listItemKey]
358
- );
359
- if (itemKey > -1) {
360
- newList.splice(itemKey, 1);
361
- }
362
- setList([item, ...newList]);
363
- };
269
+ const getSelectedItems = () => {
270
+ let markedItems: any[] = [];
271
+ Object.keys(selectedItems).forEach((item) => {
272
+ const listItem = getListItem(item);
273
+ if (listItem) markedItems.push(listItem);
274
+ });
275
+ return markedItems;
276
+ };
364
277
 
365
- const addItemToList = (item: any, position?: number) => {
366
- setList((prev: [any]) => {
367
- if (position != undefined) {
368
- if (position == 0) return [item, ...prev];
369
- if (position >= prev.length) return [...prev, item];
370
- else
371
- return [...prev.slice(0, position - 1), item, prev.slice(position)];
278
+ useEffect(() => {
279
+ CometChat.addConnectionListener(
280
+ connectionListenerId,
281
+ new CometChat.ConnectionListener({
282
+ onConnected: () => {
283
+ if (requestBuilder) {
284
+ if (searchInputRef.current)
285
+ listHandlerRef.current = requestBuilder
286
+ .setSearchKeyword(searchInputRef.current)
287
+ .build();
288
+ else listHandlerRef.current = requestBuilder.build();
289
+ }
290
+ getList(listHandlerRef.current)
291
+ .then((newlist: any[]) => {
292
+ setDataLoadingStatus(NO_DATA_FOUND);
293
+ setList(newlist);
294
+ })
295
+ .catch((error) => {
296
+ if (error && error["message"] === "Promise cancelled") {
297
+ // Handle promise cancellation if necessary
298
+ } else {
299
+ setDataLoadingStatus(SOMETHING_WRONG);
300
+ errorHandler(error);
301
+ }
302
+ });
303
+ },
304
+ inConnecting: () => {
305
+ console.log("ConnectionListener => In connecting");
306
+ },
307
+ onDisconnected: () => {
308
+ console.log("ConnectionListener => On Disconnected");
309
+ },
310
+ })
311
+ );
312
+ return () => {
313
+ CometChat.removeConnectionListener(connectionListenerId);
314
+ };
315
+ }, []);
316
+
317
+ useEffect(() => {
318
+ if (initialRunRef.current === true) {
319
+ if (requestBuilder) {
320
+ if (searchInput)
321
+ listHandlerRef.current = requestBuilder.setSearchKeyword(searchInput).build();
322
+ else listHandlerRef.current = requestBuilder.build();
323
+ }
324
+ initialRunRef.current = false;
325
+ handleList(false);
372
326
  }
373
- return [...prev, item];
374
- });
375
- };
376
-
377
- const removeItemFromList = (uid: string | number) => {
378
- setList((prev: any) => {
379
- let newList = prev.filter((item: any) => item[listItemKey] !== uid);
380
- if (newList?.length === 0) setDecoratorMessage(NO_DATA_FOUND);
381
- return newList;
382
- });
383
- if (ListItemView == undefined && shouldSelect) {
384
- let newSelectedItems = { ...selectedItems };
385
- if (Object.keys(selectedItems).includes(uid.toString())) {
386
- delete newSelectedItems[uid];
387
- setSelectedItems(newSelectedItems);
327
+ }, []);
328
+
329
+ useEffect(() => {
330
+ searchInputRef.current = searchInput;
331
+ }, [searchInput]);
332
+
333
+ /**
334
+ * Updates the list of users to be displayed
335
+ * @param
336
+ */
337
+ const updateList = (item: any) => {
338
+ let newList = [...list];
339
+ let itemKey = newList.findIndex((u) => u[listItemKey] === item[listItemKey]);
340
+ if (itemKey > -1) {
341
+ newList.splice(itemKey, 1, item);
342
+ if (newList.length === 0) setDataLoadingStatus(NO_DATA_FOUND);
343
+ setList(newList);
388
344
  }
389
- }
390
- };
391
-
392
- const getListItem = (itemId: string | number): any => {
393
- return list.find((item: any) => item[listItemKey] == itemId);
394
- };
345
+ };
395
346
 
396
- /**
397
- * get all list items
398
- */
399
- const getAllListItems = (): any => {
400
- return list;
401
- };
347
+ /**
348
+ * This will move item to first location if item doesn't exist then add it to first location.
349
+ * @param item
350
+ */
351
+ const updateAndMoveToFirst = (item: any) => {
352
+ let newList = [...list];
353
+ let itemKey = newList.findIndex((u) => u[listItemKey] === item[listItemKey]);
354
+ if (itemKey > -1) {
355
+ newList.splice(itemKey, 1);
356
+ }
357
+ setList([item, ...newList]);
358
+ };
402
359
 
403
- /**
404
- * update list
405
- * @param {boolean} thrughKeyword - pass true if wants to set only new users.
406
- */
407
- const handleList = (thrughKeyword?: any) => {
408
- getList(listHandlerRef.current)
409
- .then((newlist: any) => {
410
- if ((thrughKeyword || list.length === 0) && newlist.length === 0) {
411
- setDecoratorMessage(NO_DATA_FOUND);
412
- } else {
413
- setDecoratorMessage('');
414
- }
415
- if (thrughKeyword && thrughKeyword === true) {
416
- setList(newlist);
417
- } else {
418
- setList([].concat(list, newlist));
419
- }
420
- })
421
- .catch((error) => {
422
- if (error && error['message'] == 'Promise cancelled') {
423
- } else {
424
- setDecoratorMessage(SOMETHING_WRONG);
425
- errorHandler(error);
360
+ const addItemToList = (item: any, position?: number) => {
361
+ setList((prev: any[]) => {
362
+ if (position !== undefined) {
363
+ if (position === 0) return [item, ...prev];
364
+ if (position >= prev.length) return [...prev, item];
365
+ else return [...prev.slice(0, position - 1), item, ...prev.slice(position)];
426
366
  }
367
+ return [...prev, item];
427
368
  });
428
- };
369
+ };
429
370
 
430
- /**
431
- * Handle on end reached of the list
432
- */
433
- const endReached = (prop: any) => {
434
- handleList(false);
435
- };
371
+ const removeItemFromList = (uid: string | number) => {
372
+ setList((prev: any[]) => {
373
+ let newList = prev.filter((item: any) => item[listItemKey] !== uid);
374
+ if (newList.length === 0) setDataLoadingStatus(NO_DATA_FOUND);
375
+ return newList;
376
+ });
377
+ if (ItemView === undefined && shouldSelect) {
378
+ let newSelectedItems = { ...selectedItems };
379
+ if (Object.keys(selectedItems).includes(uid.toString())) {
380
+ delete newSelectedItems[uid];
381
+ setSelectedItems(newSelectedItems);
382
+ }
383
+ }
384
+ };
436
385
 
437
- const errorHandler = (errorCode: any) => {
438
- onError && onError(errorCode);
439
- // CometChatUserEvents.emit(CometChatUserEvents.onUserError, errorCode);
440
- };
386
+ const getListItem = (itemId: string | number): any => {
387
+ return list.find((item: any) => item[listItemKey] === itemId);
388
+ };
441
389
 
442
- const handleSelection = (listItem: any) => {
443
- if (!shouldSelect || selectionMode === 'none') return;
444
- setShouldSelect(true);
445
- if (selectionMode === 'multiple')
446
- setSelectedItems((prev: any) => {
447
- let newState = { ...prev };
448
- if (Object.keys(prev).includes(listItem.value[listItemKey])) {
449
- delete newState[listItem.value[listItemKey]];
450
- return newState;
451
- } else {
452
- newState[listItem.value[listItemKey]] = listItem.value;
453
- return newState;
454
- }
455
- });
456
- else if (selectionMode === 'single')
457
- setSelectedItems({ [listItem.value[listItemKey]]: listItem.value });
458
- };
390
+ /**
391
+ * Get all list items
392
+ */
393
+ const getAllListItems = (): any[] => {
394
+ return list;
395
+ };
459
396
 
460
- const onSelectionHandler = () => {
461
- if (onSelection) {
462
- onSelection(Object.values(selectedItems));
463
- return;
464
- }
465
- setShouldSelect(false);
466
- setSelectedItems({});
467
- };
397
+ /**
398
+ * Handle list fetching with pagination
399
+ * @param {boolean} throughKeyword - Pass true if wants to set only new users.
400
+ */
401
+ const handleList = (throughKeyword?: boolean) => {
402
+ // Prevent multiple fetches
403
+ if (isLoadingMore) return;
468
404
 
469
- const clearSelection = () => {
470
- setShouldSelect(false);
471
- setSelectedItems({});
472
- };
405
+ setIsLoadingMore(true);
473
406
 
474
- const onListItemPress = (item: any) => {
475
- if (shouldSelect) {
476
- if (selectionMode === 'multiple')
477
- setSelectedItems((prev: any) => {
478
- let newState = { ...prev };
479
- if (Object.keys(prev).includes(item.value[listItemKey])) {
480
- delete newState[item.value[listItemKey]];
481
- return newState;
407
+ getList(listHandlerRef.current)
408
+ .then((newlist: any[] = []) => {
409
+ if ((throughKeyword || list.length === 0) && newlist.length === 0) {
410
+ setDataLoadingStatus(NO_DATA_FOUND);
411
+ } else {
412
+ setDataLoadingStatus("");
413
+ }
414
+ if (throughKeyword === true) {
415
+ setList(newlist);
482
416
  } else {
483
- newState[item.value[listItemKey]] = item.value;
484
- return newState;
417
+ setList([...list, ...newlist]);
485
418
  }
419
+ setIsLoadingMore(false); // Fetch complete
420
+ })
421
+ .catch((error) => {
422
+ if (error && error["message"] === "Promise cancelled") {
423
+ // Handle promise cancellation if necessary
424
+ } else {
425
+ setDataLoadingStatus(SOMETHING_WRONG);
426
+ errorHandler(error);
427
+ }
428
+ setIsLoadingMore(false); // Fetch complete or errored
486
429
  });
487
- else if (selectionMode === 'single')
488
- setSelectedItems({ [item.value[listItemKey]]: item.value });
489
- }
490
- onItemPress && onItemPress(item.value);
491
- // CometChatUserEvents.emit(CometChatUserEvents.onUserItemClick, item);
492
- };
493
-
494
- const onListItemLongPress = (item: any) => {
495
- handleSelection(item);
496
- onItemLongPress && onItemLongPress(item.value);
497
- // CometChatUserEvents.emit(CometChatUserEvents.onUserItemClick, item);
498
- };
430
+ };
499
431
 
500
- const renderListItemView = ({ item, index }: any) => {
501
- if (item.header) {
502
- const headerLetter = item.value;
432
+ const renderFooter = () => {
433
+ if (!isLoadingMore) return null;
503
434
  return (
504
- <View key={index}>
505
- <View
506
- style={[
507
- styles.dividerStyle,
508
- {
509
- backgroundColor:
510
- listStyle?.separatorColor ?? theme.palette.getAccent100(),
511
- },
512
- ]}
513
- ></View>
514
- <Text
515
- style={
516
- [
517
- styles.headerLetterStyle,
518
- {
519
- color:
520
- listStyle?.sectionHeaderTextColor ??
521
- theme.palette.getAccent500(),
522
- },
523
- listStyle?.sectionHeaderTextFont ?? theme.typography.text2,
524
- ] as TextStyle[]
525
- }
526
- >
527
- {headerLetter}
528
- </Text>
435
+ <View style={styles.footerContainer}>
436
+ <ActivityIndicator size='small' color={theme.color.primary} />
529
437
  </View>
530
438
  );
531
- }
532
- return (
533
- <CometChatListItem
534
- id={item.value[listItemKey]}
535
- avatarName={item.value.name}
536
- title={item.value.name}
537
- listItemStyle={listItemStyle ? listItemStyle : { height: 55 }}
538
- headViewContainerStyle={
539
- headViewContainerStyle
540
- ? headViewContainerStyle
541
- : { marginHorizontal: 9 }
542
- }
543
- bodyViewContainerStyle={
544
- bodyViewContainerStyle ? bodyViewContainerStyle : {}
545
- }
546
- tailViewContainerStyle={
547
- tailViewContainerStyle ? tailViewContainerStyle : {}
548
- }
549
- avatarURL={item.value.avatar || undefined}
550
- statusIndicatorColor={
551
- Object.keys(selectedItems).includes(item.value[listItemKey])
552
- ? theme.palette.getBackgroundColor()
553
- : !disableUsersPresence && item.value.status === 'online'
554
- ? listStyle?.onlineStatusColor
555
- ? listStyle?.onlineStatusColor
556
- : theme.palette.getSuccess()
557
- : ''
558
- }
559
- statusIndicatorIcon={
560
- Object.keys(selectedItems).includes(item.value[listItemKey]) &&
561
- ICONS.CHECK
562
- }
563
- {...(SubtitleView
564
- ? { SubtitleView: () => SubtitleView(item.value) }
565
- : {})}
566
- {...(TailView ? { TailView: () => TailView(item.value) } : {})}
567
- statusIndicatorStyle={
568
- selectedItems[item.value[listItemKey]] === true
569
- ? {
570
- ...(statusIndicatorStyle as object),
571
- borderRadius: 10,
572
- height: 20,
573
- width: 20,
574
- }
575
- : (statusIndicatorStyle as ViewProps)
576
- }
577
- avatarStyle={avatarStyle}
578
- options={() => (options ? options(item.value) : [])}
579
- activeSwipeRows={activeSwipeRows.current}
580
- rowOpens={(id) => {
581
- Object.keys(activeSwipeRows.current).forEach((key) => {
582
- if (id !== key && activeSwipeRows.current[key]) {
583
- activeSwipeRows.current[key]?.current?.closeRow?.();
584
- delete activeSwipeRows.current[key];
439
+ };
440
+
441
+ /**
442
+ * Handle errors
443
+ */
444
+ const errorHandler = (errorCode: any) => {
445
+ onError && onError(errorCode);
446
+ // CometChatUserEvents.emit(CometChatUserEvents.onUserError, errorCode);
447
+ };
448
+
449
+ /**
450
+ * Handle item selection based on selection mode
451
+ */
452
+ const handleSelection = useCallback(
453
+ (listItem: any) => {
454
+ if (selectionMode === "none") return;
455
+
456
+ const itemKey = listItem.value[listItemKey];
457
+
458
+ setSelectedItems((prev: any) => {
459
+ let newState = { ...prev };
460
+ if (selectionMode === "multiple") {
461
+ if (newState[itemKey]) {
462
+ delete newState[itemKey];
463
+ } else {
464
+ newState[itemKey] = listItem.value;
585
465
  }
586
- });
587
- }}
588
- onPress={() => {
589
- onListItemPress(item);
590
- }}
591
- onLongPress={() => {
592
- onListItemLongPress(item);
593
- }}
594
- />
466
+ } else if (selectionMode === "single") {
467
+ if (newState[itemKey]) {
468
+ delete newState[itemKey];
469
+ } else {
470
+ newState = { [itemKey]: listItem.value };
471
+ }
472
+ }
473
+ // Notify parent about selection change
474
+
475
+ return newState;
476
+ });
477
+ },
478
+ [selectionMode, onSelection, listItemKey]
595
479
  );
596
- };
597
480
 
598
- /**
599
- * Gets the list of users
600
- */
601
- const getList = (props: any) => {
602
- const promise = new Promise((resolve, reject) => {
603
- const cancel = () => {
604
- clearTimeout(lastCall);
605
- lastReject(new Error('Promise cancelled'));
606
- };
607
- if (lastCall) {
608
- cancel();
481
+ /**
482
+ * Handle Cancel action
483
+ */
484
+ const handleCancelSelection = () => {
485
+ setSelectedItems({});
486
+ };
487
+
488
+ /**
489
+ * Handle Confirm action
490
+ */
491
+ const handleConfirmSelection = () => {
492
+ onSelection(Object.values(selectedItems));
493
+ // Optionally, you might want to clear the selection after confirmation
494
+ setSelectedItems({});
495
+ };
496
+
497
+ const onListItemPress = (item: any) => {
498
+ if (shouldSelect) {
499
+ handleSelection(item);
500
+ } else {
501
+ onItemPress(item.value);
609
502
  }
503
+ };
610
504
 
611
- lastCall = setTimeout(() => {
612
- props
613
- ?.fetchNext()
614
- .then((listItems: any) => {
615
- resolve(listItems);
616
- })
617
- .catch((error: any) => {
618
- reject(error);
619
- });
620
- }, 500);
621
- lastReject = reject;
622
- });
623
- return promise;
624
- };
505
+ const onListItemLongPress = (item: any, e: GestureResponderEvent) => {
506
+ handleSelection(item);
507
+ onItemLongPress(item.value, e);
508
+ };
625
509
 
626
- /**
627
- * Returns a container of users if exists else returns the corresponding decorator message
628
- */
629
- const getMessageContainer = () => {
630
- let messageContainer: any = null;
631
- decoratorMessage === LOADING;
632
- if (list.length === 0 && decoratorMessage.toLowerCase() === LOADING) {
633
- if (LoadingStateView) return <LoadingStateView />;
634
- messageContainer = (
635
- <View style={styles.msgContainerStyle}>
636
- <ActivityIndicator
637
- size={'large'}
638
- color={listStyle?.loadingIconTint || theme.palette.getPrimary()}
639
- />
640
- </View>
641
- );
642
- } else if (
643
- list.length === 0 &&
644
- decoratorMessage.toLowerCase() === NO_DATA_FOUND
645
- ) {
646
- messageContainer = EmptyStateView ? (
647
- <EmptyStateView />
648
- ) : (
649
- <View style={styles.msgContainerStyle}>
650
- <Text
651
- style={
652
- [
653
- styles.msgTxtStyle,
654
- listStyle?.emptyTextFont ?? theme.typography.body,
655
- {
656
- color:
657
- listStyle?.emptyTextColor ?? theme.palette.getAccent400(),
658
- },
659
- ] as TextStyle[]
510
+ const selectedCount = Object.keys(selectedItems).length;
511
+
512
+ const renderItemView = useCallback(
513
+ ({ item, index }: any) => {
514
+ if (item.header) {
515
+ if (hideStickyHeader) return null;
516
+ const headerLetter = item.value;
517
+
518
+ return (
519
+ <View key={`header_${headerLetter}_${index}`}>
520
+ <Text style={[styles.headerLetterStyle, listStyle?.sectionHeaderTextStyle]}>
521
+ {headerLetter}
522
+ </Text>
523
+ </View>
524
+ );
525
+ }
526
+ return (
527
+ <CometChatListItem
528
+ statusIndicatorType={statusIndicatorType ? statusIndicatorType(item.value) : undefined}
529
+ id={item.value[listItemKey]}
530
+ avatarName={item.value.name}
531
+ selected={!!selectedItems[item.value[listItemKey]]}
532
+ shouldSelect={shouldSelect}
533
+ LeadingView={LeadingView && LeadingView(item.value)}
534
+ TitleView={TitleView && TitleView(item.value)}
535
+ title={
536
+ item.value.uid &&
537
+ item.value.uid === CometChatUIKit.loggedInUser!.getUid() &&
538
+ item.value.name === CometChatUIKit.loggedInUser!.getName()
539
+ ? localize("YOU")
540
+ : item.value.name
660
541
  }
661
- >
662
- {emptyStateText}
663
- </Text>
664
- </View>
665
- );
666
- } else if (
667
- !hideError &&
668
- decoratorMessage.toLowerCase() === SOMETHING_WRONG
669
- ) {
670
- messageContainer = ErrorStateView ? (
671
- <ErrorStateView />
672
- ) : (
673
- <View style={styles.msgContainerStyle}>
674
- <Text
675
- style={
676
- [
677
- styles.msgTxtStyle,
678
- listStyle?.errorTextFont ?? theme.typography.body,
679
- {
680
- color:
681
- listStyle?.errorTextColor ?? theme.palette.getAccent400(),
682
- },
683
- ] as TextStyle[]
542
+ containerStyle={[listStyle?.itemStyle?.containerStyle]}
543
+ titleStyle={listStyle?.itemStyle?.titleStyle}
544
+ headViewContainerStyle={
545
+ (listStyle?.itemStyle?.headViewContainerStyle as StyleProp<ViewStyle>) ??
546
+ ({ marginHorizontal: 9 } as StyleProp<ViewStyle>)
684
547
  }
685
- >
686
- {errorStateText}
687
- </Text>
688
- </View>
689
- );
690
- } else {
691
- let currentLetter = '';
692
- const listWithHeaders: any[] = [];
693
- if (list.length) {
694
- list.forEach((listItem: any) => {
695
- const chr = listItem?.name && listItem.name[0].toUpperCase();
696
- if (chr !== currentLetter && !hideSeparator && !ListItemView) {
697
- currentLetter = chr;
698
- listWithHeaders.push({
699
- value: currentLetter,
700
- header: true,
548
+ titleSubtitleContainerStyle={
549
+ (listStyle?.itemStyle?.titleSubtitleContainerStyle as StyleProp<ViewStyle>) ??
550
+ ({} as StyleProp<ViewStyle>)
551
+ }
552
+ trailingViewContainerStyle={
553
+ (listStyle?.itemStyle?.trailingViewContainerStyle as StyleProp<ViewStyle>) ??
554
+ ({} as StyleProp<ViewStyle>)
555
+ }
556
+ avatarURL={item.value.avatar || undefined}
557
+ avatarStyle={listStyle?.itemStyle?.avatarStyle}
558
+ SubtitleView={SubtitleView ? SubtitleView(item.value) : undefined}
559
+ TrailingView={TrailingView ? TrailingView(item.value) : undefined}
560
+ onPress={() => {
561
+ onListItemPress(item);
562
+ }}
563
+ // onLongPress={() => {
564
+ // onListItemLongPress(item);
565
+ // }}
566
+ onLongPress={(id: any, e: any) => {
567
+ // const listItem = getListItem(id);
568
+ onListItemLongPress(item, e);
569
+ }}
570
+ />
571
+ );
572
+ },
573
+ [
574
+ listItemKey,
575
+ selectedItems,
576
+ shouldSelect,
577
+ listStyle,
578
+ SubtitleView,
579
+ TitleView,
580
+ TrailingView,
581
+ disableUsersPresence,
582
+ theme,
583
+ onListItemPress,
584
+ onListItemLongPress,
585
+ hideStickyHeader,
586
+ LeadingView,
587
+ ]
588
+ );
589
+
590
+ /**
591
+ * Gets the list of users
592
+ */
593
+ const getList = (props: any): Promise<any[]> => {
594
+ const promise = new Promise<any[]>((resolve, reject) => {
595
+ const cancel = () => {
596
+ clearTimeout(lastCall);
597
+ lastReject(new Error("Promise cancelled"));
598
+ };
599
+ if (lastCall) {
600
+ cancel();
601
+ }
602
+
603
+ lastCall = setTimeout(() => {
604
+ props
605
+ ?.fetchNext()
606
+ .then((listItems: any) => {
607
+ resolve(listItems);
608
+ })
609
+ .catch((error: CometChat.CometChatException) => {
610
+ reject(error);
701
611
  });
702
- }
703
- listWithHeaders.push({ value: listItem, header: false });
704
- });
612
+ }, 500);
613
+ lastReject = reject;
614
+ });
615
+ return promise;
616
+ };
705
617
 
706
- messageContainer = (
707
- <View style={styles.listContainerStyle}>
708
- <FlatList
709
- data={listWithHeaders}
710
- extraData={listWithHeaders}
711
- renderItem={
712
- ListItemView
713
- ? ({ item, index, separators }) => (
714
- <ListItemView
715
- index={index}
716
- separators={separators}
717
- item={item.value}
718
- />
719
- )
720
- : renderListItemView
721
- }
722
- keyExtractor={(item, index) =>
723
- (item[listItemKey]
724
- ? item[listItemKey] + '_' + index
725
- : index) as string
726
- }
727
- onEndReached={endReached}
728
- onEndReachedThreshold={0.3}
729
- showsVerticalScrollIndicator={false}
730
- />
618
+ /**
619
+ * Returns a container of users if exists else returns the corresponding decorator message
620
+ */
621
+ const getMessageContainer = useCallback(() => {
622
+ let messageContainer = null;
623
+ if (list.length === 0 && dataLoadingStatus.toLowerCase() === NO_DATA_FOUND) {
624
+ messageContainer = EmptyView ? (
625
+ <EmptyView />
626
+ ) : (
627
+ <View style={[styles.msgContainerStyle, listStyle?.emptyStateStyle?.containerStyle]}>
628
+ <Text style={[styles.msgTxtStyle, listStyle?.emptyStateStyle?.titleStyle]}>
629
+ {emptyStateText}
630
+ </Text>
631
+ </View>
632
+ );
633
+ } else if (!hideError && dataLoadingStatus.toLowerCase() === SOMETHING_WRONG) {
634
+ messageContainer = ErrorView ? (
635
+ <ErrorView />
636
+ ) : (
637
+ <View style={[styles.msgContainerStyle, listStyle?.errorStateStyle?.containerStyle]}>
638
+ {listStyle?.errorStateStyle?.icon && (
639
+ <Icon name='error' size={24} color={theme.color.error} />
640
+ )}
641
+ <Text style={[styles.msgTxtStyle, listStyle?.errorStateStyle?.titleStyle]}>
642
+ {errorStateText}
643
+ </Text>
731
644
  </View>
732
645
  );
646
+ } else {
647
+ let currentLetter = "";
648
+ const listWithHeaders: any[] = [];
649
+ if (list.length) {
650
+ list.forEach((listItem: any) => {
651
+ const chr = listItem?.name && listItem.name[0].toUpperCase();
652
+ if (!hideStickyHeader && chr !== currentLetter && !ItemView) {
653
+ currentLetter = chr;
654
+ listWithHeaders.push({
655
+ value: currentLetter,
656
+ header: true,
657
+ });
658
+ }
659
+ listWithHeaders.push({ value: listItem, header: false });
660
+ });
661
+
662
+ messageContainer = (
663
+ <View style={styles.listContainerStyle}>
664
+ <FlatList
665
+ data={listWithHeaders}
666
+ extraData={{ selectedItems, theme, list }}
667
+ renderItem={
668
+ ItemView
669
+ ? ({ item, index, separators }) => {
670
+ return ItemView(item?.value);
671
+ }
672
+ : renderItemView
673
+ }
674
+ keyExtractor={(item, index) => {
675
+ const itemValue = { ...item.value };
676
+ let key = itemValue[listItemKey] ? `${itemValue[listItemKey]}` : undefined;
677
+ if (!key) {
678
+ //section header is also an item in the list
679
+ if (itemValue[0] && itemValue[0].length === 1) {
680
+ key = itemValue[0] + "_" + index;
681
+ }
682
+ }
683
+ return key ?? index + "";
684
+ }}
685
+ onMomentumScrollEnd={(event) => {
686
+ const contentOffsetY = event.nativeEvent.contentOffset.y;
687
+ const contentHeight = event.nativeEvent.contentSize.height;
688
+ const layoutHeight = event.nativeEvent.layoutMeasurement.height;
689
+
690
+ if (contentOffsetY + layoutHeight >= contentHeight - 10) {
691
+ handleList();
692
+ }
693
+ }}
694
+ showsVerticalScrollIndicator={false}
695
+ ListFooterComponent={renderFooter}
696
+ />
697
+ </View>
698
+ );
699
+ }
733
700
  }
734
- }
735
701
 
736
- return messageContainer;
737
- };
702
+ return messageContainer;
703
+ }, [list, selectedItems, theme, dataLoadingStatus]);
738
704
 
739
- return (
740
- <View
741
- style={
742
- [
743
- styles.containerStyle,
744
- {
745
- height: listStyle?.height ?? '100%',
746
- width: listStyle?.width ?? '100%',
747
- backgroundColor:
748
- listStyle?.background ?? theme.palette.getBackgroundColor(),
749
- borderRadius: listStyle?.borderRadius ?? 0,
750
- },
751
- listStyle?.border ?? {},
752
- ] as ViewProps
753
- }
754
- >
755
- <Header
756
- backButtonIcon={backButtonIcon}
757
- showBackButton={showBackButton}
758
- onBack={onBack}
759
- title={title}
760
- AppBarOptions={AppBarOptions}
761
- shouldSelect={shouldSelect}
762
- hideSubmitIcon={hideSubmitIcon}
763
- onSelectionHandler={onSelectionHandler}
764
- hideSearch={hideSearch}
765
- searchBoxIcon={searchBoxIcon}
766
- searchPlaceholderText={searchPlaceholderText}
767
- searchHandler={searchHandler}
768
- searchInput={searchInput}
769
- onSubmitEditing={() => searchHandler(searchInput)}
770
- selectionIcon={selectionIcon}
771
- titleFontStyle={listStyle?.titleFont ?? theme.typography.heading}
772
- titleColor={listStyle?.titleColor ?? theme.palette.getAccent()}
773
- backIconTint={listStyle?.backIconTint ?? theme.palette.getPrimary()}
774
- selectionIconTint={theme.palette.getPrimary()}
775
- searchBorderStyle={listStyle?.searchBorder}
776
- searchBorderRadius={listStyle?.searchBorderRadius}
777
- searchTextFontStyle={listStyle?.searchTextFont ?? theme.typography.body}
778
- searchTextColor={
779
- listStyle?.searchTextColor ?? theme.palette.getAccent()
780
- }
781
- searchPlaceholderTextColor={theme.palette.getAccent600()}
782
- searchIconTint={
783
- listStyle?.searchIconTint ?? theme.palette.getAccent400()
784
- }
785
- searchBackground={
786
- listStyle?.searchBackground ?? theme.palette.getAccent50()
787
- }
788
- />
789
- <View style={styles.container}>{getMessageContainer()}</View>
790
- </View>
791
- );
792
- });
705
+ /**
706
+ * Handle the rendering based on loading status
707
+ */
708
+ // if (list.length === 0 && dataLoadingStatus.toLowerCase() === LOADING) {
709
+ // if (LoadingView) return <LoadingView />;
710
+ // } else {
711
+ return (
712
+ <View style={{ flex: 1 }}>
713
+ <Header
714
+ hideHeader={hideHeader ?? hideHeader}
715
+ backButtonIconContainerStyle={listStyle?.backButtonIconContainerStyle}
716
+ backButtonIcon={listStyle?.backButtonIcon}
717
+ backButtonIconStyle={listStyle?.backButtonIconStyle}
718
+ hideBackButton={hideBackButton}
719
+ containerStyle={listStyle?.headerContainerStyle}
720
+ titleSeparatorStyle={listStyle?.titleSeparatorStyle}
721
+ titleViewStyle={listStyle?.titleViewStyle}
722
+ onBack={onBack}
723
+ title={title}
724
+ titleStyle={listStyle?.titleStyle}
725
+ AppBarOptions={AppBarOptions}
726
+ shouldSelect={shouldSelect}
727
+ hideSubmitButton={hideSubmitButton}
728
+ onCancel={handleCancelSelection}
729
+ onConfirm={handleConfirmSelection}
730
+ hideSearch={hideSearch}
731
+ searchPlaceholderText={searchPlaceholderText}
732
+ searchHandler={searchHandler}
733
+ searchInput={searchInput}
734
+ onSubmitEditing={() => searchHandler(searchInput)}
735
+ selectionIcon={listStyle?.selectionIcon}
736
+ selectionIconStyle={listStyle?.selectionIconStyle}
737
+ cancellationIconStyle={listStyle?.cancellationIconStyle}
738
+ searchStyle={listStyle?.searchStyle}
739
+ selectedCount={selectedCount}
740
+ />
741
+ <View style={styles.container}>{getMessageContainer()}</View>
742
+ {list.length === 0 && dataLoadingStatus.toLowerCase() === LOADING ? (
743
+ LoadingView ? (
744
+ <LoadingView />
745
+ ) : (
746
+ <View style={styles.msgContainerStyle}>
747
+ <ActivityIndicator
748
+ size={theme.spacing.spacing.s10}
749
+ color={listStyle?.loadingIconTint || theme.color.iconSecondary}
750
+ />
751
+ </View>
752
+ )
753
+ ) : null}
754
+ {/* Add a fallback like `null` if nothing needs to be rendered */}
755
+ </View>
756
+ );
757
+ }
758
+ // }
759
+ );