@sendbird/uikit-react-native 3.1.2 → 3.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.
- package/README.md +67 -42
- package/lib/commonjs/components/ChannelInput/MessageToReplyPreview.js +145 -0
- package/lib/commonjs/components/ChannelInput/MessageToReplyPreview.js.map +1 -0
- package/lib/commonjs/components/ChannelInput/SendInput.js +147 -312
- package/lib/commonjs/components/ChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js +238 -0
- package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js.map +1 -0
- package/lib/commonjs/components/ChannelInput/index.js +5 -1
- package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
- package/lib/commonjs/components/ChannelMessageList/index.js +1 -1
- package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
- package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js +24 -13
- package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js.map +1 -1
- package/lib/commonjs/components/GroupChannelMessageRenderer/index.js +100 -5
- package/lib/commonjs/components/GroupChannelMessageRenderer/index.js.map +1 -1
- package/lib/commonjs/components/MessageSearchResultItem.js +1 -0
- package/lib/commonjs/components/MessageSearchResultItem.js.map +1 -1
- package/lib/commonjs/components/OpenChannelMessageRenderer/index.js +1 -0
- package/lib/commonjs/components/OpenChannelMessageRenderer/index.js.map +1 -1
- package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +2 -2
- package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ReactionBottomSheets/index.js.map +1 -1
- package/lib/commonjs/components/StatusComposition.js.map +1 -1
- package/lib/commonjs/constants.js +5 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js +1 -0
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/commonjs/containers/InternalErrorBoundaryContainer.js.map +1 -1
- package/lib/commonjs/containers/SendbirdUIKitContainer.js +72 -34
- package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/commonjs/contexts/PlatformServiceCtx.js +16 -12
- package/lib/commonjs/contexts/PlatformServiceCtx.js.map +1 -1
- package/lib/commonjs/contexts/ReactionCtx.js +3 -2
- package/lib/commonjs/contexts/ReactionCtx.js.map +1 -1
- package/lib/commonjs/contexts/SendbirdChatCtx.js +2 -0
- package/lib/commonjs/contexts/SendbirdChatCtx.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +27 -42
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/module/moduleContext.js +109 -5
- package/lib/commonjs/domain/groupChannel/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
- package/lib/commonjs/domain/userList/types.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelFragment.js +30 -4
- package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/commonjs/fragments/createMessageSearchFragment.js +1 -1
- package/lib/commonjs/fragments/createMessageSearchFragment.js.map +1 -1
- package/lib/commonjs/hooks/useChannelInputItems.js +211 -0
- package/lib/commonjs/hooks/useChannelInputItems.js.map +1 -0
- package/lib/commonjs/hooks/useConnection.js +1 -1
- package/lib/commonjs/hooks/useConnection.js.map +1 -1
- package/lib/commonjs/hooks/useVoiceMessageInput.js +207 -0
- package/lib/commonjs/hooks/useVoiceMessageInput.js.map +1 -0
- package/lib/commonjs/index.js +32 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/libs/MentionManager.js.map +1 -1
- package/lib/commonjs/libs/SBUUtils.js +4 -0
- package/lib/commonjs/libs/SBUUtils.js.map +1 -1
- package/lib/commonjs/libs/VoiceMessageConfig.js +30 -0
- package/lib/commonjs/libs/VoiceMessageConfig.js.map +1 -0
- package/lib/commonjs/localization/StringSet.type.js.map +1 -1
- package/lib/commonjs/localization/createBaseStringSet.js +24 -9
- package/lib/commonjs/localization/createBaseStringSet.js.map +1 -1
- package/lib/commonjs/platform/createFileService.expo.js +10 -0
- package/lib/commonjs/platform/createFileService.expo.js.map +1 -1
- package/lib/commonjs/platform/createFileService.native.js +19 -0
- package/lib/commonjs/platform/createFileService.native.js.map +1 -1
- package/lib/commonjs/platform/createPlayerService.expo.js +137 -0
- package/lib/commonjs/platform/createPlayerService.expo.js.map +1 -0
- package/lib/commonjs/platform/createPlayerService.native.js +139 -0
- package/lib/commonjs/platform/createPlayerService.native.js.map +1 -0
- package/lib/commonjs/platform/createRecorderService.expo.js +158 -0
- package/lib/commonjs/platform/createRecorderService.expo.js.map +1 -0
- package/lib/commonjs/platform/createRecorderService.native.js +157 -0
- package/lib/commonjs/platform/createRecorderService.native.js.map +1 -0
- package/lib/commonjs/platform/types.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/components/ChannelInput/MessageToReplyPreview.js +137 -0
- package/lib/module/components/ChannelInput/MessageToReplyPreview.js.map +1 -0
- package/lib/module/components/ChannelInput/SendInput.js +149 -314
- package/lib/module/components/ChannelInput/SendInput.js.map +1 -1
- package/lib/module/components/ChannelInput/VoiceMessageInput.js +228 -0
- package/lib/module/components/ChannelInput/VoiceMessageInput.js.map +1 -0
- package/lib/module/components/ChannelInput/index.js +5 -1
- package/lib/module/components/ChannelInput/index.js.map +1 -1
- package/lib/module/components/ChannelMessageList/index.js +2 -2
- package/lib/module/components/ChannelMessageList/index.js.map +1 -1
- package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js +24 -13
- package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.js.map +1 -1
- package/lib/module/components/GroupChannelMessageRenderer/index.js +99 -6
- package/lib/module/components/GroupChannelMessageRenderer/index.js.map +1 -1
- package/lib/module/components/MessageSearchResultItem.js +2 -1
- package/lib/module/components/MessageSearchResultItem.js.map +1 -1
- package/lib/module/components/OpenChannelMessageRenderer/index.js +1 -0
- package/lib/module/components/OpenChannelMessageRenderer/index.js.map +1 -1
- package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +2 -2
- package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -1
- package/lib/module/components/ReactionBottomSheets/index.js.map +1 -1
- package/lib/module/components/StatusComposition.js.map +1 -1
- package/lib/module/constants.js +2 -0
- package/lib/module/constants.js.map +1 -1
- package/lib/module/containers/GroupChannelPreviewContainer.js +2 -1
- package/lib/module/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/module/containers/InternalErrorBoundaryContainer.js.map +1 -1
- package/lib/module/containers/SendbirdUIKitContainer.js +74 -36
- package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/module/contexts/PlatformServiceCtx.js +14 -11
- package/lib/module/contexts/PlatformServiceCtx.js.map +1 -1
- package/lib/module/contexts/ReactionCtx.js +3 -2
- package/lib/module/contexts/ReactionCtx.js.map +1 -1
- package/lib/module/contexts/SendbirdChatCtx.js +2 -0
- package/lib/module/contexts/SendbirdChatCtx.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +28 -43
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/module/domain/groupChannel/module/moduleContext.js +111 -7
- package/lib/module/domain/groupChannel/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannel/types.js.map +1 -1
- package/lib/module/domain/userList/types.js.map +1 -1
- package/lib/module/fragments/createGroupChannelFragment.js +32 -6
- package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/module/fragments/createMessageSearchFragment.js +1 -1
- package/lib/module/fragments/createMessageSearchFragment.js.map +1 -1
- package/lib/module/hooks/useChannelInputItems.js +203 -0
- package/lib/module/hooks/useChannelInputItems.js.map +1 -0
- package/lib/module/hooks/useConnection.js +1 -1
- package/lib/module/hooks/useConnection.js.map +1 -1
- package/lib/module/hooks/useVoiceMessageInput.js +199 -0
- package/lib/module/hooks/useVoiceMessageInput.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/libs/MentionManager.js.map +1 -1
- package/lib/module/libs/SBUUtils.js +4 -0
- package/lib/module/libs/SBUUtils.js.map +1 -1
- package/lib/module/libs/VoiceMessageConfig.js +23 -0
- package/lib/module/libs/VoiceMessageConfig.js.map +1 -0
- package/lib/module/localization/StringSet.type.js.map +1 -1
- package/lib/module/localization/createBaseStringSet.js +25 -10
- package/lib/module/localization/createBaseStringSet.js.map +1 -1
- package/lib/module/platform/createFileService.expo.js +10 -0
- package/lib/module/platform/createFileService.expo.js.map +1 -1
- package/lib/module/platform/createFileService.native.js +19 -0
- package/lib/module/platform/createFileService.native.js.map +1 -1
- package/lib/module/platform/createPlayerService.expo.js +129 -0
- package/lib/module/platform/createPlayerService.expo.js.map +1 -0
- package/lib/module/platform/createPlayerService.native.js +132 -0
- package/lib/module/platform/createPlayerService.native.js.map +1 -0
- package/lib/module/platform/createRecorderService.expo.js +150 -0
- package/lib/module/platform/createRecorderService.expo.js.map +1 -0
- package/lib/module/platform/createRecorderService.native.js +149 -0
- package/lib/module/platform/createRecorderService.native.js.map +1 -0
- package/lib/module/platform/types.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/components/ChannelCover.d.ts +2 -1
- package/lib/typescript/src/components/ChannelInput/AttachmentsButton.d.ts +2 -1
- package/lib/typescript/src/components/ChannelInput/MessageToReplyPreview.d.ts +7 -0
- package/lib/typescript/src/components/ChannelInput/VoiceMessageInput.d.ts +11 -0
- package/lib/typescript/src/components/ChannelInput/index.d.ts +7 -3
- package/lib/typescript/src/components/ChannelMessageList/index.d.ts +1 -1
- package/lib/typescript/src/components/FileViewer.d.ts +2 -1
- package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.d.ts +2 -1
- package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.d.ts +1 -1
- package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.d.ts +1 -1
- package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.d.ts +4 -2
- package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
- package/lib/typescript/src/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.d.ts +2 -1
- package/lib/typescript/src/components/ProviderLayout.d.ts +1 -1
- package/lib/typescript/src/components/ReactionAddons/BottomSheetReactionAddon.d.ts +2 -1
- package/lib/typescript/src/components/ReactionAddons/MessageReactionAddon.d.ts +2 -1
- package/lib/typescript/src/components/ReactionAddons/ReactionRoundedButton.d.ts +3 -2
- package/lib/typescript/src/components/ReactionAddons/index.d.ts +3 -2
- package/lib/typescript/src/components/ReactionBottomSheets/ReactionListBottomSheet.d.ts +2 -1
- package/lib/typescript/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.d.ts +2 -1
- package/lib/typescript/src/components/ReactionBottomSheets/index.d.ts +4 -4
- package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
- package/lib/typescript/src/components/StatusComposition.d.ts +4 -4
- package/lib/typescript/src/components/TypedPlaceholder.d.ts +2 -1
- package/lib/typescript/src/components/UserActionBar.d.ts +2 -1
- package/lib/typescript/src/components/UserSelectableBar.d.ts +2 -1
- package/lib/typescript/src/constants.d.ts +2 -0
- package/lib/typescript/src/containers/GroupChannelPreviewContainer.d.ts +2 -1
- package/lib/typescript/src/containers/InternalErrorBoundaryContainer.d.ts +3 -3
- package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +19 -8
- package/lib/typescript/src/contexts/LocalizationCtx.d.ts +1 -1
- package/lib/typescript/src/contexts/PlatformServiceCtx.d.ts +8 -8
- package/lib/typescript/src/contexts/ReactionCtx.d.ts +5 -2
- package/lib/typescript/src/contexts/SendbirdChatCtx.d.ts +6 -3
- package/lib/typescript/src/contexts/UserProfileCtx.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelSuggestedMentionList.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannel/types.d.ts +45 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListList.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelModeration/component/GroupChannelModerationHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelModeration/component/GroupChannelModerationMenu.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsView.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsList.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +2 -1
- package/lib/typescript/src/domain/messageSearch/component/MessageSearchHeader.d.ts +2 -1
- package/lib/typescript/src/domain/messageSearch/component/MessageSearchList.d.ts +2 -1
- package/lib/typescript/src/domain/messageSearch/component/MessageSearchStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/messageSearch/component/MessageSearchStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannel/component/OpenChannelHeader.d.ts +2 -2
- package/lib/typescript/src/domain/openChannel/component/OpenChannelInput.d.ts +1 -1
- package/lib/typescript/src/domain/openChannel/component/OpenChannelMessageList.d.ts +1 -1
- package/lib/typescript/src/domain/openChannel/component/OpenChannelStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/openChannel/component/OpenChannelStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersList.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelBannedUsers/component/OpenChannelBannedUsersStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelCreate/component/OpenChannelCreateHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelCreate/component/OpenChannelCreateProfileInput.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelCreate/component/OpenChannelCreateStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelList/component/OpenChannelListHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelList/component/OpenChannelListList.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelList/component/OpenChannelListStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelList/component/OpenChannelListStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelModeration/component/OpenChannelModerationHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelModeration/component/OpenChannelModerationMenu.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsList.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelMutedParticipants/component/OpenChannelMutedParticipantsStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsList.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsHeader.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsInfo.d.ts +2 -1
- package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsMenu.d.ts +2 -1
- package/lib/typescript/src/domain/userList/component/UserListHeader.d.ts +3 -3
- package/lib/typescript/src/domain/userList/component/UserListList.d.ts +1 -1
- package/lib/typescript/src/domain/userList/component/UserListStatusEmpty.d.ts +2 -1
- package/lib/typescript/src/domain/userList/component/UserListStatusLoading.d.ts +2 -1
- package/lib/typescript/src/domain/userList/types.d.ts +2 -2
- package/lib/typescript/src/hooks/useChannelInputItems.d.ts +10 -0
- package/lib/typescript/src/hooks/useVoiceMessageInput.d.ts +53 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/libs/MentionManager.d.ts +2 -1
- package/lib/typescript/src/libs/SBUUtils.d.ts +1 -0
- package/lib/typescript/src/libs/VoiceMessageConfig.d.ts +25 -0
- package/lib/typescript/src/localization/StringSet.type.d.ts +7 -0
- package/lib/typescript/src/platform/createPlayerService.expo.d.ts +7 -0
- package/lib/typescript/src/platform/createPlayerService.native.d.ts +9 -0
- package/lib/typescript/src/platform/createRecorderService.expo.d.ts +7 -0
- package/lib/typescript/src/platform/createRecorderService.native.d.ts +9 -0
- package/lib/typescript/src/platform/types.d.ts +100 -1
- package/lib/typescript/src/types.d.ts +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +9 -11
- package/src/components/ChannelInput/MessageToReplyPreview.tsx +133 -0
- package/src/components/ChannelInput/SendInput.tsx +129 -320
- package/src/components/ChannelInput/VoiceMessageInput.tsx +206 -0
- package/src/components/ChannelInput/index.tsx +12 -4
- package/src/components/ChannelMessageList/index.tsx +3 -1
- package/src/components/GroupChannelMessageRenderer/GroupChannelMessageParentMessage.tsx +24 -11
- package/src/components/GroupChannelMessageRenderer/index.tsx +80 -3
- package/src/components/MessageSearchResultItem.tsx +2 -1
- package/src/components/OpenChannelMessageRenderer/index.tsx +1 -0
- package/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.tsx +2 -2
- package/src/components/ReactionBottomSheets/index.tsx +3 -2
- package/src/components/StatusComposition.tsx +3 -3
- package/src/constants.ts +2 -0
- package/src/containers/GroupChannelPreviewContainer.tsx +2 -0
- package/src/containers/InternalErrorBoundaryContainer.tsx +1 -1
- package/src/containers/SendbirdUIKitContainer.tsx +103 -59
- package/src/contexts/PlatformServiceCtx.tsx +22 -20
- package/src/contexts/ReactionCtx.tsx +7 -5
- package/src/contexts/SendbirdChatCtx.tsx +10 -2
- package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +29 -43
- package/src/domain/groupChannel/module/moduleContext.tsx +119 -7
- package/src/domain/groupChannel/types.ts +41 -0
- package/src/domain/userList/types.ts +2 -2
- package/src/fragments/createGroupChannelFragment.tsx +32 -5
- package/src/fragments/createMessageSearchFragment.tsx +1 -1
- package/src/hooks/useChannelInputItems.ts +215 -0
- package/src/hooks/useConnection.ts +1 -1
- package/src/hooks/useVoiceMessageInput.ts +237 -0
- package/src/index.ts +4 -0
- package/src/libs/MentionManager.tsx +1 -1
- package/src/libs/SBUUtils.ts +5 -0
- package/src/libs/VoiceMessageConfig.ts +28 -0
- package/src/localization/StringSet.type.ts +8 -0
- package/src/localization/createBaseStringSet.ts +27 -11
- package/src/platform/createFileService.expo.ts +10 -0
- package/src/platform/createFileService.native.ts +19 -0
- package/src/platform/createPlayerService.expo.tsx +142 -0
- package/src/platform/createPlayerService.native.tsx +148 -0
- package/src/platform/createRecorderService.expo.tsx +160 -0
- package/src/platform/createRecorderService.native.tsx +170 -0
- package/src/platform/types.ts +114 -1
- package/src/types.ts +1 -1
- package/src/version.ts +1 -1
package/lib/typescript/src/domain/openChannelModeration/component/OpenChannelModerationHeader.d.ts
CHANGED
|
@@ -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;
|
package/lib/typescript/src/domain/openChannelModeration/component/OpenChannelModerationMenu.d.ts
CHANGED
|
@@ -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;
|
package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsHeader.d.ts
CHANGED
|
@@ -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;
|
package/lib/typescript/src/domain/openChannelOperators/component/OpenChannelOperatorsList.d.ts
CHANGED
|
@@ -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;
|
package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsHeader.d.ts
CHANGED
|
@@ -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;
|
package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsInfo.d.ts
CHANGED
|
@@ -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;
|
package/lib/typescript/src/domain/openChannelSettings/component/OpenChannelSettingsMenu.d.ts
CHANGED
|
@@ -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.
|
|
5
|
-
left?: React.
|
|
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;
|
|
@@ -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.
|
|
8
|
-
left?: React.
|
|
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 |
|
|
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.
|
|
@@ -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):
|
|
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
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const VERSION = "3.
|
|
1
|
+
declare const VERSION = "3.2.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.
|
|
3
|
+
"version": "3.2.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.
|
|
62
|
-
"@sendbird/uikit-react-native-foundation": "3.
|
|
62
|
+
"@sendbird/uikit-chat-hooks": "3.2.0",
|
|
63
|
+
"@sendbird/uikit-react-native-foundation": "3.2.0",
|
|
63
64
|
"@sendbird/uikit-tools": "^0.0.1-alpha.38",
|
|
64
|
-
"@sendbird/uikit-utils": "3.
|
|
65
|
+
"@sendbird/uikit-utils": "3.2.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": "
|
|
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
|
-
"
|
|
203
|
-
"entryPoint": "./src/index.ts",
|
|
204
|
-
"readmeFile": "./README.md",
|
|
205
|
-
"displayName": "@sendbird/uikit-react-native"
|
|
206
|
-
},
|
|
207
|
-
"gitHead": "49d482105f9e2bc0643916682126935747a84011"
|
|
205
|
+
"gitHead": "dd029581f658a7970b14932df21d45a265694893"
|
|
208
206
|
}
|