@sendbird/uikit-react-native 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/lib/commonjs/components/ChatFlatList.js +2 -1
  2. package/lib/commonjs/components/ChatFlatList.js.map +1 -1
  3. package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js +11 -6
  4. package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
  5. package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js +12 -2
  6. package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
  7. package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js +25 -10
  8. package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +1 -1
  9. package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js +86 -10
  10. package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
  11. package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js +99 -14
  12. package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
  13. package/lib/commonjs/components/MessageRenderer/UserMessage/index.js.map +1 -1
  14. package/lib/commonjs/components/MessageRenderer/index.js +22 -3
  15. package/lib/commonjs/components/MessageRenderer/index.js.map +1 -1
  16. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js +150 -0
  17. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -0
  18. package/lib/commonjs/components/ReactionAddons/MessageReactionAddon.js +135 -0
  19. package/lib/commonjs/components/ReactionAddons/MessageReactionAddon.js.map +1 -0
  20. package/lib/commonjs/components/ReactionAddons/ReactionRoundedButton.js +87 -0
  21. package/lib/commonjs/components/ReactionAddons/ReactionRoundedButton.js.map +1 -0
  22. package/lib/commonjs/components/ReactionAddons/index.js +19 -0
  23. package/lib/commonjs/components/ReactionAddons/index.js.map +1 -0
  24. package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js +150 -0
  25. package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -0
  26. package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +276 -0
  27. package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -0
  28. package/lib/commonjs/components/ReactionBottomSheets/index.js +19 -0
  29. package/lib/commonjs/components/ReactionBottomSheets/index.js.map +1 -0
  30. package/lib/commonjs/constants.js +3 -1
  31. package/lib/commonjs/constants.js.map +1 -1
  32. package/lib/commonjs/containers/GroupChannelPreviewContainer.js +4 -1
  33. package/lib/commonjs/containers/GroupChannelPreviewContainer.js.map +1 -1
  34. package/lib/commonjs/containers/SendbirdUIKitContainer.js +118 -78
  35. package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
  36. package/lib/commonjs/contexts/ReactionCtx.js +107 -0
  37. package/lib/commonjs/contexts/ReactionCtx.js.map +1 -0
  38. package/lib/commonjs/contexts/SendbirdChatCtx.js +18 -6
  39. package/lib/commonjs/contexts/SendbirdChatCtx.js.map +1 -1
  40. package/lib/commonjs/contexts/UserProfileCtx.js +9 -0
  41. package/lib/commonjs/contexts/UserProfileCtx.js.map +1 -1
  42. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js +33 -37
  43. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
  44. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js +28 -11
  45. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
  46. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js +120 -31
  47. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
  48. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +31 -12
  49. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  50. package/lib/commonjs/domain/groupChannel/component/GroupChannelSuggestedMentionList.js +210 -0
  51. package/lib/commonjs/domain/groupChannel/component/GroupChannelSuggestedMentionList.js.map +1 -0
  52. package/lib/commonjs/domain/groupChannel/index.js +8 -0
  53. package/lib/commonjs/domain/groupChannel/index.js.map +1 -1
  54. package/lib/commonjs/domain/groupChannel/module/createGroupChannelModule.js +4 -0
  55. package/lib/commonjs/domain/groupChannel/module/createGroupChannelModule.js.map +1 -1
  56. package/lib/commonjs/domain/groupChannel/module/moduleContext.js +4 -4
  57. package/lib/commonjs/domain/groupChannel/module/moduleContext.js.map +1 -1
  58. package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
  59. package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js +3 -2
  60. package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map +1 -1
  61. package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js +2 -1
  62. package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
  63. package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js +2 -1
  64. package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js.map +1 -1
  65. package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js +39 -0
  66. package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js.map +1 -0
  67. package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js +140 -0
  68. package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js.map +1 -0
  69. package/lib/commonjs/domain/groupChannelNotifications/index.js +46 -0
  70. package/lib/commonjs/domain/groupChannelNotifications/index.js.map +1 -0
  71. package/lib/commonjs/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js +33 -0
  72. package/lib/commonjs/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js.map +1 -0
  73. package/lib/commonjs/domain/groupChannelNotifications/module/moduleContext.js +45 -0
  74. package/lib/commonjs/domain/groupChannelNotifications/module/moduleContext.js.map +1 -0
  75. package/lib/commonjs/domain/groupChannelNotifications/types.js +6 -0
  76. package/lib/commonjs/domain/groupChannelNotifications/types.js.map +1 -0
  77. package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsList.js +2 -1
  78. package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsList.js.map +1 -1
  79. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +49 -6
  80. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  81. package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js +9 -14
  82. package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
  83. package/lib/commonjs/domain/groupChannelSettings/types.js.map +1 -1
  84. package/lib/commonjs/domain/groupChannelUserList/types.js.map +1 -1
  85. package/lib/commonjs/domain/userList/component/UserListList.js +4 -1
  86. package/lib/commonjs/domain/userList/component/UserListList.js.map +1 -1
  87. package/lib/commonjs/domain/userList/module/createUserListModule.js.map +1 -1
  88. package/lib/commonjs/fragments/createGroupChannelCreateFragment.js.map +1 -1
  89. package/lib/commonjs/fragments/createGroupChannelFragment.js +11 -4
  90. package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
  91. package/lib/commonjs/fragments/createGroupChannelInviteFragment.js.map +1 -1
  92. package/lib/commonjs/fragments/createGroupChannelNotificationsFragment.js +34 -0
  93. package/lib/commonjs/fragments/createGroupChannelNotificationsFragment.js.map +1 -0
  94. package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js +3 -1
  95. package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js.map +1 -1
  96. package/lib/commonjs/hooks/useConnection.js +3 -0
  97. package/lib/commonjs/hooks/useConnection.js.map +1 -1
  98. package/lib/commonjs/hooks/useContext.js +11 -1
  99. package/lib/commonjs/hooks/useContext.js.map +1 -1
  100. package/lib/commonjs/hooks/useKeyboardStatus.js +93 -0
  101. package/lib/commonjs/hooks/useKeyboardStatus.js.map +1 -0
  102. package/lib/commonjs/hooks/useMentionSuggestion.js +110 -0
  103. package/lib/commonjs/hooks/useMentionSuggestion.js.map +1 -0
  104. package/lib/commonjs/hooks/useMentionTextInput.js +139 -0
  105. package/lib/commonjs/hooks/useMentionTextInput.js.map +1 -0
  106. package/lib/commonjs/index.js +95 -40
  107. package/lib/commonjs/index.js.map +1 -1
  108. package/lib/commonjs/libs/EmojiManager.js +100 -0
  109. package/lib/commonjs/libs/EmojiManager.js.map +1 -0
  110. package/lib/commonjs/libs/MentionConfig.js +47 -0
  111. package/lib/commonjs/libs/MentionConfig.js.map +1 -0
  112. package/lib/commonjs/libs/MentionManager.js +235 -0
  113. package/lib/commonjs/libs/MentionManager.js.map +1 -0
  114. package/lib/commonjs/localization/StringSet.type.js +17 -5
  115. package/lib/commonjs/localization/StringSet.type.js.map +1 -1
  116. package/lib/commonjs/types.js.map +1 -1
  117. package/lib/commonjs/utils/common.js +19 -0
  118. package/lib/commonjs/utils/common.js.map +1 -0
  119. package/lib/commonjs/version.js +1 -1
  120. package/lib/commonjs/version.js.map +1 -1
  121. package/lib/module/components/ChatFlatList.js +3 -2
  122. package/lib/module/components/ChatFlatList.js.map +1 -1
  123. package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js +11 -6
  124. package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
  125. package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js +12 -2
  126. package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
  127. package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js +25 -10
  128. package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +1 -1
  129. package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js +86 -12
  130. package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
  131. package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js +101 -17
  132. package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
  133. package/lib/module/components/MessageRenderer/UserMessage/index.js.map +1 -1
  134. package/lib/module/components/MessageRenderer/index.js +21 -4
  135. package/lib/module/components/MessageRenderer/index.js.map +1 -1
  136. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js +132 -0
  137. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -0
  138. package/lib/module/components/ReactionAddons/MessageReactionAddon.js +118 -0
  139. package/lib/module/components/ReactionAddons/MessageReactionAddon.js.map +1 -0
  140. package/lib/module/components/ReactionAddons/ReactionRoundedButton.js +74 -0
  141. package/lib/module/components/ReactionAddons/ReactionRoundedButton.js.map +1 -0
  142. package/lib/module/components/ReactionAddons/index.js +7 -0
  143. package/lib/module/components/ReactionAddons/index.js.map +1 -0
  144. package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js +135 -0
  145. package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -0
  146. package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +259 -0
  147. package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -0
  148. package/lib/module/components/ReactionBottomSheets/index.js +7 -0
  149. package/lib/module/components/ReactionBottomSheets/index.js.map +1 -0
  150. package/lib/module/constants.js +1 -0
  151. package/lib/module/constants.js.map +1 -1
  152. package/lib/module/containers/GroupChannelPreviewContainer.js +4 -1
  153. package/lib/module/containers/GroupChannelPreviewContainer.js.map +1 -1
  154. package/lib/module/containers/SendbirdUIKitContainer.js +116 -80
  155. package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
  156. package/lib/module/contexts/ReactionCtx.js +85 -0
  157. package/lib/module/contexts/ReactionCtx.js.map +1 -0
  158. package/lib/module/contexts/SendbirdChatCtx.js +18 -6
  159. package/lib/module/contexts/SendbirdChatCtx.js.map +1 -1
  160. package/lib/module/contexts/UserProfileCtx.js +7 -0
  161. package/lib/module/contexts/UserProfileCtx.js.map +1 -1
  162. package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js +34 -39
  163. package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
  164. package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js +24 -13
  165. package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
  166. package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js +117 -33
  167. package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
  168. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +32 -14
  169. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  170. package/lib/module/domain/groupChannel/component/GroupChannelSuggestedMentionList.js +188 -0
  171. package/lib/module/domain/groupChannel/component/GroupChannelSuggestedMentionList.js.map +1 -0
  172. package/lib/module/domain/groupChannel/index.js +1 -0
  173. package/lib/module/domain/groupChannel/index.js.map +1 -1
  174. package/lib/module/domain/groupChannel/module/createGroupChannelModule.js +3 -0
  175. package/lib/module/domain/groupChannel/module/createGroupChannelModule.js.map +1 -1
  176. package/lib/module/domain/groupChannel/module/moduleContext.js +4 -4
  177. package/lib/module/domain/groupChannel/module/moduleContext.js.map +1 -1
  178. package/lib/module/domain/groupChannel/types.js.map +1 -1
  179. package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js +4 -3
  180. package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map +1 -1
  181. package/lib/module/domain/groupChannelList/component/GroupChannelListList.js +3 -2
  182. package/lib/module/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
  183. package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js +3 -2
  184. package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js.map +1 -1
  185. package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js +25 -0
  186. package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js.map +1 -0
  187. package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js +122 -0
  188. package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js.map +1 -0
  189. package/lib/module/domain/groupChannelNotifications/index.js +5 -0
  190. package/lib/module/domain/groupChannelNotifications/index.js.map +1 -0
  191. package/lib/module/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js +21 -0
  192. package/lib/module/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js.map +1 -0
  193. package/lib/module/domain/groupChannelNotifications/module/moduleContext.js +25 -0
  194. package/lib/module/domain/groupChannelNotifications/module/moduleContext.js.map +1 -0
  195. package/lib/module/domain/groupChannelNotifications/types.js +2 -0
  196. package/lib/module/domain/groupChannelNotifications/types.js.map +1 -0
  197. package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsList.js +3 -2
  198. package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsList.js.map +1 -1
  199. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +46 -6
  200. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  201. package/lib/module/domain/groupChannelSettings/module/moduleContext.js +10 -15
  202. package/lib/module/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
  203. package/lib/module/domain/groupChannelSettings/types.js.map +1 -1
  204. package/lib/module/domain/groupChannelUserList/types.js.map +1 -1
  205. package/lib/module/domain/userList/component/UserListList.js +3 -1
  206. package/lib/module/domain/userList/component/UserListList.js.map +1 -1
  207. package/lib/module/domain/userList/module/createUserListModule.js.map +1 -1
  208. package/lib/module/fragments/createGroupChannelCreateFragment.js.map +1 -1
  209. package/lib/module/fragments/createGroupChannelFragment.js +11 -4
  210. package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
  211. package/lib/module/fragments/createGroupChannelInviteFragment.js.map +1 -1
  212. package/lib/module/fragments/createGroupChannelNotificationsFragment.js +22 -0
  213. package/lib/module/fragments/createGroupChannelNotificationsFragment.js.map +1 -0
  214. package/lib/module/fragments/createGroupChannelSettingsFragment.js +3 -1
  215. package/lib/module/fragments/createGroupChannelSettingsFragment.js.map +1 -1
  216. package/lib/module/hooks/useConnection.js +3 -0
  217. package/lib/module/hooks/useConnection.js.map +1 -1
  218. package/lib/module/hooks/useContext.js +6 -0
  219. package/lib/module/hooks/useContext.js.map +1 -1
  220. package/lib/module/hooks/useKeyboardStatus.js +75 -0
  221. package/lib/module/hooks/useKeyboardStatus.js.map +1 -0
  222. package/lib/module/hooks/useMentionSuggestion.js +100 -0
  223. package/lib/module/hooks/useMentionSuggestion.js.map +1 -0
  224. package/lib/module/hooks/useMentionTextInput.js +128 -0
  225. package/lib/module/hooks/useMentionTextInput.js.map +1 -0
  226. package/lib/module/index.js +8 -3
  227. package/lib/module/index.js.map +1 -1
  228. package/lib/module/libs/EmojiManager.js +90 -0
  229. package/lib/module/libs/EmojiManager.js.map +1 -0
  230. package/lib/module/libs/MentionConfig.js +39 -0
  231. package/lib/module/libs/MentionConfig.js.map +1 -0
  232. package/lib/module/libs/MentionManager.js +223 -0
  233. package/lib/module/libs/MentionManager.js.map +1 -0
  234. package/lib/module/localization/StringSet.type.js +18 -6
  235. package/lib/module/localization/StringSet.type.js.map +1 -1
  236. package/lib/module/types.js.map +1 -1
  237. package/lib/module/utils/common.js +7 -0
  238. package/lib/module/utils/common.js.map +1 -0
  239. package/lib/module/version.js +1 -1
  240. package/lib/module/version.js.map +1 -1
  241. package/lib/typescript/__template__/types.d.ts +3 -3
  242. package/lib/typescript/src/components/ChannelCover.d.ts +1 -1
  243. package/lib/typescript/src/components/ChatFlatList.d.ts +1 -1
  244. package/lib/typescript/src/components/FileViewer.d.ts +1 -1
  245. package/lib/typescript/src/components/MessageRenderer/AdminMessage/index.d.ts +1 -1
  246. package/lib/typescript/src/components/MessageRenderer/FileMessage/BaseFileMessage.d.ts +2 -2
  247. package/lib/typescript/src/components/MessageRenderer/FileMessage/ImageFileMessage.d.ts +1 -1
  248. package/lib/typescript/src/components/MessageRenderer/FileMessage/VideoFileMessage.d.ts +1 -1
  249. package/lib/typescript/src/components/MessageRenderer/FileMessage/index.d.ts +11 -2
  250. package/lib/typescript/src/components/MessageRenderer/MessageDateSeparator.d.ts +1 -1
  251. package/lib/typescript/src/components/MessageRenderer/MessageIncomingAvatar.d.ts +1 -1
  252. package/lib/typescript/src/components/MessageRenderer/MessageIncomingSenderName.d.ts +1 -1
  253. package/lib/typescript/src/components/MessageRenderer/MessageOutgoingStatus.d.ts +1 -1
  254. package/lib/typescript/src/components/MessageRenderer/MessageTime.d.ts +1 -1
  255. package/lib/typescript/src/components/MessageRenderer/UnknownMessage/index.d.ts +1 -1
  256. package/lib/typescript/src/components/MessageRenderer/UserMessage/BaseUserMessage.d.ts +1 -1
  257. package/lib/typescript/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.d.ts +2 -2
  258. package/lib/typescript/src/components/MessageRenderer/UserMessage/index.d.ts +4 -1
  259. package/lib/typescript/src/components/MessageRenderer/index.d.ts +4 -3
  260. package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
  261. package/lib/typescript/src/components/ReactionAddons/BottomSheetReactionAddon.d.ts +8 -0
  262. package/lib/typescript/src/components/ReactionAddons/MessageReactionAddon.d.ts +6 -0
  263. package/lib/typescript/src/components/ReactionAddons/ReactionRoundedButton.d.ts +14 -0
  264. package/lib/typescript/src/components/ReactionAddons/index.d.ts +11 -0
  265. package/lib/typescript/src/components/ReactionBottomSheets/ReactionListBottomSheet.d.ts +3 -0
  266. package/lib/typescript/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.d.ts +3 -0
  267. package/lib/typescript/src/components/ReactionBottomSheets/index.d.ts +20 -0
  268. package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
  269. package/lib/typescript/src/components/StatusComposition.d.ts +1 -1
  270. package/lib/typescript/src/components/TypedPlaceholder.d.ts +1 -1
  271. package/lib/typescript/src/components/UserActionBar.d.ts +1 -1
  272. package/lib/typescript/src/components/UserSelectableBar.d.ts +1 -1
  273. package/lib/typescript/src/constants.d.ts +1 -0
  274. package/lib/typescript/src/containers/GroupChannelPreviewContainer.d.ts +1 -1
  275. package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +12 -3
  276. package/lib/typescript/src/contexts/LocalizationCtx.d.ts +2 -2
  277. package/lib/typescript/src/contexts/PlatformServiceCtx.d.ts +1 -1
  278. package/lib/typescript/src/contexts/ReactionCtx.d.ts +18 -0
  279. package/lib/typescript/src/contexts/SendbirdChatCtx.d.ts +10 -2
  280. package/lib/typescript/src/contexts/UserProfileCtx.d.ts +4 -4
  281. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/EditInput.d.ts +35 -7
  282. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/SendInput.d.ts +32 -5
  283. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/index.d.ts +19 -2
  284. package/lib/typescript/src/domain/groupChannel/component/GroupChannelSuggestedMentionList.d.ts +3 -0
  285. package/lib/typescript/src/domain/groupChannel/index.d.ts +1 -0
  286. package/lib/typescript/src/domain/groupChannel/module/createGroupChannelModule.d.ts +1 -1
  287. package/lib/typescript/src/domain/groupChannel/types.d.ts +24 -7
  288. package/lib/typescript/src/domain/groupChannelBannedUsers/types.d.ts +3 -3
  289. package/lib/typescript/src/domain/groupChannelList/types.d.ts +2 -2
  290. package/lib/typescript/src/domain/groupChannelModeration/types.d.ts +3 -3
  291. package/lib/typescript/src/domain/groupChannelMutedMembers/types.d.ts +3 -3
  292. package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.d.ts +3 -0
  293. package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsView.d.ts +2 -0
  294. package/lib/typescript/src/domain/groupChannelNotifications/index.d.ts +4 -0
  295. package/lib/typescript/src/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.d.ts +3 -0
  296. package/lib/typescript/src/domain/groupChannelNotifications/module/moduleContext.d.ts +3 -0
  297. package/lib/typescript/src/domain/groupChannelNotifications/types.d.ts +33 -0
  298. package/lib/typescript/src/domain/groupChannelOperators/types.d.ts +3 -3
  299. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +1 -1
  300. package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +3 -1
  301. package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +6 -6
  302. package/lib/typescript/src/domain/userList/component/UserListList.d.ts +2 -1
  303. package/lib/typescript/src/domain/userList/module/createUserListModule.d.ts +2 -1
  304. package/lib/typescript/src/fragments/createGroupChannelCreateFragment.d.ts +1 -1
  305. package/lib/typescript/src/fragments/createGroupChannelInviteFragment.d.ts +1 -1
  306. package/lib/typescript/src/fragments/createGroupChannelNotificationsFragment.d.ts +3 -0
  307. package/lib/typescript/src/hooks/useConnection.d.ts +1 -1
  308. package/lib/typescript/src/hooks/useContext.d.ts +4 -0
  309. package/lib/typescript/src/hooks/useKeyboardStatus.d.ts +6 -0
  310. package/lib/typescript/src/hooks/useMentionSuggestion.d.ts +17 -0
  311. package/lib/typescript/src/hooks/useMentionTextInput.d.ts +18 -0
  312. package/lib/typescript/src/index.d.ts +7 -2
  313. package/lib/typescript/src/libs/EmojiManager.d.ts +16 -0
  314. package/lib/typescript/src/libs/MentionConfig.d.ts +24 -0
  315. package/lib/typescript/src/libs/MentionManager.d.ts +61 -0
  316. package/lib/typescript/src/localization/StringSet.type.d.ts +16 -2
  317. package/lib/typescript/src/platform/createMediaService.expo.d.ts +1 -1
  318. package/lib/typescript/src/platform/createMediaService.native.d.ts +1 -1
  319. package/lib/typescript/src/platform/dynamicModule.d.ts +1 -1
  320. package/lib/typescript/src/platform/types.d.ts +5 -5
  321. package/lib/typescript/src/types.d.ts +13 -4
  322. package/lib/typescript/src/utils/common.d.ts +1 -0
  323. package/lib/typescript/src/version.d.ts +1 -1
  324. package/package.json +6 -6
  325. package/src/components/ChatFlatList.tsx +2 -1
  326. package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +17 -12
  327. package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +25 -18
  328. package/src/components/MessageRenderer/FileMessage/VideoFileMessage.tsx +20 -10
  329. package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +82 -14
  330. package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +135 -61
  331. package/src/components/MessageRenderer/UserMessage/index.tsx +8 -1
  332. package/src/components/MessageRenderer/index.tsx +39 -7
  333. package/src/components/ReactionAddons/BottomSheetReactionAddon.tsx +106 -0
  334. package/src/components/ReactionAddons/MessageReactionAddon.tsx +123 -0
  335. package/src/components/ReactionAddons/ReactionRoundedButton.tsx +71 -0
  336. package/src/components/ReactionAddons/index.tsx +7 -0
  337. package/src/components/ReactionBottomSheets/ReactionListBottomSheet.tsx +113 -0
  338. package/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.tsx +249 -0
  339. package/src/components/ReactionBottomSheets/index.tsx +24 -0
  340. package/src/constants.ts +2 -0
  341. package/src/containers/GroupChannelPreviewContainer.tsx +3 -1
  342. package/src/containers/SendbirdUIKitContainer.tsx +141 -83
  343. package/src/contexts/ReactionCtx.tsx +102 -0
  344. package/src/contexts/SendbirdChatCtx.tsx +24 -2
  345. package/src/contexts/UserProfileCtx.tsx +9 -0
  346. package/src/domain/groupChannel/component/GroupChannelInput/EditInput.tsx +56 -30
  347. package/src/domain/groupChannel/component/GroupChannelInput/SendInput.tsx +48 -19
  348. package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +137 -43
  349. package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +27 -10
  350. package/src/domain/groupChannel/component/GroupChannelSuggestedMentionList.tsx +173 -0
  351. package/src/domain/groupChannel/index.ts +1 -0
  352. package/src/domain/groupChannel/module/createGroupChannelModule.tsx +12 -1
  353. package/src/domain/groupChannel/module/moduleContext.tsx +4 -4
  354. package/src/domain/groupChannel/types.ts +28 -5
  355. package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.tsx +3 -2
  356. package/src/domain/groupChannelList/component/GroupChannelListList.tsx +2 -1
  357. package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.tsx +2 -1
  358. package/src/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.tsx +14 -0
  359. package/src/domain/groupChannelNotifications/component/GroupChannelNotificationsView.tsx +128 -0
  360. package/src/domain/groupChannelNotifications/index.ts +4 -0
  361. package/src/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.tsx +15 -0
  362. package/src/domain/groupChannelNotifications/module/moduleContext.tsx +31 -0
  363. package/src/domain/groupChannelNotifications/types.ts +38 -0
  364. package/src/domain/groupChannelOperators/component/GroupChannelOperatorsList.tsx +2 -1
  365. package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +42 -3
  366. package/src/domain/groupChannelSettings/module/moduleContext.tsx +9 -12
  367. package/src/domain/groupChannelSettings/types.ts +2 -0
  368. package/src/domain/groupChannelUserList/types.ts +7 -2
  369. package/src/domain/userList/component/UserListList.tsx +5 -1
  370. package/src/domain/userList/module/createUserListModule.tsx +3 -1
  371. package/src/fragments/createGroupChannelCreateFragment.tsx +8 -2
  372. package/src/fragments/createGroupChannelFragment.tsx +19 -6
  373. package/src/fragments/createGroupChannelInviteFragment.tsx +2 -2
  374. package/src/fragments/createGroupChannelNotificationsFragment.tsx +27 -0
  375. package/src/fragments/createGroupChannelSettingsFragment.tsx +2 -0
  376. package/src/hooks/useConnection.ts +3 -1
  377. package/src/hooks/useContext.ts +7 -0
  378. package/src/hooks/useKeyboardStatus.ts +54 -0
  379. package/src/hooks/useMentionSuggestion.ts +106 -0
  380. package/src/hooks/useMentionTextInput.ts +139 -0
  381. package/src/index.ts +13 -2
  382. package/src/libs/EmojiManager.ts +80 -0
  383. package/src/libs/MentionConfig.ts +40 -0
  384. package/src/libs/MentionManager.tsx +240 -0
  385. package/src/localization/StringSet.type.ts +38 -8
  386. package/src/types.ts +12 -0
  387. package/src/utils/common.ts +8 -0
  388. package/src/version.ts +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Pressable","View","useSafeAreaInsets","useChannelHandler","Icon","Image","createStyleSheet","useUIKitTheme","useUniqId","UNKNOWN_USER_ID","useReaction","useSendbirdChat","COMPONENT_NAME","BottomSheetReactionAddon","onClose","message","channel","emojiManager","currentUser","sdk","updateReactionFocusedItem","openReactionList","colors","id","left","right","onReactionUpdated","eventChannel","event","url","messageId","getMessage","includeReactions","channelUrl","channelType","emojiAll","allEmoji","slice","color","ui","reaction","default","styles","container","marginRight","marginLeft","map","key","reactionUserIds","reactions","find","it","userIds","currentUserIdx","indexOf","userId","reacted","onPress","deleteReaction","addReaction","pressed","button","backgroundColor","selected","background","enabled","uri","emoji","onBackground03","paddingTop","paddingBottom","paddingHorizontal","flexDirection","justifyContent","width","height","padding","borderRadius"],"sources":["BottomSheetReactionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { SendbirdBaseChannel, SendbirdBaseMessage, useUniqId } from '@sendbird/uikit-utils';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport { useReaction, useSendbirdChat } from '../../hooks/useContext';\n\ntype Props = {\n onClose: () => Promise<void>;\n channel: SendbirdBaseChannel;\n message: SendbirdBaseMessage;\n};\nconst COMPONENT_NAME = 'BottomSheetReactionAddon';\nconst BottomSheetReactionAddon = ({ onClose, message, channel }: Props) => {\n const { emojiManager, currentUser, sdk } = useSendbirdChat();\n const { updateReactionFocusedItem, openReactionList } = useReaction();\n const { colors } = useUIKitTheme();\n const id = useUniqId(COMPONENT_NAME);\n const { left, right } = useSafeAreaInsets();\n\n useChannelHandler(sdk, COMPONENT_NAME + id, {\n async onReactionUpdated(eventChannel, event) {\n if (channel?.url === eventChannel.url && event.messageId === message?.messageId) {\n updateReactionFocusedItem({\n message: await sdk.message.getMessage({\n includeReactions: true,\n messageId: message.messageId,\n channelUrl: message.channelUrl,\n channelType: message.channelType,\n }),\n });\n }\n },\n });\n\n const emojiAll = emojiManager.allEmoji.slice(0, 5);\n const color = colors.ui.reaction.default;\n\n return (\n <View style={[styles.container, { marginRight: right, marginLeft: left }]}>\n {emojiAll.map(({ key, url }) => {\n const reactionUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n const currentUserIdx = reactionUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = currentUserIdx > -1;\n\n const onPress = () => {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n onClose();\n };\n\n return (\n <Pressable\n key={key}\n onPress={onPress}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n );\n })}\n\n <Pressable\n onPress={async () => {\n await onClose();\n openReactionList({ channel, message });\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} style={styles.emoji} color={colors.onBackground03} />\n </Pressable>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingTop: 12,\n paddingBottom: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default BottomSheetReactionAddon;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAl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EAJR,CARsB;EAc9BV,KAAK,EAAE;IACLO,KAAK,EAAE,MADF;IAELC,MAAM,EAAE;EAFH;AAduB,CAAD,CAA/B;AAoBA,eAAe9D,wBAAf"}
@@ -0,0 +1,118 @@
1
+ import React from 'react';
2
+ import { Pressable } from 'react-native';
3
+ import { createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
4
+ import { getReactionCount } from '@sendbird/uikit-utils';
5
+ import { DEFAULT_LONG_PRESS_DELAY, UNKNOWN_USER_ID } from '../../constants';
6
+ import { useReaction, useSendbirdChat } from '../../hooks/useContext';
7
+ import ReactionRoundedButton from './ReactionRoundedButton';
8
+ const NUM_COL = 4;
9
+ const REACTION_MORE_KEY = 'reaction-more-button';
10
+
11
+ const getUserReacted = function (reaction) {
12
+ let userId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : UNKNOWN_USER_ID;
13
+ return reaction.userIds.indexOf(userId) > -1;
14
+ };
15
+
16
+ const createOnPressReaction = (reaction, channel, message, reacted) => {
17
+ return () => {
18
+ if (reacted) {
19
+ return channel.deleteReaction(message, reaction.key);
20
+ } else {
21
+ return channel.addReaction(message, reaction.key);
22
+ }
23
+ };
24
+ };
25
+
26
+ const createReactionButtons = (channel, message, getEmoji, emojiLimit, onOpenReactionList, onOpenReactionUserList, currentUserId) => {
27
+ const reactions = message.reactions ?? [];
28
+ const buttons = reactions.map((reaction, index) => {
29
+ const isNotLastOfRow = index % NUM_COL !== NUM_COL - 1;
30
+ const isNotLastOfCol = index < NUM_COL && reactions.length >= NUM_COL;
31
+ return /*#__PURE__*/React.createElement(Pressable, {
32
+ key: reaction.key,
33
+ onPress: createOnPressReaction(reaction, channel, message, getUserReacted(reaction, currentUserId)),
34
+ onLongPress: () => onOpenReactionUserList(index),
35
+ delayLongPress: DEFAULT_LONG_PRESS_DELAY
36
+ }, _ref => {
37
+ let {
38
+ pressed
39
+ } = _ref;
40
+ return /*#__PURE__*/React.createElement(ReactionRoundedButton, {
41
+ url: getEmoji(reaction.key).url,
42
+ count: getReactionCount(reaction),
43
+ reacted: pressed || getUserReacted(reaction, currentUserId),
44
+ style: [isNotLastOfRow && styles.marginRight, isNotLastOfCol && styles.marginBottom]
45
+ });
46
+ });
47
+ });
48
+
49
+ if (buttons.length < emojiLimit) {
50
+ buttons.push( /*#__PURE__*/React.createElement(Pressable, {
51
+ key: REACTION_MORE_KEY,
52
+ onPress: onOpenReactionList
53
+ }, _ref2 => {
54
+ let {
55
+ pressed
56
+ } = _ref2;
57
+ return /*#__PURE__*/React.createElement(ReactionRoundedButton.More, {
58
+ pressed: pressed
59
+ });
60
+ }));
61
+ }
62
+
63
+ return buttons;
64
+ };
65
+
66
+ const MessageReactionAddon = _ref3 => {
67
+ var _message$reactions;
68
+
69
+ let {
70
+ channel,
71
+ message
72
+ } = _ref3;
73
+ const {
74
+ colors
75
+ } = useUIKitTheme();
76
+ const {
77
+ emojiManager,
78
+ currentUser
79
+ } = useSendbirdChat();
80
+ const {
81
+ openReactionList,
82
+ openReactionUserList
83
+ } = useReaction();
84
+ if (!((_message$reactions = message.reactions) !== null && _message$reactions !== void 0 && _message$reactions.length)) return null;
85
+ const reactionButtons = createReactionButtons(channel, message, key => emojiManager.allEmojiMap[key], emojiManager.allEmoji.length, () => openReactionList({
86
+ channel,
87
+ message
88
+ }), focusIndex => openReactionUserList({
89
+ channel,
90
+ message,
91
+ focusIndex
92
+ }), currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId);
93
+ return /*#__PURE__*/React.createElement(Pressable, {
94
+ style: [styles.reactionContainer, {
95
+ backgroundColor: colors.background,
96
+ borderColor: colors.ui.reaction.rounded.enabled.background
97
+ }]
98
+ }, reactionButtons);
99
+ };
100
+
101
+ const styles = createStyleSheet({
102
+ reactionContainer: {
103
+ alignItems: 'stretch',
104
+ flexDirection: 'row',
105
+ flexWrap: 'wrap',
106
+ padding: 8,
107
+ borderRadius: 16,
108
+ borderWidth: 1
109
+ },
110
+ marginRight: {
111
+ marginRight: 4.5
112
+ },
113
+ marginBottom: {
114
+ marginBottom: 4
115
+ }
116
+ });
117
+ export default MessageReactionAddon;
118
+ //# sourceMappingURL=MessageReactionAddon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Pressable","createStyleSheet","useUIKitTheme","getReactionCount","DEFAULT_LONG_PRESS_DELAY","UNKNOWN_USER_ID","useReaction","useSendbirdChat","ReactionRoundedButton","NUM_COL","REACTION_MORE_KEY","getUserReacted","reaction","userId","userIds","indexOf","createOnPressReaction","channel","message","reacted","deleteReaction","key","addReaction","createReactionButtons","getEmoji","emojiLimit","onOpenReactionList","onOpenReactionUserList","currentUserId","reactions","buttons","map","index","isNotLastOfRow","isNotLastOfCol","length","pressed","url","styles","marginRight","marginBottom","push","MessageReactionAddon","colors","emojiManager","currentUser","openReactionList","openReactionUserList","reactionButtons","allEmojiMap","allEmoji","focusIndex","reactionContainer","backgroundColor","background","borderColor","ui","rounded","enabled","alignItems","flexDirection","flexWrap","padding","borderRadius","borderWidth"],"sources":["MessageReactionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\n\nimport type { Emoji } from '@sendbird/chat';\nimport { createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdBaseChannel, SendbirdBaseMessage, SendbirdReaction } from '@sendbird/uikit-utils';\nimport { getReactionCount } from '@sendbird/uikit-utils';\n\nimport { DEFAULT_LONG_PRESS_DELAY, UNKNOWN_USER_ID } from '../../constants';\nimport { useReaction, useSendbirdChat } from '../../hooks/useContext';\nimport ReactionRoundedButton from './ReactionRoundedButton';\n\nconst NUM_COL = 4;\nconst REACTION_MORE_KEY = 'reaction-more-button';\n\nconst getUserReacted = (reaction: SendbirdReaction, userId = UNKNOWN_USER_ID) => {\n return reaction.userIds.indexOf(userId) > -1;\n};\n\nconst createOnPressReaction = (\n reaction: SendbirdReaction,\n channel: SendbirdBaseChannel,\n message: SendbirdBaseMessage,\n reacted: boolean,\n) => {\n return () => {\n if (reacted) {\n return channel.deleteReaction(message, reaction.key);\n } else {\n return channel.addReaction(message, reaction.key);\n }\n };\n};\n\nconst createReactionButtons = (\n channel: SendbirdBaseChannel,\n message: SendbirdBaseMessage,\n getEmoji: (key: string) => Emoji,\n emojiLimit: number,\n onOpenReactionList: () => void,\n onOpenReactionUserList: (focusIndex: number) => void,\n currentUserId?: string,\n) => {\n const reactions = message.reactions ?? [];\n const buttons = reactions.map((reaction, index) => {\n const isNotLastOfRow = index % NUM_COL !== NUM_COL - 1;\n const isNotLastOfCol = index < NUM_COL && reactions.length >= NUM_COL;\n return (\n <Pressable\n key={reaction.key}\n onPress={createOnPressReaction(reaction, channel, message, getUserReacted(reaction, currentUserId))}\n onLongPress={() => onOpenReactionUserList(index)}\n delayLongPress={DEFAULT_LONG_PRESS_DELAY}\n >\n {({ pressed }) => (\n <ReactionRoundedButton\n url={getEmoji(reaction.key).url}\n count={getReactionCount(reaction)}\n reacted={pressed || getUserReacted(reaction, currentUserId)}\n style={[isNotLastOfRow && styles.marginRight, isNotLastOfCol && styles.marginBottom]}\n />\n )}\n </Pressable>\n );\n });\n if (buttons.length < emojiLimit) {\n buttons.push(\n <Pressable key={REACTION_MORE_KEY} onPress={onOpenReactionList}>\n {({ pressed }) => <ReactionRoundedButton.More pressed={pressed} />}\n </Pressable>,\n );\n }\n\n return buttons;\n};\n\nconst MessageReactionAddon = ({ channel, message }: { channel: SendbirdBaseChannel; message: SendbirdBaseMessage }) => {\n const { colors } = useUIKitTheme();\n const { emojiManager, currentUser } = useSendbirdChat();\n const { openReactionList, openReactionUserList } = useReaction();\n\n if (!message.reactions?.length) return null;\n\n const reactionButtons = createReactionButtons(\n channel,\n message,\n (key) => emojiManager.allEmojiMap[key],\n emojiManager.allEmoji.length,\n () => openReactionList({ channel, message }),\n (focusIndex) => openReactionUserList({ channel, message, focusIndex }),\n currentUser?.userId,\n );\n\n return (\n <Pressable\n style={[\n styles.reactionContainer,\n { backgroundColor: colors.background, borderColor: colors.ui.reaction.rounded.enabled.background },\n ]}\n >\n {reactionButtons}\n </Pressable>\n );\n};\n\nconst styles = createStyleSheet({\n reactionContainer: {\n alignItems: 'stretch',\n flexDirection: 'row',\n flexWrap: 'wrap',\n padding: 8,\n borderRadius: 16,\n borderWidth: 1,\n },\n marginRight: {\n marginRight: 4.5,\n },\n marginBottom: {\n marginBottom: 4,\n },\n});\n\nexport default MessageReactionAddon;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,QAA0B,cAA1B;AAGA,SAASC,gBAAT,EAA2BC,aAA3B,QAAgD,yCAAhD;AAEA,SAASC,gBAAT,QAAiC,uBAAjC;AAEA,SAASC,wBAAT,EAAmCC,eAAnC,QAA0D,iBAA1D;AACA,SAASC,WAAT,EAAsBC,eAAtB,QAA6C,wBAA7C;AACA,OAAOC,qBAAP,MAAkC,yBAAlC;AAEA,MAAMC,OAAO,GAAG,CAAhB;AACA,MAAMC,iBAAiB,GAAG,sBAA1B;;AAEA,MAAMC,cAAc,GAAG,UAACC,QAAD,EAA0D;EAAA,IAA7BC,MAA6B,uEAApBR,eAAoB;EAC/E,OAAOO,QAAQ,CAACE,OAAT,CAAiBC,OAAjB,CAAyBF,MAAzB,IAAmC,CAAC,CAA3C;AACD,CAFD;;AAIA,MAAMG,qBAAqB,GAAG,CAC5BJ,QAD4B,EAE5BK,OAF4B,EAG5BC,OAH4B,EAI5BC,OAJ4B,KAKzB;EACH,OAAO,MAAM;IACX,IAAIA,OAAJ,EAAa;MACX,OAAOF,OAAO,CAACG,cAAR,CAAuBF,OAAvB,EAAgCN,QAAQ,CAACS,GAAzC,CAAP;IACD,CAFD,MAEO;MACL,OAAOJ,OAAO,CAACK,WAAR,CAAoBJ,OAApB,EAA6BN,QAAQ,CAACS,GAAtC,CAAP;IACD;EACF,CAND;AAOD,CAbD;;AAeA,MAAME,qBAAqB,GAAG,CAC5BN,OAD4B,EAE5BC,OAF4B,EAG5BM,QAH4B,EAI5BC,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U,EAAE,SADK;IAEjBC,aAAa,EAAE,KAFE;IAGjBC,QAAQ,EAAE,MAHO;IAIjBC,OAAO,EAAE,CAJQ;IAKjBC,YAAY,EAAE,EALG;IAMjBC,WAAW,EAAE;EANI,CADW;EAS9BzB,WAAW,EAAE;IACXA,WAAW,EAAE;EADF,CATiB;EAY9BC,YAAY,EAAE;IACZA,YAAY,EAAE;EADF;AAZgB,CAAD,CAA/B;AAiBA,eAAeE,oBAAf"}
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import { Icon, Image, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
4
+ import { truncatedCount } from '@sendbird/uikit-utils';
5
+
6
+ const ReactionRoundedButton = _ref => {
7
+ let {
8
+ url,
9
+ count,
10
+ reacted,
11
+ style
12
+ } = _ref;
13
+ const {
14
+ colors
15
+ } = useUIKitTheme();
16
+ const color = colors.ui.reaction.rounded;
17
+ return /*#__PURE__*/React.createElement(View, {
18
+ style: [styles.reactionContainer, {
19
+ backgroundColor: reacted ? color.selected.background : color.enabled.background
20
+ }, style]
21
+ }, /*#__PURE__*/React.createElement(Image, {
22
+ source: {
23
+ uri: url
24
+ },
25
+ style: styles.emoji
26
+ }), /*#__PURE__*/React.createElement(Text, {
27
+ caption4: true,
28
+ color: colors.onBackground01,
29
+ numberOfLines: 1,
30
+ style: styles.count
31
+ }, truncatedCount(count, 99, '')));
32
+ };
33
+
34
+ ReactionRoundedButton.More = _ref2 => {
35
+ let {
36
+ pressed
37
+ } = _ref2;
38
+ const {
39
+ colors
40
+ } = useUIKitTheme();
41
+ const color = colors.ui.reaction.rounded;
42
+ return /*#__PURE__*/React.createElement(View, {
43
+ style: [styles.reactionContainer, {
44
+ backgroundColor: pressed ? color.selected.background : color.enabled.background
45
+ }]
46
+ }, /*#__PURE__*/React.createElement(Icon, {
47
+ icon: 'emoji-more',
48
+ color: colors.onBackground03,
49
+ size: 20
50
+ }));
51
+ };
52
+
53
+ const styles = createStyleSheet({
54
+ reactionContainer: {
55
+ flexDirection: 'row',
56
+ justifyContent: 'center',
57
+ alignItems: 'center',
58
+ width: 52,
59
+ borderRadius: 24,
60
+ paddingVertical: 5,
61
+ paddingHorizontal: 8
62
+ },
63
+ emoji: {
64
+ width: 20,
65
+ height: 20,
66
+ marginRight: 4
67
+ },
68
+ count: {
69
+ width: 13,
70
+ textAlign: 'left'
71
+ }
72
+ });
73
+ export default ReactionRoundedButton;
74
+ //# sourceMappingURL=ReactionRoundedButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Icon","Image","Text","createStyleSheet","useUIKitTheme","truncatedCount","ReactionRoundedButton","url","count","reacted","style","colors","color","ui","reaction","rounded","styles","reactionContainer","backgroundColor","selected","background","enabled","uri","emoji","onBackground01","More","pressed","onBackground03","flexDirection","justifyContent","alignItems","width","borderRadius","paddingVertical","paddingHorizontal","height","marginRight","textAlign"],"sources":["ReactionRoundedButton.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport { Icon, Image, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { truncatedCount } from '@sendbird/uikit-utils';\n\ntype Props = {\n url: string;\n count: number;\n reacted: boolean;\n style: StyleProp<ViewStyle>;\n};\n\nconst ReactionRoundedButton = ({ url, count, reacted, style }: Props) => {\n const { colors } = useUIKitTheme();\n const color = colors.ui.reaction.rounded;\n\n return (\n <View\n style={[\n styles.reactionContainer,\n { backgroundColor: reacted ? color.selected.background : color.enabled.background },\n style,\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n <Text caption4 color={colors.onBackground01} numberOfLines={1} style={styles.count}>\n {truncatedCount(count, 99, '')}\n </Text>\n </View>\n );\n};\n\nReactionRoundedButton.More = ({ pressed }: { pressed: boolean }) => {\n const { colors } = useUIKitTheme();\n const color = colors.ui.reaction.rounded;\n\n return (\n <View\n style={[\n styles.reactionContainer,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} color={colors.onBackground03} size={20} />\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n reactionContainer: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n width: 52,\n borderRadius: 24,\n paddingVertical: 5,\n paddingHorizontal: 8,\n },\n emoji: {\n width: 20,\n height: 20,\n marginRight: 4,\n },\n count: {\n width: 13,\n textAlign: 'left',\n },\n});\n\nexport default ReactionRoundedButton;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAoBC,IAApB,QAA2C,cAA3C;AAEA,SAASC,IAAT,EAAeC,KAAf,EAAsBC,IAAtB,EAA4BC,gBAA5B,EAA8CC,aAA9C,QAAmE,yCAAnE;AACA,SAASC,cAAT,QAA+B,uBAA/B;;AASA,MAAMC,qBAAqB,GAAG,QAA2C;EAAA,IAA1C;IAAEC,GAAF;IAAOC,KAAP;IAAcC,OAAd;IAAuBC;EAAvB,CAA0C;EACvE,MAAM;IAAEC;EAAF,IAAaP,aAAa,EAAhC;EACA,MAAMQ,KAAK,GAAGD,MAAM,CAACE,EAAP,CAAUC,QAAV,CAAmBC,OAAjC;EAEA,oBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACLC,MAAM,CAACC,iBADF,EAEL;MAAEC,eAAe,EAAET,OAAO,GAAGG,KAAK,CAACO,QAAN,CAAeC,UAAlB,GAA+BR,KAAK,CAACS,OAAN,CAAcD;IAAvE,CAFK,EAGLV,KAHK;EADT,gBAOE,oBAAC,KAAD;IAAO,MAAM,EAAE;MAAEY,GAAG,EAAEf;IAAP,CAAf;IAA6B,KAAK,EAAES,MAAM,CAACO;EAA3C,EAPF,eAQE,oBAAC,IAAD;IAAM,QAAQ,MAAd;IAAe,KAAK,EAAEZ,MAAM,CAACa,cAA7B;IAA6C,aAAa,EAAE,CAA5D;IAA+D,KAAK,EAAER,MAAM,CAACR;EAA7E,GACGH,cAAc,CAACG,KAAD,EAAQ,EAAR,EAAY,EAAZ,CADjB,CARF,CADF;AAcD,CAlBD;;AAoBAF,qBAAqB,CAACmB,IAAtB,GAA6B,SAAuC;EAAA,IAAtC;IAAEC;EAAF,CAAsC;EAClE,MAAM;IAAEf;EAAF,IAAaP,aAAa,EAAhC;EACA,MAAMQ,KAAK,GAAGD,MAAM,CAACE,EAAP,CAAUC,QAAV,CAAmBC,OAAjC;EAEA,oBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACLC,MAAM,CAACC,iBADF,EAEL;MAAEC,eAAe,EAAEQ,OAAO,GAAGd,KAAK,CAACO,QAAN,CAAeC,UAAlB,GAA+BR,KAAK,CAACS,OAAN,CAAcD;IAAvE,CAFK;EADT,gBAME,oBAAC,IAAD;IAAM,IAAI,EAAE,YAAZ;IAA0B,KAAK,EAAET,MAAM,CAACgB,cAAxC;IAAwD,IAAI,EAAE;EAA9D,EANF,CADF;AAUD,CAdD;;AAgBA,MAAMX,MAAM,GAAGb,gBAAgB,CAAC;EAC9Bc,iBAAiB,EAAE;IACjBW,aAAa,EAAE,KADE;IAEjBC,cAAc,EAAE,QAFC;IAGjBC,UAAU,EAAE,QAHK;IAIjBC,KAAK,EAAE,EAJU;IAKjBC,YAAY,EAAE,EALG;IAMjBC,eAAe,EAAE,CANA;IAOjBC,iBAAiB,EAAE;EAPF,CADW;EAU9BX,KAAK,EAAE;IACLQ,KAAK,EAAE,EADF;IAELI,MAAM,EAAE,EAFH;IAGLC,WAAW,EAAE;EAHR,CAVuB;EAe9B5B,KAAK,EAAE;IACLuB,KAAK,EAAE,EADF;IAELM,SAAS,EAAE;EAFN;AAfuB,CAAD,CAA/B;AAqBA,eAAe/B,qBAAf"}
@@ -0,0 +1,7 @@
1
+ import BottomSheet from './BottomSheetReactionAddon';
2
+ import Message from './MessageReactionAddon';
3
+ export const ReactionAddons = {
4
+ BottomSheet,
5
+ Message
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BottomSheet","Message","ReactionAddons"],"sources":["index.tsx"],"sourcesContent":["import BottomSheet from './BottomSheetReactionAddon';\nimport Message from './MessageReactionAddon';\n\nexport const ReactionAddons = {\n BottomSheet,\n Message,\n};\n"],"mappings":"AAAA,OAAOA,WAAP,MAAwB,4BAAxB;AACA,OAAOC,OAAP,MAAoB,wBAApB;AAEA,OAAO,MAAMC,cAAc,GAAG;EAC5BF,WAD4B;EAE5BC;AAF4B,CAAvB"}
@@ -0,0 +1,135 @@
1
+ import React from 'react';
2
+ import { FlatList, Pressable, View, useWindowDimensions } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
5
+ import { UNKNOWN_USER_ID } from '../../constants';
6
+ const NUM_COLUMN = 6;
7
+
8
+ const ReactionListBottomSheet = _ref => {
9
+ let {
10
+ visible,
11
+ onClose,
12
+ onDismiss,
13
+ reactionCtx,
14
+ chatCtx
15
+ } = _ref;
16
+ const {
17
+ width
18
+ } = useWindowDimensions();
19
+ const {
20
+ bottom,
21
+ left,
22
+ right
23
+ } = useSafeAreaInsets();
24
+ const {
25
+ colors
26
+ } = useUIKitTheme();
27
+ const {
28
+ currentUser,
29
+ emojiManager
30
+ } = chatCtx;
31
+ const {
32
+ channel,
33
+ message
34
+ } = reactionCtx;
35
+ const color = colors.ui.reaction.default;
36
+ return /*#__PURE__*/React.createElement(Modal, {
37
+ type: 'slide',
38
+ visible: Boolean(visible && channel && message),
39
+ onClose: onClose,
40
+ onDismiss: onDismiss,
41
+ backgroundStyle: styles.modal
42
+ }, /*#__PURE__*/React.createElement(View, {
43
+ style: [styles.container, {
44
+ width,
45
+ paddingBottom: bottom,
46
+ backgroundColor: colors.ui.dialog.default.none.background,
47
+ paddingLeft: left + styles.container.paddingHorizontal,
48
+ paddingRight: right + styles.container.paddingHorizontal
49
+ }]
50
+ }, /*#__PURE__*/React.createElement(FlatList, {
51
+ data: emojiManager.allEmoji,
52
+ numColumns: NUM_COLUMN,
53
+ keyExtractor: item => item.key,
54
+ contentContainerStyle: styles.flatlist,
55
+ ItemSeparatorComponent: () => /*#__PURE__*/React.createElement(View, {
56
+ style: {
57
+ height: 16
58
+ }
59
+ }),
60
+ renderItem: _ref2 => {
61
+ var _message$reactions, _message$reactions$fi;
62
+
63
+ let {
64
+ item: {
65
+ key,
66
+ url
67
+ }
68
+ } = _ref2;
69
+ const reactedUserIds = (message === null || message === void 0 ? void 0 : (_message$reactions = message.reactions) === null || _message$reactions === void 0 ? void 0 : (_message$reactions$fi = _message$reactions.find(it => it.key === key)) === null || _message$reactions$fi === void 0 ? void 0 : _message$reactions$fi.userIds) ?? [];
70
+ const idx = reactedUserIds.indexOf((currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId) ?? UNKNOWN_USER_ID);
71
+ const reacted = idx > -1;
72
+ return /*#__PURE__*/React.createElement(View, {
73
+ style: styles.emojiItem
74
+ }, /*#__PURE__*/React.createElement(Pressable, {
75
+ key: key,
76
+ onPress: () => {
77
+ if (message && channel) {
78
+ if (reacted) channel.deleteReaction(message, key);else channel.addReaction(message, key);
79
+ }
80
+
81
+ onClose();
82
+ },
83
+ style: _ref3 => {
84
+ let {
85
+ pressed
86
+ } = _ref3;
87
+ return [styles.button, {
88
+ backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background
89
+ }];
90
+ }
91
+ }, /*#__PURE__*/React.createElement(Image, {
92
+ source: {
93
+ uri: url
94
+ },
95
+ style: styles.emoji
96
+ })));
97
+ }
98
+ })));
99
+ };
100
+
101
+ const styles = createStyleSheet({
102
+ container: {
103
+ overflow: 'hidden',
104
+ borderTopLeftRadius: 8,
105
+ borderTopRightRadius: 8,
106
+ paddingTop: 16,
107
+ paddingHorizontal: 18,
108
+ flexDirection: 'row'
109
+ },
110
+ modal: {
111
+ alignItems: 'center',
112
+ justifyContent: 'flex-end'
113
+ },
114
+ flatlist: {
115
+ width: '100%',
116
+ flexDirection: 'column',
117
+ justifyContent: 'space-between'
118
+ },
119
+ emojiItem: {
120
+ width: `${100 / NUM_COLUMN}%`,
121
+ alignItems: 'center'
122
+ },
123
+ button: {
124
+ width: 44,
125
+ height: 44,
126
+ padding: 4,
127
+ borderRadius: 8
128
+ },
129
+ emoji: {
130
+ width: '100%',
131
+ height: '100%'
132
+ }
133
+ });
134
+ export default ReactionListBottomSheet;
135
+ //# sourceMappingURL=ReactionListBottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","FlatList","Pressable","View","useWindowDimensions","useSafeAreaInsets","Image","Modal","createStyleSheet","useUIKitTheme","UNKNOWN_USER_ID","NUM_COLUMN","ReactionListBottomSheet","visible","onClose","onDismiss","reactionCtx","chatCtx","width","bottom","left","right","colors","currentUser","emojiManager","channel","message","color","ui","reaction","default","Boolean","styles","modal","container","paddingBottom","backgroundColor","dialog","none","background","paddingLeft","paddingHorizontal","paddingRight","allEmoji","item","key","flatlist","height","url","reactedUserIds","reactions","find","it","userIds","idx","indexOf","userId","reacted","emojiItem","deleteReaction","addReaction","pressed","button","selected","enabled","uri","emoji","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","flexDirection","alignItems","justifyContent","padding","borderRadius"],"sources":["ReactionListBottomSheet.tsx"],"sourcesContent":["import React from 'react';\nimport { FlatList, Pressable, View, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport type { ReactionBottomSheetProps } from './index';\n\nconst NUM_COLUMN = 6;\nconst ReactionListBottomSheet = ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => {\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n\n const { currentUser, emojiManager } = chatCtx;\n const { channel, message } = reactionCtx;\n const color = colors.ui.reaction.default;\n\n return (\n <Modal\n type={'slide'}\n visible={Boolean(visible && channel && message)}\n onClose={onClose}\n onDismiss={onDismiss}\n backgroundStyle={styles.modal}\n >\n <View\n style={[\n styles.container,\n {\n width,\n paddingBottom: bottom,\n backgroundColor: colors.ui.dialog.default.none.background,\n paddingLeft: left + styles.container.paddingHorizontal,\n paddingRight: right + styles.container.paddingHorizontal,\n },\n ]}\n >\n <FlatList\n data={emojiManager.allEmoji}\n numColumns={NUM_COLUMN}\n keyExtractor={(item) => item.key}\n contentContainerStyle={styles.flatlist}\n ItemSeparatorComponent={() => <View style={{ height: 16 }} />}\n renderItem={({ item: { key, url } }) => {\n const reactedUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n\n const idx = reactedUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = idx > -1;\n\n return (\n <View style={styles.emojiItem}>\n <Pressable\n key={key}\n onPress={() => {\n if (message && channel) {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n }\n onClose();\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n </View>\n );\n }}\n />\n </View>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n paddingTop: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n },\n modal: {\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n flatlist: {\n width: '100%',\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n emojiItem: {\n width: `${100 / NUM_COLUMN}%`,\n alignItems: 'center',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default ReactionListBottomSheet;\n"],"mappings":"AAAA,OAAOA,KAAP,MA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, View, useWindowDimensions } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import { Avatar, Divider, Image, Modal, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
5
+ import { getReactionCount, truncatedCount } from '@sendbird/uikit-utils';
6
+
7
+ const ReactionUserListBottomSheet = _ref => {
8
+ let {
9
+ visible,
10
+ onClose,
11
+ onDismiss,
12
+ reactionCtx,
13
+ chatCtx,
14
+ localizationCtx,
15
+ userProfileCtx
16
+ } = _ref;
17
+ const {
18
+ width
19
+ } = useWindowDimensions();
20
+ const {
21
+ bottom,
22
+ left,
23
+ right
24
+ } = useSafeAreaInsets();
25
+ const {
26
+ colors
27
+ } = useUIKitTheme();
28
+ const [tabIndex, setTabIndex] = useState(0);
29
+ const scrollRef = useRef();
30
+ const tabIndicatorValue = useRef([]);
31
+ const tabIndicatorAnimated = useRef({
32
+ x: new Animated.Value(0),
33
+ width: new Animated.Value(0)
34
+ }).current;
35
+ const focusedWithLayoutCalculated = useRef(false);
36
+ const {
37
+ emojiManager
38
+ } = chatCtx;
39
+ const {
40
+ channel,
41
+ message,
42
+ focusIndex
43
+ } = reactionCtx;
44
+ const {
45
+ STRINGS
46
+ } = localizationCtx;
47
+ const color = colors.ui.reaction.default;
48
+ const reactions = (message === null || message === void 0 ? void 0 : message.reactions) ?? [];
49
+ const focusedReaction = reactions[tabIndex];
50
+ const containerSafeArea = {
51
+ paddingLeft: left + styles.layout.paddingHorizontal,
52
+ paddingRight: right + styles.layout.paddingHorizontal
53
+ };
54
+
55
+ const focusTab = function (index) {
56
+ let animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
57
+ const indicatorValue = tabIndicatorValue.current[index];
58
+
59
+ if (indicatorValue) {
60
+ var _scrollRef$current;
61
+
62
+ setTabIndex(index);
63
+ animateTabIndicator(indicatorValue.x, indicatorValue.width, animated);
64
+ (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollTo({
65
+ x: indicatorValue.x,
66
+ animated
67
+ });
68
+ }
69
+ };
70
+
71
+ const animateTabIndicator = function (x, width) {
72
+ let animated = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
73
+ const baseConfig = {
74
+ duration: animated ? 300 : 0,
75
+ easing: Easing.inOut(Easing.ease),
76
+ useNativeDriver: false
77
+ };
78
+ Animated.parallel([Animated.timing(tabIndicatorAnimated.x, {
79
+ toValue: x,
80
+ ...baseConfig
81
+ }), Animated.timing(tabIndicatorAnimated.width, {
82
+ toValue: width,
83
+ ...baseConfig
84
+ })]).start();
85
+ };
86
+
87
+ const layoutCalculated = () => {
88
+ return tabIndicatorValue.current.length === reactions.length && tabIndicatorValue.current.every(Boolean);
89
+ };
90
+
91
+ useEffect(() => {
92
+ if (!visible) {
93
+ tabIndicatorValue.current = [];
94
+ tabIndicatorAnimated.x = new Animated.Value(0);
95
+ tabIndicatorAnimated.width = new Animated.Value(0);
96
+ focusedWithLayoutCalculated.current = false;
97
+ }
98
+ }, [visible]);
99
+
100
+ const renderTabs = () => {
101
+ return /*#__PURE__*/React.createElement(Pressable, {
102
+ style: styles.tabsWrapper
103
+ }, reactions.map((reaction, index) => {
104
+ const isFocused = (focusedReaction === null || focusedReaction === void 0 ? void 0 : focusedReaction.key) === reaction.key;
105
+ const isLastItem = reactions.length - 1 === index;
106
+ const emoji = emojiManager.allEmojiMap[reaction.key];
107
+ return /*#__PURE__*/React.createElement(Pressable, {
108
+ key: reaction.key,
109
+ style: [styles.tabItem, isLastItem && {
110
+ marginRight: styles.layout.marginRight
111
+ }],
112
+ onPress: () => focusTab(index),
113
+ onLayout: e => {
114
+ tabIndicatorValue.current[index] = e.nativeEvent.layout;
115
+
116
+ if (layoutCalculated()) {
117
+ if (focusedWithLayoutCalculated.current) {
118
+ focusTab(tabIndex, false);
119
+ } else {
120
+ focusedWithLayoutCalculated.current = true;
121
+ focusTab(focusIndex);
122
+ }
123
+ }
124
+ }
125
+ }, /*#__PURE__*/React.createElement(Image, {
126
+ source: {
127
+ uri: emoji.url
128
+ },
129
+ style: styles.tabEmoji
130
+ }), /*#__PURE__*/React.createElement(Text, {
131
+ button: true,
132
+ color: isFocused ? color.selected.highlight : color.enabled.highlight
133
+ }, truncatedCount(getReactionCount(reaction))));
134
+ }), /*#__PURE__*/React.createElement(Animated.View, {
135
+ style: [styles.tabIndicator, {
136
+ left: tabIndicatorAnimated.x,
137
+ width: tabIndicatorAnimated.width,
138
+ backgroundColor: color.selected.highlight
139
+ }]
140
+ }));
141
+ };
142
+
143
+ const renderPage = () => {
144
+ return /*#__PURE__*/React.createElement(React.Fragment, null, focusedReaction === null || focusedReaction === void 0 ? void 0 : focusedReaction.userIds.map(userId => {
145
+ if (channel !== null && channel !== void 0 && channel.isGroupChannel()) {
146
+ const user = channel.members.find(x => x.userId === userId);
147
+ return /*#__PURE__*/React.createElement(Pressable, {
148
+ key: userId,
149
+ onPress: async () => {
150
+ if (user) {
151
+ await onClose();
152
+ userProfileCtx.show(user);
153
+ }
154
+ },
155
+ style: styles.pageItem
156
+ }, /*#__PURE__*/React.createElement(Avatar, {
157
+ size: 36,
158
+ uri: user === null || user === void 0 ? void 0 : user.profileUrl,
159
+ containerStyle: styles.avatar
160
+ }), /*#__PURE__*/React.createElement(Text, {
161
+ subtitle2: true,
162
+ style: {
163
+ flex: 1
164
+ }
165
+ }, (user === null || user === void 0 ? void 0 : user.nickname) || STRINGS.LABELS.USER_NO_NAME));
166
+ }
167
+
168
+ return null;
169
+ }));
170
+ };
171
+
172
+ return /*#__PURE__*/React.createElement(Modal, {
173
+ type: 'slide-no-gesture',
174
+ visible: Boolean(visible && channel && message),
175
+ onClose: onClose,
176
+ onDismiss: onDismiss,
177
+ backgroundStyle: styles.modal
178
+ }, /*#__PURE__*/React.createElement(View, {
179
+ style: [styles.container, {
180
+ width,
181
+ paddingBottom: bottom,
182
+ backgroundColor: colors.ui.dialog.default.none.background
183
+ }]
184
+ }, /*#__PURE__*/React.createElement(ScrollView, {
185
+ ref: scrollRef,
186
+ horizontal: true,
187
+ bounces: false,
188
+ showsHorizontalScrollIndicator: false,
189
+ contentContainerStyle: [containerSafeArea, styles.tabsContainer]
190
+ }, renderTabs()), /*#__PURE__*/React.createElement(Divider, {
191
+ style: {
192
+ top: -1
193
+ }
194
+ }), /*#__PURE__*/React.createElement(ScrollView, {
195
+ bounces: false,
196
+ showsVerticalScrollIndicator: false,
197
+ style: styles.pageContainer,
198
+ contentContainerStyle: containerSafeArea
199
+ }, renderPage())));
200
+ };
201
+
202
+ const styles = createStyleSheet({
203
+ layout: {
204
+ paddingHorizontal: 16,
205
+ marginRight: 0
206
+ },
207
+ container: {
208
+ overflow: 'hidden',
209
+ borderTopLeftRadius: 8,
210
+ borderTopRightRadius: 8,
211
+ paddingTop: 16,
212
+ alignItems: 'center'
213
+ },
214
+ modal: {
215
+ alignItems: 'center',
216
+ justifyContent: 'flex-end'
217
+ },
218
+ tabsContainer: {
219
+ flexGrow: 1
220
+ },
221
+ tabsWrapper: {
222
+ flexGrow: 1,
223
+ flexDirection: 'row',
224
+ alignItems: 'flex-start',
225
+ justifyContent: 'center',
226
+ height: 44
227
+ },
228
+ tabItem: {
229
+ marginRight: 16,
230
+ flexDirection: 'row',
231
+ alignItems: 'center',
232
+ justifyContent: 'center'
233
+ },
234
+ tabEmoji: {
235
+ width: 28,
236
+ height: 28,
237
+ marginRight: 4
238
+ },
239
+ tabIndicator: {
240
+ position: 'absolute',
241
+ bottom: 0,
242
+ height: 3
243
+ },
244
+ pageContainer: {
245
+ height: 216,
246
+ width: '100%'
247
+ },
248
+ pageItem: {
249
+ flexDirection: 'row',
250
+ width: '100%',
251
+ height: 48,
252
+ alignItems: 'center'
253
+ },
254
+ avatar: {
255
+ marginRight: 16
256
+ }
257
+ });
258
+ export default ReactionUserListBottomSheet;
259
+ //# sourceMappingURL=ReactionUserListBottomSheet.js.map