stream-chat-react-native-core 5.1.1-beta.1 → 5.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/Card.js +29 -18
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +16 -20
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/GalleryImage.js +34 -6
- package/lib/commonjs/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +37 -29
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +10 -8
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +3 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +32 -15
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +30 -6
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +20 -5
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/ImageBackground.js +64 -0
- package/lib/commonjs/components/ImageBackground.js.map +1 -0
- package/lib/commonjs/components/Message/Message.js +15 -16
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +12 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +26 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +39 -26
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +58 -47
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/debugContext/DebugContext.js +63 -0
- package/lib/commonjs/contexts/debugContext/DebugContext.js.map +1 -0
- package/lib/commonjs/contexts/index.js +13 -0
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Card.js +29 -18
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +16 -20
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/GalleryImage.js +34 -6
- package/lib/module/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +37 -29
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +10 -8
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +3 -1
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +32 -15
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +30 -6
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +20 -5
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/ImageBackground.js +64 -0
- package/lib/module/components/ImageBackground.js.map +1 -0
- package/lib/module/components/Message/Message.js +15 -16
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +12 -4
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +26 -5
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +39 -26
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +58 -47
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/debugContext/DebugContext.js +63 -0
- package/lib/module/contexts/debugContext/DebugContext.js.map +1 -0
- package/lib/module/contexts/index.js +13 -0
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +3 -2
- package/lib/typescript/components/Attachment/GalleryImage.d.ts +8 -2
- package/lib/typescript/components/Attachment/Giphy.d.ts +2 -1
- package/lib/typescript/components/Avatar/Avatar.d.ts +2 -1
- package/lib/typescript/components/Avatar/GroupAvatar.d.ts +2 -1
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +2 -0
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/ImageBackground.d.ts +33 -0
- package/lib/typescript/components/Message/Message.d.ts +2 -1
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +2 -1
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +2 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +1 -0
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +3 -1
- package/lib/typescript/contexts/debugContext/DebugContext.d.ts +27 -0
- package/lib/typescript/contexts/index.d.ts +1 -0
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +4 -0
- package/package.json +2 -2
- package/src/components/Attachment/Card.tsx +11 -2
- package/src/components/Attachment/Gallery.tsx +1 -7
- package/src/components/Attachment/GalleryImage.tsx +31 -9
- package/src/components/Attachment/Giphy.tsx +8 -2
- package/src/components/Avatar/Avatar.tsx +12 -2
- package/src/components/Avatar/GroupAvatar.tsx +4 -4
- package/src/components/ChannelList/ChannelListMessenger.tsx +17 -0
- package/src/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.tsx +2 -1
- package/src/components/ChannelPreview/ChannelAvatar.tsx +23 -4
- package/src/components/Chat/Chat.tsx +111 -95
- package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
- package/src/components/ImageBackground.tsx +77 -0
- package/src/components/Message/Message.tsx +8 -8
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +6 -2
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +15 -3
- package/src/components/MessageList/MessageList.tsx +15 -0
- package/src/components/MessageOverlay/MessageOverlay.tsx +210 -205
- package/src/components/MessageOverlay/OverlayReactions.tsx +1 -0
- package/src/contexts/chatContext/ChatContext.tsx +3 -1
- package/src/contexts/debugContext/DebugContext.tsx +77 -0
- package/src/contexts/index.ts +1 -0
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +8 -1
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AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './attachmentPickerContext/AttachmentPickerContext';\nexport * from './channelContext/ChannelContext';\nexport * from './channelsContext/ChannelsContext';\nexport * from './chatContext/ChatContext';\nexport * from './imageGalleryContext/ImageGalleryContext';\nexport * from './keyboardContext/KeyboardContext';\nexport * from './messageContext/MessageContext';\nexport * from './messageInputContext/hooks/useCreateMessageInputContext';\nexport * from './messageInputContext/hooks/useMessageDetailsForState';\nexport * from './messageInputContext/MessageInputContext';\nexport * from './messageOverlayContext/MessageOverlayContext';\nexport * from './messagesContext/MessagesContext';\nexport * from './paginatedMessageListContext/PaginatedMessageListContext';\nexport * from './overlayContext/OverlayContext';\nexport * from './overlayContext/OverlayProvider';\nexport * from './ownCapabilitiesContext/OwnCapabilitiesContext';\nexport * from './suggestionsContext/SuggestionsContext';\nexport * from './themeContext/ThemeContext';\nexport * from './themeContext/utils/theme';\nexport * from './threadContext/ThreadContext';\nexport * from './translationContext/TranslationContext';\nexport * from './typingContext/TypingContext';\nexport * from './utils/getDisplayName';\n"]}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAA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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './attachmentPickerContext/AttachmentPickerContext';\nexport * from './channelContext/ChannelContext';\nexport * from './channelsContext/ChannelsContext';\nexport * from './chatContext/ChatContext';\nexport * from './debugContext/DebugContext';\nexport * from './imageGalleryContext/ImageGalleryContext';\nexport * from './keyboardContext/KeyboardContext';\nexport * from './messageContext/MessageContext';\nexport * from './messageInputContext/hooks/useCreateMessageInputContext';\nexport * from './messageInputContext/hooks/useMessageDetailsForState';\nexport * from './messageInputContext/MessageInputContext';\nexport * from './messageOverlayContext/MessageOverlayContext';\nexport * from './messagesContext/MessagesContext';\nexport * from './paginatedMessageListContext/PaginatedMessageListContext';\nexport * from './overlayContext/OverlayContext';\nexport * from './overlayContext/OverlayProvider';\nexport * from './ownCapabilitiesContext/OwnCapabilitiesContext';\nexport * from './suggestionsContext/SuggestionsContext';\nexport * from './themeContext/ThemeContext';\nexport * from './themeContext/utils/theme';\nexport * from './threadContext/ThreadContext';\nexport * from './translationContext/TranslationContext';\nexport * from './typingContext/TypingContext';\nexport * from './utils/getDisplayName';\n"]}
|
|
@@ -39,7 +39,7 @@ var MessageOverlayProvider = function MessageOverlayProvider(_ref) {
|
|
|
39
39
|
__self: _this,
|
|
40
40
|
__source: {
|
|
41
41
|
fileName: _jsxFileName,
|
|
42
|
-
lineNumber:
|
|
42
|
+
lineNumber: 97,
|
|
43
43
|
columnNumber: 5
|
|
44
44
|
}
|
|
45
45
|
}, children);
|
|
@@ -66,7 +66,7 @@ var withMessageOverlayContext = function withMessageOverlayContext(Component) {
|
|
|
66
66
|
__self: _this,
|
|
67
67
|
__source: {
|
|
68
68
|
fileName: _jsxFileName,
|
|
69
|
-
lineNumber:
|
|
69
|
+
lineNumber: 137,
|
|
70
70
|
columnNumber: 12
|
|
71
71
|
}
|
|
72
72
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MessageOverlayContext.tsx"],"names":["MessageOverlayContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","MessageOverlayProvider","children","value","messageOverlayContext","useMessageOverlayContext","contextValue","Error","withMessageOverlayContext","Component","WithMessageOverlayContextComponent","props","messageContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"sources":["MessageOverlayContext.tsx"],"names":["MessageOverlayContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","MessageOverlayProvider","children","value","messageOverlayContext","useMessageOverlayContext","contextValue","Error","withMessageOverlayContext","Component","WithMessageOverlayContextComponent","props","messageContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAMA;;AAiBA;;AAEA;;AACA;;;;;;;;;AAwDO,IAAMA,qBAAqB,GAAGC,kBAAMC,aAAN,CACnCC,mDADmC,CAA9B;;;;AAIA,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAyB,OAO/B;AAAA,MAJLC,QAIK,QAJLA,QAIK;AAAA,MAHLC,KAGK,QAHLA,KAGK;AACL,MAAMC,qBAAqB,GAAG,4CAAmBD,KAAnB,CAA9B;AACA,SACE,gCAAC,qBAAD,CAAuB,QAAvB;AACE,IAAA,KAAK,EAAEC,qBADT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAGGF,QAHH,CADF;AAOD,CAhBM;;;;AAkBA,IAAMG,wBAAwB,GAAG,SAA3BA,wBAA2B,GAEjC;AACL,MAAMC,YAAY,GAAG,uBACnBT,qBADmB,CAArB;;AAIA,MAAIS,YAAY,KAAKN,mDAAjB,IAA+C,CAAC,2CAApD,EAAyE;AACvE,UAAM,IAAIO,KAAJ,0PAAN;AAGD;;AAED,SAAOD,YAAP;AACD,CAdM;;;;AAqBA,IAAME,yBAAyB,GAAG,SAA5BA,yBAA4B,CAIvCC,SAJuC,EAKqC;AAC5E,MAAMC,kCAAkC,GAAG,SAArCA,kCAAqC,CACzCC,KADyC,EAEtC;AACH,QAAMC,cAAc,GAAGP,wBAAwB,EAA/C;AAEA,WAAO,gCAAC,SAAD,gCAAgBM,KAAhB,EAAiCC,cAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,kCAAkC,CAACG,WAAnC,iCAA6E,oCAC3EJ,SAD2E,CAA7E;AAGA,SAAOC,kCAAP;AACD,CAjBM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ImageProps } from 'react-native';\n\nimport type { Attachment, TranslationLanguages } from 'stream-chat';\n\nimport { useResettableState } from './hooks/useResettableState';\n\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';\nimport type {\n MessageActionListItemProps,\n MessageActionType,\n} from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';\nimport type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { ChatContextValue } from '../chatContext/ChatContext';\nimport type { Alignment, MessageContextValue } from '../messageContext/MessageContext';\nimport type { MessagesContextValue } from '../messagesContext/MessagesContext';\nimport type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type MessageOverlayData<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n alignment?: Alignment;\n chatContext?: ChatContextValue<StreamChatGenerics>;\n clientId?: string;\n files?: Attachment<StreamChatGenerics>[];\n groupStyles?: GroupType[];\n handleReaction?: (reactionType: string) => Promise<void>;\n ImageComponent?: React.ComponentType<ImageProps>;\n images?: Attachment<StreamChatGenerics>[];\n message?: MessageType<StreamChatGenerics>;\n messageActions?: MessageActionType[];\n messageContext?: MessageContextValue<StreamChatGenerics>;\n messageReactionTitle?: string;\n messagesContext?: MessagesContextValue<StreamChatGenerics>;\n onlyEmojis?: boolean;\n otherAttachments?: Attachment<StreamChatGenerics>[];\n OverlayReactionList?: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n ownCapabilities?: OwnCapabilitiesContextValue;\n supportedReactions?: ReactionData[];\n threadList?: boolean;\n userLanguage?: TranslationLanguages;\n videos?: Attachment<StreamChatGenerics>[];\n};\n\nexport type MessageOverlayContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay.\n *\n * **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/MessageActions.tsx)\n */\n MessageActionList: React.ComponentType<MessageActionListProps<StreamChatGenerics>>;\n MessageActionListItem: React.ComponentType<MessageActionListItemProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactionList.tsx)\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reactions list](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png), in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactions.tsx)\n */\n OverlayReactions: React.ComponentType<OverlayReactionsProps<StreamChatGenerics>>;\n OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;\n reset: () => void;\n setData: React.Dispatch<React.SetStateAction<MessageOverlayData<StreamChatGenerics>>>;\n data?: MessageOverlayData<StreamChatGenerics>;\n};\n\nexport const MessageOverlayContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as MessageOverlayContextValue,\n);\n\nexport const MessageOverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageOverlayContextValue<StreamChatGenerics>;\n}>) => {\n const messageOverlayContext = useResettableState(value);\n return (\n <MessageOverlayContext.Provider\n value={messageOverlayContext as unknown as MessageOverlayContextValue}\n >\n {children}\n </MessageOverlayContext.Provider>\n );\n};\n\nexport const useMessageOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n MessageOverlayContext,\n ) as unknown as MessageOverlayContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessageOverlayContext hook was called outside the MessageOverlayContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessageOverlayContext\n * typing is desired while using the HOC withMessageOverlayContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageOverlayContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>> => {\n const WithMessageOverlayContextComponent = (\n props: Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageOverlayContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageOverlayContextComponent.displayName = `WithMessageOverlayContext${getDisplayName(\n Component,\n )}`;\n return WithMessageOverlayContextComponent;\n};\n"]}
|
|
@@ -15,6 +15,8 @@ var _reactNative = require("react-native");
|
|
|
15
15
|
|
|
16
16
|
var _openUrlSafely = require("./utils/openUrlSafely");
|
|
17
17
|
|
|
18
|
+
var _ChatContext = require("../../contexts/chatContext/ChatContext");
|
|
19
|
+
|
|
18
20
|
var _MessageContext = require("../../contexts/messageContext/MessageContext");
|
|
19
21
|
|
|
20
22
|
var _MessagesContext = require("../../contexts/messagesContext/MessagesContext");
|
|
@@ -25,6 +27,8 @@ var _Play = require("../../icons/Play");
|
|
|
25
27
|
|
|
26
28
|
var _utils = require("../../utils/utils");
|
|
27
29
|
|
|
30
|
+
var _ImageBackground = require("../ImageBackground");
|
|
31
|
+
|
|
28
32
|
var _excluded = ["description", "title"];
|
|
29
33
|
|
|
30
34
|
var _this = this,
|
|
@@ -90,6 +94,8 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
90
94
|
CardCover = props.CardCover,
|
|
91
95
|
CardFooter = props.CardFooter,
|
|
92
96
|
CardHeader = props.CardHeader,
|
|
97
|
+
_props$ImageComponent = props.ImageComponent,
|
|
98
|
+
ImageComponent = _props$ImageComponent === void 0 ? _reactNative.Image : _props$ImageComponent,
|
|
93
99
|
image_url = props.image_url,
|
|
94
100
|
og_scrape_url = props.og_scrape_url,
|
|
95
101
|
_onLongPress = props.onLongPress,
|
|
@@ -179,31 +185,32 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
179
185
|
__self: _this,
|
|
180
186
|
__source: {
|
|
181
187
|
fileName: _jsxFileName,
|
|
182
|
-
lineNumber:
|
|
188
|
+
lineNumber: 166,
|
|
183
189
|
columnNumber: 5
|
|
184
190
|
}
|
|
185
191
|
}), CardHeader && _react["default"].createElement(CardHeader, (0, _extends2["default"])({}, props, {
|
|
186
192
|
__self: _this,
|
|
187
193
|
__source: {
|
|
188
194
|
fileName: _jsxFileName,
|
|
189
|
-
lineNumber:
|
|
195
|
+
lineNumber: 201,
|
|
190
196
|
columnNumber: 22
|
|
191
197
|
}
|
|
192
198
|
})), CardCover && _react["default"].createElement(CardCover, (0, _extends2["default"])({}, props, {
|
|
193
199
|
__self: _this,
|
|
194
200
|
__source: {
|
|
195
201
|
fileName: _jsxFileName,
|
|
196
|
-
lineNumber:
|
|
202
|
+
lineNumber: 202,
|
|
197
203
|
columnNumber: 21
|
|
198
204
|
}
|
|
199
205
|
})), uri && !CardCover && _react["default"].createElement(_reactNative.View, {
|
|
200
206
|
__self: _this,
|
|
201
207
|
__source: {
|
|
202
208
|
fileName: _jsxFileName,
|
|
203
|
-
lineNumber:
|
|
209
|
+
lineNumber: 204,
|
|
204
210
|
columnNumber: 9
|
|
205
211
|
}
|
|
206
|
-
}, _react["default"].createElement(
|
|
212
|
+
}, _react["default"].createElement(_ImageBackground.ImageBackground, {
|
|
213
|
+
ImageComponent: ImageComponent,
|
|
207
214
|
imageStyle: styles.cardCover,
|
|
208
215
|
resizeMode: "cover",
|
|
209
216
|
source: {
|
|
@@ -213,7 +220,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
213
220
|
__self: _this,
|
|
214
221
|
__source: {
|
|
215
222
|
fileName: _jsxFileName,
|
|
216
|
-
lineNumber:
|
|
223
|
+
lineNumber: 205,
|
|
217
224
|
columnNumber: 11
|
|
218
225
|
}
|
|
219
226
|
}, isVideoCard ? _react["default"].createElement(_reactNative.View, {
|
|
@@ -223,7 +230,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
223
230
|
__self: _this,
|
|
224
231
|
__source: {
|
|
225
232
|
fileName: _jsxFileName,
|
|
226
|
-
lineNumber:
|
|
233
|
+
lineNumber: 213,
|
|
227
234
|
columnNumber: 15
|
|
228
235
|
}
|
|
229
236
|
}, _react["default"].createElement(_Play.Play, {
|
|
@@ -233,7 +240,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
233
240
|
__self: _this,
|
|
234
241
|
__source: {
|
|
235
242
|
fileName: _jsxFileName,
|
|
236
|
-
lineNumber:
|
|
243
|
+
lineNumber: 214,
|
|
237
244
|
columnNumber: 17
|
|
238
245
|
}
|
|
239
246
|
})) : null), author_name && _react["default"].createElement(_reactNative.View, {
|
|
@@ -241,7 +248,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
241
248
|
__self: _this,
|
|
242
249
|
__source: {
|
|
243
250
|
fileName: _jsxFileName,
|
|
244
|
-
lineNumber:
|
|
251
|
+
lineNumber: 219,
|
|
245
252
|
columnNumber: 13
|
|
246
253
|
}
|
|
247
254
|
}, _react["default"].createElement(_reactNative.View, {
|
|
@@ -251,7 +258,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
251
258
|
__self: _this,
|
|
252
259
|
__source: {
|
|
253
260
|
fileName: _jsxFileName,
|
|
254
|
-
lineNumber:
|
|
261
|
+
lineNumber: 220,
|
|
255
262
|
columnNumber: 15
|
|
256
263
|
}
|
|
257
264
|
}, _react["default"].createElement(_reactNative.Text, {
|
|
@@ -261,14 +268,14 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
261
268
|
__self: _this,
|
|
262
269
|
__source: {
|
|
263
270
|
fileName: _jsxFileName,
|
|
264
|
-
lineNumber:
|
|
271
|
+
lineNumber: 228,
|
|
265
272
|
columnNumber: 17
|
|
266
273
|
}
|
|
267
274
|
}, author_name)))), CardFooter ? _react["default"].createElement(CardFooter, (0, _extends2["default"])({}, props, {
|
|
268
275
|
__self: _this,
|
|
269
276
|
__source: {
|
|
270
277
|
fileName: _jsxFileName,
|
|
271
|
-
lineNumber:
|
|
278
|
+
lineNumber: 244,
|
|
272
279
|
columnNumber: 9
|
|
273
280
|
}
|
|
274
281
|
})) : _react["default"].createElement(_reactNative.View, {
|
|
@@ -276,7 +283,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
276
283
|
__self: _this,
|
|
277
284
|
__source: {
|
|
278
285
|
fileName: _jsxFileName,
|
|
279
|
-
lineNumber:
|
|
286
|
+
lineNumber: 246,
|
|
280
287
|
columnNumber: 9
|
|
281
288
|
}
|
|
282
289
|
}, _react["default"].createElement(_reactNative.View, {
|
|
@@ -288,7 +295,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
288
295
|
__self: _this,
|
|
289
296
|
__source: {
|
|
290
297
|
fileName: _jsxFileName,
|
|
291
|
-
lineNumber:
|
|
298
|
+
lineNumber: 247,
|
|
292
299
|
columnNumber: 11
|
|
293
300
|
}
|
|
294
301
|
}, !uri && author_name && _react["default"].createElement(_reactNative.Text, {
|
|
@@ -298,7 +305,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
298
305
|
__self: _this,
|
|
299
306
|
__source: {
|
|
300
307
|
fileName: _jsxFileName,
|
|
301
|
-
lineNumber:
|
|
308
|
+
lineNumber: 256,
|
|
302
309
|
columnNumber: 15
|
|
303
310
|
}
|
|
304
311
|
}, author_name), title && _react["default"].createElement(_reactNative.Text, {
|
|
@@ -309,7 +316,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
309
316
|
__self: _this,
|
|
310
317
|
__source: {
|
|
311
318
|
fileName: _jsxFileName,
|
|
312
|
-
lineNumber:
|
|
319
|
+
lineNumber: 268,
|
|
313
320
|
columnNumber: 15
|
|
314
321
|
}
|
|
315
322
|
}, title), text && _react["default"].createElement(_reactNative.Text, {
|
|
@@ -320,7 +327,7 @@ var CardWithContext = function CardWithContext(props) {
|
|
|
320
327
|
__self: _this,
|
|
321
328
|
__source: {
|
|
322
329
|
fileName: _jsxFileName,
|
|
323
|
-
lineNumber:
|
|
330
|
+
lineNumber: 276,
|
|
324
331
|
columnNumber: 15
|
|
325
332
|
}
|
|
326
333
|
}, text))));
|
|
@@ -331,6 +338,9 @@ var MemoizedCard = _react["default"].memo(CardWithContext, function () {
|
|
|
331
338
|
});
|
|
332
339
|
|
|
333
340
|
var Card = function Card(props) {
|
|
341
|
+
var _useChatContext = (0, _ChatContext.useChatContext)(),
|
|
342
|
+
ImageComponent = _useChatContext.ImageComponent;
|
|
343
|
+
|
|
334
344
|
var _useMessageContext = (0, _MessageContext.useMessageContext)(),
|
|
335
345
|
message = _useMessageContext.message,
|
|
336
346
|
onLongPress = _useMessageContext.onLongPress,
|
|
@@ -351,6 +361,7 @@ var Card = function Card(props) {
|
|
|
351
361
|
CardFooter: CardFooter,
|
|
352
362
|
CardHeader: CardHeader,
|
|
353
363
|
channelId: message.cid,
|
|
364
|
+
ImageComponent: ImageComponent,
|
|
354
365
|
messageId: message.id,
|
|
355
366
|
onLongPress: onLongPress,
|
|
356
367
|
onPress: onPress,
|
|
@@ -360,7 +371,7 @@ var Card = function Card(props) {
|
|
|
360
371
|
__self: _this,
|
|
361
372
|
__source: {
|
|
362
373
|
fileName: _jsxFileName,
|
|
363
|
-
lineNumber:
|
|
374
|
+
lineNumber: 319,
|
|
364
375
|
columnNumber: 5
|
|
365
376
|
}
|
|
366
377
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Card.tsx"],"names":["styles","StyleSheet","create","authorName","fontSize","fontWeight","authorNameContainer","borderTopRightRadius","paddingHorizontal","paddingTop","authorNameFooter","padding","authorNameMask","bottom","left","position","cardCover","alignItems","borderRadius","height","justifyContent","marginHorizontal","cardFooter","flexDirection","container","overflow","width","description","playButtonStyle","elevation","title","CardWithContext","props","additionalTouchableProps","author_name","CardCover","CardFooter","CardHeader","image_url","og_scrape_url","onLongPress","onPress","onPressIn","preventPress","stylesProp","text","thumb_url","type","theme","colors","accent_blue","black","blue_alice","transparent","white","messageSimple","card","authorNameFooterContainer","cover","footer","titleStyle","footerStyle","noURI","roundedView","playIcon","uri","defaultOnPress","isVideoCard","event","additionalInfo","url","emitter","defaultHandler","backgroundColor","color","borderLeftColor","MemoizedCard","React","memo","Card","message","id","updated_at","channelId","cid","messageId","displayName"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAcA;;AAEA;;AAIA;;AAIA;;AACA;;AAEA;;;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,QAAQ,EAAE,IAAZ;AAAkBC,IAAAA,UAAU,EAAE;AAA9B,GADmB;AAE/BC,EAAAA,mBAAmB,EAAE;AACnBC,IAAAA,oBAAoB,EAAE,EADH;AAEnBC,IAAAA,iBAAiB,EAAE,CAFA;AAGnBC,IAAAA,UAAU,EAAE;AAHO,GAFU;AAO/BC,EAAAA,gBAAgB,EAAE;AAChBN,IAAAA,QAAQ,EAAE,IADM;AAEhBC,IAAAA,UAAU,EAAE,KAFI;AAGhBM,IAAAA,OAAO,EAAE;AAHO,GAPa;AAY/BC,EAAAA,cAAc,EAAE;AACdC,IAAAA,MAAM,EAAE,CADM;AAEdC,IAAAA,IAAI,EAAE,CAFQ;AAGdC,IAAAA,QAAQ,EAAE;AAHI,GAZe;AAiB/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,UAAU,EAAE,QADH;AAETC,IAAAA,YAAY,EAAE,CAFL;AAGTC,IAAAA,MAAM,EAAE,GAHC;AAITC,IAAAA,cAAc,EAAE,QAJP;AAKTC,IAAAA,gBAAgB,EAAE;AALT,GAjBoB;AAwB/BC,EAAAA,UAAU,EAAE;AACVC,IAAAA,aAAa,EAAE,KADL;AAEVH,IAAAA,cAAc,EAAE,eAFN;AAGVT,IAAAA,OAAO,EAAE;AAHC,GAxBmB;AA6B/Ba,EAAAA,SAAS,EAAE;AACTC,IAAAA,QAAQ,EAAE,QADD;AAETC,IAAAA,KAAK,EAAE;AAFE,GA7BoB;AAiC/BC,EAAAA,WAAW,EAAE;AACXvB,IAAAA,QAAQ,EAAE,EADC;AAEXiB,IAAAA,gBAAgB,EAAE;AAFP,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SAXJ;AAYIC,IAAAA,YAAY,EAAZA;AAZJ,KAcMX,KAdN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KADF;AAkBD,CA5BM;;;AA8BP+C,IAAI,CAACO,WAAL,GAAmB,2BAAnB","sourcesContent":["import React from 'react';\nimport {\n ImageBackground,\n ImageStyle,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n TouchableOpacity,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { openUrlSafely } from './utils/openUrlSafely';\n\nimport {\n MessageContextValue,\n useMessageContext,\n} from '../../contexts/messageContext/MessageContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Play } from '../../icons/Play';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { makeImageCompatibleUrl } from '../../utils/utils';\n\nconst styles = StyleSheet.create({\n authorName: { fontSize: 14.5, fontWeight: '600' },\n authorNameContainer: {\n borderTopRightRadius: 15,\n paddingHorizontal: 8,\n paddingTop: 8,\n },\n authorNameFooter: {\n fontSize: 14.5,\n fontWeight: '600',\n padding: 8,\n },\n authorNameMask: {\n bottom: 0,\n left: 2,\n position: 'absolute',\n },\n cardCover: {\n alignItems: 'center',\n borderRadius: 8,\n height: 140,\n justifyContent: 'center',\n marginHorizontal: 2,\n },\n cardFooter: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 10,\n },\n container: {\n overflow: 'hidden',\n width: 256,\n },\n description: {\n fontSize: 12,\n marginHorizontal: 8,\n },\n playButtonStyle: {\n alignItems: 'center',\n borderRadius: 50,\n elevation: 2,\n height: 36,\n justifyContent: 'center',\n width: 36,\n },\n title: {\n fontSize: 12,\n marginHorizontal: 8,\n },\n});\n\nexport type CardPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Attachment<StreamChatGenerics> &\n Pick<\n MessageContextValue<StreamChatGenerics>,\n 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'\n > &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n 'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'\n > & {\n channelId: string | undefined;\n messageId: string | undefined;\n styles?: Partial<{\n authorName: StyleProp<TextStyle>;\n authorNameContainer: StyleProp<ViewStyle>;\n authorNameFooter: StyleProp<TextStyle>;\n authorNameFooterContainer: StyleProp<ViewStyle>;\n authorNameMask: StyleProp<ViewStyle>;\n cardCover: StyleProp<ImageStyle>;\n cardFooter: StyleProp<ViewStyle>;\n container: StyleProp<ViewStyle>;\n description: StyleProp<TextStyle>;\n title: StyleProp<TextStyle>;\n }>;\n };\n\nconst CardWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: CardPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n additionalTouchableProps,\n author_name,\n CardCover,\n CardFooter,\n CardHeader,\n image_url,\n og_scrape_url,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n styles: stylesProp = {},\n text,\n thumb_url,\n title,\n type,\n } = props;\n\n const {\n theme: {\n colors: { accent_blue, black, blue_alice, transparent, white },\n messageSimple: {\n card: {\n authorName,\n authorNameContainer,\n authorNameFooter,\n authorNameFooterContainer,\n authorNameMask,\n container,\n cover,\n footer: { description, title: titleStyle, ...footerStyle },\n noURI,\n playButtonStyle: { roundedView },\n playIcon: { height, width },\n },\n },\n },\n } = useTheme();\n\n const uri = image_url || thumb_url;\n\n const defaultOnPress = () => openUrlSafely(og_scrape_url || uri);\n\n const isVideoCard = type === 'video' && og_scrape_url;\n\n return (\n <TouchableOpacity\n disabled={preventPress}\n onLongPress={(event) => {\n if (onLongPress) {\n onLongPress({\n additionalInfo: { url: og_scrape_url },\n emitter: 'card',\n event,\n });\n }\n }}\n onPress={(event) => {\n if (onPress) {\n onPress({\n additionalInfo: { url: og_scrape_url },\n defaultHandler: defaultOnPress,\n emitter: 'card',\n event,\n });\n }\n }}\n onPressIn={(event) => {\n if (onPressIn) {\n onPressIn({\n additionalInfo: { url: og_scrape_url },\n defaultHandler: defaultOnPress,\n emitter: 'card',\n event,\n });\n }\n }}\n style={[styles.container, container, stylesProp.container]}\n testID='card-attachment'\n {...additionalTouchableProps}\n >\n {CardHeader && <CardHeader {...props} />}\n {CardCover && <CardCover {...props} />}\n {uri && !CardCover && (\n <View>\n <ImageBackground\n imageStyle={styles.cardCover}\n resizeMode='cover'\n source={{ uri: makeImageCompatibleUrl(uri) }}\n style={[styles.cardCover, cover, stylesProp.cardCover]}\n >\n {isVideoCard ? (\n <View style={[styles.playButtonStyle, roundedView, { backgroundColor: white }]}>\n <Play height={height} pathFill={black} width={width} />\n </View>\n ) : null}\n </ImageBackground>\n {author_name && (\n <View style={[styles.authorNameMask, authorNameMask, stylesProp.authorNameMask]}>\n <View\n style={[\n styles.authorNameContainer,\n { backgroundColor: blue_alice },\n authorNameContainer,\n stylesProp.authorNameContainer,\n ]}\n >\n <Text\n style={[\n styles.authorName,\n { color: accent_blue },\n authorName,\n stylesProp.authorName,\n ]}\n >\n {author_name}\n </Text>\n </View>\n </View>\n )}\n </View>\n )}\n {CardFooter ? (\n <CardFooter {...props} />\n ) : (\n <View style={[styles.cardFooter, footerStyle, stylesProp.cardFooter]}>\n <View\n style={[\n authorNameFooterContainer,\n { backgroundColor: transparent },\n !uri ? { borderLeftColor: accent_blue, ...noURI } : {},\n stylesProp.authorNameFooterContainer,\n ]}\n >\n {!uri && author_name && (\n <Text\n style={[\n styles.authorNameFooter,\n { color: accent_blue },\n authorNameFooter,\n stylesProp.authorNameFooter,\n ]}\n >\n {author_name}\n </Text>\n )}\n {title && (\n <Text\n numberOfLines={1}\n style={[styles.title, { color: black }, titleStyle, stylesProp.title]}\n >\n {title}\n </Text>\n )}\n {text && (\n <Text\n numberOfLines={3}\n style={[styles.description, { color: black }, description, stylesProp.description]}\n >\n {text}\n </Text>\n )}\n </View>\n </View>\n )}\n </TouchableOpacity>\n );\n};\n\nconst MemoizedCard = React.memo(CardWithContext, () => true) as typeof CardWithContext;\n\nexport type CardProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Attachment<StreamChatGenerics> &\n Partial<\n Pick<MessageContextValue<StreamChatGenerics>, 'onLongPress' | 'onPress' | 'onPressIn'> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n 'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'\n >\n >;\n\n/**\n * UI component for card in attachments.\n */\nexport const Card = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: CardProps<StreamChatGenerics>,\n) => {\n const { message, onLongPress, onPress, onPressIn, preventPress } =\n useMessageContext<StreamChatGenerics>();\n const { additionalTouchableProps, CardCover, CardFooter, CardHeader } =\n useMessagesContext<StreamChatGenerics>();\n\n return (\n <MemoizedCard\n key={`${message?.id}${message?.updated_at}`} // press listeners must change on message update, updating key ensures this\n {...{\n additionalTouchableProps,\n CardCover,\n CardFooter,\n CardHeader,\n channelId: message.cid,\n messageId: message.id,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n }}\n {...props}\n />\n );\n};\n\nCard.displayName = 'Card{messageSimple{card}}';\n"]}
|
|
1
|
+
{"version":3,"sources":["Card.tsx"],"names":["styles","StyleSheet","create","authorName","fontSize","fontWeight","authorNameContainer","borderTopRightRadius","paddingHorizontal","paddingTop","authorNameFooter","padding","authorNameMask","bottom","left","position","cardCover","alignItems","borderRadius","height","justifyContent","marginHorizontal","cardFooter","flexDirection","container","overflow","width","description","playButtonStyle","elevation","title","CardWithContext","props","additionalTouchableProps","author_name","CardCover","CardFooter","CardHeader","ImageComponent","Image","image_url","og_scrape_url","onLongPress","onPress","onPressIn","preventPress","stylesProp","text","thumb_url","type","theme","colors","accent_blue","black","blue_alice","transparent","white","messageSimple","card","authorNameFooterContainer","cover","footer","titleStyle","footerStyle","noURI","roundedView","playIcon","uri","defaultOnPress","isVideoCard","event","additionalInfo","url","emitter","defaultHandler","backgroundColor","color","borderLeftColor","MemoizedCard","React","memo","Card","message","id","updated_at","channelId","cid","messageId","displayName"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAcA;;AAEA;;AAEA;;AAIA;;AAIA;;AACA;;AAEA;;AACA;;;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,QAAQ,EAAE,IAAZ;AAAkBC,IAAAA,UAAU,EAAE;AAA9B,GADmB;AAE/BC,EAAAA,mBAAmB,EAAE;AACnBC,IAAAA,oBAAoB,EAAE,EADH;AAEnBC,IAAAA,iBAAiB,EAAE,CAFA;AAGnBC,IAAAA,UAAU,EAAE;AAHO,GAFU;AAO/BC,EAAAA,gBAAgB,EAAE;AAChBN,IAAAA,QAAQ,EAAE,IADM;AAEhBC,IAAAA,UAAU,EAAE,KAFI;AAGhBM,IAAAA,OAAO,EAAE;AAHO,GAPa;AAY/BC,EAAAA,cAAc,EAAE;AACdC,IAAAA,MAAM,EAAE,CADM;AAEdC,IAAAA,IAAI,EAAE,CAFQ;AAGdC,IAAAA,QAAQ,EAAE;AAHI,GAZe;AAiB/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,UAAU,EAAE,QADH;AAETC,IAAAA,YAAY,EAAE,CAFL;AAGTC,IAAAA,MAAM,EAAE,GAHC;AAITC,IAAAA,cAAc,EAAE,QAJP;AAKTC,IAAAA,gBAAgB,EAAE;AALT,GAjBoB;AAwB/BC,EAAAA,UAAU,EAAE;AACVC,IAAAA,aAAa,EAAE,KADL;AAEVH,IAAAA,cAAc,EAAE,eAFN;AAGVT,IAAAA,OAAO,EAAE;AAHC,GAxBmB;AA6B/Ba,EAAAA,SAAS,EAAE;AACTC,IAAAA,QAAQ,EAAE,QADD;AAETC,IAAAA,KAAK,EAAE;AAFE,GA7BoB;AAi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,SAJJ;AAKIC,IAAAA,UAAU,EAAVA,UALJ;AAMIC,IAAAA,UAAU,EAAVA,UANJ;AAOIgD,IAAAA,SAAS,EAAEH,OAAO,CAACI,GAPvB;AAQIhD,IAAAA,cAAc,EAAdA,cARJ;AASIiD,IAAAA,SAAS,EAAEL,OAAO,CAACC,EATvB;AAUIzC,IAAAA,WAAW,EAAXA,WAVJ;AAWIC,IAAAA,OAAO,EAAPA,OAXJ;AAYIC,IAAAA,SAAS,EAATA,SAZJ;AAaIC,IAAAA,YAAY,EAAZA;AAbJ,KAeMb,KAfN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KADF;AAmBD,CA9BM;;;AAgCPiD,IAAI,CAACO,WAAL,GAAmB,2BAAnB","sourcesContent":["import React from 'react';\nimport {\n Image,\n ImageStyle,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n TouchableOpacity,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { openUrlSafely } from './utils/openUrlSafely';\n\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\n\nimport {\n MessageContextValue,\n useMessageContext,\n} from '../../contexts/messageContext/MessageContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Play } from '../../icons/Play';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { makeImageCompatibleUrl } from '../../utils/utils';\nimport { ImageBackground } from '../ImageBackground';\n\nconst styles = StyleSheet.create({\n authorName: { fontSize: 14.5, fontWeight: '600' },\n authorNameContainer: {\n borderTopRightRadius: 15,\n paddingHorizontal: 8,\n paddingTop: 8,\n },\n authorNameFooter: {\n fontSize: 14.5,\n fontWeight: '600',\n padding: 8,\n },\n authorNameMask: {\n bottom: 0,\n left: 2,\n position: 'absolute',\n },\n cardCover: {\n alignItems: 'center',\n borderRadius: 8,\n height: 140,\n justifyContent: 'center',\n marginHorizontal: 2,\n },\n cardFooter: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 10,\n },\n container: {\n overflow: 'hidden',\n width: 256,\n },\n description: {\n fontSize: 12,\n marginHorizontal: 8,\n },\n playButtonStyle: {\n alignItems: 'center',\n borderRadius: 50,\n elevation: 2,\n height: 36,\n justifyContent: 'center',\n width: 36,\n },\n title: {\n fontSize: 12,\n marginHorizontal: 8,\n },\n});\n\nexport type CardPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Attachment<StreamChatGenerics> &\n Pick<ChatContextValue, 'ImageComponent'> &\n Pick<\n MessageContextValue<StreamChatGenerics>,\n 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'\n > &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n 'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'\n > & {\n channelId: string | undefined;\n messageId: string | undefined;\n styles?: Partial<{\n authorName: StyleProp<TextStyle>;\n authorNameContainer: StyleProp<ViewStyle>;\n authorNameFooter: StyleProp<TextStyle>;\n authorNameFooterContainer: StyleProp<ViewStyle>;\n authorNameMask: StyleProp<ViewStyle>;\n cardCover: StyleProp<ImageStyle>;\n cardFooter: StyleProp<ViewStyle>;\n container: StyleProp<ViewStyle>;\n description: StyleProp<TextStyle>;\n title: StyleProp<TextStyle>;\n }>;\n };\n\nconst CardWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: CardPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n additionalTouchableProps,\n author_name,\n CardCover,\n CardFooter,\n CardHeader,\n ImageComponent = Image,\n image_url,\n og_scrape_url,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n styles: stylesProp = {},\n text,\n thumb_url,\n title,\n type,\n } = props;\n\n const {\n theme: {\n colors: { accent_blue, black, blue_alice, transparent, white },\n messageSimple: {\n card: {\n authorName,\n authorNameContainer,\n authorNameFooter,\n authorNameFooterContainer,\n authorNameMask,\n container,\n cover,\n footer: { description, title: titleStyle, ...footerStyle },\n noURI,\n playButtonStyle: { roundedView },\n playIcon: { height, width },\n },\n },\n },\n } = useTheme();\n\n const uri = image_url || thumb_url;\n\n const defaultOnPress = () => openUrlSafely(og_scrape_url || uri);\n\n const isVideoCard = type === 'video' && og_scrape_url;\n\n return (\n <TouchableOpacity\n disabled={preventPress}\n onLongPress={(event) => {\n if (onLongPress) {\n onLongPress({\n additionalInfo: { url: og_scrape_url },\n emitter: 'card',\n event,\n });\n }\n }}\n onPress={(event) => {\n if (onPress) {\n onPress({\n additionalInfo: { url: og_scrape_url },\n defaultHandler: defaultOnPress,\n emitter: 'card',\n event,\n });\n }\n }}\n onPressIn={(event) => {\n if (onPressIn) {\n onPressIn({\n additionalInfo: { url: og_scrape_url },\n defaultHandler: defaultOnPress,\n emitter: 'card',\n event,\n });\n }\n }}\n style={[styles.container, container, stylesProp.container]}\n testID='card-attachment'\n {...additionalTouchableProps}\n >\n {CardHeader && <CardHeader {...props} />}\n {CardCover && <CardCover {...props} />}\n {uri && !CardCover && (\n <View>\n <ImageBackground\n ImageComponent={ImageComponent}\n imageStyle={styles.cardCover}\n resizeMode='cover'\n source={{ uri: makeImageCompatibleUrl(uri) }}\n style={[styles.cardCover, cover, stylesProp.cardCover]}\n >\n {isVideoCard ? (\n <View style={[styles.playButtonStyle, roundedView, { backgroundColor: white }]}>\n <Play height={height} pathFill={black} width={width} />\n </View>\n ) : null}\n </ImageBackground>\n {author_name && (\n <View style={[styles.authorNameMask, authorNameMask, stylesProp.authorNameMask]}>\n <View\n style={[\n styles.authorNameContainer,\n { backgroundColor: blue_alice },\n authorNameContainer,\n stylesProp.authorNameContainer,\n ]}\n >\n <Text\n style={[\n styles.authorName,\n { color: accent_blue },\n authorName,\n stylesProp.authorName,\n ]}\n >\n {author_name}\n </Text>\n </View>\n </View>\n )}\n </View>\n )}\n {CardFooter ? (\n <CardFooter {...props} />\n ) : (\n <View style={[styles.cardFooter, footerStyle, stylesProp.cardFooter]}>\n <View\n style={[\n authorNameFooterContainer,\n { backgroundColor: transparent },\n !uri ? { borderLeftColor: accent_blue, ...noURI } : {},\n stylesProp.authorNameFooterContainer,\n ]}\n >\n {!uri && author_name && (\n <Text\n style={[\n styles.authorNameFooter,\n { color: accent_blue },\n authorNameFooter,\n stylesProp.authorNameFooter,\n ]}\n >\n {author_name}\n </Text>\n )}\n {title && (\n <Text\n numberOfLines={1}\n style={[styles.title, { color: black }, titleStyle, stylesProp.title]}\n >\n {title}\n </Text>\n )}\n {text && (\n <Text\n numberOfLines={3}\n style={[styles.description, { color: black }, description, stylesProp.description]}\n >\n {text}\n </Text>\n )}\n </View>\n </View>\n )}\n </TouchableOpacity>\n );\n};\n\nconst MemoizedCard = React.memo(CardWithContext, () => true) as typeof CardWithContext;\n\nexport type CardProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Attachment<StreamChatGenerics> &\n Partial<\n Pick<ChatContextValue<StreamChatGenerics>, 'ImageComponent'> &\n Pick<MessageContextValue<StreamChatGenerics>, 'onLongPress' | 'onPress' | 'onPressIn'> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n 'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'\n >\n >;\n\n/**\n * UI component for card in attachments.\n */\nexport const Card = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: CardProps<StreamChatGenerics>,\n) => {\n const { ImageComponent } = useChatContext<StreamChatGenerics>();\n const { message, onLongPress, onPress, onPressIn, preventPress } =\n useMessageContext<StreamChatGenerics>();\n const { additionalTouchableProps, CardCover, CardFooter, CardHeader } =\n useMessagesContext<StreamChatGenerics>();\n\n return (\n <MemoizedCard\n key={`${message?.id}${message?.updated_at}`} // press listeners must change on message update, updating key ensures this\n {...{\n additionalTouchableProps,\n CardCover,\n CardFooter,\n CardHeader,\n channelId: message.cid,\n ImageComponent,\n messageId: message.id,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n }}\n {...props}\n />\n );\n};\n\nCard.displayName = 'Card{messageSimple{card}}';\n"]}
|
|
@@ -46,10 +46,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
46
46
|
|
|
47
47
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
48
48
|
|
|
49
|
-
var MemoizedGalleryImage = _react["default"].memo(_GalleryImage.GalleryImage, function (prevProps, nextProps) {
|
|
50
|
-
return (0, _utils.getUrlWithoutParams)(prevProps.uri) === (0, _utils.getUrlWithoutParams)(nextProps.uri);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
49
|
var styles = _reactNative.StyleSheet.create({
|
|
54
50
|
errorTextSize: {
|
|
55
51
|
fontSize: 10
|
|
@@ -167,7 +163,7 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
167
163
|
__self: _this,
|
|
168
164
|
__source: {
|
|
169
165
|
fileName: _jsxFileName,
|
|
170
|
-
lineNumber:
|
|
166
|
+
lineNumber: 186,
|
|
171
167
|
columnNumber: 5
|
|
172
168
|
}
|
|
173
169
|
}, thumbnailGrid.map(function (rows, colIndex) {
|
|
@@ -181,7 +177,7 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
181
177
|
__self: _this,
|
|
182
178
|
__source: {
|
|
183
179
|
fileName: _jsxFileName,
|
|
184
|
-
lineNumber:
|
|
180
|
+
lineNumber: 203,
|
|
185
181
|
columnNumber: 11
|
|
186
182
|
}
|
|
187
183
|
}, rows.map(function (thumbnail, rowIndex) {
|
|
@@ -231,7 +227,7 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
231
227
|
__self: _this,
|
|
232
228
|
__source: {
|
|
233
229
|
fileName: _jsxFileName,
|
|
234
|
-
lineNumber:
|
|
230
|
+
lineNumber: 235,
|
|
235
231
|
columnNumber: 17
|
|
236
232
|
}
|
|
237
233
|
});
|
|
@@ -335,7 +331,7 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
335
331
|
__self: _this,
|
|
336
332
|
__source: {
|
|
337
333
|
fileName: _jsxFileName,
|
|
338
|
-
lineNumber:
|
|
334
|
+
lineNumber: 359,
|
|
339
335
|
columnNumber: 5
|
|
340
336
|
}
|
|
341
337
|
}), thumbnail.type === 'video' ? _react["default"].createElement(VideoThumbnail, {
|
|
@@ -347,7 +343,7 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
347
343
|
__self: _this,
|
|
348
344
|
__source: {
|
|
349
345
|
fileName: _jsxFileName,
|
|
350
|
-
lineNumber:
|
|
346
|
+
lineNumber: 401,
|
|
351
347
|
columnNumber: 9
|
|
352
348
|
}
|
|
353
349
|
}) : _react["default"].createElement(_reactNative.View, {
|
|
@@ -355,7 +351,7 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
355
351
|
__self: _this,
|
|
356
352
|
__source: {
|
|
357
353
|
fileName: _jsxFileName,
|
|
358
|
-
lineNumber:
|
|
354
|
+
lineNumber: 413,
|
|
359
355
|
columnNumber: 9
|
|
360
356
|
}
|
|
361
357
|
}, _react["default"].createElement(GalleryImageThumbnail, {
|
|
@@ -366,7 +362,7 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
366
362
|
__self: _this,
|
|
367
363
|
__source: {
|
|
368
364
|
fileName: _jsxFileName,
|
|
369
|
-
lineNumber:
|
|
365
|
+
lineNumber: 414,
|
|
370
366
|
columnNumber: 11
|
|
371
367
|
}
|
|
372
368
|
})), colIndex === numOfColumns - 1 && rowIndex === numOfRows - 1 && imagesAndVideos.length > 4 ? _react["default"].createElement(_reactNative.View, {
|
|
@@ -376,7 +372,7 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
376
372
|
__self: _this,
|
|
377
373
|
__source: {
|
|
378
374
|
fileName: _jsxFileName,
|
|
379
|
-
lineNumber:
|
|
375
|
+
lineNumber: 423,
|
|
380
376
|
columnNumber: 9
|
|
381
377
|
}
|
|
382
378
|
}, _react["default"].createElement(_reactNative.Text, {
|
|
@@ -384,7 +380,7 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
384
380
|
__self: _this,
|
|
385
381
|
__source: {
|
|
386
382
|
fileName: _jsxFileName,
|
|
387
|
-
lineNumber:
|
|
383
|
+
lineNumber: 431,
|
|
388
384
|
columnNumber: 11
|
|
389
385
|
}
|
|
390
386
|
}, "+" + (imagesAndVideos.length - 4))) : null);
|
|
@@ -413,7 +409,7 @@ var GalleryImageThumbnail = function GalleryImageThumbnail(_ref2) {
|
|
|
413
409
|
__self: _this,
|
|
414
410
|
__source: {
|
|
415
411
|
fileName: _jsxFileName,
|
|
416
|
-
lineNumber:
|
|
412
|
+
lineNumber: 463,
|
|
417
413
|
columnNumber: 5
|
|
418
414
|
}
|
|
419
415
|
}, isLoadingImageError ? _react["default"].createElement(ImageLoadingFailedIndicator, {
|
|
@@ -421,10 +417,10 @@ var GalleryImageThumbnail = function GalleryImageThumbnail(_ref2) {
|
|
|
421
417
|
__self: _this,
|
|
422
418
|
__source: {
|
|
423
419
|
fileName: _jsxFileName,
|
|
424
|
-
lineNumber:
|
|
420
|
+
lineNumber: 470,
|
|
425
421
|
columnNumber: 9
|
|
426
422
|
}
|
|
427
|
-
}) : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(
|
|
423
|
+
}) : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_GalleryImage.GalleryImage, {
|
|
428
424
|
onError: function onError(error) {
|
|
429
425
|
console.warn(error);
|
|
430
426
|
setLoadingImage(false);
|
|
@@ -445,7 +441,7 @@ var GalleryImageThumbnail = function GalleryImageThumbnail(_ref2) {
|
|
|
445
441
|
__self: _this,
|
|
446
442
|
__source: {
|
|
447
443
|
fileName: _jsxFileName,
|
|
448
|
-
lineNumber:
|
|
444
|
+
lineNumber: 473,
|
|
449
445
|
columnNumber: 11
|
|
450
446
|
}
|
|
451
447
|
}), isLoadingImage && _react["default"].createElement(_reactNative.View, {
|
|
@@ -453,7 +449,7 @@ var GalleryImageThumbnail = function GalleryImageThumbnail(_ref2) {
|
|
|
453
449
|
__self: _this,
|
|
454
450
|
__source: {
|
|
455
451
|
fileName: _jsxFileName,
|
|
456
|
-
lineNumber:
|
|
452
|
+
lineNumber: 493,
|
|
457
453
|
columnNumber: 13
|
|
458
454
|
}
|
|
459
455
|
}, _react["default"].createElement(ImageLoadingIndicator, {
|
|
@@ -461,7 +457,7 @@ var GalleryImageThumbnail = function GalleryImageThumbnail(_ref2) {
|
|
|
461
457
|
__self: _this,
|
|
462
458
|
__source: {
|
|
463
459
|
fileName: _jsxFileName,
|
|
464
|
-
lineNumber:
|
|
460
|
+
lineNumber: 494,
|
|
465
461
|
columnNumber: 15
|
|
466
462
|
}
|
|
467
463
|
}))));
|
|
@@ -583,7 +579,7 @@ var Gallery = function Gallery(props) {
|
|
|
583
579
|
__self: _this,
|
|
584
580
|
__source: {
|
|
585
581
|
fileName: _jsxFileName,
|
|
586
|
-
lineNumber:
|
|
582
|
+
lineNumber: 635,
|
|
587
583
|
columnNumber: 5
|
|
588
584
|
}
|
|
589
585
|
});
|