@sendbird/uikit-react-native 1.0.0 → 1.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 +7 -7
- package/lib/commonjs/InternalErrorBoundary.js.map +1 -1
- package/lib/commonjs/SendbirdUIKitContainer.js +6 -3
- package/lib/commonjs/SendbirdUIKitContainer.js.map +1 -1
- package/lib/commonjs/components/ChannelCover.js.map +1 -1
- package/lib/commonjs/components/ChatFlatList.js.map +1 -1
- package/lib/commonjs/components/FileViewer.js +326 -0
- package/lib/commonjs/components/FileViewer.js.map +1 -0
- package/lib/commonjs/components/GroupChannelPreviewContainer.js +180 -0
- package/lib/commonjs/components/GroupChannelPreviewContainer.js.map +1 -0
- package/lib/commonjs/components/MessageRenderer/AdminMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js +116 -0
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +1 -0
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js +8 -0
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingSenderName.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageOutgoingStatus.js +15 -24
- package/lib/commonjs/components/MessageRenderer/MessageOutgoingStatus.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageTime.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UnknownMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/index.js.map +1 -1
- package/lib/commonjs/components/NewMessagesButton.js.map +1 -1
- package/lib/commonjs/components/ProviderLayout.js.map +1 -1
- package/lib/commonjs/components/SBUPressable.js +45 -0
- package/lib/commonjs/components/SBUPressable.js.map +1 -0
- package/lib/commonjs/components/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/TypedPlaceholder.js.map +1 -1
- package/lib/commonjs/components/UserActionBar.js +1 -3
- package/lib/commonjs/components/UserActionBar.js.map +1 -1
- package/lib/commonjs/components/UserSelectableBar.js +1 -3
- package/lib/commonjs/components/UserSelectableBar.js.map +1 -1
- package/lib/commonjs/constants.js +7 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/contexts/Localization.js.map +1 -1
- package/lib/commonjs/contexts/PlatformService.js +4 -2
- package/lib/commonjs/contexts/PlatformService.js.map +1 -1
- package/lib/commonjs/contexts/SendbirdChat.js +6 -2
- package/lib/commonjs/contexts/SendbirdChat.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +30 -7
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/module/moduleContext.js +2 -3
- package/lib/commonjs/domain/groupChannel/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListHeader.js +2 -5
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListHeader.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsHeader.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js +1 -1
- package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelUserList/types.js.map +1 -1
- package/lib/commonjs/domain/userList/module/moduleContext.js +2 -2
- package/lib/commonjs/domain/userList/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/userList/types.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelCreateFragment.js +3 -7
- package/lib/commonjs/fragments/createGroupChannelCreateFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelFragment.js +13 -11
- package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelListFragment.js +7 -37
- package/lib/commonjs/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelMembersFragment.js +1 -1
- package/lib/commonjs/fragments/createGroupChannelMembersFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js +2 -3
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/commonjs/hooks/useContext.js.map +1 -1
- package/lib/commonjs/index.js +29 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/localization/StringSet.type.js +8 -0
- package/lib/commonjs/localization/StringSet.type.js.map +1 -1
- package/lib/commonjs/platform/createFileService.expo.js +38 -20
- package/lib/commonjs/platform/createFileService.expo.js.map +1 -1
- package/lib/commonjs/platform/createFileService.native.js +20 -3
- package/lib/commonjs/platform/createFileService.native.js.map +1 -1
- package/lib/commonjs/platform/createMediaService.expo.js +64 -0
- package/lib/commonjs/platform/createMediaService.expo.js.map +1 -0
- package/lib/commonjs/platform/createMediaService.native.js +67 -0
- package/lib/commonjs/platform/createMediaService.native.js.map +1 -0
- package/lib/commonjs/platform/createNotificationService.expo.js.map +1 -1
- package/lib/commonjs/platform/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/InternalErrorBoundary.js.map +1 -1
- package/lib/module/SendbirdUIKitContainer.js +7 -4
- package/lib/module/SendbirdUIKitContainer.js.map +1 -1
- package/lib/module/components/ChannelCover.js.map +1 -1
- package/lib/module/components/ChatFlatList.js.map +1 -1
- package/lib/module/components/FileViewer.js +304 -0
- package/lib/module/components/FileViewer.js.map +1 -0
- package/lib/module/components/GroupChannelPreviewContainer.js +158 -0
- package/lib/module/components/GroupChannelPreviewContainer.js.map +1 -0
- package/lib/module/components/MessageRenderer/AdminMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js +100 -0
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +1 -0
- package/lib/module/components/MessageRenderer/FileMessage/index.js +6 -0
- package/lib/module/components/MessageRenderer/FileMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageContainer.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageDateSeparator.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageIncomingSenderName.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageOutgoingStatus.js +17 -26
- package/lib/module/components/MessageRenderer/MessageOutgoingStatus.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageTime.js.map +1 -1
- package/lib/module/components/MessageRenderer/UnknownMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/index.js.map +1 -1
- package/lib/module/components/NewMessagesButton.js.map +1 -1
- package/lib/module/components/ProviderLayout.js.map +1 -1
- package/lib/module/components/SBUPressable.js +33 -0
- package/lib/module/components/SBUPressable.js.map +1 -0
- package/lib/module/components/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/TypedPlaceholder.js.map +1 -1
- package/lib/module/components/UserActionBar.js +1 -1
- package/lib/module/components/UserActionBar.js.map +1 -1
- package/lib/module/components/UserSelectableBar.js +1 -1
- package/lib/module/components/UserSelectableBar.js.map +1 -1
- package/lib/module/constants.js +5 -0
- package/lib/module/constants.js.map +1 -1
- package/lib/module/contexts/Localization.js.map +1 -1
- package/lib/module/contexts/PlatformService.js +4 -2
- package/lib/module/contexts/PlatformService.js.map +1 -1
- package/lib/module/contexts/SendbirdChat.js +6 -2
- package/lib/module/contexts/SendbirdChat.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +28 -7
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/module/domain/groupChannel/module/moduleContext.js +2 -3
- package/lib/module/domain/groupChannel/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannel/types.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListHeader.js +2 -5
- package/lib/module/domain/groupChannelList/component/GroupChannelListHeader.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/module/domain/groupChannelList/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannelList/types.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsHeader.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/module/moduleContext.js +1 -1
- package/lib/module/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/types.js.map +1 -1
- package/lib/module/domain/groupChannelUserList/types.js.map +1 -1
- package/lib/module/domain/userList/module/moduleContext.js +2 -2
- package/lib/module/domain/userList/module/moduleContext.js.map +1 -1
- package/lib/module/domain/userList/types.js.map +1 -1
- package/lib/module/fragments/createGroupChannelCreateFragment.js +4 -4
- package/lib/module/fragments/createGroupChannelCreateFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelFragment.js +15 -13
- package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelListFragment.js +11 -38
- package/lib/module/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelMembersFragment.js +1 -1
- package/lib/module/fragments/createGroupChannelMembersFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelSettingsFragment.js +2 -3
- package/lib/module/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/module/hooks/useContext.js.map +1 -1
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/localization/StringSet.type.js +8 -0
- package/lib/module/localization/StringSet.type.js.map +1 -1
- package/lib/module/platform/createFileService.expo.js +38 -20
- package/lib/module/platform/createFileService.expo.js.map +1 -1
- package/lib/module/platform/createFileService.native.js +20 -3
- package/lib/module/platform/createFileService.native.js.map +1 -1
- package/lib/module/platform/createMediaService.expo.js +54 -0
- package/lib/module/platform/createMediaService.expo.js.map +1 -0
- package/lib/module/platform/createMediaService.native.js +57 -0
- package/lib/module/platform/createMediaService.native.js.map +1 -0
- package/lib/module/platform/createNotificationService.expo.js.map +1 -1
- package/lib/module/platform/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/__template__/component/__domain__Header.d.ts +1 -2
- package/lib/typescript/__template__/component/__domain__StatusEmpty.d.ts +0 -1
- package/lib/typescript/__template__/component/__domain__StatusLoading.d.ts +0 -1
- package/lib/typescript/__template__/component/__domain__View.d.ts +1 -2
- package/lib/typescript/__template__/module/moduleContext.d.ts +2 -3
- package/lib/typescript/__template__/types.d.ts +2 -2
- package/lib/typescript/src/InternalErrorBoundary.d.ts +1 -0
- package/lib/typescript/src/SendbirdUIKitContainer.d.ts +9 -6
- package/lib/typescript/src/components/ChannelCover.d.ts +1 -2
- package/lib/typescript/src/components/FileViewer.d.ts +12 -0
- package/lib/typescript/src/components/GroupChannelPreviewContainer.d.ts +8 -0
- package/lib/typescript/src/components/MessageRenderer/AdminMessage/index.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/FileMessage/BaseFileMessage.d.ts +3 -3
- package/lib/typescript/src/components/MessageRenderer/FileMessage/ImageFileMessage.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/FileMessage/VideoFileMessage.d.ts +3 -0
- package/lib/typescript/src/components/MessageRenderer/FileMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageContainer.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageDateSeparator.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingAvatar.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingSenderName.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/MessageOutgoingStatus.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageTime.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UnknownMessage/index.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/BaseUserMessage.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
- package/lib/typescript/src/components/ProviderLayout.d.ts +1 -1
- package/lib/typescript/src/components/SBUPressable.d.ts +18 -0
- package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
- package/lib/typescript/src/components/TypedPlaceholder.d.ts +1 -2
- package/lib/typescript/src/components/UserActionBar.d.ts +2 -3
- package/lib/typescript/src/components/UserSelectableBar.d.ts +2 -3
- package/lib/typescript/src/constants.d.ts +5 -0
- package/lib/typescript/src/contexts/Localization.d.ts +2 -3
- package/lib/typescript/src/contexts/PlatformService.d.ts +5 -4
- package/lib/typescript/src/contexts/SendbirdChat.d.ts +7 -3
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelHeader.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/EditInput.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/SendInput.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/index.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +4 -3
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusEmpty.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusLoading.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannel/types.d.ts +8 -4
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListHeader.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListList.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusEmpty.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusLoading.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelList/module/moduleContext.d.ts +2 -3
- package/lib/typescript/src/domain/groupChannelList/types.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelSettings/module/moduleContext.d.ts +2 -3
- package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +4 -4
- package/lib/typescript/src/domain/userList/component/UserListStatusEmpty.d.ts +0 -1
- package/lib/typescript/src/domain/userList/component/UserListStatusLoading.d.ts +0 -1
- package/lib/typescript/src/domain/userList/module/moduleContext.d.ts +2 -3
- package/lib/typescript/src/domain/userList/types.d.ts +1 -1
- package/lib/typescript/src/hooks/useContext.d.ts +8 -4
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/localization/StringSet.type.d.ts +4 -0
- package/lib/typescript/src/platform/createFileService.expo.d.ts +4 -4
- package/lib/typescript/src/platform/createMediaService.expo.d.ts +9 -0
- package/lib/typescript/src/platform/createMediaService.native.d.ts +9 -0
- package/lib/typescript/src/platform/createNotificationService.expo.d.ts +1 -1
- package/lib/typescript/src/platform/types.d.ts +20 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +16 -7
- package/src/InternalErrorBoundary.tsx +1 -0
- package/src/SendbirdUIKitContainer.tsx +17 -6
- package/src/components/ChannelCover.tsx +1 -1
- package/src/components/ChatFlatList.tsx +1 -1
- package/src/components/FileViewer.tsx +284 -0
- package/src/components/GroupChannelPreviewContainer.tsx +134 -0
- package/src/components/MessageRenderer/AdminMessage/index.tsx +1 -1
- package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +4 -6
- package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +1 -1
- package/src/components/MessageRenderer/FileMessage/VideoFileMessage.tsx +91 -0
- package/src/components/MessageRenderer/FileMessage/index.tsx +7 -1
- package/src/components/MessageRenderer/MessageContainer.tsx +1 -1
- package/src/components/MessageRenderer/MessageDateSeparator.tsx +1 -1
- package/src/components/MessageRenderer/MessageIncomingAvatar.tsx +5 -2
- package/src/components/MessageRenderer/MessageIncomingSenderName.tsx +5 -2
- package/src/components/MessageRenderer/MessageOutgoingStatus.tsx +26 -33
- package/src/components/MessageRenderer/MessageTime.tsx +6 -2
- package/src/components/MessageRenderer/UnknownMessage/index.tsx +1 -1
- package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +1 -1
- package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +4 -2
- package/src/components/MessageRenderer/UserMessage/index.tsx +1 -1
- package/src/components/NewMessagesButton.tsx +1 -1
- package/src/components/ProviderLayout.tsx +1 -1
- package/src/components/SBUPressable.tsx +40 -0
- package/src/components/ScrollToBottomButton.tsx +1 -1
- package/src/components/TypedPlaceholder.tsx +1 -1
- package/src/components/UserActionBar.tsx +2 -2
- package/src/components/UserSelectableBar.tsx +2 -2
- package/src/constants.ts +5 -0
- package/src/contexts/Localization.tsx +2 -3
- package/src/contexts/PlatformService.tsx +13 -6
- package/src/contexts/SendbirdChat.tsx +15 -7
- package/src/domain/groupChannel/component/GroupChannelHeader.tsx +1 -1
- package/src/domain/groupChannel/component/GroupChannelInput/EditInput.tsx +1 -1
- package/src/domain/groupChannel/component/GroupChannelInput/SendInput.tsx +2 -2
- package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +2 -2
- package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +25 -8
- package/src/domain/groupChannel/module/moduleContext.tsx +6 -13
- package/src/domain/groupChannel/types.ts +10 -4
- package/src/domain/groupChannelList/component/GroupChannelListHeader.tsx +2 -4
- package/src/domain/groupChannelList/component/GroupChannelListList.tsx +2 -2
- package/src/domain/groupChannelList/component/GroupChannelListTypeSelector.tsx +4 -4
- package/src/domain/groupChannelList/module/moduleContext.tsx +2 -2
- package/src/domain/groupChannelList/types.ts +3 -2
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.tsx +1 -1
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.tsx +1 -1
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +2 -2
- package/src/domain/groupChannelSettings/module/moduleContext.tsx +7 -15
- package/src/domain/groupChannelSettings/types.ts +2 -2
- package/src/domain/groupChannelUserList/types.ts +4 -5
- package/src/domain/userList/module/moduleContext.tsx +3 -7
- package/src/domain/userList/types.ts +1 -1
- package/src/fragments/createGroupChannelCreateFragment.tsx +38 -41
- package/src/fragments/createGroupChannelFragment.tsx +23 -33
- package/src/fragments/createGroupChannelListFragment.tsx +10 -32
- package/src/fragments/createGroupChannelMembersFragment.tsx +34 -39
- package/src/fragments/createGroupChannelSettingsFragment.tsx +1 -9
- package/src/hooks/useContext.ts +3 -5
- package/src/index.ts +5 -1
- package/src/localization/StringSet.type.ts +8 -0
- package/src/platform/createFileService.expo.ts +29 -16
- package/src/platform/createFileService.native.ts +16 -3
- package/src/platform/createMediaService.expo.tsx +30 -0
- package/src/platform/createMediaService.native.tsx +37 -0
- package/src/platform/createNotificationService.expo.ts +1 -1
- package/src/platform/types.ts +26 -1
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","URLParsedText","createStyleSheet","useUIKitTheme","useLocalization","BaseUserMessage","message","variant","pressed","colors","color","ui","STRINGS","styles","container","backgroundColor","background","textMsg","Boolean","updatedAt","textEdited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","paddingHorizontal","paddingVertical","borderRadius"],"sources":["BaseUserMessage.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { Text, URLParsedText, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { UserMessageProps } from './index';\n\nconst BaseUserMessage
|
|
1
|
+
{"version":3,"names":["React","View","Text","URLParsedText","createStyleSheet","useUIKitTheme","useLocalization","BaseUserMessage","message","variant","pressed","colors","color","ui","STRINGS","styles","container","backgroundColor","background","textMsg","Boolean","updatedAt","textEdited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","paddingHorizontal","paddingVertical","borderRadius"],"sources":["BaseUserMessage.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { Text, URLParsedText, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { UserMessageProps } from './index';\n\nconst BaseUserMessage = ({ message, variant, pressed }: UserMessageProps) => {\n const { colors } = useUIKitTheme();\n const color = colors.ui.message[variant][pressed ? 'pressed' : 'enabled'];\n const { STRINGS } = useLocalization();\n return (\n <View style={[styles.container, { backgroundColor: color.background }]}>\n <URLParsedText body3 strict color={color.textMsg}>\n {message.message}\n {Boolean(message.updatedAt) && (\n <Text body3 color={color.textEdited}>\n {STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX}\n </Text>\n )}\n </URLParsedText>\n </View>\n );\n};\nconst styles = createStyleSheet({\n container: {\n paddingHorizontal: 12,\n paddingVertical: 6,\n borderRadius: 16,\n },\n});\n\nexport default BaseUserMessage;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,IAAT,EAAeC,aAAf,EAA8BC,gBAA9B,EAAgDC,aAAhD,QAAqE,yCAArE;AAEA,SAASC,eAAT,QAAgC,2BAAhC;;AAGA,MAAMC,eAAe,GAAG,QAAqD;EAAA,IAApD;IAAEC,OAAF;IAAWC,OAAX;IAAoBC;EAApB,CAAoD;EAC3E,MAAM;IAAEC;EAAF,IAAaN,aAAa,EAAhC;EACA,MAAMO,KAAK,GAAGD,MAAM,CAACE,EAAP,CAAUL,OAAV,CAAkBC,OAAlB,EAA2BC,OAAO,GAAG,SAAH,GAAe,SAAjD,CAAd;EACA,MAAM;IAAEI;EAAF,IAAcR,eAAe,EAAnC;EACA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACS,MAAM,CAACC,SAAR,EAAmB;MAAEC,eAAe,EAAEL,KAAK,CAACM;IAAzB,CAAnB;EAAb,gBACE,oBAAC,aAAD;IAAe,KAAK,MAApB;IAAqB,MAAM,MAA3B;IAA4B,KAAK,EAAEN,KAAK,CAACO;EAAzC,GACGX,OAAO,CAACA,OADX,EAEGY,OAAO,CAACZ,OAAO,CAACa,SAAT,CAAP,iBACC,oBAAC,IAAD;IAAM,KAAK,MAAX;IAAY,KAAK,EAAET,KAAK,CAACU;EAAzB,GACGR,OAAO,CAACS,aAAR,CAAsBC,6BADzB,CAHJ,CADF,CADF;AAYD,CAhBD;;AAiBA,MAAMT,MAAM,GAAGX,gBAAgB,CAAC;EAC9BY,SAAS,EAAE;IACTS,iBAAiB,EAAE,EADV;IAETC,eAAe,EAAE,CAFR;IAGTC,YAAY,EAAE;EAHL;AADmB,CAAD,CAA/B;AAQA,eAAepB,eAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Linking","TouchableOpacity","View","Icon","Image","Text","URLParsedText","createStyleSheet","useUIKitTheme","conditionChaining","useLocalization","OpenGraphUserMessage","message","variant","pressed","ogMetaData","STRINGS","colors","select","palette","color","ui","imageNotFound","setImageNotFound","styles","container","backgroundColor","background","messageContainer","textMsg","Boolean","updatedAt","textEdited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","openURL","url","catch","ogImageContainer","dark","background500","light","background200","ogImage","onBackground02","uri","defaultImage","ogContainer","background400","background100","onBackground01","ogTitle","title","description","ogDesc","borderRadius","overflow","paddingVertical","paddingHorizontal","paddingTop","paddingBottom","width","height","marginBottom","lineHeight"],"sources":["OpenGraphUserMessage.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Linking, TouchableOpacity, View } from 'react-native';\nimport type Sendbird from 'sendbird';\n\nimport {\n Icon,\n Image,\n Text,\n URLParsedText,\n createStyleSheet,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { UserMessageProps } from './index';\n\ntype Props = UserMessageProps & {
|
|
1
|
+
{"version":3,"names":["React","useState","Linking","TouchableOpacity","View","Icon","Image","Text","URLParsedText","createStyleSheet","useUIKitTheme","conditionChaining","useLocalization","OpenGraphUserMessage","message","variant","pressed","ogMetaData","STRINGS","colors","select","palette","color","ui","imageNotFound","setImageNotFound","styles","container","backgroundColor","background","messageContainer","textMsg","Boolean","updatedAt","textEdited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","openURL","url","catch","ogImageContainer","dark","background500","light","background200","ogImage","onBackground02","uri","defaultImage","ogContainer","background400","background100","onBackground01","ogTitle","title","description","ogDesc","borderRadius","overflow","paddingVertical","paddingHorizontal","paddingTop","paddingBottom","width","height","marginBottom","lineHeight"],"sources":["OpenGraphUserMessage.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Linking, TouchableOpacity, View } from 'react-native';\nimport type Sendbird from 'sendbird';\n\nimport {\n Icon,\n Image,\n Text,\n URLParsedText,\n createStyleSheet,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { UserMessageProps } from './index';\n\ntype Props = UserMessageProps & {\n ogMetaData: Sendbird.OGMetaData;\n};\nconst OpenGraphUserMessage = ({ message, variant, pressed, ogMetaData }: Props) => {\n const { STRINGS } = useLocalization();\n const { colors, select, palette } = useUIKitTheme();\n const color = colors.ui.message[variant][pressed ? 'pressed' : 'enabled'];\n const [imageNotFound, setImageNotFound] = useState(false);\n return (\n <View style={[styles.container, { backgroundColor: color.background }]}>\n <View style={styles.messageContainer}>\n <URLParsedText body3 color={color.textMsg}>\n {message.message}\n {Boolean(message.updatedAt) && (\n <Text body3 color={color.textEdited}>\n {STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX}\n </Text>\n )}\n </URLParsedText>\n </View>\n <TouchableOpacity activeOpacity={0.7} onPress={() => Linking.openURL(ogMetaData.url).catch()}>\n <View\n style={[\n styles.ogImageContainer,\n { backgroundColor: select({ dark: palette.background500, light: palette.background200 }) },\n ]}\n >\n {conditionChaining(\n [imageNotFound],\n [\n <Icon containerStyle={styles.ogImage} icon={'thumbnail-none'} size={48} color={colors.onBackground02} />,\n <Image\n source={{ uri: ogMetaData.defaultImage?.url }}\n style={styles.ogImage}\n resizeMode={'cover'}\n onError={() => setImageNotFound(true)}\n />,\n ],\n )}\n </View>\n <View\n style={[\n styles.ogContainer,\n { backgroundColor: select({ dark: palette.background400, light: palette.background100 }) },\n ]}\n >\n <Text numberOfLines={3} body2 color={colors.onBackground01} style={styles.ogTitle}>\n {ogMetaData.title}\n </Text>\n {Boolean(ogMetaData.description) && (\n <Text numberOfLines={1} caption2 color={colors.onBackground01} style={styles.ogDesc}>\n {ogMetaData.description}\n </Text>\n )}\n <Text numberOfLines={1} caption2 color={colors.onBackground02}>\n {ogMetaData.url}\n </Text>\n </View>\n </TouchableOpacity>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n messageContainer: {\n paddingVertical: 6,\n paddingHorizontal: 12,\n },\n ogContainer: {\n paddingHorizontal: 12,\n paddingTop: 8,\n paddingBottom: 12,\n },\n ogImageContainer: {\n width: 240,\n height: 136,\n },\n ogImage: {\n width: '100%',\n height: '100%',\n },\n ogTitle: {\n marginBottom: 4,\n },\n ogDesc: {\n lineHeight: 14,\n marginBottom: 8,\n },\n});\n\nexport default OpenGraphUserMessage;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,OAAT,EAAkBC,gBAAlB,EAAoCC,IAApC,QAAgD,cAAhD;AAGA,SACEC,IADF,EAEEC,KAFF,EAGEC,IAHF,EAIEC,aAJF,EAKEC,gBALF,EAMEC,aANF,QAOO,yCAPP;AAQA,SAASC,iBAAT,QAAkC,uBAAlC;AAEA,SAASC,eAAT,QAAgC,2BAAhC;;AAMA,MAAMC,oBAAoB,GAAG,QAAsD;EAAA;;EAAA,IAArD;IAAEC,OAAF;IAAWC,OAAX;IAAoBC,OAApB;IAA6BC;EAA7B,CAAqD;EACjF,MAAM;IAAEC;EAAF,IAAcN,eAAe,EAAnC;EACA,MAAM;IAAEO,MAAF;IAAUC,MAAV;IAAkBC;EAAlB,IAA8BX,aAAa,EAAjD;EACA,MAAMY,KAAK,GAAGH,MAAM,CAACI,EAAP,CAAUT,OAAV,CAAkBC,OAAlB,EAA2BC,OAAO,GAAG,SAAH,GAAe,SAAjD,CAAd;EACA,MAAM,CAACQ,aAAD,EAAgBC,gBAAhB,IAAoCxB,QAAQ,CAAC,KAAD,CAAlD;EACA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAE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ADA;IAEPC,MAAM,EAAE;EAFD,CAlBqB;EAsB9BX,OAAO,EAAE;IACPY,YAAY,EAAE;EADP,CAtBqB;EAyB9BT,MAAM,EAAE;IACNU,UAAU,EAAE,EADN;IAEND,YAAY,EAAE;EAFR;AAzBsB,CAAD,CAA/B;AA+BA,eAAepD,oBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","BaseUserMessage","OpenGraphUserMessage","UserMessage","props","message","ogMetaData","memo"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { SendbirdUserMessage } from '@sendbird/uikit-utils';\n\nimport type { MessageRendererInterface } from '../index';\nimport BaseUserMessage from './BaseUserMessage';\nimport OpenGraphUserMessage from './OpenGraphUserMessage';\n\nexport type UserMessageProps = MessageRendererInterface<SendbirdUserMessage>;\nconst UserMessage
|
|
1
|
+
{"version":3,"names":["React","BaseUserMessage","OpenGraphUserMessage","UserMessage","props","message","ogMetaData","memo"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { SendbirdUserMessage } from '@sendbird/uikit-utils';\n\nimport type { MessageRendererInterface } from '../index';\nimport BaseUserMessage from './BaseUserMessage';\nimport OpenGraphUserMessage from './OpenGraphUserMessage';\n\nexport type UserMessageProps = MessageRendererInterface<SendbirdUserMessage>;\nconst UserMessage = (props: UserMessageProps) => {\n if (props.message.ogMetaData) {\n return <OpenGraphUserMessage {...props} ogMetaData={props.message.ogMetaData} />;\n }\n return <BaseUserMessage {...props} />;\n};\n\nexport default React.memo(UserMessage);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAKA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,OAAOC,oBAAP,MAAiC,wBAAjC;;AAGA,MAAMC,WAAW,GAAIC,KAAD,IAA6B;EAC/C,IAAIA,KAAK,CAACC,OAAN,CAAcC,UAAlB,EAA8B;IAC5B,oBAAO,oBAAC,oBAAD,eAA0BF,KAA1B;MAAiC,UAAU,EAAEA,KAAK,CAACC,OAAN,CAAcC;IAA3D,GAAP;EACD;;EACD,oBAAO,oBAAC,eAAD,EAAqBF,KAArB,CAAP;AACD,CALD;;AAOA,4BAAeJ,KAAK,CAACO,IAAN,CAAWJ,WAAX,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","TouchableOpacity","Text","createStyleSheet","useUIKitTheme","useLocalization","NewMessagesButton","newMessages","visible","onPress","STRINGS","select","palette","colors","length","styles","container","backgroundColor","dark","background400","light","background50","primary","GROUP_CHANNEL","LIST_BUTTON_NEW_MSG","paddingHorizontal","paddingVertical","borderRadius","android","elevation","ios","shadowColor","shadowRadius","shadowOffset","width","height","shadowOpacity","memo"],"sources":["NewMessagesButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TouchableOpacity } from 'react-native';\n\nimport { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../hooks/useContext';\n\ntype Props = {\n newMessages: SendbirdMessage[];\n visible: boolean;\n onPress: () => void;\n};\nconst NewMessagesButton
|
|
1
|
+
{"version":3,"names":["React","Platform","TouchableOpacity","Text","createStyleSheet","useUIKitTheme","useLocalization","NewMessagesButton","newMessages","visible","onPress","STRINGS","select","palette","colors","length","styles","container","backgroundColor","dark","background400","light","background50","primary","GROUP_CHANNEL","LIST_BUTTON_NEW_MSG","paddingHorizontal","paddingVertical","borderRadius","android","elevation","ios","shadowColor","shadowRadius","shadowOffset","width","height","shadowOpacity","memo"],"sources":["NewMessagesButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TouchableOpacity } from 'react-native';\n\nimport { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../hooks/useContext';\n\ntype Props = {\n newMessages: SendbirdMessage[];\n visible: boolean;\n onPress: () => void;\n};\nconst NewMessagesButton = ({ newMessages, visible, onPress }: Props) => {\n const { STRINGS } = useLocalization();\n const { select, palette, colors } = useUIKitTheme();\n if (newMessages.length === 0 || !visible) return null;\n return (\n <TouchableOpacity\n activeOpacity={0.8}\n onPress={onPress}\n style={[\n styles.container,\n { backgroundColor: select({ dark: palette.background400, light: palette.background50 }) },\n ]}\n >\n <Text button color={colors.primary}>\n {STRINGS.GROUP_CHANNEL.LIST_BUTTON_NEW_MSG(newMessages)}\n </Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingHorizontal: 12,\n paddingVertical: 10,\n borderRadius: 20,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowColor: 'black',\n shadowRadius: 4,\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.3,\n },\n }),\n },\n});\nexport default React.memo(NewMessagesButton);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,gBAAnB,QAA2C,cAA3C;AAEA,SAASC,IAAT,EAAeC,gBAAf,EAAiCC,aAAjC,QAAsD,yCAAtD;AAGA,SAASC,eAAT,QAAgC,qBAAhC;;AAOA,MAAMC,iBAAiB,GAAG,QAA8C;EAAA,IAA7C;IAAEC,WAAF;IAAeC,OAAf;IAAwBC;EAAxB,CAA6C;EACtE,MAAM;IAAEC;EAAF,IAAcL,eAAe,EAAnC;EACA,MAAM;IAAEM,MAAF;IAAUC,OAAV;IAAmBC;EAAnB,IAA8BT,aAAa,EAAjD;EACA,IAAIG,WAAW,CAACO,MAAZ,KAAuB,CAAvB,IAA4B,CAACN,OAAjC,EAA0C,OAAO,IAAP;EAC1C,oBACE,oBAAC,gBAAD;IACE,aAAa,EAAE,GADjB;IAEE,OAAO,EAAEC,OAFX;IAGE,KAAK,EAAE,CACLM,MAAM,CAACC,SADF,EAEL;MAAEC,eAAe,EAAEN,MAAM,CAAC;QAAEO,IAAI,EAAEN,OAAO,CAACO,aAAhB;QAA+BC,KAAK,EAAER,OAAO,CAACS;MAA9C,CAAD;IAAzB,CAFK;EAHT,gBAQE,oBAAC,IAAD;IAAM,MAAM,MAAZ;IAAa,KAAK,EAAER,MAAM,CAACS;EAA3B,GACGZ,OAAO,CAACa,aAAR,CAAsBC,mBAAtB,CAA0CjB,WAA1C,CADH,CARF,CADF;AAcD,CAlBD;;AAoBA,MAAMQ,MAAM,GAAGZ,gBAAgB,CAAC;EAC9Ba,SAAS,EAAE;IACTS,iBAAiB,EAAE,EADV;IAETC,eAAe,EAAE,EAFR;IAGTC,YAAY,EAAE,EAHL;IAIT,GAAG3B,QAAQ,CAACW,MAAT,CAAgB;MACjBiB,OAAO,EAAE;QACPC,SAAS,EAAE;MADJ,CADQ;MAIjBC,GAAG,EAAE;QACHC,WAAW,EAAE,OADV;QAEHC,YAAY,EAAE,CAFX;QAGHC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAT;UAAYC,MAAM,EAAE;QAApB,CAHX;QAIHC,aAAa,EAAE;MAJZ;IAJY,CAAhB;EAJM;AADmB,CAAD,CAA/B;AAkBA,4BAAerC,KAAK,CAACsC,IAAN,CAAW/B,iBAAX,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","createStyleSheet","useUIKitTheme","ProviderLayout","children","colors","styles","view","backgroundColor","background","flex"],"sources":["ProviderLayout.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nconst ProviderLayout
|
|
1
|
+
{"version":3,"names":["React","View","createStyleSheet","useUIKitTheme","ProviderLayout","children","colors","styles","view","backgroundColor","background","flex"],"sources":["ProviderLayout.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nconst ProviderLayout = ({ children }: React.PropsWithChildren) => {\n const { colors } = useUIKitTheme();\n return <View style={[styles.view, { backgroundColor: colors.background }]}>{children}</View>;\n};\n\nconst styles = createStyleSheet({\n view: {\n flex: 1,\n },\n});\n\nexport default ProviderLayout;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,gBAAT,EAA2BC,aAA3B,QAAgD,yCAAhD;;AAEA,MAAMC,cAAc,GAAG,QAA2C;EAAA,IAA1C;IAAEC;EAAF,CAA0C;EAChE,MAAM;IAAEC;EAAF,IAAaH,aAAa,EAAhC;EACA,oBAAO,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACI,MAAM,CAACC,IAAR,EAAc;MAAEC,eAAe,EAAEH,MAAM,CAACI;IAA1B,CAAd;EAAb,GAAqEL,QAArE,CAAP;AACD,CAHD;;AAKA,MAAME,MAAM,GAAGL,gBAAgB,CAAC;EAC9BM,IAAI,EAAE;IACJG,IAAI,EAAE;EADF;AADwB,CAAD,CAA/B;AAMA,eAAeP,cAAf"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Pressable, TouchableOpacity } from 'react-native';
|
|
5
|
+
import { DEFAULT_LONG_PRESS_DELAY } from '../constants';
|
|
6
|
+
|
|
7
|
+
function getComponent(as) {
|
|
8
|
+
switch (as) {
|
|
9
|
+
case 'Pressable':
|
|
10
|
+
return Pressable;
|
|
11
|
+
|
|
12
|
+
case 'TouchableOpacity':
|
|
13
|
+
return TouchableOpacity;
|
|
14
|
+
|
|
15
|
+
default:
|
|
16
|
+
return Pressable;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const SBUPressable = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
as,
|
|
23
|
+
...props
|
|
24
|
+
} = _ref;
|
|
25
|
+
const Renderer = getComponent(as); // @ts-ignore
|
|
26
|
+
|
|
27
|
+
return /*#__PURE__*/React.createElement(Renderer, _extends({
|
|
28
|
+
delayLongPress: DEFAULT_LONG_PRESS_DELAY
|
|
29
|
+
}, props));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default SBUPressable;
|
|
33
|
+
//# sourceMappingURL=SBUPressable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Pressable","TouchableOpacity","DEFAULT_LONG_PRESS_DELAY","getComponent","as","SBUPressable","props","Renderer"],"sources":["SBUPressable.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, PressableProps, TouchableOpacity, TouchableOpacityProps } from 'react-native';\n\nimport { DEFAULT_LONG_PRESS_DELAY } from '../constants';\n\ntype Components = 'Pressable' | 'TouchableOpacity';\ntype Props<T extends Components = 'Pressable'> = {\n as?: T;\n} & ExtractProps<T, AsProps>;\n\ntype AsProps =\n | {\n type: 'Pressable';\n props: PressableProps;\n }\n | {\n type: 'TouchableOpacity';\n props: TouchableOpacityProps;\n };\n\ntype ExtractProps<T extends Components, U extends AsProps> = U extends { type: T; props: infer P } ? P : never;\n\nfunction getComponent(as?: Components) {\n switch (as) {\n case 'Pressable':\n return Pressable;\n case 'TouchableOpacity':\n return TouchableOpacity;\n default:\n return Pressable;\n }\n}\n\nconst SBUPressable = <T extends Components>({ as, ...props }: Props<T>) => {\n const Renderer = getComponent(as);\n // @ts-ignore\n return <Renderer delayLongPress={DEFAULT_LONG_PRESS_DELAY} {...props} />;\n};\n\nexport default SBUPressable;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,EAAoCC,gBAApC,QAAmF,cAAnF;AAEA,SAASC,wBAAT,QAAyC,cAAzC;;AAmBA,SAASC,YAAT,CAAsBC,EAAtB,EAAuC;EACrC,QAAQA,EAAR;IACE,KAAK,WAAL;MACE,OAAOJ,SAAP;;IACF,KAAK,kBAAL;MACE,OAAOC,gBAAP;;IACF;MACE,OAAOD,SAAP;EANJ;AAQD;;AAED,MAAMK,YAAY,GAAG,QAAsD;EAAA,IAA/B;IAAED,EAAF;IAAM,GAAGE;EAAT,CAA+B;EACzE,MAAMC,QAAQ,GAAGJ,YAAY,CAACC,EAAD,CAA7B,CADyE,CAEzE;;EACA,oBAAO,oBAAC,QAAD;IAAU,cAAc,EAAEF;EAA1B,GAAwDI,KAAxD,EAAP;AACD,CAJD;;AAMA,eAAeD,YAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","TouchableOpacity","Icon","createStyleSheet","useUIKitTheme","ScrollToBottomButton","visible","onPress","palette","select","styles","container","opacity","backgroundColor","dark","background400","light","background50","padding","borderRadius","android","elevation","ios","shadowColor","shadowRadius","shadowOffset","width","height","shadowOpacity","memo"],"sources":["ScrollToBottomButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TouchableOpacity } from 'react-native';\n\nimport { Icon, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\ntype Props = {\n visible: boolean;\n onPress: () => void;\n};\nconst ScrollToBottomButton
|
|
1
|
+
{"version":3,"names":["React","Platform","TouchableOpacity","Icon","createStyleSheet","useUIKitTheme","ScrollToBottomButton","visible","onPress","palette","select","styles","container","opacity","backgroundColor","dark","background400","light","background50","padding","borderRadius","android","elevation","ios","shadowColor","shadowRadius","shadowOffset","width","height","shadowOpacity","memo"],"sources":["ScrollToBottomButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, TouchableOpacity } from 'react-native';\n\nimport { Icon, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\ntype Props = {\n visible: boolean;\n onPress: () => void;\n};\nconst ScrollToBottomButton = ({ visible, onPress }: Props) => {\n const { palette, select } = useUIKitTheme();\n return (\n <TouchableOpacity\n onPress={onPress}\n activeOpacity={0.8}\n disabled={!visible}\n style={[\n styles.container,\n {\n opacity: visible ? 1 : 0,\n backgroundColor: select({ dark: palette.background400, light: palette.background50 }),\n },\n ]}\n >\n <Icon icon={'chevron-down'} size={22} />\n </TouchableOpacity>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n padding: 8,\n borderRadius: 24,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowColor: 'black',\n shadowRadius: 4,\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.3,\n },\n }),\n },\n});\n\nexport default React.memo(ScrollToBottomButton);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,gBAAnB,QAA2C,cAA3C;AAEA,SAASC,IAAT,EAAeC,gBAAf,EAAiCC,aAAjC,QAAsD,yCAAtD;;AAMA,MAAMC,oBAAoB,GAAG,QAAiC;EAAA,IAAhC;IAAEC,OAAF;IAAWC;EAAX,CAAgC;EAC5D,MAAM;IAAEC,OAAF;IAAWC;EAAX,IAAsBL,aAAa,EAAzC;EACA,oBACE,oBAAC,gBAAD;IACE,OAAO,EAAEG,OADX;IAEE,aAAa,EAAE,GAFjB;IAGE,QAAQ,EAAE,CAACD,OAHb;IAIE,KAAK,EAAE,CACLI,MAAM,CAACC,SADF,EAEL;MACEC,OAAO,EAAEN,OAAO,GAAG,CAAH,GAAO,CADzB;MAEEO,eAAe,EAAEJ,MAAM,CAAC;QAAEK,IAAI,EAAEN,OAAO,CAACO,aAAhB;QAA+BC,KAAK,EAAER,OAAO,CAACS;MAA9C,CAAD;IAFzB,CAFK;EAJT,gBAYE,oBAAC,IAAD;IAAM,IAAI,EAAE,cAAZ;IAA4B,IAAI,EAAE;EAAlC,EAZF,CADF;AAgBD,CAlBD;;AAoBA,MAAMP,MAAM,GAAGP,gBAAgB,CAAC;EAC9BQ,SAAS,EAAE;IACTO,OAAO,EAAE,CADA;IAETC,YAAY,EAAE,EAFL;IAGT,GAAGnB,QAAQ,CAACS,MAAT,CAAgB;MACjBW,OAAO,EAAE;QACPC,SAAS,EAAE;MADJ,CADQ;MAIjBC,GAAG,EAAE;QACHC,WAAW,EAAE,OADV;QAEHC,YAAY,EAAE,CAFX;QAGHC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAT;UAAYC,MAAM,EAAE;QAApB,CAHX;QAIHC,aAAa,EAAE;MAJZ;IAJY,CAAhB;EAHM;AADmB,CAAD,CAA/B;AAkBA,4BAAe7B,KAAK,CAAC8B,IAAN,CAAWxB,oBAAX,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Placeholder","useLocalization","TypedPlaceholder","type","onPressRetry","STRINGS","PLACEHOLDER","NO_BANNED_MEMBERS","NO_CHANNELS","NO_MESSAGES","NO_MUTED_MEMBERS","NO_RESULTS_FOUND","NO_USERS","ERROR","MESSAGE","RETRY_LABEL"],"sources":["TypedPlaceholder.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Placeholder } from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../hooks/useContext';\n\ntype Props = {\n type:\n | 'no-banned-members'\n | 'no-channels'\n | 'no-messages'\n | 'no-users'\n | 'no-muted-members'\n | 'no-results-found'\n | 'error-wrong'\n | 'loading';\n onPressRetry?: () => void;\n};\nconst TypedPlaceholder
|
|
1
|
+
{"version":3,"names":["React","Placeholder","useLocalization","TypedPlaceholder","type","onPressRetry","STRINGS","PLACEHOLDER","NO_BANNED_MEMBERS","NO_CHANNELS","NO_MESSAGES","NO_MUTED_MEMBERS","NO_RESULTS_FOUND","NO_USERS","ERROR","MESSAGE","RETRY_LABEL"],"sources":["TypedPlaceholder.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Placeholder } from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../hooks/useContext';\n\ntype Props = {\n type:\n | 'no-banned-members'\n | 'no-channels'\n | 'no-messages'\n | 'no-users'\n | 'no-muted-members'\n | 'no-results-found'\n | 'error-wrong'\n | 'loading';\n onPressRetry?: () => void;\n};\nconst TypedPlaceholder = ({ type, onPressRetry }: Props) => {\n const { STRINGS } = useLocalization();\n switch (type) {\n case 'no-banned-members':\n return <Placeholder icon={'ban'} message={STRINGS.PLACEHOLDER.NO_BANNED_MEMBERS} />;\n case 'no-channels':\n return <Placeholder icon={'chat'} message={STRINGS.PLACEHOLDER.NO_CHANNELS} />;\n case 'no-messages':\n return <Placeholder icon={'message'} message={STRINGS.PLACEHOLDER.NO_MESSAGES} />;\n case 'no-muted-members':\n return <Placeholder icon={'mute'} message={STRINGS.PLACEHOLDER.NO_MUTED_MEMBERS} />;\n case 'no-results-found':\n return <Placeholder icon={'search'} message={STRINGS.PLACEHOLDER.NO_RESULTS_FOUND} />;\n case 'no-users':\n return <Placeholder icon={'members'} message={STRINGS.PLACEHOLDER.NO_USERS} />;\n case 'error-wrong':\n return (\n <Placeholder\n icon={'error'}\n message={STRINGS.PLACEHOLDER.ERROR.MESSAGE}\n errorRetryLabel={STRINGS.PLACEHOLDER.ERROR.RETRY_LABEL}\n onPressRetry={onPressRetry}\n />\n );\n case 'loading':\n return <Placeholder loading icon={'spinner'} />;\n }\n};\n\nexport default TypedPlaceholder;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,WAAT,QAA4B,yCAA5B;AAEA,SAASC,eAAT,QAAgC,qBAAhC;;AAcA,MAAMC,gBAAgB,GAAG,QAAmC;EAAA,IAAlC;IAAEC,IAAF;IAAQC;EAAR,CAAkC;EAC1D,MAAM;IAAEC;EAAF,IAAcJ,eAAe,EAAnC;;EACA,QAAQE,IAAR;IACE,KAAK,mBAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,IAAI,EAAE,KAAnB;QAA0B,OAAO,EAAEE,OAAO,CAACC,WAAR,CAAoBC;MAAvD,EAAP;;IACF,KAAK,aAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,IAAI,EAAE,MAAnB;QAA2B,OAAO,EAAEF,OAAO,CAACC,WAAR,CAAoBE;MAAxD,EAAP;;IACF,KAAK,aAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,IAAI,EAAE,SAAnB;QAA8B,OAAO,EAAEH,OAAO,CAACC,WAAR,CAAoBG;MAA3D,EAAP;;IACF,KAAK,kBAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,IAAI,EAAE,MAAnB;QAA2B,OAAO,EAAEJ,OAAO,CAACC,WAAR,CAAoBI;MAAxD,EAAP;;IACF,KAAK,kBAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,IAAI,EAAE,QAAnB;QAA6B,OAAO,EAAEL,OAAO,CAACC,WAAR,CAAoBK;MAA1D,EAAP;;IACF,KAAK,UAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,IAAI,EAAE,SAAnB;QAA8B,OAAO,EAAEN,OAAO,CAACC,WAAR,CAAoBM;MAA3D,EAAP;;IACF,KAAK,aAAL;MACE,oBACE,oBAAC,WAAD;QACE,IAAI,EAAE,OADR;QAEE,OAAO,EAAEP,OAAO,CAACC,WAAR,CAAoBO,KAApB,CAA0BC,OAFrC;QAGE,eAAe,EAAET,OAAO,CAACC,WAAR,CAAoBO,KAApB,CAA0BE,WAH7C;QAIE,YAAY,EAAEX;MAJhB,EADF;;IAQF,KAAK,SAAL;MACE,oBAAO,oBAAC,WAAD;QAAa,OAAO,MAApB;QAAqB,IAAI,EAAE;MAA3B,EAAP;EAvBJ;AAyBD,CA3BD;;AA6BA,eAAeF,gBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TouchableOpacity","View","Avatar","Icon","Text","createStyleSheet","useUIKitTheme","conditionChaining","UserActionBar","muted","uri","name","disabled","onPressActionMenu","label","colors","iconColor","onBackground04","onBackground01","styles","container","avatar","infoContainer","borderBottomColor","Boolean","onBackground02","iconContainer","flexDirection","alignItems","width","height","marginLeft","marginRight","flex","paddingRight","borderBottomWidth","padding"
|
|
1
|
+
{"version":3,"names":["React","TouchableOpacity","View","Avatar","Icon","Text","createStyleSheet","useUIKitTheme","conditionChaining","UserActionBar","muted","uri","name","disabled","onPressActionMenu","label","colors","iconColor","onBackground04","onBackground01","styles","container","avatar","infoContainer","borderBottomColor","Boolean","onBackground02","iconContainer","flexDirection","alignItems","width","height","marginLeft","marginRight","flex","paddingRight","borderBottomWidth","padding"],"sources":["UserActionBar.tsx"],"sourcesContent":["import React from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nimport { Avatar, Icon, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\ntype Props = {\n uri: string;\n name: string;\n label?: string;\n muted: boolean;\n disabled: boolean;\n onPressActionMenu?: () => void;\n};\nconst UserActionBar = ({ muted, uri, name, disabled, onPressActionMenu, label }: Props) => {\n const { colors } = useUIKitTheme();\n\n const iconColor = conditionChaining([disabled], [colors.onBackground04, colors.onBackground01]);\n\n return (\n <View style={styles.container}>\n <Avatar muted={muted} size={36} uri={uri} containerStyle={styles.avatar} />\n <View style={[styles.infoContainer, { borderBottomColor: colors.onBackground04 }]}>\n <Text subtitle2 numberOfLines={1} style={styles.name} color={colors.onBackground01}>\n {name}\n </Text>\n {Boolean(label) && (\n <Text body2 color={colors.onBackground02} style={styles.label}>\n {label}\n </Text>\n )}\n {Boolean(onPressActionMenu) && (\n <TouchableOpacity onPress={onPressActionMenu} disabled={disabled}>\n <Icon color={iconColor} size={24} icon={'more'} containerStyle={styles.iconContainer} />\n </TouchableOpacity>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '100%',\n height: 56,\n },\n avatar: {\n marginLeft: 16,\n marginRight: 16,\n },\n label: {\n marginRight: 4,\n },\n infoContainer: {\n height: '100%',\n flex: 1,\n alignItems: 'center',\n flexDirection: 'row',\n paddingRight: 12,\n borderBottomWidth: 1,\n },\n iconContainer: {\n padding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GA,KADH,CALJ,EASGU,OAAO,CAACX,iBAAD,CAAP,iBACC,oBAAC,gBAAD;IAAkB,OAAO,EAAEA,iBAA3B;IAA8C,QAAQ,EAAED;EAAxD,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEI,SAAb;IAAwB,IAAI,EAAE,EAA9B;IAAkC,IAAI,EAAE,MAAxC;IAAgD,cAAc,EAAEG,MAAM,CAACO;EAAvE,EADF,CAVJ,CAFF,CADF;AAoBD,CAzBD;;AA2BA,MAAMP,MAAM,GAAGd,gBAAgB,CAAC;EAC9Be,SAAS,EAAE;IACTO,aAAa,EAAE,KADN;IAETC,UAAU,EAAE,QAFH;IAGTC,KAAK,EAAE,MAHE;IAITC,MAAM,EAAE;EAJC,CADmB;EAO9BT,MAAM,EAAE;IACNU,UAAU,EAAE,EADN;IAENC,WAAW,EAAE;EAFP,CAPsB;EAW9BlB,KAAK,EAAE;IACLkB,WAAW,EAAE;EADR,CAXuB;EAc9BV,aAAa,EAAE;IACbQ,MAAM,EAAE,MADK;IAEbG,IAAI,EAAE,CAFO;IAGbL,UAAU,EAAE,QAHC;IAIbD,aAAa,EAAE,KAJF;IAKbO,YAAY,EAAE,EALD;IAMbC,iBAAiB,EAAE;EANN,CAde;EAsB9BT,aAAa,EAAE;IACbU,OAAO,EAAE;EADI,CAtBe;EAyB9BzB,IAAI,EAAE;IACJsB,IAAI,EAAE,CADF;IAEJD,WAAW,EAAE;EAFT;AAzBwB,CAAD,CAA/B;AA+BA,eAAexB,aAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Avatar","Icon","Text","createStyleSheet","useUIKitTheme","conditionChaining","UserSelectableBar","uri","name","selected","disabled","colors","iconColor","onBackground04","primary","onBackground03","styles","container","avatar","infoContainer","borderBottomColor","onBackground01","flexDirection","alignItems","width","height","paddingHorizontal","marginRight","flex","borderBottomWidth"
|
|
1
|
+
{"version":3,"names":["React","View","Avatar","Icon","Text","createStyleSheet","useUIKitTheme","conditionChaining","UserSelectableBar","uri","name","selected","disabled","colors","iconColor","onBackground04","primary","onBackground03","styles","container","avatar","infoContainer","borderBottomColor","onBackground01","flexDirection","alignItems","width","height","paddingHorizontal","marginRight","flex","borderBottomWidth"],"sources":["UserSelectableBar.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { Avatar, Icon, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\ntype Props = {\n uri: string;\n name: string;\n selected: boolean;\n disabled: boolean;\n};\nconst UserSelectableBar = ({ uri, name, selected, disabled }: Props) => {\n const { colors } = useUIKitTheme();\n\n const iconColor = conditionChaining(\n [disabled, selected],\n [colors.onBackground04, colors.primary, colors.onBackground03],\n );\n\n return (\n <View style={styles.container}>\n <Avatar size={36} uri={uri} containerStyle={styles.avatar} />\n <View style={[styles.infoContainer, { borderBottomColor: colors.onBackground04 }]}>\n <Text subtitle2 numberOfLines={1} style={styles.name} color={colors.onBackground01}>\n {name}\n </Text>\n <Icon color={iconColor} size={24} icon={selected ? 'checkbox-on' : 'checkbox-off'} />\n </View>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '100%',\n height: 56,\n paddingHorizontal: 16,\n },\n avatar: {\n marginRight: 16,\n },\n infoContainer: {\n height: '100%',\n flex: 1,\n alignItems: 'center',\n flexDirection: 'row',\n borderBottomWidth: 1,\n },\n name: {\n flex: 1,\n marginRight: 8,\n },\n});\n\nexport default UserSelectableBar;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,MAAT,EAAiBC,IAAjB,EAAuBC,IAAvB,EAA6BC,gBAA7B,EAA+CC,aAA/C,QAAoE,yCAApE;AACA,SAASC,iBAAT,QAAkC,uBAAlC;;AAQA,MAAMC,iBAAiB,GAAG,QAA8C;EAAA,IAA7C;I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;IAIbD,aAAa,EAAE,KAJF;IAKbO,iBAAiB,EAAE;EALN,CAXe;EAkB9BrB,IAAI,EAAE;IACJoB,IAAI,EAAE,CADF;IAEJD,WAAW,EAAE;EAFT;AAlBwB,CAAD,CAA/B;AAwBA,eAAerB,iBAAf"}
|
package/lib/module/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_LONG_PRESS_DELAY"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_LONG_PRESS_DELAY = 350;\n"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,GAAjC"}
|
|
1
|
+
{"version":3,"names":["DEFAULT_LONG_PRESS_DELAY","DEPRECATION_WARNING","GROUP_CHANNEL","ON_PRESS_IMAGE_MESSAGE"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_LONG_PRESS_DELAY = 350;\nexport const DEPRECATION_WARNING = {\n GROUP_CHANNEL: {\n ON_PRESS_IMAGE_MESSAGE: '`onPressImageMessage` is deprecated, please use `onPressMediaMessage` instead',\n },\n} as const;\n"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,GAAjC;AACP,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,aAAa,EAAE;IACbC,sBAAsB,EAAE;EADX;AADkB,CAA5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","LocalizationContext","createContext","LocalizationProvider","children","stringSet","STRINGS"],"sources":["Localization.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { StringSet } from '../localization/StringSet.type';\n\ntype Props = {\n stringSet: StringSet;\n
|
|
1
|
+
{"version":3,"names":["React","LocalizationContext","createContext","LocalizationProvider","children","stringSet","STRINGS"],"sources":["Localization.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { StringSet } from '../localization/StringSet.type';\n\ntype Props = React.PropsWithChildren<{\n stringSet: StringSet;\n}>;\n\nexport type LocalizationContextType = {\n STRINGS: StringSet;\n};\n\nexport const LocalizationContext = React.createContext<LocalizationContextType | null>(null);\nexport const LocalizationProvider = ({ children, stringSet }: Props) => {\n return <LocalizationContext.Provider value={{ STRINGS: stringSet }}>{children}</LocalizationContext.Provider>;\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAYA,OAAO,MAAMC,mBAAmB,gBAAGD,KAAK,CAACE,aAAN,CAAoD,IAApD,CAA5B;AACP,OAAO,MAAMC,oBAAoB,GAAG,QAAoC;EAAA,IAAnC;IAAEC,QAAF;IAAYC;EAAZ,CAAmC;EACtE,oBAAO,oBAAC,mBAAD,CAAqB,QAArB;IAA8B,KAAK,EAAE;MAAEC,OAAO,EAAED;IAAX;EAArC,GAA8DD,QAA9D,CAAP;AACD,CAFM"}
|
|
@@ -5,13 +5,15 @@ export const PlatformServiceProvider = _ref => {
|
|
|
5
5
|
children,
|
|
6
6
|
fileService,
|
|
7
7
|
clipboardService,
|
|
8
|
-
notificationService
|
|
8
|
+
notificationService,
|
|
9
|
+
mediaService
|
|
9
10
|
} = _ref;
|
|
10
11
|
return /*#__PURE__*/React.createElement(PlatformServiceContext.Provider, {
|
|
11
12
|
value: {
|
|
12
13
|
fileService,
|
|
13
14
|
clipboardService,
|
|
14
|
-
notificationService
|
|
15
|
+
notificationService,
|
|
16
|
+
mediaService
|
|
15
17
|
}
|
|
16
18
|
}, children);
|
|
17
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PlatformServiceContext","createContext","PlatformServiceProvider","children","fileService","clipboardService","notificationService"],"sources":["PlatformService.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {
|
|
1
|
+
{"version":3,"names":["React","PlatformServiceContext","createContext","PlatformServiceProvider","children","fileService","clipboardService","notificationService","mediaService"],"sources":["PlatformService.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {\n ClipboardServiceInterface,\n FileServiceInterface,\n MediaServiceInterface,\n NotificationServiceInterface,\n} from '../platform/types';\n\ntype Props = React.PropsWithChildren<{\n fileService: FileServiceInterface;\n clipboardService: ClipboardServiceInterface;\n notificationService: NotificationServiceInterface;\n mediaService?: MediaServiceInterface;\n}>;\n\nexport const PlatformServiceContext = React.createContext<Props | null>(null);\nexport const PlatformServiceProvider = ({\n children,\n fileService,\n clipboardService,\n notificationService,\n mediaService,\n}: Props) => {\n return (\n <PlatformServiceContext.Provider value={{ fileService, clipboardService, notificationService, mediaService }}>\n {children}\n </PlatformServiceContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAgBA,OAAO,MAAMC,sBAAsB,gBAAGD,KAAK,CAACE,aAAN,CAAkC,IAAlC,CAA/B;AACP,OAAO,MAAMC,uBAAuB,GAAG,QAM1B;EAAA,IAN2B;IACtCC,QADsC;IAEtCC,WAFsC;IAGtCC,gBAHsC;IAItCC,mBAJsC;IAKtCC;EALsC,CAM3B;EACX,oBACE,oBAAC,sBAAD,CAAwB,QAAxB;IAAiC,KAAK,EAAE;MAAEH,WAAF;MAAeC,gBAAf;MAAiCC,mBAAjC;MAAsDC;IAAtD;EAAxC,GACGJ,QADH,CADF;AAKD,CAZM"}
|
|
@@ -7,7 +7,9 @@ export const SendbirdChatProvider = _ref => {
|
|
|
7
7
|
let {
|
|
8
8
|
children,
|
|
9
9
|
sdkInstance,
|
|
10
|
-
enableAutoPushTokenRegistration
|
|
10
|
+
enableAutoPushTokenRegistration,
|
|
11
|
+
enableChannelListMessageReceiptStatus,
|
|
12
|
+
enableChannelListTypingIndicator
|
|
11
13
|
} = _ref;
|
|
12
14
|
const [currentUser, _setCurrentUser] = useState();
|
|
13
15
|
const forceUpdate = useForceUpdate();
|
|
@@ -56,7 +58,9 @@ export const SendbirdChatProvider = _ref => {
|
|
|
56
58
|
updateCurrentUserInfo,
|
|
57
59
|
markAsDeliveredWithChannel,
|
|
58
60
|
features: { ...appFeatures,
|
|
59
|
-
autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration
|
|
61
|
+
autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,
|
|
62
|
+
channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,
|
|
63
|
+
channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
66
|
return /*#__PURE__*/React.createElement(SendbirdChatContext.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useState","AppState","useAppFeatures","useForceUpdate","SendbirdChatContext","createContext","SendbirdChatProvider","children","sdkInstance","enableAutoPushTokenRegistration","currentUser","_setCurrentUser","forceUpdate","appFeatures","setCurrentUser","user","updateCurrentUserInfo","nickname","profile","Error","profileUrl","updateCurrentUserInfoWithProfileImage","markAsDeliveredWithChannel","channel","deliveryReceiptEnabled","unreadMessageCount","markAsDelivered","url","listener","status","getConnectionState","setForegroundState","setBackgroundState","subscriber","addEventListener","remove","value","sdk","features","autoPushTokenRegistrationEnabled"],"sources":["SendbirdChat.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\nimport { useAppFeatures } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdChatSDK, SendbirdGroupChannel, SendbirdUser } from '@sendbird/uikit-utils';\nimport { useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../platform/types';\n\ntype Props = {\n sdkInstance: SendbirdChatSDK;\n\n enableAutoPushTokenRegistration: boolean;\n
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useState","AppState","useAppFeatures","useForceUpdate","SendbirdChatContext","createContext","SendbirdChatProvider","children","sdkInstance","enableAutoPushTokenRegistration","enableChannelListMessageReceiptStatus","enableChannelListTypingIndicator","currentUser","_setCurrentUser","forceUpdate","appFeatures","setCurrentUser","user","updateCurrentUserInfo","nickname","profile","Error","profileUrl","updateCurrentUserInfoWithProfileImage","markAsDeliveredWithChannel","channel","deliveryReceiptEnabled","unreadMessageCount","markAsDelivered","url","listener","status","getConnectionState","setForegroundState","setBackgroundState","subscriber","addEventListener","remove","value","sdk","features","autoPushTokenRegistrationEnabled","channelListTypingIndicatorEnabled","channelListMessageReceiptStatusEnabled"],"sources":["SendbirdChat.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\nimport { useAppFeatures } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdChatSDK, SendbirdGroupChannel, SendbirdUser } from '@sendbird/uikit-utils';\nimport { useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../platform/types';\n\ntype Props = React.PropsWithChildren<{\n sdkInstance: SendbirdChatSDK;\n\n enableAutoPushTokenRegistration: boolean;\n enableChannelListTypingIndicator: boolean;\n enableChannelListMessageReceiptStatus: boolean;\n}>;\n\ntype Context = {\n sdk: SendbirdChatSDK;\n currentUser?: SendbirdUser;\n setCurrentUser: React.Dispatch<React.SetStateAction<SendbirdUser | undefined>>;\n\n // helper functions\n updateCurrentUserInfo: (nickname: string, profile?: string | FileType) => Promise<SendbirdUser>;\n markAsDeliveredWithChannel: (channel: SendbirdGroupChannel) => void;\n\n features: {\n // UIKit features\n autoPushTokenRegistrationEnabled: boolean;\n channelListTypingIndicatorEnabled: boolean;\n channelListMessageReceiptStatusEnabled: boolean;\n\n // Sendbird application features\n deliveryReceiptEnabled: boolean;\n broadcastChannelEnabled: boolean;\n superGroupChannelEnabled: boolean;\n reactionEnabled: boolean;\n };\n};\n\nexport const SendbirdChatContext = React.createContext<Context | null>(null);\nexport const SendbirdChatProvider = ({\n children,\n sdkInstance,\n enableAutoPushTokenRegistration,\n enableChannelListMessageReceiptStatus,\n enableChannelListTypingIndicator,\n}: Props) => {\n const [currentUser, _setCurrentUser] = useState<SendbirdUser>();\n const forceUpdate = useForceUpdate();\n const appFeatures = useAppFeatures(sdkInstance);\n\n const setCurrentUser: Context['setCurrentUser'] = useCallback((user) => {\n // NOTE: Sendbird SDK handle User object is always same object, so force update after setCurrentUser\n _setCurrentUser(user);\n forceUpdate();\n }, []);\n\n const updateCurrentUserInfo: Context['updateCurrentUserInfo'] = useCallback(\n async (nickname, profile) => {\n let user = currentUser;\n\n if (!user) throw new Error('Current user is not defined, please connect using `useConnection()` hook first');\n\n if (typeof profile === 'undefined') {\n user = await sdkInstance.updateCurrentUserInfo(nickname, sdkInstance.currentUser.profileUrl);\n } else if (typeof profile === 'string') {\n user = await sdkInstance.updateCurrentUserInfo(nickname, profile);\n } else if (typeof profile === 'object') {\n user = await sdkInstance.updateCurrentUserInfoWithProfileImage(nickname, profile);\n } else {\n throw new Error(`Cannot update profile, not supported profile type(${typeof profile})`);\n }\n\n setCurrentUser(user);\n return user;\n },\n [sdkInstance, currentUser, setCurrentUser],\n );\n\n const markAsDeliveredWithChannel: Context['markAsDeliveredWithChannel'] = useCallback(\n (channel: SendbirdGroupChannel) => {\n if (appFeatures.deliveryReceiptEnabled && channel.unreadMessageCount > 0) {\n sdkInstance.markAsDelivered(channel.url);\n }\n },\n [sdkInstance, appFeatures.deliveryReceiptEnabled],\n );\n\n useEffect(() => {\n const listener = (status: AppStateStatus) => {\n // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';\n if (status === 'active') sdkInstance.getConnectionState() === 'CLOSED' && sdkInstance.setForegroundState();\n else sdkInstance.getConnectionState() === 'OPEN' && sdkInstance.setBackgroundState();\n };\n\n const subscriber = AppState.addEventListener('change', listener);\n return () => subscriber.remove();\n }, [sdkInstance]);\n\n const value: Context = {\n sdk: sdkInstance,\n currentUser,\n setCurrentUser,\n\n updateCurrentUserInfo,\n markAsDeliveredWithChannel,\n\n features: {\n ...appFeatures,\n autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,\n channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,\n channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus,\n },\n };\n\n return <SendbirdChatContext.Provider value={value}>{children}</SendbirdChatContext.Provider>;\n};\n"],"mappings":"AAAA,OA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CAH3B;MAIRgC,sCAAsC,EAAEjC;IAJhC;EARW,CAAvB;EAgBA,oBAAO,oBAAC,mBAAD,CAAqB,QAArB;IAA8B,KAAK,EAAE4B;EAArC,GAA6C/B,QAA7C,CAAP;AACD,CA5EM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","View","Header","Icon","createStyleSheet","useHeaderStyle","ChannelCover","useLocalization","GroupChannelContexts","GroupChannelHeader","onPressHeaderLeft","onPressHeaderRight","headerTitle","channel","Fragment","typingUsers","TypingIndicator","STRINGS","HeaderComponent","subtitle","LABELS","TYPING_INDICATOR_TYPINGS","styles","titleContainer","avatarGroup","flexShrink","Boolean","maxWidth","flexDirection","alignItems","marginRight","marginTop"],"sources":["GroupChannelHeader.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { View } from 'react-native';\n\nimport { Header, Icon, createStyleSheet, useHeaderStyle } from '@sendbird/uikit-react-native-foundation';\n\nimport ChannelCover from '../../../components/ChannelCover';\nimport { useLocalization } from '../../../hooks/useContext';\nimport { GroupChannelContexts } from '../module/moduleContext';\nimport type { GroupChannelProps } from '../types';\n\nconst GroupChannelHeader
|
|
1
|
+
{"version":3,"names":["React","useContext","View","Header","Icon","createStyleSheet","useHeaderStyle","ChannelCover","useLocalization","GroupChannelContexts","GroupChannelHeader","onPressHeaderLeft","onPressHeaderRight","headerTitle","channel","Fragment","typingUsers","TypingIndicator","STRINGS","HeaderComponent","subtitle","LABELS","TYPING_INDICATOR_TYPINGS","styles","titleContainer","avatarGroup","flexShrink","Boolean","maxWidth","flexDirection","alignItems","marginRight","marginTop"],"sources":["GroupChannelHeader.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { View } from 'react-native';\n\nimport { Header, Icon, createStyleSheet, useHeaderStyle } from '@sendbird/uikit-react-native-foundation';\n\nimport ChannelCover from '../../../components/ChannelCover';\nimport { useLocalization } from '../../../hooks/useContext';\nimport { GroupChannelContexts } from '../module/moduleContext';\nimport type { GroupChannelProps } from '../types';\n\nconst GroupChannelHeader = ({ onPressHeaderLeft, onPressHeaderRight }: GroupChannelProps['Header']) => {\n const { headerTitle, channel } = useContext(GroupChannelContexts.Fragment);\n const { typingUsers } = useContext(GroupChannelContexts.TypingIndicator);\n const { STRINGS } = useLocalization();\n const { HeaderComponent } = useHeaderStyle();\n const subtitle = STRINGS.LABELS.TYPING_INDICATOR_TYPINGS(typingUsers);\n\n return (\n <HeaderComponent\n clearTitleMargin\n title={\n <View style={styles.titleContainer}>\n <ChannelCover channel={channel} size={34} containerStyle={styles.avatarGroup} />\n <View style={{ flexShrink: 1 }}>\n <Header.Title h2>{headerTitle}</Header.Title>\n {Boolean(subtitle) && subtitle && <Header.Subtitle style={styles.subtitle}>{subtitle}</Header.Subtitle>}\n </View>\n </View>\n }\n left={<Icon icon={'arrow-left'} />}\n onPressLeft={onPressHeaderLeft}\n right={<Icon icon={'info'} />}\n onPressRight={onPressHeaderRight}\n />\n );\n};\n\nconst styles = createStyleSheet({\n titleContainer: {\n maxWidth: '100%',\n flexDirection: 'row',\n alignItems: 'center',\n },\n avatarGroup: {\n marginRight: 8,\n },\n subtitle: {\n marginTop: 2,\n },\n});\n\nexport default GroupChannelHeader;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,MAAT,EAAiBC,IAAjB,EAAuBC,gBAAvB,EAAyCC,cAAzC,QAA+D,yCAA/D;AAEA,OAAOC,YAAP,MAAyB,kCAAzB;AACA,SAASC,eAAT,QAAgC,2BAAhC;AACA,SAASC,oBAAT,QAAqC,yBAArC;;AAGA,MAAMC,kBAAkB,GAAG,QAA4E;EAAA,IAA3E;IAAEC,iBAAF;IAAqBC;EAArB,CAA2E;EACrG,MAAM;IAAEC,WAAF;IAAeC;EAAf,IAA2Bb,UAAU,CAACQ,oBAAoB,CAACM,QAAtB,CAA3C;EACA,MAAM;IAAEC;EAAF,IAAkB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+1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","Platform","View","Button","TextInput","createStyleSheet","useToast","useLocalization","AUTO_FOCUS","select","ios","android","default","EditInput","text","setText","editMessage","setEditMessage","onUpdateUserMessage","STRINGS","inputRef","toast","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","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
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","Platform","View","Button","TextInput","createStyleSheet","useToast","useLocalization","AUTO_FOCUS","select","ios","android","default","EditInput","text","setText","editMessage","setEditMessage","onUpdateUserMessage","STRINGS","inputRef","toast","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","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,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,MAA3B,QAAyC,OAAzC;AACA,SAASC,QAAT,EAA6CC,IAA7C,QAAyD,cAAzD;AAEA,SAASC,MAAT,EAAiBC,SAAjB,EAA4BC,gBAA5B,EAA8CC,QAA9C,QAA8D,yCAA9D;AAGA,SAASC,eAAT,QAAgC,8BAAhC;AAUA,MAAMC,UAAU,GAAGP,QAAQ,CAACQ,MAAT,CAAgB;EAAEC,GAAG,EAAE,KAAP;EAAcC,OAAO,EAAE,IAAvB;EAA6BC,OAAO,EAAE;AAAtC,CAAhB,CAAnB;;AACA,MAAMC,SAAS,GAAG,QAAyF;EAAA,IAAxF;IAAEC,IAAF;IAAQC,OAAR;IAAiBC,WAAjB;IAA8BC,cAA9B;IAA8CC;EAA9C,CAAwF;EACzG,MAAM;IAAEC;EAAF,IAAcZ,eAAe,EAAnC;EACA,MAAMa,QAAQ,GAAGpB,MAAM,CAAc,IAAd,CAAvB;EACA,MAAMqB,KAAK,GAAGf,QAAQ,EAAtB;EAEAP,SAAS,CAAC,MAAM;IACd,IAAIiB,WAAW,CAACM,aAAZ,EAAJ,EAAiC;MAC/BP,OAAO,CAACC,WAAW,CAACO,OAAZ,IAAuB,EAAxB,CAAP;MAEA,IAAI,CAACf,UAAL,EAAiBgB,UAAU,CAAC;QAAA;;QAAA,4BAAMJ,QAAQ,CAACK,OAAf,sDAAM,kBAAkBC,KAAlB,EAAN;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AAwBD,CAlDD;;AAoDA,MAAMV,MAAM,GAAG5B,gBAAgB,CAAC;EAC9B6B,kBAAkB,EAAE;IAClBU,eAAe,EAAE,EADC;IAElBC,iBAAiB,EAAE,EAFD;IAGlBL,aAAa,EAAE,QAHG;IAIlBM,UAAU,EAAE;EAJM,CADU;EAO9BV,KAAK,EAAE;IACLW,IAAI,EAAE,CADD;IAELC,WAAW,EAAE,CAFR;IAGLC,SAAS,EAAE,EAHN;IAILC,SAAS,EAAE,KAAKjD,QAAQ,CAACQ,MAAT,CAAgB;MAAEC,GAAG,EAAE,GAAP;MAAYE,OAAO,EAAE;IAArB,CAAhB,CAJX;IAKLuC,YAAY,EAAE;EALT,CAPuB;EAc9BhB,YAAY,EAAE;IACZK,aAAa,EAAE;EADH,CAdgB;EAiB9BE,KAAK,EAAE;IACLK,IAAI,EAAE;EADD;AAjBuB,CAAD,CAA/B;AAsBA,eAAelC,SAAf"}
|
|
@@ -38,7 +38,7 @@ const SendInput = _ref => {
|
|
|
38
38
|
icon: 'camera',
|
|
39
39
|
onPress: async () => {
|
|
40
40
|
const photo = await fileService.openCamera({
|
|
41
|
-
mediaType: '
|
|
41
|
+
mediaType: 'all',
|
|
42
42
|
onOpenFailureWithToastMessage: () => toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error')
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","TouchableOpacity","View","Icon","TextInput","createStyleSheet","useBottomSheet","useToast","useUIKitTheme","conditionChaining","useLocalization","usePlatformService","SendInput","onSendUserMessage","onSendFileMessage","text","setText","disabled","STRINGS","openSheet","fileService","colors","toast","onPressSend","catch","show","TOAST","SEND_MSG_ERROR","onPressAttachment","sheetItems","title","GROUP_CHANNEL","DIALOG_ATTACHMENT_CAMERA","icon","onPress","photo","openCamera","mediaType","onOpenFailureWithToastMessage","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","INPUT_PLACEHOLDER_DISABLED","INPUT_PLACEHOLDER_ACTIVE","Boolean","trim","iconSend","paddingVertical","paddingHorizontal","alignItems","flexDirection","flex","marginRight","minHeight","maxHeight","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 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 type { GroupChannelProps } from '../../types';\n\ntype SendInputProps = GroupChannelProps['Input'] & {\n text: string;\n setText: (val: string) => void;\n disabled: boolean;\n};\nconst SendInput
|
|
1
|
+
{"version":3,"names":["React","Platform","TouchableOpacity","View","Icon","TextInput","createStyleSheet","useBottomSheet","useToast","useUIKitTheme","conditionChaining","useLocalization","usePlatformService","SendInput","onSendUserMessage","onSendFileMessage","text","setText","disabled","STRINGS","openSheet","fileService","colors","toast","onPressSend","catch","show","TOAST","SEND_MSG_ERROR","onPressAttachment","sheetItems","title","GROUP_CHANNEL","DIALOG_ATTACHMENT_CAMERA","icon","onPress","photo","openCamera","mediaType","onOpenFailureWithToastMessage","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","INPUT_PLACEHOLDER_DISABLED","INPUT_PLACEHOLDER_ACTIVE","Boolean","trim","iconSend","paddingVertical","paddingHorizontal","alignItems","flexDirection","flex","marginRight","minHeight","maxHeight","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 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 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 { openSheet } = useBottomSheet();\n const { fileService } = usePlatformService();\n const { colors } = useUIKitTheme();\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 onOpenFailureWithToastMessage: () => toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error'),\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 onOpenFailureWithToastMessage: () => toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error'),\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 onOpenFailureWithToastMessage: () => 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,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,gBAAnB,EAAqCC,IAArC,QAAiD,cAAjD;AAEA,SACEC,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CArBJ,CADF;AAiCD,CA7FD;;AA+FA,MAAMZ,MAAM,GAAG3C,gBAAgB,CAAC;EAC9B4C,kBAAkB,EAAE;IAClBY,eAAe,EAAE,EADC;IAElBC,iBAAiB,EAAE,EAFD;IAGlBC,UAAU,EAAE,QAHM;IAIlBC,aAAa,EAAE;EAJG,CADU;EAO9Bb,KAAK,EAAE;IACLc,IAAI,EAAE,CADD;IAELC,WAAW,EAAE,CAFR;IAGLC,SAAS,EAAE,EAHN;IAILC,SAAS,EAAE,KAAKpE,QAAQ,CAACqE,MAAT,CAAgB;MAAEC,GAAG,EAAE,GAAP;MAAYlB,OAAO,EAAE;IAArB,CAAhB,CAJX;IAKLmB,YAAY,EAAE;EALT,CAPuB;EAc9BhB,UAAU,EAAE;IACVW,WAAW,EAAE,CADH;IAEVM,OAAO,EAAE;EAFC,CAdkB;EAkB9BZ,QAAQ,EAAE;IACRa,UAAU,EAAE,CADJ;IAERD,OAAO,EAAE;EAFD;AAlBoB,CAAD,CAA/B;AAwBA,eAAe5D,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","useEffect","useRef","useState","KeyboardAvoidingView","Platform","View","useSafeAreaInsets","useUIKitTheme","groupChannelChatUnavailable","useIIFE","GroupChannelContexts","EditInput","SendInput","KEYBOARD_AVOID_VIEW_BEHAVIOR","select","ios","default","undefined","GroupChannelInput","props","channel","left","right","bottom","colors","editMessage","setEditMessage","keyboardAvoidOffset","Fragment","text","setText","textTmpRef","disabled","length","endTyping","startTyping","current","inputMode","isFileMessage","paddingLeft","paddingRight","backgroundColor","background","justifyContent","width","SafeAreaBottom","height","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 { groupChannelChatUnavailable, 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:
|
|
1
|
+
{"version":3,"names":["React","useContext","useEffect","useRef","useState","KeyboardAvoidingView","Platform","View","useSafeAreaInsets","useUIKitTheme","groupChannelChatUnavailable","useIIFE","GroupChannelContexts","EditInput","SendInput","KEYBOARD_AVOID_VIEW_BEHAVIOR","select","ios","default","undefined","GroupChannelInput","props","channel","left","right","bottom","colors","editMessage","setEditMessage","keyboardAvoidOffset","Fragment","text","setText","textTmpRef","disabled","length","endTyping","startTyping","current","inputMode","isFileMessage","paddingLeft","paddingRight","backgroundColor","background","justifyContent","width","SafeAreaBottom","height","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 { groupChannelChatUnavailable, 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 { channel } = props;\n\n const { left, right, bottom } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n const { editMessage, setEditMessage, keyboardAvoidOffset = 0 } = useContext(GroupChannelContexts.Fragment);\n\n const [text, setText] = useState('');\n const textTmpRef = useRef('');\n const disabled = groupChannelChatUnavailable(channel);\n\n useEffect(() => {\n if (text.length === 0) channel.endTyping();\n else channel.startTyping();\n }, [text]);\n\n useEffect(() => {\n if (disabled) {\n textTmpRef.current = text;\n setText('');\n } else {\n setText(textTmpRef.current);\n }\n }, [disabled]);\n\n const inputMode = useIIFE(() => {\n if (!editMessage) return 'send';\n if (editMessage.isFileMessage()) return 'send';\n return 'edit';\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} disabled={disabled} />}\n {inputMode === 'edit' && editMessage && (\n <EditInput\n {...props}\n text={text}\n setText={setText}\n editMessage={editMessage}\n setEditMessage={setEditMessage}\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,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,EAAuCC,MAAvC,EAA+CC,QAA/C,QAA+D,OAA/D;AACA,SAASC,oBAAT,EAA+BC,QAA/B,EAAyCC,IAAzC,QAAqD,cAArD;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SAASC,aAAT,QAA8B,yCAA9B;AACA,SAASC,2BAAT,EAAsCC,OAAtC,QAAqD,uBAArD;AAEA,SAASC,oBAAT,QAAqC,4BAArC;AAEA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AAEA,MAAMC,4BAA4B,GAAGT,QAAQ,CAACU,MAAT,CAAgB;EAAEC,GAAG,EAAE,SAAP;EAA2BC,OAAO,EAAEC;AAApC,CAAhB,CAArC;;AACA,MAAMC,iBAAiB,GAAIC,KAAD,IAAuC;EAC/D,MAAM;IAAEC;EAAF,IAAcD,KAApB;EAEA,MAAM;IAAE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;EAAb,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAE;MAAEC,cAAc,EAAE,QAAlB;MAA4BC,KAAK,EAAE;IAAnC;EAAb,GACGP,SAAS,KAAK,MAAd,iBAAwB,oBAAC,SAAD,eAAelB,KAAf;IAAsB,IAAI,EAAEU,IAA5B;IAAkC,OAAO,EAAEC,OAA3C;IAAoD,QAAQ,EAAEE;EAA9D,GAD3B,EAEGK,SAAS,KAAK,MAAd,IAAwBZ,WAAxB,iBACC,oBAAC,SAAD,eACMN,KADN;IAEE,IAAI,EAAEU,IAFR;IAGE,OAAO,EAAEC,OAHX;IAIE,WAAW,EAAEL,WAJf;IAKE,cAAc,EAAEC;EALlB,GAHJ,CADF,eAaE,oBAAC,cAAD;IAAgB,MAAM,EAAEH;EAAxB,EAbF,CAJF,CADF;AAsBD,CArDD;;AAsDA,MAAMsB,cAAc,GAAG,QAAoC;EAAA,IAAnC;IAAEC;EAAF,CAAmC;EACzD,oBAAO,oBAAC,IAAD;IAAM,KAAK,EAAE;MAAEA;IAAF;EAAb,EAAP;AACD,CAFD;;AAIA,4BAAehD,KAAK,CAACiD,IAAN,CAAW7B,iBAAX,CAAf"}
|
|
@@ -4,8 +4,9 @@ import React, { useCallback, useContext, useEffect, useRef, useState } from 'rea
|
|
|
4
4
|
import { Linking, Platform, View } from 'react-native';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { ChannelFrozenBanner, createStyleSheet, useAlert, useBottomSheet, useToast, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
7
|
-
import { Logger, getAvailableUriFromFileMessage, getFileExtension, getFileType, isMyMessage, messageKeyExtractor, useFreshCallback } from '@sendbird/uikit-utils';
|
|
7
|
+
import { Logger, getAvailableUriFromFileMessage, getFileExtension, getFileType, isMyMessage, messageKeyExtractor, toMegabyte, useFreshCallback } from '@sendbird/uikit-utils';
|
|
8
8
|
import ChatFlatList from '../../../components/ChatFlatList';
|
|
9
|
+
import { DEPRECATION_WARNING } from '../../../constants';
|
|
9
10
|
import { useLocalization, usePlatformService } from '../../../hooks/useContext';
|
|
10
11
|
import { GroupChannelContexts } from '../module/moduleContext';
|
|
11
12
|
const HANDLE_NEXT_MSG_SEPARATELY = Platform.select({
|
|
@@ -27,6 +28,7 @@ const GroupChannelMessageList = _ref => {
|
|
|
27
28
|
onResendFailedMessage,
|
|
28
29
|
onDeleteMessage,
|
|
29
30
|
onPressImageMessage,
|
|
31
|
+
onPressMediaMessage,
|
|
30
32
|
flatListProps,
|
|
31
33
|
enableMessageGrouping
|
|
32
34
|
} = _ref;
|
|
@@ -46,6 +48,7 @@ const GroupChannelMessageList = _ref => {
|
|
|
46
48
|
const getMessagePressActions = useGetMessagePressActions({
|
|
47
49
|
onDeleteMessage,
|
|
48
50
|
onPressImageMessage,
|
|
51
|
+
onPressMediaMessage,
|
|
49
52
|
currentUserId,
|
|
50
53
|
onResendFailedMessage
|
|
51
54
|
});
|
|
@@ -133,11 +136,10 @@ const GroupChannelMessageList = _ref => {
|
|
|
133
136
|
})));
|
|
134
137
|
};
|
|
135
138
|
|
|
136
|
-
const toMegabyte = byte => byte / 1024 / 1024;
|
|
137
|
-
|
|
138
139
|
const useGetMessagePressActions = _ref3 => {
|
|
139
140
|
let {
|
|
140
141
|
onPressImageMessage,
|
|
142
|
+
onPressMediaMessage,
|
|
141
143
|
onDeleteMessage,
|
|
142
144
|
onResendFailedMessage,
|
|
143
145
|
currentUserId
|
|
@@ -259,10 +261,29 @@ const useGetMessagePressActions = _ref3 => {
|
|
|
259
261
|
|
|
260
262
|
const fileType = getFileType(msg.type || getFileExtension(msg.name));
|
|
261
263
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
switch (fileType) {
|
|
265
|
+
case 'image':
|
|
266
|
+
case 'video':
|
|
267
|
+
case 'audio':
|
|
268
|
+
{
|
|
269
|
+
response.onPress = () => {
|
|
270
|
+
if (onPressImageMessage && fileType === 'image') {
|
|
271
|
+
Logger.warn(DEPRECATION_WARNING.GROUP_CHANNEL.ON_PRESS_IMAGE_MESSAGE);
|
|
272
|
+
onPressImageMessage(msg, getAvailableUriFromFileMessage(msg));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
onPressMediaMessage === null || onPressMediaMessage === void 0 ? void 0 : onPressMediaMessage(msg, () => onDeleteMessage(msg), getAvailableUriFromFileMessage(msg));
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
default:
|
|
282
|
+
{
|
|
283
|
+
response.onPress = () => Linking.openURL(msg.url).catch();
|
|
284
|
+
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
266
287
|
}
|
|
267
288
|
}
|
|
268
289
|
|