@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
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UserProfileProvider = exports.UserProfileContext = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
11
|
+
|
|
12
|
+
var _uikitReactNativeFoundation = require("@sendbird/uikit-react-native-foundation");
|
|
13
|
+
|
|
14
|
+
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
15
|
+
|
|
16
|
+
var _LocalizationCtx = require("../contexts/LocalizationCtx");
|
|
17
|
+
|
|
18
|
+
var _SendbirdChatCtx = require("../contexts/SendbirdChatCtx");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
const UserProfileContext = /*#__PURE__*/_react.default.createContext(null);
|
|
25
|
+
|
|
26
|
+
exports.UserProfileContext = UserProfileContext;
|
|
27
|
+
|
|
28
|
+
const UserProfileProvider = _ref => {
|
|
29
|
+
let {
|
|
30
|
+
children,
|
|
31
|
+
onCreateChannel,
|
|
32
|
+
onBeforeCreateChannel = _uikitUtils.PASS
|
|
33
|
+
} = _ref;
|
|
34
|
+
const chatContext = (0, _react.useContext)(_SendbirdChatCtx.SendbirdChatContext);
|
|
35
|
+
const localizationContext = (0, _react.useContext)(_LocalizationCtx.LocalizationContext);
|
|
36
|
+
if (!chatContext) throw new Error('SendbirdChatContext is not provided');
|
|
37
|
+
if (!localizationContext) throw new Error('LocalizationContext is not provided');
|
|
38
|
+
const {
|
|
39
|
+
bottom,
|
|
40
|
+
left,
|
|
41
|
+
right
|
|
42
|
+
} = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
43
|
+
const [user, setUser] = (0, _react.useState)();
|
|
44
|
+
const [visible, setVisible] = (0, _react.useState)(false);
|
|
45
|
+
const show = (0, _react.useCallback)(user => {
|
|
46
|
+
setUser(user);
|
|
47
|
+
setVisible(true);
|
|
48
|
+
}, []);
|
|
49
|
+
const hide = (0, _react.useCallback)(() => {
|
|
50
|
+
setVisible(false);
|
|
51
|
+
}, []);
|
|
52
|
+
const userProfileButton = (0, _uikitUtils.useIIFE)(() => {
|
|
53
|
+
const isMe = chatContext.currentUser && (user === null || user === void 0 ? void 0 : user.userId) === chatContext.currentUser.userId;
|
|
54
|
+
if (isMe) return undefined;
|
|
55
|
+
|
|
56
|
+
const onPressMessageButton = async () => {
|
|
57
|
+
if (user) {
|
|
58
|
+
const params = {
|
|
59
|
+
invitedUserIds: [user.userId],
|
|
60
|
+
name: '',
|
|
61
|
+
coverUrl: '',
|
|
62
|
+
isDistinct: false
|
|
63
|
+
};
|
|
64
|
+
if (chatContext.currentUser) params.operatorUserIds = [chatContext.currentUser.userId];
|
|
65
|
+
const processedParams = await onBeforeCreateChannel(params, [user]);
|
|
66
|
+
hide();
|
|
67
|
+
const channel = await chatContext.sdk.groupChannel.createChannel(processedParams);
|
|
68
|
+
|
|
69
|
+
if (onCreateChannel) {
|
|
70
|
+
onCreateChannel(channel);
|
|
71
|
+
} else {
|
|
72
|
+
_uikitUtils.Logger.warn('Please set `onCreateChannel` before message to user from profile card, see `userProfile` prop in the `SendbirdUIKitContainer` props');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.OutlinedButton, {
|
|
78
|
+
onPress: onPressMessageButton
|
|
79
|
+
}, localizationContext.STRINGS.PROFILE_CARD.BUTTON_MESSAGE);
|
|
80
|
+
});
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement(UserProfileContext.Provider, {
|
|
82
|
+
value: {
|
|
83
|
+
show,
|
|
84
|
+
hide
|
|
85
|
+
}
|
|
86
|
+
}, children, /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.Modal, {
|
|
87
|
+
type: 'slide',
|
|
88
|
+
onClose: hide,
|
|
89
|
+
onDismiss: () => setUser(undefined),
|
|
90
|
+
visible: visible && Boolean(user),
|
|
91
|
+
backgroundStyle: styles.modal
|
|
92
|
+
}, user && /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.ProfileCard, {
|
|
93
|
+
containerStyle: [styles.profileCardContainer, {
|
|
94
|
+
paddingLeft: left,
|
|
95
|
+
paddingRight: right,
|
|
96
|
+
paddingBottom: bottom
|
|
97
|
+
}],
|
|
98
|
+
uri: user.profileUrl,
|
|
99
|
+
username: user.nickname || localizationContext.STRINGS.LABELS.USER_NO_NAME,
|
|
100
|
+
bodyLabel: localizationContext.STRINGS.PROFILE_CARD.BODY_LABEL,
|
|
101
|
+
body: localizationContext.STRINGS.PROFILE_CARD.BODY(user),
|
|
102
|
+
button: userProfileButton
|
|
103
|
+
})));
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
exports.UserProfileProvider = UserProfileProvider;
|
|
107
|
+
const styles = (0, _uikitReactNativeFoundation.createStyleSheet)({
|
|
108
|
+
modal: {
|
|
109
|
+
justifyContent: 'flex-end'
|
|
110
|
+
},
|
|
111
|
+
profileCardContainer: {
|
|
112
|
+
borderTopLeftRadius: 8,
|
|
113
|
+
borderTopRightRadius: 8
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
//# sourceMappingURL=UserProfileCtx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UserProfileContext","React","createContext","UserProfileProvider","children","onCreateChannel","onBeforeCreateChannel","PASS","chatContext","useContext","SendbirdChatContext","localizationContext","LocalizationContext","Error","bottom","left","right","useSafeAreaInsets","user","setUser","useState","visible","setVisible","show","useCallback","hide","userProfileButton","useIIFE","isMe","currentUser","userId","undefined","onPressMessageButton","params","invitedUserIds","name","coverUrl","isDistinct","operatorUserIds","processedParams","channel","sdk","groupChannel","createChannel","Logger","warn","STRINGS","PROFILE_CARD","BUTTON_MESSAGE","Boolean","styles","modal","profileCardContainer","paddingLeft","paddingRight","paddingBottom","profileUrl","nickname","LABELS","USER_NO_NAME","BODY_LABEL","BODY","createStyleSheet","justifyContent","borderTopLeftRadius","borderTopRightRadius"],"sources":["UserProfileCtx.tsx"],"sourcesContent":["import React, { useCallback, useContext, useState } from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Modal, OutlinedButton, ProfileCard, createStyleSheet } from '@sendbird/uikit-react-native-foundation';\nimport type {\n SendbirdGroupChannel,\n SendbirdGroupChannelCreateParams,\n SendbirdMember,\n SendbirdUser,\n} from '@sendbird/uikit-utils';\nimport { Logger, PASS, useIIFE } from '@sendbird/uikit-utils';\n\nimport { LocalizationContext } from '../contexts/LocalizationCtx';\nimport { SendbirdChatContext } from '../contexts/SendbirdChatCtx';\n\ntype OnCreateChannel = (channel: SendbirdGroupChannel) => void;\ntype OnBeforeCreateChannel = (\n channelParams: SendbirdGroupChannelCreateParams,\n users: SendbirdUser[] | SendbirdMember[],\n) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;\n\nexport type UserProfileContextType = {\n show(user: SendbirdUser | SendbirdMember): void;\n hide(): void;\n};\n\ntype Props = React.PropsWithChildren<{\n onCreateChannel?: OnCreateChannel;\n onBeforeCreateChannel?: OnBeforeCreateChannel;\n}>;\n\nexport const UserProfileContext = React.createContext<UserProfileContextType | null>(null);\nexport const UserProfileProvider = ({ children, onCreateChannel, onBeforeCreateChannel = PASS }: Props) => {\n const chatContext = useContext(SendbirdChatContext);\n const localizationContext = useContext(LocalizationContext);\n\n if (!chatContext) throw new Error('SendbirdChatContext is not provided');\n if (!localizationContext) throw new Error('LocalizationContext is not provided');\n\n const { bottom, left, right } = useSafeAreaInsets();\n\n const [user, setUser] = useState<SendbirdUser | SendbirdMember>();\n const [visible, setVisible] = useState(false);\n\n const show: UserProfileContextType['show'] = useCallback((user) => {\n setUser(user);\n setVisible(true);\n }, []);\n\n const hide: UserProfileContextType['hide'] = useCallback(() => {\n setVisible(false);\n }, []);\n\n const userProfileButton = useIIFE(() => {\n const isMe = chatContext.currentUser && user?.userId === chatContext.currentUser.userId;\n if (isMe) return undefined;\n\n const onPressMessageButton = async () => {\n if (user) {\n const params: SendbirdGroupChannelCreateParams = {\n invitedUserIds: [user.userId],\n name: '',\n coverUrl: '',\n isDistinct: false,\n };\n\n if (chatContext.currentUser) params.operatorUserIds = [chatContext.currentUser.userId];\n const processedParams = await onBeforeCreateChannel(params, [user]);\n\n hide();\n const channel = await chatContext.sdk.groupChannel.createChannel(processedParams);\n\n if (onCreateChannel) {\n onCreateChannel(channel);\n } else {\n Logger.warn(\n 'Please set `onCreateChannel` before message to user from profile card, see `userProfile` prop in the `SendbirdUIKitContainer` props',\n );\n }\n }\n };\n\n return (\n <OutlinedButton onPress={onPressMessageButton}>\n {localizationContext.STRINGS.PROFILE_CARD.BUTTON_MESSAGE}\n </OutlinedButton>\n );\n });\n\n return (\n <UserProfileContext.Provider value={{ show, hide }}>\n {children}\n <Modal\n type={'slide'}\n onClose={hide}\n onDismiss={() => setUser(undefined)}\n visible={visible && Boolean(user)}\n backgroundStyle={styles.modal}\n >\n {user && (\n <ProfileCard\n containerStyle={[\n styles.profileCardContainer,\n { paddingLeft: left, paddingRight: right, paddingBottom: bottom },\n ]}\n uri={user.profileUrl}\n username={user.nickname || localizationContext.STRINGS.LABELS.USER_NO_NAME}\n bodyLabel={localizationContext.STRINGS.PROFILE_CARD.BODY_LABEL}\n body={localizationContext.STRINGS.PROFILE_CARD.BODY(user)}\n button={userProfileButton}\n />\n )}\n </Modal>\n </UserProfileContext.Provider>\n );\n};\n\nconst styles = createStyleSheet({\n modal: {\n justifyContent: 'flex-end',\n },\n profileCardContainer: {\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAOA;;AAEA;;AACA;;;;;;AAkBO,MAAMA,kBAAkB,gBAAGC,cAAA,CAAMC,aAAN,CAAmD,IAAnD,CAA3B;;;;AACA,MAAMC,mBAAmB,GAAG,QAAwE;EAAA,IAAvE;IAAEC,QAAF;IAAYC,eAAZ;IAA6BC,qBAAqB,GAAGC;EAArD,CAAuE;EACzG,MAAMC,WAAW,GAAG,IAAAC,iBAAA,EAAWC,oCAAX,CAApB;EACA,MAAMC,mBAAmB,GAAG,IAAAF,iBAAA,EAAWG,oCAAX,CAA5B;EAEA,IAAI,CAACJ,WAAL,EAAkB,MAAM,IAAIK,KAAJ,CAAU,qCAAV,CAAN;EAClB,IAAI,CAACF,mBAAL,EAA0B,MAAM,IAAIE,KAAJ,CA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ATV,EARJ,CAFF,CADF;AA0BD,CAnFM;;;AAqFP,MAAMwB,MAAM,GAAG,IAAAY,4CAAA,EAAiB;EAC9BX,KAAK,EAAE;IACLY,cAAc,EAAE;EADX,CADuB;EAI9BX,oBAAoB,EAAE;IACpBY,mBAAmB,EAAE,CADD;IAEpBC,oBAAoB,EAAE;EAFF;AAJQ,CAAjB,CAAf"}
|
|
@@ -29,7 +29,8 @@ const EditInput = _ref => {
|
|
|
29
29
|
setText,
|
|
30
30
|
editMessage,
|
|
31
31
|
setEditMessage,
|
|
32
|
-
onUpdateUserMessage
|
|
32
|
+
onUpdateUserMessage,
|
|
33
|
+
disabled
|
|
33
34
|
} = _ref;
|
|
34
35
|
const {
|
|
35
36
|
STRINGS
|
|
@@ -66,6 +67,7 @@ const EditInput = _ref => {
|
|
|
66
67
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
67
68
|
style: styles.inputWrapper
|
|
68
69
|
}, /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.TextInput, {
|
|
70
|
+
editable: !disabled,
|
|
69
71
|
autoFocus: AUTO_FOCUS,
|
|
70
72
|
ref: inputRef,
|
|
71
73
|
multiline: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AUTO_FOCUS","Platform","select","ios","android","default","EditInput","text","setText","editMessage","setEditMessage","onUpdateUserMessage","STRINGS","useLocalization","inputRef","useRef","toast","useToast","useEffect","isUserMessage","message","setTimeout","current","focus","onPressCancel","onPressSave","catch","show","TOAST","UPDATE_MSG_ERROR","styles","editInputContainer","inputWrapper","input","GROUP_CHANNEL","INPUT_PLACEHOLDER_ACTIVE","marginTop","flexDirection","INPUT_EDIT_CANCEL","space","INPUT_EDIT_OK","createStyleSheet","paddingVertical","paddingHorizontal","alignItems","flex","marginRight","minHeight","maxHeight","borderRadius"],"sources":["EditInput.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Platform, TextInput as RNTextInput, View } from 'react-native';\n\nimport { Button, TextInput, createStyleSheet, useToast } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdFileMessage, SendbirdUserMessage } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../../../../hooks/useContext';\nimport type { GroupChannelProps } from '../../types';\n\ntype EditInputProps = GroupChannelProps['Input'] & {\n text: string;\n setText: (val: string) => void;\n editMessage: SendbirdUserMessage | SendbirdFileMessage;\n setEditMessage: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n};\n\nconst AUTO_FOCUS = Platform.select({ ios: false, android: true, default: false });\nconst EditInput = ({ text, setText, editMessage, setEditMessage, onUpdateUserMessage }: EditInputProps) => {\n const { STRINGS } = useLocalization();\n const inputRef = useRef<RNTextInput>(null);\n const toast = useToast();\n\n useEffect(() => {\n if (editMessage.isUserMessage()) {\n setText(editMessage.message ?? '');\n\n if (!AUTO_FOCUS) setTimeout(() => inputRef.current?.focus(), 500);\n }\n }, [editMessage]);\n\n const onPressCancel = () => {\n setEditMessage();\n setText('');\n };\n\n const onPressSave = () => {\n if (editMessage.isUserMessage()) {\n onUpdateUserMessage(text, editMessage).catch(() => toast.show(STRINGS.TOAST.UPDATE_MSG_ERROR, 'error'));\n }\n setEditMessage();\n setText('');\n };\n\n return (\n <View style={styles.editInputContainer}>\n <View style={styles.inputWrapper}>\n <TextInput\n autoFocus={AUTO_FOCUS}\n ref={inputRef}\n multiline\n value={text}\n onChangeText={setText}\n style={styles.input}\n placeholder={STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE}\n />\n </View>\n <View style={{ marginTop: 8, flexDirection: 'row' }}>\n <Button variant={'text'} onPress={onPressCancel}>\n {STRINGS.GROUP_CHANNEL.INPUT_EDIT_CANCEL}\n </Button>\n <View style={styles.space} />\n <Button variant={'contained'} onPress={onPressSave}>\n {STRINGS.GROUP_CHANNEL.INPUT_EDIT_OK}\n </Button>\n </View>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n editInputContainer: {\n paddingVertical: 10,\n paddingHorizontal: 16,\n flexDirection: 'column',\n alignItems: 'center',\n },\n input: {\n flex: 1,\n marginRight: 4,\n minHeight: 36,\n maxHeight: 36 * Platform.select({ ios: 2.5, default: 2 }),\n borderRadius: 20,\n },\n inputWrapper: {\n flexDirection: 'row',\n },\n space: {\n flex: 1,\n },\n});\n\nexport default EditInput;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAGA;;;;;;
|
|
1
|
+
{"version":3,"names":["AUTO_FOCUS","Platform","select","ios","android","default","EditInput","text","setText","editMessage","setEditMessage","onUpdateUserMessage","disabled","STRINGS","useLocalization","inputRef","useRef","toast","useToast","useEffect","isUserMessage","message","setTimeout","current","focus","onPressCancel","onPressSave","catch","show","TOAST","UPDATE_MSG_ERROR","styles","editInputContainer","inputWrapper","input","GROUP_CHANNEL","INPUT_PLACEHOLDER_ACTIVE","marginTop","flexDirection","INPUT_EDIT_CANCEL","space","INPUT_EDIT_OK","createStyleSheet","paddingVertical","paddingHorizontal","alignItems","flex","marginRight","minHeight","maxHeight","borderRadius"],"sources":["EditInput.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Platform, TextInput as RNTextInput, View } from 'react-native';\n\nimport { Button, TextInput, createStyleSheet, useToast } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdFileMessage, SendbirdUserMessage } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../../../../hooks/useContext';\nimport type { GroupChannelProps } from '../../types';\n\ntype EditInputProps = GroupChannelProps['Input'] & {\n text: string;\n setText: (val: string) => void;\n editMessage: SendbirdUserMessage | SendbirdFileMessage;\n setEditMessage: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n disabled: boolean;\n};\n\nconst AUTO_FOCUS = Platform.select({ ios: false, android: true, default: false });\nconst EditInput = ({ text, setText, editMessage, setEditMessage, onUpdateUserMessage, disabled }: EditInputProps) => {\n const { STRINGS } = useLocalization();\n const inputRef = useRef<RNTextInput>(null);\n const toast = useToast();\n\n useEffect(() => {\n if (editMessage.isUserMessage()) {\n setText(editMessage.message ?? '');\n\n if (!AUTO_FOCUS) setTimeout(() => inputRef.current?.focus(), 500);\n }\n }, [editMessage]);\n\n const onPressCancel = () => {\n setEditMessage();\n setText('');\n };\n\n const onPressSave = () => {\n if (editMessage.isUserMessage()) {\n onUpdateUserMessage(text, editMessage).catch(() => toast.show(STRINGS.TOAST.UPDATE_MSG_ERROR, 'error'));\n }\n setEditMessage();\n setText('');\n };\n\n return (\n <View style={styles.editInputContainer}>\n <View style={styles.inputWrapper}>\n <TextInput\n editable={!disabled}\n autoFocus={AUTO_FOCUS}\n ref={inputRef}\n multiline\n value={text}\n onChangeText={setText}\n style={styles.input}\n placeholder={STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE}\n />\n </View>\n <View style={{ marginTop: 8, flexDirection: 'row' }}>\n <Button variant={'text'} onPress={onPressCancel}>\n {STRINGS.GROUP_CHANNEL.INPUT_EDIT_CANCEL}\n </Button>\n <View style={styles.space} />\n <Button variant={'contained'} onPress={onPressSave}>\n {STRINGS.GROUP_CHANNEL.INPUT_EDIT_OK}\n </Button>\n </View>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n editInputContainer: {\n paddingVertical: 10,\n paddingHorizontal: 16,\n flexDirection: 'column',\n alignItems: 'center',\n },\n input: {\n flex: 1,\n marginRight: 4,\n minHeight: 36,\n maxHeight: 36 * Platform.select({ ios: 2.5, default: 2 }),\n borderRadius: 20,\n },\n inputWrapper: {\n flexDirection: 'row',\n },\n space: {\n flex: 1,\n },\n});\n\nexport default EditInput;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAGA;;;;;;AAWA,MAAMA,UAAU,GAAGC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,KAAP;EAAcC,OAAO,EAAE,IAAvB;EAA6BC,OAAO,EAAE;AAAtC,CAAhB,CAAnB;;AACA,MAAMC,SAAS,GAAG,QAAmG;EAAA,IAA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abled
|
|
30
|
+
disabled,
|
|
31
|
+
frozen,
|
|
32
|
+
muted
|
|
31
33
|
} = _ref;
|
|
32
34
|
const {
|
|
33
35
|
STRINGS
|
|
@@ -138,7 +140,7 @@ const SendInput = _ref => {
|
|
|
138
140
|
value: text,
|
|
139
141
|
onChangeText: setText,
|
|
140
142
|
style: styles.input,
|
|
141
|
-
placeholder: (0, _uikitUtils.conditionChaining)([
|
|
143
|
+
placeholder: (0, _uikitUtils.conditionChaining)([frozen, muted], [STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_DISABLED, STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_MUTED, STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE])
|
|
142
144
|
}), Boolean(text.trim()) && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
143
145
|
onPress: onPressSend,
|
|
144
146
|
disabled: disabled
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SendInput","onSendUserMessage","onSendFileMessage","text","setText","disabled","STRINGS","useLocalization","fileService","usePlatformService","colors","useUIKitTheme","openSheet","useBottomSheet","alert","useAlert","toast","useToast","onPressSend","catch","show","TOAST","SEND_MSG_ERROR","onPressAttachment","sheetItems","title","GROUP_CHANNEL","DIALOG_ATTACHMENT_CAMERA","icon","onPress","photo","openCamera","mediaType","onOpenFailure","error","code","SBUError","CODE","ERR_PERMISSIONS_DENIED","DIALOG","ALERT_PERMISSIONS_TITLE","message","ALERT_PERMISSIONS_MESSAGE","buttons","ALERT_PERMISSIONS_OK","SBUUtils","openSettings","OPEN_CAMERA_ERROR","DIALOG_ATTACHMENT_PHOTO_LIBRARY","openMediaLibrary","selectionLimit","OPEN_PHOTO_LIBRARY_ERROR","DIALOG_ATTACHMENT_FILES","file","openDocument","OPEN_FILES_ERROR","styles","sendInputContainer","ui","input","default","highlight","active","iconAttach","conditionChaining","INPUT_PLACEHOLDER_DISABLED","INPUT_PLACEHOLDER_ACTIVE","Boolean","trim","iconSend","createStyleSheet","paddingVertical","paddingHorizontal","alignItems","flexDirection","flex","marginRight","minHeight","maxHeight","Platform","select","ios","borderRadius","padding","marginLeft"],"sources":["SendInput.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TouchableOpacity, View } from 'react-native';\n\nimport {\n Icon,\n TextInput,\n createStyleSheet,\n useAlert,\n useBottomSheet,\n useToast,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService } from '../../../../hooks/useContext';\nimport SBUError from '../../../../libs/SBUError';\nimport SBUUtils from '../../../../libs/SBUUtils';\nimport type { GroupChannelProps } from '../../types';\n\ntype SendInputProps = GroupChannelProps['Input'] & {\n text: string;\n setText: (val: string) => void;\n disabled: boolean;\n};\nconst SendInput = ({ onSendUserMessage, onSendFileMessage, text, setText, disabled }: SendInputProps) => {\n const { STRINGS } = useLocalization();\n const { fileService } = usePlatformService();\n const { colors } = useUIKitTheme();\n const { openSheet } = useBottomSheet();\n const { alert } = useAlert();\n const toast = useToast();\n\n const onPressSend = () => {\n onSendUserMessage(text).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n setText('');\n };\n const onPressAttachment = () => {\n openSheet({\n sheetItems: [\n {\n title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_CAMERA,\n icon: 'camera',\n onPress: async () => {\n const photo = await fileService.openCamera({\n mediaType: 'all',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE('camera', 'UIKitSample'),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error');\n }\n },\n });\n\n if (photo) {\n onSendFileMessage(photo).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n }\n },\n },\n {\n title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_PHOTO_LIBRARY,\n icon: 'photo',\n onPress: async () => {\n const photo = await fileService.openMediaLibrary({\n selectionLimit: 1,\n mediaType: 'all',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE('device storage', 'UIKitSample'),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error');\n }\n },\n });\n\n if (photo && photo[0]) {\n onSendFileMessage(photo[0]).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n }\n },\n },\n {\n title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_FILES,\n icon: 'document',\n onPress: async () => {\n const file = await fileService.openDocument({\n onOpenFailure: () => toast.show(STRINGS.TOAST.OPEN_FILES_ERROR, 'error'),\n });\n\n if (file) {\n onSendFileMessage(file).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n }\n },\n },\n ],\n });\n };\n\n return (\n <View style={styles.sendInputContainer}>\n <TouchableOpacity onPress={onPressAttachment} disabled={disabled}>\n <Icon\n color={disabled ? colors.ui.input.default.disabled.highlight : colors.ui.input.default.active.highlight}\n icon={'add'}\n size={24}\n containerStyle={styles.iconAttach}\n />\n </TouchableOpacity>\n <TextInput\n multiline\n editable={!disabled}\n value={text}\n onChangeText={setText}\n style={styles.input}\n placeholder={conditionChaining(\n [disabled],\n [STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_DISABLED, STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE],\n )}\n />\n {Boolean(text.trim()) && (\n <TouchableOpacity onPress={onPressSend} disabled={disabled}>\n <Icon\n color={disabled ? colors.ui.input.default.disabled.highlight : colors.ui.input.default.active.highlight}\n icon={'send'}\n size={24}\n containerStyle={styles.iconSend}\n />\n </TouchableOpacity>\n )}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n sendInputContainer: {\n paddingVertical: 10,\n paddingHorizontal: 12,\n alignItems: 'center',\n flexDirection: 'row',\n },\n input: {\n flex: 1,\n marginRight: 4,\n minHeight: 36,\n maxHeight: 36 * Platform.select({ ios: 2.5, default: 2 }),\n borderRadius: 20,\n },\n iconAttach: {\n marginRight: 8,\n padding: 4,\n },\n iconSend: {\n marginLeft: 4,\n padding: 4,\n },\n});\n\nexport default SendInput;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AASA;;AAEA;;AACA;;AACA;;;;AAQA,MAAMA,SAAS,GAAG,QAAuF;EAAA,IAAtF;IAAEC,iBAAF;IAAqBC,iBAArB;IAAwCC,IAAxC;IAA8CC,OAA9C;IAAuDC;EAAvD,CAAsF;EACvG,MAAM;IAAEC;EAAF,IAAc,IAAAC,2BAAA,GAApB;EACA,MAAM;IAAEC;EAAF,IAAkB,IAAAC,8BAAA,GAAxB;EACA,MAAM;IAAEC;EAAF,IAAa,IAAAC,yCAAA,GAAnB;EACA,MAAM;IAAEC;EAAF,IAAgB,IAAAC,0CAAA,GAAtB;EACA,MAAM;IAAEC;EAAF,IAAY,IAAAC,oCAAA,GAAlB;EACA,MAAMC,KAAK,GAAG,IAAAC,oCAAA,GAAd;;EAEA,MAAMC,WAAW,GAAG,MAAM;IACxBjB,iBAAiB,CAACE,IAAD,CAAjB,CAAwBgB,KAAxB,CAA8B,MAAMH,KAAK,CAACI,IAAN,CAAWd,OAAO,CAACe,KAAR,CAAcC,cAAzB,EAAyC,OAAzC,CAApC;IACAlB,OAAO,CAAC,EAAD,CAAP;EACD,CAHD;;EAI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,GAAgDnD,MAAM,CAACgD,EAAP,CAAUC,KAAV,CAAgBC,OAAhB,CAAwBE,MAAxB,CAA+BD,SADhG;IAEE,IAAI,EAAE,MAFR;IAGE,IAAI,EAAE,EAHR;IAIE,cAAc,EAAEL,MAAM,CAACa;EAJzB,EADF,CArBJ,CADF;AAiCD,CAlHD;;AAoHA,MAAMb,MAAM,GAAG,IAAAc,4CAAA,EAAiB;EAC9Bb,kBAAkB,EAAE;IAClBc,eAAe,EAAE,EADC;IAElBC,iBAAiB,EAAE,EAFD;IAGlBC,UAAU,EAAE,QAHM;IAIlBC,aAAa,EAAE;EAJG,CADU;EAO9Bf,KAAK,EAAE;IACLgB,IAAI,EAAE,CADD;IAELC,WAAW,EAAE,CAFR;IAGLC,SAAS,EAAE,EAHN;IAILC,SAAS,EAAE,KAAKC,qBAAA,CAASC,MAAT,CAAgB;MAAEC,GAAG,EAAE,GAAP;MAAYrB,OAAO,EAAE;IAArB,CAAhB,CAJX;IAKLsB,YAAY,EAAE;EALT,CAPuB;EAc9BnB,UAAU,EAAE;IACVa,WAAW,EAAE,CADH;IAEVO,OAAO,EAAE;EAFC,CAdkB;EAkB9Bd,QAAQ,EAAE;IACRe,UAAU,EAAE,CADJ;IAERD,OAAO,EAAE;EAFD;AAlBoB,CAAjB,CAAf;eAwBenF,S"}
|
|
1
|
+
{"version":3,"names":["SendInput","onSendUserMessage","onSendFileMessage","text","setText","disabled","frozen","muted","STRINGS","useLocalization","fileService","usePlatformService","colors","useUIKitTheme","openSheet","useBottomSheet","alert","useAlert","toast","useToast","onPressSend","catch","show","TOAST","SEND_MSG_ERROR","onPressAttachment","sheetItems","title","GROUP_CHANNEL","DIALOG_ATTACHMENT_CAMERA","icon","onPress","photo","openCamera","mediaType","onOpenFailure","error","code","SBUError","CODE","ERR_PERMISSIONS_DENIED","DIALOG","ALERT_PERMISSIONS_TITLE","message","ALERT_PERMISSIONS_MESSAGE","buttons","ALERT_PERMISSIONS_OK","SBUUtils","openSettings","OPEN_CAMERA_ERROR","DIALOG_ATTACHMENT_PHOTO_LIBRARY","openMediaLibrary","selectionLimit","OPEN_PHOTO_LIBRARY_ERROR","DIALOG_ATTACHMENT_FILES","file","openDocument","OPEN_FILES_ERROR","styles","sendInputContainer","ui","input","default","highlight","active","iconAttach","conditionChaining","INPUT_PLACEHOLDER_DISABLED","INPUT_PLACEHOLDER_MUTED","INPUT_PLACEHOLDER_ACTIVE","Boolean","trim","iconSend","createStyleSheet","paddingVertical","paddingHorizontal","alignItems","flexDirection","flex","marginRight","minHeight","maxHeight","Platform","select","ios","borderRadius","padding","marginLeft"],"sources":["SendInput.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TouchableOpacity, View } from 'react-native';\n\nimport {\n Icon,\n TextInput,\n createStyleSheet,\n useAlert,\n useBottomSheet,\n useToast,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService } from '../../../../hooks/useContext';\nimport SBUError from '../../../../libs/SBUError';\nimport SBUUtils from '../../../../libs/SBUUtils';\nimport type { GroupChannelProps } from '../../types';\n\ntype SendInputProps = GroupChannelProps['Input'] & {\n text: string;\n setText: (val: string) => void;\n frozen: boolean;\n muted: boolean;\n disabled: boolean;\n};\nconst SendInput = ({\n onSendUserMessage,\n onSendFileMessage,\n text,\n setText,\n disabled,\n frozen,\n muted,\n}: SendInputProps) => {\n const { STRINGS } = useLocalization();\n const { fileService } = usePlatformService();\n const { colors } = useUIKitTheme();\n const { openSheet } = useBottomSheet();\n const { alert } = useAlert();\n const toast = useToast();\n\n const onPressSend = () => {\n onSendUserMessage(text).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n setText('');\n };\n const onPressAttachment = () => {\n openSheet({\n sheetItems: [\n {\n title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_CAMERA,\n icon: 'camera',\n onPress: async () => {\n const photo = await fileService.openCamera({\n mediaType: 'all',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE('camera', 'UIKitSample'),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error');\n }\n },\n });\n\n if (photo) {\n onSendFileMessage(photo).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n }\n },\n },\n {\n title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_PHOTO_LIBRARY,\n icon: 'photo',\n onPress: async () => {\n const photo = await fileService.openMediaLibrary({\n selectionLimit: 1,\n mediaType: 'all',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE('device storage', 'UIKitSample'),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error');\n }\n },\n });\n\n if (photo && photo[0]) {\n onSendFileMessage(photo[0]).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n }\n },\n },\n {\n title: STRINGS.GROUP_CHANNEL.DIALOG_ATTACHMENT_FILES,\n icon: 'document',\n onPress: async () => {\n const file = await fileService.openDocument({\n onOpenFailure: () => toast.show(STRINGS.TOAST.OPEN_FILES_ERROR, 'error'),\n });\n\n if (file) {\n onSendFileMessage(file).catch(() => toast.show(STRINGS.TOAST.SEND_MSG_ERROR, 'error'));\n }\n },\n },\n ],\n });\n };\n\n return (\n <View style={styles.sendInputContainer}>\n <TouchableOpacity onPress={onPressAttachment} disabled={disabled}>\n <Icon\n color={disabled ? colors.ui.input.default.disabled.highlight : colors.ui.input.default.active.highlight}\n icon={'add'}\n size={24}\n containerStyle={styles.iconAttach}\n />\n </TouchableOpacity>\n <TextInput\n multiline\n editable={!disabled}\n value={text}\n onChangeText={setText}\n style={styles.input}\n placeholder={conditionChaining(\n [frozen, muted],\n [\n STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_DISABLED,\n STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_MUTED,\n STRINGS.GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE,\n ],\n )}\n />\n {Boolean(text.trim()) && (\n <TouchableOpacity onPress={onPressSend} disabled={disabled}>\n <Icon\n color={disabled ? colors.ui.input.default.disabled.highlight : colors.ui.input.default.active.highlight}\n icon={'send'}\n size={24}\n containerStyle={styles.iconSend}\n />\n </TouchableOpacity>\n )}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n sendInputContainer: {\n paddingVertical: 10,\n paddingHorizontal: 12,\n alignItems: 'center',\n flexDirection: 'row',\n },\n input: {\n flex: 1,\n marginRight: 4,\n minHeight: 36,\n maxHeight: 36 * Platform.select({ ios: 2.5, default: 2 }),\n borderRadius: 20,\n },\n iconAttach: {\n marginRight: 8,\n padding: 4,\n },\n iconSend: {\n marginLeft: 4,\n padding: 4,\n },\n});\n\nexport default SendInput;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AASA;;AAEA;;AACA;;AACA;;;;AAUA,MAAMA,SAAS,GAAG,QAQI;EAAA,IARH;IACjBC,iBADiB;IAEjBC,iBAFiB;IAGjBC,IAHiB;IAIjBC,OAJiB;IAKjBC,QALiB;IAMjBC,MANiB;IAOjBC;EAPiB,CAQG;EACpB,MAAM;IAAEC;EAAF,IAAc,IAAAC,2BAAA,GAApB;EACA,MAAM;IAAEC;EAAF,IAAkB,IAAAC,8BAAA,GAAxB;EACA,MAAM;IAAEC;EAAF,IAAa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;EAFD;AAlBoB,CAAjB,CAAf;eAwBetF,S"}
|
|
@@ -35,9 +35,6 @@ const KEYBOARD_AVOID_VIEW_BEHAVIOR = _reactNative.Platform.select({
|
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
const GroupChannelInput = props => {
|
|
38
|
-
const {
|
|
39
|
-
channel
|
|
40
|
-
} = props;
|
|
41
38
|
const {
|
|
42
39
|
left,
|
|
43
40
|
right,
|
|
@@ -47,29 +44,37 @@ const GroupChannelInput = props => {
|
|
|
47
44
|
colors
|
|
48
45
|
} = (0, _uikitReactNativeFoundation.useUIKitTheme)();
|
|
49
46
|
const {
|
|
47
|
+
channel,
|
|
50
48
|
editMessage,
|
|
51
49
|
setEditMessage,
|
|
52
50
|
keyboardAvoidOffset = 0
|
|
53
51
|
} = (0, _react.useContext)(_moduleContext.GroupChannelContexts.Fragment);
|
|
54
52
|
const [text, setText] = (0, _react.useState)('');
|
|
55
53
|
const textTmpRef = (0, _react.useRef)('');
|
|
56
|
-
const
|
|
54
|
+
const chatAvailableState = (0, _uikitUtils.getGroupChannelChatAvailableState)(channel);
|
|
57
55
|
(0, _react.useEffect)(() => {
|
|
58
56
|
if (text.length === 0) channel.endTyping();else channel.startTyping();
|
|
59
57
|
}, [text]);
|
|
60
58
|
(0, _react.useEffect)(() => {
|
|
61
|
-
if (
|
|
59
|
+
if (chatAvailableState.disabled) {
|
|
62
60
|
textTmpRef.current = text;
|
|
63
61
|
setText('');
|
|
64
62
|
} else {
|
|
65
63
|
setText(textTmpRef.current);
|
|
66
64
|
}
|
|
67
|
-
}, [
|
|
65
|
+
}, [chatAvailableState.disabled]);
|
|
68
66
|
const inputMode = (0, _uikitUtils.useIIFE)(() => {
|
|
69
67
|
if (!editMessage) return 'send';
|
|
70
68
|
if (editMessage.isFileMessage()) return 'send';
|
|
71
69
|
return 'edit';
|
|
72
70
|
});
|
|
71
|
+
|
|
72
|
+
if (!props.shouldRenderInput) {
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement(SafeAreaBottom, {
|
|
74
|
+
height: bottom
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
return /*#__PURE__*/_react.default.createElement(_reactNative.KeyboardAvoidingView, {
|
|
74
79
|
keyboardVerticalOffset: -bottom + keyboardAvoidOffset,
|
|
75
80
|
behavior: KEYBOARD_AVOID_VIEW_BEHAVIOR
|
|
@@ -86,13 +91,13 @@ const GroupChannelInput = props => {
|
|
|
86
91
|
}
|
|
87
92
|
}, inputMode === 'send' && /*#__PURE__*/_react.default.createElement(_SendInput.default, _extends({}, props, {
|
|
88
93
|
text: text,
|
|
89
|
-
setText: setText
|
|
90
|
-
|
|
91
|
-
})), inputMode === 'edit' && editMessage && /*#__PURE__*/_react.default.createElement(_EditInput.default, _extends({}, props, {
|
|
94
|
+
setText: setText
|
|
95
|
+
}, chatAvailableState)), inputMode === 'edit' && editMessage && /*#__PURE__*/_react.default.createElement(_EditInput.default, _extends({}, props, {
|
|
92
96
|
text: text,
|
|
93
97
|
setText: setText,
|
|
94
98
|
editMessage: editMessage,
|
|
95
|
-
setEditMessage: setEditMessage
|
|
99
|
+
setEditMessage: setEditMessage,
|
|
100
|
+
disabled: chatAvailableState.disabled
|
|
96
101
|
}))), /*#__PURE__*/_react.default.createElement(SafeAreaBottom, {
|
|
97
102
|
height: bottom
|
|
98
103
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KEYBOARD_AVOID_VIEW_BEHAVIOR","Platform","select","ios","default","undefined","GroupChannelInput","props","
|
|
1
|
+
{"version":3,"names":["KEYBOARD_AVOID_VIEW_BEHAVIOR","Platform","select","ios","default","undefined","GroupChannelInput","props","left","right","bottom","useSafeAreaInsets","colors","useUIKitTheme","channel","editMessage","setEditMessage","keyboardAvoidOffset","useContext","GroupChannelContexts","Fragment","text","setText","useState","textTmpRef","useRef","chatAvailableState","getGroupChannelChatAvailableState","useEffect","length","endTyping","startTyping","disabled","current","inputMode","useIIFE","isFileMessage","shouldRenderInput","paddingLeft","paddingRight","backgroundColor","background","justifyContent","width","SafeAreaBottom","height","React","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { useContext, useEffect, useRef, useState } from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { getGroupChannelChatAvailableState, useIIFE } from '@sendbird/uikit-utils';\n\nimport { GroupChannelContexts } from '../../module/moduleContext';\nimport type { GroupChannelProps } from '../../types';\nimport EditInput from './EditInput';\nimport SendInput from './SendInput';\n\nconst KEYBOARD_AVOID_VIEW_BEHAVIOR = Platform.select({ ios: 'padding' as const, default: undefined });\nconst GroupChannelInput = (props: GroupChannelProps['Input']) => {\n const { left, right, bottom } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n const { channel, editMessage, setEditMessage, keyboardAvoidOffset = 0 } = useContext(GroupChannelContexts.Fragment);\n\n const [text, setText] = useState('');\n const textTmpRef = useRef('');\n const chatAvailableState = getGroupChannelChatAvailableState(channel);\n\n useEffect(() => {\n if (text.length === 0) channel.endTyping();\n else channel.startTyping();\n }, [text]);\n\n useEffect(() => {\n if (chatAvailableState.disabled) {\n textTmpRef.current = text;\n setText('');\n } else {\n setText(textTmpRef.current);\n }\n }, [chatAvailableState.disabled]);\n\n const inputMode = useIIFE(() => {\n if (!editMessage) return 'send';\n if (editMessage.isFileMessage()) return 'send';\n return 'edit';\n });\n\n if (!props.shouldRenderInput) {\n return <SafeAreaBottom height={bottom} />;\n }\n\n return (\n <KeyboardAvoidingView\n keyboardVerticalOffset={-bottom + keyboardAvoidOffset}\n behavior={KEYBOARD_AVOID_VIEW_BEHAVIOR}\n >\n <View style={{ paddingLeft: left, paddingRight: right, backgroundColor: colors.background }}>\n <View style={{ justifyContent: 'center', width: '100%' }}>\n {inputMode === 'send' && <SendInput {...props} text={text} setText={setText} {...chatAvailableState} />}\n {inputMode === 'edit' && editMessage && (\n <EditInput\n {...props}\n text={text}\n setText={setText}\n editMessage={editMessage}\n setEditMessage={setEditMessage}\n disabled={chatAvailableState.disabled}\n />\n )}\n </View>\n <SafeAreaBottom height={bottom} />\n </View>\n </KeyboardAvoidingView>\n );\n};\nconst SafeAreaBottom = ({ height }: { height: number }) => {\n return <View style={{ height }} />;\n};\n\nexport default React.memo(GroupChannelInput);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,4BAA4B,GAAGC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,SAAP;EAA2BC,OAAO,EAAEC;AAApC,CAAhB,CAArC;;AACA,MAAMC,iBAAiB,GAAIC,KAAD,IAAuC;EAC/D,MAAM;IAAEC,IAAF;IAAQC,KAAR;IAAeC;EAAf,IAA0B,IAAAC,6CAAA,GAAhC;EACA,MAAM;IAAEC;EAAF,IAAa,IAAAC,yCAAA,GAAnB;EACA,MAAM;IAAEC,OAAF;IAAWC,WAAX;IAAwBC,cAAxB;IAAwCC,mBAAmB,GAAG;EAA9D,IAAoE,IAAAC,iBAAA,EAAWC,mCAAA,CAAqBC,QAAhC,CAA1E;EAEA,MAAM,CAACC,IAAD,EAAOC,OAAP,IAAkB,IAAAC,eAAA,EAAS,EAAT,CAAxB;EACA,MAAMC,UAAU,GAAG,IAAAC,aAAA,EAAO,EAAP,CAAnB;EACA,MAAMC,kBAAkB,GAAG,IAAAC,6CAAA,EAAkCb,OAAlC,CAA3B;EAEA,IAAAc,gBAAA,EAAU,MAAM;IACd,IAAIP,IAAI,CAACQ,MAAL,KAAgB,CAApB,EAAuBf,OAAO,CAACgB,SAAR,GAAvB,KACKhB,OAAO,CAACiB,WAAR;EACN,CAHD,EAGG,CAACV,IAAD,CAHH;EAKA,IAAAO,gBAAA,EAAU,MAAM;IACd,IAAIF,kBAAkB,CAACM,QAAvB,EAAiC;MAC/BR,UAAU,CAACS,OA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EtB;EAAxB,EAdF,CAJF,CADF;AAuBD,CAxDD;;AAyDA,MAAMkC,cAAc,GAAG,QAAoC;EAAA,IAAnC;IAAEC;EAAF,CAAmC;EACzD,oBAAO,6BAAC,iBAAD;IAAM,KAAK,EAAE;MAAEA;IAAF;EAAb,EAAP;AACD,CAFD;;4BAIeC,cAAA,CAAMC,IAAN,CAAWzC,iBAAX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { UseGroupChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdFileMessage,\n SendbirdFileMessageCreateParams,\n SendbirdGroupChannel,\n SendbirdMessage,\n SendbirdUser,\n SendbirdUserMessage,\n SendbirdUserMessageCreateParams,\n} from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../../platform/types';\nimport type { CommonComponent } from '../../types';\n\nexport interface GroupChannelProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onChannelDeleted: () => void;\n onPressHeaderLeft: GroupChannelProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: GroupChannelProps['Header']['onPressHeaderRight'];\n\n onBeforeSendFileMessage?: (\n params: SendbirdFileMessageCreateParams,\n ) => SendbirdFileMessageCreateParams | Promise<SendbirdFileMessageCreateParams>;\n onBeforeSendUserMessage?: (\n params: SendbirdUserMessageCreateParams,\n ) => SendbirdUserMessageCreateParams | Promise<SendbirdUserMessageCreateParams>;\n onPressMediaMessage?: GroupChannelProps['MessageList']['onPressMediaMessage'];\n\n renderMessage?: GroupChannelProps['MessageList']['renderMessage'];\n renderNewMessagesButton?: GroupChannelProps['MessageList']['renderNewMessagesButton'];\n renderScrollToBottomButton?: GroupChannelProps['MessageList']['renderScrollToBottomButton'];\n\n enableTypingIndicator?: GroupChannelProps['Provider']['enableTypingIndicator'];\n enableMessageGrouping?: GroupChannelProps['MessageList']['enableMessageGrouping'];\n\n keyboardAvoidOffset?: GroupChannelProps['Provider']['keyboardAvoidOffset'];\n flatListProps?: GroupChannelProps['MessageList']['flatListProps'];\n sortComparator?: UseGroupChannelMessagesOptions['sortComparator'];\n collectionCreator?: UseGroupChannelMessagesOptions['collectionCreator'];\n queryCreator?: UseGroupChannelMessagesOptions['queryCreator'];\n\n /** @deprecated `onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead **/\n onPressImageMessage?: GroupChannelProps['MessageList']['onPressImageMessage'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n MessageList: {\n enableMessageGrouping: boolean;\n currentUserId?: string;\n channel: SendbirdGroupChannel;\n messages: SendbirdMessage[];\n nextMessages: SendbirdMessage[];\n newMessagesFromMembers: SendbirdMessage[];\n onTopReached: () => void;\n onBottomReached: () => void;\n\n onResendFailedMessage: (failedMessage: SendbirdUserMessage | SendbirdFileMessage) => Promise<void>;\n onDeleteMessage: (message: SendbirdUserMessage | SendbirdFileMessage) => Promise<void>;\n onPressMediaMessage?: (message: SendbirdFileMessage, deleteMessage: () => Promise<void>, uri: string) => void;\n\n renderMessage: (props: {\n message: SendbirdMessage;\n prevMessage?: SendbirdMessage;\n nextMessage?: SendbirdMessage;\n onPress?: () => void;\n onLongPress?: () => void;\n channel: GroupChannelProps['MessageList']['channel'];\n currentUserId?: GroupChannelProps['MessageList']['currentUserId'];\n enableMessageGrouping: GroupChannelProps['MessageList']['enableMessageGrouping'];\n }) => React.ReactElement | null;\n renderNewMessagesButton: null | CommonComponent<{\n visible: boolean;\n onPress: () => void;\n newMessages: SendbirdMessage[];\n }>;\n renderScrollToBottomButton: null | CommonComponent<{\n visible: boolean;\n onPress: () => void;\n }>;\n flatListProps?: Omit<FlatListProps<SendbirdMessage>, 'data' | 'renderItem'>;\n\n /** @deprecated `onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead **/\n onPressImageMessage?: (message: SendbirdFileMessage, uri: string) => void;\n };\n Input: {\n
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { UseGroupChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdFileMessage,\n SendbirdFileMessageCreateParams,\n SendbirdGroupChannel,\n SendbirdMessage,\n SendbirdUser,\n SendbirdUserMessage,\n SendbirdUserMessageCreateParams,\n} from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../../platform/types';\nimport type { CommonComponent } from '../../types';\n\nexport interface GroupChannelProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onChannelDeleted: () => void;\n onPressHeaderLeft: GroupChannelProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: GroupChannelProps['Header']['onPressHeaderRight'];\n\n onBeforeSendFileMessage?: (\n params: SendbirdFileMessageCreateParams,\n ) => SendbirdFileMessageCreateParams | Promise<SendbirdFileMessageCreateParams>;\n onBeforeSendUserMessage?: (\n params: SendbirdUserMessageCreateParams,\n ) => SendbirdUserMessageCreateParams | Promise<SendbirdUserMessageCreateParams>;\n onPressMediaMessage?: GroupChannelProps['MessageList']['onPressMediaMessage'];\n\n renderMessage?: GroupChannelProps['MessageList']['renderMessage'];\n renderNewMessagesButton?: GroupChannelProps['MessageList']['renderNewMessagesButton'];\n renderScrollToBottomButton?: GroupChannelProps['MessageList']['renderScrollToBottomButton'];\n\n enableTypingIndicator?: GroupChannelProps['Provider']['enableTypingIndicator'];\n enableMessageGrouping?: GroupChannelProps['MessageList']['enableMessageGrouping'];\n\n keyboardAvoidOffset?: GroupChannelProps['Provider']['keyboardAvoidOffset'];\n flatListProps?: GroupChannelProps['MessageList']['flatListProps'];\n sortComparator?: UseGroupChannelMessagesOptions['sortComparator'];\n collectionCreator?: UseGroupChannelMessagesOptions['collectionCreator'];\n queryCreator?: UseGroupChannelMessagesOptions['queryCreator'];\n\n /** @deprecated `onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead **/\n onPressImageMessage?: GroupChannelProps['MessageList']['onPressImageMessage'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n MessageList: {\n enableMessageGrouping: boolean;\n currentUserId?: string;\n channel: SendbirdGroupChannel;\n messages: SendbirdMessage[];\n nextMessages: SendbirdMessage[];\n newMessagesFromMembers: SendbirdMessage[];\n onTopReached: () => void;\n onBottomReached: () => void;\n\n onResendFailedMessage: (failedMessage: SendbirdUserMessage | SendbirdFileMessage) => Promise<void>;\n onDeleteMessage: (message: SendbirdUserMessage | SendbirdFileMessage) => Promise<void>;\n onPressMediaMessage?: (message: SendbirdFileMessage, deleteMessage: () => Promise<void>, uri: string) => void;\n\n renderMessage: (props: {\n message: SendbirdMessage;\n prevMessage?: SendbirdMessage;\n nextMessage?: SendbirdMessage;\n onPress?: () => void;\n onLongPress?: () => void;\n channel: GroupChannelProps['MessageList']['channel'];\n currentUserId?: GroupChannelProps['MessageList']['currentUserId'];\n enableMessageGrouping: GroupChannelProps['MessageList']['enableMessageGrouping'];\n }) => React.ReactElement | null;\n renderNewMessagesButton: null | CommonComponent<{\n visible: boolean;\n onPress: () => void;\n newMessages: SendbirdMessage[];\n }>;\n renderScrollToBottomButton: null | CommonComponent<{\n visible: boolean;\n onPress: () => void;\n }>;\n flatListProps?: Omit<FlatListProps<SendbirdMessage>, 'data' | 'renderItem'>;\n\n /** @deprecated `onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead **/\n onPressImageMessage?: (message: SendbirdFileMessage, uri: string) => void;\n };\n Input: {\n shouldRenderInput: boolean;\n onSendFileMessage: (file: FileType) => Promise<void>;\n onSendUserMessage: (text: string) => Promise<void>;\n onUpdateFileMessage: (editedFile: FileType, message: SendbirdFileMessage) => Promise<void>;\n onUpdateUserMessage: (editedText: string, message: SendbirdUserMessage) => Promise<void>;\n };\n Provider: {\n channel: SendbirdGroupChannel;\n enableTypingIndicator: boolean;\n keyboardAvoidOffset?: number;\n };\n}\n\n/**\n * Internal context for GroupChannel\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelContextsType {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n editMessage?: SendbirdUserMessage | SendbirdFileMessage;\n setEditMessage: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n keyboardAvoidOffset?: number;\n }>;\n TypingIndicator: React.Context<{\n typingUsers: SendbirdUser[];\n }>;\n}\nexport interface GroupChannelModule {\n Provider: CommonComponent<GroupChannelProps['Provider']>;\n Header: CommonComponent<GroupChannelProps['Header']>;\n MessageList: CommonComponent<GroupChannelProps['MessageList']>;\n Input: CommonComponent<GroupChannelProps['Input']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type GroupChannelFragment = CommonComponent<GroupChannelProps['Fragment']>;\n"],"mappings":""}
|
package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _uikitReactNativeFoundation = require("@sendbird/uikit-react-native-foundation");
|
|
11
|
+
|
|
12
|
+
var _moduleContext = require("../module/moduleContext");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
const GroupChannelBannedUsersHeader = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
onPressHeaderLeft
|
|
21
|
+
} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
headerTitle
|
|
24
|
+
} = (0, _react.useContext)(_moduleContext.GroupChannelBannedUsersContexts.Fragment);
|
|
25
|
+
const {
|
|
26
|
+
HeaderComponent
|
|
27
|
+
} = (0, _uikitReactNativeFoundation.useHeaderStyle)();
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(HeaderComponent, {
|
|
29
|
+
title: headerTitle,
|
|
30
|
+
left: /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.Icon, {
|
|
31
|
+
icon: 'arrow-left'
|
|
32
|
+
}),
|
|
33
|
+
onPressLeft: onPressHeaderLeft
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var _default = GroupChannelBannedUsersHeader;
|
|
38
|
+
exports.default = _default;
|
|
39
|
+
//# sourceMappingURL=GroupChannelBannedUsersHeader.js.map
|
package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersHeader.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GroupChannelBannedUsersHeader","onPressHeaderLeft","headerTitle","useContext","GroupChannelBannedUsersContexts","Fragment","HeaderComponent","useHeaderStyle"],"sources":["GroupChannelBannedUsersHeader.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { Icon, useHeaderStyle } from '@sendbird/uikit-react-native-foundation';\n\nimport { GroupChannelBannedUsersContexts } from '../module/moduleContext';\nimport type { GroupChannelBannedUsersProps } from '../types';\n\nconst GroupChannelBannedUsersHeader = ({ onPressHeaderLeft }: GroupChannelBannedUsersProps['Header']) => {\n const { headerTitle } = useContext(GroupChannelBannedUsersContexts.Fragment);\n const { HeaderComponent } = useHeaderStyle();\n return <HeaderComponent title={headerTitle} left={<Icon icon={'arrow-left'} />} onPressLeft={onPressHeaderLeft} />;\n};\n\nexport default GroupChannelBannedUsersHeader;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;;;AAGA,MAAMA,6BAA6B,GAAG,QAAmE;EAAA,IAAlE;IAAEC;EAAF,CAAkE;EACvG,MAAM;IAAEC;EAAF,IAAkB,IAAAC,iBAAA,EAAWC,8CAAA,CAAgCC,QAA3C,CAAxB;EACA,MAAM;IAAEC;EAAF,IAAsB,IAAAC,0CAAA,GAA5B;EACA,oBAAO,6BAAC,eAAD;IAAiB,KAAK,EAAEL,WAAxB;IAAqC,IAAI,eAAE,6BAAC,gCAAD;MAAM,IAAI,EAAE;IAAZ,EAA3C;IAAyE,WAAW,EAAED;EAAtF,EAAP;AACD,CAJD;;eAMeD,6B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const GroupChannelBannedUsersList = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
renderUser,
|
|
21
|
+
bannedUsers,
|
|
22
|
+
onLoadNext,
|
|
23
|
+
ListEmptyComponent
|
|
24
|
+
} = _ref;
|
|
25
|
+
const renderItem = (0, _uikitUtils.useFreshCallback)(_ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
item
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return renderUser === null || renderUser === void 0 ? void 0 : renderUser({
|
|
30
|
+
user: item
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const {
|
|
34
|
+
left,
|
|
35
|
+
right
|
|
36
|
+
} = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
38
|
+
data: bannedUsers,
|
|
39
|
+
renderItem: renderItem,
|
|
40
|
+
contentContainerStyle: {
|
|
41
|
+
paddingLeft: left,
|
|
42
|
+
paddingRight: right,
|
|
43
|
+
flexGrow: 1
|
|
44
|
+
},
|
|
45
|
+
ListEmptyComponent: ListEmptyComponent,
|
|
46
|
+
onEndReached: () => onLoadNext(),
|
|
47
|
+
bounces: false
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var _default = GroupChannelBannedUsersList;
|
|
52
|
+
exports.default = _default;
|
|
53
|
+
//# sourceMappingURL=GroupChannelBannedUsersList.js.map
|
package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersList.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GroupChannelBannedUsersList","renderUser","bannedUsers","onLoadNext","ListEmptyComponent","renderItem","useFreshCallback","item","user","left","right","useSafeAreaInsets","paddingLeft","paddingRight","flexGrow"],"sources":["GroupChannelBannedUsersList.tsx"],"sourcesContent":["import React from 'react';\nimport { FlatList, ListRenderItem } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { SendbirdRestrictedUser, useFreshCallback } from '@sendbird/uikit-utils';\n\nimport type { GroupChannelBannedUsersProps } from '../types';\n\nconst GroupChannelBannedUsersList = ({\n renderUser,\n bannedUsers,\n onLoadNext,\n ListEmptyComponent,\n}: GroupChannelBannedUsersProps['List']) => {\n const renderItem: ListRenderItem<SendbirdRestrictedUser> = useFreshCallback(({ item }) =>\n renderUser?.({ user: item }),\n );\n const { left, right } = useSafeAreaInsets();\n\n return (\n <FlatList\n data={bannedUsers}\n renderItem={renderItem}\n contentContainerStyle={{ paddingLeft: left, paddingRight: right, flexGrow: 1 }}\n ListEmptyComponent={ListEmptyComponent}\n onEndReached={() => onLoadNext()}\n bounces={false}\n />\n );\n};\n\nexport default GroupChannelBannedUsersList;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;AAIA,MAAMA,2BAA2B,GAAG,QAKQ;EAAA,IALP;IACnCC,UADmC;IAEnCC,WAFmC;IAGnCC,UAHmC;IAInCC;EAJmC,CAKO;EAC1C,MAAMC,UAAkD,GAAG,IAAAC,4BAAA,EAAiB;IAAA,IAAC;MAAEC;IAAF,CAAD;IAAA,OAC1EN,UAD0E,aAC1EA,UAD0E,uBAC1EA,UAAU,CAAG;MAAEO,IAAI,EAAED;IAAR,CAAH,CADgE;EAAA,CAAjB,CAA3D;EAGA,MAAM;IAAEE,IAAF;IAAQC;EAAR,IAAkB,IAAAC,6CAAA,GAAxB;EAEA,oBACE,6BAAC,qBAAD;IACE,IAAI,EAAET,WADR;IAEE,UAAU,EAAEG,UAFd;IAGE,qBAAqB,EAAE;MAAEO,WAAW,EAAEH,IAAf;MAAqBI,YAAY,EAAEH,KAAnC;MAA0CI,QAAQ,EAAE;IAApD,CAHzB;IAIE,kBAAkB,EAAEV,kBAJtB;IAKE,YAAY,EAAE,MAAMD,UAAU,EALhC;IAME,OAAO,EAAE;EANX,EADF;AAUD,CArBD;;eAuBeH,2B"}
|
package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusEmpty.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _TypedPlaceholder = _interopRequireDefault(require("../../../components/TypedPlaceholder"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
const GroupChannelBannedUsersStatusEmpty = () => {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
18
|
+
style: styles.container
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_TypedPlaceholder.default, {
|
|
20
|
+
type: 'no-banned-users'
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const styles = _reactNative.StyleSheet.create({
|
|
25
|
+
container: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
alignItems: 'center'
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
var _default = GroupChannelBannedUsersStatusEmpty;
|
|
33
|
+
exports.default = _default;
|
|
34
|
+
//# sourceMappingURL=GroupChannelBannedUsersStatusEmpty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GroupChannelBannedUsersStatusEmpty","styles","container","StyleSheet","create","flex","justifyContent","alignItems"],"sources":["GroupChannelBannedUsersStatusEmpty.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport TypedPlaceholder from '../../../components/TypedPlaceholder';\n\nconst GroupChannelBannedUsersStatusEmpty = () => {\n return (\n <View style={styles.container}>\n <TypedPlaceholder type={'no-banned-users'} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: { flex: 1, justifyContent: 'center', alignItems: 'center' },\n});\n\nexport default GroupChannelBannedUsersStatusEmpty;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEA,MAAMA,kCAAkC,GAAG,MAAM;EAC/C,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEC,MAAM,CAACC;EAApB,gBACE,6BAAC,yBAAD;IAAkB,IAAI,EAAE;EAAxB,EADF,CADF;AAKD,CAND;;AAQA,MAAMD,MAAM,GAAGE,uBAAA,CAAWC,MAAX,CAAkB;EAC/BF,SAAS,EAAE;IAAEG,IAAI,EAAE,CAAR;IAAWC,cAAc,EAAE,QAA3B;IAAqCC,UAAU,EAAE;EAAjD;AADoB,CAAlB,CAAf;;eAIeP,kC"}
|
package/lib/commonjs/domain/groupChannelBannedUsers/component/GroupChannelBannedUsersStatusError.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _TypedPlaceholder = _interopRequireDefault(require("../../../components/TypedPlaceholder"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
const GroupChannelBannedUsersStatusError = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
onPressRetry
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
21
|
+
style: styles.container
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(_TypedPlaceholder.default, {
|
|
23
|
+
type: 'error-wrong',
|
|
24
|
+
onPressRetry: onPressRetry
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const styles = _reactNative.StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
flex: 1,
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
alignItems: 'center'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
var _default = GroupChannelBannedUsersStatusError;
|
|
37
|
+
exports.default = _default;
|
|
38
|
+
//# sourceMappingURL=GroupChannelBannedUsersStatusError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GroupChannelBannedUsersStatusError","onPressRetry","styles","container","StyleSheet","create","flex","justifyContent","alignItems"],"sources":["GroupChannelBannedUsersStatusError.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport TypedPlaceholder from '../../../components/TypedPlaceholder';\nimport type { GroupChannelBannedUsersModule } from '../types';\n\nconst GroupChannelBannedUsersStatusError: GroupChannelBannedUsersModule['StatusError'] = ({ onPressRetry }) => {\n return (\n <View style={styles.container}>\n <TypedPlaceholder type={'error-wrong'} onPressRetry={onPressRetry} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: { flex: 1, justifyContent: 'center', alignItems: 'center' },\n});\n\nexport default GroupChannelBannedUsersStatusError;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAGA,MAAMA,kCAAgF,GAAG,QAAsB;EAAA,IAArB;IAAEC;EAAF,CAAqB;EAC7G,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEC,MAAM,CAACC;EAApB,gBACE,6BAAC,yBAAD;IAAkB,IAAI,EAAE,aAAxB;IAAuC,YAAY,EAAEF;EAArD,EADF,CADF;AAKD,CAND;;AAQA,MAAMC,MAAM,GAAGE,uBAAA,CAAWC,MAAX,CAAkB;EAC/BF,SAAS,EAAE;IAAEG,IAAI,EAAE,CAAR;IAAWC,cAAc,EAAE,QAA3B;IAAqCC,UAAU,EAAE;EAAjD;AADoB,CAAlB,CAAf;;eAIeR,kC"}
|