@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_uikitReactNativeFoundation","_uikitUtils","_useContext","_SBUUtils","_OpenChannelMessageDateSeparator","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","OpenChannelMessageRenderer","_ref","channel","message","onPress","onLongPress","onShowUserProfile","enableMessageGrouping","prevMessage","nextMessage","sbOptions","useSendbirdChat","STRINGS","useLocalization","mediaService","usePlatformService","groupWithPrev","calcMessageGrouping","Boolean","messageProps","onPressURL","url","SBUUtils","openURL","onPressAvatar","sender","hideMessageButton","grouped","strings","edited","OPEN_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","senderName","nickname","LABELS","USER_NO_NAME","sentDate","MESSAGE_BUBBLE_TIME","fileName","isFileMessage","MESSAGE_BUBBLE_FILE_TITLE","unknownTitle","MESSAGE_BUBBLE_UNKNOWN_TITLE","unknownDescription","MESSAGE_BUBBLE_UNKNOWN_DESC","renderMessage","getMessageType","createElement","OpenChannelMessage","Admin","User","uikitWithAppInfo","openChannel","enableOgtag","OpenGraphUser","File","ImageFile","VideoFile","fetchThumbnailFromVideoSource","uri","getVideoThumbnail","timeMills","Unknown","Box","_default","React","memo","exports"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { OpenChannelMessageProps } from '@sendbird/uikit-react-native-foundation';\nimport { Box, OpenChannelMessage } from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdAdminMessage,\n SendbirdFileMessage,\n SendbirdMessage,\n SendbirdUserMessage,\n calcMessageGrouping,\n getMessageType,\n} from '@sendbird/uikit-utils';\n\nimport type { OpenChannelProps } from '../../domain/openChannel/types';\nimport { useLocalization, usePlatformService, useSendbirdChat } from '../../hooks/useContext';\nimport SBUUtils from '../../libs/SBUUtils';\nimport OpenChannelMessageDateSeparator from './OpenChannelMessageDateSeparator';\n\nconst OpenChannelMessageRenderer: OpenChannelProps['Fragment']['renderMessage'] = ({\n channel,\n message,\n onPress,\n onLongPress,\n onShowUserProfile,\n enableMessageGrouping,\n prevMessage,\n nextMessage,\n}) => {\n const { sbOptions } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { mediaService } = usePlatformService();\n const { groupWithPrev } = calcMessageGrouping(Boolean(enableMessageGrouping), message, prevMessage, nextMessage);\n\n const messageProps: Omit<OpenChannelMessageProps<SendbirdMessage>, 'message'> = {\n channel,\n onPress,\n onLongPress,\n onPressURL: (url) => SBUUtils.openURL(url),\n onPressAvatar: () => 'sender' in message && onShowUserProfile?.(message.sender, { hideMessageButton: true }),\n grouped: groupWithPrev,\n strings: {\n edited: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX,\n senderName: ('sender' in message && message.sender.nickname) || STRINGS.LABELS.USER_NO_NAME,\n sentDate: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_TIME(message),\n fileName: message.isFileMessage() ? STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_FILE_TITLE(message) : '',\n unknownTitle: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_TITLE(message),\n unknownDescription: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_DESC(message),\n },\n };\n const renderMessage = () => {\n switch (getMessageType(message)) {\n case 'admin': {\n return <OpenChannelMessage.Admin message={message as SendbirdAdminMessage} {...messageProps} />;\n }\n case 'user': {\n return <OpenChannelMessage.User message={message as SendbirdUserMessage} {...messageProps} />;\n }\n case 'user.opengraph': {\n if (sbOptions.uikitWithAppInfo.openChannel.channel.enableOgtag) {\n return <OpenChannelMessage.OpenGraphUser message={message as SendbirdUserMessage} {...messageProps} />;\n } else {\n return <OpenChannelMessage.User message={message as SendbirdUserMessage} {...messageProps} />;\n }\n }\n case 'file':\n case 'file.audio': {\n return <OpenChannelMessage.File message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.image': {\n return <OpenChannelMessage.ImageFile message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.video': {\n return (\n <OpenChannelMessage.VideoFile\n message={message as SendbirdFileMessage}\n fetchThumbnailFromVideoSource={(uri) => mediaService.getVideoThumbnail({ url: uri, timeMills: 1000 })}\n {...messageProps}\n />\n );\n }\n case 'unknown':\n default: {\n return <OpenChannelMessage.Unknown message={message} {...messageProps} />;\n }\n }\n };\n\n return (\n <Box>\n <OpenChannelMessageDateSeparator message={message} prevMessage={prevMessage} />\n {renderMessage()}\n </Box>\n );\n};\n\nexport default React.memo(OpenChannelMessageRenderer);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,2BAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,gCAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAgF,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAEhF,MAAMQ,0BAAyE,GAAGC,IAAA,IAS5E;EAAA,IAT6E;IACjFC,OAAO;IACPC,OAAO;IACPC,OAAO;IACPC,WAAW;IAC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E,2BAAA,CAAAsE,kBAAkB,CAACQ,SAAS,EAAAtE,QAAA;YAACiB,OAAO,EAAEA;UAA+B,GAAKgB,YAAY,EAAI;QACpG;MACA,KAAK,YAAY;QAAE;UACjB,oBACE5C,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACrE,2BAAA,CAAAsE,kBAAkB,CAACS,SAAS,EAAAvE,QAAA;YAC3BiB,OAAO,EAAEA,OAA+B;YACxCuD,6BAA6B,EAAGC,GAAG,IAAK7C,YAAY,CAAC8C,iBAAiB,CAAC;cAAEvC,GAAG,EAAEsC,GAAG;cAAEE,SAAS,EAAE;YAAK,CAAC;UAAE,GAClG1C,YAAY,EAChB;QAEN;MACA,KAAK,SAAS;MACd;QAAS;UACP,oBAAO5C,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACrE,2BAAA,CAAAsE,kBAAkB,CAACc,OAAO,EAAA5E,QAAA;YAACiB,OAAO,EAAEA;UAAQ,GAAKgB,YAAY,EAAI;QAC3E;IAAC;EAEL,CAAC;EAED,oBACE5C,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACrE,2BAAA,CAAAqF,GAAG,qBACFxF,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACjE,gCAAA,CAAAG,OAA+B;IAACkB,OAAO,EAAEA,OAAQ;IAACK,WAAW,EAAEA;EAAY,EAAG,EAC9EqC,aAAa,EAAE,CACZ;AAEV,CAAC;AAAC,IAAAmB,QAAA,gBAEaC,cAAK,CAACC,IAAI,CAAClE,0BAA0B,CAAC;AAAAmE,OAAA,CAAAlF,OAAA,GAAA+E,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_uikitReactNativeFoundation","_uikitUtils","_useContext","_SBUUtils","_OpenChannelMessageDateSeparator","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","OpenChannelMessageRenderer","_ref","channel","message","onPress","onLongPress","onShowUserProfile","enableMessageGrouping","prevMessage","nextMessage","sbOptions","useSendbirdChat","STRINGS","useLocalization","mediaService","usePlatformService","groupWithPrev","calcMessageGrouping","Boolean","messageProps","onPressURL","url","SBUUtils","openURL","onPressAvatar","sender","hideMessageButton","grouped","strings","edited","OPEN_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","senderName","nickname","LABELS","USER_NO_NAME","sentDate","MESSAGE_BUBBLE_TIME","fileName","isFileMessage","MESSAGE_BUBBLE_FILE_TITLE","unknownTitle","MESSAGE_BUBBLE_UNKNOWN_TITLE","unknownDescription","MESSAGE_BUBBLE_UNKNOWN_DESC","renderMessage","getMessageType","createElement","OpenChannelMessage","Admin","User","uikitWithAppInfo","openChannel","enableOgtag","OpenGraphUser","File","ImageFile","VideoFile","fetchThumbnailFromVideoSource","uri","getVideoThumbnail","timeMills","Unknown","Box","_default","React","memo","exports"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { OpenChannelMessageProps } from '@sendbird/uikit-react-native-foundation';\nimport { Box, OpenChannelMessage } from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdAdminMessage,\n SendbirdFileMessage,\n SendbirdMessage,\n SendbirdUserMessage,\n calcMessageGrouping,\n getMessageType,\n} from '@sendbird/uikit-utils';\n\nimport type { OpenChannelProps } from '../../domain/openChannel/types';\nimport { useLocalization, usePlatformService, useSendbirdChat } from '../../hooks/useContext';\nimport SBUUtils from '../../libs/SBUUtils';\nimport OpenChannelMessageDateSeparator from './OpenChannelMessageDateSeparator';\n\nconst OpenChannelMessageRenderer: OpenChannelProps['Fragment']['renderMessage'] = ({\n channel,\n message,\n onPress,\n onLongPress,\n onShowUserProfile,\n enableMessageGrouping,\n prevMessage,\n nextMessage,\n}) => {\n const { sbOptions } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { mediaService } = usePlatformService();\n const { groupWithPrev } = calcMessageGrouping(Boolean(enableMessageGrouping), message, prevMessage, nextMessage);\n\n const messageProps: Omit<OpenChannelMessageProps<SendbirdMessage>, 'message'> = {\n channel,\n onPress,\n onLongPress,\n onPressURL: (url) => SBUUtils.openURL(url),\n onPressAvatar: () => 'sender' in message && onShowUserProfile?.(message.sender, { hideMessageButton: true }),\n grouped: groupWithPrev,\n strings: {\n edited: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX,\n senderName: ('sender' in message && message.sender.nickname) || STRINGS.LABELS.USER_NO_NAME,\n sentDate: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_TIME(message),\n fileName: message.isFileMessage() ? STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_FILE_TITLE(message) : '',\n unknownTitle: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_TITLE(message),\n unknownDescription: STRINGS.OPEN_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_DESC(message),\n },\n };\n const renderMessage = () => {\n switch (getMessageType(message)) {\n case 'admin': {\n return <OpenChannelMessage.Admin message={message as SendbirdAdminMessage} {...messageProps} />;\n }\n case 'user': {\n return <OpenChannelMessage.User message={message as SendbirdUserMessage} {...messageProps} />;\n }\n case 'user.opengraph': {\n if (sbOptions.uikitWithAppInfo.openChannel.channel.enableOgtag) {\n return <OpenChannelMessage.OpenGraphUser message={message as SendbirdUserMessage} {...messageProps} />;\n } else {\n return <OpenChannelMessage.User message={message as SendbirdUserMessage} {...messageProps} />;\n }\n }\n case 'file':\n case 'file.voice':\n case 'file.audio': {\n return <OpenChannelMessage.File message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.image': {\n return <OpenChannelMessage.ImageFile message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.video': {\n return (\n <OpenChannelMessage.VideoFile\n message={message as SendbirdFileMessage}\n fetchThumbnailFromVideoSource={(uri) => mediaService.getVideoThumbnail({ url: uri, timeMills: 1000 })}\n {...messageProps}\n />\n );\n }\n case 'unknown':\n default: {\n return <OpenChannelMessage.Unknown message={message} {...messageProps} />;\n }\n }\n };\n\n return (\n <Box>\n <OpenChannelMessageDateSeparator message={message} prevMessage={prevMessage} />\n {renderMessage()}\n </Box>\n );\n};\n\nexport default React.memo(OpenChannelMessageRenderer);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,2BAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,gCAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAgF,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAEhF,MAAMQ,0BAAyE,GAAGC,IAAA,IAS5E;EAAA,IAT6E;IACjFC,OAAO;IACPC,OAAO;IACPC,OAAO;IACPC,WAAW;IACXC,iBAAiB;IACjBC,qBAAqB;IACrBC,WAAW;IACXC;EACF,CAAC,GAAAR,IAAA;EACC,MAAM;IAAES;EAAU,CAAC,GAAG,IAAAC,2BAAe,GAAE;EACvC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,2BAAe,GAAE;EACrC,MAAM;IAAEC;EAAa,CAAC,G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E,kBAAkB,CAACS,SAAS,EAAAvE,QAAA;YAC3BiB,OAAO,EAAEA,OAA+B;YACxCuD,6BAA6B,EAAGC,GAAG,IAAK7C,YAAY,CAAC8C,iBAAiB,CAAC;cAAEvC,GAAG,EAAEsC,GAAG;cAAEE,SAAS,EAAE;YAAK,CAAC;UAAE,GAClG1C,YAAY,EAChB;QAEN;MACA,KAAK,SAAS;MACd;QAAS;UACP,oBAAO5C,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACrE,2BAAA,CAAAsE,kBAAkB,CAACc,OAAO,EAAA5E,QAAA;YAACiB,OAAO,EAAEA;UAAQ,GAAKgB,YAAY,EAAI;QAC3E;IAAC;EAEL,CAAC;EAED,oBACE5C,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACrE,2BAAA,CAAAqF,GAAG,qBACFxF,MAAA,CAAAU,OAAA,CAAA8D,aAAA,CAACjE,gCAAA,CAAAG,OAA+B;IAACkB,OAAO,EAAEA,OAAQ;IAACK,WAAW,EAAEA;EAAY,EAAG,EAC9EqC,aAAa,EAAE,CACZ;AAEV,CAAC;AAAC,IAAAmB,QAAA,gBAEaC,cAAK,CAACC,IAAI,CAAClE,0BAA0B,CAAC;AAAAmE,OAAA,CAAAlF,OAAA,GAAA+E,QAAA"}
|
|
@@ -19,7 +19,7 @@ const ReactionUserListBottomSheet = _ref => {
|
|
|
19
19
|
reactionCtx,
|
|
20
20
|
chatCtx,
|
|
21
21
|
localizationCtx,
|
|
22
|
-
|
|
22
|
+
onPressUserProfile
|
|
23
23
|
} = _ref;
|
|
24
24
|
const {
|
|
25
25
|
width
|
|
@@ -147,7 +147,7 @@ const ReactionUserListBottomSheet = _ref => {
|
|
|
147
147
|
onPress: async () => {
|
|
148
148
|
if (user) {
|
|
149
149
|
await onClose();
|
|
150
|
-
|
|
150
|
+
onPressUserProfile(user);
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
style: styles.pageItem
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_uikitReactNativeFoundation","_uikitUtils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ReactionUserListBottomSheet","_ref","visible","onClose","onDismiss","reactionCtx","chatCtx","localizationCtx","userProfileCtx","width","useWindowDimensions","bottom","left","right","useSafeAreaInsets","colors","useUIKitTheme","tabIndex","setTabIndex","useState","scrollRef","useRef","tabIndicatorValue","tabIndicatorAnimated","x","Animated","Value","current","focusedWithLayoutCalculated","emojiManager","channel","message","focusIndex","STRINGS","color","ui","reaction","reactions","focusedReaction","containerSafeArea","paddingLeft","styles","layout","paddingHorizontal","paddingRight","focusTab","index","animated","arguments","length","undefined","indicatorValue","_scrollRef$current","animateTabIndicator","scrollTo","baseConfig","duration","easing","Easing","inOut","ease","useNativeDriver","parallel","timing","toValue","start","layoutCalculated","every","Boolean","useEffect","renderTabs","createElement","Pressable","style","tabsWrapper","map","isFocused","isLastItem","emoji","allEmojiMap","tabItem","marginRight","onPress","onLayout","e","nativeEvent","Image","source","uri","url","tabEmoji","Text","button","selected","highlight","enabled","truncatedCount","getReactionCount","View","tabIndicator","backgroundColor","renderPage","Fragment","userIds","userId","isGroupChannel","user","members","find","show","pageItem","Avatar","size","profileUrl","containerStyle","avatar","subtitle2","flex","nickname","LABELS","USER_NO_NAME","Modal","type","backgroundStyle","modal","container","paddingBottom","dialog","none","background","ScrollView","ref","horizontal","bounces","showsHorizontalScrollIndicator","contentContainerStyle","tabsContainer","Divider","top","showsVerticalScrollIndicator","pageContainer","createStyleSheet","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","alignItems","justifyContent","flexGrow","flexDirection","height","position","_default","exports"],"sources":["ReactionUserListBottomSheet.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { Animated, Easing, Pressable, ScrollView, View, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport {\n Avatar,\n Divider,\n Image,\n Modal,\n Text,\n createStyleSheet,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { SendbirdReaction, getReactionCount, truncatedCount } from '@sendbird/uikit-utils';\n\nimport type { ReactionBottomSheetProps } from './index';\n\nconst ReactionUserListBottomSheet = ({\n visible,\n onClose,\n onDismiss,\n reactionCtx,\n chatCtx,\n localizationCtx,\n userProfileCtx,\n}: ReactionBottomSheetProps) => {\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n\n const [tabIndex, setTabIndex] = useState(0);\n const scrollRef = useRef<ScrollView>();\n const tabIndicatorValue = useRef<Array<{ x: number; width: number }>>([]);\n const tabIndicatorAnimated = useRef({ x: new Animated.Value(0), width: new Animated.Value(0) }).current;\n const focusedWithLayoutCalculated = useRef(false);\n\n const { emojiManager } = chatCtx;\n const { channel, message, focusIndex } = reactionCtx;\n const { STRINGS } = localizationCtx;\n\n const color = colors.ui.reaction.default;\n const reactions = message?.reactions ?? [];\n const focusedReaction = reactions[tabIndex] as SendbirdReaction | undefined;\n const containerSafeArea = {\n paddingLeft: left + styles.layout.paddingHorizontal,\n paddingRight: right + styles.layout.paddingHorizontal,\n };\n\n const focusTab = (index: number, animated = true) => {\n const indicatorValue = tabIndicatorValue.current[index];\n if (indicatorValue) {\n setTabIndex(index);\n animateTabIndicator(indicatorValue.x, indicatorValue.width, animated);\n scrollRef.current?.scrollTo({ x: indicatorValue.x, animated });\n }\n };\n\n const animateTabIndicator = (x: number, width: number, animated = true) => {\n const baseConfig = { duration: animated ? 300 : 0, easing: Easing.inOut(Easing.ease), useNativeDriver: false };\n Animated.parallel([\n Animated.timing(tabIndicatorAnimated.x, { toValue: x, ...baseConfig }),\n Animated.timing(tabIndicatorAnimated.width, { toValue: width, ...baseConfig }),\n ]).start();\n };\n\n const layoutCalculated = () => {\n return tabIndicatorValue.current.length === reactions.length && tabIndicatorValue.current.every(Boolean);\n };\n\n useEffect(() => {\n if (!visible) {\n tabIndicatorValue.current = [];\n tabIndicatorAnimated.x = new Animated.Value(0);\n tabIndicatorAnimated.width = new Animated.Value(0);\n focusedWithLayoutCalculated.current = false;\n }\n }, [visible]);\n\n const renderTabs = () => {\n return (\n <Pressable style={styles.tabsWrapper}>\n {reactions.map((reaction, index) => {\n const isFocused = focusedReaction?.key === reaction.key;\n const isLastItem = reactions.length - 1 === index;\n const emoji = emojiManager.allEmojiMap[reaction.key];\n\n return (\n <Pressable\n key={reaction.key}\n style={[styles.tabItem, isLastItem && { marginRight: styles.layout.marginRight }]}\n onPress={() => focusTab(index)}\n onLayout={(e) => {\n tabIndicatorValue.current[index] = e.nativeEvent.layout;\n if (layoutCalculated()) {\n if (focusedWithLayoutCalculated.current) {\n focusTab(tabIndex, false);\n } else {\n focusedWithLayoutCalculated.current = true;\n focusTab(focusIndex);\n }\n }\n }}\n >\n <Image source={{ uri: emoji.url }} style={styles.tabEmoji} />\n <Text button color={isFocused ? color.selected.highlight : color.enabled.highlight}>\n {truncatedCount(getReactionCount(reaction))}\n </Text>\n </Pressable>\n );\n })}\n <Animated.View\n style={[\n styles.tabIndicator,\n {\n left: tabIndicatorAnimated.x,\n width: tabIndicatorAnimated.width,\n backgroundColor: color.selected.highlight,\n },\n ]}\n />\n </Pressable>\n );\n };\n\n const renderPage = () => {\n return (\n <>\n {focusedReaction?.userIds.map((userId) => {\n if (channel?.isGroupChannel()) {\n const user = channel.members.find((x) => x.userId === userId);\n return (\n <Pressable\n key={userId}\n onPress={async () => {\n if (user) {\n await onClose();\n userProfileCtx.show(user);\n }\n }}\n style={styles.pageItem}\n >\n <Avatar size={36} uri={user?.profileUrl} containerStyle={styles.avatar} />\n <Text subtitle2 style={{ flex: 1 }}>\n {user?.nickname || STRINGS.LABELS.USER_NO_NAME}\n </Text>\n </Pressable>\n );\n }\n return null;\n })}\n </>\n );\n };\n\n return (\n <Modal\n type={'slide-no-gesture'}\n visible={Boolean(visible && channel && message)}\n onClose={onClose}\n onDismiss={onDismiss}\n backgroundStyle={styles.modal}\n >\n <View\n style={[\n styles.container,\n { width, paddingBottom: bottom, backgroundColor: colors.ui.dialog.default.none.background },\n ]}\n >\n <ScrollView\n ref={scrollRef as never}\n horizontal\n bounces={false}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={[containerSafeArea, styles.tabsContainer]}\n >\n {renderTabs()}\n </ScrollView>\n <Divider style={{ top: -1 }} />\n <ScrollView\n bounces={false}\n showsVerticalScrollIndicator={false}\n style={styles.pageContainer}\n contentContainerStyle={containerSafeArea}\n >\n {renderPage()}\n </ScrollView>\n </View>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n layout: {\n paddingHorizontal: 16,\n marginRight: 0,\n },\n container: {\n overflow: 'hidden',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n paddingTop: 16,\n alignItems: 'center',\n },\n modal: {\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n tabsContainer: {\n flexGrow: 1,\n },\n tabsWrapper: {\n flexGrow: 1,\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'center',\n height: 44,\n },\n tabItem: {\n marginRight: 16,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n },\n tabEmoji: {\n width: 28,\n height: 28,\n marginRight: 4,\n },\n tabIndicator: {\n position: 'absolute',\n bottom: 0,\n height: 3,\n },\n pageContainer: {\n height: 216,\n width: '100%',\n },\n pageItem: {\n flexDirection: 'row',\n width: '100%',\n height: 48,\n alignItems: 'center',\n },\n avatar: {\n marginRight: 16,\n },\n});\n\nexport default ReactionUserListBottomSheet;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAA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AAC,CAAC;AAAC,IAAAuE,QAAA,GAEYxJ,2BAA2B;AAAAyJ,OAAA,CAAAxK,OAAA,GAAAuK,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_uikitReactNativeFoundation","_uikitUtils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ReactionUserListBottomSheet","_ref","visible","onClose","onDismiss","reactionCtx","chatCtx","localizationCtx","onPressUserProfile","width","useWindowDimensions","bottom","left","right","useSafeAreaInsets","colors","useUIKitTheme","tabIndex","setTabIndex","useState","scrollRef","useRef","tabIndicatorValue","tabIndicatorAnimated","x","Animated","Value","current","focusedWithLayoutCalculated","emojiManager","channel","message","focusIndex","STRINGS","color","ui","reaction","reactions","focusedReaction","containerSafeArea","paddingLeft","styles","layout","paddingHorizontal","paddingRight","focusTab","index","animated","arguments","length","undefined","indicatorValue","_scrollRef$current","animateTabIndicator","scrollTo","baseConfig","duration","easing","Easing","inOut","ease","useNativeDriver","parallel","timing","toValue","start","layoutCalculated","every","Boolean","useEffect","renderTabs","createElement","Pressable","style","tabsWrapper","map","isFocused","isLastItem","emoji","allEmojiMap","tabItem","marginRight","onPress","onLayout","e","nativeEvent","Image","source","uri","url","tabEmoji","Text","button","selected","highlight","enabled","truncatedCount","getReactionCount","View","tabIndicator","backgroundColor","renderPage","Fragment","userIds","userId","isGroupChannel","user","members","find","pageItem","Avatar","size","profileUrl","containerStyle","avatar","subtitle2","flex","nickname","LABELS","USER_NO_NAME","Modal","type","backgroundStyle","modal","container","paddingBottom","dialog","none","background","ScrollView","ref","horizontal","bounces","showsHorizontalScrollIndicator","contentContainerStyle","tabsContainer","Divider","top","showsVerticalScrollIndicator","pageContainer","createStyleSheet","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","alignItems","justifyContent","flexGrow","flexDirection","height","position","_default","exports"],"sources":["ReactionUserListBottomSheet.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { Animated, Easing, Pressable, ScrollView, View, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport {\n Avatar,\n Divider,\n Image,\n Modal,\n Text,\n createStyleSheet,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { SendbirdReaction, getReactionCount, truncatedCount } from '@sendbird/uikit-utils';\n\nimport type { ReactionBottomSheetProps } from './index';\n\nconst ReactionUserListBottomSheet = ({\n visible,\n onClose,\n onDismiss,\n reactionCtx,\n chatCtx,\n localizationCtx,\n onPressUserProfile,\n}: ReactionBottomSheetProps) => {\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n\n const [tabIndex, setTabIndex] = useState(0);\n const scrollRef = useRef<ScrollView>();\n const tabIndicatorValue = useRef<Array<{ x: number; width: number }>>([]);\n const tabIndicatorAnimated = useRef({ x: new Animated.Value(0), width: new Animated.Value(0) }).current;\n const focusedWithLayoutCalculated = useRef(false);\n\n const { emojiManager } = chatCtx;\n const { channel, message, focusIndex } = reactionCtx;\n const { STRINGS } = localizationCtx;\n\n const color = colors.ui.reaction.default;\n const reactions = message?.reactions ?? [];\n const focusedReaction = reactions[tabIndex] as SendbirdReaction | undefined;\n const containerSafeArea = {\n paddingLeft: left + styles.layout.paddingHorizontal,\n paddingRight: right + styles.layout.paddingHorizontal,\n };\n\n const focusTab = (index: number, animated = true) => {\n const indicatorValue = tabIndicatorValue.current[index];\n if (indicatorValue) {\n setTabIndex(index);\n animateTabIndicator(indicatorValue.x, indicatorValue.width, animated);\n scrollRef.current?.scrollTo({ x: indicatorValue.x, animated });\n }\n };\n\n const animateTabIndicator = (x: number, width: number, animated = true) => {\n const baseConfig = { duration: animated ? 300 : 0, easing: Easing.inOut(Easing.ease), useNativeDriver: false };\n Animated.parallel([\n Animated.timing(tabIndicatorAnimated.x, { toValue: x, ...baseConfig }),\n Animated.timing(tabIndicatorAnimated.width, { toValue: width, ...baseConfig }),\n ]).start();\n };\n\n const layoutCalculated = () => {\n return tabIndicatorValue.current.length === reactions.length && tabIndicatorValue.current.every(Boolean);\n };\n\n useEffect(() => {\n if (!visible) {\n tabIndicatorValue.current = [];\n tabIndicatorAnimated.x = new Animated.Value(0);\n tabIndicatorAnimated.width = new Animated.Value(0);\n focusedWithLayoutCalculated.current = false;\n }\n }, [visible]);\n\n const renderTabs = () => {\n return (\n <Pressable style={styles.tabsWrapper}>\n {reactions.map((reaction, index) => {\n const isFocused = focusedReaction?.key === reaction.key;\n const isLastItem = reactions.length - 1 === index;\n const emoji = emojiManager.allEmojiMap[reaction.key];\n\n return (\n <Pressable\n key={reaction.key}\n style={[styles.tabItem, isLastItem && { marginRight: styles.layout.marginRight }]}\n onPress={() => focusTab(index)}\n onLayout={(e) => {\n tabIndicatorValue.current[index] = e.nativeEvent.layout;\n if (layoutCalculated()) {\n if (focusedWithLayoutCalculated.current) {\n focusTab(tabIndex, false);\n } else {\n focusedWithLayoutCalculated.current = true;\n focusTab(focusIndex);\n }\n }\n }}\n >\n <Image source={{ uri: emoji.url }} style={styles.tabEmoji} />\n <Text button color={isFocused ? color.selected.highlight : color.enabled.highlight}>\n {truncatedCount(getReactionCount(reaction))}\n </Text>\n </Pressable>\n );\n })}\n <Animated.View\n style={[\n styles.tabIndicator,\n {\n left: tabIndicatorAnimated.x,\n width: tabIndicatorAnimated.width,\n backgroundColor: color.selected.highlight,\n },\n ]}\n />\n </Pressable>\n );\n };\n\n const renderPage = () => {\n return (\n <>\n {focusedReaction?.userIds.map((userId) => {\n if (channel?.isGroupChannel()) {\n const user = channel.members.find((x) => x.userId === userId);\n return (\n <Pressable\n key={userId}\n onPress={async () => {\n if (user) {\n await onClose();\n onPressUserProfile(user);\n }\n }}\n style={styles.pageItem}\n >\n <Avatar size={36} uri={user?.profileUrl} containerStyle={styles.avatar} />\n <Text subtitle2 style={{ flex: 1 }}>\n {user?.nickname || STRINGS.LABELS.USER_NO_NAME}\n </Text>\n </Pressable>\n );\n }\n return null;\n })}\n </>\n );\n };\n\n return (\n <Modal\n type={'slide-no-gesture'}\n visible={Boolean(visible && channel && message)}\n onClose={onClose}\n onDismiss={onDismiss}\n backgroundStyle={styles.modal}\n >\n <View\n style={[\n styles.container,\n { width, paddingBottom: bottom, backgroundColor: colors.ui.dialog.default.none.background },\n ]}\n >\n <ScrollView\n ref={scrollRef as never}\n horizontal\n bounces={false}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={[containerSafeArea, styles.tabsContainer]}\n >\n {renderTabs()}\n </ScrollView>\n <Divider style={{ top: -1 }} />\n <ScrollView\n bounces={false}\n showsVerticalScrollIndicator={false}\n style={styles.pageContainer}\n contentContainerStyle={containerSafeArea}\n >\n {renderPage()}\n </ScrollView>\n </View>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n layout: {\n paddingHorizontal: 16,\n marginRight: 0,\n },\n container: {\n overflow: 'hidden',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n paddingTop: 16,\n alignItems: 'center',\n },\n modal: {\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n tabsContainer: {\n flexGrow: 1,\n },\n tabsWrapper: {\n flexGrow: 1,\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'center',\n height: 44,\n },\n tabItem: {\n marginRight: 16,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n },\n tabEmoji: {\n width: 28,\n height: 28,\n marginRight: 4,\n },\n tabIndicator: {\n position: 'absolute',\n bottom: 0,\n height: 3,\n },\n pageContainer: {\n height: 216,\n width: '100%',\n },\n pageItem: {\n flexDirection: 'row',\n width: '100%',\n height: 48,\n alignItems: 'center',\n },\n avatar: {\n marginRight: 16,\n },\n});\n\nexport default ReactionUserListBottomSheet;\n"],"mappings":";;;;;;AA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,MAAM,EAAE,EAAE;IACVJ,UAAU,EAAE;EACd,CAAC;EACD/B,MAAM,EAAE;IACNjC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAAC,IAAAsE,QAAA,GAEYvJ,2BAA2B;AAAAwJ,OAAA,CAAAvK,OAAA,GAAAsK,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ReactionListBottomSheet","_interopRequireDefault","require","_ReactionUserListBottomSheet","obj","__esModule","default","ReactionBottomSheets","ReactionList","UserList","exports"],"sources":["index.tsx"],"sourcesContent":["import type React from 'react';\n\nimport type {
|
|
1
|
+
{"version":3,"names":["_ReactionListBottomSheet","_interopRequireDefault","require","_ReactionUserListBottomSheet","obj","__esModule","default","ReactionBottomSheets","ReactionList","UserList","exports"],"sources":["index.tsx"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdMember, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { LocalizationContext } from '../../contexts/LocalizationCtx';\nimport type { ReactionContext } from '../../contexts/ReactionCtx';\nimport type { SendbirdChatContext } from '../../contexts/SendbirdChatCtx';\nimport ReactionList from './ReactionListBottomSheet';\nimport UserList from './ReactionUserListBottomSheet';\n\ntype GetFromContext<T> = T extends React.Context<infer Value> ? NonNullable<Value> : never;\nexport type ReactionBottomSheetProps = {\n visible: boolean;\n onDismiss: () => void;\n onClose: () => Promise<void>;\n onPressUserProfile: (user: SendbirdUser | SendbirdMember) => void;\n chatCtx: GetFromContext<typeof SendbirdChatContext>;\n reactionCtx: GetFromContext<typeof ReactionContext>;\n localizationCtx: GetFromContext<typeof LocalizationContext>;\n};\n\nexport const ReactionBottomSheets = {\n ReactionList,\n UserList,\n};\n"],"mappings":";;;;;;AAOA,IAAAA,wBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,4BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAqD,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAa9C,MAAMG,oBAAoB,GAAG;EAClCC,YAAY,EAAZA,gCAAY;EACZC,QAAQ,EAARA;AACF,CAAC;AAACC,OAAA,CAAAH,oBAAA,GAAAA,oBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","obj","__esModule","default","StatusComposition","_ref","children","error","ErrorComponent","LoadingComponent","loading","createElement","Fragment","_default","exports"],"sources":["StatusComposition.tsx"],"sourcesContent":["import React from 'react';\n\ntype Props = {\n loading?: boolean;\n LoadingComponent?:
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","obj","__esModule","default","StatusComposition","_ref","children","error","ErrorComponent","LoadingComponent","loading","createElement","Fragment","_default","exports"],"sources":["StatusComposition.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n\ntype Props = {\n loading?: boolean;\n LoadingComponent?: ReactNode;\n error?: boolean;\n ErrorComponent?: ReactNode;\n children: React.ReactNode;\n};\nconst StatusComposition = ({ children, error, ErrorComponent, LoadingComponent, loading }: Props) => {\n if (loading && LoadingComponent) return <>{LoadingComponent}</>;\n if (error && ErrorComponent) return <>{ErrorComponent}</>;\n return <>{children}</>;\n};\n\nexport default StatusComposition;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AASzC,MAAMG,iBAAiB,GAAGC,IAAA,IAA2E;EAAA,IAA1E;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,cAAc;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAAL,IAAA;EAC9F,IAAIK,OAAO,IAAID,gBAAgB,EAAE,oBAAOX,MAAA,CAAAK,OAAA,CAAAQ,aAAA,CAAAb,MAAA,CAAAK,OAAA,CAAAS,QAAA,QAAGH,gBAAgB,CAAI;EAC/D,IAAIF,KAAK,IAAIC,cAAc,EAAE,oBAAOV,MAAA,CAAAK,OAAA,CAAAQ,aAAA,CAAAb,MAAA,CAAAK,OAAA,CAAAS,QAAA,QAAGJ,cAAc,CAAI;EACzD,oBAAOV,MAAA,CAAAK,OAAA,CAAAQ,aAAA,CAAAb,MAAA,CAAAK,OAAA,CAAAS,QAAA,QAAGN,QAAQ,CAAI;AACxB,CAAC;AAAC,IAAAO,QAAA,GAEaT,iBAAiB;AAAAU,OAAA,CAAAX,OAAA,GAAAU,QAAA"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.UNKNOWN_USER_ID = exports.MESSAGE_SEARCH_SAFE_SCROLL_DELAY = exports.MESSAGE_FOCUS_ANIMATION_DELAY = exports.DEFAULT_LONG_PRESS_DELAY = void 0;
|
|
6
|
+
exports.VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY = exports.VOICE_MESSAGE_META_ARRAY_DURATION_KEY = exports.UNKNOWN_USER_ID = exports.MESSAGE_SEARCH_SAFE_SCROLL_DELAY = exports.MESSAGE_FOCUS_ANIMATION_DELAY = exports.DEFAULT_LONG_PRESS_DELAY = void 0;
|
|
7
7
|
const DEFAULT_LONG_PRESS_DELAY = 350;
|
|
8
8
|
exports.DEFAULT_LONG_PRESS_DELAY = DEFAULT_LONG_PRESS_DELAY;
|
|
9
9
|
const MESSAGE_SEARCH_SAFE_SCROLL_DELAY = 500;
|
|
@@ -12,4 +12,8 @@ const MESSAGE_FOCUS_ANIMATION_DELAY = 250;
|
|
|
12
12
|
exports.MESSAGE_FOCUS_ANIMATION_DELAY = MESSAGE_FOCUS_ANIMATION_DELAY;
|
|
13
13
|
const UNKNOWN_USER_ID = '##__USER_ID_IS_NOT_PROVIDED__##';
|
|
14
14
|
exports.UNKNOWN_USER_ID = UNKNOWN_USER_ID;
|
|
15
|
+
const VOICE_MESSAGE_META_ARRAY_DURATION_KEY = 'KEY_VOICE_MESSAGE_DURATION';
|
|
16
|
+
exports.VOICE_MESSAGE_META_ARRAY_DURATION_KEY = VOICE_MESSAGE_META_ARRAY_DURATION_KEY;
|
|
17
|
+
const VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY = 'KEY_INTERNAL_MESSAGE_TYPE';
|
|
18
|
+
exports.VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY = VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY;
|
|
15
19
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_LONG_PRESS_DELAY","exports","MESSAGE_SEARCH_SAFE_SCROLL_DELAY","MESSAGE_FOCUS_ANIMATION_DELAY","UNKNOWN_USER_ID"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_LONG_PRESS_DELAY = 350;\nexport const MESSAGE_SEARCH_SAFE_SCROLL_DELAY = 500;\nexport const MESSAGE_FOCUS_ANIMATION_DELAY = 250;\n\nexport const UNKNOWN_USER_ID = '##__USER_ID_IS_NOT_PROVIDED__##';\n"],"mappings":";;;;;;AAAO,MAAMA,wBAAwB,GAAG,GAAG;AAACC,OAAA,CAAAD,wBAAA,GAAAA,wBAAA;AACrC,MAAME,gCAAgC,GAAG,GAAG;AAACD,OAAA,CAAAC,gCAAA,GAAAA,gCAAA;AAC7C,MAAMC,6BAA6B,GAAG,GAAG;AAACF,OAAA,CAAAE,6BAAA,GAAAA,6BAAA;AAE1C,MAAMC,eAAe,GAAG,iCAAiC;AAACH,OAAA,CAAAG,eAAA,GAAAA,eAAA"}
|
|
1
|
+
{"version":3,"names":["DEFAULT_LONG_PRESS_DELAY","exports","MESSAGE_SEARCH_SAFE_SCROLL_DELAY","MESSAGE_FOCUS_ANIMATION_DELAY","UNKNOWN_USER_ID","VOICE_MESSAGE_META_ARRAY_DURATION_KEY","VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_LONG_PRESS_DELAY = 350;\nexport const MESSAGE_SEARCH_SAFE_SCROLL_DELAY = 500;\nexport const MESSAGE_FOCUS_ANIMATION_DELAY = 250;\n\nexport const UNKNOWN_USER_ID = '##__USER_ID_IS_NOT_PROVIDED__##';\nexport const VOICE_MESSAGE_META_ARRAY_DURATION_KEY = 'KEY_VOICE_MESSAGE_DURATION';\nexport const VOICE_MESSAGE_META_ARRAY_MESSAGE_TYPE_KEY = 'KEY_INTERNAL_MESSAGE_TYPE';\n"],"mappings":";;;;;;AAAO,MAAMA,wBAAwB,GAAG,GAAG;AAACC,OAAA,CAAAD,wBAAA,GAAAA,wBAAA;AACrC,MAAME,gCAAgC,GAAG,GAAG;AAACD,OAAA,CAAAC,gCAAA,GAAAA,gCAAA;AAC7C,MAAMC,6BAA6B,GAAG,GAAG;AAACF,OAAA,CAAAE,6BAAA,GAAAA,6BAAA;AAE1C,MAAMC,eAAe,GAAG,iCAAiC;AAACH,OAAA,CAAAG,eAAA,GAAAA,eAAA;AAC1D,MAAMC,qCAAqC,GAAG,4BAA4B;AAACJ,OAAA,CAAAI,qCAAA,GAAAA,qCAAA;AAC3E,MAAMC,yCAAyC,GAAG,2BAA2B;AAACL,OAAA,CAAAK,yCAAA,GAAAA,yCAAA"}
|
|
@@ -50,6 +50,7 @@ const GroupChannelPreviewContainer = _ref => {
|
|
|
50
50
|
var _channel$lastMessage;
|
|
51
51
|
if (!((_channel$lastMessage = channel.lastMessage) !== null && _channel$lastMessage !== void 0 && _channel$lastMessage.isFileMessage())) return undefined;
|
|
52
52
|
if (typingUsers.length > 0) return undefined;
|
|
53
|
+
if ((0, _uikitUtils.isVoiceMessage)(channel.lastMessage)) return undefined;
|
|
53
54
|
return (0, _uikitUtils.getFileTypeFromMessage)(channel.lastMessage);
|
|
54
55
|
});
|
|
55
56
|
const titleCaptionIcon = (0, _uikitUtils.useIIFE)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_ChannelCover","_interopRequireDefault","_constants","_useContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","GroupChannelPreviewContainer","_ref","onPress","onLongPress","channel","currentUser","sdk","sbOptions","mentionManager","useSendbirdChat","STRINGS","useLocalization","colors","useUIKitTheme","typingUsers","setTypingUsers","useState","handlerId","useUniqHandlerId","useChannelHandler","onTypingStatusUpdated","eventChannel","isDifferentChannel","uikit","groupChannel","channelList","enableTypingIndicator","getTypingUsers","outgoingStatus","useMessageOutgoingStatus","lastMessage","bodyText","useIIFE","length","LABELS","TYPING_INDICATOR_TYPINGS","GROUP_CHANNEL_LIST","CHANNEL_PREVIEW_BODY","fileType","_channel$lastMessage","isFileMessage","undefined","getFileTypeFromMessage","titleCaptionIcon","isEphemeral","enableMessageReceiptStatus","isMyMessage","userId","createElement","LoadingSpinner","size","style","styles","Icon","icon","color","error","onBackground03","containerStyle","secondary","unreadMessageCount","Pressable","delayLongPress","DEFAULT_LONG_PRESS_DELAY","GroupChannelPreview","customCover","coverUrl","title","CHANNEL_PREVIEW_TITLE","titleCaptionLeft","titleCaption","CHANNEL_PREVIEW_TITLE_CAPTION","body","bodyIcon","getFileIconFromMessageType","convertFileTypeToMessageType","badgeCount","mentioned","unreadMentionCount","mentionTrigger","config","trigger","memberCount","frozen","isFrozen","broadcast","isBroadcast","notificationOff","myPushTriggerOption","createStyleSheet","marginRight","broadcastCover","padding","borderRadius","_default","exports"],"sources":["GroupChannelPreviewContainer.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Pressable } from 'react-native';\n\nimport { useChannelHandler, useMessageOutgoingStatus } from '@sendbird/uikit-chat-hooks';\nimport {\n GroupChannelPreview,\n Icon,\n LoadingSpinner,\n createStyleSheet,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdGroupChannel,\n SendbirdUser,\n convertFileTypeToMessageType,\n getFileIconFromMessageType,\n getFileTypeFromMessage,\n isDifferentChannel,\n isMyMessage,\n useIIFE,\n useUniqHandlerId,\n} from '@sendbird/uikit-utils';\n\nimport ChannelCover from '../components/ChannelCover';\nimport { DEFAULT_LONG_PRESS_DELAY } from '../constants';\nimport { useLocalization, useSendbirdChat } from '../hooks/useContext';\n\ntype Props = {\n channel: SendbirdGroupChannel;\n onPress: () => void;\n onLongPress: () => void;\n};\nconst GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props) => {\n const { currentUser, sdk, sbOptions, mentionManager } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n\n const [typingUsers, setTypingUsers] = useState<SendbirdUser[]>([]);\n\n const handlerId = useUniqHandlerId('GroupChannelPreviewContainer_TypingIndicator');\n useChannelHandler(sdk, handlerId, {\n onTypingStatusUpdated(eventChannel) {\n if (isDifferentChannel(channel, eventChannel)) return;\n if (!sbOptions.uikit.groupChannel.channelList.enableTypingIndicator) return;\n setTypingUsers(eventChannel.getTypingUsers());\n },\n });\n\n const outgoingStatus = useMessageOutgoingStatus(sdk, channel, channel.lastMessage);\n\n const bodyText = useIIFE(() => {\n if (typingUsers.length > 0) return STRINGS.LABELS.TYPING_INDICATOR_TYPINGS(typingUsers) || '';\n else return STRINGS.GROUP_CHANNEL_LIST.CHANNEL_PREVIEW_BODY(channel);\n });\n\n const fileType = useIIFE(() => {\n if (!channel.lastMessage?.isFileMessage()) return undefined;\n if (typingUsers.length > 0) return undefined;\n return getFileTypeFromMessage(channel.lastMessage);\n });\n\n const titleCaptionIcon = useIIFE(() => {\n if (!channel.lastMessage || channel.isEphemeral) return undefined;\n if (!sbOptions.uikit.groupChannel.channelList.enableMessageReceiptStatus) return undefined;\n if (!isMyMessage(channel.lastMessage, currentUser?.userId)) return undefined;\n\n if (outgoingStatus === 'PENDING') {\n return <LoadingSpinner size={16} style={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'FAILED') {\n return <Icon icon={'error'} size={16} color={colors.error} style={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'UNDELIVERED') {\n return <Icon icon={'done'} size={16} color={colors.onBackground03} containerStyle={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'DELIVERED' || outgoingStatus === 'UNREAD') {\n return <Icon icon={'done-all'} size={16} color={colors.onBackground03} style={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'READ') {\n return <Icon icon={'done-all'} size={16} color={colors.secondary} style={styles.titleCaptionIcon} />;\n }\n\n return undefined;\n });\n\n const unreadMessageCount = useIIFE(() => (channel.isEphemeral ? 0 : channel.unreadMessageCount));\n\n return (\n <Pressable delayLongPress={DEFAULT_LONG_PRESS_DELAY} onPress={onPress} onLongPress={onLongPress}>\n <GroupChannelPreview\n customCover={<ChannelCover channel={channel} size={56} />}\n coverUrl={channel.coverUrl}\n title={STRINGS.GROUP_CHANNEL_LIST.CHANNEL_PREVIEW_TITLE(currentUser?.userId ?? '', channel)}\n titleCaptionLeft={titleCaptionIcon}\n titleCaption={STRINGS.GROUP_CHANNEL_LIST.CHANNEL_PREVIEW_TITLE_CAPTION(channel)}\n body={bodyText}\n bodyIcon={fileType && getFileIconFromMessageType(convertFileTypeToMessageType(fileType))}\n badgeCount={unreadMessageCount}\n mentioned={channel.unreadMentionCount > 0}\n mentionTrigger={mentionManager.config.trigger}\n memberCount={channel.memberCount > 2 ? channel.memberCount : undefined}\n frozen={channel.isFrozen}\n broadcast={channel.isBroadcast}\n notificationOff={channel.myPushTriggerOption === 'off'}\n />\n </Pressable>\n );\n};\n\nconst styles = createStyleSheet({\n titleCaptionIcon: {\n marginRight: 4,\n },\n broadcastCover: {\n padding: 12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C9B9C,gBAAgB,EAAE;IAChB+C,WAAW,EAAE;EACf,CAAC;EACDC,cAAc,EAAE;IACdC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEY9F,4BAA4B;AAAA+F,OAAA,CAAAnH,OAAA,GAAAkH,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_ChannelCover","_interopRequireDefault","_constants","_useContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","GroupChannelPreviewContainer","_ref","onPress","onLongPress","channel","currentUser","sdk","sbOptions","mentionManager","useSendbirdChat","STRINGS","useLocalization","colors","useUIKitTheme","typingUsers","setTypingUsers","useState","handlerId","useUniqHandlerId","useChannelHandler","onTypingStatusUpdated","eventChannel","isDifferentChannel","uikit","groupChannel","channelList","enableTypingIndicator","getTypingUsers","outgoingStatus","useMessageOutgoingStatus","lastMessage","bodyText","useIIFE","length","LABELS","TYPING_INDICATOR_TYPINGS","GROUP_CHANNEL_LIST","CHANNEL_PREVIEW_BODY","fileType","_channel$lastMessage","isFileMessage","undefined","isVoiceMessage","getFileTypeFromMessage","titleCaptionIcon","isEphemeral","enableMessageReceiptStatus","isMyMessage","userId","createElement","LoadingSpinner","size","style","styles","Icon","icon","color","error","onBackground03","containerStyle","secondary","unreadMessageCount","Pressable","delayLongPress","DEFAULT_LONG_PRESS_DELAY","GroupChannelPreview","customCover","coverUrl","title","CHANNEL_PREVIEW_TITLE","titleCaptionLeft","titleCaption","CHANNEL_PREVIEW_TITLE_CAPTION","body","bodyIcon","getFileIconFromMessageType","convertFileTypeToMessageType","badgeCount","mentioned","unreadMentionCount","mentionTrigger","config","trigger","memberCount","frozen","isFrozen","broadcast","isBroadcast","notificationOff","myPushTriggerOption","createStyleSheet","marginRight","broadcastCover","padding","borderRadius","_default","exports"],"sources":["GroupChannelPreviewContainer.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Pressable } from 'react-native';\n\nimport { useChannelHandler, useMessageOutgoingStatus } from '@sendbird/uikit-chat-hooks';\nimport {\n GroupChannelPreview,\n Icon,\n LoadingSpinner,\n createStyleSheet,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdGroupChannel,\n SendbirdUser,\n convertFileTypeToMessageType,\n getFileIconFromMessageType,\n getFileTypeFromMessage,\n isDifferentChannel,\n isMyMessage,\n isVoiceMessage,\n useIIFE,\n useUniqHandlerId,\n} from '@sendbird/uikit-utils';\n\nimport ChannelCover from '../components/ChannelCover';\nimport { DEFAULT_LONG_PRESS_DELAY } from '../constants';\nimport { useLocalization, useSendbirdChat } from '../hooks/useContext';\n\ntype Props = {\n channel: SendbirdGroupChannel;\n onPress: () => void;\n onLongPress: () => void;\n};\nconst GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props) => {\n const { currentUser, sdk, sbOptions, mentionManager } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n\n const [typingUsers, setTypingUsers] = useState<SendbirdUser[]>([]);\n\n const handlerId = useUniqHandlerId('GroupChannelPreviewContainer_TypingIndicator');\n useChannelHandler(sdk, handlerId, {\n onTypingStatusUpdated(eventChannel) {\n if (isDifferentChannel(channel, eventChannel)) return;\n if (!sbOptions.uikit.groupChannel.channelList.enableTypingIndicator) return;\n setTypingUsers(eventChannel.getTypingUsers());\n },\n });\n\n const outgoingStatus = useMessageOutgoingStatus(sdk, channel, channel.lastMessage);\n\n const bodyText = useIIFE(() => {\n if (typingUsers.length > 0) return STRINGS.LABELS.TYPING_INDICATOR_TYPINGS(typingUsers) || '';\n else return STRINGS.GROUP_CHANNEL_LIST.CHANNEL_PREVIEW_BODY(channel);\n });\n\n const fileType = useIIFE(() => {\n if (!channel.lastMessage?.isFileMessage()) return undefined;\n if (typingUsers.length > 0) return undefined;\n if (isVoiceMessage(channel.lastMessage)) return undefined;\n return getFileTypeFromMessage(channel.lastMessage);\n });\n\n const titleCaptionIcon = useIIFE(() => {\n if (!channel.lastMessage || channel.isEphemeral) return undefined;\n if (!sbOptions.uikit.groupChannel.channelList.enableMessageReceiptStatus) return undefined;\n if (!isMyMessage(channel.lastMessage, currentUser?.userId)) return undefined;\n\n if (outgoingStatus === 'PENDING') {\n return <LoadingSpinner size={16} style={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'FAILED') {\n return <Icon icon={'error'} size={16} color={colors.error} style={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'UNDELIVERED') {\n return <Icon icon={'done'} size={16} color={colors.onBackground03} containerStyle={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'DELIVERED' || outgoingStatus === 'UNREAD') {\n return <Icon icon={'done-all'} size={16} color={colors.onBackground03} style={styles.titleCaptionIcon} />;\n }\n\n if (outgoingStatus === 'READ') {\n return <Icon icon={'done-all'} size={16} color={colors.secondary} style={styles.titleCaptionIcon} />;\n }\n\n return undefined;\n });\n\n const unreadMessageCount = useIIFE(() => (channel.isEphemeral ? 0 : channel.unreadMessageCount));\n\n return (\n <Pressable delayLongPress={DEFAULT_LONG_PRESS_DELAY} onPress={onPress} onLongPress={onLongPress}>\n <GroupChannelPreview\n customCover={<ChannelCover channel={channel} size={56} />}\n coverUrl={channel.coverUrl}\n title={STRINGS.GROUP_CHANNEL_LIST.CHANNEL_PREVIEW_TITLE(currentUser?.userId ?? '', channel)}\n titleCaptionLeft={titleCaptionIcon}\n titleCaption={STRINGS.GROUP_CHANNEL_LIST.CHANNEL_PREVIEW_TITLE_CAPTION(channel)}\n body={bodyText}\n bodyIcon={fileType && getFileIconFromMessageType(convertFileTypeToMessageType(fileType))}\n badgeCount={unreadMessageCount}\n mentioned={channel.unreadMentionCount > 0}\n mentionTrigger={mentionManager.config.trigger}\n memberCount={channel.memberCount > 2 ? channel.memberCount : undefined}\n frozen={channel.isFrozen}\n broadcast={channel.isBroadcast}\n notificationOff={channel.myPushTriggerOption === 'off'}\n />\n </Pressable>\n );\n};\n\nconst styles = createStyleSheet({\n titleCaptionIcon: {\n marginRight: 4,\n },\n broadcastCover: {\n padding: 12,\n borderRadius: 28,\n },\n});\n\nexport default GroupChannelPreviewContainer;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAOA,IAAAI,WAAA,GAAAJ,OAAA;AAaA,IAAAK,aAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAAuE,SAAAM,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAd,wBAAAU,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAA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;IAC9CC,WAAW,EAAE/E,OAAO,CAAC+E,WAAW,GAAG,CAAC,GAAG/E,OAAO,CAAC+E,WAAW,GAAG1C,SAAU;IACvE2C,MAAM,EAAEhF,OAAO,CAACiF,QAAS;IACzBC,SAAS,EAAElF,OAAO,CAACmF,WAAY;IAC/BC,eAAe,EAAEpF,OAAO,CAACqF,mBAAmB,KAAK;EAAM,EACvD,CACQ;AAEhB,CAAC;AAED,MAAMpC,MAAM,GAAG,IAAAqC,4CAAgB,EAAC;EAC9B9C,gBAAgB,EAAE;IAChB+C,WAAW,EAAE;EACf,CAAC;EACDC,cAAc,EAAE;IACdC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEY/F,4BAA4B;AAAAgG,OAAA,CAAApH,OAAA,GAAAmH,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_TypedPlaceholder","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","DefaultErrorBoundaryComponent","props","createElement","View","style","flex","justifyContent","alignItems","type","onPressRetry","reset","InternalErrorBoundaryContainer","React","PureComponent","constructor","arguments","error","errorInfo","_this$props$onError","_this$props","setState","onError","state","_this$props$ErrorInfo","_this$props2","ErrorInfoComponent","Fragment","children","_default","exports"],"sources":["InternalErrorBoundaryContainer.tsx"],"sourcesContent":["import React, { ErrorInfo } from 'react';\nimport { View } from 'react-native';\n\nimport TypedPlaceholder from '../components/TypedPlaceholder';\nimport type { ErrorBoundaryProps } from '../types';\n\nconst DefaultErrorBoundaryComponent = (props: ErrorBoundaryProps) => {\n return (\n <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>\n <TypedPlaceholder type={'error-wrong'} onPressRetry={props.reset} />\n </View>\n );\n};\n\nclass InternalErrorBoundaryContainer extends React.PureComponent<{\n onError?: (props: ErrorBoundaryProps) => void;\n ErrorInfoComponent?: (props: ErrorBoundaryProps) =>
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_TypedPlaceholder","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","DefaultErrorBoundaryComponent","props","createElement","View","style","flex","justifyContent","alignItems","type","onPressRetry","reset","InternalErrorBoundaryContainer","React","PureComponent","constructor","arguments","error","errorInfo","_this$props$onError","_this$props","setState","onError","state","_this$props$ErrorInfo","_this$props2","ErrorInfoComponent","Fragment","children","_default","exports"],"sources":["InternalErrorBoundaryContainer.tsx"],"sourcesContent":["import React, { ErrorInfo } from 'react';\nimport { View } from 'react-native';\n\nimport TypedPlaceholder from '../components/TypedPlaceholder';\nimport type { ErrorBoundaryProps } from '../types';\n\nconst DefaultErrorBoundaryComponent = (props: ErrorBoundaryProps) => {\n return (\n <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>\n <TypedPlaceholder type={'error-wrong'} onPressRetry={props.reset} />\n </View>\n );\n};\n\nclass InternalErrorBoundaryContainer extends React.PureComponent<{\n onError?: (props: ErrorBoundaryProps) => void;\n ErrorInfoComponent?: (props: ErrorBoundaryProps) => React.ReactNode;\n children?: React.ReactNode;\n}> {\n static defaultProps = {\n ErrorInfoComponent: DefaultErrorBoundaryComponent,\n };\n\n state: { error: Error | null; errorInfo: ErrorInfo | null } = {\n error: null,\n errorInfo: null,\n };\n\n componentDidCatch = (error: Error, errorInfo: ErrorInfo) => {\n this.setState({ error, errorInfo });\n this.props.onError?.({ error, errorInfo, reset: this.reset });\n };\n\n reset = () => {\n this.setState({ error: null, errorInfo: null });\n };\n\n render = () => {\n if (this.state.error && this.state.errorInfo) {\n return (\n this.props.ErrorInfoComponent?.({\n error: this.state.error,\n errorInfo: this.state.errorInfo,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,KAAK,CAACN,KAAK;UACvBC,SAAS,EAAE,IAAI,CAACK,KAAK,CAACL,SAAS;UAC/BP,KAAK,EAAE,IAAI,CAACA;QACd,CAAC,CAAC,KAAI,IAAI;MAEd;MAEA,oBAAOxC,MAAA,CAAAO,OAAA,CAAAyB,aAAA,CAAAhC,MAAA,CAAAO,OAAA,CAAAiD,QAAA,QAAG,IAAI,CAACzB,KAAK,CAAC0B,QAAQ,CAAI;IACnC,CAAC;EAAA;AACH;AAACjD,eAAA,CApCKiC,8BAA8B,kBAKZ;EACpBc,kBAAkB,EAAEzB;AACtB,CAAC;AAAA,IAAA4B,QAAA,GA+BYjB,8BAA8B;AAAAkB,OAAA,CAAApD,OAAA,GAAAmD,QAAA"}
|
|
@@ -23,6 +23,7 @@ var _ImageCompressionConfig = _interopRequireDefault(require("../libs/ImageCompr
|
|
|
23
23
|
var _InternalLocalCacheStorage = _interopRequireDefault(require("../libs/InternalLocalCacheStorage"));
|
|
24
24
|
var _MentionConfig = _interopRequireDefault(require("../libs/MentionConfig"));
|
|
25
25
|
var _MentionManager = _interopRequireDefault(require("../libs/MentionManager"));
|
|
26
|
+
var _VoiceMessageConfig = _interopRequireDefault(require("../libs/VoiceMessageConfig"));
|
|
26
27
|
var _StringSet = _interopRequireDefault(require("../localization/StringSet.en"));
|
|
27
28
|
var _dynamicModule = _interopRequireDefault(require("../platform/dynamicModule"));
|
|
28
29
|
var _version = _interopRequireDefault(require("../version"));
|
|
@@ -30,6 +31,7 @@ var _InternalErrorBoundaryContainer = _interopRequireDefault(require("./Internal
|
|
|
30
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
32
33
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
34
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
35
|
const NetInfo = _dynamicModule.default.get('@react-native-community/netinfo', 'warn');
|
|
34
36
|
const SendbirdUIKit = Object.freeze({
|
|
35
37
|
VERSION: _version.default,
|
|
@@ -41,8 +43,16 @@ const SendbirdUIKit = Object.freeze({
|
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
exports.SendbirdUIKit = SendbirdUIKit;
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
+
const chatOmitKeys = ['appId', 'newInstance', 'modules', 'debugMode', 'appVersion', 'localCacheEnabled', 'useAsyncStorageStore'];
|
|
47
|
+
function sanitizeChatOptions(chatOptions) {
|
|
48
|
+
const opts = {
|
|
49
|
+
...chatOptions
|
|
50
|
+
};
|
|
51
|
+
chatOmitKeys.forEach(key => delete opts[key]);
|
|
52
|
+
return opts;
|
|
53
|
+
}
|
|
54
|
+
const SendbirdUIKitContainer = props => {
|
|
55
|
+
const {
|
|
46
56
|
children,
|
|
47
57
|
appId,
|
|
48
58
|
chatOptions,
|
|
@@ -53,9 +63,8 @@ const SendbirdUIKitContainer = _ref => {
|
|
|
53
63
|
errorBoundary,
|
|
54
64
|
toast,
|
|
55
65
|
userProfile,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
} = _ref;
|
|
66
|
+
reaction
|
|
67
|
+
} = props;
|
|
59
68
|
if (!chatOptions.localCacheStorage) {
|
|
60
69
|
throw new Error('SendbirdUIKitContainer: chatOptions.localCacheStorage is required');
|
|
61
70
|
}
|
|
@@ -66,34 +75,23 @@ const SendbirdUIKitContainer = _ref => {
|
|
|
66
75
|
const [sdkInstance, setSdkInstance] = (0, _react.useState)(() => {
|
|
67
76
|
const sendbird = initializeSendbird(appId, {
|
|
68
77
|
internalStorage,
|
|
69
|
-
...chatOptions
|
|
78
|
+
...sanitizeChatOptions(chatOptions)
|
|
70
79
|
});
|
|
71
80
|
unsubscribes.current = sendbird.unsubscribes;
|
|
72
81
|
return sendbird.chatSDK;
|
|
73
82
|
});
|
|
83
|
+
const {
|
|
84
|
+
imageCompressionConfig,
|
|
85
|
+
voiceMessageConfig,
|
|
86
|
+
mentionConfig
|
|
87
|
+
} = useConfigInstance(props);
|
|
74
88
|
const emojiManager = (0, _react.useMemo)(() => new _EmojiManager.default(internalStorage), [internalStorage]);
|
|
75
|
-
const mentionManager = (0, _react.useMemo)(() =>
|
|
76
|
-
const config = new _MentionConfig.default({
|
|
77
|
-
mentionLimit: (userMention === null || userMention === void 0 ? void 0 : userMention.mentionLimit) || _MentionConfig.default.DEFAULT.MENTION_LIMIT,
|
|
78
|
-
suggestionLimit: (userMention === null || userMention === void 0 ? void 0 : userMention.suggestionLimit) || _MentionConfig.default.DEFAULT.SUGGESTION_LIMIT,
|
|
79
|
-
debounceMills: (userMention === null || userMention === void 0 ? void 0 : userMention.debounceMills) ?? _MentionConfig.default.DEFAULT.DEBOUNCE_MILLS,
|
|
80
|
-
delimiter: _MentionConfig.default.DEFAULT.DELIMITER,
|
|
81
|
-
trigger: _MentionConfig.default.DEFAULT.TRIGGER
|
|
82
|
-
});
|
|
83
|
-
return new _MentionManager.default(config);
|
|
84
|
-
}, [userMention === null || userMention === void 0 ? void 0 : userMention.mentionLimit, userMention === null || userMention === void 0 ? void 0 : userMention.suggestionLimit, userMention === null || userMention === void 0 ? void 0 : userMention.debounceMills]);
|
|
85
|
-
const imageCompressionConfig = (0, _react.useMemo)(() => {
|
|
86
|
-
return new _ImageCompressionConfig.default({
|
|
87
|
-
compressionRate: (imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.compressionRate) || _ImageCompressionConfig.default.DEFAULT.COMPRESSION_RATE,
|
|
88
|
-
width: imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.width,
|
|
89
|
-
height: imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.height
|
|
90
|
-
});
|
|
91
|
-
}, [imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.compressionRate, imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.width, imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.height]);
|
|
89
|
+
const mentionManager = (0, _react.useMemo)(() => new _MentionManager.default(mentionConfig), [mentionConfig]);
|
|
92
90
|
(0, _react.useLayoutEffect)(() => {
|
|
93
91
|
if (!isFirstMount) {
|
|
94
92
|
const sendbird = initializeSendbird(appId, {
|
|
95
93
|
internalStorage,
|
|
96
|
-
...chatOptions
|
|
94
|
+
...sanitizeChatOptions(chatOptions)
|
|
97
95
|
});
|
|
98
96
|
setSdkInstance(sendbird.chatSDK);
|
|
99
97
|
unsubscribes.current = sendbird.unsubscribes;
|
|
@@ -131,6 +129,7 @@ const SendbirdUIKitContainer = _ref => {
|
|
|
131
129
|
emojiManager: emojiManager,
|
|
132
130
|
mentionManager: mentionManager,
|
|
133
131
|
imageCompressionConfig: imageCompressionConfig,
|
|
132
|
+
voiceMessageConfig: voiceMessageConfig,
|
|
134
133
|
enableAutoPushTokenRegistration: chatOptions.enableAutoPushTokenRegistration ?? SendbirdUIKit.DEFAULT.AUTO_PUSH_TOKEN_REGISTRATION,
|
|
135
134
|
enableUseUserIdForNickname: chatOptions.enableUseUserIdForNickname ?? SendbirdUIKit.DEFAULT.USE_USER_ID_FOR_NICKNAME,
|
|
136
135
|
enableImageCompression: chatOptions.enableImageCompression ?? SendbirdUIKit.DEFAULT.IMAGE_COMPRESSION
|
|
@@ -140,7 +139,10 @@ const SendbirdUIKitContainer = _ref => {
|
|
|
140
139
|
fileService: platformServices.file,
|
|
141
140
|
notificationService: platformServices.notification,
|
|
142
141
|
clipboardService: platformServices.clipboard,
|
|
143
|
-
mediaService: platformServices.media
|
|
142
|
+
mediaService: platformServices.media,
|
|
143
|
+
playerService: platformServices.player,
|
|
144
|
+
recorderService: platformServices.recorder,
|
|
145
|
+
voiceMessageConfig: voiceMessageConfig
|
|
144
146
|
}, /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.UIKitThemeProvider, {
|
|
145
147
|
theme: (styles === null || styles === void 0 ? void 0 : styles.theme) ?? _uikitReactNativeFoundation.LightUIKitTheme
|
|
146
148
|
}, /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.HeaderStyleProvider, {
|
|
@@ -149,11 +151,9 @@ const SendbirdUIKitContainer = _ref => {
|
|
|
149
151
|
statusBarTranslucent: (styles === null || styles === void 0 ? void 0 : styles.statusBarTranslucent) ?? true
|
|
150
152
|
}, /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.ToastProvider, {
|
|
151
153
|
dismissTimeout: toast === null || toast === void 0 ? void 0 : toast.dismissTimeout
|
|
152
|
-
}, /*#__PURE__*/_react.default.createElement(_UserProfileCtx.UserProfileProvider, {
|
|
153
|
-
onCreateChannel: userProfile === null || userProfile === void 0 ? void 0 : userProfile.onCreateChannel,
|
|
154
|
-
onBeforeCreateChannel: userProfile === null || userProfile === void 0 ? void 0 : userProfile.onBeforeCreateChannel,
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_UserProfileCtx.UserProfileProvider, _extends({}, userProfile, {
|
|
155
155
|
statusBarTranslucent: (styles === null || styles === void 0 ? void 0 : styles.statusBarTranslucent) ?? true
|
|
156
|
-
}, /*#__PURE__*/_react.default.createElement(_ReactionCtx.ReactionProvider,
|
|
156
|
+
}), /*#__PURE__*/_react.default.createElement(_ReactionCtx.ReactionProvider, reaction, /*#__PURE__*/_react.default.createElement(_LocalizationCtx.LocalizationContext.Consumer, null, value => {
|
|
157
157
|
const STRINGS = (value === null || value === void 0 ? void 0 : value.STRINGS) || defaultStringSet;
|
|
158
158
|
return /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.DialogProvider, {
|
|
159
159
|
defaultLabels: {
|
|
@@ -174,16 +174,16 @@ const initializeSendbird = (appId, options) => {
|
|
|
174
174
|
const unsubscribes = [];
|
|
175
175
|
const {
|
|
176
176
|
internalStorage,
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
onInitialized,
|
|
178
|
+
...chatInitParams
|
|
179
179
|
} = options;
|
|
180
180
|
chatSDK = _chat.default.init({
|
|
181
|
+
...chatInitParams,
|
|
181
182
|
appId,
|
|
182
183
|
newInstance: true,
|
|
183
184
|
modules: [new _groupChannel.GroupChannelModule(), new _openChannel.OpenChannelModule()],
|
|
184
|
-
localCacheEnabled:
|
|
185
|
-
useAsyncStorageStore: internalStorage
|
|
186
|
-
localCacheEncryption
|
|
185
|
+
localCacheEnabled: true,
|
|
186
|
+
useAsyncStorageStore: internalStorage
|
|
187
187
|
});
|
|
188
188
|
if (onInitialized) {
|
|
189
189
|
chatSDK = onInitialized(chatSDK);
|
|
@@ -266,6 +266,44 @@ function getReactNativeVersion() {
|
|
|
266
266
|
} = _reactNative.Platform.constants.reactNativeVersion;
|
|
267
267
|
return `${major}.${minor}.${patch}`;
|
|
268
268
|
}
|
|
269
|
+
const useConfigInstance = _ref => {
|
|
270
|
+
var _voiceMessage$recorde3, _voiceMessage$recorde4;
|
|
271
|
+
let {
|
|
272
|
+
imageCompression,
|
|
273
|
+
userMention,
|
|
274
|
+
voiceMessage
|
|
275
|
+
} = _ref;
|
|
276
|
+
const mentionConfig = (0, _react.useMemo)(() => {
|
|
277
|
+
return new _MentionConfig.default({
|
|
278
|
+
mentionLimit: (userMention === null || userMention === void 0 ? void 0 : userMention.mentionLimit) || _MentionConfig.default.DEFAULT.MENTION_LIMIT,
|
|
279
|
+
suggestionLimit: (userMention === null || userMention === void 0 ? void 0 : userMention.suggestionLimit) || _MentionConfig.default.DEFAULT.SUGGESTION_LIMIT,
|
|
280
|
+
debounceMills: (userMention === null || userMention === void 0 ? void 0 : userMention.debounceMills) ?? _MentionConfig.default.DEFAULT.DEBOUNCE_MILLS,
|
|
281
|
+
delimiter: _MentionConfig.default.DEFAULT.DELIMITER,
|
|
282
|
+
trigger: _MentionConfig.default.DEFAULT.TRIGGER
|
|
283
|
+
});
|
|
284
|
+
}, [userMention === null || userMention === void 0 ? void 0 : userMention.mentionLimit, userMention === null || userMention === void 0 ? void 0 : userMention.suggestionLimit, userMention === null || userMention === void 0 ? void 0 : userMention.debounceMills]);
|
|
285
|
+
const imageCompressionConfig = (0, _react.useMemo)(() => {
|
|
286
|
+
return new _ImageCompressionConfig.default({
|
|
287
|
+
compressionRate: (imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.compressionRate) || _ImageCompressionConfig.default.DEFAULT.COMPRESSION_RATE,
|
|
288
|
+
width: imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.width,
|
|
289
|
+
height: imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.height
|
|
290
|
+
});
|
|
291
|
+
}, [imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.compressionRate, imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.width, imageCompression === null || imageCompression === void 0 ? void 0 : imageCompression.height]);
|
|
292
|
+
const voiceMessageConfig = (0, _react.useMemo)(() => {
|
|
293
|
+
var _voiceMessage$recorde, _voiceMessage$recorde2;
|
|
294
|
+
return new _VoiceMessageConfig.default({
|
|
295
|
+
recorder: {
|
|
296
|
+
minDuration: (voiceMessage === null || voiceMessage === void 0 ? void 0 : (_voiceMessage$recorde = voiceMessage.recorder) === null || _voiceMessage$recorde === void 0 ? void 0 : _voiceMessage$recorde.minDuration) ?? _VoiceMessageConfig.default.DEFAULT.RECORDER.MIN_DURATION,
|
|
297
|
+
maxDuration: (voiceMessage === null || voiceMessage === void 0 ? void 0 : (_voiceMessage$recorde2 = voiceMessage.recorder) === null || _voiceMessage$recorde2 === void 0 ? void 0 : _voiceMessage$recorde2.maxDuration) ?? _VoiceMessageConfig.default.DEFAULT.RECORDER.MAX_DURATION
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
}, [voiceMessage === null || voiceMessage === void 0 ? void 0 : (_voiceMessage$recorde3 = voiceMessage.recorder) === null || _voiceMessage$recorde3 === void 0 ? void 0 : _voiceMessage$recorde3.minDuration, voiceMessage === null || voiceMessage === void 0 ? void 0 : (_voiceMessage$recorde4 = voiceMessage.recorder) === null || _voiceMessage$recorde4 === void 0 ? void 0 : _voiceMessage$recorde4.maxDuration]);
|
|
301
|
+
return {
|
|
302
|
+
mentionConfig,
|
|
303
|
+
imageCompressionConfig,
|
|
304
|
+
voiceMessageConfig
|
|
305
|
+
};
|
|
306
|
+
};
|
|
269
307
|
var _default = SendbirdUIKitContainer;
|
|
270
308
|
exports.default = _default;
|
|
271
309
|
//# sourceMappingURL=SendbirdUIKitContainer.js.map
|