@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
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
import { matchesOneOf, sleep } from '@sendbird/uikit-utils';
|
|
6
|
+
import VoiceMessageConfig from '../libs/VoiceMessageConfig';
|
|
7
|
+
import nativePermissionGranted from '../utils/nativePermissionGranted';
|
|
8
|
+
const createNativeRecorderService = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
audioRecorderModule,
|
|
11
|
+
permissionModule
|
|
12
|
+
} = _ref;
|
|
13
|
+
const module = new audioRecorderModule.default();
|
|
14
|
+
class VoiceRecorder {
|
|
15
|
+
constructor() {
|
|
16
|
+
_defineProperty(this, "uri", undefined);
|
|
17
|
+
_defineProperty(this, "state", 'idle');
|
|
18
|
+
_defineProperty(this, "options", {
|
|
19
|
+
minDuration: VoiceMessageConfig.DEFAULT.RECORDER.MIN_DURATION,
|
|
20
|
+
maxDuration: VoiceMessageConfig.DEFAULT.RECORDER.MAX_DURATION,
|
|
21
|
+
extension: VoiceMessageConfig.DEFAULT.RECORDER.EXTENSION
|
|
22
|
+
});
|
|
23
|
+
// NOTE: In Android, even when startRecorder() is awaited, if stop() is executed immediately afterward, an error occurs
|
|
24
|
+
_defineProperty(this, "_recordStartedAt", 0);
|
|
25
|
+
_defineProperty(this, "_getRecorderStopSafeBuffer", () => {
|
|
26
|
+
const minWaitingTime = 500;
|
|
27
|
+
const elapsedTime = Date.now() - this._recordStartedAt;
|
|
28
|
+
if (elapsedTime > minWaitingTime) return 0;else return minWaitingTime - elapsedTime;
|
|
29
|
+
});
|
|
30
|
+
_defineProperty(this, "recordingSubscribers", new Set());
|
|
31
|
+
_defineProperty(this, "stateSubscribers", new Set());
|
|
32
|
+
_defineProperty(this, "audioSettings", {
|
|
33
|
+
sampleRate: VoiceMessageConfig.DEFAULT.RECORDER.SAMPLE_RATE,
|
|
34
|
+
bitRate: VoiceMessageConfig.DEFAULT.RECORDER.BIT_RATE,
|
|
35
|
+
audioChannels: VoiceMessageConfig.DEFAULT.RECORDER.CHANNELS
|
|
36
|
+
// encoding: mpeg4_aac
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "audioOptions", Platform.select({
|
|
39
|
+
android: {
|
|
40
|
+
AudioEncodingBitRateAndroid: this.audioSettings.bitRate,
|
|
41
|
+
AudioChannelsAndroid: this.audioSettings.audioChannels,
|
|
42
|
+
AudioSamplingRateAndroid: this.audioSettings.sampleRate,
|
|
43
|
+
AudioEncoderAndroid: audioRecorderModule.AudioEncoderAndroidType.AAC,
|
|
44
|
+
OutputFormatAndroid: audioRecorderModule.OutputFormatAndroidType.MPEG_4,
|
|
45
|
+
AudioSourceAndroid: audioRecorderModule.AudioSourceAndroidType.VOICE_RECOGNITION
|
|
46
|
+
},
|
|
47
|
+
ios: {
|
|
48
|
+
AVEncoderBitRateKeyIOS: this.audioSettings.bitRate,
|
|
49
|
+
AVNumberOfChannelsKeyIOS: this.audioSettings.audioChannels,
|
|
50
|
+
AVSampleRateKeyIOS: this.audioSettings.sampleRate,
|
|
51
|
+
AVFormatIDKeyIOS: audioRecorderModule.AVEncodingOption.mp4,
|
|
52
|
+
// same with aac
|
|
53
|
+
AVEncoderAudioQualityKeyIOS: audioRecorderModule.AVEncoderAudioQualityIOSType.high
|
|
54
|
+
},
|
|
55
|
+
default: {}
|
|
56
|
+
}));
|
|
57
|
+
_defineProperty(this, "setState", state => {
|
|
58
|
+
this.state = state;
|
|
59
|
+
this.stateSubscribers.forEach(callback => {
|
|
60
|
+
callback(state);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "requestPermission", async () => {
|
|
64
|
+
const permission = Platform.select({
|
|
65
|
+
android: [permissionModule.PERMISSIONS.ANDROID.RECORD_AUDIO],
|
|
66
|
+
ios: [permissionModule.PERMISSIONS.IOS.MICROPHONE],
|
|
67
|
+
windows: [permissionModule.PERMISSIONS.WINDOWS.MICROPHONE],
|
|
68
|
+
default: undefined
|
|
69
|
+
});
|
|
70
|
+
if (Platform.OS === 'android' && Platform.Version <= 28) {
|
|
71
|
+
permission === null || permission === void 0 ? void 0 : permission.push(permissionModule.PERMISSIONS.ANDROID.WRITE_EXTERNAL_STORAGE);
|
|
72
|
+
}
|
|
73
|
+
if (permission) {
|
|
74
|
+
const status = await permissionModule.checkMultiple(permission);
|
|
75
|
+
if (nativePermissionGranted(status)) {
|
|
76
|
+
return true;
|
|
77
|
+
} else {
|
|
78
|
+
const status = await permissionModule.requestMultiple(permission);
|
|
79
|
+
return nativePermissionGranted(status);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
_defineProperty(this, "addRecordingListener", callback => {
|
|
86
|
+
this.recordingSubscribers.add(callback);
|
|
87
|
+
return () => {
|
|
88
|
+
this.recordingSubscribers.delete(callback);
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "addStateListener", callback => {
|
|
92
|
+
this.stateSubscribers.add(callback);
|
|
93
|
+
return () => {
|
|
94
|
+
this.stateSubscribers.delete(callback);
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
_defineProperty(this, "record", async uri => {
|
|
98
|
+
if (matchesOneOf(this.state, ['idle', 'completed'])) {
|
|
99
|
+
try {
|
|
100
|
+
this.setState('preparing');
|
|
101
|
+
await module.startRecorder(uri, {
|
|
102
|
+
...this.audioOptions
|
|
103
|
+
});
|
|
104
|
+
if (Platform.OS === 'android') {
|
|
105
|
+
this._recordStartedAt = Date.now();
|
|
106
|
+
}
|
|
107
|
+
this.uri = uri;
|
|
108
|
+
this.setState('recording');
|
|
109
|
+
} catch (e) {
|
|
110
|
+
this.setState('idle');
|
|
111
|
+
throw e;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
_defineProperty(this, "stop", async () => {
|
|
116
|
+
if (matchesOneOf(this.state, ['recording'])) {
|
|
117
|
+
if (Platform.OS === 'android') {
|
|
118
|
+
const buffer = this._getRecorderStopSafeBuffer();
|
|
119
|
+
if (buffer > 0) await sleep(buffer);
|
|
120
|
+
}
|
|
121
|
+
await module.stopRecorder();
|
|
122
|
+
this.setState('completed');
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
_defineProperty(this, "reset", async () => {
|
|
126
|
+
await this.stop();
|
|
127
|
+
this.uri = undefined;
|
|
128
|
+
this.recordingSubscribers.clear();
|
|
129
|
+
this.setState('idle');
|
|
130
|
+
});
|
|
131
|
+
module.setSubscriptionDuration(0.1);
|
|
132
|
+
module.addRecordBackListener(data => {
|
|
133
|
+
const completed = data.currentPosition >= this.options.maxDuration;
|
|
134
|
+
if (completed) this.stop();
|
|
135
|
+
if (this.state === 'recording') {
|
|
136
|
+
this.recordingSubscribers.forEach(callback => {
|
|
137
|
+
callback({
|
|
138
|
+
currentTime: data.currentPosition,
|
|
139
|
+
completed
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return new VoiceRecorder();
|
|
147
|
+
};
|
|
148
|
+
export default createNativeRecorderService;
|
|
149
|
+
//# sourceMappingURL=createRecorderService.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","matchesOneOf","sleep","VoiceMessageConfig","nativePermissionGranted","createNativeRecorderService","_ref","audioRecorderModule","permissionModule","module","default","VoiceRecorder","constructor","_defineProperty","undefined","minDuration","DEFAULT","RECORDER","MIN_DURATION","maxDuration","MAX_DURATION","extension","EXTENSION","minWaitingTime","elapsedTime","Date","now","_recordStartedAt","Set","sampleRate","SAMPLE_RATE","bitRate","BIT_RATE","audioChannels","CHANNELS","select","android","AudioEncodingBitRateAndroid","audioSettings","AudioChannelsAndroid","AudioSamplingRateAndroid","AudioEncoderAndroid","AudioEncoderAndroidType","AAC","OutputFormatAndroid","OutputFormatAndroidType","MPEG_4","AudioSourceAndroid","AudioSourceAndroidType","VOICE_RECOGNITION","ios","AVEncoderBitRateKeyIOS","AVNumberOfChannelsKeyIOS","AVSampleRateKeyIOS","AVFormatIDKeyIOS","AVEncodingOption","mp4","AVEncoderAudioQualityKeyIOS","AVEncoderAudioQualityIOSType","high","state","stateSubscribers","forEach","callback","permission","PERMISSIONS","ANDROID","RECORD_AUDIO","IOS","MICROPHONE","windows","WINDOWS","OS","Version","push","WRITE_EXTERNAL_STORAGE","status","checkMultiple","requestMultiple","recordingSubscribers","add","delete","uri","setState","startRecorder","audioOptions","e","buffer","_getRecorderStopSafeBuffer","stopRecorder","stop","clear","setSubscriptionDuration","addRecordBackListener","data","completed","currentPosition","options","currentTime"],"sources":["createRecorderService.native.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport * as RNAudioRecorder from 'react-native-audio-recorder-player';\nimport * as Permissions from 'react-native-permissions';\nimport { Permission } from 'react-native-permissions/src/types';\n\nimport { matchesOneOf, sleep } from '@sendbird/uikit-utils';\n\nimport VoiceMessageConfig from '../libs/VoiceMessageConfig';\nimport nativePermissionGranted from '../utils/nativePermissionGranted';\nimport type { RecorderServiceInterface, Unsubscribe } from './types';\n\ntype RecordingListener = Parameters<RecorderServiceInterface['addRecordingListener']>[number];\ntype StateListener = Parameters<RecorderServiceInterface['addStateListener']>[number];\ntype Modules = {\n audioRecorderModule: typeof RNAudioRecorder;\n permissionModule: typeof Permissions;\n};\nconst createNativeRecorderService = ({ audioRecorderModule, permissionModule }: Modules): RecorderServiceInterface => {\n const module = new audioRecorderModule.default();\n\n class VoiceRecorder implements RecorderServiceInterface {\n public uri: RecorderServiceInterface['uri'] = undefined;\n public state: RecorderServiceInterface['state'] = 'idle';\n public options: RecorderServiceInterface['options'] = {\n minDuration: VoiceMessageConfig.DEFAULT.RECORDER.MIN_DURATION,\n maxDuration: VoiceMessageConfig.DEFAULT.RECORDER.MAX_DURATION,\n extension: VoiceMessageConfig.DEFAULT.RECORDER.EXTENSION,\n };\n\n // NOTE: In Android, even when startRecorder() is awaited, if stop() is executed immediately afterward, an error occurs\n private _recordStartedAt = 0;\n private _getRecorderStopSafeBuffer = () => {\n const minWaitingTime = 500;\n const elapsedTime = Date.now() - this._recordStartedAt;\n if (elapsedTime > minWaitingTime) return 0;\n else return minWaitingTime - elapsedTime;\n };\n\n private readonly recordingSubscribers = new Set<RecordingListener>();\n private readonly stateSubscribers = new Set<StateListener>();\n private readonly audioSettings = {\n sampleRate: VoiceMessageConfig.DEFAULT.RECORDER.SAMPLE_RATE,\n bitRate: VoiceMessageConfig.DEFAULT.RECORDER.BIT_RATE,\n audioChannels: VoiceMessageConfig.DEFAULT.RECORDER.CHANNELS,\n // encoding: mpeg4_aac\n };\n private readonly audioOptions = Platform.select({\n android: {\n AudioEncodingBitRateAndroid: this.audioSettings.bitRate,\n AudioChannelsAndroid: this.audioSettings.audioChannels,\n AudioSamplingRateAndroid: this.audioSettings.sampleRate,\n AudioEncoderAndroid: audioRecorderModule.AudioEncoderAndroidType.AAC,\n OutputFormatAndroid: audioRecorderModule.OutputFormatAndroidType.MPEG_4,\n AudioSourceAndroid: audioRecorderModule.AudioSourceAndroidType.VOICE_RECOGNITION,\n },\n ios: {\n AVEncoderBitRateKeyIOS: this.audioSettings.bitRate,\n AVNumberOfChannelsKeyIOS: this.audioSettings.audioChannels,\n AVSampleRateKeyIOS: this.audioSettings.sampleRate,\n AVFormatIDKeyIOS: audioRecorderModule.AVEncodingOption.mp4, // same with aac\n AVEncoderAudioQualityKeyIOS: audioRecorderModule.AVEncoderAudioQualityIOSType.high,\n },\n default: {},\n });\n\n constructor() {\n module.setSubscriptionDuration(0.1);\n module.addRecordBackListener((data) => {\n const completed = data.currentPosition >= this.options.maxDuration;\n\n if (completed) this.stop();\n if (this.state === 'recording') {\n this.recordingSubscribers.forEach((callback) => {\n callback({ currentTime: data.currentPosition, completed });\n });\n }\n });\n }\n\n private setState = (state: RecorderServiceInterface['state']) => {\n this.state = state;\n this.stateSubscribers.forEach((callback) => {\n callback(state);\n });\n };\n\n public requestPermission = async (): Promise<boolean> => {\n const permission: Permission[] | undefined = Platform.select({\n android: [permissionModule.PERMISSIONS.ANDROID.RECORD_AUDIO],\n ios: [permissionModule.PERMISSIONS.IOS.MICROPHONE],\n windows: [permissionModule.PERMISSIONS.WINDOWS.MICROPHONE],\n default: undefined,\n });\n\n if (Platform.OS === 'android' && Platform.Version <= 28) {\n permission?.push(permissionModule.PERMISSIONS.ANDROID.WRITE_EXTERNAL_STORAGE);\n }\n\n if (permission) {\n const status = await permissionModule.checkMultiple(permission);\n if (nativePermissionGranted(status)) {\n return true;\n } else {\n const status = await permissionModule.requestMultiple(permission);\n return nativePermissionGranted(status);\n }\n } else {\n return true;\n }\n };\n\n public addRecordingListener = (callback: RecordingListener): Unsubscribe => {\n this.recordingSubscribers.add(callback);\n return () => {\n this.recordingSubscribers.delete(callback);\n };\n };\n\n public addStateListener = (callback: StateListener): Unsubscribe => {\n this.stateSubscribers.add(callback);\n return () => {\n this.stateSubscribers.delete(callback);\n };\n };\n\n public record = async (uri: string): Promise<void> => {\n if (matchesOneOf(this.state, ['idle', 'completed'])) {\n try {\n this.setState('preparing');\n await module.startRecorder(uri, {\n ...this.audioOptions,\n });\n\n if (Platform.OS === 'android') {\n this._recordStartedAt = Date.now();\n }\n\n this.uri = uri;\n this.setState('recording');\n } catch (e) {\n this.setState('idle');\n throw e;\n }\n }\n };\n\n public stop = async (): Promise<void> => {\n if (matchesOneOf(this.state, ['recording'])) {\n if (Platform.OS === 'android') {\n const buffer = this._getRecorderStopSafeBuffer();\n if (buffer > 0) await sleep(buffer);\n }\n\n await module.stopRecorder();\n this.setState('completed');\n }\n };\n\n public reset = async (): Promise<void> => {\n await this.stop();\n this.uri = undefined;\n this.recordingSubscribers.clear();\n this.setState('idle');\n };\n }\n\n return new VoiceRecorder();\n};\n\nexport default createNativeRecorderService;\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type SBUError from '../libs/SBUError';\n\nexport type Unsubscribe = () => void | undefined;\nexport type DownloadedPath = string;\nexport type FilePickerResponse = FileType | null;\n\n/**\n * We are following the file format of react-native FormData\n * @see https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Network/FormData.js#L37-L41\n * */\nexport type FileType = { name: string; uri: string; size: number; type: string };\n\n// ---------- NotificationService ---------- //\nexport interface NotificationServiceInterface {\n hasPushPermission(): Promise<boolean>;\n requestPushPermission(): Promise<boolean>;\n\n getAPNSToken(): Promise<string | null>;\n getFCMToken(): Promise<string | null>;\n onTokenRefresh(handler: (token: string) => void): Unsubscribe;\n}\n\n// ---------- ClipboardService ---------- //\nexport interface ClipboardServiceInterface {\n setString(text: string): void;\n getString(): Promise<string>;\n}\n\n// ---------- FileService ---------- //\nexport interface FileServiceInterface extends FilePickerServiceInterface, FileSystemServiceInterface {}\n\nexport interface OpenResultListener {\n onOpenFailure?: (error: SBUError, originError?: unknown) => void;\n}\nexport interface OpenMediaLibraryOptions extends OpenResultListener {\n selectionLimit?: number;\n mediaType?: 'photo' | 'video' | 'all';\n}\nexport interface OpenCameraOptions extends OpenResultListener {\n cameraType?: 'front' | 'back';\n mediaType?: 'photo' | 'video' | 'all';\n}\nexport type OpenDocumentOptions = OpenResultListener;\nexport interface SaveOptions {\n fileUrl: string;\n fileName: string;\n fileType?: string | null;\n}\n\nexport interface FilePickerServiceInterface {\n openMediaLibrary(options?: OpenMediaLibraryOptions): Promise<null | FilePickerResponse[]>;\n openCamera(options?: OpenCameraOptions): Promise<FilePickerResponse>;\n openDocument(options?: OpenDocumentOptions): Promise<FilePickerResponse>;\n}\n\nexport interface FileSystemServiceInterface {\n // NOTE: On iOS, You can access the downloaded files by providing options below to info.plist\n // - Supports opening documents in place\n // - Application supports iTunes file sharing\n save(options?: SaveOptions): Promise<DownloadedPath | null>;\n}\n\n// ---------- MediaService ---------- //\nexport type VideoProps = {\n source: { uri: string } | number;\n resizeMode?: 'cover' | 'contain' | 'stretch';\n onLoad?: () => void;\n};\n\nexport type GetVideoThumbnailOptions = {\n url: string;\n timeMills?: number;\n quality?: number;\n};\nexport type GetVideoThumbnailResult = Promise<{ path: string } | null>;\n\nexport type CompressImageOptions = {\n /**\n * A uri of image file to compress\n * */\n uri: string;\n\n /**\n * A resize width, apply only to downscale\n * */\n maxWidth?: number;\n\n /**\n * A resize height, apply only to downscale\n * */\n maxHeight?: number;\n\n /**\n * A value in range 0.0 - 1.0 specifying compression level of the result image.\n * 1 means highest quality and 0 the lowest quality.\n * */\n compressionRate?: number;\n};\nexport type CompressImageResult = Promise<{ uri: string; size: number } | null>;\n\nexport interface MediaServiceInterface {\n VideoComponent<Props = {}>(props: VideoProps & Props):
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport type SBUError from '../libs/SBUError';\n\nexport type Unsubscribe = () => void | undefined;\nexport type DownloadedPath = string;\nexport type FilePickerResponse = FileType | null;\n\n/**\n * We are following the file format of react-native FormData\n * @see https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Network/FormData.js#L37-L41\n * */\nexport type FileType = { name: string; uri: string; size: number; type: string };\n\n// ---------- NotificationService ---------- //\nexport interface NotificationServiceInterface {\n hasPushPermission(): Promise<boolean>;\n requestPushPermission(): Promise<boolean>;\n\n getAPNSToken(): Promise<string | null>;\n getFCMToken(): Promise<string | null>;\n onTokenRefresh(handler: (token: string) => void): Unsubscribe;\n}\n\n// ---------- ClipboardService ---------- //\nexport interface ClipboardServiceInterface {\n setString(text: string): void;\n getString(): Promise<string>;\n}\n\n// ---------- FileService ---------- //\nexport interface FileServiceInterface extends FilePickerServiceInterface, FileSystemServiceInterface {}\n\nexport interface OpenResultListener {\n onOpenFailure?: (error: SBUError, originError?: unknown) => void;\n}\nexport interface OpenMediaLibraryOptions extends OpenResultListener {\n selectionLimit?: number;\n mediaType?: 'photo' | 'video' | 'all';\n}\nexport interface OpenCameraOptions extends OpenResultListener {\n cameraType?: 'front' | 'back';\n mediaType?: 'photo' | 'video' | 'all';\n}\nexport type OpenDocumentOptions = OpenResultListener;\nexport interface SaveOptions {\n fileUrl: string;\n fileName: string;\n fileType?: string | null;\n}\n\nexport interface FilePickerServiceInterface {\n openMediaLibrary(options?: OpenMediaLibraryOptions): Promise<null | FilePickerResponse[]>;\n openCamera(options?: OpenCameraOptions): Promise<FilePickerResponse>;\n openDocument(options?: OpenDocumentOptions): Promise<FilePickerResponse>;\n}\n\nexport interface FileSystemServiceInterface {\n // NOTE: On iOS, You can access the downloaded files by providing options below to info.plist\n // - Supports opening documents in place\n // - Application supports iTunes file sharing\n save(options?: SaveOptions): Promise<DownloadedPath | null>;\n createRecordFilePath(customExtension?: string): { recordFilePath: string; uri: string };\n}\n\n// ---------- MediaService ---------- //\nexport type VideoProps = {\n source: { uri: string } | number;\n resizeMode?: 'cover' | 'contain' | 'stretch';\n onLoad?: () => void;\n};\n\nexport type GetVideoThumbnailOptions = {\n url: string;\n timeMills?: number;\n quality?: number;\n};\nexport type GetVideoThumbnailResult = Promise<{ path: string } | null>;\n\nexport type CompressImageOptions = {\n /**\n * A uri of image file to compress\n * */\n uri: string;\n\n /**\n * A resize width, apply only to downscale\n * */\n maxWidth?: number;\n\n /**\n * A resize height, apply only to downscale\n * */\n maxHeight?: number;\n\n /**\n * A value in range 0.0 - 1.0 specifying compression level of the result image.\n * 1 means highest quality and 0 the lowest quality.\n * */\n compressionRate?: number;\n};\nexport type CompressImageResult = Promise<{ uri: string; size: number } | null>;\n\nexport interface MediaServiceInterface {\n VideoComponent<Props = {}>(props: VideoProps & Props): ReactNode;\n getVideoThumbnail(options: GetVideoThumbnailOptions): GetVideoThumbnailResult;\n compressImage(options: CompressImageOptions): CompressImageResult;\n}\n\n// ---------- PlayerService ---------- //\nexport interface PlayerServiceInterface {\n uri?: string;\n state: 'idle' | 'preparing' | 'playing' | 'paused' | 'stopped';\n\n /**\n * Check and request permission for the player.\n * */\n requestPermission(): Promise<boolean>;\n\n /**\n * Add a playback listener.\n * */\n addPlaybackListener(\n callback: (params: { currentTime: number; duration: number; stopped: boolean }) => void,\n ): Unsubscribe;\n\n /**\n * Add a state listener.\n * */\n addStateListener(callback: (state: PlayerServiceInterface['state']) => void): Unsubscribe;\n\n /**\n * State transition:\n * [idle, stopped] to [playing] - start from the beginning\n * [paused] to [playing] - resume\n * */\n play(uri: string): Promise<void>;\n\n /**\n * State transition:\n * [playing] to [paused]\n * */\n pause(): Promise<void>;\n\n /**\n * State transition:\n * [preparing, playing, paused] to [stop]\n * */\n stop(): Promise<void>;\n\n /**\n * State transition:\n * [*] to [idle]\n * */\n reset(): Promise<void>;\n\n /**\n * Seek time, only available when the state is [playing, paused].\n * */\n seek(time: number): Promise<void>;\n}\n\n// ---------- RecorderService ---------- //\nexport interface RecorderOptions {\n /**\n * Minimum recording duration (milliseconds).\n * */\n minDuration: number;\n\n /**\n * Maximum recording duration (milliseconds).\n * */\n maxDuration: number;\n\n /**\n * File extension for recorded audio file\n * */\n extension: string;\n}\n\nexport interface RecorderServiceInterface {\n uri?: string;\n options: RecorderOptions;\n state: 'idle' | 'preparing' | 'recording' | 'completed';\n\n /**\n * Check and request permission for the recorder.\n * */\n requestPermission(): Promise<boolean>;\n\n /**\n * Add recording listener.\n * */\n addRecordingListener(callback: (params: { currentTime: number; completed: boolean }) => void): Unsubscribe;\n\n /**\n * Add state listener.\n * */\n addStateListener(callback: (state: RecorderServiceInterface['state']) => void): Unsubscribe;\n\n /**\n * State transition:\n * [idle, completed] to [recording]\n * */\n record(uri?: string): Promise<void>;\n\n /**\n * State transition:\n * [recording] to [completed]\n * */\n stop(): Promise<void>;\n\n /**\n * State transition:\n * [*] to [idle]\n * */\n reset(): Promise<void>;\n}\n"],"mappings":""}
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ErrorInfo, ReactNode } from 'react';\n\nimport type { SendbirdUser } from '@sendbird/uikit-utils';\n\nexport type KeyValuePairGet = [string, string | null];\nexport type KeyValuePairSet = [string, string];\nexport interface LocalCacheStorage {\n getAllKeys(): Promise<readonly string[] | string[]>;\n getItem(key: string): Promise<string | null>;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n\n multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;\n multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;\n multiRemove?(keys: string[]): Promise<void>;\n}\n\nexport type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };\n\nexport type CommonComponent<P = {}> = (props: P & { children?: ReactNode }) => null |
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ErrorInfo, ReactNode } from 'react';\n\nimport type { SendbirdUser } from '@sendbird/uikit-utils';\n\nexport type KeyValuePairGet = [string, string | null];\nexport type KeyValuePairSet = [string, string];\nexport interface LocalCacheStorage {\n getAllKeys(): Promise<readonly string[] | string[]>;\n getItem(key: string): Promise<string | null>;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n\n multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;\n multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;\n multiRemove?(keys: string[]): Promise<void>;\n}\n\nexport type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };\n\nexport type CommonComponent<P = {}> = (props: P & { children?: ReactNode }) => null | ReactNode;\n\nexport type MentionedUser = {\n range: Range;\n user: SendbirdUser;\n};\n\nexport type Range = {\n start: number;\n end: number;\n};\n"],"mappings":""}
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '3.
|
|
1
|
+
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '3.2.0';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,OAAO;AACvB,eAAeA,OAAO"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import { SendbirdBaseChannel } from '@sendbird/uikit-utils';
|
|
3
4
|
type Props = {
|
|
@@ -5,5 +6,5 @@ type Props = {
|
|
|
5
6
|
size: number;
|
|
6
7
|
containerStyle?: StyleProp<ViewStyle>;
|
|
7
8
|
};
|
|
8
|
-
declare const ChannelCover: ({ channel, ...avatarProps }: Props) => JSX.Element;
|
|
9
|
+
declare const ChannelCover: ({ channel, ...avatarProps }: Props) => React.JSX.Element;
|
|
9
10
|
export default ChannelCover;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export type AttachmentsButtonProps = {
|
|
2
3
|
onPress: () => void;
|
|
3
4
|
disabled: boolean;
|
|
4
5
|
};
|
|
5
|
-
declare const AttachmentsButton: ({ onPress, disabled }: AttachmentsButtonProps) => JSX.Element;
|
|
6
|
+
declare const AttachmentsButton: ({ onPress, disabled }: AttachmentsButtonProps) => React.JSX.Element;
|
|
6
7
|
export default AttachmentsButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SendbirdFileMessage, SendbirdUserMessage } from '@sendbird/uikit-utils';
|
|
3
|
+
export type MessageToReplyPreviewProps = {
|
|
4
|
+
messageToReply?: SendbirdFileMessage | SendbirdUserMessage;
|
|
5
|
+
setMessageToReply?: (message?: undefined | SendbirdFileMessage | SendbirdUserMessage) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const MessageToReplyPreview: ({ messageToReply, setMessageToReply }: MessageToReplyPreviewProps) => React.JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FileType } from '../../platform/types';
|
|
3
|
+
export type VoiceMessageInputProps = {
|
|
4
|
+
onClose: () => Promise<void>;
|
|
5
|
+
onSend: (params: {
|
|
6
|
+
file: FileType;
|
|
7
|
+
duration: number;
|
|
8
|
+
}) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const VoiceMessageInput: ({ onClose, onSend }: VoiceMessageInputProps) => React.JSX.Element;
|
|
11
|
+
export default VoiceMessageInput;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { SendbirdBaseChannel, SendbirdFileMessage, SendbirdFileMessageCreateParams, SendbirdFileMessageUpdateParams, SendbirdMember, SendbirdUserMessage, SendbirdUserMessageCreateParams, SendbirdUserMessageUpdateParams } from '@sendbird/uikit-utils';
|
|
3
3
|
import type { MentionedUser, Range } from '../../types';
|
|
4
4
|
import type { AttachmentsButtonProps } from './AttachmentsButton';
|
|
5
|
+
import type { MessageToReplyPreviewProps } from './MessageToReplyPreview';
|
|
6
|
+
import { VoiceMessageInputProps } from './VoiceMessageInput';
|
|
5
7
|
export type SuggestedMentionListProps = {
|
|
6
8
|
text: string;
|
|
7
9
|
selection: Range;
|
|
@@ -26,8 +28,10 @@ export type ChannelInputProps = {
|
|
|
26
28
|
setMessageToEdit: (message?: undefined | SendbirdUserMessage | SendbirdFileMessage) => void;
|
|
27
29
|
messageToReply?: undefined | SendbirdUserMessage | SendbirdFileMessage;
|
|
28
30
|
setMessageToReply?: (message?: undefined | SendbirdUserMessage | SendbirdFileMessage) => void;
|
|
29
|
-
SuggestedMentionList?: (props: SuggestedMentionListProps) =>
|
|
30
|
-
AttachmentsButton?: (props: AttachmentsButtonProps) =>
|
|
31
|
+
SuggestedMentionList?: (props: SuggestedMentionListProps) => React.ReactNode | null;
|
|
32
|
+
AttachmentsButton?: (props: AttachmentsButtonProps) => React.ReactNode | null;
|
|
33
|
+
MessageToReplyPreview?: (props: MessageToReplyPreviewProps) => React.ReactNode | null;
|
|
34
|
+
VoiceMessageInput?: (props: VoiceMessageInputProps) => React.ReactNode | null;
|
|
31
35
|
};
|
|
32
|
-
declare const _default: React.MemoExoticComponent<(props: ChannelInputProps) => JSX.Element>;
|
|
36
|
+
declare const _default: React.MemoExoticComponent<(props: ChannelInputProps) => React.JSX.Element>;
|
|
33
37
|
export default _default;
|
|
@@ -52,5 +52,5 @@ export type ChannelMessageListProps<T extends SendbirdGroupChannel | SendbirdOpe
|
|
|
52
52
|
} & {
|
|
53
53
|
ref?: Ref<FlatList<SendbirdMessage>> | undefined;
|
|
54
54
|
};
|
|
55
|
-
declare const _default: <T extends import("@sendbird/chat/openChannel").OpenChannel | import("@sendbird/chat/groupChannel").GroupChannel>({ searchItem, hasNext, channel, onEditMessage, onReplyMessage, onDeleteMessage, onResendFailedMessage, onPressMediaMessage, onPressParentMessage, currentUserId, renderNewMessagesButton, renderScrollToBottomButton, renderMessage, messages, newMessages, enableMessageGrouping, onScrolledAwayFromBottom, scrolledAwayFromBottom, onBottomReached, onTopReached, flatListProps, onPressNewMessagesButton, onPressScrollToBottomButton, }: ChannelMessageListProps<T>, ref: React.ForwardedRef<FlatList<SendbirdMessage>>) => JSX.Element;
|
|
55
|
+
declare const _default: <T extends import("@sendbird/chat/openChannel").OpenChannel | import("@sendbird/chat/groupChannel").GroupChannel>({ searchItem, hasNext, channel, onEditMessage, onReplyMessage, onDeleteMessage, onResendFailedMessage, onPressMediaMessage, onPressParentMessage, currentUserId, renderNewMessagesButton, renderScrollToBottomButton, renderMessage, messages, newMessages, enableMessageGrouping, onScrolledAwayFromBottom, scrolledAwayFromBottom, onBottomReached, onTopReached, flatListProps, onPressNewMessagesButton, onPressScrollToBottomButton, }: ChannelMessageListProps<T>, ref: React.ForwardedRef<FlatList<SendbirdMessage>>) => React.JSX.Element;
|
|
56
56
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SendbirdFileMessage } from '@sendbird/uikit-utils';
|
|
2
3
|
type Props = {
|
|
3
4
|
fileMessage: SendbirdFileMessage;
|
|
@@ -8,5 +9,5 @@ type Props = {
|
|
|
8
9
|
headerShown?: boolean;
|
|
9
10
|
headerTopInset?: number;
|
|
10
11
|
};
|
|
11
|
-
declare const FileViewer: ({ headerShown, deleteMessage, headerTopInset, fileMessage, onPressDownload, onPressDelete, onClose, }: Props) => JSX.Element;
|
|
12
|
+
declare const FileViewer: ({ headerShown, deleteMessage, headerTopInset, fileMessage, onPressDownload, onPressDelete, onClose, }: Props) => React.JSX.Element;
|
|
12
13
|
export default FileViewer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SendbirdMessage } from '@sendbird/uikit-utils';
|
|
2
3
|
declare const GroupChannelMessageDateSeparator: ({ message, prevMessage, }: {
|
|
3
4
|
message: SendbirdMessage;
|
|
4
5
|
prevMessage?: SendbirdMessage | undefined;
|
|
5
|
-
}) => JSX.Element | null;
|
|
6
|
+
}) => React.JSX.Element | null;
|
|
6
7
|
export default GroupChannelMessageDateSeparator;
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
message: SendbirdMessage;
|
|
7
7
|
style?: StyleProp<ImageStyle>;
|
|
8
8
|
};
|
|
9
|
-
declare const _default: React.MemoExoticComponent<({ channel, message, style }: Props) => JSX.Element | null>;
|
|
9
|
+
declare const _default: React.MemoExoticComponent<({ channel, message, style }: Props) => React.JSX.Element | null>;
|
|
10
10
|
export default _default;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SendbirdFileMessage, SendbirdGroupChannel, SendbirdMessage, SendbirdUserMessage } from '@sendbird/uikit-utils';
|
|
2
3
|
type Props = {
|
|
3
4
|
variant: 'outgoing' | 'incoming';
|
|
5
|
+
channel: SendbirdGroupChannel;
|
|
4
6
|
message: SendbirdUserMessage | SendbirdFileMessage;
|
|
5
7
|
childMessage: SendbirdUserMessage | SendbirdFileMessage;
|
|
6
8
|
onPress?: (message: SendbirdMessage) => void;
|
|
7
9
|
};
|
|
8
|
-
declare const GroupChannelMessageParentMessage: ({ variant, message, childMessage, onPress }: Props) => JSX.Element;
|
|
10
|
+
declare const GroupChannelMessageParentMessage: ({ variant, channel, message, childMessage, onPress }: Props) => React.JSX.Element;
|
|
9
11
|
export default GroupChannelMessageParentMessage;
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
visible: boolean;
|
|
6
6
|
onPress: () => void;
|
|
7
7
|
};
|
|
8
|
-
declare const _default: React.MemoExoticComponent<({ newMessages, visible, onPress }: Props) => JSX.Element | null>;
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ newMessages, visible, onPress }: Props) => React.JSX.Element | null>;
|
|
9
9
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SendbirdMessage } from '@sendbird/uikit-utils';
|
|
2
3
|
declare const OpenChannelMessageDateSeparator: ({ message, prevMessage, }: {
|
|
3
4
|
message: SendbirdMessage;
|
|
4
5
|
prevMessage?: SendbirdMessage | undefined;
|
|
5
|
-
}) => JSX.Element | null;
|
|
6
|
+
}) => React.JSX.Element | null;
|
|
6
7
|
export default OpenChannelMessageDateSeparator;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SendbirdBaseChannel, SendbirdBaseMessage } from '@sendbird/uikit-utils';
|
|
2
3
|
type Props = {
|
|
3
4
|
onClose: () => Promise<void>;
|
|
4
5
|
channel: SendbirdBaseChannel;
|
|
5
6
|
message: SendbirdBaseMessage;
|
|
6
7
|
};
|
|
7
|
-
declare const BottomSheetReactionAddon: ({ onClose, message, channel }: Props) => JSX.Element;
|
|
8
|
+
declare const BottomSheetReactionAddon: ({ onClose, message, channel }: Props) => React.JSX.Element;
|
|
8
9
|
export default BottomSheetReactionAddon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SendbirdBaseChannel, SendbirdBaseMessage } from '@sendbird/uikit-utils';
|
|
2
3
|
declare const MessageReactionAddon: ({ channel, message }: {
|
|
3
4
|
channel: SendbirdBaseChannel;
|
|
4
5
|
message: SendbirdBaseMessage;
|
|
5
|
-
}) => JSX.Element | null;
|
|
6
|
+
}) => React.JSX.Element | null;
|
|
6
7
|
export default MessageReactionAddon;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
type Props = {
|
|
3
4
|
url: string;
|
|
@@ -6,9 +7,9 @@ type Props = {
|
|
|
6
7
|
style: StyleProp<ViewStyle>;
|
|
7
8
|
};
|
|
8
9
|
declare const ReactionRoundedButton: {
|
|
9
|
-
({ url, count, reacted, style }: Props): JSX.Element;
|
|
10
|
+
({ url, count, reacted, style }: Props): React.JSX.Element;
|
|
10
11
|
More({ pressed }: {
|
|
11
12
|
pressed: boolean;
|
|
12
|
-
}): JSX.Element;
|
|
13
|
+
}): React.JSX.Element;
|
|
13
14
|
};
|
|
14
15
|
export default ReactionRoundedButton;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const ReactionAddons: {
|
|
2
3
|
BottomSheet: ({ onClose, message, channel }: {
|
|
3
4
|
onClose: () => Promise<void>;
|
|
4
5
|
channel: import("@sendbird/chat").BaseChannel;
|
|
5
6
|
message: import("@sendbird/chat/message").BaseMessage;
|
|
6
|
-
}) => JSX.Element;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
7
8
|
Message: ({ channel, message }: {
|
|
8
9
|
channel: import("@sendbird/chat").BaseChannel;
|
|
9
10
|
message: import("@sendbird/chat/message").BaseMessage;
|
|
10
|
-
}) => JSX.Element | null;
|
|
11
|
+
}) => import("react").JSX.Element | null;
|
|
11
12
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactionBottomSheetProps } from './index';
|
|
2
|
-
declare const ReactionListBottomSheet: ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => JSX.Element;
|
|
3
|
+
declare const ReactionListBottomSheet: ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => React.JSX.Element;
|
|
3
4
|
export default ReactionListBottomSheet;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ReactionBottomSheetProps } from './index';
|
|
2
|
-
declare const ReactionUserListBottomSheet: ({ visible, onClose, onDismiss, reactionCtx, chatCtx, localizationCtx,
|
|
3
|
+
declare const ReactionUserListBottomSheet: ({ visible, onClose, onDismiss, reactionCtx, chatCtx, localizationCtx, onPressUserProfile, }: ReactionBottomSheetProps) => React.JSX.Element;
|
|
3
4
|
export default ReactionUserListBottomSheet;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { SendbirdMember, SendbirdUser } from '@sendbird/uikit-utils';
|
|
2
3
|
import type { LocalizationContext } from '../../contexts/LocalizationCtx';
|
|
3
4
|
import type { ReactionContext } from '../../contexts/ReactionCtx';
|
|
4
5
|
import type { SendbirdChatContext } from '../../contexts/SendbirdChatCtx';
|
|
5
|
-
import type { UserProfileContext } from '../../contexts/UserProfileCtx';
|
|
6
6
|
type GetFromContext<T> = T extends React.Context<infer Value> ? NonNullable<Value> : never;
|
|
7
7
|
export type ReactionBottomSheetProps = {
|
|
8
8
|
visible: boolean;
|
|
9
9
|
onDismiss: () => void;
|
|
10
10
|
onClose: () => Promise<void>;
|
|
11
|
+
onPressUserProfile: (user: SendbirdUser | SendbirdMember) => void;
|
|
11
12
|
chatCtx: GetFromContext<typeof SendbirdChatContext>;
|
|
12
13
|
reactionCtx: GetFromContext<typeof ReactionContext>;
|
|
13
14
|
localizationCtx: GetFromContext<typeof LocalizationContext>;
|
|
14
|
-
userProfileCtx: GetFromContext<typeof UserProfileContext>;
|
|
15
15
|
};
|
|
16
16
|
export declare const ReactionBottomSheets: {
|
|
17
|
-
ReactionList: ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => JSX.Element;
|
|
18
|
-
UserList: ({ visible, onClose, onDismiss, reactionCtx, chatCtx, localizationCtx,
|
|
17
|
+
ReactionList: ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => React.JSX.Element;
|
|
18
|
+
UserList: ({ visible, onClose, onDismiss, reactionCtx, chatCtx, localizationCtx, onPressUserProfile, }: ReactionBottomSheetProps) => React.JSX.Element;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = {
|
|
|
3
3
|
visible: boolean;
|
|
4
4
|
onPress: () => void;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: React.MemoExoticComponent<({ visible, onPress }: Props) => JSX.Element | null>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ visible, onPress }: Props) => React.JSX.Element | null>;
|
|
7
7
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
type Props = {
|
|
3
3
|
loading?: boolean;
|
|
4
|
-
LoadingComponent?:
|
|
4
|
+
LoadingComponent?: ReactNode;
|
|
5
5
|
error?: boolean;
|
|
6
|
-
ErrorComponent?:
|
|
6
|
+
ErrorComponent?: ReactNode;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
};
|
|
9
|
-
declare const StatusComposition: ({ children, error, ErrorComponent, LoadingComponent, loading }: Props) => JSX.Element;
|
|
9
|
+
declare const StatusComposition: ({ children, error, ErrorComponent, LoadingComponent, loading }: Props) => React.JSX.Element;
|
|
10
10
|
export default StatusComposition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type Props = {
|
|
2
3
|
type: 'no-muted-members' | 'no-muted-participants' | 'no-banned-users' | 'no-channels' | 'no-messages' | 'no-users' | 'no-results-found' | 'error-wrong' | 'loading';
|
|
3
4
|
onPressRetry?: () => void;
|
|
4
5
|
};
|
|
5
|
-
declare const TypedPlaceholder: ({ type, onPressRetry }: Props) => JSX.Element;
|
|
6
|
+
declare const TypedPlaceholder: ({ type, onPressRetry }: Props) => React.JSX.Element;
|
|
6
7
|
export default TypedPlaceholder;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { GestureResponderEvent } from 'react-native';
|
|
2
3
|
type Props = {
|
|
3
4
|
uri: string;
|
|
@@ -8,5 +9,5 @@ type Props = {
|
|
|
8
9
|
onPressActionMenu?: (ev: GestureResponderEvent) => void;
|
|
9
10
|
onPressAvatar?: (ev: GestureResponderEvent) => void;
|
|
10
11
|
};
|
|
11
|
-
declare const UserActionBar: ({ muted, uri, name, disabled, label, onPressActionMenu, onPressAvatar }: Props) => JSX.Element;
|
|
12
|
+
declare const UserActionBar: ({ muted, uri, name, disabled, label, onPressActionMenu, onPressAvatar }: Props) => React.JSX.Element;
|
|
12
13
|
export default UserActionBar;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type Props = {
|
|
2
3
|
uri: string;
|
|
3
4
|
name: string;
|
|
4
5
|
selected: boolean;
|
|
5
6
|
disabled: boolean;
|
|
6
7
|
};
|
|
7
|
-
declare const UserSelectableBar: ({ uri, name, selected, disabled }: Props) => JSX.Element;
|
|
8
|
+
declare const UserSelectableBar: ({ uri, name, selected, disabled }: Props) => React.JSX.Element;
|
|
8
9
|
export default UserSelectableBar;
|
|
@@ -2,3 +2,5 @@ export declare const DEFAULT_LONG_PRESS_DELAY = 350;
|
|
|
2
2
|
export declare const MESSAGE_SEARCH_SAFE_SCROLL_DELAY = 500;
|
|
3
3
|
export declare const MESSAGE_FOCUS_ANIMATION_DELAY = 250;
|
|
4
4
|
export declare const UNKNOWN_USER_ID = "##__USER_ID_IS_NOT_PROVIDED__##";
|
|
5
|
+
export declare const VOICE_MESSAGE_META_ARRAY_DURATION_KEY = "KEY_VOICE_MESSAGE_DURATION";
|
|
6
|
+
export declare const VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY = "KEY_INTERNAL_MESSAGE_TYPE";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SendbirdGroupChannel } from '@sendbird/uikit-utils';
|
|
2
3
|
type Props = {
|
|
3
4
|
channel: SendbirdGroupChannel;
|
|
4
5
|
onPress: () => void;
|
|
5
6
|
onLongPress: () => void;
|
|
6
7
|
};
|
|
7
|
-
declare const GroupChannelPreviewContainer: ({ onPress, onLongPress, channel }: Props) => JSX.Element;
|
|
8
|
+
declare const GroupChannelPreviewContainer: ({ onPress, onLongPress, channel }: Props) => React.JSX.Element;
|
|
8
9
|
export default GroupChannelPreviewContainer;
|
|
@@ -2,11 +2,11 @@ import React, { ErrorInfo } from 'react';
|
|
|
2
2
|
import type { ErrorBoundaryProps } from '../types';
|
|
3
3
|
declare class InternalErrorBoundaryContainer extends React.PureComponent<{
|
|
4
4
|
onError?: (props: ErrorBoundaryProps) => void;
|
|
5
|
-
ErrorInfoComponent?: (props: ErrorBoundaryProps) =>
|
|
5
|
+
ErrorInfoComponent?: (props: ErrorBoundaryProps) => React.ReactNode;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}> {
|
|
8
8
|
static defaultProps: {
|
|
9
|
-
ErrorInfoComponent: (props: ErrorBoundaryProps) => JSX.Element;
|
|
9
|
+
ErrorInfoComponent: (props: ErrorBoundaryProps) => React.JSX.Element;
|
|
10
10
|
};
|
|
11
11
|
state: {
|
|
12
12
|
error: Error | null;
|
|
@@ -14,6 +14,6 @@ declare class InternalErrorBoundaryContainer extends React.PureComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
componentDidCatch: (error: Error, errorInfo: ErrorInfo) => void;
|
|
16
16
|
reset: () => void;
|
|
17
|
-
render: () => JSX.Element | null;
|
|
17
|
+
render: () => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null;
|
|
18
18
|
}
|
|
19
19
|
export default InternalErrorBoundaryContainer;
|