@sendbird/uikit-react-native 3.1.2 → 3.3.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 (337) hide show
  1. package/README.md +67 -42
  2. package/lib/commonjs/components/ChannelInput/EditInput.js +2 -11
  3. package/lib/commonjs/components/ChannelInput/EditInput.js.map +1 -1
  4. package/lib/commonjs/components/ChannelInput/MessageToReplyPreview.js +145 -0
  5. package/lib/commonjs/components/ChannelInput/MessageToReplyPreview.js.map +1 -0
  6. package/lib/commonjs/components/ChannelInput/SendInput.js +149 -323
  7. package/lib/commonjs/components/ChannelInput/SendInput.js.map +1 -1
  8. package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js +238 -0
  9. package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js.map +1 -0
  10. package/lib/commonjs/components/ChannelInput/index.js +34 -3
  11. package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
  12. package/lib/commonjs/components/ChannelMessageList/index.js +148 -116
  13. package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
  14. package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js +24 -13
  15. package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js.map +1 -1
  16. package/lib/commonjs/components/GroupChannelMessageRenderer/index.js +134 -6
  17. package/lib/commonjs/components/GroupChannelMessageRenderer/index.js.map +1 -1
  18. package/lib/commonjs/components/MessageSearchResultItem.js +1 -0
  19. package/lib/commonjs/components/MessageSearchResultItem.js.map +1 -1
  20. package/lib/commonjs/components/OpenChannelMessageRenderer/index.js +1 -0
  21. package/lib/commonjs/components/OpenChannelMessageRenderer/index.js.map +1 -1
  22. package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +2 -2
  23. package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -1
  24. package/lib/commonjs/components/ReactionBottomSheets/index.js.map +1 -1
  25. package/lib/commonjs/components/StatusComposition.js.map +1 -1
  26. package/lib/commonjs/constants.js +5 -1
  27. package/lib/commonjs/constants.js.map +1 -1
  28. package/lib/commonjs/containers/GroupChannelPreviewContainer.js +1 -0
  29. package/lib/commonjs/containers/GroupChannelPreviewContainer.js.map +1 -1
  30. package/lib/commonjs/containers/InternalErrorBoundaryContainer.js.map +1 -1
  31. package/lib/commonjs/containers/SendbirdUIKitContainer.js +72 -34
  32. package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
  33. package/lib/commonjs/contexts/PlatformServiceCtx.js +16 -12
  34. package/lib/commonjs/contexts/PlatformServiceCtx.js.map +1 -1
  35. package/lib/commonjs/contexts/ReactionCtx.js +3 -2
  36. package/lib/commonjs/contexts/ReactionCtx.js.map +1 -1
  37. package/lib/commonjs/contexts/SendbirdChatCtx.js +2 -0
  38. package/lib/commonjs/contexts/SendbirdChatCtx.js.map +1 -1
  39. package/lib/commonjs/domain/groupChannel/component/GroupChannelHeader.js +14 -4
  40. package/lib/commonjs/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
  41. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +28 -42
  42. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  43. package/lib/commonjs/domain/groupChannel/module/moduleContext.js +109 -5
  44. package/lib/commonjs/domain/groupChannel/module/moduleContext.js.map +1 -1
  45. package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
  46. package/lib/commonjs/domain/userList/types.js.map +1 -1
  47. package/lib/commonjs/fragments/createGroupChannelFragment.js +34 -7
  48. package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
  49. package/lib/commonjs/fragments/createMessageSearchFragment.js +1 -1
  50. package/lib/commonjs/fragments/createMessageSearchFragment.js.map +1 -1
  51. package/lib/commonjs/hooks/useChannelInputItems.js +211 -0
  52. package/lib/commonjs/hooks/useChannelInputItems.js.map +1 -0
  53. package/lib/commonjs/hooks/useConnection.js +1 -1
  54. package/lib/commonjs/hooks/useConnection.js.map +1 -1
  55. package/lib/commonjs/hooks/useVoiceMessageInput.js +207 -0
  56. package/lib/commonjs/hooks/useVoiceMessageInput.js.map +1 -0
  57. package/lib/commonjs/index.js +36 -0
  58. package/lib/commonjs/index.js.map +1 -1
  59. package/lib/commonjs/libs/MentionManager.js.map +1 -1
  60. package/lib/commonjs/libs/SBUUtils.js +4 -0
  61. package/lib/commonjs/libs/SBUUtils.js.map +1 -1
  62. package/lib/commonjs/libs/VoiceMessageConfig.js +30 -0
  63. package/lib/commonjs/libs/VoiceMessageConfig.js.map +1 -0
  64. package/lib/commonjs/localization/StringSet.type.js.map +1 -1
  65. package/lib/commonjs/localization/createBaseStringSet.js +24 -9
  66. package/lib/commonjs/localization/createBaseStringSet.js.map +1 -1
  67. package/lib/commonjs/platform/createFileService.expo.js +10 -0
  68. package/lib/commonjs/platform/createFileService.expo.js.map +1 -1
  69. package/lib/commonjs/platform/createFileService.native.js +19 -0
  70. package/lib/commonjs/platform/createFileService.native.js.map +1 -1
  71. package/lib/commonjs/platform/createPlayerService.expo.js +137 -0
  72. package/lib/commonjs/platform/createPlayerService.expo.js.map +1 -0
  73. package/lib/commonjs/platform/createPlayerService.native.js +139 -0
  74. package/lib/commonjs/platform/createPlayerService.native.js.map +1 -0
  75. package/lib/commonjs/platform/createRecorderService.expo.js +158 -0
  76. package/lib/commonjs/platform/createRecorderService.expo.js.map +1 -0
  77. package/lib/commonjs/platform/createRecorderService.native.js +157 -0
  78. package/lib/commonjs/platform/createRecorderService.native.js.map +1 -0
  79. package/lib/commonjs/platform/types.js.map +1 -1
  80. package/lib/commonjs/types.js +7 -0
  81. package/lib/commonjs/types.js.map +1 -1
  82. package/lib/commonjs/utils/promise.js +138 -0
  83. package/lib/commonjs/utils/promise.js.map +1 -0
  84. package/lib/commonjs/version.js +1 -1
  85. package/lib/commonjs/version.js.map +1 -1
  86. package/lib/module/components/ChannelInput/EditInput.js +3 -12
  87. package/lib/module/components/ChannelInput/EditInput.js.map +1 -1
  88. package/lib/module/components/ChannelInput/MessageToReplyPreview.js +137 -0
  89. package/lib/module/components/ChannelInput/MessageToReplyPreview.js.map +1 -0
  90. package/lib/module/components/ChannelInput/SendInput.js +152 -326
  91. package/lib/module/components/ChannelInput/SendInput.js.map +1 -1
  92. package/lib/module/components/ChannelInput/VoiceMessageInput.js +228 -0
  93. package/lib/module/components/ChannelInput/VoiceMessageInput.js.map +1 -0
  94. package/lib/module/components/ChannelInput/index.js +36 -5
  95. package/lib/module/components/ChannelInput/index.js.map +1 -1
  96. package/lib/module/components/ChannelMessageList/index.js +149 -117
  97. package/lib/module/components/ChannelMessageList/index.js.map +1 -1
  98. package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js +24 -13
  99. package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js.map +1 -1
  100. package/lib/module/components/GroupChannelMessageRenderer/index.js +132 -7
  101. package/lib/module/components/GroupChannelMessageRenderer/index.js.map +1 -1
  102. package/lib/module/components/MessageSearchResultItem.js +2 -1
  103. package/lib/module/components/MessageSearchResultItem.js.map +1 -1
  104. package/lib/module/components/OpenChannelMessageRenderer/index.js +1 -0
  105. package/lib/module/components/OpenChannelMessageRenderer/index.js.map +1 -1
  106. package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +2 -2
  107. package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -1
  108. package/lib/module/components/ReactionBottomSheets/index.js.map +1 -1
  109. package/lib/module/components/StatusComposition.js.map +1 -1
  110. package/lib/module/constants.js +2 -0
  111. package/lib/module/constants.js.map +1 -1
  112. package/lib/module/containers/GroupChannelPreviewContainer.js +2 -1
  113. package/lib/module/containers/GroupChannelPreviewContainer.js.map +1 -1
  114. package/lib/module/containers/InternalErrorBoundaryContainer.js.map +1 -1
  115. package/lib/module/containers/SendbirdUIKitContainer.js +74 -36
  116. package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
  117. package/lib/module/contexts/PlatformServiceCtx.js +14 -11
  118. package/lib/module/contexts/PlatformServiceCtx.js.map +1 -1
  119. package/lib/module/contexts/ReactionCtx.js +3 -2
  120. package/lib/module/contexts/ReactionCtx.js.map +1 -1
  121. package/lib/module/contexts/SendbirdChatCtx.js +2 -0
  122. package/lib/module/contexts/SendbirdChatCtx.js.map +1 -1
  123. package/lib/module/domain/groupChannel/component/GroupChannelHeader.js +15 -5
  124. package/lib/module/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
  125. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +29 -43
  126. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  127. package/lib/module/domain/groupChannel/module/moduleContext.js +111 -7
  128. package/lib/module/domain/groupChannel/module/moduleContext.js.map +1 -1
  129. package/lib/module/domain/groupChannel/types.js.map +1 -1
  130. package/lib/module/domain/userList/types.js.map +1 -1
  131. package/lib/module/fragments/createGroupChannelFragment.js +36 -9
  132. package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
  133. package/lib/module/fragments/createMessageSearchFragment.js +1 -1
  134. package/lib/module/fragments/createMessageSearchFragment.js.map +1 -1
  135. package/lib/module/hooks/useChannelInputItems.js +203 -0
  136. package/lib/module/hooks/useChannelInputItems.js.map +1 -0
  137. package/lib/module/hooks/useConnection.js +1 -1
  138. package/lib/module/hooks/useConnection.js.map +1 -1
  139. package/lib/module/hooks/useVoiceMessageInput.js +199 -0
  140. package/lib/module/hooks/useVoiceMessageInput.js.map +1 -0
  141. package/lib/module/index.js +8 -0
  142. package/lib/module/index.js.map +1 -1
  143. package/lib/module/libs/MentionManager.js.map +1 -1
  144. package/lib/module/libs/SBUUtils.js +4 -0
  145. package/lib/module/libs/SBUUtils.js.map +1 -1
  146. package/lib/module/libs/VoiceMessageConfig.js +23 -0
  147. package/lib/module/libs/VoiceMessageConfig.js.map +1 -0
  148. package/lib/module/localization/StringSet.type.js.map +1 -1
  149. package/lib/module/localization/createBaseStringSet.js +25 -10
  150. package/lib/module/localization/createBaseStringSet.js.map +1 -1
  151. package/lib/module/platform/createFileService.expo.js +10 -0
  152. package/lib/module/platform/createFileService.expo.js.map +1 -1
  153. package/lib/module/platform/createFileService.native.js +19 -0
  154. package/lib/module/platform/createFileService.native.js.map +1 -1
  155. package/lib/module/platform/createPlayerService.expo.js +129 -0
  156. package/lib/module/platform/createPlayerService.expo.js.map +1 -0
  157. package/lib/module/platform/createPlayerService.native.js +132 -0
  158. package/lib/module/platform/createPlayerService.native.js.map +1 -0
  159. package/lib/module/platform/createRecorderService.expo.js +150 -0
  160. package/lib/module/platform/createRecorderService.expo.js.map +1 -0
  161. package/lib/module/platform/createRecorderService.native.js +149 -0
  162. package/lib/module/platform/createRecorderService.native.js.map +1 -0
  163. package/lib/module/platform/types.js.map +1 -1
  164. package/lib/module/types.js +5 -1
  165. package/lib/module/types.js.map +1 -1
  166. package/lib/module/utils/promise.js +132 -0
  167. package/lib/module/utils/promise.js.map +1 -0
  168. package/lib/module/version.js +1 -1
  169. package/lib/module/version.js.map +1 -1
  170. package/lib/typescript/src/components/ChannelCover.d.ts +2 -1
  171. package/lib/typescript/src/components/ChannelInput/AttachmentsButton.d.ts +2 -1
  172. package/lib/typescript/src/components/ChannelInput/MessageToReplyPreview.d.ts +7 -0
  173. package/lib/typescript/src/components/ChannelInput/VoiceMessageInput.d.ts +11 -0
  174. package/lib/typescript/src/components/ChannelInput/index.d.ts +9 -3
  175. package/lib/typescript/src/components/ChannelMessageList/index.d.ts +4 -1
  176. package/lib/typescript/src/components/FileViewer.d.ts +2 -1
  177. package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.d.ts +2 -1
  178. package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.d.ts +1 -1
  179. package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.d.ts +1 -1
  180. package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.d.ts +4 -2
  181. package/lib/typescript/src/components/GroupChannelMessageRenderer/index.d.ts +3 -0
  182. package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
  183. package/lib/typescript/src/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.d.ts +2 -1
  184. package/lib/typescript/src/components/OpenChannelMessageRenderer/index.d.ts +2 -0
  185. package/lib/typescript/src/components/ProviderLayout.d.ts +1 -1
  186. package/lib/typescript/src/components/ReactionAddons/BottomSheetReactionAddon.d.ts +2 -1
  187. package/lib/typescript/src/components/ReactionAddons/MessageReactionAddon.d.ts +2 -1
  188. package/lib/typescript/src/components/ReactionAddons/ReactionRoundedButton.d.ts +3 -2
  189. package/lib/typescript/src/components/ReactionAddons/index.d.ts +3 -2
  190. package/lib/typescript/src/components/ReactionBottomSheets/ReactionListBottomSheet.d.ts +2 -1
  191. package/lib/typescript/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.d.ts +2 -1
  192. package/lib/typescript/src/components/ReactionBottomSheets/index.d.ts +4 -4
  193. package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
  194. package/lib/typescript/src/components/StatusComposition.d.ts +4 -4
  195. package/lib/typescript/src/components/TypedPlaceholder.d.ts +2 -1
  196. package/lib/typescript/src/components/UserActionBar.d.ts +2 -1
  197. package/lib/typescript/src/components/UserSelectableBar.d.ts +2 -1
  198. package/lib/typescript/src/constants.d.ts +2 -0
  199. package/lib/typescript/src/containers/GroupChannelPreviewContainer.d.ts +2 -1
  200. package/lib/typescript/src/containers/InternalErrorBoundaryContainer.d.ts +3 -3
  201. package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +19 -8
  202. package/lib/typescript/src/contexts/LocalizationCtx.d.ts +1 -1
  203. package/lib/typescript/src/contexts/PlatformServiceCtx.d.ts +8 -8
  204. package/lib/typescript/src/contexts/ReactionCtx.d.ts +5 -2
  205. package/lib/typescript/src/contexts/SendbirdChatCtx.d.ts +6 -3
  206. package/lib/typescript/src/contexts/UserProfileCtx.d.ts +1 -1
  207. package/lib/typescript/src/domain/groupChannel/component/GroupChannelHeader.d.ts +2 -1
  208. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput.d.ts +1 -1
  209. package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +1 -1
  210. package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusEmpty.d.ts +2 -1
  211. package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusLoading.d.ts +2 -1
  212. package/lib/typescript/src/domain/groupChannel/component/GroupChannelSuggestedMentionList.d.ts +2 -1
  213. package/lib/typescript/src/domain/groupChannel/types.d.ts +48 -0
  214. package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.d.ts +2 -1
  215. package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.d.ts +2 -1
  216. package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.d.ts +2 -1
  217. package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.d.ts +2 -1
  218. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListHeader.d.ts +2 -1
  219. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListList.d.ts +2 -1
  220. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusEmpty.d.ts +2 -1
  221. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusLoading.d.ts +2 -1
  222. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts +2 -1
  223. package/lib/typescript/src/domain/groupChannelModeration/component/GroupChannelModerationHeader.d.ts +2 -1
  224. package/lib/typescript/src/domain/groupChannelModeration/component/GroupChannelModerationMenu.d.ts +2 -1
  225. package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.d.ts +2 -1
  226. package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.d.ts +2 -1
  227. package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.d.ts +2 -1
  228. package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.d.ts +2 -1
  229. package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.d.ts +2 -1
  230. package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsView.d.ts +2 -1
  231. package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.d.ts +2 -1
  232. package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsList.d.ts +2 -1
  233. package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.d.ts +2 -1
  234. package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.d.ts +2 -1
  235. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.d.ts +2 -1
  236. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts +2 -1
  237. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +2 -1
  238. package/lib/typescript/src/domain/messageSearch/component/MessageSearchHeader.d.ts +2 -1
  239. package/lib/typescript/src/domain/messageSearch/component/MessageSearchList.d.ts +2 -1
  240. package/lib/typescript/src/domain/messageSearch/component/MessageSearchStatusEmpty.d.ts +2 -1
  241. package/lib/typescript/src/domain/messageSearch/component/MessageSearchStatusLoading.d.ts +2 -1
  242. package/lib/typescript/src/domain/openChannel/component/OpenChannelHeader.d.ts +2 -2
  243. package/lib/typescript/src/domain/openChannel/component/OpenChannelInput.d.ts +1 -1
  244. package/lib/typescript/src/domain/openChannel/component/OpenChannelMessageList.d.ts +1 -1
  245. package/lib/typescript/src/domain/openChannel/component/OpenChannelStatusEmpty.d.ts +2 -1
  246. package/lib/typescript/src/domain/openChannel/component/OpenChannelStatusLoading.d.ts +2 -1
  247. package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersHeader.d.ts +2 -1
  248. package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersList.d.ts +2 -1
  249. package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersStatusEmpty.d.ts +2 -1
  250. package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersStatusLoading.d.ts +2 -1
  251. package/lib/typescript/src/domain/openChannelCreate/component/OpenChannelCreateHeader.d.ts +2 -1
  252. package/lib/typescript/src/domain/openChannelCreate/component/OpenChannelCreateProfileInput.d.ts +2 -1
  253. package/lib/typescript/src/domain/openChannelCreate/component/OpenChannelCreateStatusLoading.d.ts +2 -1
  254. package/lib/typescript/src/domain/openChannelList/component/OpenChannelListHeader.d.ts +2 -1
  255. package/lib/typescript/src/domain/openChannelList/component/OpenChannelListList.d.ts +2 -1
  256. package/lib/typescript/src/domain/openChannelList/component/OpenChannelListStatusEmpty.d.ts +2 -1
  257. package/lib/typescript/src/domain/openChannelList/component/OpenChannelListStatusLoading.d.ts +2 -1
  258. package/lib/typescript/src/domain/openChannelModeration/component/OpenChannelModerationHeader.d.ts +2 -1
  259. package/lib/typescript/src/domain/openChannelModeration/component/OpenChannelModerationMenu.d.ts +2 -1
  260. package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsHeader.d.ts +2 -1
  261. package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsList.d.ts +2 -1
  262. package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsStatusEmpty.d.ts +2 -1
  263. package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsStatusLoading.d.ts +2 -1
  264. package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsHeader.d.ts +2 -1
  265. package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsList.d.ts +2 -1
  266. package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsStatusEmpty.d.ts +2 -1
  267. package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsStatusLoading.d.ts +2 -1
  268. package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsHeader.d.ts +2 -1
  269. package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsInfo.d.ts +2 -1
  270. package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsMenu.d.ts +2 -1
  271. package/lib/typescript/src/domain/userList/component/UserListHeader.d.ts +3 -3
  272. package/lib/typescript/src/domain/userList/component/UserListList.d.ts +1 -1
  273. package/lib/typescript/src/domain/userList/component/UserListStatusEmpty.d.ts +2 -1
  274. package/lib/typescript/src/domain/userList/component/UserListStatusLoading.d.ts +2 -1
  275. package/lib/typescript/src/domain/userList/types.d.ts +2 -2
  276. package/lib/typescript/src/hooks/useChannelInputItems.d.ts +10 -0
  277. package/lib/typescript/src/hooks/useVoiceMessageInput.d.ts +53 -0
  278. package/lib/typescript/src/index.d.ts +4 -0
  279. package/lib/typescript/src/libs/MentionManager.d.ts +2 -1
  280. package/lib/typescript/src/libs/SBUUtils.d.ts +1 -0
  281. package/lib/typescript/src/libs/VoiceMessageConfig.d.ts +25 -0
  282. package/lib/typescript/src/localization/StringSet.type.d.ts +7 -0
  283. package/lib/typescript/src/platform/createPlayerService.expo.d.ts +7 -0
  284. package/lib/typescript/src/platform/createPlayerService.native.d.ts +9 -0
  285. package/lib/typescript/src/platform/createRecorderService.expo.d.ts +7 -0
  286. package/lib/typescript/src/platform/createRecorderService.native.d.ts +9 -0
  287. package/lib/typescript/src/platform/types.d.ts +100 -1
  288. package/lib/typescript/src/types.d.ts +5 -1
  289. package/lib/typescript/src/utils/promise.d.ts +7 -0
  290. package/lib/typescript/src/version.d.ts +1 -1
  291. package/package.json +10 -12
  292. package/src/components/ChannelInput/EditInput.tsx +3 -15
  293. package/src/components/ChannelInput/MessageToReplyPreview.tsx +133 -0
  294. package/src/components/ChannelInput/SendInput.tsx +131 -329
  295. package/src/components/ChannelInput/VoiceMessageInput.tsx +206 -0
  296. package/src/components/ChannelInput/index.tsx +37 -6
  297. package/src/components/ChannelMessageList/index.tsx +145 -113
  298. package/src/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.tsx +24 -11
  299. package/src/components/GroupChannelMessageRenderer/index.tsx +113 -4
  300. package/src/components/MessageSearchResultItem.tsx +2 -1
  301. package/src/components/OpenChannelMessageRenderer/index.tsx +1 -0
  302. package/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.tsx +2 -2
  303. package/src/components/ReactionBottomSheets/index.tsx +3 -2
  304. package/src/components/StatusComposition.tsx +3 -3
  305. package/src/constants.ts +2 -0
  306. package/src/containers/GroupChannelPreviewContainer.tsx +2 -0
  307. package/src/containers/InternalErrorBoundaryContainer.tsx +1 -1
  308. package/src/containers/SendbirdUIKitContainer.tsx +103 -59
  309. package/src/contexts/PlatformServiceCtx.tsx +22 -20
  310. package/src/contexts/ReactionCtx.tsx +7 -5
  311. package/src/contexts/SendbirdChatCtx.tsx +10 -2
  312. package/src/domain/groupChannel/component/GroupChannelHeader.tsx +14 -3
  313. package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +30 -43
  314. package/src/domain/groupChannel/module/moduleContext.tsx +119 -7
  315. package/src/domain/groupChannel/types.ts +45 -0
  316. package/src/domain/userList/types.ts +2 -2
  317. package/src/fragments/createGroupChannelFragment.tsx +43 -8
  318. package/src/fragments/createMessageSearchFragment.tsx +1 -1
  319. package/src/hooks/useChannelInputItems.ts +215 -0
  320. package/src/hooks/useConnection.ts +1 -1
  321. package/src/hooks/useVoiceMessageInput.ts +237 -0
  322. package/src/index.ts +9 -1
  323. package/src/libs/MentionManager.tsx +1 -1
  324. package/src/libs/SBUUtils.ts +5 -0
  325. package/src/libs/VoiceMessageConfig.ts +28 -0
  326. package/src/localization/StringSet.type.ts +8 -0
  327. package/src/localization/createBaseStringSet.ts +27 -11
  328. package/src/platform/createFileService.expo.ts +10 -0
  329. package/src/platform/createFileService.native.ts +19 -0
  330. package/src/platform/createPlayerService.expo.tsx +142 -0
  331. package/src/platform/createPlayerService.native.tsx +148 -0
  332. package/src/platform/createRecorderService.expo.tsx +160 -0
  333. package/src/platform/createRecorderService.native.tsx +170 -0
  334. package/src/platform/types.ts +114 -1
  335. package/src/types.ts +6 -1
  336. package/src/utils/promise.ts +139 -0
  337. package/src/version.ts +1 -1
@@ -1,2 +1,3 @@
1
- declare const OpenChannelListStatusLoading: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const OpenChannelListStatusLoading: () => React.JSX.Element;
2
3
  export default OpenChannelListStatusLoading;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelModerationProps } from '../types';
2
- declare const OpenChannelModerationHeader: ({ onPressHeaderLeft }: OpenChannelModerationProps['Header']) => JSX.Element;
3
+ declare const OpenChannelModerationHeader: ({ onPressHeaderLeft }: OpenChannelModerationProps['Header']) => React.JSX.Element;
3
4
  export default OpenChannelModerationHeader;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelModerationProps } from '../types';
2
- declare const OpenChannelModerationMenu: ({ onPressMenuBannedUsers, onPressMenuMutedParticipants, onPressMenuOperators, menuItemsCreator, }: OpenChannelModerationProps['Menu']) => JSX.Element;
3
+ declare const OpenChannelModerationMenu: ({ onPressMenuBannedUsers, onPressMenuMutedParticipants, onPressMenuOperators, menuItemsCreator, }: OpenChannelModerationProps['Menu']) => React.JSX.Element;
3
4
  export default OpenChannelModerationMenu;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelMutedParticipantsProps } from '../types';
2
- declare const OpenChannelMutedParticipantsHeader: ({ onPressHeaderLeft }: OpenChannelMutedParticipantsProps['Header']) => JSX.Element;
3
+ declare const OpenChannelMutedParticipantsHeader: ({ onPressHeaderLeft }: OpenChannelMutedParticipantsProps['Header']) => React.JSX.Element;
3
4
  export default OpenChannelMutedParticipantsHeader;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelMutedParticipantsProps } from '../types';
2
- declare const OpenChannelMutedParticipantsList: ({ renderUser, mutedParticipants, ListEmptyComponent, onLoadNext, }: OpenChannelMutedParticipantsProps['List']) => JSX.Element;
3
+ declare const OpenChannelMutedParticipantsList: ({ renderUser, mutedParticipants, ListEmptyComponent, onLoadNext, }: OpenChannelMutedParticipantsProps['List']) => React.JSX.Element;
3
4
  export default OpenChannelMutedParticipantsList;
@@ -1,2 +1,3 @@
1
- declare const OpenChannelMutedParticipantsStatusEmpty: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const OpenChannelMutedParticipantsStatusEmpty: () => React.JSX.Element;
2
3
  export default OpenChannelMutedParticipantsStatusEmpty;
@@ -1,2 +1,3 @@
1
- declare const OpenChannelMutedParticipantsStatusLoading: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const OpenChannelMutedParticipantsStatusLoading: () => React.JSX.Element;
2
3
  export default OpenChannelMutedParticipantsStatusLoading;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelOperatorsProps } from '../types';
2
- declare const OpenChannelOperatorsHeader: ({ onPressHeaderLeft, onPressHeaderRight }: OpenChannelOperatorsProps['Header']) => JSX.Element;
3
+ declare const OpenChannelOperatorsHeader: ({ onPressHeaderLeft, onPressHeaderRight }: OpenChannelOperatorsProps['Header']) => React.JSX.Element;
3
4
  export default OpenChannelOperatorsHeader;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelOperatorsProps } from '../types';
2
- declare const OpenChannelOperatorsList: ({ renderUser, operators, ListEmptyComponent, onLoadNext, }: OpenChannelOperatorsProps['List']) => JSX.Element;
3
+ declare const OpenChannelOperatorsList: ({ renderUser, operators, ListEmptyComponent, onLoadNext, }: OpenChannelOperatorsProps['List']) => React.JSX.Element;
3
4
  export default OpenChannelOperatorsList;
@@ -1,2 +1,3 @@
1
- declare const OpenChannelOperatorsStatusEmpty: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const OpenChannelOperatorsStatusEmpty: () => React.JSX.Element;
2
3
  export default OpenChannelOperatorsStatusEmpty;
@@ -1,2 +1,3 @@
1
- declare const OpenChannelOperatorsStatusLoading: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const OpenChannelOperatorsStatusLoading: () => React.JSX.Element;
2
3
  export default OpenChannelOperatorsStatusLoading;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelSettingsProps } from '../types';
2
- declare const OpenChannelSettingsHeader: ({ onPressHeaderLeft }: OpenChannelSettingsProps['Header']) => JSX.Element;
3
+ declare const OpenChannelSettingsHeader: ({ onPressHeaderLeft }: OpenChannelSettingsProps['Header']) => React.JSX.Element;
3
4
  export default OpenChannelSettingsHeader;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelSettingsProps } from '../types';
2
- declare const OpenChannelSettingsInfo: (_: OpenChannelSettingsProps['Info']) => JSX.Element;
3
+ declare const OpenChannelSettingsInfo: (_: OpenChannelSettingsProps['Info']) => React.JSX.Element;
3
4
  export default OpenChannelSettingsInfo;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { OpenChannelSettingsProps } from '../types';
2
- declare const OpenChannelSettingsMenu: ({ onPressMenuModeration, onPressMenuParticipants, onPressMenuDeleteChannel, menuItemsCreator, }: OpenChannelSettingsProps['Menu']) => JSX.Element;
3
+ declare const OpenChannelSettingsMenu: ({ onPressMenuModeration, onPressMenuParticipants, onPressMenuDeleteChannel, menuItemsCreator, }: OpenChannelSettingsProps['Menu']) => React.JSX.Element;
3
4
  export default OpenChannelSettingsMenu;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { UserListProps } from '../types';
3
3
  declare const UserListHeader: <T>({ onPressHeaderLeft, onPressHeaderRight, right, left, shouldActivateHeaderRight, }: {
4
- right?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
5
- left?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
4
+ right?: React.ReactNode;
5
+ left?: React.ReactNode;
6
6
  onPressHeaderLeft: () => void;
7
7
  onPressHeaderRight: (selectedUsers: T[]) => Promise<void>;
8
8
  shouldActivateHeaderRight?: ((selectedUsers: T[]) => boolean) | undefined;
9
- }) => JSX.Element;
9
+ }) => React.JSX.Element;
10
10
  export default UserListHeader;
@@ -8,5 +8,5 @@ declare const UserListList: <T extends UserStruct>({ users, onRefresh, refreshin
8
8
  onRefresh?: (() => Promise<void>) | undefined;
9
9
  refreshing?: boolean | undefined;
10
10
  ListEmptyComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
11
- }) => JSX.Element;
11
+ }) => React.JSX.Element;
12
12
  export default UserListList;
@@ -1,2 +1,3 @@
1
- declare const UserListStatusEmpty: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const UserListStatusEmpty: () => React.JSX.Element;
2
3
  export default UserListStatusEmpty;
@@ -1,2 +1,3 @@
1
- declare const UserListStatusLoading: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const UserListStatusLoading: () => React.JSX.Element;
2
3
  export default UserListStatusLoading;
@@ -4,8 +4,8 @@ import type { CommonComponent } from '../../types';
4
4
  export interface UserListProps<User> {
5
5
  /** Props for `UserListModule.Header` **/
6
6
  Header: {
7
- right?: React.ReactElement;
8
- left?: React.ReactElement;
7
+ right?: React.ReactNode;
8
+ left?: React.ReactNode;
9
9
  onPressHeaderLeft: () => void;
10
10
  onPressHeaderRight: (selectedUsers: User[]) => Promise<void>;
11
11
  shouldActivateHeaderRight?: (selectedUsers: User[]) => boolean;
@@ -0,0 +1,10 @@
1
+ import { SendbirdChannel } from '@sendbird/uikit-utils';
2
+ import { FileType } from '../platform/types';
3
+ export declare const useChannelInputItems: (channel: SendbirdChannel, sendFileMessage: (file: FileType) => void) => {
4
+ icon?: "search" | "stop" | "photo" | "recording" | "message" | "done" | "user" | "add" | "chat-hide" | "chat-show" | "archive" | "arrow-left" | "audio-off-filled" | "audio-off" | "audio-on-filled" | "audio-on" | "ban" | "broadcast" | "camera" | "channels" | "chat-filled" | "chat" | "checkbox-off" | "checkbox-on" | "chevron-down" | "chevron-right" | "close" | "copy" | "create" | "delete" | "document" | "done-all" | "download" | "edit" | "emoji-more" | "error" | "file-audio" | "file-document" | "freeze" | "gif" | "info" | "leave" | "members" | "moderation" | "more" | "mute" | "notifications-filled" | "notifications-off-filled" | "notifications" | "operator" | "pause" | "play" | "plus" | "question" | "radio-off" | "radio-on" | "refresh" | "remove" | "reply-filled" | "reply" | "send" | "settings-filled" | "spinner" | "streaming" | "supergroup" | "theme" | "thumbnail-none" | "unarchive" | undefined;
5
+ iconColor?: string | undefined;
6
+ title: string;
7
+ titleColor?: string | undefined;
8
+ disabled?: boolean | undefined;
9
+ onPress: () => void;
10
+ }[];
@@ -0,0 +1,53 @@
1
+ import { FileType } from '../platform/types';
2
+ type State = {
3
+ /**
4
+ * Status
5
+ *
6
+ * idle:
7
+ * - cancel(): idle
8
+ * - startRecording(): recording
9
+ * recording:
10
+ * - cancel(): idle
11
+ * - stopRecording(): recording_completed
12
+ * - send(): recording_completed > idle
13
+ * recording_completed:
14
+ * - cancel(): idle
15
+ * - playPlayer(): playing
16
+ * - send(): idle
17
+ * playing:
18
+ * - cancel(): idle
19
+ * - pausePlayer(): playing_paused
20
+ * - send(): idle
21
+ * playing_paused:
22
+ * - cancel(): idle
23
+ * - playPlayer(): playing
24
+ * - send(): idle
25
+ * */
26
+ status: 'idle' | 'recording' | 'recording_completed' | 'playing' | 'playing_paused';
27
+ recordingTime: {
28
+ currentTime: number;
29
+ minDuration: number;
30
+ maxDuration: number;
31
+ };
32
+ playingTime: {
33
+ currentTime: number;
34
+ duration: number;
35
+ };
36
+ };
37
+ export interface VoiceMessageInputResult {
38
+ actions: {
39
+ cancel: () => Promise<void>;
40
+ startRecording: () => Promise<void>;
41
+ stopRecording: () => Promise<void>;
42
+ playPlayer: () => Promise<void>;
43
+ pausePlayer: () => Promise<void>;
44
+ send: () => Promise<void>;
45
+ };
46
+ state: State;
47
+ }
48
+ type Props = {
49
+ onClose: () => Promise<void>;
50
+ onSend: (voiceFile: FileType, duration: number) => void;
51
+ };
52
+ declare const useVoiceMessageInput: ({ onSend, onClose }: Props) => VoiceMessageInputResult;
53
+ export default useVoiceMessageInput;
@@ -59,10 +59,14 @@ export { default as createNativeFileService } from './platform/createFileService
59
59
  export { default as createNativeClipboardService } from './platform/createClipboardService.native';
60
60
  export { default as createNativeNotificationService } from './platform/createNotificationService.native';
61
61
  export { default as createNativeMediaService } from './platform/createMediaService.native';
62
+ export { default as createNativePlayerService } from './platform/createPlayerService.native';
63
+ export { default as createNativeRecorderService } from './platform/createRecorderService.native';
62
64
  export { default as createExpoFileService } from './platform/createFileService.expo';
63
65
  export { default as createExpoClipboardService } from './platform/createClipboardService.expo';
64
66
  export { default as createExpoNotificationService } from './platform/createNotificationService.expo';
65
67
  export { default as createExpoMediaService } from './platform/createMediaService.expo';
68
+ export { default as createExpoPlayerService } from './platform/createPlayerService.expo';
69
+ export { default as createExpoRecorderService } from './platform/createRecorderService.expo';
66
70
  export * from './platform/types';
67
71
  /** Feature - shared **/
68
72
  export * from './domain/userList';
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { SendbirdFileMessage, SendbirdUser, SendbirdUserMessage } from '@sendbird/uikit-utils';
2
3
  import type { MentionedUser, Range } from '../types';
3
4
  import type { MentionConfigInterface } from './MentionConfig';
@@ -43,7 +44,7 @@ declare class MentionManager {
43
44
  /**
44
45
  * @description Bold @user.nickname
45
46
  * */
46
- textToMentionedComponents: (text: string, mentionedUsers: MentionedUser[], mentionEnabled: boolean) => string | (string | JSX.Element)[];
47
+ textToMentionedComponents: (text: string, mentionedUsers: MentionedUser[], mentionEnabled: boolean) => string | React.ReactNode[];
47
48
  textToMentionedMessageTemplate: (text: string, mentionedUsers: MentionedUser[], mentionEnabled: boolean) => string;
48
49
  /**
49
50
  * @description Convert @{user.id} template to @user.nickname text and MentionedUser[] array.
@@ -6,4 +6,5 @@ export default class SBUUtils {
6
6
  height: number;
7
7
  }>;
8
8
  static safeRun(callback: () => Promise<void>): Promise<void>;
9
+ static isExpo(): boolean;
9
10
  }
@@ -0,0 +1,25 @@
1
+ export interface VoiceMessageConfigInterface {
2
+ recorder: {
3
+ minDuration: number;
4
+ maxDuration: number;
5
+ };
6
+ }
7
+ declare class VoiceMessageConfig {
8
+ private _config;
9
+ static DEFAULT: {
10
+ RECORDER: {
11
+ MIN_DURATION: number;
12
+ MAX_DURATION: number;
13
+ EXTENSION: string;
14
+ BIT_RATE: number;
15
+ SAMPLE_RATE: number;
16
+ CHANNELS: number;
17
+ };
18
+ };
19
+ constructor(_config: VoiceMessageConfigInterface);
20
+ get recorder(): {
21
+ minDuration: number;
22
+ maxDuration: number;
23
+ };
24
+ }
25
+ export default VoiceMessageConfig;
@@ -215,10 +215,12 @@ export interface StringSet {
215
215
  PERMISSION_APP_NAME: string;
216
216
  PERMISSION_CAMERA: string;
217
217
  PERMISSION_DEVICE_STORAGE: string;
218
+ PERMISSION_MICROPHONE: string;
218
219
  USER_NO_NAME: string;
219
220
  CHANNEL_NO_MEMBERS: string;
220
221
  TYPING_INDICATOR_TYPINGS: (users: SendbirdUser[]) => string | undefined;
221
222
  REPLY_FROM_SENDER_TO_RECEIVER: (replyMessage: SendbirdUserMessage | SendbirdFileMessage, parentMessage: SendbirdUserMessage | SendbirdFileMessage, currentUserId?: string) => string;
223
+ MESSAGE_UNAVAILABLE: string;
222
224
  USER_BAR_ME_POSTFIX: string;
223
225
  USER_BAR_OPERATOR: string;
224
226
  REGISTER_AS_OPERATOR: string;
@@ -256,6 +258,9 @@ export interface StringSet {
256
258
  /** Channel > Message > Failed **/
257
259
  CHANNEL_MESSAGE_FAILED_RETRY: string;
258
260
  CHANNEL_MESSAGE_FAILED_REMOVE: string;
261
+ /** Voice message **/
262
+ VOICE_MESSAGE: string;
263
+ VOICE_MESSAGE_INPUT_CANCEL: string;
259
264
  };
260
265
  FILE_VIEWER: {
261
266
  TITLE: (message: SendbirdFileMessage) => string;
@@ -294,6 +299,8 @@ export interface StringSet {
294
299
  RESEND_MSG_ERROR: string;
295
300
  DELETE_MSG_ERROR: string;
296
301
  SEND_MSG_ERROR: string;
302
+ USER_MUTED_ERROR: string;
303
+ CHANNEL_FROZEN_ERROR: string;
297
304
  UPDATE_MSG_ERROR: string;
298
305
  TURN_ON_NOTIFICATIONS_ERROR: string;
299
306
  TURN_OFF_NOTIFICATIONS_ERROR: string;
@@ -0,0 +1,7 @@
1
+ import type * as ExpoAV from 'expo-av';
2
+ import type { PlayerServiceInterface } from './types';
3
+ type Modules = {
4
+ avModule: typeof ExpoAV;
5
+ };
6
+ declare const createExpoPlayerService: ({ avModule }: Modules) => PlayerServiceInterface;
7
+ export default createExpoPlayerService;
@@ -0,0 +1,9 @@
1
+ import type * as RNAudioRecorder from 'react-native-audio-recorder-player';
2
+ import * as Permissions from 'react-native-permissions';
3
+ import type { PlayerServiceInterface } from './types';
4
+ type Modules = {
5
+ audioRecorderModule: typeof RNAudioRecorder;
6
+ permissionModule: typeof Permissions;
7
+ };
8
+ declare const createNativePlayerService: ({ audioRecorderModule, permissionModule }: Modules) => PlayerServiceInterface;
9
+ export default createNativePlayerService;
@@ -0,0 +1,7 @@
1
+ import * as ExpoAV from 'expo-av';
2
+ import type { RecorderServiceInterface } from './types';
3
+ type Modules = {
4
+ avModule: typeof ExpoAV;
5
+ };
6
+ declare const createExpoRecorderService: ({ avModule }: Modules) => RecorderServiceInterface;
7
+ export default createExpoRecorderService;
@@ -0,0 +1,9 @@
1
+ import * as RNAudioRecorder from 'react-native-audio-recorder-player';
2
+ import * as Permissions from 'react-native-permissions';
3
+ import type { RecorderServiceInterface } from './types';
4
+ type Modules = {
5
+ audioRecorderModule: typeof RNAudioRecorder;
6
+ permissionModule: typeof Permissions;
7
+ };
8
+ declare const createNativeRecorderService: ({ audioRecorderModule, permissionModule }: Modules) => RecorderServiceInterface;
9
+ export default createNativeRecorderService;
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  import type SBUError from '../libs/SBUError';
2
3
  export type Unsubscribe = () => void | undefined;
3
4
  export type DownloadedPath = string;
@@ -49,6 +50,10 @@ export interface FilePickerServiceInterface {
49
50
  }
50
51
  export interface FileSystemServiceInterface {
51
52
  save(options?: SaveOptions): Promise<DownloadedPath | null>;
53
+ createRecordFilePath(customExtension?: string): {
54
+ recordFilePath: string;
55
+ uri: string;
56
+ };
52
57
  }
53
58
  export type VideoProps = {
54
59
  source: {
@@ -89,7 +94,101 @@ export type CompressImageResult = Promise<{
89
94
  size: number;
90
95
  } | null>;
91
96
  export interface MediaServiceInterface {
92
- VideoComponent<Props = {}>(props: VideoProps & Props): JSX.Element;
97
+ VideoComponent<Props = {}>(props: VideoProps & Props): ReactNode;
93
98
  getVideoThumbnail(options: GetVideoThumbnailOptions): GetVideoThumbnailResult;
94
99
  compressImage(options: CompressImageOptions): CompressImageResult;
95
100
  }
101
+ export interface PlayerServiceInterface {
102
+ uri?: string;
103
+ state: 'idle' | 'preparing' | 'playing' | 'paused' | 'stopped';
104
+ /**
105
+ * Check and request permission for the player.
106
+ * */
107
+ requestPermission(): Promise<boolean>;
108
+ /**
109
+ * Add a playback listener.
110
+ * */
111
+ addPlaybackListener(callback: (params: {
112
+ currentTime: number;
113
+ duration: number;
114
+ stopped: boolean;
115
+ }) => void): Unsubscribe;
116
+ /**
117
+ * Add a state listener.
118
+ * */
119
+ addStateListener(callback: (state: PlayerServiceInterface['state']) => void): Unsubscribe;
120
+ /**
121
+ * State transition:
122
+ * [idle, stopped] to [playing] - start from the beginning
123
+ * [paused] to [playing] - resume
124
+ * */
125
+ play(uri: string): Promise<void>;
126
+ /**
127
+ * State transition:
128
+ * [playing] to [paused]
129
+ * */
130
+ pause(): Promise<void>;
131
+ /**
132
+ * State transition:
133
+ * [preparing, playing, paused] to [stop]
134
+ * */
135
+ stop(): Promise<void>;
136
+ /**
137
+ * State transition:
138
+ * [*] to [idle]
139
+ * */
140
+ reset(): Promise<void>;
141
+ /**
142
+ * Seek time, only available when the state is [playing, paused].
143
+ * */
144
+ seek(time: number): Promise<void>;
145
+ }
146
+ export interface RecorderOptions {
147
+ /**
148
+ * Minimum recording duration (milliseconds).
149
+ * */
150
+ minDuration: number;
151
+ /**
152
+ * Maximum recording duration (milliseconds).
153
+ * */
154
+ maxDuration: number;
155
+ /**
156
+ * File extension for recorded audio file
157
+ * */
158
+ extension: string;
159
+ }
160
+ export interface RecorderServiceInterface {
161
+ uri?: string;
162
+ options: RecorderOptions;
163
+ state: 'idle' | 'preparing' | 'recording' | 'completed';
164
+ /**
165
+ * Check and request permission for the recorder.
166
+ * */
167
+ requestPermission(): Promise<boolean>;
168
+ /**
169
+ * Add recording listener.
170
+ * */
171
+ addRecordingListener(callback: (params: {
172
+ currentTime: number;
173
+ completed: boolean;
174
+ }) => void): Unsubscribe;
175
+ /**
176
+ * Add state listener.
177
+ * */
178
+ addStateListener(callback: (state: RecorderServiceInterface['state']) => void): Unsubscribe;
179
+ /**
180
+ * State transition:
181
+ * [idle, completed] to [recording]
182
+ * */
183
+ record(uri?: string): Promise<void>;
184
+ /**
185
+ * State transition:
186
+ * [recording] to [completed]
187
+ * */
188
+ stop(): Promise<void>;
189
+ /**
190
+ * State transition:
191
+ * [*] to [idle]
192
+ * */
193
+ reset(): Promise<void>;
194
+ }
@@ -18,7 +18,7 @@ export type ErrorBoundaryProps = {
18
18
  };
19
19
  export type CommonComponent<P = {}> = (props: P & {
20
20
  children?: ReactNode;
21
- }) => null | JSX.Element;
21
+ }) => null | ReactNode;
22
22
  export type MentionedUser = {
23
23
  range: Range;
24
24
  user: SendbirdUser;
@@ -27,3 +27,7 @@ export type Range = {
27
27
  start: number;
28
28
  end: number;
29
29
  };
30
+ export declare enum TypingIndicatorType {
31
+ Text = "text",
32
+ Bubble = "bubble"
33
+ }
@@ -0,0 +1,7 @@
1
+ import 'react-native';
2
+ export declare const PromisePolyfill: {
3
+ allSettled<T extends [] | readonly unknown[]>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
4
+ race<T_1>(values: Iterable<T_1 | PromiseLike<T_1>>): Promise<Awaited<T_1>>;
5
+ any<T_2>(values: Iterable<T_2 | PromiseLike<T_2>>): Promise<Awaited<T_2>>;
6
+ apply(): void;
7
+ };
@@ -1,2 +1,2 @@
1
- declare const VERSION = "3.1.2";
1
+ declare const VERSION = "3.3.0";
2
2
  export default VERSION;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendbird/uikit-react-native",
3
- "version": "3.1.2",
3
+ "version": "3.3.0",
4
4
  "description": "Sendbird UIKit for React Native: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.",
5
5
  "keywords": [
6
6
  "sendbird",
@@ -39,6 +39,7 @@
39
39
  "build": "yarn generate-version && bob build",
40
40
  "clean": "del lib",
41
41
  "publish:next": "npm publish --tag next",
42
+ "publish:local": "yalc publish",
42
43
  "generate-version": "node scripts/generate-version.js ./src/version.ts",
43
44
  "create-domain": "node scripts/create-core-domain"
44
45
  },
@@ -58,10 +59,10 @@
58
59
  "access": "public"
59
60
  },
60
61
  "dependencies": {
61
- "@sendbird/uikit-chat-hooks": "3.1.2",
62
- "@sendbird/uikit-react-native-foundation": "3.1.2",
63
- "@sendbird/uikit-tools": "^0.0.1-alpha.38",
64
- "@sendbird/uikit-utils": "3.1.2"
62
+ "@sendbird/uikit-chat-hooks": "3.3.0",
63
+ "@sendbird/uikit-react-native-foundation": "3.3.0",
64
+ "@sendbird/uikit-tools": "0.0.1-alpha.42",
65
+ "@sendbird/uikit-utils": "3.3.0"
65
66
  },
66
67
  "devDependencies": {
67
68
  "@bam.tech/react-native-image-resizer": "^3.0.4",
@@ -89,6 +90,7 @@
89
90
  "js-convert-case": "^4.2.0",
90
91
  "react": "17.0.2",
91
92
  "react-native": "0.67.5",
93
+ "react-native-audio-recorder-player": "^3.6.0",
92
94
  "react-native-builder-bob": "^0.18.0",
93
95
  "react-native-create-thumbnail": "^1.5.1",
94
96
  "react-native-document-picker": "^8.0.0",
@@ -97,7 +99,7 @@
97
99
  "react-native-permissions": "^3.6.0",
98
100
  "react-native-safe-area-context": "^3.3.2",
99
101
  "react-native-video": "^5.2.0",
100
- "typescript": "4.9.4"
102
+ "typescript": "5.2.2"
101
103
  },
102
104
  "peerDependencies": {
103
105
  "@bam.tech/react-native-image-resizer": ">=3.0.0",
@@ -118,6 +120,7 @@
118
120
  "expo-video-thumbnails": ">=6.4.0",
119
121
  "react": ">=17.0.2",
120
122
  "react-native": ">=0.65.0",
123
+ "react-native-audio-recorder-player": ">=3.6.0",
121
124
  "react-native-create-thumbnail": ">=1.5.1",
122
125
  "react-native-document-picker": ">=8.0.0",
123
126
  "react-native-file-access": ">=2.4.3",
@@ -199,10 +202,5 @@
199
202
  ]
200
203
  ]
201
204
  },
202
- "typedoc": {
203
- "entryPoint": "./src/index.ts",
204
- "readmeFile": "./README.md",
205
- "displayName": "@sendbird/uikit-react-native"
206
- },
207
- "gitHead": "49d482105f9e2bc0643916682126935747a84011"
205
+ "gitHead": "51adda5f33a7bb450b51ce30f505dcc9884e9586"
208
206
  }
@@ -1,11 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import {
3
- NativeSyntheticEvent,
4
- Platform,
5
- TextInput as RNTextInput,
6
- TextInputSelectionChangeEventData,
7
- View,
8
- } from 'react-native';
2
+ import { NativeSyntheticEvent, TextInput as RNTextInput, TextInputSelectionChangeEventData, View } from 'react-native';
9
3
 
10
4
  import { MentionType } from '@sendbird/chat/message';
11
5
  import { Button, TextInput, createStyleSheet, useToast } from '@sendbird/uikit-react-native-foundation';
@@ -27,6 +21,7 @@ interface EditInputProps extends ChannelInputProps {
27
21
 
28
22
  const EditInput = forwardRef<RNTextInput, EditInputProps>(function EditInput(
29
23
  {
24
+ style,
30
25
  text,
31
26
  onChangeText,
32
27
  messageToEdit,
@@ -81,7 +76,7 @@ const EditInput = forwardRef<RNTextInput, EditInputProps>(function EditInput(
81
76
  editable={!inputDisabled}
82
77
  autoFocus={autoFocus}
83
78
  onChangeText={onChangeText}
84
- style={styles.input}
79
+ style={style}
85
80
  placeholder={STRINGS.LABELS.CHANNEL_INPUT_PLACEHOLDER_ACTIVE}
86
81
  onSelectionChange={onSelectionChange}
87
82
  >
@@ -112,13 +107,6 @@ const styles = createStyleSheet({
112
107
  flexDirection: 'column',
113
108
  alignItems: 'center',
114
109
  },
115
- input: {
116
- flex: 1,
117
- marginRight: 4,
118
- minHeight: 36,
119
- maxHeight: 36 * Platform.select({ ios: 2.5, default: 2 }),
120
- borderRadius: 20,
121
- },
122
110
  inputWrapper: {
123
111
  flexDirection: 'row',
124
112
  },