@sendbird/uikit-react-native 2.1.0 → 2.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/lib/commonjs/components/ChatFlatList.js +2 -1
- package/lib/commonjs/components/ChatFlatList.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 +25 -10
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.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 +99 -14
- 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 +118 -78
- package/lib/commonjs/containers/SendbirdUIKitContainer.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 +18 -6
- 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 +28 -11
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js +120 -31
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +31 -12
- 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 +9 -14
- 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/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 +93 -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/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/localization/StringSet.type.js +17 -5
- package/lib/commonjs/localization/StringSet.type.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/common.js +19 -0
- package/lib/commonjs/utils/common.js.map +1 -0
- 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/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 +25 -10
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.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 +101 -17
- 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 +116 -80
- package/lib/module/containers/SendbirdUIKitContainer.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 +18 -6
- 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 +24 -13
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js +117 -33
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +32 -14
- 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 +10 -15
- 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/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 +75 -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/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/localization/StringSet.type.js +18 -6
- package/lib/module/localization/StringSet.type.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/common.js +7 -0
- package/lib/module/utils/common.js.map +1 -0
- 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 +12 -3
- package/lib/typescript/src/contexts/LocalizationCtx.d.ts +2 -2
- package/lib/typescript/src/contexts/PlatformServiceCtx.d.ts +1 -1
- package/lib/typescript/src/contexts/ReactionCtx.d.ts +18 -0
- package/lib/typescript/src/contexts/SendbirdChatCtx.d.ts +10 -2
- 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 +4 -0
- 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 +7 -2
- package/lib/typescript/src/libs/EmojiManager.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/localization/StringSet.type.d.ts +16 -2
- package/lib/typescript/src/platform/createMediaService.expo.d.ts +1 -1
- package/lib/typescript/src/platform/createMediaService.native.d.ts +1 -1
- package/lib/typescript/src/platform/dynamicModule.d.ts +1 -1
- package/lib/typescript/src/platform/types.d.ts +5 -5
- package/lib/typescript/src/types.d.ts +13 -4
- package/lib/typescript/src/utils/common.d.ts +1 -0
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +6 -6
- package/src/components/ChatFlatList.tsx +2 -1
- package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +17 -12
- package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +25 -18
- package/src/components/MessageRenderer/FileMessage/VideoFileMessage.tsx +20 -10
- package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +82 -14
- package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +135 -61
- 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 +141 -83
- package/src/contexts/ReactionCtx.tsx +102 -0
- package/src/contexts/SendbirdChatCtx.tsx +24 -2
- 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 +48 -19
- package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +137 -43
- package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +27 -10
- 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 +9 -12
- 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/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 +54 -0
- package/src/hooks/useMentionSuggestion.ts +106 -0
- package/src/hooks/useMentionTextInput.ts +139 -0
- package/src/index.ts +13 -2
- package/src/libs/EmojiManager.ts +80 -0
- package/src/libs/MentionConfig.ts +40 -0
- package/src/libs/MentionManager.tsx +240 -0
- package/src/localization/StringSet.type.ts +38 -8
- package/src/types.ts +12 -0
- package/src/utils/common.ts +8 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
13
|
+
|
|
14
|
+
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
15
|
+
|
|
16
|
+
const configureNextLayoutAnimation = event => {
|
|
17
|
+
const config = _reactNative.LayoutAnimation.create(event.duration, event.easing);
|
|
18
|
+
|
|
19
|
+
_reactNative.LayoutAnimation.configureNext(config);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
showEvent,
|
|
24
|
+
hideEvent
|
|
25
|
+
} = _reactNative.Platform.select({
|
|
26
|
+
android: {
|
|
27
|
+
showEvent: 'keyboardDidShow',
|
|
28
|
+
hideEvent: 'keyboardDidHide'
|
|
29
|
+
},
|
|
30
|
+
default: {
|
|
31
|
+
showEvent: 'keyboardWillShow',
|
|
32
|
+
hideEvent: 'keyboardWillHide'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const useKeyboardStatus = () => {
|
|
37
|
+
const [keyboardStatus, setKeyboardStatus] = (0, _react.useState)({
|
|
38
|
+
visible: false,
|
|
39
|
+
height: 0,
|
|
40
|
+
bottomSpace: 0
|
|
41
|
+
});
|
|
42
|
+
const {
|
|
43
|
+
bottom: bottomInset
|
|
44
|
+
} = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
46
|
+
const subscriptions = [_reactNative.Keyboard.addListener(showEvent, event => {
|
|
47
|
+
const height = event.endCoordinates.height;
|
|
48
|
+
|
|
49
|
+
const bottomSpace = _reactNative.Platform.select({
|
|
50
|
+
ios: height - bottomInset,
|
|
51
|
+
default: 0
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const nextLayoutAnimation = _reactNative.Platform.select({
|
|
55
|
+
ios: configureNextLayoutAnimation,
|
|
56
|
+
default: _uikitUtils.NOOP
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
nextLayoutAnimation(event);
|
|
60
|
+
setKeyboardStatus({
|
|
61
|
+
visible: true,
|
|
62
|
+
height,
|
|
63
|
+
bottomSpace
|
|
64
|
+
});
|
|
65
|
+
}), _reactNative.Keyboard.addListener(hideEvent, event => {
|
|
66
|
+
const height = 0;
|
|
67
|
+
|
|
68
|
+
const bottomSpace = _reactNative.Platform.select({
|
|
69
|
+
default: height
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const nextLayoutAnimation = _reactNative.Platform.select({
|
|
73
|
+
ios: configureNextLayoutAnimation,
|
|
74
|
+
default: _uikitUtils.NOOP
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
nextLayoutAnimation(event);
|
|
78
|
+
setKeyboardStatus({
|
|
79
|
+
visible: false,
|
|
80
|
+
height,
|
|
81
|
+
bottomSpace
|
|
82
|
+
});
|
|
83
|
+
})];
|
|
84
|
+
return () => {
|
|
85
|
+
subscriptions.forEach(it => it.remove());
|
|
86
|
+
};
|
|
87
|
+
}, []);
|
|
88
|
+
return keyboardStatus;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var _default = useKeyboardStatus;
|
|
92
|
+
exports.default = _default;
|
|
93
|
+
//# sourceMappingURL=useKeyboardStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["configureNextLayoutAnimation","event","config","LayoutAnimation","create","duration","easing","configureNext","showEvent","hideEvent","Platform","select","android","default","useKeyboardStatus","keyboardStatus","setKeyboardStatus","useState","visible","height","bottomSpace","bottom","bottomInset","useSafeAreaInsets","useEffect","subscriptions","Keyboard","addListener","endCoordinates","ios","nextLayoutAnimation","NOOP","forEach","it","remove"],"sources":["useKeyboardStatus.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { Keyboard, KeyboardEvent, KeyboardEventName, LayoutAnimation, Platform } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { NOOP } from '@sendbird/uikit-utils';\n\ntype KeyboardEvents = {\n showEvent: KeyboardEventName;\n hideEvent: KeyboardEventName;\n};\n\nconst configureNextLayoutAnimation = (event: KeyboardEvent) => {\n const config = LayoutAnimation.create(event.duration, event.easing);\n LayoutAnimation.configureNext(config);\n};\n\nconst { showEvent, hideEvent } = Platform.select<KeyboardEvents>({\n android: { showEvent: 'keyboardDidShow', hideEvent: 'keyboardDidHide' },\n default: { showEvent: 'keyboardWillShow', hideEvent: 'keyboardWillHide' },\n});\n\nconst useKeyboardStatus = () => {\n const [keyboardStatus, setKeyboardStatus] = useState({ visible: false, height: 0, bottomSpace: 0 });\n const { bottom: bottomInset } = useSafeAreaInsets();\n\n useEffect(() => {\n const subscriptions = [\n Keyboard.addListener(showEvent, (event) => {\n const height = event.endCoordinates.height;\n const bottomSpace = Platform.select({ ios: height - bottomInset, default: 0 });\n const nextLayoutAnimation = Platform.select({ ios: configureNextLayoutAnimation, default: NOOP });\n\n nextLayoutAnimation(event);\n setKeyboardStatus({ visible: true, height, bottomSpace });\n }),\n\n Keyboard.addListener(hideEvent, (event) => {\n const height = 0;\n const bottomSpace = Platform.select({ default: height });\n const nextLayoutAnimation = Platform.select({ ios: configureNextLayoutAnimation, default: NOOP });\n\n nextLayoutAnimation(event);\n setKeyboardStatus({ visible: false, height, bottomSpace });\n }),\n ];\n return () => {\n subscriptions.forEach((it) => it.remove());\n };\n }, []);\n\n return keyboardStatus;\n};\n\nexport default useKeyboardStatus;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAOA,MAAMA,4BAA4B,GAAIC,KAAD,IAA0B;EAC7D,MAAMC,MAAM,GAAGC,4BAAA,CAAgBC,MAAhB,CAAuBH,KAAK,CAACI,QAA7B,EAAuCJ,KAAK,CAACK,MAA7C,CAAf;;EACAH,4BAAA,CAAgBI,aAAhB,CAA8BL,MAA9B;AACD,CAHD;;AAKA,MAAM;EAAEM,SAAF;EAAaC;AAAb,IAA2BC,qBAAA,CAASC,MAAT,CAAgC;EAC/DC,OAAO,EAAE;IAAEJ,SAAS,EAAE,iBAAb;IAAgCC,SAAS,EAAE;EAA3C,CADsD;EAE/DI,OAAO,EAAE;IAAEL,SAAS,EAAE,kBAAb;IAAiCC,SAAS,EAAE;EAA5C;AAFsD,CAAhC,CAAjC;;AAKA,MAAMK,iBAAiB,GAAG,MAAM;EAC9B,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsC,IAAAC,eAAA,EAAS;IAAEC,OAAO,EAAE,KAAX;IAAkBC,MAAM,EAAE,CAA1B;IAA6BC,WAAW,EAAE;EAA1C,CAAT,CAA5C;EACA,MAAM;IAAEC,MAAM,EAAEC;EAAV,IAA0B,IAAAC,6CAAA,GAAhC;EAEA,IAAAC,gBAAA,EAAU,MAAM;IACd,MAAMC,aAAa,GAAG,CACpBC,qBAAA,CAASC,WAAT,CAAqBnB,SAArB,EAAiCP,KAAD,IAAW;MACzC,MAA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
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
11
|
+
|
|
12
|
+
var _useContext = require("../hooks/useContext");
|
|
13
|
+
|
|
14
|
+
const useMentionSuggestion = params => {
|
|
15
|
+
const {
|
|
16
|
+
text,
|
|
17
|
+
selection,
|
|
18
|
+
channel,
|
|
19
|
+
mentionedUsers
|
|
20
|
+
} = params;
|
|
21
|
+
const [freshChannel, setFreshChannel] = (0, _react.useState)(channel);
|
|
22
|
+
(0, _uikitUtils.useAsyncEffect)(async () => {
|
|
23
|
+
setFreshChannel(await channel.refresh());
|
|
24
|
+
}, [channel.url]);
|
|
25
|
+
const {
|
|
26
|
+
mentionManager,
|
|
27
|
+
currentUser
|
|
28
|
+
} = (0, _useContext.useSendbirdChat)();
|
|
29
|
+
const [members, setMembers] = (0, _react.useState)([]);
|
|
30
|
+
const timeoutRef = (0, _react.useRef)();
|
|
31
|
+
const searchStringRangeRef = (0, _react.useRef)({
|
|
32
|
+
start: 0,
|
|
33
|
+
end: 0
|
|
34
|
+
});
|
|
35
|
+
const searchLimitedRef = (0, _react.useRef)(false);
|
|
36
|
+
|
|
37
|
+
const updateSearchStringRange = (selectionIndex, searchString) => {
|
|
38
|
+
searchStringRangeRef.current = mentionManager.getSearchStringRangeInText(selectionIndex, searchString);
|
|
39
|
+
return searchStringRangeRef.current;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const updateSearchLimited = (mentionCount, mentionLimit) => {
|
|
43
|
+
searchLimitedRef.current = mentionCount >= mentionLimit;
|
|
44
|
+
return searchLimitedRef.current;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const resetRefs = () => {
|
|
48
|
+
searchLimitedRef.current = false;
|
|
49
|
+
searchStringRangeRef.current = {
|
|
50
|
+
start: 0,
|
|
51
|
+
end: 0
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const fetchMembers = async () => {
|
|
56
|
+
resetRefs();
|
|
57
|
+
const selectionRanged = selection.start !== selection.end;
|
|
58
|
+
if (selectionRanged) return [];
|
|
59
|
+
const selectionContainsMentionedUser = mentionedUsers.some(it => mentionManager.rangeHelpers.overlaps(it.range, selection, 'underMore'));
|
|
60
|
+
if (selectionContainsMentionedUser) return [];
|
|
61
|
+
const {
|
|
62
|
+
isTriggered,
|
|
63
|
+
isValidSearchString,
|
|
64
|
+
searchString
|
|
65
|
+
} = mentionManager.getSearchString(text, selection.start);
|
|
66
|
+
if (!isTriggered() || !isValidSearchString()) return [];
|
|
67
|
+
const limited = updateSearchLimited(mentionedUsers.length, mentionManager.config.mentionLimit);
|
|
68
|
+
if (limited) return [];
|
|
69
|
+
updateSearchStringRange(selection.start, searchString);
|
|
70
|
+
|
|
71
|
+
if (freshChannel.isSuper) {
|
|
72
|
+
return freshChannel.createMemberListQuery({
|
|
73
|
+
nicknameStartsWithFilter: searchString,
|
|
74
|
+
limit: mentionManager.config.suggestionLimit + 1
|
|
75
|
+
}).next().then(members => members.filter(member => member.userId !== (currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId)));
|
|
76
|
+
} else {
|
|
77
|
+
return freshChannel.members.sort((a, b) => {
|
|
78
|
+
var _a$nickname;
|
|
79
|
+
|
|
80
|
+
return (_a$nickname = a.nickname) === null || _a$nickname === void 0 ? void 0 : _a$nickname.localeCompare(b.nickname);
|
|
81
|
+
}).filter(member => {
|
|
82
|
+
var _member$nickname;
|
|
83
|
+
|
|
84
|
+
return ((_member$nickname = member.nickname) === null || _member$nickname === void 0 ? void 0 : _member$nickname.toLowerCase().startsWith(searchString.toLowerCase())) && member.userId !== (currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId);
|
|
85
|
+
}).slice(0, mentionManager.config.suggestionLimit);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
(0, _react.useEffect)(() => {
|
|
90
|
+
timeoutRef.current = setTimeout(async () => {
|
|
91
|
+
fetchMembers().then(setMembers).catch(() => setMembers([])).finally(() => timeoutRef.current = undefined);
|
|
92
|
+
}, mentionManager.config.debounceMills);
|
|
93
|
+
return () => {
|
|
94
|
+
if (timeoutRef.current) {
|
|
95
|
+
clearTimeout(timeoutRef.current);
|
|
96
|
+
timeoutRef.current = undefined;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}, [text, selection]);
|
|
100
|
+
return {
|
|
101
|
+
members,
|
|
102
|
+
reset: (0, _react.useCallback)(() => setMembers([]), []),
|
|
103
|
+
searchStringRange: searchStringRangeRef.current,
|
|
104
|
+
searchLimited: searchLimitedRef.current
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
var _default = useMentionSuggestion;
|
|
109
|
+
exports.default = _default;
|
|
110
|
+
//# sourceMappingURL=useMentionSuggestion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMentionSuggestion","params","text","selection","channel","mentionedUsers","freshChannel","setFreshChannel","useState","useAsyncEffect","refresh","url","mentionManager","currentUser","useSendbirdChat","members","setMembers","timeoutRef","useRef","searchStringRangeRef","start","end","searchLimitedRef","updateSearchStringRange","selectionIndex","searchString","current","getSearchStringRangeInText","updateSearchLimited","mentionCount","mentionLimit","resetRefs","fetchMembers","selectionRanged","selectionContainsMentionedUser","some","it","rangeHelpers","overlaps","range","isTriggered","isValidSearchString","getSearchString","limited","length","config","isSuper","createMemberListQuery","nicknameStartsWithFilter","limit","suggestionLimit","next","then","filter","member","userId","sort","a","b","nickname","localeCompare","toLowerCase","startsWith","slice","useEffect","setTimeout","catch","finally","undefined","debounceMills","clearTimeout","reset","useCallback","searchStringRange","searchLimited"],"sources":["useMentionSuggestion.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { SendbirdGroupChannel, SendbirdMember, SendbirdUser } from '@sendbird/uikit-utils';\nimport { useAsyncEffect } from '@sendbird/uikit-utils';\n\nimport { useSendbirdChat } from '../hooks/useContext';\nimport type { Range } from '../types';\n\nconst useMentionSuggestion = (params: {\n text: string;\n selection: Range;\n channel: SendbirdGroupChannel;\n mentionedUsers: { user: SendbirdUser; range: Range }[];\n}) => {\n const { text, selection, channel, mentionedUsers } = params;\n\n const [freshChannel, setFreshChannel] = useState(channel);\n\n useAsyncEffect(async () => {\n setFreshChannel(await channel.refresh());\n }, [channel.url]);\n\n const { mentionManager, currentUser } = useSendbirdChat();\n const [members, setMembers] = useState<SendbirdMember[]>([]);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const searchStringRangeRef = useRef<Range>({ start: 0, end: 0 });\n const searchLimitedRef = useRef(false);\n\n const updateSearchStringRange = (selectionIndex: number, searchString: string) => {\n searchStringRangeRef.current = mentionManager.getSearchStringRangeInText(selectionIndex, searchString);\n return searchStringRangeRef.current;\n };\n const updateSearchLimited = (mentionCount: number, mentionLimit: number) => {\n searchLimitedRef.current = mentionCount >= mentionLimit;\n return searchLimitedRef.current;\n };\n const resetRefs = () => {\n searchLimitedRef.current = false;\n searchStringRangeRef.current = { start: 0, end: 0 };\n };\n\n const fetchMembers = async (): Promise<SendbirdMember[]> => {\n resetRefs();\n\n const selectionRanged = selection.start !== selection.end;\n if (selectionRanged) return [];\n\n const selectionContainsMentionedUser = mentionedUsers.some((it) =>\n mentionManager.rangeHelpers.overlaps(it.range, selection, 'underMore'),\n );\n if (selectionContainsMentionedUser) return [];\n\n const { isTriggered, isValidSearchString, searchString } = mentionManager.getSearchString(text, selection.start);\n if (!isTriggered() || !isValidSearchString()) return [];\n\n const limited = updateSearchLimited(mentionedUsers.length, mentionManager.config.mentionLimit);\n if (limited) return [];\n\n updateSearchStringRange(selection.start, searchString);\n\n if (freshChannel.isSuper) {\n return freshChannel\n .createMemberListQuery({\n nicknameStartsWithFilter: searchString,\n limit: mentionManager.config.suggestionLimit + 1,\n })\n .next()\n .then((members) => members.filter((member) => member.userId !== currentUser?.userId));\n } else {\n return freshChannel.members\n .sort((a, b) => a.nickname?.localeCompare(b.nickname))\n .filter(\n (member) =>\n member.nickname?.toLowerCase().startsWith(searchString.toLowerCase()) &&\n member.userId !== currentUser?.userId,\n )\n .slice(0, mentionManager.config.suggestionLimit);\n }\n };\n\n useEffect(() => {\n timeoutRef.current = setTimeout(async () => {\n fetchMembers()\n .then(setMembers)\n .catch(() => setMembers([]))\n .finally(() => (timeoutRef.current = undefined));\n }, mentionManager.config.debounceMills);\n\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = undefined;\n }\n };\n }, [text, selection]);\n\n return {\n members,\n reset: useCallback(() => setMembers([]), []),\n searchStringRange: searchStringRangeRef.current,\n searchLimited: searchLimitedRef.current,\n };\n};\n\nexport default useMentionSuggestion;\n"],"mappings":";;;;;;;AAAA;;AAGA;;AAEA;;AAGA,MAAMA,oBAAoB,GAAIC,MAAD,IAKvB;EACJ,MAAM;IAAEC,IAAF;IAAQC,SAAR;IAAmBC,OAAnB;IAA4BC;EAA5B,IAA+CJ,MAArD;EAEA,MAAM,CAACK,YAAD,EAAeC,eAAf,IAAkC,IAAAC,eAAA,EAASJ,OAAT,CAAxC;EAEA,IAAAK,0BAAA,EAAe,YAAY;IACzBF,eAAe,CAAC,MAAMH,OAAO,CAACM,OAAR,EAAP,CAAf;EACD,CAFD,EAEG,CAACN,OAAO,CAACO,GAAT,CAFH;EAIA,MAAM;IAAEC,cAAF;IAAkBC;EAAlB,IAAkC,IAAAC,2BAAA,GAAxC;EACA,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,IAAAR,eAAA,EAA2B,EAA3B,CAA9B;EACA,MAAMS,UAAU,GAAG,IAAAC,aAAA,GAAnB;EAEA,MAAMC,oBAAoB,GAAG,IAAAD,aAAA,EAAc;IAAEE,KAAK,EAAE,CAAT;IAAYC,GAAG,EAAE;EAAjB,CAAd,CAA7B;EACA,MAAMC,gBAAgB,GAAG,IAAAJ,aAAA,EAAO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FzB,EAGGmD,OAHH,CAGW,MAAOlD,UAAU,CAACS,OAAX,GAAqB0C,SAHvC;IAID,CAL8B,EAK5BxD,cAAc,CAACiC,MAAf,CAAsBwB,aALM,CAA/B;IAOA,OAAO,MAAM;MACX,IAAIpD,UAAU,CAACS,OAAf,EAAwB;QACtB4C,YAAY,CAACrD,UAAU,CAACS,OAAZ,CAAZ;QACAT,UAAU,CAACS,OAAX,GAAqB0C,SAArB;MACD;IACF,CALD;EAMD,CAdD,EAcG,CAAClE,IAAD,EAAOC,SAAP,CAdH;EAgBA,OAAO;IACLY,OADK;IAELwD,KAAK,EAAE,IAAAC,kBAAA,EAAY,MAAMxD,UAAU,CAAC,EAAD,CAA5B,EAAkC,EAAlC,CAFF;IAGLyD,iBAAiB,EAAEtD,oBAAoB,CAACO,OAHnC;IAILgD,aAAa,EAAEpD,gBAAgB,CAACI;EAJ3B,CAAP;AAMD,CA/FD;;eAiGe1B,oB"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
13
|
+
|
|
14
|
+
var _useContext = require("./useContext");
|
|
15
|
+
|
|
16
|
+
const useMentionTextInput = params => {
|
|
17
|
+
const {
|
|
18
|
+
mentionManager
|
|
19
|
+
} = (0, _useContext.useSendbirdChat)();
|
|
20
|
+
const mentionedUsersRef = (0, _react.useRef)([]);
|
|
21
|
+
const textInputRef = (0, _react.useRef)();
|
|
22
|
+
const [text, setText] = (0, _react.useState)('');
|
|
23
|
+
const [selection, setSelection] = (0, _react.useState)({
|
|
24
|
+
start: 0,
|
|
25
|
+
end: 0
|
|
26
|
+
}); // TODO: Refactor text edit logic more clearly
|
|
27
|
+
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (mentionManager.shouldUseMentionedMessageTemplate(params.messageToEdit)) {
|
|
30
|
+
const result = mentionManager.templateToTextAndMentionedUsers(params.messageToEdit.mentionedMessageTemplate, params.messageToEdit.mentionedUsers);
|
|
31
|
+
mentionedUsersRef.current = result.mentionedUsers;
|
|
32
|
+
setText(result.mentionedText);
|
|
33
|
+
} else {
|
|
34
|
+
var _params$messageToEdit;
|
|
35
|
+
|
|
36
|
+
mentionedUsersRef.current = [];
|
|
37
|
+
|
|
38
|
+
if ((_params$messageToEdit = params.messageToEdit) !== null && _params$messageToEdit !== void 0 && _params$messageToEdit.isUserMessage()) {
|
|
39
|
+
setText(params.messageToEdit.message);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, [params.messageToEdit]);
|
|
43
|
+
const onChangeText = (0, _uikitUtils.useFreshCallback)((_nextText, addedMentionedUser) => {
|
|
44
|
+
const prevText = text;
|
|
45
|
+
let nextText = _nextText;
|
|
46
|
+
let offset = nextText.length - prevText.length; // Text clear
|
|
47
|
+
|
|
48
|
+
if (nextText === '') {
|
|
49
|
+
mentionedUsersRef.current = [];
|
|
50
|
+
} // Text add
|
|
51
|
+
else if (offset > 0) {
|
|
52
|
+
/** Add mentioned user **/
|
|
53
|
+
if (addedMentionedUser) mentionedUsersRef.current.push(addedMentionedUser);
|
|
54
|
+
/** Reconcile mentioned users range on the right side of the selection **/
|
|
55
|
+
|
|
56
|
+
mentionedUsersRef.current = mentionManager.reconcileRangeOfMentionedUsers(offset, selection.end, mentionedUsersRef.current);
|
|
57
|
+
} // Text remove
|
|
58
|
+
else if (offset < 0) {
|
|
59
|
+
// Ranged remove
|
|
60
|
+
if (selection.start !== selection.end) {
|
|
61
|
+
/** Filter mentioned users in selection range **/
|
|
62
|
+
const {
|
|
63
|
+
filtered,
|
|
64
|
+
lastSelection
|
|
65
|
+
} = mentionManager.removeMentionedUsersInSelection(selection, mentionedUsersRef.current);
|
|
66
|
+
/** Reconcile mentioned users range on the right side of the selection **/
|
|
67
|
+
|
|
68
|
+
mentionedUsersRef.current = mentionManager.reconcileRangeOfMentionedUsers(offset, Math.max(selection.end, lastSelection), filtered);
|
|
69
|
+
} // Single remove
|
|
70
|
+
else {
|
|
71
|
+
/** Find mentioned user who ranges in removed selection **/
|
|
72
|
+
const foundIndex = mentionedUsersRef.current.findIndex(it => mentionManager.rangeHelpers.overlaps(it.range, selection, 'underMore'));
|
|
73
|
+
/** If found, remove from the mentioned user list and remove remainder text **/
|
|
74
|
+
|
|
75
|
+
if (foundIndex > -1) {
|
|
76
|
+
const it = mentionedUsersRef.current[foundIndex];
|
|
77
|
+
const remainderLength = it.range.end - it.range.start + offset;
|
|
78
|
+
offset = -remainderLength + offset;
|
|
79
|
+
nextText = (0, _uikitUtils.replace)(nextText, it.range.start, it.range.start + remainderLength, '');
|
|
80
|
+
mentionedUsersRef.current.splice(foundIndex, 1);
|
|
81
|
+
}
|
|
82
|
+
/** Reconcile mentioned users range on the right side of the selection **/
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
mentionedUsersRef.current = mentionManager.reconcileRangeOfMentionedUsers(offset, selection.end, mentionedUsersRef.current);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
setText(nextText);
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
textInputRef,
|
|
93
|
+
selection,
|
|
94
|
+
onSelectionChange: (0, _uikitUtils.useFreshCallback)(e => {
|
|
95
|
+
const nativeSelection = { ...e.nativeEvent.selection
|
|
96
|
+
}; // NOTE: To synchronize call onSelectionChange after onChangeText called on each platform.
|
|
97
|
+
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
const mentionedUser = mentionedUsersRef.current.find(it => mentionManager.rangeHelpers.overlaps(it.range, nativeSelection)); // Selection should be blocked if changed into mentioned area
|
|
100
|
+
|
|
101
|
+
if (mentionedUser) {
|
|
102
|
+
var _textInputRef$current;
|
|
103
|
+
|
|
104
|
+
const selectionBlock = {
|
|
105
|
+
start: mentionedUser.range.start,
|
|
106
|
+
end: mentionedUser.range.end
|
|
107
|
+
};
|
|
108
|
+
(_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 ? void 0 : _textInputRef$current.setNativeProps({
|
|
109
|
+
selection: selectionBlock
|
|
110
|
+
}); // BUG: setNativeProps called again when invoked onChangeText
|
|
111
|
+
// https://github.com/facebook/react-native/issues/33520
|
|
112
|
+
|
|
113
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
var _textInputRef$current2;
|
|
116
|
+
|
|
117
|
+
(_textInputRef$current2 = textInputRef.current) === null || _textInputRef$current2 === void 0 ? void 0 : _textInputRef$current2.setNativeProps({
|
|
118
|
+
selection: {
|
|
119
|
+
start: 0
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}, 250);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
setSelection(selectionBlock);
|
|
126
|
+
} else {
|
|
127
|
+
setSelection(nativeSelection);
|
|
128
|
+
}
|
|
129
|
+
}, 10);
|
|
130
|
+
}),
|
|
131
|
+
text,
|
|
132
|
+
onChangeText,
|
|
133
|
+
mentionedUsers: mentionedUsersRef.current
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
var _default = useMentionTextInput;
|
|
138
|
+
exports.default = _default;
|
|
139
|
+
//# sourceMappingURL=useMentionTextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMentionTextInput","params","mentionManager","useSendbirdChat","mentionedUsersRef","useRef","textInputRef","text","setText","useState","selection","setSelection","start","end","useEffect","shouldUseMentionedMessageTemplate","messageToEdit","result","templateToTextAndMentionedUsers","mentionedMessageTemplate","mentionedUsers","current","mentionedText","isUserMessage","message","onChangeText","useFreshCallback","_nextText","addedMentionedUser","prevText","nextText","offset","length","push","reconcileRangeOfMentionedUsers","filtered","lastSelection","removeMentionedUsersInSelection","Math","max","foundIndex","findIndex","it","rangeHelpers","overlaps","range","remainderLength","replace","splice","onSelectionChange","e","nativeSelection","nativeEvent","setTimeout","mentionedUser","find","selectionBlock","setNativeProps","Platform","OS"],"sources":["useMentionTextInput.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport type { NativeSyntheticEvent, TextInput, TextInputSelectionChangeEventData } from 'react-native';\nimport { Platform } from 'react-native';\n\nimport { SendbirdFileMessage, SendbirdUserMessage, replace, useFreshCallback } from '@sendbird/uikit-utils';\n\nimport type { MentionedUser } from '../types';\nimport { useSendbirdChat } from './useContext';\n\nconst useMentionTextInput = (params: { messageToEdit?: SendbirdUserMessage | SendbirdFileMessage }) => {\n const { mentionManager } = useSendbirdChat();\n\n const mentionedUsersRef = useRef<MentionedUser[]>([]);\n const textInputRef = useRef<TextInput>();\n\n const [text, setText] = useState('');\n const [selection, setSelection] = useState({ start: 0, end: 0 });\n\n // TODO: Refactor text edit logic more clearly\n useEffect(() => {\n if (mentionManager.shouldUseMentionedMessageTemplate(params.messageToEdit)) {\n const result = mentionManager.templateToTextAndMentionedUsers(\n params.messageToEdit.mentionedMessageTemplate,\n params.messageToEdit.mentionedUsers,\n );\n\n mentionedUsersRef.current = result.mentionedUsers;\n setText(result.mentionedText);\n } else {\n mentionedUsersRef.current = [];\n if (params.messageToEdit?.isUserMessage()) {\n setText(params.messageToEdit.message);\n }\n }\n }, [params.messageToEdit]);\n\n const onChangeText = useFreshCallback((_nextText: string, addedMentionedUser?: MentionedUser) => {\n const prevText = text;\n let nextText = _nextText;\n let offset = nextText.length - prevText.length;\n\n // Text clear\n if (nextText === '') {\n mentionedUsersRef.current = [];\n }\n // Text add\n else if (offset > 0) {\n /** Add mentioned user **/\n if (addedMentionedUser) mentionedUsersRef.current.push(addedMentionedUser);\n\n /** Reconcile mentioned users range on the right side of the selection **/\n mentionedUsersRef.current = mentionManager.reconcileRangeOfMentionedUsers(\n offset,\n selection.end,\n mentionedUsersRef.current,\n );\n }\n // Text remove\n else if (offset < 0) {\n // Ranged remove\n if (selection.start !== selection.end) {\n /** Filter mentioned users in selection range **/\n const { filtered, lastSelection } = mentionManager.removeMentionedUsersInSelection(\n selection,\n mentionedUsersRef.current,\n );\n\n /** Reconcile mentioned users range on the right side of the selection **/\n mentionedUsersRef.current = mentionManager.reconcileRangeOfMentionedUsers(\n offset,\n Math.max(selection.end, lastSelection),\n filtered,\n );\n }\n // Single remove\n else {\n /** Find mentioned user who ranges in removed selection **/\n const foundIndex = mentionedUsersRef.current.findIndex((it) =>\n mentionManager.rangeHelpers.overlaps(it.range, selection, 'underMore'),\n );\n /** If found, remove from the mentioned user list and remove remainder text **/\n if (foundIndex > -1) {\n const it = mentionedUsersRef.current[foundIndex];\n const remainderLength = it.range.end - it.range.start + offset;\n\n offset = -remainderLength + offset;\n nextText = replace(nextText, it.range.start, it.range.start + remainderLength, '');\n\n mentionedUsersRef.current.splice(foundIndex, 1);\n }\n\n /** Reconcile mentioned users range on the right side of the selection **/\n mentionedUsersRef.current = mentionManager.reconcileRangeOfMentionedUsers(\n offset,\n selection.end,\n mentionedUsersRef.current,\n );\n }\n }\n\n setText(nextText);\n });\n\n return {\n textInputRef,\n selection,\n onSelectionChange: useFreshCallback((e: NativeSyntheticEvent<TextInputSelectionChangeEventData>) => {\n const nativeSelection = { ...e.nativeEvent.selection };\n\n // NOTE: To synchronize call onSelectionChange after onChangeText called on each platform.\n setTimeout(() => {\n const mentionedUser = mentionedUsersRef.current.find((it) =>\n mentionManager.rangeHelpers.overlaps(it.range, nativeSelection),\n );\n\n // Selection should be blocked if changed into mentioned area\n if (mentionedUser) {\n const selectionBlock = { start: mentionedUser.range.start, end: mentionedUser.range.end };\n textInputRef.current?.setNativeProps({ selection: selectionBlock });\n // BUG: setNativeProps called again when invoked onChangeText\n // https://github.com/facebook/react-native/issues/33520\n if (Platform.OS === 'android') {\n setTimeout(() => {\n textInputRef.current?.setNativeProps({ selection: { start: 0 } });\n }, 250);\n }\n setSelection(selectionBlock);\n } else {\n setSelection(nativeSelection);\n }\n }, 10);\n }),\n text,\n onChangeText,\n mentionedUsers: mentionedUsersRef.current,\n };\n};\n\nexport default useMentionTextInput;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAGA;;AAEA,MAAMA,mBAAmB,GAAIC,MAAD,IAA2E;EACrG,MAAM;IAAEC;EAAF,IAAqB,IAAAC,2BAAA,GAA3B;EAEA,MAAMC,iBAAiB,GAAG,IAAAC,aAAA,EAAwB,EAAxB,CAA1B;EACA,MAAMC,YAAY,GAAG,IAAAD,aAAA,GAArB;EAEA,MAAM,CAACE,IAAD,EAAOC,OAAP,IAAkB,IAAAC,eAAA,EAAS,EAAT,CAAxB;EACA,MAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4B,IAAAF,eAAA,EAAS;IAAEG,KAAK,EAAE,CAAT;IAAYC,GAAG,EAAE;EAAjB,CAAT,CAAlC,CAPqG,CASrG;;EACA,IAAAC,gBAAA,EAAU,MAAM;IACd,IAAIZ,cAAc,CAACa,iCAAf,CAAiDd,MAAM,CAACe,aAAxD,CAAJ,EAA4E;MAC1E,MAAMC,MAAM,GAAGf,cAAc,CAACgB,+BAAf,CACbjB,MAAM,CAACe,aAAP,CAAqBG,wBADR,EAEblB,MAAM,CAACe,aAAP,CAAqBI,cAFR,CAAf;MAKAhB,iBAAiB,CAACiB,OAAlB,GAA4BJ,MAAM,CAACG,cAAnC;MACAZ,OAAO,CAACS,MAAM,CAACK,aAAR,CAAP;IACD,CARD,MAQO;MAAA;;MACLlB,iBAAiB,CAACiB,OAAlB,GAA4B,EAA5B;;MACA,6BAAIpB,MAAM,CAACe,aAAX,kDAAI,sBAAsBO,aAAtB,EAAJ,EAA2C;QACzCf,OAAO,CAACP,MAAM,CAACe,aAAP,CAAqBQ,OAAtB,CAAP;MACD;IACF;EACF,CAfD,EAeG,CAACvB,MAAM,CAACe,aAAR,CAfH;EAiBA,MAAMS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G,aAAJ,EAAmB;UAAA;;UACjB,MAAME,cAAc,GAAG;YAAE5C,KAAK,EAAE0C,aAAa,CAACT,KAAd,CAAoBjC,KAA7B;YAAoCC,GAAG,EAAEyC,aAAa,CAACT,KAAd,CAAoBhC;UAA7D,CAAvB;UACA,yBAAAP,YAAY,CAACe,OAAb,gFAAsBoC,cAAtB,CAAqC;YAAE/C,SAAS,EAAE8C;UAAb,CAArC,EAFiB,CAGjB;UACA;;UACA,IAAIE,qBAAA,CAASC,EAAT,KAAgB,SAApB,EAA+B;YAC7BN,UAAU,CAAC,MAAM;cAAA;;cACf,0BAAA/C,YAAY,CAACe,OAAb,kFAAsBoC,cAAtB,CAAqC;gBAAE/C,SAAS,EAAE;kBAAEE,KAAK,EAAE;gBAAT;cAAb,CAArC;YACD,CAFS,EAEP,GAFO,CAAV;UAGD;;UACDD,YAAY,CAAC6C,cAAD,CAAZ;QACD,CAXD,MAWO;UACL7C,YAAY,CAACwC,eAAD,CAAZ;QACD;MACF,CApBS,EAoBP,EApBO,CAAV;IAqBD,CAzBkB,CAHd;IA6BL5C,IA7BK;IA8BLkB,YA9BK;IA+BLL,cAAc,EAAEhB,iBAAiB,CAACiB;EA/B7B,CAAP;AAiCD,CA/HD;;eAiIerB,mB"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
MessageRenderer: true,
|
|
8
|
+
ReactionAddons: true,
|
|
9
|
+
ReactionBottomSheets: true,
|
|
8
10
|
ChannelCover: true,
|
|
9
11
|
ChatFlatList: true,
|
|
10
12
|
FileViewer: true,
|
|
@@ -26,6 +28,7 @@ var _exportNames = {
|
|
|
26
28
|
createGroupChannelRegisterOperatorFragment: true,
|
|
27
29
|
createGroupChannelMutedMembersFragment: true,
|
|
28
30
|
createGroupChannelBannedUsersFragment: true,
|
|
31
|
+
createGroupChannelNotificationsFragment: true,
|
|
29
32
|
SendbirdChatContext: true,
|
|
30
33
|
SendbirdChatProvider: true,
|
|
31
34
|
PlatformServiceContext: true,
|
|
@@ -36,10 +39,6 @@ var _exportNames = {
|
|
|
36
39
|
LocalizationProvider: true,
|
|
37
40
|
useConnection: true,
|
|
38
41
|
usePushTokenRegistration: true,
|
|
39
|
-
useLocalization: true,
|
|
40
|
-
usePlatformService: true,
|
|
41
|
-
useSendbirdChat: true,
|
|
42
|
-
useUserProfile: true,
|
|
43
42
|
StringSetEn: true,
|
|
44
43
|
createBaseStringSet: true,
|
|
45
44
|
createNativeFileService: true,
|
|
@@ -50,6 +49,10 @@ var _exportNames = {
|
|
|
50
49
|
createExpoClipboardService: true,
|
|
51
50
|
createExpoNotificationService: true,
|
|
52
51
|
createExpoMediaService: true,
|
|
52
|
+
GroupChannelNotificationsProps: true,
|
|
53
|
+
GroupChannelNotificationsContextsType: true,
|
|
54
|
+
GroupChannelNotificationsFragment: true,
|
|
55
|
+
GroupChannelNotificationsModule: true,
|
|
53
56
|
SendbirdUIKitContainer: true,
|
|
54
57
|
SendbirdUIKit: true,
|
|
55
58
|
SBUError: true
|
|
@@ -72,6 +75,30 @@ Object.defineProperty(exports, "FileViewer", {
|
|
|
72
75
|
return _FileViewer.default;
|
|
73
76
|
}
|
|
74
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "GroupChannelNotificationsContextsType", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _types.GroupChannelNotificationsContextsType;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "GroupChannelNotificationsFragment", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _types.GroupChannelNotificationsFragment;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "GroupChannelNotificationsModule", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _types.GroupChannelNotificationsModule;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "GroupChannelNotificationsProps", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _types.GroupChannelNotificationsProps;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
75
102
|
Object.defineProperty(exports, "LocalizationContext", {
|
|
76
103
|
enumerable: true,
|
|
77
104
|
get: function () {
|
|
@@ -114,6 +141,18 @@ Object.defineProperty(exports, "ProviderLayout", {
|
|
|
114
141
|
return _ProviderLayout.default;
|
|
115
142
|
}
|
|
116
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "ReactionAddons", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _ReactionAddons.ReactionAddons;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "ReactionBottomSheets", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () {
|
|
153
|
+
return _ReactionBottomSheets.ReactionBottomSheets;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
117
156
|
Object.defineProperty(exports, "SBUError", {
|
|
118
157
|
enumerable: true,
|
|
119
158
|
get: function () {
|
|
@@ -270,6 +309,12 @@ Object.defineProperty(exports, "createGroupChannelMutedMembersFragment", {
|
|
|
270
309
|
return _createGroupChannelMutedMembersFragment.default;
|
|
271
310
|
}
|
|
272
311
|
});
|
|
312
|
+
Object.defineProperty(exports, "createGroupChannelNotificationsFragment", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function () {
|
|
315
|
+
return _createGroupChannelNotificationsFragment.default;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
273
318
|
Object.defineProperty(exports, "createGroupChannelOperatorsFragment", {
|
|
274
319
|
enumerable: true,
|
|
275
320
|
get: function () {
|
|
@@ -318,36 +363,12 @@ Object.defineProperty(exports, "useConnection", {
|
|
|
318
363
|
return _useConnection.default;
|
|
319
364
|
}
|
|
320
365
|
});
|
|
321
|
-
Object.defineProperty(exports, "useLocalization", {
|
|
322
|
-
enumerable: true,
|
|
323
|
-
get: function () {
|
|
324
|
-
return _useContext.useLocalization;
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
Object.defineProperty(exports, "usePlatformService", {
|
|
328
|
-
enumerable: true,
|
|
329
|
-
get: function () {
|
|
330
|
-
return _useContext.usePlatformService;
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
366
|
Object.defineProperty(exports, "usePushTokenRegistration", {
|
|
334
367
|
enumerable: true,
|
|
335
368
|
get: function () {
|
|
336
369
|
return _usePushTokenRegistration.default;
|
|
337
370
|
}
|
|
338
371
|
});
|
|
339
|
-
Object.defineProperty(exports, "useSendbirdChat", {
|
|
340
|
-
enumerable: true,
|
|
341
|
-
get: function () {
|
|
342
|
-
return _useContext.useSendbirdChat;
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
Object.defineProperty(exports, "useUserProfile", {
|
|
346
|
-
enumerable: true,
|
|
347
|
-
get: function () {
|
|
348
|
-
return _useContext.useUserProfile;
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
372
|
|
|
352
373
|
var _reactNative = require("react-native");
|
|
353
374
|
|
|
@@ -355,6 +376,10 @@ var _uikitUtils = require("@sendbird/uikit-utils");
|
|
|
355
376
|
|
|
356
377
|
var _MessageRenderer = _interopRequireDefault(require("./components/MessageRenderer"));
|
|
357
378
|
|
|
379
|
+
var _ReactionAddons = require("./components/ReactionAddons");
|
|
380
|
+
|
|
381
|
+
var _ReactionBottomSheets = require("./components/ReactionBottomSheets");
|
|
382
|
+
|
|
358
383
|
var _ChannelCover = _interopRequireDefault(require("./components/ChannelCover"));
|
|
359
384
|
|
|
360
385
|
var _ChatFlatList = _interopRequireDefault(require("./components/ChatFlatList"));
|
|
@@ -397,6 +422,8 @@ var _createGroupChannelMutedMembersFragment = _interopRequireDefault(require("./
|
|
|
397
422
|
|
|
398
423
|
var _createGroupChannelBannedUsersFragment = _interopRequireDefault(require("./fragments/createGroupChannelBannedUsersFragment"));
|
|
399
424
|
|
|
425
|
+
var _createGroupChannelNotificationsFragment = _interopRequireDefault(require("./fragments/createGroupChannelNotificationsFragment"));
|
|
426
|
+
|
|
400
427
|
var _SendbirdChatCtx = require("./contexts/SendbirdChatCtx");
|
|
401
428
|
|
|
402
429
|
var _PlatformServiceCtx = require("./contexts/PlatformServiceCtx");
|
|
@@ -411,6 +438,18 @@ var _usePushTokenRegistration = _interopRequireDefault(require("./hooks/usePushT
|
|
|
411
438
|
|
|
412
439
|
var _useContext = require("./hooks/useContext");
|
|
413
440
|
|
|
441
|
+
Object.keys(_useContext).forEach(function (key) {
|
|
442
|
+
if (key === "default" || key === "__esModule") return;
|
|
443
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
444
|
+
if (key in exports && exports[key] === _useContext[key]) return;
|
|
445
|
+
Object.defineProperty(exports, key, {
|
|
446
|
+
enumerable: true,
|
|
447
|
+
get: function () {
|
|
448
|
+
return _useContext[key];
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
|
|
414
453
|
var _StringSet = _interopRequireDefault(require("./localization/StringSet.en"));
|
|
415
454
|
|
|
416
455
|
var _StringSet2 = require("./localization/StringSet.type");
|
|
@@ -473,30 +512,46 @@ Object.keys(_groupChannelList).forEach(function (key) {
|
|
|
473
512
|
});
|
|
474
513
|
});
|
|
475
514
|
|
|
476
|
-
var
|
|
515
|
+
var _groupChannelNotifications = require("./domain/groupChannelNotifications");
|
|
477
516
|
|
|
478
|
-
Object.keys(
|
|
517
|
+
Object.keys(_groupChannelNotifications).forEach(function (key) {
|
|
479
518
|
if (key === "default" || key === "__esModule") return;
|
|
480
519
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
481
|
-
if (key in exports && exports[key] ===
|
|
520
|
+
if (key in exports && exports[key] === _groupChannelNotifications[key]) return;
|
|
482
521
|
Object.defineProperty(exports, key, {
|
|
483
522
|
enumerable: true,
|
|
484
523
|
get: function () {
|
|
485
|
-
return
|
|
524
|
+
return _groupChannelNotifications[key];
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
var _types = require("./domain/groupChannelNotifications/types");
|
|
530
|
+
|
|
531
|
+
var _types2 = require("./domain/groupChannelUserList/types");
|
|
532
|
+
|
|
533
|
+
Object.keys(_types2).forEach(function (key) {
|
|
534
|
+
if (key === "default" || key === "__esModule") return;
|
|
535
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
536
|
+
if (key in exports && exports[key] === _types2[key]) return;
|
|
537
|
+
Object.defineProperty(exports, key, {
|
|
538
|
+
enumerable: true,
|
|
539
|
+
get: function () {
|
|
540
|
+
return _types2[key];
|
|
486
541
|
}
|
|
487
542
|
});
|
|
488
543
|
});
|
|
489
544
|
|
|
490
|
-
var
|
|
545
|
+
var _userList = require("./domain/userList");
|
|
491
546
|
|
|
492
|
-
Object.keys(
|
|
547
|
+
Object.keys(_userList).forEach(function (key) {
|
|
493
548
|
if (key === "default" || key === "__esModule") return;
|
|
494
549
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
495
|
-
if (key in exports && exports[key] ===
|
|
550
|
+
if (key in exports && exports[key] === _userList[key]) return;
|
|
496
551
|
Object.defineProperty(exports, key, {
|
|
497
552
|
enumerable: true,
|
|
498
553
|
get: function () {
|
|
499
|
-
return
|
|
554
|
+
return _userList[key];
|
|
500
555
|
}
|
|
501
556
|
});
|
|
502
557
|
});
|
|
@@ -505,16 +560,16 @@ var _SendbirdUIKitContainer = _interopRequireWildcard(require("./containers/Send
|
|
|
505
560
|
|
|
506
561
|
var _SBUError = _interopRequireDefault(require("./libs/SBUError"));
|
|
507
562
|
|
|
508
|
-
var
|
|
563
|
+
var _types3 = require("./types");
|
|
509
564
|
|
|
510
|
-
Object.keys(
|
|
565
|
+
Object.keys(_types3).forEach(function (key) {
|
|
511
566
|
if (key === "default" || key === "__esModule") return;
|
|
512
567
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
513
|
-
if (key in exports && exports[key] ===
|
|
568
|
+
if (key in exports && exports[key] === _types3[key]) return;
|
|
514
569
|
Object.defineProperty(exports, key, {
|
|
515
570
|
enumerable: true,
|
|
516
571
|
get: function () {
|
|
517
|
-
return
|
|
572
|
+
return _types3[key];
|
|
518
573
|
}
|
|
519
574
|
});
|
|
520
575
|
});
|