@sendbird/uikit-react-native 2.0.3 → 2.1.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 +2 -2
- package/lib/commonjs/components/ChannelCover.js +22 -1
- package/lib/commonjs/components/ChannelCover.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js +9 -2
- package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/index.js +1 -1
- package/lib/commonjs/components/MessageRenderer/index.js.map +1 -1
- package/lib/commonjs/components/TypedPlaceholder.js +2 -2
- package/lib/commonjs/components/TypedPlaceholder.js.map +1 -1
- package/lib/commonjs/components/UserActionBar.js +7 -4
- package/lib/commonjs/components/UserActionBar.js.map +1 -1
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js +5 -0
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/commonjs/containers/SendbirdUIKitContainer.js +15 -8
- package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/commonjs/contexts/{Localization.js → LocalizationCtx.js} +1 -1
- package/lib/commonjs/contexts/LocalizationCtx.js.map +1 -0
- package/lib/commonjs/contexts/{PlatformService.js → PlatformServiceCtx.js} +1 -1
- package/lib/commonjs/contexts/PlatformServiceCtx.js.map +1 -0
- package/lib/commonjs/contexts/{SendbirdChat.js → SendbirdChatCtx.js} +5 -3
- package/lib/commonjs/contexts/SendbirdChatCtx.js.map +1 -0
- package/lib/commonjs/contexts/UserProfileCtx.js +116 -0
- package/lib/commonjs/contexts/UserProfileCtx.js.map +1 -0
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js +3 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js +4 -2
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js +15 -10
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.js +39 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js +53 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.js +34 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.js +38 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.js +34 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/index.js +62 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/index.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/module/createGroupChannelBannedUsersModule.js +45 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/module/createGroupChannelBannedUsersModule.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/module/moduleContext.js +45 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/module/moduleContext.js.map +1 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/types.js +6 -0
- package/lib/commonjs/domain/groupChannelBannedUsers/types.js.map +1 -0
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js +32 -30
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelModeration/component/GroupChannelModerationHeader.js +39 -0
- package/lib/commonjs/domain/groupChannelModeration/component/GroupChannelModerationHeader.js.map +1 -0
- package/lib/commonjs/domain/groupChannelModeration/component/GroupChannelModerationMenu.js +103 -0
- package/lib/commonjs/domain/groupChannelModeration/component/GroupChannelModerationMenu.js.map +1 -0
- package/lib/commonjs/domain/groupChannelModeration/index.js +46 -0
- package/lib/commonjs/domain/groupChannelModeration/index.js.map +1 -0
- package/lib/commonjs/domain/groupChannelModeration/module/createGroupChannelModerationModule.js +33 -0
- package/lib/commonjs/domain/groupChannelModeration/module/createGroupChannelModerationModule.js.map +1 -0
- package/lib/commonjs/domain/groupChannelModeration/module/moduleContext.js +46 -0
- package/lib/commonjs/domain/groupChannelModeration/module/moduleContext.js.map +1 -0
- package/lib/commonjs/domain/groupChannelModeration/types.js +6 -0
- package/lib/commonjs/domain/groupChannelModeration/types.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.js +39 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js +51 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.js +34 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusError.js +38 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusError.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.js +34 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/index.js +70 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/index.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/module/createGroupChannelMutedMembersModule.js +45 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/module/createGroupChannelMutedMembersModule.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/module/moduleContext.js +45 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/module/moduleContext.js.map +1 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/types.js +6 -0
- package/lib/commonjs/domain/groupChannelMutedMembers/types.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.js +44 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsList.js +51 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsList.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.js +34 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsStatusError.js +38 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsStatusError.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.js +34 -0
- package/lib/commonjs/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/index.js +70 -0
- package/lib/commonjs/domain/groupChannelOperators/index.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/module/createGroupChannelOperatorsModule.js +45 -0
- package/lib/commonjs/domain/groupChannelOperators/module/createGroupChannelOperatorsModule.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/module/moduleContext.js +45 -0
- package/lib/commonjs/domain/groupChannelOperators/module/moduleContext.js.map +1 -0
- package/lib/commonjs/domain/groupChannelOperators/types.js +6 -0
- package/lib/commonjs/domain/groupChannelOperators/types.js.map +1 -0
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -8
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +11 -0
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.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/UserListStatusError.js +2 -2
- package/lib/commonjs/domain/userList/component/UserListStatusError.js.map +1 -1
- package/lib/commonjs/domain/userList/types.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelBannedUsersFragment.js +101 -0
- package/lib/commonjs/fragments/createGroupChannelBannedUsersFragment.js.map +1 -0
- package/lib/commonjs/fragments/createGroupChannelCreateFragment.js +9 -25
- 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 +21 -37
- package/lib/commonjs/fragments/createGroupChannelInviteFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelListFragment.js +3 -11
- package/lib/commonjs/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelMembersFragment.js +95 -51
- package/lib/commonjs/fragments/createGroupChannelMembersFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelModerationFragment.js +68 -0
- package/lib/commonjs/fragments/createGroupChannelModerationFragment.js.map +1 -0
- package/lib/commonjs/fragments/createGroupChannelMutedMembersFragment.js +116 -0
- package/lib/commonjs/fragments/createGroupChannelMutedMembersFragment.js.map +1 -0
- package/lib/commonjs/fragments/createGroupChannelOperatorsFragment.js +129 -0
- package/lib/commonjs/fragments/createGroupChannelOperatorsFragment.js.map +1 -0
- package/lib/commonjs/fragments/createGroupChannelRegisterOperatorFragment.js +114 -0
- package/lib/commonjs/fragments/createGroupChannelRegisterOperatorFragment.js.map +1 -0
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js +2 -0
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/commonjs/hooks/useConnection.js +4 -0
- package/lib/commonjs/hooks/useConnection.js.map +1 -1
- package/lib/commonjs/hooks/useContext.js +17 -7
- package/lib/commonjs/hooks/useContext.js.map +1 -1
- package/lib/commonjs/index.js +77 -9
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/localization/StringSet.type.js +60 -11
- package/lib/commonjs/localization/StringSet.type.js.map +1 -1
- package/lib/commonjs/platform/createFileService.native.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/components/ChannelCover.js +22 -2
- package/lib/module/components/ChannelCover.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js +9 -3
- package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
- package/lib/module/components/MessageRenderer/index.js +1 -1
- package/lib/module/components/MessageRenderer/index.js.map +1 -1
- package/lib/module/components/TypedPlaceholder.js +2 -2
- package/lib/module/components/TypedPlaceholder.js.map +1 -1
- package/lib/module/components/UserActionBar.js +8 -5
- package/lib/module/components/UserActionBar.js.map +1 -1
- package/lib/module/containers/GroupChannelPreviewContainer.js +5 -0
- package/lib/module/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/module/containers/SendbirdUIKitContainer.js +11 -5
- package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/module/contexts/{Localization.js → LocalizationCtx.js} +1 -1
- package/lib/module/contexts/LocalizationCtx.js.map +1 -0
- package/lib/module/contexts/{PlatformService.js → PlatformServiceCtx.js} +1 -1
- package/lib/module/contexts/PlatformServiceCtx.js.map +1 -0
- package/lib/module/contexts/{SendbirdChat.js → SendbirdChatCtx.js} +5 -3
- package/lib/module/contexts/SendbirdChatCtx.js.map +1 -0
- package/lib/module/contexts/UserProfileCtx.js +94 -0
- package/lib/module/contexts/UserProfileCtx.js.map +1 -0
- package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js +3 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js +4 -2
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js +16 -11
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/module/domain/groupChannel/types.js.map +1 -1
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.js +25 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js +40 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.js +21 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.js +25 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.js +21 -0
- package/lib/module/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/index.js +7 -0
- package/lib/module/domain/groupChannelBannedUsers/index.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/module/createGroupChannelBannedUsersModule.js +30 -0
- package/lib/module/domain/groupChannelBannedUsers/module/createGroupChannelBannedUsersModule.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/module/moduleContext.js +25 -0
- package/lib/module/domain/groupChannelBannedUsers/module/moduleContext.js.map +1 -0
- package/lib/module/domain/groupChannelBannedUsers/types.js +2 -0
- package/lib/module/domain/groupChannelBannedUsers/types.js.map +1 -0
- package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js +34 -33
- package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/module/domain/groupChannelList/types.js.map +1 -1
- package/lib/module/domain/groupChannelModeration/component/GroupChannelModerationHeader.js +25 -0
- package/lib/module/domain/groupChannelModeration/component/GroupChannelModerationHeader.js.map +1 -0
- package/lib/module/domain/groupChannelModeration/component/GroupChannelModerationMenu.js +87 -0
- package/lib/module/domain/groupChannelModeration/component/GroupChannelModerationMenu.js.map +1 -0
- package/lib/module/domain/groupChannelModeration/index.js +5 -0
- package/lib/module/domain/groupChannelModeration/index.js.map +1 -0
- package/lib/module/domain/groupChannelModeration/module/createGroupChannelModerationModule.js +21 -0
- package/lib/module/domain/groupChannelModeration/module/createGroupChannelModerationModule.js.map +1 -0
- package/lib/module/domain/groupChannelModeration/module/moduleContext.js +26 -0
- package/lib/module/domain/groupChannelModeration/module/moduleContext.js.map +1 -0
- package/lib/module/domain/groupChannelModeration/types.js +2 -0
- package/lib/module/domain/groupChannelModeration/types.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.js +25 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js +38 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.js +21 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusError.js +25 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusError.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.js +21 -0
- package/lib/module/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/index.js +8 -0
- package/lib/module/domain/groupChannelMutedMembers/index.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/module/createGroupChannelMutedMembersModule.js +30 -0
- package/lib/module/domain/groupChannelMutedMembers/module/createGroupChannelMutedMembersModule.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/module/moduleContext.js +25 -0
- package/lib/module/domain/groupChannelMutedMembers/module/moduleContext.js.map +1 -0
- package/lib/module/domain/groupChannelMutedMembers/types.js +2 -0
- package/lib/module/domain/groupChannelMutedMembers/types.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.js +30 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsList.js +38 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsList.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.js +21 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsStatusError.js +25 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsStatusError.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.js +21 -0
- package/lib/module/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/index.js +8 -0
- package/lib/module/domain/groupChannelOperators/index.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/module/createGroupChannelOperatorsModule.js +30 -0
- package/lib/module/domain/groupChannelOperators/module/createGroupChannelOperatorsModule.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/module/moduleContext.js +25 -0
- package/lib/module/domain/groupChannelOperators/module/moduleContext.js.map +1 -0
- package/lib/module/domain/groupChannelOperators/types.js +2 -0
- package/lib/module/domain/groupChannelOperators/types.js.map +1 -0
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +2 -8
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +11 -0
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.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/UserListStatusError.js +2 -2
- package/lib/module/domain/userList/component/UserListStatusError.js.map +1 -1
- package/lib/module/domain/userList/types.js.map +1 -1
- package/lib/module/fragments/createGroupChannelBannedUsersFragment.js +84 -0
- package/lib/module/fragments/createGroupChannelBannedUsersFragment.js.map +1 -0
- package/lib/module/fragments/createGroupChannelCreateFragment.js +10 -26
- 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 +22 -37
- package/lib/module/fragments/createGroupChannelInviteFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelListFragment.js +4 -11
- package/lib/module/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelMembersFragment.js +99 -56
- package/lib/module/fragments/createGroupChannelMembersFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelModerationFragment.js +53 -0
- package/lib/module/fragments/createGroupChannelModerationFragment.js.map +1 -0
- package/lib/module/fragments/createGroupChannelMutedMembersFragment.js +98 -0
- package/lib/module/fragments/createGroupChannelMutedMembersFragment.js.map +1 -0
- package/lib/module/fragments/createGroupChannelOperatorsFragment.js +111 -0
- package/lib/module/fragments/createGroupChannelOperatorsFragment.js.map +1 -0
- package/lib/module/fragments/createGroupChannelRegisterOperatorFragment.js +94 -0
- package/lib/module/fragments/createGroupChannelRegisterOperatorFragment.js.map +1 -0
- package/lib/module/fragments/createGroupChannelSettingsFragment.js +2 -0
- package/lib/module/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/module/hooks/useConnection.js +4 -0
- package/lib/module/hooks/useConnection.js.map +1 -1
- package/lib/module/hooks/useContext.js +9 -3
- package/lib/module/hooks/useContext.js.map +1 -1
- package/lib/module/index.js +10 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/localization/StringSet.type.js +60 -11
- package/lib/module/localization/StringSet.type.js.map +1 -1
- package/lib/module/platform/createFileService.native.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/components/ChannelCover.d.ts +1 -1
- package/lib/typescript/src/components/TypedPlaceholder.d.ts +1 -1
- package/lib/typescript/src/components/UserActionBar.d.ts +4 -2
- package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +9 -7
- package/lib/typescript/src/contexts/{Localization.d.ts → LocalizationCtx.d.ts} +0 -0
- package/lib/typescript/src/contexts/{PlatformService.d.ts → PlatformServiceCtx.d.ts} +0 -0
- package/lib/typescript/src/contexts/{SendbirdChat.d.ts → SendbirdChatCtx.d.ts} +8 -4
- package/lib/typescript/src/contexts/UserProfileCtx.d.ts +15 -0
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/EditInput.d.ts +2 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/SendInput.d.ts +3 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/index.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/index.d.ts +6 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/module/createGroupChannelBannedUsersModule.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/module/moduleContext.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelBannedUsers/types.d.ts +47 -0
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelList/types.d.ts +3 -9
- package/lib/typescript/src/domain/groupChannelModeration/component/GroupChannelModerationHeader.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelModeration/component/GroupChannelModerationMenu.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelModeration/index.d.ts +4 -0
- package/lib/typescript/src/domain/groupChannelModeration/module/createGroupChannelModerationModule.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelModeration/module/moduleContext.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelModeration/types.d.ts +43 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusError.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/index.d.ts +7 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/module/createGroupChannelMutedMembersModule.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/module/moduleContext.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelMutedMembers/types.d.ts +47 -0
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsList.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusError.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelOperators/index.d.ts +7 -0
- package/lib/typescript/src/domain/groupChannelOperators/module/createGroupChannelOperatorsModule.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelOperators/module/moduleContext.d.ts +3 -0
- package/lib/typescript/src/domain/groupChannelOperators/types.d.ts +49 -0
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +2 -0
- package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +18 -12
- package/lib/typescript/src/domain/userList/component/UserListStatusError.d.ts +2 -2
- package/lib/typescript/src/domain/userList/types.d.ts +4 -3
- package/lib/typescript/src/fragments/createGroupChannelBannedUsersFragment.d.ts +3 -0
- package/lib/typescript/src/fragments/createGroupChannelCreateFragment.d.ts +2 -1
- package/lib/typescript/src/fragments/createGroupChannelInviteFragment.d.ts +2 -1
- package/lib/typescript/src/fragments/createGroupChannelModerationFragment.d.ts +3 -0
- package/lib/typescript/src/fragments/createGroupChannelMutedMembersFragment.d.ts +3 -0
- package/lib/typescript/src/fragments/createGroupChannelOperatorsFragment.d.ts +3 -0
- package/lib/typescript/src/fragments/createGroupChannelRegisterOperatorFragment.d.ts +5 -0
- package/lib/typescript/src/hooks/useContext.d.ts +3 -1
- package/lib/typescript/src/index.d.ts +10 -4
- package/lib/typescript/src/localization/StringSet.type.d.ts +47 -7
- package/lib/typescript/src/platform/createFileService.native.d.ts +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +10 -10
- package/src/components/ChannelCover.tsx +23 -3
- package/src/components/MessageRenderer/MessageIncomingAvatar.tsx +9 -2
- package/src/components/MessageRenderer/index.tsx +1 -1
- package/src/components/TypedPlaceholder.tsx +4 -4
- package/src/components/UserActionBar.tsx +10 -4
- package/src/containers/GroupChannelPreviewContainer.tsx +5 -0
- package/src/containers/SendbirdUIKitContainer.tsx +29 -10
- package/src/contexts/{Localization.tsx → LocalizationCtx.tsx} +0 -0
- package/src/contexts/{PlatformService.tsx → PlatformServiceCtx.tsx} +0 -0
- package/src/contexts/{SendbirdChat.tsx → SendbirdChatCtx.tsx} +10 -4
- package/src/contexts/UserProfileCtx.tsx +126 -0
- package/src/domain/groupChannel/component/GroupChannelInput/EditInput.tsx +3 -1
- package/src/domain/groupChannel/component/GroupChannelInput/SendInput.tsx +17 -3
- package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +11 -8
- package/src/domain/groupChannel/types.ts +1 -1
- package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.tsx +14 -0
- package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.tsx +32 -0
- package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.tsx +18 -0
- package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.tsx +19 -0
- package/src/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusLoading.tsx +18 -0
- package/src/domain/groupChannelBannedUsers/index.ts +6 -0
- package/src/domain/groupChannelBannedUsers/module/createGroupChannelBannedUsersModule.tsx +21 -0
- package/src/domain/groupChannelBannedUsers/module/moduleContext.tsx +30 -0
- package/src/domain/groupChannelBannedUsers/types.ts +50 -0
- package/src/domain/groupChannelList/component/GroupChannelListTypeSelector.tsx +37 -43
- package/src/domain/groupChannelList/types.ts +3 -9
- package/src/domain/groupChannelModeration/component/GroupChannelModerationHeader.tsx +14 -0
- package/src/domain/groupChannelModeration/component/GroupChannelModerationMenu.tsx +84 -0
- package/src/domain/groupChannelModeration/index.ts +4 -0
- package/src/domain/groupChannelModeration/module/createGroupChannelModerationModule.tsx +15 -0
- package/src/domain/groupChannelModeration/module/moduleContext.tsx +33 -0
- package/src/domain/groupChannelModeration/types.ts +48 -0
- package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersHeader.tsx +14 -0
- package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersList.tsx +30 -0
- package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusEmpty.tsx +18 -0
- package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusError.tsx +19 -0
- package/src/domain/groupChannelMutedMembers/component/GroupChannelMutedMembersStatusLoading.tsx +18 -0
- package/src/domain/groupChannelMutedMembers/index.ts +7 -0
- package/src/domain/groupChannelMutedMembers/module/createGroupChannelMutedMembersModule.tsx +21 -0
- package/src/domain/groupChannelMutedMembers/module/moduleContext.tsx +30 -0
- package/src/domain/groupChannelMutedMembers/types.ts +50 -0
- package/src/domain/groupChannelOperators/component/GroupChannelOperatorsHeader.tsx +25 -0
- package/src/domain/groupChannelOperators/component/GroupChannelOperatorsList.tsx +29 -0
- package/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusEmpty.tsx +18 -0
- package/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusError.tsx +19 -0
- package/src/domain/groupChannelOperators/component/GroupChannelOperatorsStatusLoading.tsx +18 -0
- package/src/domain/groupChannelOperators/index.ts +7 -0
- package/src/domain/groupChannelOperators/module/createGroupChannelOperatorsModule.tsx +21 -0
- package/src/domain/groupChannelOperators/module/moduleContext.tsx +30 -0
- package/src/domain/groupChannelOperators/types.ts +52 -0
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.tsx +2 -7
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +9 -0
- package/src/domain/groupChannelSettings/types.ts +2 -0
- package/src/domain/groupChannelUserList/types.ts +27 -12
- package/src/domain/userList/component/UserListStatusError.tsx +2 -2
- package/src/domain/userList/types.ts +4 -1
- package/src/fragments/createGroupChannelBannedUsersFragment.tsx +80 -0
- package/src/fragments/createGroupChannelCreateFragment.tsx +13 -33
- package/src/fragments/createGroupChannelFragment.tsx +12 -5
- package/src/fragments/createGroupChannelInviteFragment.tsx +28 -50
- package/src/fragments/createGroupChannelListFragment.tsx +4 -10
- package/src/fragments/createGroupChannelMembersFragment.tsx +110 -67
- package/src/fragments/createGroupChannelModerationFragment.tsx +57 -0
- package/src/fragments/createGroupChannelMutedMembersFragment.tsx +93 -0
- package/src/fragments/createGroupChannelOperatorsFragment.tsx +101 -0
- package/src/fragments/createGroupChannelRegisterOperatorFragment.tsx +94 -0
- package/src/fragments/createGroupChannelSettingsFragment.tsx +9 -1
- package/src/hooks/useConnection.ts +2 -0
- package/src/hooks/useContext.ts +10 -3
- package/src/index.ts +10 -4
- package/src/localization/StringSet.type.ts +99 -14
- package/src/platform/createFileService.native.ts +1 -1
- package/src/version.ts +1 -1
- package/lib/commonjs/contexts/Localization.js.map +0 -1
- package/lib/commonjs/contexts/PlatformService.js.map +0 -1
- package/lib/commonjs/contexts/SendbirdChat.js.map +0 -1
- package/lib/module/contexts/Localization.js.map +0 -1
- package/lib/module/contexts/PlatformService.js.map +0 -1
- package/lib/module/contexts/SendbirdChat.js.map +0 -1
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
2
|
+
import { Pressable, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { Avatar, createStyleSheet } from '@sendbird/uikit-react-native-foundation';
|
|
5
5
|
import type { SendbirdMessage } from '@sendbird/uikit-utils';
|
|
6
6
|
|
|
7
|
+
import { useUserProfile } from '../../hooks/useContext';
|
|
8
|
+
|
|
7
9
|
type Props = {
|
|
8
10
|
message: SendbirdMessage;
|
|
9
11
|
grouping: boolean;
|
|
10
12
|
};
|
|
11
13
|
const MessageIncomingAvatar = ({ message, grouping }: Props) => {
|
|
14
|
+
const { show } = useUserProfile();
|
|
12
15
|
if (grouping) return <View style={styles.avatar} />;
|
|
13
16
|
return (
|
|
14
17
|
<View style={styles.avatar}>
|
|
15
|
-
{(message.isFileMessage() || message.isUserMessage()) &&
|
|
18
|
+
{(message.isFileMessage() || message.isUserMessage()) && (
|
|
19
|
+
<Pressable onPress={() => show(message.sender)}>
|
|
20
|
+
<Avatar size={26} uri={message.sender?.profileUrl} />
|
|
21
|
+
</Pressable>
|
|
22
|
+
)}
|
|
16
23
|
</View>
|
|
17
24
|
);
|
|
18
25
|
};
|
|
@@ -6,11 +6,11 @@ import { useLocalization } from '../hooks/useContext';
|
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
8
|
type:
|
|
9
|
-
| 'no-
|
|
9
|
+
| 'no-muted-members'
|
|
10
|
+
| 'no-banned-users'
|
|
10
11
|
| 'no-channels'
|
|
11
12
|
| 'no-messages'
|
|
12
13
|
| 'no-users'
|
|
13
|
-
| 'no-muted-members'
|
|
14
14
|
| 'no-results-found'
|
|
15
15
|
| 'error-wrong'
|
|
16
16
|
| 'loading';
|
|
@@ -19,8 +19,8 @@ type Props = {
|
|
|
19
19
|
const TypedPlaceholder = ({ type, onPressRetry }: Props) => {
|
|
20
20
|
const { STRINGS } = useLocalization();
|
|
21
21
|
switch (type) {
|
|
22
|
-
case 'no-banned-
|
|
23
|
-
return <Placeholder icon={'ban'} message={STRINGS.PLACEHOLDER.
|
|
22
|
+
case 'no-banned-users':
|
|
23
|
+
return <Placeholder icon={'ban'} message={STRINGS.PLACEHOLDER.NO_BANNED_USERS} />;
|
|
24
24
|
case 'no-channels':
|
|
25
25
|
return <Placeholder icon={'chat'} message={STRINGS.PLACEHOLDER.NO_CHANNELS} />;
|
|
26
26
|
case 'no-messages':
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native';
|
|
2
|
+
import { Pressable, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import type { GestureResponderEvent } from 'react-native';
|
|
3
4
|
|
|
4
5
|
import { Avatar, Icon, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
5
6
|
import { conditionChaining } from '@sendbird/uikit-utils';
|
|
@@ -8,18 +9,23 @@ type Props = {
|
|
|
8
9
|
uri: string;
|
|
9
10
|
name: string;
|
|
10
11
|
label?: string;
|
|
12
|
+
|
|
11
13
|
muted: boolean;
|
|
12
14
|
disabled: boolean;
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
onPressActionMenu?: (ev: GestureResponderEvent) => void;
|
|
17
|
+
onPressAvatar?: (ev: GestureResponderEvent) => void;
|
|
14
18
|
};
|
|
15
|
-
const UserActionBar = ({ muted, uri, name, disabled, onPressActionMenu,
|
|
19
|
+
const UserActionBar = ({ muted, uri, name, disabled, label, onPressActionMenu, onPressAvatar }: Props) => {
|
|
16
20
|
const { colors } = useUIKitTheme();
|
|
17
21
|
|
|
18
22
|
const iconColor = conditionChaining([disabled], [colors.onBackground04, colors.onBackground01]);
|
|
19
23
|
|
|
20
24
|
return (
|
|
21
25
|
<View style={styles.container}>
|
|
22
|
-
<
|
|
26
|
+
<Pressable onPress={onPressAvatar} style={styles.avatar}>
|
|
27
|
+
<Avatar muted={muted} size={36} uri={uri} />
|
|
28
|
+
</Pressable>
|
|
23
29
|
<View style={[styles.infoContainer, { borderBottomColor: colors.onBackground04 }]}>
|
|
24
30
|
<Text subtitle2 numberOfLines={1} style={styles.name} color={colors.onBackground01}>
|
|
25
31
|
{name}
|
|
@@ -102,6 +102,7 @@ const GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props)
|
|
|
102
102
|
badgeCount={channel.unreadMessageCount}
|
|
103
103
|
memberCount={channel.memberCount > 2 ? channel.memberCount : undefined}
|
|
104
104
|
frozen={channel.isFrozen}
|
|
105
|
+
broadcast={channel.isBroadcast}
|
|
105
106
|
notificationOff={channel.myPushTriggerOption === 'off'}
|
|
106
107
|
/>
|
|
107
108
|
</Pressable>
|
|
@@ -112,6 +113,10 @@ const styles = createStyleSheet({
|
|
|
112
113
|
titleCaptionIcon: {
|
|
113
114
|
marginRight: 4,
|
|
114
115
|
},
|
|
116
|
+
broadcastCover: {
|
|
117
|
+
padding: 12,
|
|
118
|
+
borderRadius: 28,
|
|
119
|
+
},
|
|
115
120
|
});
|
|
116
121
|
|
|
117
122
|
export default GroupChannelPreviewContainer;
|
|
@@ -14,11 +14,19 @@ import {
|
|
|
14
14
|
ToastProvider,
|
|
15
15
|
UIKitThemeProvider,
|
|
16
16
|
} from '@sendbird/uikit-react-native-foundation';
|
|
17
|
-
import type {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
import type {
|
|
18
|
+
SendbirdBaseChannel,
|
|
19
|
+
SendbirdChatSDK,
|
|
20
|
+
SendbirdGroupChannelCreateParams,
|
|
21
|
+
SendbirdMember,
|
|
22
|
+
SendbirdUser,
|
|
23
|
+
} from '@sendbird/uikit-utils';
|
|
24
|
+
|
|
25
|
+
import { LocalizationProvider } from '../contexts/LocalizationCtx';
|
|
26
|
+
import { PlatformServiceProvider } from '../contexts/PlatformServiceCtx';
|
|
27
|
+
import type { UIKitFeaturesInSendbirdChatContext } from '../contexts/SendbirdChatCtx';
|
|
28
|
+
import { SendbirdChatProvider } from '../contexts/SendbirdChatCtx';
|
|
29
|
+
import { UserProfileProvider } from '../contexts/UserProfileCtx';
|
|
22
30
|
import { useLocalization } from '../hooks/useContext';
|
|
23
31
|
import InternalLocalCacheStorage from '../libs/InternalLocalCacheStorage';
|
|
24
32
|
import StringSetEn from '../localization/StringSet.en';
|
|
@@ -52,10 +60,7 @@ export type SendbirdUIKitContainerProps = React.PropsWithChildren<{
|
|
|
52
60
|
chatOptions?: {
|
|
53
61
|
localCacheStorage?: LocalCacheStorage;
|
|
54
62
|
onInitialized?: (sdkInstance: SendbirdChatSDK) => SendbirdChatSDK;
|
|
55
|
-
|
|
56
|
-
enableChannelListTypingIndicator?: boolean;
|
|
57
|
-
enableChannelListMessageReceiptStatus?: boolean;
|
|
58
|
-
};
|
|
63
|
+
} & Partial<UIKitFeaturesInSendbirdChatContext>;
|
|
59
64
|
localization?: {
|
|
60
65
|
stringSet?: StringSet;
|
|
61
66
|
};
|
|
@@ -69,6 +74,13 @@ export type SendbirdUIKitContainerProps = React.PropsWithChildren<{
|
|
|
69
74
|
toast?: {
|
|
70
75
|
dismissTimeout?: number;
|
|
71
76
|
};
|
|
77
|
+
userProfile?: {
|
|
78
|
+
onCreateChannel: (channel: SendbirdBaseChannel) => void;
|
|
79
|
+
onBeforeCreateChannel?: (
|
|
80
|
+
channelParams: SendbirdGroupChannelCreateParams,
|
|
81
|
+
users: SendbirdUser[] | SendbirdMember[],
|
|
82
|
+
) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;
|
|
83
|
+
};
|
|
72
84
|
errorBoundary?: {
|
|
73
85
|
onError?: (props: ErrorBoundaryProps) => void;
|
|
74
86
|
ErrorInfoComponent?: (props: ErrorBoundaryProps) => JSX.Element;
|
|
@@ -83,6 +95,7 @@ const SendbirdUIKitContainer = ({
|
|
|
83
95
|
localization,
|
|
84
96
|
styles,
|
|
85
97
|
toast,
|
|
98
|
+
userProfile,
|
|
86
99
|
errorBoundary,
|
|
87
100
|
}: SendbirdUIKitContainerProps) => {
|
|
88
101
|
const unsubscribes = useRef<(() => void)[]>([]).current;
|
|
@@ -147,6 +160,7 @@ const SendbirdUIKitContainer = ({
|
|
|
147
160
|
enableAutoPushTokenRegistration={chatOptions?.enableAutoPushTokenRegistration ?? true}
|
|
148
161
|
enableChannelListTypingIndicator={chatOptions?.enableChannelListTypingIndicator ?? false}
|
|
149
162
|
enableChannelListMessageReceiptStatus={chatOptions?.enableChannelListMessageReceiptStatus ?? false}
|
|
163
|
+
enableUseUserIdForNickname={chatOptions?.enableUseUserIdForNickname ?? false}
|
|
150
164
|
>
|
|
151
165
|
<LocalizationProvider stringSet={localization?.stringSet ?? StringSetEn}>
|
|
152
166
|
<PlatformServiceProvider
|
|
@@ -163,7 +177,12 @@ const SendbirdUIKitContainer = ({
|
|
|
163
177
|
>
|
|
164
178
|
<LocalizedDialogProvider>
|
|
165
179
|
<ToastProvider dismissTimeout={toast?.dismissTimeout}>
|
|
166
|
-
<
|
|
180
|
+
<UserProfileProvider
|
|
181
|
+
onCreateChannel={userProfile?.onCreateChannel}
|
|
182
|
+
onBeforeCreateChannel={userProfile?.onBeforeCreateChannel}
|
|
183
|
+
>
|
|
184
|
+
<InternalErrorBoundaryContainer {...errorBoundary}>{children}</InternalErrorBoundaryContainer>
|
|
185
|
+
</UserProfileProvider>
|
|
167
186
|
</ToastProvider>
|
|
168
187
|
</LocalizedDialogProvider>
|
|
169
188
|
</HeaderStyleProvider>
|
|
File without changes
|
|
File without changes
|
|
@@ -12,13 +12,16 @@ import { confirmAndMarkAsDelivered, useForceUpdate } from '@sendbird/uikit-utils
|
|
|
12
12
|
|
|
13
13
|
import type { FileType } from '../platform/types';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
sdkInstance: SendbirdChatSDK;
|
|
17
|
-
|
|
15
|
+
export interface UIKitFeaturesInSendbirdChatContext {
|
|
18
16
|
enableAutoPushTokenRegistration: boolean;
|
|
19
17
|
enableChannelListTypingIndicator: boolean;
|
|
20
18
|
enableChannelListMessageReceiptStatus: boolean;
|
|
21
|
-
|
|
19
|
+
enableUseUserIdForNickname: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface Props extends UIKitFeaturesInSendbirdChatContext, React.PropsWithChildren {
|
|
23
|
+
sdkInstance: SendbirdChatSDK;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
type Context = {
|
|
24
27
|
sdk: SendbirdChatSDK;
|
|
@@ -34,6 +37,7 @@ type Context = {
|
|
|
34
37
|
autoPushTokenRegistrationEnabled: boolean;
|
|
35
38
|
channelListTypingIndicatorEnabled: boolean;
|
|
36
39
|
channelListMessageReceiptStatusEnabled: boolean;
|
|
40
|
+
useUserIdForNicknameEnabled: boolean;
|
|
37
41
|
|
|
38
42
|
// Sendbird application features
|
|
39
43
|
deliveryReceiptEnabled: boolean;
|
|
@@ -50,6 +54,7 @@ export const SendbirdChatProvider = ({
|
|
|
50
54
|
enableAutoPushTokenRegistration,
|
|
51
55
|
enableChannelListMessageReceiptStatus,
|
|
52
56
|
enableChannelListTypingIndicator,
|
|
57
|
+
enableUseUserIdForNickname,
|
|
53
58
|
}: Props) => {
|
|
54
59
|
const [currentUser, _setCurrentUser] = useState<SendbirdUser>();
|
|
55
60
|
const forceUpdate = useForceUpdate();
|
|
@@ -116,6 +121,7 @@ export const SendbirdChatProvider = ({
|
|
|
116
121
|
autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,
|
|
117
122
|
channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,
|
|
118
123
|
channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus,
|
|
124
|
+
useUserIdForNicknameEnabled: enableUseUserIdForNickname,
|
|
119
125
|
},
|
|
120
126
|
};
|
|
121
127
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import React, { useCallback, useContext, useState } from 'react';
|
|
2
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
+
|
|
4
|
+
import { Modal, OutlinedButton, ProfileCard, createStyleSheet } from '@sendbird/uikit-react-native-foundation';
|
|
5
|
+
import type {
|
|
6
|
+
SendbirdGroupChannel,
|
|
7
|
+
SendbirdGroupChannelCreateParams,
|
|
8
|
+
SendbirdMember,
|
|
9
|
+
SendbirdUser,
|
|
10
|
+
} from '@sendbird/uikit-utils';
|
|
11
|
+
import { Logger, PASS, useIIFE } from '@sendbird/uikit-utils';
|
|
12
|
+
|
|
13
|
+
import { LocalizationContext } from '../contexts/LocalizationCtx';
|
|
14
|
+
import { SendbirdChatContext } from '../contexts/SendbirdChatCtx';
|
|
15
|
+
|
|
16
|
+
type OnCreateChannel = (channel: SendbirdGroupChannel) => void;
|
|
17
|
+
type OnBeforeCreateChannel = (
|
|
18
|
+
channelParams: SendbirdGroupChannelCreateParams,
|
|
19
|
+
users: SendbirdUser[] | SendbirdMember[],
|
|
20
|
+
) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;
|
|
21
|
+
|
|
22
|
+
export type UserProfileContextType = {
|
|
23
|
+
show(user: SendbirdUser | SendbirdMember): void;
|
|
24
|
+
hide(): void;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type Props = React.PropsWithChildren<{
|
|
28
|
+
onCreateChannel?: OnCreateChannel;
|
|
29
|
+
onBeforeCreateChannel?: OnBeforeCreateChannel;
|
|
30
|
+
}>;
|
|
31
|
+
|
|
32
|
+
export const UserProfileContext = React.createContext<UserProfileContextType | null>(null);
|
|
33
|
+
export const UserProfileProvider = ({ children, onCreateChannel, onBeforeCreateChannel = PASS }: Props) => {
|
|
34
|
+
const chatContext = useContext(SendbirdChatContext);
|
|
35
|
+
const localizationContext = useContext(LocalizationContext);
|
|
36
|
+
|
|
37
|
+
if (!chatContext) throw new Error('SendbirdChatContext is not provided');
|
|
38
|
+
if (!localizationContext) throw new Error('LocalizationContext is not provided');
|
|
39
|
+
|
|
40
|
+
const { bottom, left, right } = useSafeAreaInsets();
|
|
41
|
+
|
|
42
|
+
const [user, setUser] = useState<SendbirdUser | SendbirdMember>();
|
|
43
|
+
const [visible, setVisible] = useState(false);
|
|
44
|
+
|
|
45
|
+
const show: UserProfileContextType['show'] = useCallback((user) => {
|
|
46
|
+
setUser(user);
|
|
47
|
+
setVisible(true);
|
|
48
|
+
}, []);
|
|
49
|
+
|
|
50
|
+
const hide: UserProfileContextType['hide'] = useCallback(() => {
|
|
51
|
+
setVisible(false);
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
54
|
+
const userProfileButton = useIIFE(() => {
|
|
55
|
+
const isMe = chatContext.currentUser && user?.userId === chatContext.currentUser.userId;
|
|
56
|
+
if (isMe) return undefined;
|
|
57
|
+
|
|
58
|
+
const onPressMessageButton = async () => {
|
|
59
|
+
if (user) {
|
|
60
|
+
const params: SendbirdGroupChannelCreateParams = {
|
|
61
|
+
invitedUserIds: [user.userId],
|
|
62
|
+
name: '',
|
|
63
|
+
coverUrl: '',
|
|
64
|
+
isDistinct: false,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
if (chatContext.currentUser) params.operatorUserIds = [chatContext.currentUser.userId];
|
|
68
|
+
const processedParams = await onBeforeCreateChannel(params, [user]);
|
|
69
|
+
|
|
70
|
+
hide();
|
|
71
|
+
const channel = await chatContext.sdk.groupChannel.createChannel(processedParams);
|
|
72
|
+
|
|
73
|
+
if (onCreateChannel) {
|
|
74
|
+
onCreateChannel(channel);
|
|
75
|
+
} else {
|
|
76
|
+
Logger.warn(
|
|
77
|
+
'Please set `onCreateChannel` before message to user from profile card, see `userProfile` prop in the `SendbirdUIKitContainer` props',
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<OutlinedButton onPress={onPressMessageButton}>
|
|
85
|
+
{localizationContext.STRINGS.PROFILE_CARD.BUTTON_MESSAGE}
|
|
86
|
+
</OutlinedButton>
|
|
87
|
+
);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<UserProfileContext.Provider value={{ show, hide }}>
|
|
92
|
+
{children}
|
|
93
|
+
<Modal
|
|
94
|
+
type={'slide'}
|
|
95
|
+
onClose={hide}
|
|
96
|
+
onDismiss={() => setUser(undefined)}
|
|
97
|
+
visible={visible && Boolean(user)}
|
|
98
|
+
backgroundStyle={styles.modal}
|
|
99
|
+
>
|
|
100
|
+
{user && (
|
|
101
|
+
<ProfileCard
|
|
102
|
+
containerStyle={[
|
|
103
|
+
styles.profileCardContainer,
|
|
104
|
+
{ paddingLeft: left, paddingRight: right, paddingBottom: bottom },
|
|
105
|
+
]}
|
|
106
|
+
uri={user.profileUrl}
|
|
107
|
+
username={user.nickname || localizationContext.STRINGS.LABELS.USER_NO_NAME}
|
|
108
|
+
bodyLabel={localizationContext.STRINGS.PROFILE_CARD.BODY_LABEL}
|
|
109
|
+
body={localizationContext.STRINGS.PROFILE_CARD.BODY(user)}
|
|
110
|
+
button={userProfileButton}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
113
|
+
</Modal>
|
|
114
|
+
</UserProfileContext.Provider>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const styles = createStyleSheet({
|
|
119
|
+
modal: {
|
|
120
|
+
justifyContent: 'flex-end',
|
|
121
|
+
},
|
|
122
|
+
profileCardContainer: {
|
|
123
|
+
borderTopLeftRadius: 8,
|
|
124
|
+
borderTopRightRadius: 8,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
@@ -12,10 +12,11 @@ type EditInputProps = GroupChannelProps['Input'] & {
|
|
|
12
12
|
setText: (val: string) => void;
|
|
13
13
|
editMessage: SendbirdUserMessage | SendbirdFileMessage;
|
|
14
14
|
setEditMessage: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;
|
|
15
|
+
disabled: boolean;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
const AUTO_FOCUS = Platform.select({ ios: false, android: true, default: false });
|
|
18
|
-
const EditInput = ({ text, setText, editMessage, setEditMessage, onUpdateUserMessage }: EditInputProps) => {
|
|
19
|
+
const EditInput = ({ text, setText, editMessage, setEditMessage, onUpdateUserMessage, disabled }: EditInputProps) => {
|
|
19
20
|
const { STRINGS } = useLocalization();
|
|
20
21
|
const inputRef = useRef<RNTextInput>(null);
|
|
21
22
|
const toast = useToast();
|
|
@@ -45,6 +46,7 @@ const EditInput = ({ text, setText, editMessage, setEditMessage, onUpdateUserMes
|
|
|
45
46
|
<View style={styles.editInputContainer}>
|
|
46
47
|
<View style={styles.inputWrapper}>
|
|
47
48
|
<TextInput
|
|
49
|
+
editable={!disabled}
|
|
48
50
|
autoFocus={AUTO_FOCUS}
|
|
49
51
|
ref={inputRef}
|
|
50
52
|
multiline
|
|
@@ -20,9 +20,19 @@ import type { GroupChannelProps } from '../../types';
|
|
|
20
20
|
type SendInputProps = GroupChannelProps['Input'] & {
|
|
21
21
|
text: string;
|
|
22
22
|
setText: (val: string) => void;
|
|
23
|
+
frozen: boolean;
|
|
24
|
+
muted: boolean;
|
|
23
25
|
disabled: boolean;
|
|
24
26
|
};
|
|
25
|
-
const SendInput = ({
|
|
27
|
+
const SendInput = ({
|
|
28
|
+
onSendUserMessage,
|
|
29
|
+
onSendFileMessage,
|
|
30
|
+
text,
|
|
31
|
+
setText,
|
|
32
|
+
disabled,
|
|
33
|
+
frozen,
|
|
34
|
+
muted,
|
|
35
|
+
}: SendInputProps) => {
|
|
26
36
|
const { STRINGS } = useLocalization();
|
|
27
37
|
const { fileService } = usePlatformService();
|
|
28
38
|
const { colors } = useUIKitTheme();
|
|
@@ -120,8 +130,12 @@ const SendInput = ({ onSendUserMessage, onSendFileMessage, text, setText, disabl
|
|
|
120
130
|
onChangeText={setText}
|
|
121
131
|
style={styles.input}
|
|
122
132
|
placeholder={conditionChaining(
|
|
123
|
-
[
|
|
124
|
-
[
|
|
133
|
+
[frozen, muted],
|
|
134
|
+
[
|
|
135
|
+
STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_DISABLED,
|
|
136
|
+
STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_MUTED,
|
|
137
|
+
STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE,
|
|
138
|
+
],
|
|
125
139
|
)}
|
|
126
140
|
/>
|
|
127
141
|
{Boolean(text.trim()) && (
|
|
@@ -3,7 +3,7 @@ import { KeyboardAvoidingView, Platform, View } from 'react-native';
|
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
4
|
|
|
5
5
|
import { useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
6
|
-
import {
|
|
6
|
+
import { getGroupChannelChatAvailableState, useIIFE } from '@sendbird/uikit-utils';
|
|
7
7
|
|
|
8
8
|
import { GroupChannelContexts } from '../../module/moduleContext';
|
|
9
9
|
import type { GroupChannelProps } from '../../types';
|
|
@@ -12,15 +12,13 @@ import SendInput from './SendInput';
|
|
|
12
12
|
|
|
13
13
|
const KEYBOARD_AVOID_VIEW_BEHAVIOR = Platform.select({ ios: 'padding' as const, default: undefined });
|
|
14
14
|
const GroupChannelInput = (props: GroupChannelProps['Input']) => {
|
|
15
|
-
const { channel } = props;
|
|
16
|
-
|
|
17
15
|
const { left, right, bottom } = useSafeAreaInsets();
|
|
18
16
|
const { colors } = useUIKitTheme();
|
|
19
|
-
const { editMessage, setEditMessage, keyboardAvoidOffset = 0 } = useContext(GroupChannelContexts.Fragment);
|
|
17
|
+
const { channel, editMessage, setEditMessage, keyboardAvoidOffset = 0 } = useContext(GroupChannelContexts.Fragment);
|
|
20
18
|
|
|
21
19
|
const [text, setText] = useState('');
|
|
22
20
|
const textTmpRef = useRef('');
|
|
23
|
-
const
|
|
21
|
+
const chatAvailableState = getGroupChannelChatAvailableState(channel);
|
|
24
22
|
|
|
25
23
|
useEffect(() => {
|
|
26
24
|
if (text.length === 0) channel.endTyping();
|
|
@@ -28,13 +26,13 @@ const GroupChannelInput = (props: GroupChannelProps['Input']) => {
|
|
|
28
26
|
}, [text]);
|
|
29
27
|
|
|
30
28
|
useEffect(() => {
|
|
31
|
-
if (
|
|
29
|
+
if (chatAvailableState.disabled) {
|
|
32
30
|
textTmpRef.current = text;
|
|
33
31
|
setText('');
|
|
34
32
|
} else {
|
|
35
33
|
setText(textTmpRef.current);
|
|
36
34
|
}
|
|
37
|
-
}, [
|
|
35
|
+
}, [chatAvailableState.disabled]);
|
|
38
36
|
|
|
39
37
|
const inputMode = useIIFE(() => {
|
|
40
38
|
if (!editMessage) return 'send';
|
|
@@ -42,6 +40,10 @@ const GroupChannelInput = (props: GroupChannelProps['Input']) => {
|
|
|
42
40
|
return 'edit';
|
|
43
41
|
});
|
|
44
42
|
|
|
43
|
+
if (!props.shouldRenderInput) {
|
|
44
|
+
return <SafeAreaBottom height={bottom} />;
|
|
45
|
+
}
|
|
46
|
+
|
|
45
47
|
return (
|
|
46
48
|
<KeyboardAvoidingView
|
|
47
49
|
keyboardVerticalOffset={-bottom + keyboardAvoidOffset}
|
|
@@ -49,7 +51,7 @@ const GroupChannelInput = (props: GroupChannelProps['Input']) => {
|
|
|
49
51
|
>
|
|
50
52
|
<View style={{ paddingLeft: left, paddingRight: right, backgroundColor: colors.background }}>
|
|
51
53
|
<View style={{ justifyContent: 'center', width: '100%' }}>
|
|
52
|
-
{inputMode === 'send' && <SendInput {...props} text={text} setText={setText}
|
|
54
|
+
{inputMode === 'send' && <SendInput {...props} text={text} setText={setText} {...chatAvailableState} />}
|
|
53
55
|
{inputMode === 'edit' && editMessage && (
|
|
54
56
|
<EditInput
|
|
55
57
|
{...props}
|
|
@@ -57,6 +59,7 @@ const GroupChannelInput = (props: GroupChannelProps['Input']) => {
|
|
|
57
59
|
setText={setText}
|
|
58
60
|
editMessage={editMessage}
|
|
59
61
|
setEditMessage={setEditMessage}
|
|
62
|
+
disabled={chatAvailableState.disabled}
|
|
60
63
|
/>
|
|
61
64
|
)}
|
|
62
65
|
</View>
|
|
@@ -89,7 +89,7 @@ export interface GroupChannelProps {
|
|
|
89
89
|
onPressImageMessage?: (message: SendbirdFileMessage, uri: string) => void;
|
|
90
90
|
};
|
|
91
91
|
Input: {
|
|
92
|
-
|
|
92
|
+
shouldRenderInput: boolean;
|
|
93
93
|
onSendFileMessage: (file: FileType) => Promise<void>;
|
|
94
94
|
onSendUserMessage: (text: string) => Promise<void>;
|
|
95
95
|
onUpdateFileMessage: (editedFile: FileType, message: SendbirdFileMessage) => Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Icon, useHeaderStyle } from '@sendbird/uikit-react-native-foundation';
|
|
4
|
+
|
|
5
|
+
import { GroupChannelBannedUsersContexts } from '../module/moduleContext';
|
|
6
|
+
import type { GroupChannelBannedUsersProps } from '../types';
|
|
7
|
+
|
|
8
|
+
const GroupChannelBannedUsersHeader = ({ onPressHeaderLeft }: GroupChannelBannedUsersProps['Header']) => {
|
|
9
|
+
const { headerTitle } = useContext(GroupChannelBannedUsersContexts.Fragment);
|
|
10
|
+
const { HeaderComponent } = useHeaderStyle();
|
|
11
|
+
return <HeaderComponent title={headerTitle} left={<Icon icon={'arrow-left'} />} onPressLeft={onPressHeaderLeft} />;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default GroupChannelBannedUsersHeader;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlatList, ListRenderItem } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import { SendbirdRestrictedUser, useFreshCallback } from '@sendbird/uikit-utils';
|
|
6
|
+
|
|
7
|
+
import type { GroupChannelBannedUsersProps } from '../types';
|
|
8
|
+
|
|
9
|
+
const GroupChannelBannedUsersList = ({
|
|
10
|
+
renderUser,
|
|
11
|
+
bannedUsers,
|
|
12
|
+
onLoadNext,
|
|
13
|
+
ListEmptyComponent,
|
|
14
|
+
}: GroupChannelBannedUsersProps['List']) => {
|
|
15
|
+
const renderItem: ListRenderItem<SendbirdRestrictedUser> = useFreshCallback(({ item }) =>
|
|
16
|
+
renderUser?.({ user: item }),
|
|
17
|
+
);
|
|
18
|
+
const { left, right } = useSafeAreaInsets();
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<FlatList
|
|
22
|
+
data={bannedUsers}
|
|
23
|
+
renderItem={renderItem}
|
|
24
|
+
contentContainerStyle={{ paddingLeft: left, paddingRight: right, flexGrow: 1 }}
|
|
25
|
+
ListEmptyComponent={ListEmptyComponent}
|
|
26
|
+
onEndReached={() => onLoadNext()}
|
|
27
|
+
bounces={false}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default GroupChannelBannedUsersList;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import TypedPlaceholder from '../../../components/TypedPlaceholder';
|
|
5
|
+
|
|
6
|
+
const GroupChannelBannedUsersStatusEmpty = () => {
|
|
7
|
+
return (
|
|
8
|
+
<View style={styles.container}>
|
|
9
|
+
<TypedPlaceholder type={'no-banned-users'} />
|
|
10
|
+
</View>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export default GroupChannelBannedUsersStatusEmpty;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import TypedPlaceholder from '../../../components/TypedPlaceholder';
|
|
5
|
+
import type { GroupChannelBannedUsersModule } from '../types';
|
|
6
|
+
|
|
7
|
+
const GroupChannelBannedUsersStatusError: GroupChannelBannedUsersModule['StatusError'] = ({ onPressRetry }) => {
|
|
8
|
+
return (
|
|
9
|
+
<View style={styles.container}>
|
|
10
|
+
<TypedPlaceholder type={'error-wrong'} onPressRetry={onPressRetry} />
|
|
11
|
+
</View>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const styles = StyleSheet.create({
|
|
16
|
+
container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export default GroupChannelBannedUsersStatusError;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import TypedPlaceholder from '../../../components/TypedPlaceholder';
|
|
5
|
+
|
|
6
|
+
const GroupChannelBannedUsersStatusLoading = () => {
|
|
7
|
+
return (
|
|
8
|
+
<View style={styles.container}>
|
|
9
|
+
<TypedPlaceholder type={'loading'} />
|
|
10
|
+
</View>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export default GroupChannelBannedUsersStatusLoading;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as GroupChannelBannedUsersList } from './component/GroupChannelBannedUsersList';
|
|
2
|
+
export { default as GroupChannelBannedUsersHeader } from './component/GroupChannelBannedUsersHeader';
|
|
3
|
+
export { default as GroupChannelBannedUsersStatusLoading } from './component/GroupChannelBannedUsersStatusLoading';
|
|
4
|
+
export { default as GroupChannelBannedUsersStatusEmpty } from './component/GroupChannelBannedUsersStatusEmpty';
|
|
5
|
+
export { default as createGroupChannelBannedUsersModule } from './module/createGroupChannelBannedUsersModule';
|
|
6
|
+
export { GroupChannelBannedUsersContextsProvider, GroupChannelBannedUsersContexts } from './module/moduleContext';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import GroupChannelBannedUsersHeader from '../component/GroupChannelBannedUsersHeader';
|
|
2
|
+
import GroupChannelBannedUsersList from '../component/GroupChannelBannedUsersList';
|
|
3
|
+
import GroupChannelBannedUsersStatusEmpty from '../component/GroupChannelBannedUsersStatusEmpty';
|
|
4
|
+
import GroupChannelBannedUsersStatusError from '../component/GroupChannelBannedUsersStatusError';
|
|
5
|
+
import GroupChannelBannedUsersStatusLoading from '../component/GroupChannelBannedUsersStatusLoading';
|
|
6
|
+
import type { GroupChannelBannedUsersModule } from '../types';
|
|
7
|
+
import { GroupChannelBannedUsersContextsProvider } from './moduleContext';
|
|
8
|
+
|
|
9
|
+
const createGroupChannelBannedUsersModule = ({
|
|
10
|
+
Header = GroupChannelBannedUsersHeader,
|
|
11
|
+
List = GroupChannelBannedUsersList,
|
|
12
|
+
StatusLoading = GroupChannelBannedUsersStatusLoading,
|
|
13
|
+
StatusEmpty = GroupChannelBannedUsersStatusEmpty,
|
|
14
|
+
StatusError = GroupChannelBannedUsersStatusError,
|
|
15
|
+
Provider = GroupChannelBannedUsersContextsProvider,
|
|
16
|
+
...module
|
|
17
|
+
}: Partial<GroupChannelBannedUsersModule> = {}): GroupChannelBannedUsersModule => {
|
|
18
|
+
return { Header, List, Provider, StatusEmpty, StatusLoading, StatusError, ...module };
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default createGroupChannelBannedUsersModule;
|