@sendbird/uikit-react-native 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -17
- package/lib/commonjs/components/ChatFlatList.js +2 -1
- package/lib/commonjs/components/ChatFlatList.js.map +1 -1
- package/lib/commonjs/components/FileViewer.js +2 -5
- package/lib/commonjs/components/FileViewer.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js +11 -6
- package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js +12 -2
- package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js +26 -11
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js +1 -6
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js +86 -10
- package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js +102 -15
- package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/index.js +22 -3
- package/lib/commonjs/components/MessageRenderer/index.js.map +1 -1
- package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js +150 -0
- package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -0
- package/lib/commonjs/components/ReactionAddons/MessageReactionAddon.js +135 -0
- package/lib/commonjs/components/ReactionAddons/MessageReactionAddon.js.map +1 -0
- package/lib/commonjs/components/ReactionAddons/ReactionRoundedButton.js +87 -0
- package/lib/commonjs/components/ReactionAddons/ReactionRoundedButton.js.map +1 -0
- package/lib/commonjs/components/ReactionAddons/index.js +19 -0
- package/lib/commonjs/components/ReactionAddons/index.js.map +1 -0
- package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js +150 -0
- package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -0
- package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +276 -0
- package/lib/commonjs/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -0
- package/lib/commonjs/components/ReactionBottomSheets/index.js +19 -0
- package/lib/commonjs/components/ReactionBottomSheets/index.js.map +1 -0
- package/lib/commonjs/constants.js +3 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js +4 -1
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/commonjs/containers/SendbirdUIKitContainer.js +130 -79
- package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/commonjs/contexts/PlatformServiceCtx.js.map +1 -1
- package/lib/commonjs/contexts/ReactionCtx.js +107 -0
- package/lib/commonjs/contexts/ReactionCtx.js.map +1 -0
- package/lib/commonjs/contexts/SendbirdChatCtx.js +26 -18
- package/lib/commonjs/contexts/SendbirdChatCtx.js.map +1 -1
- package/lib/commonjs/contexts/UserProfileCtx.js +9 -0
- package/lib/commonjs/contexts/UserProfileCtx.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js +33 -37
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js +95 -23
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js +121 -31
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +34 -13
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelSuggestedMentionList.js +210 -0
- package/lib/commonjs/domain/groupChannel/component/GroupChannelSuggestedMentionList.js.map +1 -0
- package/lib/commonjs/domain/groupChannel/index.js +8 -0
- package/lib/commonjs/domain/groupChannel/index.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/module/createGroupChannelModule.js +4 -0
- package/lib/commonjs/domain/groupChannel/module/createGroupChannelModule.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/module/moduleContext.js +4 -4
- 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/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js +3 -2
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js +2 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js +2 -1
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js +39 -0
- package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js.map +1 -0
- package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js +140 -0
- package/lib/commonjs/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js.map +1 -0
- package/lib/commonjs/domain/groupChannelNotifications/index.js +46 -0
- package/lib/commonjs/domain/groupChannelNotifications/index.js.map +1 -0
- package/lib/commonjs/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js +33 -0
- package/lib/commonjs/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js.map +1 -0
- package/lib/commonjs/domain/groupChannelNotifications/module/moduleContext.js +45 -0
- package/lib/commonjs/domain/groupChannelNotifications/module/moduleContext.js.map +1 -0
- package/lib/commonjs/domain/groupChannelNotifications/types.js +6 -0
- package/lib/commonjs/domain/groupChannelNotifications/types.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsList.js +2 -1
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +49 -6
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js +11 -16
- package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelUserList/types.js.map +1 -1
- package/lib/commonjs/domain/userList/component/UserListList.js +4 -1
- package/lib/commonjs/domain/userList/component/UserListList.js.map +1 -1
- package/lib/commonjs/domain/userList/module/createUserListModule.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelCreateFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelFragment.js +11 -4
- package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelInviteFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelListFragment.js +4 -14
- package/lib/commonjs/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelNotificationsFragment.js +34 -0
- package/lib/commonjs/fragments/createGroupChannelNotificationsFragment.js.map +1 -0
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js +3 -1
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/commonjs/hooks/useConnection.js +3 -0
- package/lib/commonjs/hooks/useConnection.js.map +1 -1
- package/lib/commonjs/hooks/useContext.js +11 -1
- package/lib/commonjs/hooks/useContext.js.map +1 -1
- package/lib/commonjs/hooks/useKeyboardStatus.js +97 -0
- package/lib/commonjs/hooks/useKeyboardStatus.js.map +1 -0
- package/lib/commonjs/hooks/useMentionSuggestion.js +110 -0
- package/lib/commonjs/hooks/useMentionSuggestion.js.map +1 -0
- package/lib/commonjs/hooks/useMentionTextInput.js +139 -0
- package/lib/commonjs/hooks/useMentionTextInput.js.map +1 -0
- package/lib/commonjs/index.js +95 -40
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/libs/EmojiManager.js +100 -0
- package/lib/commonjs/libs/EmojiManager.js.map +1 -0
- package/lib/commonjs/libs/ImageCompressionConfig.js +38 -0
- package/lib/commonjs/libs/ImageCompressionConfig.js.map +1 -0
- package/lib/commonjs/libs/MentionConfig.js +47 -0
- package/lib/commonjs/libs/MentionConfig.js.map +1 -0
- package/lib/commonjs/libs/MentionManager.js +235 -0
- package/lib/commonjs/libs/MentionManager.js.map +1 -0
- package/lib/commonjs/libs/SBUUtils.js +27 -0
- package/lib/commonjs/libs/SBUUtils.js.map +1 -1
- package/lib/commonjs/localization/StringSet.type.js +20 -5
- package/lib/commonjs/localization/StringSet.type.js.map +1 -1
- package/lib/commonjs/platform/createMediaService.expo.js +35 -1
- package/lib/commonjs/platform/createMediaService.expo.js.map +1 -1
- package/lib/commonjs/platform/createMediaService.native.js +41 -6
- package/lib/commonjs/platform/createMediaService.native.js.map +1 -1
- package/lib/commonjs/platform/dynamicModule.js +9 -57
- package/lib/commonjs/platform/dynamicModule.js.map +1 -1
- 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/ChatFlatList.js +3 -2
- package/lib/module/components/ChatFlatList.js.map +1 -1
- package/lib/module/components/FileViewer.js +2 -5
- package/lib/module/components/FileViewer.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js +11 -6
- package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js +12 -2
- package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js +26 -11
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/index.js +1 -5
- package/lib/module/components/MessageRenderer/FileMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js +86 -12
- package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js +103 -19
- package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/index.js +21 -4
- package/lib/module/components/MessageRenderer/index.js.map +1 -1
- package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js +132 -0
- package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -0
- package/lib/module/components/ReactionAddons/MessageReactionAddon.js +118 -0
- package/lib/module/components/ReactionAddons/MessageReactionAddon.js.map +1 -0
- package/lib/module/components/ReactionAddons/ReactionRoundedButton.js +74 -0
- package/lib/module/components/ReactionAddons/ReactionRoundedButton.js.map +1 -0
- package/lib/module/components/ReactionAddons/index.js +7 -0
- package/lib/module/components/ReactionAddons/index.js.map +1 -0
- package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js +135 -0
- package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -0
- package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js +259 -0
- package/lib/module/components/ReactionBottomSheets/ReactionUserListBottomSheet.js.map +1 -0
- package/lib/module/components/ReactionBottomSheets/index.js +7 -0
- package/lib/module/components/ReactionBottomSheets/index.js.map +1 -0
- package/lib/module/constants.js +1 -0
- package/lib/module/constants.js.map +1 -1
- package/lib/module/containers/GroupChannelPreviewContainer.js +4 -1
- package/lib/module/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/module/containers/SendbirdUIKitContainer.js +127 -81
- package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/module/contexts/PlatformServiceCtx.js.map +1 -1
- package/lib/module/contexts/ReactionCtx.js +85 -0
- package/lib/module/contexts/ReactionCtx.js.map +1 -0
- package/lib/module/contexts/SendbirdChatCtx.js +28 -18
- package/lib/module/contexts/SendbirdChatCtx.js.map +1 -1
- package/lib/module/contexts/UserProfileCtx.js +7 -0
- package/lib/module/contexts/UserProfileCtx.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js +34 -39
- package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js +92 -26
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js +118 -33
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +35 -16
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelSuggestedMentionList.js +188 -0
- package/lib/module/domain/groupChannel/component/GroupChannelSuggestedMentionList.js.map +1 -0
- package/lib/module/domain/groupChannel/index.js +1 -0
- package/lib/module/domain/groupChannel/index.js.map +1 -1
- package/lib/module/domain/groupChannel/module/createGroupChannelModule.js +3 -0
- package/lib/module/domain/groupChannel/module/createGroupChannelModule.js.map +1 -1
- package/lib/module/domain/groupChannel/module/moduleContext.js +4 -4
- 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/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js +4 -3
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListList.js +3 -2
- package/lib/module/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js +3 -2
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js.map +1 -1
- package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js +25 -0
- package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.js.map +1 -0
- package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js +122 -0
- package/lib/module/domain/groupChannelNotifications/component/GroupChannelNotificationsView.js.map +1 -0
- package/lib/module/domain/groupChannelNotifications/index.js +5 -0
- package/lib/module/domain/groupChannelNotifications/index.js.map +1 -0
- package/lib/module/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js +21 -0
- package/lib/module/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.js.map +1 -0
- package/lib/module/domain/groupChannelNotifications/module/moduleContext.js +25 -0
- package/lib/module/domain/groupChannelNotifications/module/moduleContext.js.map +1 -0
- package/lib/module/domain/groupChannelNotifications/types.js +2 -0
- package/lib/module/domain/groupChannelNotifications/types.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsList.js +3 -2
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsList.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +46 -6
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/module/moduleContext.js +12 -17
- package/lib/module/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/types.js.map +1 -1
- package/lib/module/domain/groupChannelUserList/types.js.map +1 -1
- package/lib/module/domain/userList/component/UserListList.js +3 -1
- package/lib/module/domain/userList/component/UserListList.js.map +1 -1
- package/lib/module/domain/userList/module/createUserListModule.js.map +1 -1
- package/lib/module/fragments/createGroupChannelCreateFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelFragment.js +11 -4
- package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelInviteFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelListFragment.js +5 -9
- package/lib/module/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelNotificationsFragment.js +22 -0
- package/lib/module/fragments/createGroupChannelNotificationsFragment.js.map +1 -0
- package/lib/module/fragments/createGroupChannelSettingsFragment.js +3 -1
- package/lib/module/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/module/hooks/useConnection.js +3 -0
- package/lib/module/hooks/useConnection.js.map +1 -1
- package/lib/module/hooks/useContext.js +6 -0
- package/lib/module/hooks/useContext.js.map +1 -1
- package/lib/module/hooks/useKeyboardStatus.js +78 -0
- package/lib/module/hooks/useKeyboardStatus.js.map +1 -0
- package/lib/module/hooks/useMentionSuggestion.js +100 -0
- package/lib/module/hooks/useMentionSuggestion.js.map +1 -0
- package/lib/module/hooks/useMentionTextInput.js +128 -0
- package/lib/module/hooks/useMentionTextInput.js.map +1 -0
- package/lib/module/index.js +8 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/libs/EmojiManager.js +90 -0
- package/lib/module/libs/EmojiManager.js.map +1 -0
- package/lib/module/libs/ImageCompressionConfig.js +30 -0
- package/lib/module/libs/ImageCompressionConfig.js.map +1 -0
- package/lib/module/libs/MentionConfig.js +39 -0
- package/lib/module/libs/MentionConfig.js.map +1 -0
- package/lib/module/libs/MentionManager.js +223 -0
- package/lib/module/libs/MentionManager.js.map +1 -0
- package/lib/module/libs/SBUUtils.js +26 -1
- package/lib/module/libs/SBUUtils.js.map +1 -1
- package/lib/module/localization/StringSet.type.js +21 -6
- package/lib/module/localization/StringSet.type.js.map +1 -1
- package/lib/module/platform/createMediaService.expo.js +33 -1
- package/lib/module/platform/createMediaService.expo.js.map +1 -1
- package/lib/module/platform/createMediaService.native.js +38 -5
- package/lib/module/platform/createMediaService.native.js.map +1 -1
- package/lib/module/platform/dynamicModule.js +10 -56
- package/lib/module/platform/dynamicModule.js.map +1 -1
- 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/__template__/types.d.ts +3 -3
- package/lib/typescript/src/components/ChannelCover.d.ts +1 -1
- package/lib/typescript/src/components/ChatFlatList.d.ts +1 -1
- package/lib/typescript/src/components/FileViewer.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/AdminMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/FileMessage/BaseFileMessage.d.ts +2 -2
- package/lib/typescript/src/components/MessageRenderer/FileMessage/ImageFileMessage.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/FileMessage/VideoFileMessage.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/FileMessage/index.d.ts +11 -2
- package/lib/typescript/src/components/MessageRenderer/MessageDateSeparator.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingAvatar.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingSenderName.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageOutgoingStatus.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageTime.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/UnknownMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/UserMessage/BaseUserMessage.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.d.ts +2 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/index.d.ts +4 -1
- package/lib/typescript/src/components/MessageRenderer/index.d.ts +4 -3
- package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
- package/lib/typescript/src/components/ReactionAddons/BottomSheetReactionAddon.d.ts +8 -0
- package/lib/typescript/src/components/ReactionAddons/MessageReactionAddon.d.ts +6 -0
- package/lib/typescript/src/components/ReactionAddons/ReactionRoundedButton.d.ts +14 -0
- package/lib/typescript/src/components/ReactionAddons/index.d.ts +11 -0
- package/lib/typescript/src/components/ReactionBottomSheets/ReactionListBottomSheet.d.ts +3 -0
- package/lib/typescript/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.d.ts +3 -0
- package/lib/typescript/src/components/ReactionBottomSheets/index.d.ts +20 -0
- package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
- package/lib/typescript/src/components/StatusComposition.d.ts +1 -1
- package/lib/typescript/src/components/TypedPlaceholder.d.ts +1 -1
- package/lib/typescript/src/components/UserActionBar.d.ts +1 -1
- package/lib/typescript/src/components/UserSelectableBar.d.ts +1 -1
- package/lib/typescript/src/constants.d.ts +1 -0
- package/lib/typescript/src/containers/GroupChannelPreviewContainer.d.ts +1 -1
- package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +20 -8
- package/lib/typescript/src/contexts/LocalizationCtx.d.ts +2 -2
- package/lib/typescript/src/contexts/PlatformServiceCtx.d.ts +9 -3
- package/lib/typescript/src/contexts/ReactionCtx.d.ts +18 -0
- package/lib/typescript/src/contexts/SendbirdChatCtx.d.ts +16 -3
- package/lib/typescript/src/contexts/UserProfileCtx.d.ts +4 -4
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/EditInput.d.ts +35 -7
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/SendInput.d.ts +32 -5
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/index.d.ts +19 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelSuggestedMentionList.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannel/index.d.ts +1 -0
- package/lib/typescript/src/domain/groupChannel/module/createGroupChannelModule.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/types.d.ts +24 -7
- package/lib/typescript/src/domain/groupChannelBannedUsers/types.d.ts +3 -3
- package/lib/typescript/src/domain/groupChannelList/types.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannelModeration/types.d.ts +3 -3
- package/lib/typescript/src/domain/groupChannelMutedMembers/types.d.ts +3 -3
- package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelNotifications/component/GroupChannelNotificationsView.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelNotifications/index.d.ts +4 -0
- package/lib/typescript/src/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelNotifications/module/moduleContext.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelNotifications/types.d.ts +33 -0
- package/lib/typescript/src/domain/groupChannelOperators/types.d.ts +3 -3
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +3 -1
- package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +6 -6
- package/lib/typescript/src/domain/userList/component/UserListList.d.ts +2 -1
- package/lib/typescript/src/domain/userList/module/createUserListModule.d.ts +2 -1
- package/lib/typescript/src/fragments/createGroupChannelCreateFragment.d.ts +1 -1
- package/lib/typescript/src/fragments/createGroupChannelInviteFragment.d.ts +1 -1
- package/lib/typescript/src/fragments/createGroupChannelNotificationsFragment.d.ts +3 -0
- package/lib/typescript/src/hooks/useConnection.d.ts +1 -1
- package/lib/typescript/src/hooks/useContext.d.ts +3 -26
- package/lib/typescript/src/hooks/useKeyboardStatus.d.ts +6 -0
- package/lib/typescript/src/hooks/useMentionSuggestion.d.ts +17 -0
- package/lib/typescript/src/hooks/useMentionTextInput.d.ts +18 -0
- package/lib/typescript/src/index.d.ts +8 -3
- package/lib/typescript/src/libs/EmojiManager.d.ts +16 -0
- package/lib/typescript/src/libs/ImageCompressionConfig.d.ts +16 -0
- package/lib/typescript/src/libs/MentionConfig.d.ts +24 -0
- package/lib/typescript/src/libs/MentionManager.d.ts +61 -0
- package/lib/typescript/src/libs/SBUUtils.d.ts +6 -0
- package/lib/typescript/src/localization/StringSet.type.d.ts +19 -2
- package/lib/typescript/src/platform/createMediaService.expo.d.ts +6 -2
- package/lib/typescript/src/platform/createMediaService.native.d.ts +8 -6
- package/lib/typescript/src/platform/dynamicModule.d.ts +8 -13
- package/lib/typescript/src/platform/types.d.ts +33 -8
- package/lib/typescript/src/types.d.ts +13 -4
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +16 -6
- package/src/components/ChatFlatList.tsx +2 -1
- package/src/components/FileViewer.tsx +2 -5
- package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +17 -12
- package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +30 -18
- package/src/components/MessageRenderer/FileMessage/VideoFileMessage.tsx +21 -11
- package/src/components/MessageRenderer/FileMessage/index.tsx +1 -4
- package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +82 -14
- package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +136 -62
- package/src/components/MessageRenderer/UserMessage/index.tsx +8 -1
- package/src/components/MessageRenderer/index.tsx +39 -7
- package/src/components/ReactionAddons/BottomSheetReactionAddon.tsx +106 -0
- package/src/components/ReactionAddons/MessageReactionAddon.tsx +123 -0
- package/src/components/ReactionAddons/ReactionRoundedButton.tsx +71 -0
- package/src/components/ReactionAddons/index.tsx +7 -0
- package/src/components/ReactionBottomSheets/ReactionListBottomSheet.tsx +113 -0
- package/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.tsx +249 -0
- package/src/components/ReactionBottomSheets/index.tsx +24 -0
- package/src/constants.ts +2 -0
- package/src/containers/GroupChannelPreviewContainer.tsx +3 -1
- package/src/containers/SendbirdUIKitContainer.tsx +165 -88
- package/src/contexts/PlatformServiceCtx.tsx +9 -2
- package/src/contexts/ReactionCtx.tsx +102 -0
- package/src/contexts/SendbirdChatCtx.tsx +46 -21
- package/src/contexts/UserProfileCtx.tsx +9 -0
- package/src/domain/groupChannel/component/GroupChannelInput/EditInput.tsx +56 -30
- package/src/domain/groupChannel/component/GroupChannelInput/SendInput.tsx +129 -32
- package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +138 -43
- package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +30 -12
- package/src/domain/groupChannel/component/GroupChannelSuggestedMentionList.tsx +173 -0
- package/src/domain/groupChannel/index.ts +1 -0
- package/src/domain/groupChannel/module/createGroupChannelModule.tsx +12 -1
- package/src/domain/groupChannel/module/moduleContext.tsx +4 -4
- package/src/domain/groupChannel/types.ts +28 -5
- package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.tsx +3 -2
- package/src/domain/groupChannelList/component/GroupChannelListList.tsx +2 -1
- package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.tsx +2 -1
- package/src/domain/groupChannelNotifications/component/GroupChannelNotificationsHeader.tsx +14 -0
- package/src/domain/groupChannelNotifications/component/GroupChannelNotificationsView.tsx +128 -0
- package/src/domain/groupChannelNotifications/index.ts +4 -0
- package/src/domain/groupChannelNotifications/module/createGroupChannelNotificationsModule.tsx +15 -0
- package/src/domain/groupChannelNotifications/module/moduleContext.tsx +31 -0
- package/src/domain/groupChannelNotifications/types.ts +38 -0
- package/src/domain/groupChannelOperators/component/GroupChannelOperatorsList.tsx +2 -1
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +42 -3
- package/src/domain/groupChannelSettings/module/moduleContext.tsx +17 -14
- package/src/domain/groupChannelSettings/types.ts +2 -0
- package/src/domain/groupChannelUserList/types.ts +7 -2
- package/src/domain/userList/component/UserListList.tsx +5 -1
- package/src/domain/userList/module/createUserListModule.tsx +3 -1
- package/src/fragments/createGroupChannelCreateFragment.tsx +8 -2
- package/src/fragments/createGroupChannelFragment.tsx +19 -6
- package/src/fragments/createGroupChannelInviteFragment.tsx +2 -2
- package/src/fragments/createGroupChannelListFragment.tsx +5 -9
- package/src/fragments/createGroupChannelNotificationsFragment.tsx +27 -0
- package/src/fragments/createGroupChannelSettingsFragment.tsx +2 -0
- package/src/hooks/useConnection.ts +3 -1
- package/src/hooks/useContext.ts +7 -0
- package/src/hooks/useKeyboardStatus.ts +59 -0
- package/src/hooks/useMentionSuggestion.ts +106 -0
- package/src/hooks/useMentionTextInput.ts +139 -0
- package/src/index.ts +14 -2
- package/src/libs/EmojiManager.ts +80 -0
- package/src/libs/ImageCompressionConfig.ts +31 -0
- package/src/libs/MentionConfig.ts +40 -0
- package/src/libs/MentionManager.tsx +240 -0
- package/src/libs/SBUUtils.ts +28 -1
- package/src/localization/StringSet.type.ts +45 -8
- package/src/platform/createMediaService.expo.tsx +24 -1
- package/src/platform/createMediaService.native.tsx +31 -9
- package/src/platform/dynamicModule.ts +17 -59
- package/src/platform/types.ts +29 -7
- package/src/types.ts +12 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Icon, Image, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
4
|
+
import { truncatedCount } from '@sendbird/uikit-utils';
|
|
5
|
+
|
|
6
|
+
const ReactionRoundedButton = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
url,
|
|
9
|
+
count,
|
|
10
|
+
reacted,
|
|
11
|
+
style
|
|
12
|
+
} = _ref;
|
|
13
|
+
const {
|
|
14
|
+
colors
|
|
15
|
+
} = useUIKitTheme();
|
|
16
|
+
const color = colors.ui.reaction.rounded;
|
|
17
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
18
|
+
style: [styles.reactionContainer, {
|
|
19
|
+
backgroundColor: reacted ? color.selected.background : color.enabled.background
|
|
20
|
+
}, style]
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
22
|
+
source: {
|
|
23
|
+
uri: url
|
|
24
|
+
},
|
|
25
|
+
style: styles.emoji
|
|
26
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
27
|
+
caption4: true,
|
|
28
|
+
color: colors.onBackground01,
|
|
29
|
+
numberOfLines: 1,
|
|
30
|
+
style: styles.count
|
|
31
|
+
}, truncatedCount(count, 99, '')));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
ReactionRoundedButton.More = _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
pressed
|
|
37
|
+
} = _ref2;
|
|
38
|
+
const {
|
|
39
|
+
colors
|
|
40
|
+
} = useUIKitTheme();
|
|
41
|
+
const color = colors.ui.reaction.rounded;
|
|
42
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
43
|
+
style: [styles.reactionContainer, {
|
|
44
|
+
backgroundColor: pressed ? color.selected.background : color.enabled.background
|
|
45
|
+
}]
|
|
46
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
47
|
+
icon: 'emoji-more',
|
|
48
|
+
color: colors.onBackground03,
|
|
49
|
+
size: 20
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const styles = createStyleSheet({
|
|
54
|
+
reactionContainer: {
|
|
55
|
+
flexDirection: 'row',
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
width: 52,
|
|
59
|
+
borderRadius: 24,
|
|
60
|
+
paddingVertical: 5,
|
|
61
|
+
paddingHorizontal: 8
|
|
62
|
+
},
|
|
63
|
+
emoji: {
|
|
64
|
+
width: 20,
|
|
65
|
+
height: 20,
|
|
66
|
+
marginRight: 4
|
|
67
|
+
},
|
|
68
|
+
count: {
|
|
69
|
+
width: 13,
|
|
70
|
+
textAlign: 'left'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export default ReactionRoundedButton;
|
|
74
|
+
//# sourceMappingURL=ReactionRoundedButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Icon","Image","Text","createStyleSheet","useUIKitTheme","truncatedCount","ReactionRoundedButton","url","count","reacted","style","colors","color","ui","reaction","rounded","styles","reactionContainer","backgroundColor","selected","background","enabled","uri","emoji","onBackground01","More","pressed","onBackground03","flexDirection","justifyContent","alignItems","width","borderRadius","paddingVertical","paddingHorizontal","height","marginRight","textAlign"],"sources":["ReactionRoundedButton.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport { Icon, Image, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { truncatedCount } from '@sendbird/uikit-utils';\n\ntype Props = {\n url: string;\n count: number;\n reacted: boolean;\n style: StyleProp<ViewStyle>;\n};\n\nconst ReactionRoundedButton = ({ url, count, reacted, style }: Props) => {\n const { colors } = useUIKitTheme();\n const color = colors.ui.reaction.rounded;\n\n return (\n <View\n style={[\n styles.reactionContainer,\n { backgroundColor: reacted ? color.selected.background : color.enabled.background },\n style,\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n <Text caption4 color={colors.onBackground01} numberOfLines={1} style={styles.count}>\n {truncatedCount(count, 99, '')}\n </Text>\n </View>\n );\n};\n\nReactionRoundedButton.More = ({ pressed }: { pressed: boolean }) => {\n const { colors } = useUIKitTheme();\n const color = colors.ui.reaction.rounded;\n\n return (\n <View\n style={[\n styles.reactionContainer,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} color={colors.onBackground03} size={20} />\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n reactionContainer: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n width: 52,\n borderRadius: 24,\n paddingVertical: 5,\n paddingHorizontal: 8,\n },\n emoji: {\n width: 20,\n height: 20,\n marginRight: 4,\n },\n count: {\n width: 13,\n textAlign: 'left',\n },\n});\n\nexport default ReactionRoundedButton;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAoBC,IAApB,QAA2C,cAA3C;AAEA,SAASC,IAAT,EAAeC,KAAf,EAAsBC,IAAtB,EAA4BC,gBAA5B,EAA8CC,aAA9C,QAAmE,yCAAnE;AACA,SAASC,cAAT,QAA+B,uBAA/B;;AASA,MAAMC,qBAAqB,GAAG,QAA2C;EAAA,IAA1C;IAAEC,GAAF;IAAOC,KAAP;IAAcC,OAAd;IAAuBC;EAAvB,CAA0C;EACvE,MAAM;IAAEC;EAAF,IAAaP,aAAa,EAAhC;EACA,MAAMQ,KAAK,GAAGD,MAAM,CAACE,EAAP,CAAUC,QAAV,CAAmBC,OAAjC;EAEA,oBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACLC,MAAM,CAACC,iBADF,EAEL;MAAEC,eAAe,EAAET,OAAO,GAAGG,KAAK,CAACO,QAAN,CAAeC,UAAlB,GAA+BR,KAAK,CAACS,OAAN,CAAcD;IAAvE,CAFK,EAGLV,KAHK;EADT,gBAOE,oBAAC,KAAD;IAAO,MAAM,EAAE;MAAEY,GAAG,EAAEf;IAAP,CAAf;IAA6B,KAAK,EAAES,MAAM,CAACO;EAA3C,EAPF,eAQE,oBAAC,IAAD;IAAM,QAAQ,MAAd;IAAe,KAAK,EAAEZ,MAAM,CAACa,cAA7B;IAA6C,aAAa,EAAE,CAA5D;IAA+D,KAAK,EAAER,MAAM,CAACR;EAA7E,GACGH,cAAc,CAACG,KAAD,EAAQ,EAAR,EAAY,EAAZ,CADjB,CARF,CADF;AAcD,CAlBD;;AAoBAF,qBAAqB,CAACmB,IAAtB,GAA6B,SAAuC;EAAA,IAAtC;IAAEC;EAAF,CAAsC;EAClE,MAAM;IAAEf;EAAF,IAAaP,aAAa,EAAhC;EACA,MAAMQ,KAAK,GAAGD,MAAM,CAACE,EAAP,CAAUC,QAAV,CAAmBC,OAAjC;EAEA,oBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACLC,MAAM,CAACC,iBADF,EAEL;MAAEC,eAAe,EAAEQ,OAAO,GAAGd,KAAK,CAACO,QAAN,CAAeC,UAAlB,GAA+BR,KAAK,CAACS,OAAN,CAAcD;IAAvE,CAFK;EADT,gBAME,oBAAC,IAAD;IAAM,IAAI,EAAE,YAAZ;IAA0B,KAAK,EAAET,MAAM,CAACgB,cAAxC;IAAwD,IAAI,EAAE;EAA9D,EANF,CADF;AAUD,CAdD;;AAgBA,MAAMX,MAAM,GAAGb,gBAAgB,CAAC;EAC9Bc,iBAAiB,EAAE;IACjBW,aAAa,EAAE,KADE;IAEjBC,cAAc,EAAE,QAFC;IAGjBC,UAAU,EAAE,QAHK;IAIjBC,KAAK,EAAE,EAJU;IAKjBC,YAAY,EAAE,EALG;IAMjBC,eAAe,EAAE,CANA;IAOjBC,iBAAiB,EAAE;EAPF,CADW;EAU9BX,KAAK,EAAE;IACLQ,KAAK,EAAE,EADF;IAELI,MAAM,EAAE,EAFH;IAGLC,WAAW,EAAE;EAHR,CAVuB;EAe9B5B,KAAK,EAAE;IACLuB,KAAK,EAAE,EADF;IAELM,SAAS,EAAE;EAFN;AAfuB,CAAD,CAA/B;AAqBA,eAAe/B,qBAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BottomSheet","Message","ReactionAddons"],"sources":["index.tsx"],"sourcesContent":["import BottomSheet from './BottomSheetReactionAddon';\nimport Message from './MessageReactionAddon';\n\nexport const ReactionAddons = {\n BottomSheet,\n Message,\n};\n"],"mappings":"AAAA,OAAOA,WAAP,MAAwB,4BAAxB;AACA,OAAOC,OAAP,MAAoB,wBAApB;AAEA,OAAO,MAAMC,cAAc,GAAG;EAC5BF,WAD4B;EAE5BC;AAF4B,CAAvB"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlatList, Pressable, View, useWindowDimensions } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
5
|
+
import { UNKNOWN_USER_ID } from '../../constants';
|
|
6
|
+
const NUM_COLUMN = 6;
|
|
7
|
+
|
|
8
|
+
const ReactionListBottomSheet = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
visible,
|
|
11
|
+
onClose,
|
|
12
|
+
onDismiss,
|
|
13
|
+
reactionCtx,
|
|
14
|
+
chatCtx
|
|
15
|
+
} = _ref;
|
|
16
|
+
const {
|
|
17
|
+
width
|
|
18
|
+
} = useWindowDimensions();
|
|
19
|
+
const {
|
|
20
|
+
bottom,
|
|
21
|
+
left,
|
|
22
|
+
right
|
|
23
|
+
} = useSafeAreaInsets();
|
|
24
|
+
const {
|
|
25
|
+
colors
|
|
26
|
+
} = useUIKitTheme();
|
|
27
|
+
const {
|
|
28
|
+
currentUser,
|
|
29
|
+
emojiManager
|
|
30
|
+
} = chatCtx;
|
|
31
|
+
const {
|
|
32
|
+
channel,
|
|
33
|
+
message
|
|
34
|
+
} = reactionCtx;
|
|
35
|
+
const color = colors.ui.reaction.default;
|
|
36
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
37
|
+
type: 'slide',
|
|
38
|
+
visible: Boolean(visible && channel && message),
|
|
39
|
+
onClose: onClose,
|
|
40
|
+
onDismiss: onDismiss,
|
|
41
|
+
backgroundStyle: styles.modal
|
|
42
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
43
|
+
style: [styles.container, {
|
|
44
|
+
width,
|
|
45
|
+
paddingBottom: bottom,
|
|
46
|
+
backgroundColor: colors.ui.dialog.default.none.background,
|
|
47
|
+
paddingLeft: left + styles.container.paddingHorizontal,
|
|
48
|
+
paddingRight: right + styles.container.paddingHorizontal
|
|
49
|
+
}]
|
|
50
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
51
|
+
data: emojiManager.allEmoji,
|
|
52
|
+
numColumns: NUM_COLUMN,
|
|
53
|
+
keyExtractor: item => item.key,
|
|
54
|
+
contentContainerStyle: styles.flatlist,
|
|
55
|
+
ItemSeparatorComponent: () => /*#__PURE__*/React.createElement(View, {
|
|
56
|
+
style: {
|
|
57
|
+
height: 16
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
renderItem: _ref2 => {
|
|
61
|
+
var _message$reactions, _message$reactions$fi;
|
|
62
|
+
|
|
63
|
+
let {
|
|
64
|
+
item: {
|
|
65
|
+
key,
|
|
66
|
+
url
|
|
67
|
+
}
|
|
68
|
+
} = _ref2;
|
|
69
|
+
const reactedUserIds = (message === null || message === void 0 ? void 0 : (_message$reactions = message.reactions) === null || _message$reactions === void 0 ? void 0 : (_message$reactions$fi = _message$reactions.find(it => it.key === key)) === null || _message$reactions$fi === void 0 ? void 0 : _message$reactions$fi.userIds) ?? [];
|
|
70
|
+
const idx = reactedUserIds.indexOf((currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId) ?? UNKNOWN_USER_ID);
|
|
71
|
+
const reacted = idx > -1;
|
|
72
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
73
|
+
style: styles.emojiItem
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
75
|
+
key: key,
|
|
76
|
+
onPress: () => {
|
|
77
|
+
if (message && channel) {
|
|
78
|
+
if (reacted) channel.deleteReaction(message, key);else channel.addReaction(message, key);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
onClose();
|
|
82
|
+
},
|
|
83
|
+
style: _ref3 => {
|
|
84
|
+
let {
|
|
85
|
+
pressed
|
|
86
|
+
} = _ref3;
|
|
87
|
+
return [styles.button, {
|
|
88
|
+
backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background
|
|
89
|
+
}];
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
92
|
+
source: {
|
|
93
|
+
uri: url
|
|
94
|
+
},
|
|
95
|
+
style: styles.emoji
|
|
96
|
+
})));
|
|
97
|
+
}
|
|
98
|
+
})));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const styles = createStyleSheet({
|
|
102
|
+
container: {
|
|
103
|
+
overflow: 'hidden',
|
|
104
|
+
borderTopLeftRadius: 8,
|
|
105
|
+
borderTopRightRadius: 8,
|
|
106
|
+
paddingTop: 16,
|
|
107
|
+
paddingHorizontal: 18,
|
|
108
|
+
flexDirection: 'row'
|
|
109
|
+
},
|
|
110
|
+
modal: {
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
justifyContent: 'flex-end'
|
|
113
|
+
},
|
|
114
|
+
flatlist: {
|
|
115
|
+
width: '100%',
|
|
116
|
+
flexDirection: 'column',
|
|
117
|
+
justifyContent: 'space-between'
|
|
118
|
+
},
|
|
119
|
+
emojiItem: {
|
|
120
|
+
width: `${100 / NUM_COLUMN}%`,
|
|
121
|
+
alignItems: 'center'
|
|
122
|
+
},
|
|
123
|
+
button: {
|
|
124
|
+
width: 44,
|
|
125
|
+
height: 44,
|
|
126
|
+
padding: 4,
|
|
127
|
+
borderRadius: 8
|
|
128
|
+
},
|
|
129
|
+
emoji: {
|
|
130
|
+
width: '100%',
|
|
131
|
+
height: '100%'
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
export default ReactionListBottomSheet;
|
|
135
|
+
//# sourceMappingURL=ReactionListBottomSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","FlatList","Pressable","View","useWindowDimensions","useSafeAreaInsets","Image","Modal","createStyleSheet","useUIKitTheme","UNKNOWN_USER_ID","NUM_COLUMN","ReactionListBottomSheet","visible","onClose","onDismiss","reactionCtx","chatCtx","width","bottom","left","right","colors","currentUser","emojiManager","channel","message","color","ui","reaction","default","Boolean","styles","modal","container","paddingBottom","backgroundColor","dialog","none","background","paddingLeft","paddingHorizontal","paddingRight","allEmoji","item","key","flatlist","height","url","reactedUserIds","reactions","find","it","userIds","idx","indexOf","userId","reacted","emojiItem","deleteReaction","addReaction","pressed","button","selected","enabled","uri","emoji","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","flexDirection","alignItems","justifyContent","padding","borderRadius"],"sources":["ReactionListBottomSheet.tsx"],"sourcesContent":["import React from 'react';\nimport { FlatList, Pressable, View, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport type { ReactionBottomSheetProps } from './index';\n\nconst NUM_COLUMN = 6;\nconst ReactionListBottomSheet = ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => {\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n\n const { currentUser, emojiManager } = chatCtx;\n const { channel, message } = reactionCtx;\n const color = colors.ui.reaction.default;\n\n return (\n <Modal\n type={'slide'}\n visible={Boolean(visible && channel && message)}\n onClose={onClose}\n onDismiss={onDismiss}\n backgroundStyle={styles.modal}\n >\n <View\n style={[\n styles.container,\n {\n width,\n paddingBottom: bottom,\n backgroundColor: colors.ui.dialog.default.none.background,\n paddingLeft: left + styles.container.paddingHorizontal,\n paddingRight: right + styles.container.paddingHorizontal,\n },\n ]}\n >\n <FlatList\n data={emojiManager.allEmoji}\n numColumns={NUM_COLUMN}\n keyExtractor={(item) => item.key}\n contentContainerStyle={styles.flatlist}\n ItemSeparatorComponent={() => <View style={{ height: 16 }} />}\n renderItem={({ item: { key, url } }) => {\n const reactedUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n\n const idx = reactedUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = idx > -1;\n\n return (\n <View style={styles.emojiItem}>\n <Pressable\n key={key}\n onPress={() => {\n if (message && channel) {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n }\n onClose();\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n </View>\n );\n }}\n />\n </View>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n paddingTop: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n },\n modal: {\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n flatlist: {\n width: '100%',\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n emojiItem: {\n width: `${100 / NUM_COLUMN}%`,\n alignItems: 'center',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default ReactionListBottomSheet;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,SAAnB,EAA8BC,IAA9B,EAAoCC,mBAApC,QAA+D,cAA/D;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SAASC,KAAT,EAAgBC,KAAhB,EAAuBC,gBAAvB,EAAyCC,aAAzC,QAA8D,yCAA9D;AAEA,SAASC,eAAT,QAAgC,iBAAhC;AAGA,MAAMC,UAAU,GAAG,CAAnB;;AACA,MAAMC,uBAAuB,GAAG,QAAqF;EAAA,IAApF;IAAEC,OAAF;IAAWC,OAAX;IAAoBC,SAApB;IAA+BC,WAA/B;IAA4CC;EAA5C,CAAoF;EACnH,MAAM;IAAEC;EAAF,IAAYd,mBAAmB,EAArC;EACA,MAAM;IAAEe,MAAF;IAAUC,IAAV;IAAgBC;EAAhB,IAA0BhB,iBAAiB,EAAjD;EACA,MAAM;IAAEiB;EAAF,IAAab,aAAa,EAAhC;EAE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,iBAAiB,EAAE,EALV;IAMT8B,aAAa,EAAE;EANN,CADmB;EAS9BtC,KAAK,EAAE;IACLuC,UAAU,EAAE,QADP;IAELC,cAAc,EAAE;EAFX,CATuB;EAa9B3B,QAAQ,EAAE;IACR5B,KAAK,EAAE,MADC;IAERqD,aAAa,EAAE,QAFP;IAGRE,cAAc,EAAE;EAHR,CAboB;EAkB9Bf,SAAS,EAAE;IACTxC,KAAK,EAAG,GAAE,MAAMP,UAAW,GADlB;IAET6D,UAAU,EAAE;EAFH,CAlBmB;EAsB9BV,MAAM,EAAE;IACN5C,KAAK,EAAE,EADD;IAEN6B,MAAM,EAAE,EAFF;IAGN2B,OAAO,EAAE,CAHH;IAINC,YAAY,EAAE;EAJR,CAtBsB;EA4B9BT,KAAK,EAAE;IACLhD,KAAK,EAAE,MADF;IAEL6B,MAAM,EAAE;EAFH;AA5BuB,CAAD,CAA/B;AAkCA,eAAenC,uBAAf"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Animated, Easing, Pressable, ScrollView, View, useWindowDimensions } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import { Avatar, Divider, Image, Modal, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
5
|
+
import { getReactionCount, truncatedCount } from '@sendbird/uikit-utils';
|
|
6
|
+
|
|
7
|
+
const ReactionUserListBottomSheet = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
visible,
|
|
10
|
+
onClose,
|
|
11
|
+
onDismiss,
|
|
12
|
+
reactionCtx,
|
|
13
|
+
chatCtx,
|
|
14
|
+
localizationCtx,
|
|
15
|
+
userProfileCtx
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
width
|
|
19
|
+
} = useWindowDimensions();
|
|
20
|
+
const {
|
|
21
|
+
bottom,
|
|
22
|
+
left,
|
|
23
|
+
right
|
|
24
|
+
} = useSafeAreaInsets();
|
|
25
|
+
const {
|
|
26
|
+
colors
|
|
27
|
+
} = useUIKitTheme();
|
|
28
|
+
const [tabIndex, setTabIndex] = useState(0);
|
|
29
|
+
const scrollRef = useRef();
|
|
30
|
+
const tabIndicatorValue = useRef([]);
|
|
31
|
+
const tabIndicatorAnimated = useRef({
|
|
32
|
+
x: new Animated.Value(0),
|
|
33
|
+
width: new Animated.Value(0)
|
|
34
|
+
}).current;
|
|
35
|
+
const focusedWithLayoutCalculated = useRef(false);
|
|
36
|
+
const {
|
|
37
|
+
emojiManager
|
|
38
|
+
} = chatCtx;
|
|
39
|
+
const {
|
|
40
|
+
channel,
|
|
41
|
+
message,
|
|
42
|
+
focusIndex
|
|
43
|
+
} = reactionCtx;
|
|
44
|
+
const {
|
|
45
|
+
STRINGS
|
|
46
|
+
} = localizationCtx;
|
|
47
|
+
const color = colors.ui.reaction.default;
|
|
48
|
+
const reactions = (message === null || message === void 0 ? void 0 : message.reactions) ?? [];
|
|
49
|
+
const focusedReaction = reactions[tabIndex];
|
|
50
|
+
const containerSafeArea = {
|
|
51
|
+
paddingLeft: left + styles.layout.paddingHorizontal,
|
|
52
|
+
paddingRight: right + styles.layout.paddingHorizontal
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const focusTab = function (index) {
|
|
56
|
+
let animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
57
|
+
const indicatorValue = tabIndicatorValue.current[index];
|
|
58
|
+
|
|
59
|
+
if (indicatorValue) {
|
|
60
|
+
var _scrollRef$current;
|
|
61
|
+
|
|
62
|
+
setTabIndex(index);
|
|
63
|
+
animateTabIndicator(indicatorValue.x, indicatorValue.width, animated);
|
|
64
|
+
(_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollTo({
|
|
65
|
+
x: indicatorValue.x,
|
|
66
|
+
animated
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const animateTabIndicator = function (x, width) {
|
|
72
|
+
let animated = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
73
|
+
const baseConfig = {
|
|
74
|
+
duration: animated ? 300 : 0,
|
|
75
|
+
easing: Easing.inOut(Easing.ease),
|
|
76
|
+
useNativeDriver: false
|
|
77
|
+
};
|
|
78
|
+
Animated.parallel([Animated.timing(tabIndicatorAnimated.x, {
|
|
79
|
+
toValue: x,
|
|
80
|
+
...baseConfig
|
|
81
|
+
}), Animated.timing(tabIndicatorAnimated.width, {
|
|
82
|
+
toValue: width,
|
|
83
|
+
...baseConfig
|
|
84
|
+
})]).start();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const layoutCalculated = () => {
|
|
88
|
+
return tabIndicatorValue.current.length === reactions.length && tabIndicatorValue.current.every(Boolean);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (!visible) {
|
|
93
|
+
tabIndicatorValue.current = [];
|
|
94
|
+
tabIndicatorAnimated.x = new Animated.Value(0);
|
|
95
|
+
tabIndicatorAnimated.width = new Animated.Value(0);
|
|
96
|
+
focusedWithLayoutCalculated.current = false;
|
|
97
|
+
}
|
|
98
|
+
}, [visible]);
|
|
99
|
+
|
|
100
|
+
const renderTabs = () => {
|
|
101
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
102
|
+
style: styles.tabsWrapper
|
|
103
|
+
}, reactions.map((reaction, index) => {
|
|
104
|
+
const isFocused = (focusedReaction === null || focusedReaction === void 0 ? void 0 : focusedReaction.key) === reaction.key;
|
|
105
|
+
const isLastItem = reactions.length - 1 === index;
|
|
106
|
+
const emoji = emojiManager.allEmojiMap[reaction.key];
|
|
107
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
108
|
+
key: reaction.key,
|
|
109
|
+
style: [styles.tabItem, isLastItem && {
|
|
110
|
+
marginRight: styles.layout.marginRight
|
|
111
|
+
}],
|
|
112
|
+
onPress: () => focusTab(index),
|
|
113
|
+
onLayout: e => {
|
|
114
|
+
tabIndicatorValue.current[index] = e.nativeEvent.layout;
|
|
115
|
+
|
|
116
|
+
if (layoutCalculated()) {
|
|
117
|
+
if (focusedWithLayoutCalculated.current) {
|
|
118
|
+
focusTab(tabIndex, false);
|
|
119
|
+
} else {
|
|
120
|
+
focusedWithLayoutCalculated.current = true;
|
|
121
|
+
focusTab(focusIndex);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
126
|
+
source: {
|
|
127
|
+
uri: emoji.url
|
|
128
|
+
},
|
|
129
|
+
style: styles.tabEmoji
|
|
130
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
131
|
+
button: true,
|
|
132
|
+
color: isFocused ? color.selected.highlight : color.enabled.highlight
|
|
133
|
+
}, truncatedCount(getReactionCount(reaction))));
|
|
134
|
+
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
135
|
+
style: [styles.tabIndicator, {
|
|
136
|
+
left: tabIndicatorAnimated.x,
|
|
137
|
+
width: tabIndicatorAnimated.width,
|
|
138
|
+
backgroundColor: color.selected.highlight
|
|
139
|
+
}]
|
|
140
|
+
}));
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const renderPage = () => {
|
|
144
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, focusedReaction === null || focusedReaction === void 0 ? void 0 : focusedReaction.userIds.map(userId => {
|
|
145
|
+
if (channel !== null && channel !== void 0 && channel.isGroupChannel()) {
|
|
146
|
+
const user = channel.members.find(x => x.userId === userId);
|
|
147
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
148
|
+
key: userId,
|
|
149
|
+
onPress: async () => {
|
|
150
|
+
if (user) {
|
|
151
|
+
await onClose();
|
|
152
|
+
userProfileCtx.show(user);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
style: styles.pageItem
|
|
156
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
157
|
+
size: 36,
|
|
158
|
+
uri: user === null || user === void 0 ? void 0 : user.profileUrl,
|
|
159
|
+
containerStyle: styles.avatar
|
|
160
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
161
|
+
subtitle2: true,
|
|
162
|
+
style: {
|
|
163
|
+
flex: 1
|
|
164
|
+
}
|
|
165
|
+
}, (user === null || user === void 0 ? void 0 : user.nickname) || STRINGS.LABELS.USER_NO_NAME));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return null;
|
|
169
|
+
}));
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
173
|
+
type: 'slide-no-gesture',
|
|
174
|
+
visible: Boolean(visible && channel && message),
|
|
175
|
+
onClose: onClose,
|
|
176
|
+
onDismiss: onDismiss,
|
|
177
|
+
backgroundStyle: styles.modal
|
|
178
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
179
|
+
style: [styles.container, {
|
|
180
|
+
width,
|
|
181
|
+
paddingBottom: bottom,
|
|
182
|
+
backgroundColor: colors.ui.dialog.default.none.background
|
|
183
|
+
}]
|
|
184
|
+
}, /*#__PURE__*/React.createElement(ScrollView, {
|
|
185
|
+
ref: scrollRef,
|
|
186
|
+
horizontal: true,
|
|
187
|
+
bounces: false,
|
|
188
|
+
showsHorizontalScrollIndicator: false,
|
|
189
|
+
contentContainerStyle: [containerSafeArea, styles.tabsContainer]
|
|
190
|
+
}, renderTabs()), /*#__PURE__*/React.createElement(Divider, {
|
|
191
|
+
style: {
|
|
192
|
+
top: -1
|
|
193
|
+
}
|
|
194
|
+
}), /*#__PURE__*/React.createElement(ScrollView, {
|
|
195
|
+
bounces: false,
|
|
196
|
+
showsVerticalScrollIndicator: false,
|
|
197
|
+
style: styles.pageContainer,
|
|
198
|
+
contentContainerStyle: containerSafeArea
|
|
199
|
+
}, renderPage())));
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const styles = createStyleSheet({
|
|
203
|
+
layout: {
|
|
204
|
+
paddingHorizontal: 16,
|
|
205
|
+
marginRight: 0
|
|
206
|
+
},
|
|
207
|
+
container: {
|
|
208
|
+
overflow: 'hidden',
|
|
209
|
+
borderTopLeftRadius: 8,
|
|
210
|
+
borderTopRightRadius: 8,
|
|
211
|
+
paddingTop: 16,
|
|
212
|
+
alignItems: 'center'
|
|
213
|
+
},
|
|
214
|
+
modal: {
|
|
215
|
+
alignItems: 'center',
|
|
216
|
+
justifyContent: 'flex-end'
|
|
217
|
+
},
|
|
218
|
+
tabsContainer: {
|
|
219
|
+
flexGrow: 1
|
|
220
|
+
},
|
|
221
|
+
tabsWrapper: {
|
|
222
|
+
flexGrow: 1,
|
|
223
|
+
flexDirection: 'row',
|
|
224
|
+
alignItems: 'flex-start',
|
|
225
|
+
justifyContent: 'center',
|
|
226
|
+
height: 44
|
|
227
|
+
},
|
|
228
|
+
tabItem: {
|
|
229
|
+
marginRight: 16,
|
|
230
|
+
flexDirection: 'row',
|
|
231
|
+
alignItems: 'center',
|
|
232
|
+
justifyContent: 'center'
|
|
233
|
+
},
|
|
234
|
+
tabEmoji: {
|
|
235
|
+
width: 28,
|
|
236
|
+
height: 28,
|
|
237
|
+
marginRight: 4
|
|
238
|
+
},
|
|
239
|
+
tabIndicator: {
|
|
240
|
+
position: 'absolute',
|
|
241
|
+
bottom: 0,
|
|
242
|
+
height: 3
|
|
243
|
+
},
|
|
244
|
+
pageContainer: {
|
|
245
|
+
height: 216,
|
|
246
|
+
width: '100%'
|
|
247
|
+
},
|
|
248
|
+
pageItem: {
|
|
249
|
+
flexDirection: 'row',
|
|
250
|
+
width: '100%',
|
|
251
|
+
height: 48,
|
|
252
|
+
alignItems: 'center'
|
|
253
|
+
},
|
|
254
|
+
avatar: {
|
|
255
|
+
marginRight: 16
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
export default ReactionUserListBottomSheet;
|
|
259
|
+
//# sourceMappingURL=ReactionUserListBottomSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","Animated","Easing","Pressable","ScrollView","View","useWindowDimensions","useSafeAreaInsets","Avatar","Divider","Image","Modal","Text","createStyleSheet","useUIKitTheme","getReactionCount","truncatedCount","ReactionUserListBottomSheet","visible","onClose","onDismiss","reactionCtx","chatCtx","localizationCtx","userProfileCtx","width","bottom","left","right","colors","tabIndex","setTabIndex","scrollRef","tabIndicatorValue","tabIndicatorAnimated","x","Value","current","focusedWithLayoutCalculated","emojiManager","channel","message","focusIndex","STRINGS","color","ui","reaction","default","reactions","focusedReaction","containerSafeArea","paddingLeft","styles","layout","paddingHorizontal","paddingRight","focusTab","index","animated","indicatorValue","animateTabIndicator","scrollTo","baseConfig","duration","easing","inOut","ease","useNativeDriver","parallel","timing","toValue","start","layoutCalculated","length","every","Boolean","renderTabs","tabsWrapper","map","isFocused","key","isLastItem","emoji","allEmojiMap","tabItem","marginRight","e","nativeEvent","uri","url","tabEmoji","selected","highlight","enabled","tabIndicator","backgroundColor","renderPage","userIds","userId","isGroupChannel","user","members","find","show","pageItem","profileUrl","avatar","flex","nickname","LABELS","USER_NO_NAME","modal","container","paddingBottom","dialog","none","background","tabsContainer","top","pageContainer","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","alignItems","justifyContent","flexGrow","flexDirection","height","position"],"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,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,MAA3B,EAAmCC,QAAnC,QAAmD,OAAnD;AACA,SAASC,QAAT,EAAmBC,MAAnB,EAA2BC,SAA3B,EAAsCC,UAAtC,EAAkDC,IAAlD,EAAwDC,mBAAxD,QAAmF,cAAnF;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SACEC,MADF,EAEEC,OAFF,EAGEC,KAHF,EAIEC,KAJF,EAKEC,IALF,EAMEC,gBANF,EAOEC,aAPF,QAQO,yCARP;AASA,SAA2BC,gBAA3B,EAA6CC,cAA7C,QAAmE,uBAAnE;;AAIA,MAAMC,2BAA2B,GAAG,QAQJ;EAA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,UADE;IAEZvG,MAAM,EAAE,CAFI;IAGZsG,MAAM,EAAE;EAHI,CArCgB;EA0C9BT,aAAa,EAAE;IACbS,MAAM,EAAE,GADK;IAEbvG,KAAK,EAAE;EAFM,CA1Ce;EA8C9B+E,QAAQ,EAAE;IACRuB,aAAa,EAAE,KADP;IAERtG,KAAK,EAAE,MAFC;IAGRuG,MAAM,EAAE,EAHA;IAIRJ,UAAU,EAAE;EAJJ,CA9CoB;EAoD9BlB,MAAM,EAAE;IACNrB,WAAW,EAAE;EADP;AApDsB,CAAD,CAA/B;AAyDA,eAAepE,2BAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ReactionList","UserList","ReactionBottomSheets"],"sources":["index.tsx"],"sourcesContent":["import type React from 'react';\n\nimport type { LocalizationContext } from '../../contexts/LocalizationCtx';\nimport type { ReactionContext } from '../../contexts/ReactionCtx';\nimport type { SendbirdChatContext } from '../../contexts/SendbirdChatCtx';\nimport type { UserProfileContext } from '../../contexts/UserProfileCtx';\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 chatCtx: GetFromContext<typeof SendbirdChatContext>;\n reactionCtx: GetFromContext<typeof ReactionContext>;\n localizationCtx: GetFromContext<typeof LocalizationContext>;\n userProfileCtx: GetFromContext<typeof UserProfileContext>;\n};\n\nexport const ReactionBottomSheets = {\n ReactionList,\n UserList,\n};\n"],"mappings":"AAMA,OAAOA,YAAP,MAAyB,2BAAzB;AACA,OAAOC,QAAP,MAAqB,+BAArB;AAaA,OAAO,MAAMC,oBAAoB,GAAG;EAClCF,YADkC;EAElCC;AAFkC,CAA7B"}
|
package/lib/module/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_LONG_PRESS_DELAY","DEPRECATION_WARNING","GROUP_CHANNEL","ON_PRESS_IMAGE_MESSAGE"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_LONG_PRESS_DELAY = 350;\nexport const DEPRECATION_WARNING = {\n GROUP_CHANNEL: {\n ON_PRESS_IMAGE_MESSAGE: '`onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead',\n },\n} as const;\n"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,GAAjC;AACP,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,aAAa,EAAE;IACbC,sBAAsB,EAAE;EADX;AADkB,CAA5B"}
|
|
1
|
+
{"version":3,"names":["DEFAULT_LONG_PRESS_DELAY","DEPRECATION_WARNING","GROUP_CHANNEL","ON_PRESS_IMAGE_MESSAGE","UNKNOWN_USER_ID"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_LONG_PRESS_DELAY = 350;\nexport const DEPRECATION_WARNING = {\n GROUP_CHANNEL: {\n ON_PRESS_IMAGE_MESSAGE: '`onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead',\n },\n} as const;\n\nexport const UNKNOWN_USER_ID = '##__USER_ID_IS_NOT_PROVIDED__##';\n"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,GAAjC;AACP,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,aAAa,EAAE;IACbC,sBAAsB,EAAE;EADX;AADkB,CAA5B;AAMP,OAAO,MAAMC,eAAe,GAAG,iCAAxB"}
|
|
@@ -22,7 +22,8 @@ const GroupChannelPreviewContainer = _ref => {
|
|
|
22
22
|
const {
|
|
23
23
|
currentUser,
|
|
24
24
|
sdk,
|
|
25
|
-
features
|
|
25
|
+
features,
|
|
26
|
+
mentionManager
|
|
26
27
|
} = useSendbirdChat();
|
|
27
28
|
const {
|
|
28
29
|
STRINGS
|
|
@@ -120,6 +121,8 @@ const GroupChannelPreviewContainer = _ref => {
|
|
|
120
121
|
body: bodyText,
|
|
121
122
|
bodyIcon: bodyIcon,
|
|
122
123
|
badgeCount: channel.unreadMessageCount,
|
|
124
|
+
mentioned: channel.unreadMentionCount > 0,
|
|
125
|
+
mentionTrigger: mentionManager.config.trigger,
|
|
123
126
|
memberCount: channel.memberCount > 2 ? channel.memberCount : undefined,
|
|
124
127
|
frozen: channel.isFrozen,
|
|
125
128
|
broadcast: channel.isBroadcast,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Pressable","useChannelHandler","useMessageOutgoingStatus","GroupChannelPreview","Icon","LoadingSpinner","createStyleSheet","useUIKitTheme","getFileExtension","getFileType","isDifferentChannel","isMyMessage","useIIFE","useUniqId","ChannelCover","DEFAULT_LONG_PRESS_DELAY","useLocalization","useSendbirdChat","iconMapper","audio","image","video","file","GroupChannelPreviewContainer","onPress","onLongPress","channel","currentUser","sdk","features","STRINGS","colors","typingUsers","setTypingUsers","channelListTypingIndicatorEnabled","typingId","onTypingStatusUpdated","eventChannel","getTypingUsers","outgoingStatus","lastMessage","bodyText","length","LABELS","TYPING_INDICATOR_TYPINGS","GROUP_CHANNEL_LIST","CHANNEL_PREVIEW_BODY","bodyIcon","isFileMessage","undefined","type","name","titleCaptionIcon","channelListMessageReceiptStatusEnabled","userId","styles","error","onBackground03","secondary","coverUrl","CHANNEL_PREVIEW_TITLE","CHANNEL_PREVIEW_TITLE_CAPTION","unreadMessageCount","memberCount","isFrozen","isBroadcast","myPushTriggerOption","marginRight","broadcastCover","padding","borderRadius"],"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 getFileExtension,\n getFileType,\n isDifferentChannel,\n isMyMessage,\n useIIFE,\n useUniqId,\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\nconst iconMapper = { audio: 'file-audio', image: 'photo', video: 'play', file: 'file-document' } as const;\n\ntype Props = {\n channel: SendbirdGroupChannel;\n onPress: () => void;\n onLongPress: () => void;\n};\nconst GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props) => {\n const { currentUser, sdk, features } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n\n const [typingUsers, setTypingUsers] = useState<SendbirdUser[]>([]);\n\n if (features.channelListTypingIndicatorEnabled) {\n const typingId = useUniqId('GroupChannelPreviewContainer');\n useChannelHandler(sdk, `GroupChannelPreviewContainer_TypingIndicator_${typingId}`, {\n onTypingStatusUpdated(eventChannel) {\n if (isDifferentChannel(channel, eventChannel)) return;\n setTypingUsers(eventChannel.getTypingUsers());\n },\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 bodyIcon = useIIFE(() => {\n if (!channel.lastMessage?.isFileMessage()) return undefined;\n if (typingUsers.length > 0) return undefined;\n return iconMapper[getFileType(channel.lastMessage.type || getFileExtension(channel.lastMessage.name))];\n });\n\n const titleCaptionIcon = useIIFE(() => {\n if (!channel.lastMessage) return undefined;\n if (!features.channelListMessageReceiptStatusEnabled) 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 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={bodyIcon}\n badgeCount={channel.unreadMessageCount}\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,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,SAAT,QAA0B,cAA1B;AAEA,SAASC,iBAAT,EAA4BC,wBAA5B,QAA4D,4BAA5D;AACA,SACEC,mBADF,EAEEC,IAFF,EAGEC,cAHF,EAIEC,gBAJF,EAKEC,aALF,QAMO,yCANP;AAOA,SAGEC,gBAHF,EAIEC,WAJF,EAKEC,kBALF,EAMEC,WANF,EAOEC,OAPF,EAQEC,SARF,QASO,uBATP;AAWA,OAAOC,YAAP,MAAyB,4BAAzB;AACA,SAASC,wBAAT,QAAyC,cAAzC;AACA,SAASC,eAAT,EAA0BC,eAA1B,QAAiD,qBAAjD;AAEA,MAAMC,UAAU,GAAG;EAAEC,KAAK,EAAE,YAAT;EAAuBC,KAAK,EAAE,OAA9B;EAAuCC,KAAK,EAAE,MAA9C;EAAsDC,IAAI,EAAE;AAA5D,CAAnB;;AAOA,MAAMC,4BAA4B,GAAG,QAA8C;EAAA,IAA7C;IAAEC,OAAF;IAAWC,WAAX;IAAwBC;EAAxB,CAA6C;EACjF,MAAM;IAAEC,WAAF;IAAeC,GAAf;IAAoBC;
|
|
1
|
+
{"version":3,"names":["React","useState","Pressable","useChannelHandler","useMessageOutgoingStatus","GroupChannelPreview","Icon","LoadingSpinner","createStyleSheet","useUIKitTheme","getFileExtension","getFileType","isDifferentChannel","isMyMessage","useIIFE","useUniqId","ChannelCover","DEFAULT_LONG_PRESS_DELAY","useLocalization","useSendbirdChat","iconMapper","audio","image","video","file","GroupChannelPreviewContainer","onPress","onLongPress","channel","currentUser","sdk","features","mentionManager","STRINGS","colors","typingUsers","setTypingUsers","channelListTypingIndicatorEnabled","typingId","onTypingStatusUpdated","eventChannel","getTypingUsers","outgoingStatus","lastMessage","bodyText","length","LABELS","TYPING_INDICATOR_TYPINGS","GROUP_CHANNEL_LIST","CHANNEL_PREVIEW_BODY","bodyIcon","isFileMessage","undefined","type","name","titleCaptionIcon","channelListMessageReceiptStatusEnabled","userId","styles","error","onBackground03","secondary","coverUrl","CHANNEL_PREVIEW_TITLE","CHANNEL_PREVIEW_TITLE_CAPTION","unreadMessageCount","unreadMentionCount","config","trigger","memberCount","isFrozen","isBroadcast","myPushTriggerOption","marginRight","broadcastCover","padding","borderRadius"],"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 getFileExtension,\n getFileType,\n isDifferentChannel,\n isMyMessage,\n useIIFE,\n useUniqId,\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\nconst iconMapper = { audio: 'file-audio', image: 'photo', video: 'play', file: 'file-document' } as const;\n\ntype Props = {\n channel: SendbirdGroupChannel;\n onPress: () => void;\n onLongPress: () => void;\n};\nconst GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props) => {\n const { currentUser, sdk, features, mentionManager } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n\n const [typingUsers, setTypingUsers] = useState<SendbirdUser[]>([]);\n\n if (features.channelListTypingIndicatorEnabled) {\n const typingId = useUniqId('GroupChannelPreviewContainer');\n useChannelHandler(sdk, `GroupChannelPreviewContainer_TypingIndicator_${typingId}`, {\n onTypingStatusUpdated(eventChannel) {\n if (isDifferentChannel(channel, eventChannel)) return;\n setTypingUsers(eventChannel.getTypingUsers());\n },\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 bodyIcon = useIIFE(() => {\n if (!channel.lastMessage?.isFileMessage()) return undefined;\n if (typingUsers.length > 0) return undefined;\n return iconMapper[getFileType(channel.lastMessage.type || getFileExtension(channel.lastMessage.name))];\n });\n\n const titleCaptionIcon = useIIFE(() => {\n if (!channel.lastMessage) return undefined;\n if (!features.channelListMessageReceiptStatusEnabled) 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 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={bodyIcon}\n badgeCount={channel.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,OAAOA,KAAP,IAAgBC,QA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