@sendbird/uikit-react-native 2.5.0 → 3.0.0-rc.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 +6 -1
- package/lib/commonjs/components/{MessageRenderer/MessageTime.js → ChannelInput/AttachmentsButton.js} +20 -17
- package/lib/commonjs/components/ChannelInput/AttachmentsButton.js.map +1 -0
- package/lib/commonjs/components/ChannelInput/EditInput.js +10 -18
- package/lib/commonjs/components/ChannelInput/EditInput.js.map +1 -1
- package/lib/commonjs/components/ChannelInput/SendInput.js +220 -163
- package/lib/commonjs/components/ChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/components/ChannelInput/index.js +5 -3
- package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
- package/lib/commonjs/components/ChannelMessageList/index.js +27 -27
- package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
- package/lib/commonjs/components/ChatFlatList.js +18 -6
- package/lib/commonjs/components/ChatFlatList.js.map +1 -1
- package/lib/commonjs/components/{MessageRenderer/MessageDateSeparator.js → GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js} +3 -3
- package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js.map +1 -0
- package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.js +47 -0
- package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.js.map +1 -0
- package/lib/commonjs/components/{MessageRenderer/MessageOutgoingStatus.js → GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.js} +11 -14
- package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.js.map +1 -0
- package/lib/commonjs/components/GroupChannelMessageRenderer/index.js +204 -0
- package/lib/commonjs/components/GroupChannelMessageRenderer/index.js.map +1 -0
- package/lib/commonjs/components/MessageSearchResultItem.js +3 -2
- package/lib/commonjs/components/MessageSearchResultItem.js.map +1 -1
- package/lib/commonjs/components/OpenChannelMessageRenderer/index.js +15 -9
- package/lib/commonjs/components/OpenChannelMessageRenderer/index.js.map +1 -1
- package/lib/commonjs/constants.js +1 -7
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js +13 -13
- package/lib/commonjs/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/commonjs/containers/SendbirdUIKitContainer.js +29 -19
- package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/commonjs/contexts/SendbirdChatCtx.js +17 -14
- package/lib/commonjs/contexts/SendbirdChatCtx.js.map +1 -1
- package/lib/commonjs/contexts/UserProfileCtx.js +6 -4
- package/lib/commonjs/contexts/UserProfileCtx.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput.js +4 -13
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js +10 -6
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js +3 -3
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +11 -10
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/commonjs/domain/openChannel/component/OpenChannelInput.js +4 -8
- package/lib/commonjs/domain/openChannel/component/OpenChannelInput.js.map +1 -1
- package/lib/commonjs/domain/openChannel/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelList/component/OpenChannelListList.js +3 -1
- package/lib/commonjs/domain/openChannelList/component/OpenChannelListList.js.map +1 -1
- package/lib/commonjs/domain/openChannelList/types.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelCreateFragment.js +1 -1
- package/lib/commonjs/fragments/createGroupChannelCreateFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelFragment.js +22 -100
- package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelInviteFragment.js +1 -1
- package/lib/commonjs/fragments/createGroupChannelInviteFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelListFragment.js +8 -13
- package/lib/commonjs/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/commonjs/fragments/createMessageSearchFragment.js +2 -2
- package/lib/commonjs/fragments/createMessageSearchFragment.js.map +1 -1
- package/lib/commonjs/fragments/createOpenChannelFragment.js +1 -7
- package/lib/commonjs/fragments/createOpenChannelFragment.js.map +1 -1
- package/lib/commonjs/fragments/createOpenChannelListFragment.js +2 -1
- package/lib/commonjs/fragments/createOpenChannelListFragment.js.map +1 -1
- package/lib/commonjs/hooks/useConnection.js +11 -7
- package/lib/commonjs/hooks/useConnection.js.map +1 -1
- package/lib/commonjs/hooks/useMentionTextInput.js +3 -2
- package/lib/commonjs/hooks/useMentionTextInput.js.map +1 -1
- package/lib/commonjs/index.js +20 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/libs/MentionManager.js +8 -9
- package/lib/commonjs/libs/MentionManager.js.map +1 -1
- package/lib/commonjs/libs/SBUUtils.js +7 -3
- package/lib/commonjs/libs/SBUUtils.js.map +1 -1
- package/lib/commonjs/localization/StringSet.type.js.map +1 -1
- package/lib/commonjs/localization/createBaseStringSet.js +20 -62
- package/lib/commonjs/localization/createBaseStringSet.js.map +1 -1
- package/lib/module/components/ChannelInput/AttachmentsButton.js +29 -0
- package/lib/module/components/ChannelInput/AttachmentsButton.js.map +1 -0
- package/lib/module/components/ChannelInput/EditInput.js +10 -18
- package/lib/module/components/ChannelInput/EditInput.js.map +1 -1
- package/lib/module/components/ChannelInput/SendInput.js +221 -164
- package/lib/module/components/ChannelInput/SendInput.js.map +1 -1
- package/lib/module/components/ChannelInput/index.js +5 -3
- package/lib/module/components/ChannelInput/index.js.map +1 -1
- package/lib/module/components/ChannelMessageList/index.js +28 -28
- package/lib/module/components/ChannelMessageList/index.js.map +1 -1
- package/lib/module/components/ChatFlatList.js +17 -5
- package/lib/module/components/ChatFlatList.js.map +1 -1
- package/lib/module/components/{MessageRenderer/MessageDateSeparator.js → GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js} +3 -3
- package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js.map +1 -0
- package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.js +38 -0
- package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.js.map +1 -0
- package/lib/module/components/{MessageRenderer/MessageOutgoingStatus.js → GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.js} +12 -15
- package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.js.map +1 -0
- package/lib/module/components/GroupChannelMessageRenderer/index.js +196 -0
- package/lib/module/components/GroupChannelMessageRenderer/index.js.map +1 -0
- package/lib/module/components/MessageSearchResultItem.js +2 -1
- package/lib/module/components/MessageSearchResultItem.js.map +1 -1
- package/lib/module/components/OpenChannelMessageRenderer/index.js +16 -10
- package/lib/module/components/OpenChannelMessageRenderer/index.js.map +1 -1
- package/lib/module/constants.js +0 -5
- package/lib/module/constants.js.map +1 -1
- package/lib/module/containers/GroupChannelPreviewContainer.js +13 -13
- package/lib/module/containers/GroupChannelPreviewContainer.js.map +1 -1
- package/lib/module/containers/SendbirdUIKitContainer.js +29 -19
- package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
- package/lib/module/contexts/SendbirdChatCtx.js +17 -14
- package/lib/module/contexts/SendbirdChatCtx.js.map +1 -1
- package/lib/module/contexts/UserProfileCtx.js +6 -4
- package/lib/module/contexts/UserProfileCtx.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput.js +4 -13
- package/lib/module/domain/groupChannel/component/GroupChannelInput.js.map +1 -1
- package/lib/module/domain/groupChannel/types.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListList.js +9 -4
- package/lib/module/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js +3 -3
- package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/module/domain/groupChannelList/types.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +11 -10
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/module/domain/openChannel/component/OpenChannelInput.js +4 -8
- package/lib/module/domain/openChannel/component/OpenChannelInput.js.map +1 -1
- package/lib/module/domain/openChannel/types.js.map +1 -1
- package/lib/module/domain/openChannelList/component/OpenChannelListList.js +3 -1
- package/lib/module/domain/openChannelList/component/OpenChannelListList.js.map +1 -1
- package/lib/module/domain/openChannelList/types.js.map +1 -1
- package/lib/module/fragments/createGroupChannelCreateFragment.js +1 -1
- package/lib/module/fragments/createGroupChannelCreateFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelFragment.js +24 -102
- package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelInviteFragment.js +1 -1
- package/lib/module/fragments/createGroupChannelInviteFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelListFragment.js +8 -13
- package/lib/module/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/module/fragments/createMessageSearchFragment.js +1 -1
- package/lib/module/fragments/createMessageSearchFragment.js.map +1 -1
- package/lib/module/fragments/createOpenChannelFragment.js +2 -8
- package/lib/module/fragments/createOpenChannelFragment.js.map +1 -1
- package/lib/module/fragments/createOpenChannelListFragment.js +2 -1
- package/lib/module/fragments/createOpenChannelListFragment.js.map +1 -1
- package/lib/module/hooks/useConnection.js +11 -7
- package/lib/module/hooks/useConnection.js.map +1 -1
- package/lib/module/hooks/useMentionTextInput.js +3 -2
- package/lib/module/hooks/useMentionTextInput.js.map +1 -1
- package/lib/module/index.js +5 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/libs/MentionManager.js +8 -9
- package/lib/module/libs/MentionManager.js.map +1 -1
- package/lib/module/libs/SBUUtils.js +7 -3
- package/lib/module/libs/SBUUtils.js.map +1 -1
- package/lib/module/localization/StringSet.type.js.map +1 -1
- package/lib/module/localization/createBaseStringSet.js +20 -62
- package/lib/module/localization/createBaseStringSet.js.map +1 -1
- package/lib/typescript/src/components/ChannelInput/AttachmentsButton.d.ts +6 -0
- package/lib/typescript/src/components/ChannelInput/index.d.ts +2 -14
- package/lib/typescript/src/components/ChannelMessageList/index.d.ts +2 -4
- package/lib/typescript/src/components/ChatFlatList.d.ts +1 -5
- package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.d.ts +6 -0
- package/lib/typescript/src/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.d.ts +5 -0
- package/lib/typescript/src/components/{MessageRenderer/MessageOutgoingStatus.d.ts → GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.d.ts} +3 -1
- package/lib/typescript/src/components/{MessageRenderer → GroupChannelMessageRenderer}/index.d.ts +2 -13
- package/lib/typescript/src/components/MessageSearchResultItem.d.ts +2 -1
- package/lib/typescript/src/components/OpenChannelMessageRenderer/index.d.ts +1 -1
- package/lib/typescript/src/constants.d.ts +0 -5
- package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +15 -10
- package/lib/typescript/src/contexts/SendbirdChatCtx.d.ts +33 -19
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +1 -4
- package/lib/typescript/src/domain/groupChannel/types.d.ts +2 -9
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListList.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelList/types.d.ts +8 -23
- package/lib/typescript/src/domain/openChannel/component/OpenChannelHeader.d.ts +1 -1
- package/lib/typescript/src/domain/openChannel/component/OpenChannelInput.d.ts +1 -1
- package/lib/typescript/src/domain/openChannel/component/OpenChannelMessageList.d.ts +1 -1
- package/lib/typescript/src/domain/openChannel/types.d.ts +2 -2
- package/lib/typescript/src/domain/openChannelList/component/OpenChannelListList.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelList/types.d.ts +3 -12
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/libs/MentionManager.d.ts +4 -5
- package/lib/typescript/src/libs/SBUUtils.d.ts +1 -1
- package/lib/typescript/src/localization/StringSet.type.d.ts +2 -43
- package/package.json +13 -10
- package/src/components/ChannelInput/AttachmentsButton.tsx +32 -0
- package/src/components/ChannelInput/EditInput.tsx +17 -18
- package/src/components/ChannelInput/SendInput.tsx +237 -181
- package/src/components/ChannelInput/index.tsx +8 -21
- package/src/components/ChannelMessageList/index.tsx +33 -41
- package/src/components/ChatFlatList.tsx +39 -13
- package/src/components/{MessageRenderer/MessageDateSeparator.tsx → GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.tsx} +7 -5
- package/src/components/GroupChannelMessageRenderer/GroupChannelMessageFocusAnimation.tsx +29 -0
- package/src/components/{MessageRenderer/MessageOutgoingStatus.tsx → GroupChannelMessageRenderer/GroupChannelMessageOutgoingStatus.tsx} +15 -15
- package/src/components/GroupChannelMessageRenderer/index.tsx +203 -0
- package/src/components/MessageSearchResultItem.tsx +3 -1
- package/src/components/OpenChannelMessageRenderer/index.tsx +10 -5
- package/src/constants.ts +0 -5
- package/src/containers/GroupChannelPreviewContainer.tsx +14 -13
- package/src/containers/SendbirdUIKitContainer.tsx +98 -90
- package/src/contexts/SendbirdChatCtx.tsx +49 -36
- package/src/contexts/UserProfileCtx.tsx +10 -5
- package/src/domain/groupChannel/component/GroupChannelInput.tsx +1 -10
- package/src/domain/groupChannel/types.ts +1 -14
- package/src/domain/groupChannelList/component/GroupChannelListList.tsx +8 -4
- package/src/domain/groupChannelList/component/GroupChannelListTypeSelector.tsx +3 -3
- package/src/domain/groupChannelList/types.ts +8 -30
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +22 -10
- package/src/domain/openChannel/component/OpenChannelInput.tsx +1 -5
- package/src/domain/openChannel/types.ts +1 -1
- package/src/domain/openChannelList/component/OpenChannelListList.tsx +2 -1
- package/src/domain/openChannelList/types.ts +6 -13
- package/src/fragments/createGroupChannelCreateFragment.tsx +1 -1
- package/src/fragments/createGroupChannelFragment.tsx +21 -97
- package/src/fragments/createGroupChannelInviteFragment.tsx +1 -1
- package/src/fragments/createGroupChannelListFragment.tsx +9 -15
- package/src/fragments/createMessageSearchFragment.tsx +1 -1
- package/src/fragments/createOpenChannelFragment.tsx +2 -3
- package/src/fragments/createOpenChannelListFragment.tsx +2 -1
- package/src/hooks/useConnection.ts +9 -7
- package/src/hooks/useMentionTextInput.ts +7 -2
- package/src/index.ts +4 -2
- package/src/libs/MentionManager.tsx +8 -7
- package/src/libs/SBUUtils.ts +7 -3
- package/src/localization/StringSet.type.ts +2 -46
- package/src/localization/createBaseStringSet.ts +19 -71
- package/src/version.ts +1 -1
- package/lib/commonjs/components/MessageRenderer/AdminMessage/index.js +0 -46
- package/lib/commonjs/components/MessageRenderer/AdminMessage/index.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js +0 -73
- package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js +0 -93
- package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js +0 -132
- package/lib/commonjs/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js +0 -24
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/MessageContainer.js +0 -27
- package/lib/commonjs/components/MessageRenderer/MessageContainer.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/MessageDateSeparator.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js +0 -41
- package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingSenderName.js +0 -41
- package/lib/commonjs/components/MessageRenderer/MessageIncomingSenderName.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/MessageOutgoingStatus.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/MessageTime.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/UnknownMessage/index.js +0 -46
- package/lib/commonjs/components/MessageRenderer/UnknownMessage/index.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js +0 -113
- package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js +0 -200
- package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/index.js +0 -22
- package/lib/commonjs/components/MessageRenderer/UserMessage/index.js.map +0 -1
- package/lib/commonjs/components/MessageRenderer/index.js +0 -186
- package/lib/commonjs/components/MessageRenderer/index.js.map +0 -1
- package/lib/module/components/MessageRenderer/AdminMessage/index.js +0 -38
- package/lib/module/components/MessageRenderer/AdminMessage/index.js.map +0 -1
- package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js +0 -65
- package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +0 -1
- package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js +0 -84
- package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +0 -1
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js +0 -123
- package/lib/module/components/MessageRenderer/FileMessage/VideoFileMessage.js.map +0 -1
- package/lib/module/components/MessageRenderer/FileMessage/index.js +0 -16
- package/lib/module/components/MessageRenderer/FileMessage/index.js.map +0 -1
- package/lib/module/components/MessageRenderer/MessageContainer.js +0 -19
- package/lib/module/components/MessageRenderer/MessageContainer.js.map +0 -1
- package/lib/module/components/MessageRenderer/MessageDateSeparator.js.map +0 -1
- package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js +0 -33
- package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js.map +0 -1
- package/lib/module/components/MessageRenderer/MessageIncomingSenderName.js +0 -33
- package/lib/module/components/MessageRenderer/MessageIncomingSenderName.js.map +0 -1
- package/lib/module/components/MessageRenderer/MessageOutgoingStatus.js.map +0 -1
- package/lib/module/components/MessageRenderer/MessageTime.js +0 -26
- package/lib/module/components/MessageRenderer/MessageTime.js.map +0 -1
- package/lib/module/components/MessageRenderer/UnknownMessage/index.js +0 -38
- package/lib/module/components/MessageRenderer/UnknownMessage/index.js.map +0 -1
- package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js +0 -105
- package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +0 -1
- package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js +0 -190
- package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +0 -1
- package/lib/module/components/MessageRenderer/UserMessage/index.js +0 -14
- package/lib/module/components/MessageRenderer/UserMessage/index.js.map +0 -1
- package/lib/module/components/MessageRenderer/index.js +0 -178
- package/lib/module/components/MessageRenderer/index.js.map +0 -1
- package/lib/typescript/src/components/MessageRenderer/AdminMessage/index.d.ts +0 -5
- package/lib/typescript/src/components/MessageRenderer/FileMessage/BaseFileMessage.d.ts +0 -6
- package/lib/typescript/src/components/MessageRenderer/FileMessage/ImageFileMessage.d.ts +0 -3
- package/lib/typescript/src/components/MessageRenderer/FileMessage/VideoFileMessage.d.ts +0 -3
- package/lib/typescript/src/components/MessageRenderer/FileMessage/index.d.ts +0 -15
- package/lib/typescript/src/components/MessageRenderer/MessageContainer.d.ts +0 -3
- package/lib/typescript/src/components/MessageRenderer/MessageDateSeparator.d.ts +0 -7
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingAvatar.d.ts +0 -7
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingSenderName.d.ts +0 -7
- package/lib/typescript/src/components/MessageRenderer/MessageTime.d.ts +0 -9
- package/lib/typescript/src/components/MessageRenderer/UnknownMessage/index.d.ts +0 -4
- package/lib/typescript/src/components/MessageRenderer/UserMessage/BaseUserMessage.d.ts +0 -3
- package/lib/typescript/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.d.ts +0 -7
- package/lib/typescript/src/components/MessageRenderer/UserMessage/index.d.ts +0 -9
- package/src/components/MessageRenderer/AdminMessage/index.tsx +0 -40
- package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +0 -51
- package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +0 -98
- package/src/components/MessageRenderer/FileMessage/VideoFileMessage.tsx +0 -113
- package/src/components/MessageRenderer/FileMessage/index.tsx +0 -20
- package/src/components/MessageRenderer/MessageContainer.tsx +0 -17
- package/src/components/MessageRenderer/MessageIncomingAvatar.tsx +0 -34
- package/src/components/MessageRenderer/MessageIncomingSenderName.tsx +0 -36
- package/src/components/MessageRenderer/MessageTime.tsx +0 -28
- package/src/components/MessageRenderer/UnknownMessage/index.tsx +0 -34
- package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +0 -102
- package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +0 -188
- package/src/components/MessageRenderer/UserMessage/index.tsx +0 -24
- package/src/components/MessageRenderer/index.tsx +0 -198
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_uikitReactNativeFoundation","_uikitUtils","_useContext","_SBUUtils","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","OpenGraphUserMessage","_ref","_ogMetaData$defaultIm","message","variant","pressed","ogMetaData","children","onLongPressMentionedUser","onLongPressURL","mentionManager","currentUser","useSendbirdChat","STRINGS","useLocalization","show","useUserProfile","colors","select","palette","useUIKitTheme","imageNotFound","setImageNotFound","useState","color","ui","groupChannelMessage","containerBackground","dark","background400","light","background100","createElement","View","style","styles","bubbleContainer","backgroundColor","container","background","messageContainer","Text","body3","textMsg","RegexText","patterns","regex","templateRegex","replacer","_ref2","_message$mentionedUse","match","groups","parentProps","keyPrefix","index","user","mentionedUsers","find","it","userId","isCurrentUser","onPress","onLongPress","mentionedText","highlight","asMentionedMessageText","urlRegexRough","_ref3","SBUUtils","openURL","urlText","shouldUseMentionedMessageTemplate","mentionedMessageTemplate","Boolean","updatedAt","textEdited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","TouchableOpacity","background500","background200","activeOpacity","url","ogImageContainer","conditionChaining","Icon","containerStyle","ogImage","icon","size","onBackground02","Image","uri","defaultImage","resizeMode","onError","ogContainer","numberOfLines","body2","onBackground01","ogTitle","title","description","caption2","ogDesc","createStyleSheet","borderRadius","overflow","width","maxWidth","paddingVertical","paddingHorizontal","paddingTop","paddingBottom","flex","height","marginBottom","lineHeight","fontWeight","textDecorationLine","_default","exports"],"sources":["OpenGraphUserMessage.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nimport type { OGMetaData } from '@sendbird/chat/message';\nimport { Icon, Image, RegexText, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { conditionChaining, urlRegexRough } from '@sendbird/uikit-utils';\n\nimport { useLocalization, useSendbirdChat, useUserProfile } from '../../../hooks/useContext';\nimport SBUUtils from '../../../libs/SBUUtils';\nimport type { UserMessageProps } from './index';\n\ntype Props = UserMessageProps & {\n ogMetaData: OGMetaData;\n};\n\nconst OpenGraphUserMessage = ({\n message,\n variant,\n pressed,\n ogMetaData,\n children,\n onLongPressMentionedUser,\n onLongPressURL,\n}: Props) => {\n const { mentionManager, currentUser } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { show } = useUserProfile();\n const { colors, select, palette } = useUIKitTheme();\n\n const [imageNotFound, setImageNotFound] = useState(false);\n const color = colors.ui.groupChannelMessage[variant][pressed ? 'pressed' : 'enabled'];\n\n const containerBackground = select({ dark: palette.background400, light: palette.background100 });\n\n return (\n <View style={[styles.bubbleContainer, { backgroundColor: containerBackground }]}>\n <View style={[styles.container, styles.bubbleContainer, { backgroundColor: color.background }]}>\n <View style={styles.messageContainer}>\n <Text body3 color={color.textMsg}>\n <RegexText\n body3\n color={color.textMsg}\n patterns={[\n {\n regex: mentionManager.templateRegex,\n replacer({ match, groups, parentProps, keyPrefix, index }) {\n const user = message.mentionedUsers?.find((it) => it.userId === groups[2]);\n if (user) {\n const isCurrentUser = user.userId === currentUser?.userId;\n return (\n <Text\n {...parentProps}\n key={`${keyPrefix}-${index}`}\n onPress={() => show(user)}\n onLongPress={onLongPressMentionedUser}\n style={[\n parentProps?.style,\n styles.mentionedText,\n isCurrentUser && { backgroundColor: palette.highlight },\n ]}\n >\n {`${mentionManager.asMentionedMessageText(user)}`}\n </Text>\n );\n }\n return match;\n },\n },\n {\n regex: urlRegexRough,\n replacer({ match, parentProps, keyPrefix, index }) {\n return (\n <Text\n {...parentProps}\n key={`${keyPrefix}-${index}`}\n onPress={() => SBUUtils.openURL(match)}\n onLongPress={onLongPressURL}\n style={[parentProps?.style, styles.urlText]}\n >\n {match}\n </Text>\n );\n },\n },\n ]}\n >\n {mentionManager.shouldUseMentionedMessageTemplate(message)\n ? message.mentionedMessageTemplate\n : message.message}\n </RegexText>\n {Boolean(message.updatedAt) && (\n <Text body3 color={color.textEdited}>\n {STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX}\n </Text>\n )}\n </Text>\n </View>\n <TouchableOpacity\n style={{ backgroundColor: select({ dark: palette.background500, light: palette.background200 }) }}\n activeOpacity={0.85}\n onPress={() => SBUUtils.openURL(ogMetaData.url)}\n >\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\n containerStyle={styles.ogImage}\n icon={'thumbnail-none'}\n size={48}\n color={colors.onBackground02}\n />,\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 style={[styles.ogContainer, { backgroundColor: containerBackground }]}>\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 {children}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n bubbleContainer: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n container: {\n width: 240,\n maxWidth: 240,\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 flex: 1,\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 mentionedText: {\n fontWeight: 'bold',\n },\n urlText: {\n textDecorationLine: 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ChF,KAAK,EAAEP,MAAM,CAAC0E;EAAe,GAC3DrF,UAAU,CAAC6E,GAAG,CACV,CACF,CACU,CACd,EACN5E,QAAQ,CACJ;AAEX,CAAC;AAED,MAAM4B,MAAM,GAAG,IAAAuE,4CAAgB,EAAC;EAC9BtE,eAAe,EAAE;IACfuE,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ,CAAC;EACDtE,SAAS,EAAE;IACTuE,KAAK,EAAE,GAAG;IACVC,QAAQ,EAAE;EACZ,CAAC;EACDtE,gBAAgB,EAAE;IAChBuE,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB,CAAC;EACDf,WAAW,EAAE;IACXe,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB,CAAC;EACD9B,gBAAgB,EAAE;IAChB+B,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE;EACV,CAAC;EACD5B,OAAO,EAAE;IACPqB,KAAK,EAAE,MAAM;IACbO,MAAM,EAAE;EACV,CAAC;EACDf,OAAO,EAAE;IACPgB,YAAY,EAAE;EAChB,CAAC;EACDZ,MAAM,EAAE;IACNa,UAAU,EAAE,EAAE;IACdD,YAAY,EAAE;EAChB,CAAC;EACDrD,aAAa,EAAE;IACbuD,UAAU,EAAE;EACd,CAAC;EACDhD,OAAO,EAAE;IACPiD,kBAAkB,EAAE;EACtB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEYzH,oBAAoB;AAAA0H,OAAA,CAAAvJ,OAAA,GAAAsJ,QAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _BaseUserMessage = _interopRequireDefault(require("./BaseUserMessage"));
|
|
9
|
-
var _OpenGraphUserMessage = _interopRequireDefault(require("./OpenGraphUserMessage"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); }
|
|
12
|
-
const UserMessage = props => {
|
|
13
|
-
if (props.message.ogMetaData) {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(_OpenGraphUserMessage.default, _extends({}, props, {
|
|
15
|
-
ogMetaData: props.message.ogMetaData
|
|
16
|
-
}));
|
|
17
|
-
}
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement(_BaseUserMessage.default, props);
|
|
19
|
-
};
|
|
20
|
-
var _default = /*#__PURE__*/_react.default.memo(UserMessage);
|
|
21
|
-
exports.default = _default;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_BaseUserMessage","_OpenGraphUserMessage","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","UserMessage","props","message","ogMetaData","createElement","_default","React","memo","exports"],"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<\n SendbirdUserMessage,\n {\n onLongPressMentionedUser?: () => void;\n onLongPressURL?: () => void;\n }\n>;\n\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(U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|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _uikitReactNativeFoundation = require("@sendbird/uikit-react-native-foundation");
|
|
10
|
-
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
11
|
-
var _constants = require("../../constants");
|
|
12
|
-
var _useContext = require("../../hooks/useContext");
|
|
13
|
-
var _ReactionAddons = require("../ReactionAddons");
|
|
14
|
-
var _AdminMessage = _interopRequireDefault(require("./AdminMessage"));
|
|
15
|
-
var _FileMessage = _interopRequireDefault(require("./FileMessage"));
|
|
16
|
-
var _MessageContainer = _interopRequireDefault(require("./MessageContainer"));
|
|
17
|
-
var _MessageDateSeparator = _interopRequireDefault(require("./MessageDateSeparator"));
|
|
18
|
-
var _MessageIncomingAvatar = _interopRequireDefault(require("./MessageIncomingAvatar"));
|
|
19
|
-
var _MessageIncomingSenderName = _interopRequireDefault(require("./MessageIncomingSenderName"));
|
|
20
|
-
var _MessageOutgoingStatus = _interopRequireDefault(require("./MessageOutgoingStatus"));
|
|
21
|
-
var _MessageTime = _interopRequireDefault(require("./MessageTime"));
|
|
22
|
-
var _UnknownMessage = _interopRequireDefault(require("./UnknownMessage"));
|
|
23
|
-
var _UserMessage = _interopRequireDefault(require("./UserMessage"));
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
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); }
|
|
26
|
-
const MessageRenderer = _ref => {
|
|
27
|
-
let {
|
|
28
|
-
currentUserId,
|
|
29
|
-
channel,
|
|
30
|
-
message,
|
|
31
|
-
onPress,
|
|
32
|
-
onLongPress,
|
|
33
|
-
...rest
|
|
34
|
-
} = _ref;
|
|
35
|
-
const variant = (0, _uikitUtils.isMyMessage)(message, currentUserId) ? 'outgoing' : 'incoming';
|
|
36
|
-
const isOutgoing = variant === 'outgoing';
|
|
37
|
-
const isIncoming = variant === 'incoming';
|
|
38
|
-
const variantContainerStyle = {
|
|
39
|
-
incoming: styles.chatIncoming,
|
|
40
|
-
outgoing: styles.chatOutgoing
|
|
41
|
-
}[variant];
|
|
42
|
-
const {
|
|
43
|
-
groupWithPrev,
|
|
44
|
-
groupWithNext
|
|
45
|
-
} = (0, _uikitUtils.calcMessageGrouping)(Boolean(rest.enableMessageGrouping), message, rest.prevMessage, rest.nextMessage);
|
|
46
|
-
const {
|
|
47
|
-
features
|
|
48
|
-
} = (0, _useContext.useSendbirdChat)();
|
|
49
|
-
const reactionChildren = (0, _uikitUtils.useIIFE)(() => {
|
|
50
|
-
if ((0, _uikitUtils.shouldRenderReaction)(channel, features.reactionEnabled) && message.reactions && message.reactions.length > 0) {
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(_ReactionAddons.ReactionAddons.Message, {
|
|
52
|
-
channel: channel,
|
|
53
|
-
message: message
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
});
|
|
58
|
-
const messageComponent = (0, _uikitUtils.useIIFE)(() => {
|
|
59
|
-
const pressableProps = {
|
|
60
|
-
style: styles.msgContainer,
|
|
61
|
-
disabled: !onPress && !onLongPress,
|
|
62
|
-
onPress,
|
|
63
|
-
onLongPress,
|
|
64
|
-
delayLongPress: _constants.DEFAULT_LONG_PRESS_DELAY
|
|
65
|
-
};
|
|
66
|
-
const messageProps = {
|
|
67
|
-
...rest,
|
|
68
|
-
variant,
|
|
69
|
-
groupWithNext,
|
|
70
|
-
groupWithPrev
|
|
71
|
-
};
|
|
72
|
-
if (message.isUserMessage()) {
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, pressableProps, _ref2 => {
|
|
74
|
-
let {
|
|
75
|
-
pressed
|
|
76
|
-
} = _ref2;
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_UserMessage.default, _extends({
|
|
78
|
-
message: message,
|
|
79
|
-
pressed: pressed,
|
|
80
|
-
onLongPressURL: onLongPress,
|
|
81
|
-
onLongPressMentionedUser: onLongPress
|
|
82
|
-
}, messageProps), reactionChildren);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
if (message.isFileMessage()) {
|
|
86
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, pressableProps, _ref3 => {
|
|
87
|
-
let {
|
|
88
|
-
pressed
|
|
89
|
-
} = _ref3;
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_FileMessage.default, _extends({
|
|
91
|
-
message: message,
|
|
92
|
-
pressed: pressed
|
|
93
|
-
}, messageProps), reactionChildren);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
if (message.isAdminMessage()) {
|
|
97
|
-
return /*#__PURE__*/_react.default.createElement(_AdminMessage.default, _extends({
|
|
98
|
-
message: message,
|
|
99
|
-
pressed: false
|
|
100
|
-
}, messageProps));
|
|
101
|
-
}
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, pressableProps, _ref4 => {
|
|
103
|
-
let {
|
|
104
|
-
pressed
|
|
105
|
-
} = _ref4;
|
|
106
|
-
return /*#__PURE__*/_react.default.createElement(_UnknownMessage.default, _extends({
|
|
107
|
-
message: message,
|
|
108
|
-
pressed: pressed
|
|
109
|
-
}, messageProps));
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
return /*#__PURE__*/_react.default.createElement(_MessageContainer.default, null, /*#__PURE__*/_react.default.createElement(_MessageDateSeparator.default, {
|
|
113
|
-
message: message,
|
|
114
|
-
prevMessage: rest.prevMessage
|
|
115
|
-
}), message.isAdminMessage() && messageComponent, !message.isAdminMessage() && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
116
|
-
style: [variantContainerStyle, (0, _uikitUtils.conditionChaining)([groupWithNext, Boolean(rest.nextMessage)], [styles.chatGroup, styles.chatNonGroup, styles.chatLastMessage])]
|
|
117
|
-
}, isOutgoing && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
118
|
-
style: styles.outgoingContainer
|
|
119
|
-
}, /*#__PURE__*/_react.default.createElement(_MessageOutgoingStatus.default, {
|
|
120
|
-
channel: channel,
|
|
121
|
-
message: message
|
|
122
|
-
}), /*#__PURE__*/_react.default.createElement(_MessageTime.default, {
|
|
123
|
-
message: message,
|
|
124
|
-
grouping: groupWithNext,
|
|
125
|
-
style: styles.timeOutgoing
|
|
126
|
-
})), isIncoming && /*#__PURE__*/_react.default.createElement(_MessageIncomingAvatar.default, {
|
|
127
|
-
message: message,
|
|
128
|
-
grouping: groupWithNext
|
|
129
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
130
|
-
style: styles.bubbleContainer
|
|
131
|
-
}, isIncoming && /*#__PURE__*/_react.default.createElement(_MessageIncomingSenderName.default, {
|
|
132
|
-
message: message,
|
|
133
|
-
grouping: groupWithPrev
|
|
134
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
135
|
-
style: styles.bubbleWrapper
|
|
136
|
-
}, messageComponent, isIncoming && /*#__PURE__*/_react.default.createElement(_MessageTime.default, {
|
|
137
|
-
message: message,
|
|
138
|
-
grouping: groupWithNext,
|
|
139
|
-
style: styles.timeIncoming
|
|
140
|
-
})))));
|
|
141
|
-
};
|
|
142
|
-
const styles = (0, _uikitReactNativeFoundation.createStyleSheet)({
|
|
143
|
-
chatIncoming: {
|
|
144
|
-
flexDirection: 'row',
|
|
145
|
-
justifyContent: 'flex-start',
|
|
146
|
-
alignItems: 'flex-end'
|
|
147
|
-
},
|
|
148
|
-
chatOutgoing: {
|
|
149
|
-
flexDirection: 'row',
|
|
150
|
-
justifyContent: 'flex-end',
|
|
151
|
-
alignItems: 'flex-end'
|
|
152
|
-
},
|
|
153
|
-
timeIncoming: {
|
|
154
|
-
marginLeft: 4
|
|
155
|
-
},
|
|
156
|
-
timeOutgoing: {
|
|
157
|
-
marginRight: 4
|
|
158
|
-
},
|
|
159
|
-
chatGroup: {
|
|
160
|
-
marginBottom: 2
|
|
161
|
-
},
|
|
162
|
-
chatNonGroup: {
|
|
163
|
-
marginBottom: 16
|
|
164
|
-
},
|
|
165
|
-
chatLastMessage: {
|
|
166
|
-
marginBottom: 16
|
|
167
|
-
},
|
|
168
|
-
msgContainer: {
|
|
169
|
-
maxWidth: 240
|
|
170
|
-
},
|
|
171
|
-
bubbleContainer: {
|
|
172
|
-
flexShrink: 1
|
|
173
|
-
},
|
|
174
|
-
bubbleWrapper: {
|
|
175
|
-
flexDirection: 'row',
|
|
176
|
-
alignItems: 'flex-end'
|
|
177
|
-
},
|
|
178
|
-
outgoingContainer: {
|
|
179
|
-
flexDirection: 'row',
|
|
180
|
-
alignItems: 'flex-end',
|
|
181
|
-
justifyContent: 'center'
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
var _default = /*#__PURE__*/_react.default.memo(MessageRenderer);
|
|
185
|
-
exports.default = _default;
|
|
186
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_uikitReactNativeFoundation","_uikitUtils","_constants","_useContext","_ReactionAddons","_AdminMessage","_FileMessage","_MessageContainer","_MessageDateSeparator","_MessageIncomingAvatar","_MessageIncomingSenderName","_MessageOutgoingStatus","_MessageTime","_UnknownMessage","_UserMessage","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","MessageRenderer","_ref","currentUserId","channel","message","onPress","onLongPress","rest","variant","isMyMessage","isOutgoing","isIncoming","variantContainerStyle","incoming","styles","chatIncoming","outgoing","chatOutgoing","groupWithPrev","groupWithNext","calcMessageGrouping","Boolean","enableMessageGrouping","prevMessage","nextMessage","features","useSendbirdChat","reactionChildren","useIIFE","shouldRenderReaction","reactionEnabled","reactions","createElement","ReactionAddons","Message","messageComponent","pressableProps","style","msgContainer","disabled","delayLongPress","DEFAULT_LONG_PRESS_DELAY","messageProps","isUserMessage","Pressable","_ref2","pressed","onLongPressURL","onLongPressMentionedUser","isFileMessage","_ref3","isAdminMessage","_ref4","View","conditionChaining","chatGroup","chatNonGroup","chatLastMessage","outgoingContainer","grouping","timeOutgoing","bubbleContainer","bubbleWrapper","timeIncoming","createStyleSheet","flexDirection","justifyContent","alignItems","marginLeft","marginRight","marginBottom","maxWidth","flexShrink","_default","React","memo","exports"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, PressableProps, View } from 'react-native';\n\nimport { createStyleSheet } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport {\n calcMessageGrouping,\n conditionChaining,\n isMyMessage,\n shouldRenderReaction,\n useIIFE,\n} from '@sendbird/uikit-utils';\n\nimport { DEFAULT_LONG_PRESS_DELAY } from '../../constants';\nimport type { GroupChannelProps } from '../../domain/groupChannel/types';\nimport { useSendbirdChat } from '../../hooks/useContext';\nimport { ReactionAddons } from '../ReactionAddons';\nimport AdminMessage from './AdminMessage';\nimport FileMessage from './FileMessage';\nimport MessageContainer from './MessageContainer';\nimport MessageDateSeparator from './MessageDateSeparator';\nimport MessageIncomingAvatar from './MessageIncomingAvatar';\nimport MessageIncomingSenderName from './MessageIncomingSenderName';\nimport MessageOutgoingStatus from './MessageOutgoingStatus';\nimport MessageTime from './MessageTime';\nimport UnknownMessage from './UnknownMessage';\nimport UserMessage from './UserMessage';\n\ntype MessageStyleVariant = 'outgoing' | 'incoming';\nexport type MessageRendererInterface<T = SendbirdMessage, AdditionalProps = unknown> = {\n message: T;\n prevMessage?: SendbirdMessage;\n nextMessage?: SendbirdMessage;\n variant: MessageStyleVariant;\n groupWithPrev: boolean;\n groupWithNext: boolean;\n pressed: boolean;\n children?: React.ReactElement | null;\n} & AdditionalProps;\n\nconst MessageRenderer: GroupChannelProps['Fragment']['renderMessage'] = ({\n currentUserId,\n channel,\n message,\n onPress,\n onLongPress,\n ...rest\n}) => {\n const variant: MessageStyleVariant = isMyMessage(message, currentUserId) ? 'outgoing' : 'incoming';\n const isOutgoing = variant === 'outgoing';\n const isIncoming = variant === 'incoming';\n const variantContainerStyle = { incoming: styles.chatIncoming, outgoing: styles.chatOutgoing }[variant];\n\n const { groupWithPrev, groupWithNext } = calcMessageGrouping(\n Boolean(rest.enableMessageGrouping),\n message,\n rest.prevMessage,\n rest.nextMessage,\n );\n\n const { features } = useSendbirdChat();\n\n const reactionChildren = useIIFE(() => {\n if (shouldRenderReaction(channel, features.reactionEnabled) && message.reactions && message.reactions.length > 0) {\n return <ReactionAddons.Message channel={channel} message={message} />;\n }\n return null;\n });\n\n const messageComponent = useIIFE(() => {\n const pressableProps: PressableProps = {\n style: styles.msgContainer,\n disabled: !onPress && !onLongPress,\n onPress,\n onLongPress,\n delayLongPress: DEFAULT_LONG_PRESS_DELAY,\n };\n const messageProps = { ...rest, variant, groupWithNext, groupWithPrev };\n\n if (message.isUserMessage()) {\n return (\n <Pressable {...pressableProps}>\n {({ pressed }) => (\n <UserMessage\n message={message}\n pressed={pressed}\n onLongPressURL={onLongPress}\n onLongPressMentionedUser={onLongPress}\n {...messageProps}\n >\n {reactionChildren}\n </UserMessage>\n )}\n </Pressable>\n );\n }\n\n if (message.isFileMessage()) {\n return (\n <Pressable {...pressableProps}>\n {({ pressed }) => (\n <FileMessage message={message} pressed={pressed} {...messageProps}>\n {reactionChildren}\n </FileMessage>\n )}\n </Pressable>\n );\n }\n\n if (message.isAdminMessage()) {\n return <AdminMessage message={message} pressed={false} {...messageProps} />;\n }\n\n return (\n <Pressable {...pressableProps}>\n {({ pressed }) => <UnknownMessage message={message} pressed={pressed} {...messageProps} />}\n </Pressable>\n );\n });\n\n return (\n <MessageContainer>\n <MessageDateSeparator message={message} prevMessage={rest.prevMessage} />\n {message.isAdminMessage() && messageComponent}\n {!message.isAdminMessage() && (\n <View\n style={[\n variantContainerStyle,\n conditionChaining(\n [groupWithNext, Boolean(rest.nextMessage)],\n [styles.chatGroup, styles.chatNonGroup, styles.chatLastMessage],\n ),\n ]}\n >\n {isOutgoing && (\n <View style={styles.outgoingContainer}>\n <MessageOutgoingStatus channel={channel} message={message} />\n <MessageTime message={message} grouping={groupWithNext} style={styles.timeOutgoing} />\n </View>\n )}\n {isIncoming && <MessageIncomingAvatar message={message} grouping={groupWithNext} />}\n <View style={styles.bubbleContainer}>\n {isIncoming && <MessageIncomingSenderName message={message} grouping={groupWithPrev} />}\n <View style={styles.bubbleWrapper}>\n {messageComponent}\n {isIncoming && <MessageTime message={message} grouping={groupWithNext} style={styles.timeIncoming} />}\n </View>\n </View>\n </View>\n )}\n </MessageContainer>\n );\n};\n\nconst styles = createStyleSheet({\n chatIncoming: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'flex-end',\n },\n chatOutgoing: {\n flexDirection: 'row',\n justifyContent: 'flex-end',\n alignItems: 'flex-end',\n },\n timeIncoming: {\n marginLeft: 4,\n },\n timeOutgoing: {\n marginRight: 4,\n },\n chatGroup: {\n marginBottom: 2,\n },\n chatNonGroup: {\n marginBottom: 16,\n },\n chatLastMessage: {\n marginBottom: 16,\n },\n msgContainer: {\n maxWidth: 240,\n },\n bubbleContainer: {\n flexShrink: 1,\n },\n bubbleWrapper: {\n flexDirection: 'row',\n alignItems: 'flex-end',\n },\n outgoingContainer: {\n flexDirection: 'row',\n alignItems: 'flex-end',\n justifyContent: 'center',\n },\n});\n\nexport default React.memo(MessageRenderer);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAQA,IAAAI,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C;EACDd,SAAS,EAAE;IACTe,YAAY,EAAE;EAChB,CAAC;EACDd,YAAY,EAAE;IACZc,YAAY,EAAE;EAChB,CAAC;EACDb,eAAe,EAAE;IACfa,YAAY,EAAE;EAChB,CAAC;EACDhC,YAAY,EAAE;IACZiC,QAAQ,EAAE;EACZ,CAAC;EACDV,eAAe,EAAE;IACfW,UAAU,EAAE;EACd,CAAC;EACDV,aAAa,EAAE;IACbG,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE;EACd,CAAC;EACDT,iBAAiB,EAAE;IACjBO,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,UAAU;IACtBD,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAAC,IAAAO,QAAA,gBAEYC,cAAK,CAACC,IAAI,CAAC3E,eAAe,CAAC;AAAA4E,OAAA,CAAA3F,OAAA,GAAAwF,QAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
4
|
-
const AdminMessage = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
message,
|
|
7
|
-
nextMessage
|
|
8
|
-
} = _ref;
|
|
9
|
-
const {
|
|
10
|
-
colors
|
|
11
|
-
} = useUIKitTheme();
|
|
12
|
-
const isNextAdmin = nextMessage === null || nextMessage === void 0 ? void 0 : nextMessage.isAdminMessage();
|
|
13
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
14
|
-
style: StyleSheet.flatten([styles.container, isNextAdmin ? styles.nextAdminType : styles.next])
|
|
15
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
16
|
-
caption2: true,
|
|
17
|
-
color: colors.onBackground02,
|
|
18
|
-
style: styles.text
|
|
19
|
-
}, message.message));
|
|
20
|
-
};
|
|
21
|
-
const styles = createStyleSheet({
|
|
22
|
-
container: {
|
|
23
|
-
width: 300,
|
|
24
|
-
alignSelf: 'center',
|
|
25
|
-
alignItems: 'center'
|
|
26
|
-
},
|
|
27
|
-
nextAdminType: {
|
|
28
|
-
marginBottom: 8
|
|
29
|
-
},
|
|
30
|
-
next: {
|
|
31
|
-
marginBottom: 16
|
|
32
|
-
},
|
|
33
|
-
text: {
|
|
34
|
-
textAlign: 'center'
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
export default AdminMessage;
|
|
38
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","Text","createStyleSheet","useUIKitTheme","AdminMessage","_ref","message","nextMessage","colors","isNextAdmin","isAdminMessage","createElement","style","flatten","styles","container","nextAdminType","next","caption2","color","onBackground02","text","width","alignSelf","alignItems","marginBottom","textAlign"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdAdminMessage } from '@sendbird/uikit-utils';\n\nimport type { MessageRendererInterface } from '../index';\n\nexport type AdminMessageProps = MessageRendererInterface<SendbirdAdminMessage>;\nconst AdminMessage = ({ message, nextMessage }: AdminMessageProps) => {\n const { colors } = useUIKitTheme();\n\n const isNextAdmin = nextMessage?.isAdminMessage();\n return (\n <View style={StyleSheet.flatten([styles.container, isNextAdmin ? styles.nextAdminType : styles.next])}>\n <Text caption2 color={colors.onBackground02} style={styles.text}>\n {message.message}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n width: 300,\n alignSelf: 'center',\n alignItems: 'center',\n },\n nextAdminType: {\n marginBottom: 8,\n },\n next: {\n marginBottom: 16,\n },\n text: {\n textAlign: 'center',\n },\n});\n\nexport default AdminMessage;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AAM/F,MAAMC,YAAY,GAAGC,IAAA,IAAiD;EAAA,IAAhD;IAAEC,OAAO;IAAEC;EAA+B,CAAC,GAAAF,IAAA;EAC/D,MAAM;IAAEG;EAAO,CAAC,GAAGL,aAAa,EAAE;EAElC,MAAMM,WAAW,GAAGF,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEG,cAAc,EAAE;EACjD,oBACEZ,KAAA,CAAAa,aAAA,CAACX,IAAI;IAACY,KAAK,EAAEb,UAAU,CAACc,OAAO,CAAC,CAACC,MAAM,CAACC,SAAS,EAAEN,WAAW,GAAGK,MAAM,CAACE,aAAa,GAAGF,MAAM,CAACG,IAAI,CAAC;EAAE,gBACpGnB,KAAA,CAAAa,aAAA,CAACV,IAAI;IAACiB,QAAQ;IAACC,KAAK,EAAEX,MAAM,CAACY,cAAe;IAACR,KAAK,EAAEE,MAAM,CAACO;EAAK,GAC7Df,OAAO,CAACA,OAAO,CACX,CACF;AAEX,CAAC;AAED,MAAMQ,MAAM,GAAGZ,gBAAgB,CAAC;EAC9Ba,SAAS,EAAE;IACTO,KAAK,EAAE,GAAG;IACVC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE;EACd,CAAC;EACDR,aAAa,EAAE;IACbS,YAAY,EAAE;EAChB,CAAC;EACDR,IAAI,EAAE;IACJQ,YAAY,EAAE;EAChB,CAAC;EACDJ,IAAI,EAAE;IACJK,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,eAAetB,YAAY"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { Icon, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
4
|
-
import { useLocalization } from '../../../hooks/useContext';
|
|
5
|
-
const iconMapper = {
|
|
6
|
-
audio: 'file-audio',
|
|
7
|
-
image: 'photo',
|
|
8
|
-
video: 'play',
|
|
9
|
-
file: 'file-document'
|
|
10
|
-
};
|
|
11
|
-
const BaseFileMessage = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
message,
|
|
14
|
-
variant,
|
|
15
|
-
pressed,
|
|
16
|
-
type,
|
|
17
|
-
children
|
|
18
|
-
} = _ref;
|
|
19
|
-
const {
|
|
20
|
-
STRINGS
|
|
21
|
-
} = useLocalization();
|
|
22
|
-
const {
|
|
23
|
-
colors
|
|
24
|
-
} = useUIKitTheme();
|
|
25
|
-
const color = colors.ui.groupChannelMessage[variant][pressed ? 'pressed' : 'enabled'];
|
|
26
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
27
|
-
style: [styles.bubbleContainer, {
|
|
28
|
-
backgroundColor: color.background
|
|
29
|
-
}]
|
|
30
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
31
|
-
style: styles.container
|
|
32
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
33
|
-
icon: iconMapper[type],
|
|
34
|
-
size: 24,
|
|
35
|
-
containerStyle: {
|
|
36
|
-
backgroundColor: colors.background,
|
|
37
|
-
padding: 2,
|
|
38
|
-
borderRadius: 8,
|
|
39
|
-
marginRight: 8
|
|
40
|
-
}
|
|
41
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
42
|
-
body3: true,
|
|
43
|
-
ellipsizeMode: 'middle',
|
|
44
|
-
numberOfLines: 1,
|
|
45
|
-
color: color.textMsg,
|
|
46
|
-
style: styles.name
|
|
47
|
-
}, STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_FILE_TITLE(message))), children);
|
|
48
|
-
};
|
|
49
|
-
const styles = createStyleSheet({
|
|
50
|
-
bubbleContainer: {
|
|
51
|
-
borderRadius: 16,
|
|
52
|
-
overflow: 'hidden'
|
|
53
|
-
},
|
|
54
|
-
container: {
|
|
55
|
-
flexDirection: 'row',
|
|
56
|
-
alignItems: 'center',
|
|
57
|
-
paddingHorizontal: 12,
|
|
58
|
-
paddingVertical: 6
|
|
59
|
-
},
|
|
60
|
-
name: {
|
|
61
|
-
flexShrink: 1
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
export default BaseFileMessage;
|
|
65
|
-
//# sourceMappingURL=BaseFileMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Icon","Text","createStyleSheet","useUIKitTheme","useLocalization","iconMapper","audio","image","video","file","BaseFileMessage","_ref","message","variant","pressed","type","children","STRINGS","colors","color","ui","groupChannelMessage","createElement","style","styles","bubbleContainer","backgroundColor","background","container","icon","size","containerStyle","padding","borderRadius","marginRight","body3","ellipsizeMode","numberOfLines","textMsg","name","GROUP_CHANNEL","MESSAGE_BUBBLE_FILE_TITLE","overflow","flexDirection","alignItems","paddingHorizontal","paddingVertical","flexShrink"],"sources":["BaseFileMessage.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\n\nimport { Icon, Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { FileMessageProps } from './index';\n\nconst iconMapper = { audio: 'file-audio', image: 'photo', video: 'play', file: 'file-document' } as const;\n\ntype Props = FileMessageProps & {\n type: 'image' | 'audio' | 'video' | 'file';\n};\nconst BaseFileMessage = ({ message, variant, pressed, type, children }: Props) => {\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage[variant][pressed ? 'pressed' : 'enabled'];\n return (\n <View style={[styles.bubbleContainer, { backgroundColor: color.background }]}>\n <View style={styles.container}>\n <Icon\n icon={iconMapper[type]}\n size={24}\n containerStyle={{ backgroundColor: colors.background, padding: 2, borderRadius: 8, marginRight: 8 }}\n />\n <Text body3 ellipsizeMode={'middle'} numberOfLines={1} color={color.textMsg} style={styles.name}>\n {STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_FILE_TITLE(message)}\n </Text>\n </View>\n {children}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n bubbleContainer: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingHorizontal: 12,\n paddingVertical: 6,\n },\n name: {\n flexShrink: 1,\n },\n});\n\nexport default BaseFileMessage;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AAErG,SAASC,eAAe,QAAQ,2BAA2B;AAG3D,MAAMC,UAAU,GAAG;EAAEC,KAAK,EAAE,YAAY;EAAEC,KAAK,EAAE,OAAO;EAAEC,KAAK,EAAE,MAAM;EAAEC,IAAI,EAAE;AAAgB,CAAU;AAKzG,MAAMC,eAAe,GAAGC,IAAA,IAA0D;EAAA,IAAzD;IAAEC,OAAO;IAAEC,OAAO;IAAEC,OAAO;IAAEC,IAAI;IAAEC;EAAgB,CAAC,GAAAL,IAAA;EAC3E,MAAM;IAAEM;EAAQ,CAAC,GAAGb,eAAe,EAAE;EACrC,MAAM;IAAEc;EAAO,CAAC,GAAGf,aAAa,EAAE;EAClC,MAAMgB,KAAK,GAAGD,MAAM,CAACE,EAAE,CAACC,mBAAmB,CAACR,OAAO,CAAC,CAACC,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;EACrF,oBACEhB,KAAA,CAAAwB,aAAA,CAACvB,IAAI;IAACwB,KAAK,EAAE,CAACC,MAAM,CAACC,eAAe,EAAE;MAAEC,eAAe,EAAEP,KAAK,CAACQ;IAAW,CAAC;EAAE,gBAC3E7B,KAAA,CAAAwB,aAAA,CAACvB,IAAI;IAACwB,KAAK,EAAEC,MAAM,CAACI;EAAU,gBAC5B9B,KAAA,CAAAwB,aAAA,CAACtB,IAAI;IACH6B,IAAI,EAAExB,UAAU,CAACU,IAAI,CAAE;IACvBe,IAAI,EAAE,EAAG;IACTC,cAAc,EAAE;MAAEL,eAAe,EAAER,MAAM,CAACS,UAAU;MAAEK,OAAO,EAAE,CAAC;MAAEC,YAAY,EAAE,CAAC;MAAEC,WAAW,EAAE;IAAE;EAAE,EACpG,eACFpC,KAAA,CAAAwB,aAAA,CAACrB,IAAI;IAACkC,KAAK;IAACC,aAAa,EAAE,QAAS;IAACC,aAAa,EAAE,CAAE;IAAClB,KAAK,EAAEA,KAAK,CAACmB,OAAQ;IAACf,KAAK,EAAEC,MAAM,CAACe;EAAK,GAC7FtB,OAAO,CAACuB,aAAa,CAACC,yBAAyB,CAAC7B,OAAO,CAAC,CACpD,CACF,EACNI,QAAQ,CACJ;AAEX,CAAC;AAED,MAAMQ,MAAM,GAAGtB,gBAAgB,CAAC;EAC9BuB,eAAe,EAAE;IACfQ,YAAY,EAAE,EAAE;IAChBS,QAAQ,EAAE;EACZ,CAAC;EACDd,SAAS,EAAE;IACTe,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDP,IAAI,EAAE;IACJQ,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAerC,eAAe"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Platform, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
4
|
-
import { getAvailableUriFromFileMessage, useForceUpdate } from '@sendbird/uikit-utils';
|
|
5
|
-
const useRetry = function (hasError) {
|
|
6
|
-
let retryCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
|
|
7
|
-
if (Platform.OS === 'android') return '';
|
|
8
|
-
const forceUpdate = useForceUpdate();
|
|
9
|
-
const retryCountRef = useRef(1);
|
|
10
|
-
const retryTimeoutRef = useRef();
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
if (hasError) {
|
|
13
|
-
const reloadReservation = () => {
|
|
14
|
-
if (retryCountRef.current < retryCount) {
|
|
15
|
-
retryTimeoutRef.current = setTimeout(() => {
|
|
16
|
-
retryCountRef.current++;
|
|
17
|
-
reloadReservation();
|
|
18
|
-
forceUpdate();
|
|
19
|
-
}, retryCountRef.current * 5000);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
return reloadReservation();
|
|
23
|
-
} else {
|
|
24
|
-
return clearTimeout(retryTimeoutRef.current);
|
|
25
|
-
}
|
|
26
|
-
}, [hasError]);
|
|
27
|
-
return retryCountRef.current;
|
|
28
|
-
};
|
|
29
|
-
const ImageFileMessage = _ref => {
|
|
30
|
-
let {
|
|
31
|
-
message,
|
|
32
|
-
children,
|
|
33
|
-
variant
|
|
34
|
-
} = _ref;
|
|
35
|
-
const {
|
|
36
|
-
colors
|
|
37
|
-
} = useUIKitTheme();
|
|
38
|
-
const [imageNotFound, setImageNotFound] = useState(false);
|
|
39
|
-
const fileUrl = getAvailableUriFromFileMessage(message);
|
|
40
|
-
const style = [styles.image, {
|
|
41
|
-
backgroundColor: colors.onBackground04
|
|
42
|
-
}];
|
|
43
|
-
const key = useRetry(imageNotFound);
|
|
44
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
45
|
-
style: [styles.bubbleContainer, {
|
|
46
|
-
backgroundColor: imageNotFound ? colors.onBackground04 : colors.ui.groupChannelMessage[variant].enabled.background
|
|
47
|
-
}]
|
|
48
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
49
|
-
style: style
|
|
50
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
51
|
-
key: key,
|
|
52
|
-
source: {
|
|
53
|
-
uri: fileUrl
|
|
54
|
-
},
|
|
55
|
-
style: [StyleSheet.absoluteFill, imageNotFound && styles.hide],
|
|
56
|
-
resizeMode: 'cover',
|
|
57
|
-
resizeMethod: 'resize',
|
|
58
|
-
onError: () => setImageNotFound(true),
|
|
59
|
-
onLoad: () => setImageNotFound(false)
|
|
60
|
-
}), imageNotFound && /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
-
containerStyle: StyleSheet.absoluteFill,
|
|
62
|
-
icon: 'thumbnail-none',
|
|
63
|
-
size: 48,
|
|
64
|
-
color: colors.onBackground02
|
|
65
|
-
})), children);
|
|
66
|
-
};
|
|
67
|
-
const styles = createStyleSheet({
|
|
68
|
-
bubbleContainer: {
|
|
69
|
-
borderRadius: 16,
|
|
70
|
-
overflow: 'hidden'
|
|
71
|
-
},
|
|
72
|
-
image: {
|
|
73
|
-
width: 240,
|
|
74
|
-
maxWidth: 240,
|
|
75
|
-
height: 160,
|
|
76
|
-
borderRadius: 16,
|
|
77
|
-
overflow: 'hidden'
|
|
78
|
-
},
|
|
79
|
-
hide: {
|
|
80
|
-
display: 'none'
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
export default ImageFileMessage;
|
|
84
|
-
//# sourceMappingURL=ImageFileMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useState","Platform","StyleSheet","View","Icon","Image","createStyleSheet","useUIKitTheme","getAvailableUriFromFileMessage","useForceUpdate","useRetry","hasError","retryCount","arguments","length","undefined","OS","forceUpdate","retryCountRef","retryTimeoutRef","reloadReservation","current","setTimeout","clearTimeout","ImageFileMessage","_ref","message","children","variant","colors","imageNotFound","setImageNotFound","fileUrl","style","styles","image","backgroundColor","onBackground04","key","createElement","bubbleContainer","ui","groupChannelMessage","enabled","background","source","uri","absoluteFill","hide","resizeMode","resizeMethod","onError","onLoad","containerStyle","icon","size","color","onBackground02","borderRadius","overflow","width","maxWidth","height","display"],"sources":["ImageFileMessage.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { Platform, StyleSheet, View } from 'react-native';\n\nimport { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { getAvailableUriFromFileMessage, useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileMessageProps } from './index';\n\nconst useRetry = (hasError: boolean, retryCount = 5) => {\n if (Platform.OS === 'android') return '';\n\n const forceUpdate = useForceUpdate();\n const retryCountRef = useRef(1);\n const retryTimeoutRef = useRef<NodeJS.Timeout>();\n\n useEffect(() => {\n if (hasError) {\n const reloadReservation = () => {\n if (retryCountRef.current < retryCount) {\n retryTimeoutRef.current = setTimeout(() => {\n retryCountRef.current++;\n reloadReservation();\n forceUpdate();\n }, retryCountRef.current * 5000);\n }\n };\n\n return reloadReservation();\n } else {\n return clearTimeout(retryTimeoutRef.current);\n }\n }, [hasError]);\n\n return retryCountRef.current;\n};\n\nconst ImageFileMessage = ({ message, children, variant }: FileMessageProps) => {\n const { colors } = useUIKitTheme();\n const [imageNotFound, setImageNotFound] = useState(false);\n\n const fileUrl = getAvailableUriFromFileMessage(message);\n const style = [styles.image, { backgroundColor: colors.onBackground04 }];\n\n const key = useRetry(imageNotFound);\n\n return (\n <View\n style={[\n styles.bubbleContainer,\n {\n backgroundColor: imageNotFound\n ? colors.onBackground04\n : colors.ui.groupChannelMessage[variant].enabled.background,\n },\n ]}\n >\n <View style={style}>\n <Image\n key={key}\n source={{ uri: fileUrl }}\n style={[StyleSheet.absoluteFill, imageNotFound && styles.hide]}\n resizeMode={'cover'}\n resizeMethod={'resize'}\n onError={() => setImageNotFound(true)}\n onLoad={() => setImageNotFound(false)}\n />\n {imageNotFound && (\n <Icon\n containerStyle={StyleSheet.absoluteFill}\n icon={'thumbnail-none'}\n size={48}\n color={colors.onBackground02}\n />\n )}\n </View>\n {children}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n bubbleContainer: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n image: {\n width: 240,\n maxWidth: 240,\n height: 160,\n borderRadius: 16,\n overflow: 'hidden',\n },\n hide: {\n display: 'none',\n },\n});\n\nexport default ImageFileMessage;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,QAAQ,EAA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O,MAAM,GAAG5B,gBAAgB,CAAC;EAC9BkC,eAAe,EAAE;IACfkB,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ,CAAC;EACDxB,KAAK,EAAE;IACLyB,KAAK,EAAE,GAAG;IACVC,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAE,GAAG;IACXJ,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ,CAAC;EACDX,IAAI,EAAE;IACJe,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAevC,gBAAgB"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
|
|
4
|
-
import { getAvailableUriFromFileMessage } from '@sendbird/uikit-utils';
|
|
5
|
-
import { usePlatformService } from '../../../hooks/useContext';
|
|
6
|
-
const useRetry = function (videoFileUrl) {
|
|
7
|
-
let retryCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
|
|
8
|
-
const [state, setState] = useState({
|
|
9
|
-
thumbnail: null,
|
|
10
|
-
loading: true
|
|
11
|
-
});
|
|
12
|
-
const retryCountRef = useRef(0);
|
|
13
|
-
const retryTimeoutRef = useRef();
|
|
14
|
-
const {
|
|
15
|
-
mediaService
|
|
16
|
-
} = usePlatformService();
|
|
17
|
-
const fetchThumbnail = () => {
|
|
18
|
-
return mediaService.getVideoThumbnail({
|
|
19
|
-
url: videoFileUrl,
|
|
20
|
-
timeMills: 1000
|
|
21
|
-
}).then(result => {
|
|
22
|
-
setState({
|
|
23
|
-
loading: false,
|
|
24
|
-
thumbnail: (result === null || result === void 0 ? void 0 : result.path) ?? null
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (!state.thumbnail) {
|
|
30
|
-
const reloadReservation = () => {
|
|
31
|
-
if (retryCountRef.current < retryCount) {
|
|
32
|
-
retryTimeoutRef.current = setTimeout(() => {
|
|
33
|
-
retryCountRef.current++;
|
|
34
|
-
reloadReservation();
|
|
35
|
-
fetchThumbnail();
|
|
36
|
-
}, retryCountRef.current * 5000);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
return reloadReservation();
|
|
40
|
-
} else {
|
|
41
|
-
return clearTimeout(retryTimeoutRef.current);
|
|
42
|
-
}
|
|
43
|
-
}, [state.thumbnail]);
|
|
44
|
-
return state;
|
|
45
|
-
};
|
|
46
|
-
const VideoFileMessage = _ref => {
|
|
47
|
-
let {
|
|
48
|
-
message,
|
|
49
|
-
variant,
|
|
50
|
-
children
|
|
51
|
-
} = _ref;
|
|
52
|
-
const {
|
|
53
|
-
colors
|
|
54
|
-
} = useUIKitTheme();
|
|
55
|
-
const fileUrl = getAvailableUriFromFileMessage(message);
|
|
56
|
-
const style = [styles.video, {
|
|
57
|
-
backgroundColor: colors.onBackground04
|
|
58
|
-
}];
|
|
59
|
-
const {
|
|
60
|
-
loading,
|
|
61
|
-
thumbnail
|
|
62
|
-
} = useRetry(fileUrl);
|
|
63
|
-
if (loading) {
|
|
64
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
65
|
-
style: [styles.bubbleContainer, {
|
|
66
|
-
backgroundColor: colors.ui.groupChannelMessage[variant].enabled.background
|
|
67
|
-
}]
|
|
68
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
69
|
-
style: [styles.bubbleContainer, styles.bubbleInnerContainer]
|
|
70
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
71
|
-
style: style
|
|
72
|
-
}), /*#__PURE__*/React.createElement(PlayIcon, null)), children);
|
|
73
|
-
}
|
|
74
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
75
|
-
style: [styles.bubbleContainer, {
|
|
76
|
-
backgroundColor: colors.ui.groupChannelMessage[variant].enabled.background
|
|
77
|
-
}]
|
|
78
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
79
|
-
style: [styles.bubbleContainer, styles.bubbleInnerContainer]
|
|
80
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
81
|
-
source: {
|
|
82
|
-
uri: thumbnail || fileUrl
|
|
83
|
-
},
|
|
84
|
-
style: style,
|
|
85
|
-
resizeMode: 'cover',
|
|
86
|
-
resizeMethod: 'resize'
|
|
87
|
-
}), /*#__PURE__*/React.createElement(PlayIcon, null)), children);
|
|
88
|
-
};
|
|
89
|
-
const PlayIcon = () => {
|
|
90
|
-
const {
|
|
91
|
-
colors
|
|
92
|
-
} = useUIKitTheme();
|
|
93
|
-
return /*#__PURE__*/React.createElement(Icon, {
|
|
94
|
-
icon: 'play',
|
|
95
|
-
size: 28,
|
|
96
|
-
color: colors.onBackground02,
|
|
97
|
-
containerStyle: [styles.playIcon, {
|
|
98
|
-
backgroundColor: colors.onBackgroundReverse01
|
|
99
|
-
}]
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
const styles = createStyleSheet({
|
|
103
|
-
bubbleContainer: {
|
|
104
|
-
borderRadius: 16,
|
|
105
|
-
overflow: 'hidden'
|
|
106
|
-
},
|
|
107
|
-
bubbleInnerContainer: {
|
|
108
|
-
alignItems: 'center',
|
|
109
|
-
justifyContent: 'center'
|
|
110
|
-
},
|
|
111
|
-
video: {
|
|
112
|
-
width: 240,
|
|
113
|
-
maxWidth: 240,
|
|
114
|
-
height: 160
|
|
115
|
-
},
|
|
116
|
-
playIcon: {
|
|
117
|
-
position: 'absolute',
|
|
118
|
-
padding: 10,
|
|
119
|
-
borderRadius: 50
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
export default VideoFileMessage;
|
|
123
|
-
//# sourceMappingURL=VideoFileMessage.js.map
|