stream-chat-react-native-core 5.23.2 → 5.24.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/AttachmentPicker/AttachmentPicker.js +13 -7
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +10 -7
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/i18n/en.json +1 -1
- package/lib/commonjs/i18n/fr.json +52 -52
- package/lib/commonjs/i18n/hi.json +52 -52
- package/lib/commonjs/i18n/it.json +52 -52
- package/lib/commonjs/i18n/nl.json +52 -52
- package/lib/commonjs/i18n/ru.json +52 -52
- package/lib/commonjs/i18n/tr.json +52 -52
- package/lib/commonjs/store/apis/getChannelMessages.js +8 -5
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/utils/utils.js +6 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +13 -7
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/Message/Message.js +10 -7
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/i18n/en.json +1 -1
- package/lib/module/i18n/fr.json +52 -52
- package/lib/module/i18n/hi.json +52 -52
- package/lib/module/i18n/it.json +52 -52
- package/lib/module/i18n/nl.json +52 -52
- package/lib/module/i18n/ru.json +52 -52
- package/lib/module/i18n/tr.json +52 -52
- package/lib/module/store/apis/getChannelMessages.js +8 -5
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/utils/utils.js +6 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/i18n/en.json +1 -1
- package/lib/typescript/i18n/fr.json +52 -52
- package/lib/typescript/i18n/hi.json +52 -52
- package/lib/typescript/i18n/it.json +52 -52
- package/lib/typescript/i18n/nl.json +52 -52
- package/lib/typescript/i18n/ru.json +52 -52
- package/lib/typescript/i18n/tr.json +52 -52
- package/lib/typescript/utils/utils.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +9 -3
- package/src/components/Message/Message.tsx +5 -2
- package/src/components/Message/MessageSimple/MessageStatus.tsx +7 -5
- package/src/i18n/en.json +1 -1
- package/src/i18n/fr.json +52 -52
- package/src/i18n/hi.json +52 -52
- package/src/i18n/it.json +52 -52
- package/src/i18n/nl.json +52 -52
- package/src/i18n/ru.json +52 -52
- package/src/i18n/tr.json +52 -52
- package/src/store/apis/getChannelMessages.ts +10 -7
- package/src/utils/utils.ts +12 -0
- package/src/version.json +1 -1
|
@@ -151,16 +151,22 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
151
151
|
};
|
|
152
152
|
}, [selectedPicker, closePicker]);
|
|
153
153
|
(0, _react.useEffect)(function () {
|
|
154
|
+
var onKeyboardOpenHandler = function onKeyboardOpenHandler() {
|
|
155
|
+
if (selectedPicker) {
|
|
156
|
+
setSelectedPicker(undefined);
|
|
157
|
+
}
|
|
158
|
+
closePicker();
|
|
159
|
+
};
|
|
154
160
|
var keyboardShowEvent = _reactNative.Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';
|
|
155
|
-
var keyboardSubscription = _reactNative.Keyboard.addListener(keyboardShowEvent,
|
|
161
|
+
var keyboardSubscription = _reactNative.Keyboard.addListener(keyboardShowEvent, onKeyboardOpenHandler);
|
|
156
162
|
return function () {
|
|
157
163
|
if (keyboardSubscription != null && keyboardSubscription.remove) {
|
|
158
164
|
keyboardSubscription.remove();
|
|
159
165
|
return;
|
|
160
166
|
}
|
|
161
|
-
_reactNative.Keyboard.removeListener(keyboardShowEvent,
|
|
167
|
+
_reactNative.Keyboard.removeListener(keyboardShowEvent, onKeyboardOpenHandler);
|
|
162
168
|
};
|
|
163
|
-
}, [closePicker]);
|
|
169
|
+
}, [closePicker, selectedPicker]);
|
|
164
170
|
(0, _react.useEffect)(function () {
|
|
165
171
|
if (currentIndex < 0) {
|
|
166
172
|
setSelectedPicker(undefined);
|
|
@@ -245,7 +251,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
245
251
|
__self: _this,
|
|
246
252
|
__source: {
|
|
247
253
|
fileName: _jsxFileName,
|
|
248
|
-
lineNumber:
|
|
254
|
+
lineNumber: 310,
|
|
249
255
|
columnNumber: 9
|
|
250
256
|
}
|
|
251
257
|
}, iOSLimited && _react["default"].createElement(_reactNative.Button, {
|
|
@@ -254,7 +260,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
254
260
|
__self: _this,
|
|
255
261
|
__source: {
|
|
256
262
|
fileName: _jsxFileName,
|
|
257
|
-
lineNumber:
|
|
263
|
+
lineNumber: 327,
|
|
258
264
|
columnNumber: 13
|
|
259
265
|
}
|
|
260
266
|
}), _react["default"].createElement(_bottomSheet.BottomSheetFlatList, {
|
|
@@ -273,7 +279,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
273
279
|
__self: _this,
|
|
274
280
|
__source: {
|
|
275
281
|
fileName: _jsxFileName,
|
|
276
|
-
lineNumber:
|
|
282
|
+
lineNumber: 329,
|
|
277
283
|
columnNumber: 11
|
|
278
284
|
}
|
|
279
285
|
})), selectedPicker === 'images' && photoError && _react["default"].createElement(AttachmentPickerError, {
|
|
@@ -284,7 +290,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
284
290
|
__self: _this,
|
|
285
291
|
__source: {
|
|
286
292
|
fileName: _jsxFileName,
|
|
287
|
-
lineNumber:
|
|
293
|
+
lineNumber: 344,
|
|
288
294
|
columnNumber: 11
|
|
289
295
|
}
|
|
290
296
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_TranslationContext","_useViewport2","_native","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","dayjs","extend","duration","styles","StyleSheet","create","container","flexGrow","fullScreenHeight","Dimensions","height","AttachmentPicker","React","forwardRef","props","ref","AttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","AttachmentPickerError","attachmentPickerErrorButtonText","AttachmentPickerErrorImage","attachmentPickerErrorText","ImageOverlaySelectedComponent","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","translucentStatusBar","_useTheme","useTheme","_useTheme$theme","theme","bottomSheetContentContainer","attachmentPicker","white","colors","_useAttachmentPickerC","useAttachmentPickerContext","closePicker","maxNumberOfFiles","selectedFiles","selectedImages","selectedPicker","setSelectedFiles","setSelectedImages","setSelectedPicker","topInset","_useViewport","useViewport","vh","screenHeight","_useState","useState","_useState2","_slicedToArray2","currentIndex","setCurrentIndex","endCursorRef","useRef","_useState3","_useState4","photoError","setPhotoError","_useState5","_useState6","iOSLimited","setIosLimited","hasNextPageRef","_useState7","_useState8","loadingPhotos","setLoadingPhotos","_useState9","_useState10","photos","setPhotos","attemptedToLoadPhotosOnOpenRef","_useTranslationContex","useTranslationContext","t","getMorePhotos","useCallback","_asyncToGenerator2","_regenerator","mark","_callee","endCursor","results","wrap","_callee$","_context","prev","next","current","getPhotos","after","first","sent","prevPhotos","concat","_toConsumableArray2","assets","hasNextPage","t0","stop","getMorePhotosRef","useEffect","_oniOS14GalleryLibrar","oniOS14GalleryLibrarySelectionChange","undefined","unsubscribe","backAction","backHandler","BackHandler","addEventListener","remove","keyboardShowEvent","Platform","OS","keyboardSubscription","Keyboard","addListener","removeListener","selectedPhotos","map","asset","numberOfUploads","length","selected","some","image","id","uri","file","handleHeight","getAndroidBottomBarHeightAdjustment","_StatusBar$currentHei","statusBarHeight","StatusBar","currentHeight","bottomBarHeight","getInitialSnapPoint","initialSnapPoint","finalSnapPoint","snapPoints","useMemo","createElement","Fragment","containerHeight","enablePanDownToClose","handleComponent","index","onChange","__self","__source","fileName","lineNumber","columnNumber","Button","onPress","iOS14RefreshGallerySelection","title","BottomSheetFlatList","contentContainerStyle","backgroundColor","opacity","data","keyExtractor","item","numColumns","onEndReached","renderItem","renderAttachmentPickerItem","exports","displayName"],"sources":["AttachmentPicker.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n BackHandler,\n Button,\n Dimensions,\n Keyboard,\n Platform,\n StatusBar,\n StyleSheet,\n} from 'react-native';\n\nimport BottomSheet, { BottomSheetFlatList, BottomSheetHandleProps } from '@gorhom/bottom-sheet';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\n\nimport type { AttachmentPickerErrorProps } from './components/AttachmentPickerError';\n\nimport { renderAttachmentPickerItem } from './components/AttachmentPickerItem';\n\nimport { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { useTranslationContext } from '../../contexts/translationContext/TranslationContext';\nimport { useViewport } from '../../hooks/useViewport';\nimport {\n getPhotos,\n iOS14RefreshGallerySelection,\n oniOS14GalleryLibrarySelectionChange,\n} from '../../native';\nimport type { Asset } from '../../types/types';\n\ndayjs.extend(duration);\n\nconst styles = StyleSheet.create({\n container: {\n flexGrow: 1,\n },\n});\n\nconst fullScreenHeight = Dimensions.get('window').height;\n\nexport type AttachmentPickerProps = {\n /**\n * Custom UI component to render [draggable handle](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) of attachment picker.\n *\n * **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)\n */\n AttachmentPickerBottomSheetHandle: React.FC<BottomSheetHandleProps>;\n /**\n * Custom UI component to render error component while opening attachment picker.\n *\n * **Default** [AttachmentPickerError](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerError.tsx)\n */\n AttachmentPickerError: React.ComponentType<AttachmentPickerErrorProps>;\n /**\n * Custom UI component to render error image for attachment picker\n *\n * **Default** [AttachmentPickerErrorImage](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerErrorImage.tsx)\n */\n AttachmentPickerErrorImage: React.ComponentType;\n /**\n * Custom UI component to render overlay component, that shows up on top of [selected image](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) (with tick mark)\n *\n * **Default** [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx)\n */\n ImageOverlaySelectedComponent: React.ComponentType;\n attachmentPickerBottomSheetHandleHeight?: number;\n attachmentPickerBottomSheetHeight?: number;\n attachmentPickerErrorButtonText?: string;\n attachmentPickerErrorText?: string;\n numberOfAttachmentImagesToLoadPerCall?: number;\n numberOfAttachmentPickerImageColumns?: number;\n translucentStatusBar?: boolean;\n};\n\nexport const AttachmentPicker = React.forwardRef(\n (props: AttachmentPickerProps, ref: React.ForwardedRef<BottomSheet>) => {\n const {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n } = props;\n\n const {\n theme: {\n attachmentPicker: { bottomSheetContentContainer },\n colors: { white },\n },\n } = useTheme();\n const {\n closePicker,\n maxNumberOfFiles,\n selectedFiles,\n selectedImages,\n selectedPicker,\n setSelectedFiles,\n setSelectedImages,\n setSelectedPicker,\n topInset,\n } = useAttachmentPickerContext();\n const { vh } = useViewport();\n\n const screenHeight = vh(100);\n\n const [currentIndex, setCurrentIndex] = useState(-1);\n const endCursorRef = useRef<string>();\n const [photoError, setPhotoError] = useState(false);\n const [iOSLimited, setIosLimited] = useState(false);\n const hasNextPageRef = useRef(true);\n const [loadingPhotos, setLoadingPhotos] = useState(false);\n const [photos, setPhotos] = useState<Asset[]>([]);\n const attemptedToLoadPhotosOnOpenRef = useRef(false);\n const { t } = useTranslationContext();\n\n const getMorePhotos = useCallback(async () => {\n if (\n hasNextPageRef.current &&\n !loadingPhotos &&\n currentIndex > -1 &&\n selectedPicker === 'images'\n ) {\n setPhotoError(false);\n setLoadingPhotos(true);\n const endCursor = endCursorRef.current;\n try {\n const results = await getPhotos({\n after: endCursor,\n first: numberOfAttachmentImagesToLoadPerCall ?? 60,\n });\n endCursorRef.current = results.endCursor;\n setPhotos((prevPhotos) =>\n endCursor ? [...prevPhotos, ...results.assets] : results.assets,\n );\n setIosLimited(results.iOSLimited);\n hasNextPageRef.current = !!results.hasNextPage;\n } catch (error) {\n setPhotoError(true);\n }\n setLoadingPhotos(false);\n }\n }, [currentIndex, selectedPicker, loadingPhotos]);\n\n // we need to use ref here to avoid running effect when getMorePhotos changes\n const getMorePhotosRef = useRef(getMorePhotos);\n getMorePhotosRef.current = getMorePhotos;\n\n useEffect(() => {\n if (selectedPicker !== 'images') return;\n // ios 14 library selection change event is fired when user reselects the images that are permitted to be readable by the app\n const { unsubscribe } = oniOS14GalleryLibrarySelectionChange(() => {\n // we reset the cursor and has next page to true to facilitate fetching of the first page of photos again\n hasNextPageRef.current = true;\n endCursorRef.current = undefined;\n // fetch the first page of photos again\n getMorePhotosRef.current();\n });\n return unsubscribe;\n }, [selectedPicker]);\n\n useEffect(() => {\n const backAction = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n closePicker();\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [selectedPicker, closePicker]);\n\n useEffect(() => {\n const keyboardShowEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const keyboardSubscription = Keyboard.addListener(keyboardShowEvent, closePicker);\n\n return () => {\n if (keyboardSubscription?.remove) {\n keyboardSubscription.remove();\n return;\n }\n\n // To keep compatibility with older versions of React Native, where `remove()` is not available\n Keyboard.removeListener(keyboardShowEvent, closePicker);\n };\n }, [closePicker]);\n\n useEffect(() => {\n if (currentIndex < 0) {\n setSelectedPicker(undefined);\n if (!loadingPhotos) {\n endCursorRef.current = undefined;\n hasNextPageRef.current = true;\n attemptedToLoadPhotosOnOpenRef.current = false;\n setPhotoError(false);\n }\n }\n }, [currentIndex, loadingPhotos]);\n\n useEffect(() => {\n if (\n !attemptedToLoadPhotosOnOpenRef.current &&\n selectedPicker === 'images' &&\n endCursorRef.current === undefined &&\n currentIndex > -1 &&\n !loadingPhotos\n ) {\n getMorePhotos();\n // we do this only once on open for avoiding to request permissions in rationale dialog again and again on Android\n attemptedToLoadPhotosOnOpenRef.current = true;\n }\n }, [currentIndex, selectedPicker, getMorePhotos, loadingPhotos]);\n\n const selectedPhotos = photos.map((asset) => ({\n asset,\n ImageOverlaySelectedComponent,\n maxNumberOfFiles,\n numberOfAttachmentPickerImageColumns,\n numberOfUploads: selectedFiles.length + selectedImages.length,\n // `id` is available for Expo MediaLibrary while Cameraroll doesn't share id therefore we use `uri`\n selected:\n selectedImages.some((image) =>\n image.id ? image.id === asset.id : image.uri === asset.uri,\n ) ||\n selectedFiles.some((file) => (file.id ? file.id === asset.id : file.uri === asset.uri)),\n selectedFiles,\n selectedImages,\n setSelectedFiles,\n setSelectedImages,\n }));\n\n const handleHeight = attachmentPickerBottomSheetHandleHeight || 20;\n\n /**\n * This is to handle issues with Android measurements coming back incorrect.\n * If the StatusBar height is perfectly 1/2 of the difference between the two\n * dimensions for screen and window, it is incorrect and we need to account for\n * this. If you use a translucent header bar more adjustments are needed.\n */\n const getAndroidBottomBarHeightAdjustment = (): number => {\n if (Platform.OS === 'android') {\n const statusBarHeight = StatusBar.currentHeight ?? 0;\n const bottomBarHeight = fullScreenHeight - screenHeight - statusBarHeight;\n if (bottomBarHeight === statusBarHeight) {\n return translucentStatusBar ? 0 : statusBarHeight;\n } else {\n if (translucentStatusBar) {\n if (bottomBarHeight > statusBarHeight) {\n return -bottomBarHeight + statusBarHeight;\n } else {\n return bottomBarHeight > 0 ? -statusBarHeight : 0;\n }\n } else {\n return bottomBarHeight > 0 ? 0 : statusBarHeight;\n }\n }\n }\n return 0;\n };\n\n const getInitialSnapPoint = (): number => {\n if (attachmentPickerBottomSheetHeight !== undefined) {\n return attachmentPickerBottomSheetHeight;\n }\n if (Platform.OS === 'android') {\n return (\n 308 +\n (fullScreenHeight - screenHeight + getAndroidBottomBarHeightAdjustment()) -\n handleHeight\n );\n } else {\n return 308 + (fullScreenHeight - screenHeight);\n }\n };\n\n const initialSnapPoint = getInitialSnapPoint();\n\n const finalSnapPoint =\n Platform.OS === 'android'\n ? fullScreenHeight - topInset - handleHeight\n : fullScreenHeight - topInset;\n\n /**\n * Snap points changing cause a rerender of the position,\n * this is an issue if you are calling close on the bottom sheet.\n */\n const snapPoints = useMemo(\n () => [initialSnapPoint, finalSnapPoint],\n [initialSnapPoint, finalSnapPoint],\n );\n\n return (\n <>\n <BottomSheet\n containerHeight={fullScreenHeight}\n enablePanDownToClose={true}\n handleComponent={\n /**\n * using `null` here instead of `style={{ opacity: photoError ? 0 : 1 }}`\n * as opacity is not an allowed style\n */\n photoError ? null : AttachmentPickerBottomSheetHandle\n }\n handleHeight={handleHeight}\n index={-1}\n onChange={setCurrentIndex}\n ref={ref}\n snapPoints={snapPoints}\n >\n {iOSLimited && (\n <Button onPress={iOS14RefreshGallerySelection} title={t('Select More Photos')} />\n )}\n <BottomSheetFlatList\n contentContainerStyle={[\n styles.container,\n { backgroundColor: white },\n bottomSheetContentContainer,\n { opacity: photoError ? 0 : 1 },\n ]}\n data={selectedPhotos}\n keyExtractor={(item) => item.asset.uri}\n numColumns={numberOfAttachmentPickerImageColumns ?? 3}\n onEndReached={photoError ? undefined : getMorePhotos}\n renderItem={renderAttachmentPickerItem}\n />\n </BottomSheet>\n {selectedPicker === 'images' && photoError && (\n <AttachmentPickerError\n attachmentPickerBottomSheetHeight={initialSnapPoint}\n attachmentPickerErrorButtonText={attachmentPickerErrorButtonText}\n AttachmentPickerErrorImage={AttachmentPickerErrorImage}\n attachmentPickerErrorText={attachmentPickerErrorText}\n />\n )}\n </>\n );\n },\n);\n\nAttachmentPicker.displayName = 'AttachmentPicker';\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,YAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAIA,IAAAM,qBAAA,GAAAN,OAAA;AAEA,IAAAO,wBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AAIsB,IAAAY,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAA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AkL,UAAA;MAAAC,YAAA;IAAA;EAAA,CACtD,CAEH,CAAC;AAEP,CACF,CAAC;AAACgB,OAAA,CAAAjK,gBAAA,GAAAA,gBAAA;AAEFA,gBAAgB,CAACkK,WAAW,GAAG,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_TranslationContext","_useViewport2","_native","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","dayjs","extend","duration","styles","StyleSheet","create","container","flexGrow","fullScreenHeight","Dimensions","height","AttachmentPicker","React","forwardRef","props","ref","AttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","AttachmentPickerError","attachmentPickerErrorButtonText","AttachmentPickerErrorImage","attachmentPickerErrorText","ImageOverlaySelectedComponent","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","translucentStatusBar","_useTheme","useTheme","_useTheme$theme","theme","bottomSheetContentContainer","attachmentPicker","white","colors","_useAttachmentPickerC","useAttachmentPickerContext","closePicker","maxNumberOfFiles","selectedFiles","selectedImages","selectedPicker","setSelectedFiles","setSelectedImages","setSelectedPicker","topInset","_useViewport","useViewport","vh","screenHeight","_useState","useState","_useState2","_slicedToArray2","currentIndex","setCurrentIndex","endCursorRef","useRef","_useState3","_useState4","photoError","setPhotoError","_useState5","_useState6","iOSLimited","setIosLimited","hasNextPageRef","_useState7","_useState8","loadingPhotos","setLoadingPhotos","_useState9","_useState10","photos","setPhotos","attemptedToLoadPhotosOnOpenRef","_useTranslationContex","useTranslationContext","t","getMorePhotos","useCallback","_asyncToGenerator2","_regenerator","mark","_callee","endCursor","results","wrap","_callee$","_context","prev","next","current","getPhotos","after","first","sent","prevPhotos","concat","_toConsumableArray2","assets","hasNextPage","t0","stop","getMorePhotosRef","useEffect","_oniOS14GalleryLibrar","oniOS14GalleryLibrarySelectionChange","undefined","unsubscribe","backAction","backHandler","BackHandler","addEventListener","remove","onKeyboardOpenHandler","keyboardShowEvent","Platform","OS","keyboardSubscription","Keyboard","addListener","removeListener","selectedPhotos","map","asset","numberOfUploads","length","selected","some","image","id","uri","file","handleHeight","getAndroidBottomBarHeightAdjustment","_StatusBar$currentHei","statusBarHeight","StatusBar","currentHeight","bottomBarHeight","getInitialSnapPoint","initialSnapPoint","finalSnapPoint","snapPoints","useMemo","createElement","Fragment","containerHeight","enablePanDownToClose","handleComponent","index","onChange","__self","__source","fileName","lineNumber","columnNumber","Button","onPress","iOS14RefreshGallerySelection","title","BottomSheetFlatList","contentContainerStyle","backgroundColor","opacity","data","keyExtractor","item","numColumns","onEndReached","renderItem","renderAttachmentPickerItem","exports","displayName"],"sources":["AttachmentPicker.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n BackHandler,\n Button,\n Dimensions,\n Keyboard,\n Platform,\n StatusBar,\n StyleSheet,\n} from 'react-native';\n\nimport BottomSheet, { BottomSheetFlatList, BottomSheetHandleProps } from '@gorhom/bottom-sheet';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\n\nimport type { AttachmentPickerErrorProps } from './components/AttachmentPickerError';\n\nimport { renderAttachmentPickerItem } from './components/AttachmentPickerItem';\n\nimport { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { useTranslationContext } from '../../contexts/translationContext/TranslationContext';\nimport { useViewport } from '../../hooks/useViewport';\nimport {\n getPhotos,\n iOS14RefreshGallerySelection,\n oniOS14GalleryLibrarySelectionChange,\n} from '../../native';\nimport type { Asset } from '../../types/types';\n\ndayjs.extend(duration);\n\nconst styles = StyleSheet.create({\n container: {\n flexGrow: 1,\n },\n});\n\nconst fullScreenHeight = Dimensions.get('window').height;\n\nexport type AttachmentPickerProps = {\n /**\n * Custom UI component to render [draggable handle](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) of attachment picker.\n *\n * **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)\n */\n AttachmentPickerBottomSheetHandle: React.FC<BottomSheetHandleProps>;\n /**\n * Custom UI component to render error component while opening attachment picker.\n *\n * **Default** [AttachmentPickerError](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerError.tsx)\n */\n AttachmentPickerError: React.ComponentType<AttachmentPickerErrorProps>;\n /**\n * Custom UI component to render error image for attachment picker\n *\n * **Default** [AttachmentPickerErrorImage](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerErrorImage.tsx)\n */\n AttachmentPickerErrorImage: React.ComponentType;\n /**\n * Custom UI component to render overlay component, that shows up on top of [selected image](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) (with tick mark)\n *\n * **Default** [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx)\n */\n ImageOverlaySelectedComponent: React.ComponentType;\n attachmentPickerBottomSheetHandleHeight?: number;\n attachmentPickerBottomSheetHeight?: number;\n attachmentPickerErrorButtonText?: string;\n attachmentPickerErrorText?: string;\n numberOfAttachmentImagesToLoadPerCall?: number;\n numberOfAttachmentPickerImageColumns?: number;\n translucentStatusBar?: boolean;\n};\n\nexport const AttachmentPicker = React.forwardRef(\n (props: AttachmentPickerProps, ref: React.ForwardedRef<BottomSheet>) => {\n const {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n } = props;\n\n const {\n theme: {\n attachmentPicker: { bottomSheetContentContainer },\n colors: { white },\n },\n } = useTheme();\n const {\n closePicker,\n maxNumberOfFiles,\n selectedFiles,\n selectedImages,\n selectedPicker,\n setSelectedFiles,\n setSelectedImages,\n setSelectedPicker,\n topInset,\n } = useAttachmentPickerContext();\n const { vh } = useViewport();\n\n const screenHeight = vh(100);\n\n const [currentIndex, setCurrentIndex] = useState(-1);\n const endCursorRef = useRef<string>();\n const [photoError, setPhotoError] = useState(false);\n const [iOSLimited, setIosLimited] = useState(false);\n const hasNextPageRef = useRef(true);\n const [loadingPhotos, setLoadingPhotos] = useState(false);\n const [photos, setPhotos] = useState<Asset[]>([]);\n const attemptedToLoadPhotosOnOpenRef = useRef(false);\n const { t } = useTranslationContext();\n\n const getMorePhotos = useCallback(async () => {\n if (\n hasNextPageRef.current &&\n !loadingPhotos &&\n currentIndex > -1 &&\n selectedPicker === 'images'\n ) {\n setPhotoError(false);\n setLoadingPhotos(true);\n const endCursor = endCursorRef.current;\n try {\n const results = await getPhotos({\n after: endCursor,\n first: numberOfAttachmentImagesToLoadPerCall ?? 60,\n });\n endCursorRef.current = results.endCursor;\n setPhotos((prevPhotos) =>\n endCursor ? [...prevPhotos, ...results.assets] : results.assets,\n );\n setIosLimited(results.iOSLimited);\n hasNextPageRef.current = !!results.hasNextPage;\n } catch (error) {\n setPhotoError(true);\n }\n setLoadingPhotos(false);\n }\n }, [currentIndex, selectedPicker, loadingPhotos]);\n\n // we need to use ref here to avoid running effect when getMorePhotos changes\n const getMorePhotosRef = useRef(getMorePhotos);\n getMorePhotosRef.current = getMorePhotos;\n\n useEffect(() => {\n if (selectedPicker !== 'images') return;\n // ios 14 library selection change event is fired when user reselects the images that are permitted to be readable by the app\n const { unsubscribe } = oniOS14GalleryLibrarySelectionChange(() => {\n // we reset the cursor and has next page to true to facilitate fetching of the first page of photos again\n hasNextPageRef.current = true;\n endCursorRef.current = undefined;\n // fetch the first page of photos again\n getMorePhotosRef.current();\n });\n return unsubscribe;\n }, [selectedPicker]);\n\n useEffect(() => {\n const backAction = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n closePicker();\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [selectedPicker, closePicker]);\n\n useEffect(() => {\n const onKeyboardOpenHandler = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n }\n closePicker();\n };\n const keyboardShowEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const keyboardSubscription = Keyboard.addListener(keyboardShowEvent, onKeyboardOpenHandler);\n\n return () => {\n if (keyboardSubscription?.remove) {\n keyboardSubscription.remove();\n return;\n }\n\n // To keep compatibility with older versions of React Native, where `remove()` is not available\n Keyboard.removeListener(keyboardShowEvent, onKeyboardOpenHandler);\n };\n }, [closePicker, selectedPicker]);\n\n useEffect(() => {\n if (currentIndex < 0) {\n setSelectedPicker(undefined);\n if (!loadingPhotos) {\n endCursorRef.current = undefined;\n hasNextPageRef.current = true;\n attemptedToLoadPhotosOnOpenRef.current = false;\n setPhotoError(false);\n }\n }\n }, [currentIndex, loadingPhotos]);\n\n useEffect(() => {\n if (\n !attemptedToLoadPhotosOnOpenRef.current &&\n selectedPicker === 'images' &&\n endCursorRef.current === undefined &&\n currentIndex > -1 &&\n !loadingPhotos\n ) {\n getMorePhotos();\n // we do this only once on open for avoiding to request permissions in rationale dialog again and again on Android\n attemptedToLoadPhotosOnOpenRef.current = true;\n }\n }, [currentIndex, selectedPicker, getMorePhotos, loadingPhotos]);\n\n const selectedPhotos = photos.map((asset) => ({\n asset,\n ImageOverlaySelectedComponent,\n maxNumberOfFiles,\n numberOfAttachmentPickerImageColumns,\n numberOfUploads: selectedFiles.length + selectedImages.length,\n // `id` is available for Expo MediaLibrary while Cameraroll doesn't share id therefore we use `uri`\n selected:\n selectedImages.some((image) =>\n image.id ? image.id === asset.id : image.uri === asset.uri,\n ) ||\n selectedFiles.some((file) => (file.id ? file.id === asset.id : file.uri === asset.uri)),\n selectedFiles,\n selectedImages,\n setSelectedFiles,\n setSelectedImages,\n }));\n\n const handleHeight = attachmentPickerBottomSheetHandleHeight || 20;\n\n /**\n * This is to handle issues with Android measurements coming back incorrect.\n * If the StatusBar height is perfectly 1/2 of the difference between the two\n * dimensions for screen and window, it is incorrect and we need to account for\n * this. If you use a translucent header bar more adjustments are needed.\n */\n const getAndroidBottomBarHeightAdjustment = (): number => {\n if (Platform.OS === 'android') {\n const statusBarHeight = StatusBar.currentHeight ?? 0;\n const bottomBarHeight = fullScreenHeight - screenHeight - statusBarHeight;\n if (bottomBarHeight === statusBarHeight) {\n return translucentStatusBar ? 0 : statusBarHeight;\n } else {\n if (translucentStatusBar) {\n if (bottomBarHeight > statusBarHeight) {\n return -bottomBarHeight + statusBarHeight;\n } else {\n return bottomBarHeight > 0 ? -statusBarHeight : 0;\n }\n } else {\n return bottomBarHeight > 0 ? 0 : statusBarHeight;\n }\n }\n }\n return 0;\n };\n\n const getInitialSnapPoint = (): number => {\n if (attachmentPickerBottomSheetHeight !== undefined) {\n return attachmentPickerBottomSheetHeight;\n }\n if (Platform.OS === 'android') {\n return (\n 308 +\n (fullScreenHeight - screenHeight + getAndroidBottomBarHeightAdjustment()) -\n handleHeight\n );\n } else {\n return 308 + (fullScreenHeight - screenHeight);\n }\n };\n\n const initialSnapPoint = getInitialSnapPoint();\n\n const finalSnapPoint =\n Platform.OS === 'android'\n ? fullScreenHeight - topInset - handleHeight\n : fullScreenHeight - topInset;\n\n /**\n * Snap points changing cause a rerender of the position,\n * this is an issue if you are calling close on the bottom sheet.\n */\n const snapPoints = useMemo(\n () => [initialSnapPoint, finalSnapPoint],\n [initialSnapPoint, finalSnapPoint],\n );\n\n return (\n <>\n <BottomSheet\n containerHeight={fullScreenHeight}\n enablePanDownToClose={true}\n handleComponent={\n /**\n * using `null` here instead of `style={{ opacity: photoError ? 0 : 1 }}`\n * as opacity is not an allowed style\n */\n photoError ? null : AttachmentPickerBottomSheetHandle\n }\n handleHeight={handleHeight}\n index={-1}\n onChange={setCurrentIndex}\n ref={ref}\n snapPoints={snapPoints}\n >\n {iOSLimited && (\n <Button onPress={iOS14RefreshGallerySelection} title={t('Select More Photos')} />\n )}\n <BottomSheetFlatList\n contentContainerStyle={[\n styles.container,\n { backgroundColor: white },\n bottomSheetContentContainer,\n { opacity: photoError ? 0 : 1 },\n ]}\n data={selectedPhotos}\n keyExtractor={(item) => item.asset.uri}\n numColumns={numberOfAttachmentPickerImageColumns ?? 3}\n onEndReached={photoError ? undefined : getMorePhotos}\n renderItem={renderAttachmentPickerItem}\n />\n </BottomSheet>\n {selectedPicker === 'images' && photoError && (\n <AttachmentPickerError\n attachmentPickerBottomSheetHeight={initialSnapPoint}\n attachmentPickerErrorButtonText={attachmentPickerErrorButtonText}\n AttachmentPickerErrorImage={AttachmentPickerErrorImage}\n attachmentPickerErrorText={attachmentPickerErrorText}\n />\n )}\n </>\n );\n },\n);\n\nAttachmentPicker.displayName = 'AttachmentPicker';\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,YAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAIA,IAAAM,qBAAA,GAAAN,OAAA;AAEA,IAAAO,wBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;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A;MAAAmL,UAAA;MAAAC,YAAA;IAAA;EAAA,CACxC,CACU,CAAC,EACbpH,cAAc,KAAK,QAAQ,IAAImB,UAAU,IACxClG,MAAA,YAAAwL,aAAA,CAAC/H,qBAAqB;IACpBD,iCAAiC,EAAE4H,gBAAiB;IACpD1H,+BAA+B,EAAEA,+BAAgC;IACjEC,0BAA0B,EAAEA,0BAA2B;IACvDC,yBAAyB,EAAEA,yBAA0B;IAAAmI,MAAA,EAAAjL,KAAA;IAAAkL,QAAA;MAAAC,QAAA,EAAAlL,YAAA;MAAAmL,UAAA;MAAAC,YAAA;IAAA;EAAA,CACtD,CAEH,CAAC;AAEP,CACF,CAAC;AAACgB,OAAA,CAAAlK,gBAAA,GAAAA,gBAAA;AAEFA,gBAAgB,CAACmK,WAAW,GAAG,kBAAkB"}
|
|
@@ -152,6 +152,9 @@ var MessageWithContext = function MessageWithContext(props) {
|
|
|
152
152
|
}
|
|
153
153
|
var quotedMessage = message.quoted_message;
|
|
154
154
|
if (error) {
|
|
155
|
+
if ((0, _utils.isBlockedMessage)(message)) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
155
158
|
showMessageOverlay(false, true);
|
|
156
159
|
} else if (quotedMessage) {
|
|
157
160
|
onPressQuotedMessage(quotedMessage);
|
|
@@ -401,7 +404,7 @@ var MessageWithContext = function MessageWithContext(props) {
|
|
|
401
404
|
toggleMuteUser: handleToggleMuteUser,
|
|
402
405
|
toggleReaction: handleToggleReaction
|
|
403
406
|
};
|
|
404
|
-
var onLongPressMessage = disabled || hasAttachmentActions ? function () {
|
|
407
|
+
var onLongPressMessage = disabled || hasAttachmentActions || (0, _utils.isBlockedMessage)(message) ? function () {
|
|
405
408
|
return null;
|
|
406
409
|
} : onLongPressMessageProp ? function (payload) {
|
|
407
410
|
return onLongPressMessageProp({
|
|
@@ -500,7 +503,7 @@ var MessageWithContext = function MessageWithContext(props) {
|
|
|
500
503
|
__self: _this,
|
|
501
504
|
__source: {
|
|
502
505
|
fileName: _jsxFileName,
|
|
503
|
-
lineNumber:
|
|
506
|
+
lineNumber: 707,
|
|
504
507
|
columnNumber: 5
|
|
505
508
|
}
|
|
506
509
|
}, _react["default"].createElement(_reactNative.View, {
|
|
@@ -510,7 +513,7 @@ var MessageWithContext = function MessageWithContext(props) {
|
|
|
510
513
|
__self: _this,
|
|
511
514
|
__source: {
|
|
512
515
|
fileName: _jsxFileName,
|
|
513
|
-
lineNumber:
|
|
516
|
+
lineNumber: 716,
|
|
514
517
|
columnNumber: 7
|
|
515
518
|
}
|
|
516
519
|
}, _react["default"].createElement(_reactNative.View, {
|
|
@@ -520,7 +523,7 @@ var MessageWithContext = function MessageWithContext(props) {
|
|
|
520
523
|
__self: _this,
|
|
521
524
|
__source: {
|
|
522
525
|
fileName: _jsxFileName,
|
|
523
|
-
lineNumber:
|
|
526
|
+
lineNumber: 724,
|
|
524
527
|
columnNumber: 9
|
|
525
528
|
}
|
|
526
529
|
}, _react["default"].createElement(_MessageContext.MessageProvider, {
|
|
@@ -528,14 +531,14 @@ var MessageWithContext = function MessageWithContext(props) {
|
|
|
528
531
|
__self: _this,
|
|
529
532
|
__source: {
|
|
530
533
|
fileName: _jsxFileName,
|
|
531
|
-
lineNumber:
|
|
534
|
+
lineNumber: 731,
|
|
532
535
|
columnNumber: 11
|
|
533
536
|
}
|
|
534
537
|
}, _react["default"].createElement(MessageSimple, {
|
|
535
538
|
__self: _this,
|
|
536
539
|
__source: {
|
|
537
540
|
fileName: _jsxFileName,
|
|
538
|
-
lineNumber:
|
|
541
|
+
lineNumber: 732,
|
|
539
542
|
columnNumber: 13
|
|
540
543
|
}
|
|
541
544
|
})))));
|
|
@@ -646,7 +649,7 @@ var Message = function Message(props) {
|
|
|
646
649
|
__self: _this,
|
|
647
650
|
__source: {
|
|
648
651
|
fileName: _jsxFileName,
|
|
649
|
-
lineNumber:
|
|
652
|
+
lineNumber: 898,
|
|
650
653
|
columnNumber: 5
|
|
651
654
|
}
|
|
652
655
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useCreateMessageContext","_useMessageActionHandlers","_useMessageActions2","_messageActions","_ChannelContext","_ChatContext","_KeyboardContext","_MessageContext","_MessageOverlayContext","_MessagesContext","_OverlayContext","_OwnCapabilitiesContext","_ThemeContext","_ThreadContext","_TranslationContext","_native","_utils","_useMessageList","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessageWithContext","props","_message$user","isMessageTypeDeleted","message","type","sendReaction","channel","deleteMessageFromContext","deleteMessage","disabled","dismissKeyboard","dismissKeyboardOnMessageTouch","_props$enableLongPres","enableLongPress","enforceUniqueReaction","_props$forceAlignMess","forceAlignMessages","goToMessage","_props$groupStyles","groupStyles","handleBlock","handleCopy","handleDelete","handleEdit","handleFlag","handleMute","handlePinMessage","handleQuotedReply","handleReactionProp","handleReaction","handleRetry","handleThreadReply","chatContext","lastReceivedId","members","_props$messageActions","messageActions","messageActionsProp","defaultMessageActions","messageContentOrderProp","messageContentOrder","messagesContext","MessageSimple","onLongPressProp","onLongPress","onLongPressMessageProp","onLongPressMessage","onPressProp","onPress","onPressMessageProp","onPressMessage","onPressInProp","onPressIn","onPressInMessageProp","onPressInMessage","onThreadSelect","openThread","OverlayReactionList","preventPress","removeMessage","deleteReaction","retrySendMessage","selectReaction","setData","setEditingState","setOverlay","setQuotedMessageState","showAvatar","showMessageStatus","showUnreadUnderlay","style","supportedReactions","t","isTargetedMessage","_props$threadList","threadList","updateMessage","client","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","bg_gradient_start","targetedMessageBackground","_useTheme$theme$messa","messageSimple","targetedMessageContainer","targetedMessageUnderlay","actionsEnabled","status","MessageStatusTypes","RECEIVED","isMyMessage","userID","user","id","handleAction","_ref","_asyncToGenerator2","_regenerator","mark","_callee","name","value","data","wrap","_callee$","_context","prev","next","sendAction","_defineProperty2","sent","parent_id","stop","_x","_x2","apply","arguments","onPressQuotedMessage","quotedMessage","errorOrFailed","FAILED","error","length","undefined","Keyboard","dismiss","quoted_message","showMessageOverlay","alignment","attachments","Array","isArray","reduce","acc","cur","files","push","other","og_scrape_url","isVideoPackageAvailable","videos","image_url","asset_url","thumb_url","title_link","images","hasAttachmentActions","some","attachment","actions","filter","content","text","emojiOnlyText","useMemo","hasOnlyEmojis","onlyEmojis","onOpenThread","hasReactions","latest_reactions","clientId","reactions","_message$latest_react","reactionType","reactionsOfReactionType","reaction","hasOwnReaction","user_id","own","ownCapabilities","useOwnCapabilitiesContext","_useMessageActionHand","useMessageActionHandlers","handleDeleteMessage","handleEditMessage","handleQuotedReplyMessage","handleResendMessage","handleToggleBanUser","handleToggleMuteUser","handleTogglePinMessage","handleToggleReaction","_useMessageActions","useMessageActions","blockUser","copyMessage","editMessage","flagMessage","muteUser","pinMessage","quotedReply","retry","threadReply","unpinMessage","_useTranslationContex","useTranslationContext","userLanguage","_ref2","_callee2","messageReactions","isThreadMessage","dismissOverlay","_args2","_callee2$","_context2","Boolean","messageContext","_extends2","messageReactionTitle","otherAttachments","actionHandlers","resendMessage","toggleBanUser","toggleMuteUser","toggleReaction","payload","defaultHandler","emitter","event","triggerHaptic","useCreateMessageContext","lastGroupMessage","onPressArgs","additionalInfo","handleOnPress","onPressInArgs","handleOnpressIn","createElement","View","pinned","backgroundColor","testID","__self","__source","fileName","lineNumber","columnNumber","MessageProvider","areEqual","prevProps","nextProps","_prevMessage$quoted_m","_nextMessage$quoted_m","_prevMessage$quoted_m2","_nextMessage$quoted_m2","_prevMessage$user","_nextMessage$user","prevMutedUsers","mutedUsers","prevGoToMessage","prevGroupStyles","isAttachmentEqual","prevIsTargetedMessage","prevLastReceivedId","prevMembers","prevMessage","prevShowUnreadUnderlay","prevT","nextMutedUsers","nextGoToMessage","nextGroupStyles","nextIsTargetedMessage","nextLastReceivedId","nextMembers","nextMessage","nextShowUnreadUnderlay","nextT","membersEqual","keys","repliesEqual","reply_count","lastReceivedIdChangedAndMatters","goToMessageChangedAndMatters","quoted_message_id","groupStylesEqual","isPrevMessageTypeDeleted","isNextMessageTypeDeleted","messageEqual","isMessageWithStylesReadByAndDateSeparator","readBy","updated_at","isPrevQuotedMessageTypeDeleted","isNextQuotedMessageTypeDeleted","quotedMessageEqual","messageUserBannedEqual","banned","prevMessageAttachments","nextMessageAttachments","attachmentsEqual","every","index","attachmentKeysEqual","latestReactionsEqual","_ref3","_nextMessage$latest_r","mutedUserSame","mutedUser","_prevMessage$user2","target","_nextMessage$user2","showUnreadUnderlayEqual","tEqual","targetedMessageEqual","MemoizedMessage","React","memo","Message","_useChannelContext","useChannelContext","useChatContext","_useKeyboardContext","useKeyboardContext","_useMessageOverlayCon","useMessageOverlayContext","useMessagesContext","_useOverlayContext","useOverlayContext","_useThreadContext","useThreadContext","_useTranslationContex2","exports"],"sources":["Message.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { GestureResponderEvent, Keyboard, StyleProp, View, ViewStyle } from 'react-native';\n\nimport type { Attachment, UserResponse } from 'stream-chat';\n\nimport { useCreateMessageContext } from './hooks/useCreateMessageContext';\nimport { useMessageActionHandlers } from './hooks/useMessageActionHandlers';\nimport { useMessageActions } from './hooks/useMessageActions';\nimport { messageActions as defaultMessageActions } from './utils/messageActions';\n\nimport {\n ChannelContextValue,\n useChannelContext,\n} from '../../contexts/channelContext/ChannelContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\nimport {\n KeyboardContextValue,\n useKeyboardContext,\n} from '../../contexts/keyboardContext/KeyboardContext';\nimport {\n MessageContextValue,\n MessageProvider,\n Reactions,\n} from '../../contexts/messageContext/MessageContext';\nimport {\n MessageOverlayContextValue,\n useMessageOverlayContext,\n} from '../../contexts/messageOverlayContext/MessageOverlayContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport {\n OverlayContextValue,\n useOverlayContext,\n} from '../../contexts/overlayContext/OverlayContext';\nimport { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';\nimport {\n TranslationContextValue,\n useTranslationContext,\n} from '../../contexts/translationContext/TranslationContext';\n\nimport { isVideoPackageAvailable, triggerHaptic } from '../../native';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { hasOnlyEmojis, MessageStatusTypes } from '../../utils/utils';\n\nimport {\n isMessageWithStylesReadByAndDateSeparator,\n MessageType,\n} from '../MessageList/hooks/useMessageList';\nimport type { MessageActionListItemProps } from '../MessageOverlay/MessageActionListItem';\n\nexport type TouchableEmitter =\n | 'fileAttachment'\n | 'gallery'\n | 'giphy'\n | 'message'\n | 'messageContent'\n | 'messageReplies'\n | 'reactionList';\n\nexport type TextMentionTouchableHandlerPayload<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n emitter: 'textMention';\n additionalInfo?: { user?: UserResponse<StreamChatGenerics> };\n};\n\nexport type UrlTouchableHandlerPayload = {\n emitter: 'textLink' | 'card';\n additionalInfo?: { url?: string };\n};\n\nexport type FileAttachmentTouchableHandlerPayload<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n emitter: 'fileAttachment';\n additionalInfo?: { attachment?: Attachment<StreamChatGenerics> };\n};\n\nexport type TouchableHandlerPayload = {\n defaultHandler?: () => void;\n event?: GestureResponderEvent;\n} & (\n | {\n emitter?: Exclude<TouchableEmitter, 'textMention' | 'textLink' | 'card' | 'fileAttachment'>;\n }\n | TextMentionTouchableHandlerPayload\n | UrlTouchableHandlerPayload\n | FileAttachmentTouchableHandlerPayload\n);\n\nexport type MessageTouchableHandlerPayload<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = TouchableHandlerPayload & {\n actionHandlers?: MessageActionHandlers;\n additionalInfo?: Record<string, unknown>;\n message?: MessageType<StreamChatGenerics>;\n};\n\nexport type MessageActionHandlers = {\n deleteMessage: () => Promise<void>;\n editMessage: () => void;\n pinMessage: () => Promise<void>;\n quotedReply: () => void;\n resendMessage: () => Promise<void>;\n showMessageOverlay: () => void;\n toggleBanUser: () => Promise<void>;\n toggleMuteUser: () => Promise<void>;\n toggleReaction: (reactionType: string) => Promise<void>;\n};\n\nexport type MessagePropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n ChannelContextValue<StreamChatGenerics>,\n 'channel' | 'disabled' | 'enforceUniqueReaction' | 'members'\n> &\n Pick<KeyboardContextValue, 'dismissKeyboard'> &\n Partial<Omit<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'>> &\n Pick<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n | 'sendReaction'\n | 'deleteMessage'\n | 'dismissKeyboardOnMessageTouch'\n | 'forceAlignMessages'\n | 'handleBlock'\n | 'handleCopy'\n | 'handleDelete'\n | 'handleEdit'\n | 'handleFlag'\n | 'handleMute'\n | 'handlePinMessage'\n | 'handleQuotedReply'\n | 'handleReaction'\n | 'handleRetry'\n | 'handleThreadReply'\n | 'isAttachmentEqual'\n | 'messageActions'\n | 'messageContentOrder'\n | 'MessageSimple'\n | 'onLongPressMessage'\n | 'onPressInMessage'\n | 'onPressMessage'\n | 'OverlayReactionList'\n | 'removeMessage'\n | 'deleteReaction'\n | 'retrySendMessage'\n | 'selectReaction'\n | 'setEditingState'\n | 'setQuotedMessageState'\n | 'supportedReactions'\n | 'updateMessage'\n > &\n Pick<MessageOverlayContextValue<StreamChatGenerics>, 'setData'> &\n Pick<OverlayContextValue, 'setOverlay'> &\n Pick<ThreadContextValue<StreamChatGenerics>, 'openThread'> &\n Pick<TranslationContextValue, 't'> & {\n chatContext: ChatContextValue<StreamChatGenerics>;\n messagesContext: MessagesContextValue<StreamChatGenerics>;\n /**\n * Whether or not users are able to long press messages.\n */\n enableLongPress?: boolean;\n goToMessage?: (messageId: string) => void;\n isTargetedMessage?: boolean;\n /**\n * Array of allowed actions or null on message, this can also be a function returning the array.\n * If all the actions need to be disabled an empty array should be provided as value of prop\n */\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we show the overlay with all the message actions on long press.\n *\n * @param message Message object which was long pressed\n * @param event Event object for onLongPress event\n **/\n onLongPress?: (payload: Partial<MessageTouchableHandlerPayload<StreamChatGenerics>>) => void;\n\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we will dismiss the keyboard on press.\n *\n * @param message Message object which was long pressed\n * @param event Event object for onLongPress event\n * */\n onPress?: (payload: Partial<MessageTouchableHandlerPayload<StreamChatGenerics>>) => void;\n onPressIn?: (payload: Partial<MessageTouchableHandlerPayload<StreamChatGenerics>>) => void;\n /**\n * Handler to open the thread on message. This is callback for touch event for replies button.\n *\n * @param message A message object to open the thread upon.\n */\n onThreadSelect?: (message: MessageType<StreamChatGenerics>) => void;\n showUnreadUnderlay?: boolean;\n style?: StyleProp<ViewStyle>;\n };\n\n/**\n * Since this component doesn't consume `messages` from `MessagesContext`,\n * we memoized and broke it up to prevent new messages from re-rendering\n * each individual Message component.\n */\nconst MessageWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessagePropsWithContext<StreamChatGenerics>,\n) => {\n const isMessageTypeDeleted = props.message.type === 'deleted';\n\n const {\n sendReaction,\n channel,\n deleteMessage: deleteMessageFromContext,\n disabled,\n dismissKeyboard,\n dismissKeyboardOnMessageTouch,\n enableLongPress = true,\n enforceUniqueReaction,\n forceAlignMessages = false,\n goToMessage,\n groupStyles = ['bottom'],\n handleBlock,\n handleCopy,\n handleDelete,\n handleEdit,\n handleFlag,\n handleMute,\n handlePinMessage,\n handleQuotedReply,\n handleReaction: handleReactionProp,\n handleRetry,\n handleThreadReply,\n chatContext,\n lastReceivedId,\n members,\n message,\n messageActions: messageActionsProp = defaultMessageActions,\n messageContentOrder: messageContentOrderProp,\n messagesContext,\n MessageSimple,\n onLongPress: onLongPressProp,\n onLongPressMessage: onLongPressMessageProp,\n onPress: onPressProp,\n onPressMessage: onPressMessageProp,\n onPressIn: onPressInProp,\n onPressInMessage: onPressInMessageProp,\n onThreadSelect,\n openThread,\n OverlayReactionList,\n preventPress,\n removeMessage,\n deleteReaction,\n retrySendMessage,\n selectReaction,\n setData,\n setEditingState,\n setOverlay,\n setQuotedMessageState,\n showAvatar,\n showMessageStatus,\n showUnreadUnderlay,\n style,\n supportedReactions,\n t,\n isTargetedMessage,\n threadList = false,\n updateMessage,\n } = props;\n const { client } = chatContext;\n const {\n theme: {\n colors: { bg_gradient_start, targetedMessageBackground },\n messageSimple: { targetedMessageContainer, targetedMessageUnderlay },\n },\n } = useTheme();\n\n const actionsEnabled =\n message.type === 'regular' && message.status === MessageStatusTypes.RECEIVED;\n\n const isMyMessage = client && message && client.userID === message.user?.id;\n\n const handleAction = async (name: string, value: string) => {\n if (message.id) {\n const data = await channel?.sendAction(message.id, { [name]: value });\n if (data?.message) {\n updateMessage(data.message);\n } else {\n removeMessage({\n id: message.id,\n parent_id: message.parent_id,\n });\n }\n }\n };\n\n const onPressQuotedMessage = (quotedMessage: MessageType<StreamChatGenerics>) => {\n if (!goToMessage) return;\n\n goToMessage(quotedMessage.id);\n };\n\n const errorOrFailed = message.type === 'error' || message.status === MessageStatusTypes.FAILED;\n\n const onPress = (error = errorOrFailed) => {\n if (dismissKeyboardOnMessageTouch) {\n Keyboard.dismiss();\n }\n const quotedMessage = message.quoted_message as MessageType<StreamChatGenerics>;\n if (error) {\n showMessageOverlay(false, true);\n } else if (quotedMessage) {\n onPressQuotedMessage(quotedMessage);\n }\n };\n\n const alignment =\n forceAlignMessages && (forceAlignMessages === 'left' || forceAlignMessages === 'right')\n ? forceAlignMessages\n : isMyMessage\n ? 'right'\n : 'left';\n\n /**\n * attachments contain files/images or other attachments\n *\n * if a URL attachment is present with a file/image then we\n * show just the text and markdown should make the link\n * clickable\n */\n const attachments =\n !isMessageTypeDeleted && Array.isArray(message.attachments)\n ? message.attachments.reduce(\n (acc, cur) => {\n if (cur.type === 'file') {\n acc.files.push(cur);\n acc.other = []; // remove other attachments if a file exists\n } else if (cur.type === 'video' && !cur.og_scrape_url && isVideoPackageAvailable()) {\n acc.videos.push({\n image_url: cur.asset_url,\n thumb_url: cur.thumb_url,\n type: 'video',\n });\n acc.other = [];\n } else if (cur.type === 'video' && !cur.og_scrape_url) {\n acc.files.push(cur);\n acc.other = []; // remove other attachments if a file exists\n } else if (cur.type === 'audio') {\n acc.files.push(cur);\n } else if (cur.type === 'image' && !cur.title_link && !cur.og_scrape_url) {\n /**\n * this next if is not combined with the above one for cases where we have\n * an image with no url links at all falling back to being an attachment\n */\n if (cur.image_url || cur.thumb_url) {\n acc.images.push(cur);\n acc.other = []; // remove other attachments if an image exists\n }\n // only add other attachments if there are no files/images\n } else if (!acc.files.length && !acc.images.length && !acc.videos.length) {\n acc.other.push(cur);\n }\n\n return acc;\n },\n {\n files: [] as Attachment<StreamChatGenerics>[],\n images: [] as Attachment<StreamChatGenerics>[],\n other: [] as Attachment<StreamChatGenerics>[],\n videos: [] as Attachment<StreamChatGenerics>[],\n },\n )\n : {\n files: [] as Attachment<StreamChatGenerics>[],\n images: [] as Attachment<StreamChatGenerics>[],\n other: [] as Attachment<StreamChatGenerics>[],\n videos: [] as Attachment<StreamChatGenerics>[],\n };\n /**\n * Check if any actions to prevent long press\n */\n const hasAttachmentActions =\n !isMessageTypeDeleted &&\n Array.isArray(message.attachments) &&\n message.attachments.some((attachment) => attachment.actions && attachment.actions.length);\n\n const messageContentOrder = messageContentOrderProp.filter((content) => {\n if (content === 'quoted_reply') {\n return !!message.quoted_message;\n }\n\n switch (content) {\n case 'attachments':\n return !!attachments.other.length;\n case 'files':\n return !!attachments.files.length;\n case 'gallery':\n return !!attachments.images.length || !!attachments.videos.length;\n case 'text':\n default:\n return !!message.text;\n }\n });\n\n const emojiOnlyText = useMemo(() => {\n if (!message.text) return false;\n return hasOnlyEmojis(message.text);\n }, [message.text]);\n\n const onlyEmojis =\n !attachments.files.length &&\n !attachments.images.length &&\n !attachments.other.length &&\n emojiOnlyText;\n\n const onOpenThread = () => {\n if (onThreadSelect) {\n onThreadSelect(message);\n }\n if (openThread) {\n openThread(message);\n }\n };\n\n const hasReactions =\n !isMessageTypeDeleted && !!message.latest_reactions && message.latest_reactions.length > 0;\n\n const clientId = client.userID;\n\n const reactions = hasReactions\n ? supportedReactions.reduce((acc, cur) => {\n const reactionType = cur.type;\n const reactionsOfReactionType = message.latest_reactions?.filter(\n (reaction) => reaction.type === reactionType,\n );\n\n if (reactionsOfReactionType?.length) {\n const hasOwnReaction = reactionsOfReactionType.some(\n (reaction) => reaction.user_id === clientId,\n );\n acc.push({ own: hasOwnReaction, type: reactionType });\n }\n\n return acc;\n }, [] as Reactions)\n : [];\n\n const ownCapabilities = useOwnCapabilitiesContext();\n\n const {\n handleDeleteMessage,\n handleEditMessage,\n handleQuotedReplyMessage,\n handleResendMessage,\n handleToggleBanUser,\n handleToggleMuteUser,\n handleTogglePinMessage,\n handleToggleReaction,\n } = useMessageActionHandlers({\n channel,\n client,\n deleteMessage: deleteMessageFromContext,\n deleteReaction,\n enforceUniqueReaction,\n message,\n retrySendMessage,\n sendReaction,\n setEditingState,\n setQuotedMessageState,\n supportedReactions,\n });\n\n const {\n blockUser,\n copyMessage,\n deleteMessage,\n editMessage,\n flagMessage,\n handleReaction,\n muteUser,\n pinMessage,\n quotedReply,\n retry,\n threadReply,\n unpinMessage,\n } = useMessageActions({\n channel,\n client,\n deleteMessage: deleteMessageFromContext,\n deleteReaction,\n enforceUniqueReaction,\n handleBlock,\n handleCopy,\n handleDelete,\n handleEdit,\n handleFlag,\n handleMute,\n handlePinMessage,\n handleQuotedReply,\n handleReaction: handleReactionProp,\n handleRetry,\n handleThreadReply,\n message,\n onThreadSelect,\n openThread,\n removeMessage,\n retrySendMessage,\n selectReaction,\n sendReaction,\n setEditingState,\n setOverlay,\n setQuotedMessageState,\n supportedReactions,\n t,\n updateMessage,\n });\n\n const { userLanguage } = useTranslationContext();\n\n const showMessageOverlay = async (messageReactions = false, error = errorOrFailed) => {\n await dismissKeyboard();\n\n const isThreadMessage = threadList || !!message.parent_id;\n\n const dismissOverlay = () => setOverlay('none');\n\n const messageActions =\n typeof messageActionsProp !== 'function'\n ? messageActionsProp\n : messageActionsProp({\n blockUser,\n copyMessage,\n deleteMessage,\n dismissOverlay,\n editMessage,\n error,\n flagMessage,\n isMyMessage,\n isThreadMessage,\n message,\n messageReactions,\n muteUser,\n ownCapabilities,\n pinMessage,\n quotedReply,\n retry,\n threadReply,\n unpinMessage,\n });\n\n setData({\n alignment,\n chatContext,\n clientId: client.userID,\n files: attachments.files,\n groupStyles,\n handleReaction: ownCapabilities.sendReaction ? handleReaction : undefined,\n images: attachments.images,\n message,\n messageActions: messageActions?.filter(Boolean) as MessageActionListItemProps[] | undefined,\n messageContext: { ...messageContext, disabled: true, preventPress: true },\n messageReactionTitle: !error && messageReactions ? t('Message Reactions') : undefined,\n messagesContext: { ...messagesContext, messageContentOrder },\n onlyEmojis,\n otherAttachments: attachments.other,\n OverlayReactionList,\n ownCapabilities,\n supportedReactions,\n threadList,\n userLanguage,\n videos: attachments.videos,\n });\n\n setOverlay('message');\n };\n\n const actionHandlers: MessageActionHandlers = {\n deleteMessage: handleDeleteMessage,\n editMessage: handleEditMessage,\n pinMessage: handleTogglePinMessage,\n quotedReply: handleQuotedReplyMessage,\n resendMessage: handleResendMessage,\n showMessageOverlay,\n toggleBanUser: handleToggleBanUser,\n toggleMuteUser: handleToggleMuteUser,\n toggleReaction: handleToggleReaction,\n };\n\n const onLongPressMessage =\n disabled || hasAttachmentActions\n ? () => null\n : onLongPressMessageProp\n ? (payload?: TouchableHandlerPayload) =>\n onLongPressMessageProp({\n actionHandlers,\n defaultHandler: payload?.defaultHandler || showMessageOverlay,\n emitter: payload?.emitter || 'message',\n event: payload?.event,\n message,\n })\n : onLongPressProp\n ? (payload?: TouchableHandlerPayload) =>\n onLongPressProp({\n actionHandlers,\n defaultHandler: payload?.defaultHandler || showMessageOverlay,\n emitter: payload?.emitter || 'message',\n event: payload?.event,\n })\n : enableLongPress\n ? () => {\n triggerHaptic('impactMedium');\n showMessageOverlay(false);\n }\n : () => null;\n\n const messageContext = useCreateMessageContext({\n actionsEnabled,\n alignment,\n channel,\n disabled,\n files: attachments.files,\n goToMessage,\n groupStyles,\n handleAction,\n handleDeleteMessage,\n handleEditMessage,\n handleQuotedReplyMessage,\n handleResendMessage,\n handleToggleBanUser,\n handleToggleMuteUser,\n handleToggleReaction,\n hasReactions,\n images: attachments.images,\n isMyMessage,\n lastGroupMessage: groupStyles?.[0] === 'single' || groupStyles?.[0] === 'bottom',\n lastReceivedId,\n members,\n message,\n messageContentOrder,\n onLongPress: onLongPressMessage,\n onlyEmojis,\n onOpenThread,\n onPress: (payload) => {\n const onPressArgs = {\n actionHandlers,\n additionalInfo: payload.additionalInfo,\n defaultHandler: payload.defaultHandler || onPress,\n emitter: payload.emitter || 'message',\n event: payload.event,\n message,\n };\n\n const handleOnPress = () => {\n if (onPressProp) return onPressProp(onPressArgs);\n if (onPressMessageProp) return onPressMessageProp(onPressArgs);\n if (payload.defaultHandler) return payload.defaultHandler();\n\n return onPress();\n };\n\n handleOnPress();\n },\n onPressIn:\n onPressInProp || onPressInMessageProp\n ? (payload) => {\n const onPressInArgs = {\n actionHandlers,\n defaultHandler: payload.defaultHandler,\n emitter: payload.emitter || 'message',\n event: payload.event,\n message,\n };\n const handleOnpressIn = () => {\n if (onPressInProp) return onPressInProp(onPressInArgs);\n if (onPressInMessageProp) return onPressInMessageProp(onPressInArgs);\n };\n handleOnpressIn();\n }\n : null,\n otherAttachments: attachments.other,\n preventPress,\n reactions,\n showAvatar,\n showMessageOverlay,\n showMessageStatus: typeof showMessageStatus === 'boolean' ? showMessageStatus : isMyMessage,\n threadList,\n videos: attachments.videos,\n });\n\n if (!(isMessageTypeDeleted || messageContentOrder.length)) return null;\n\n return (\n <View\n style={[\n message.pinned && {\n ...targetedMessageContainer,\n backgroundColor: targetedMessageBackground,\n },\n ]}\n testID='message-wrapper'\n >\n <View\n style={[\n style,\n {\n backgroundColor: showUnreadUnderlay ? bg_gradient_start : undefined,\n },\n ]}\n >\n <View\n style={[\n isTargetedMessage\n ? { backgroundColor: targetedMessageBackground, ...targetedMessageUnderlay }\n : {},\n ]}\n >\n <MessageProvider value={messageContext}>\n <MessageSimple />\n </MessageProvider>\n </View>\n </View>\n </View>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: MessagePropsWithContext<StreamChatGenerics>,\n nextProps: MessagePropsWithContext<StreamChatGenerics>,\n) => {\n const {\n chatContext: { mutedUsers: prevMutedUsers },\n goToMessage: prevGoToMessage,\n groupStyles: prevGroupStyles,\n isAttachmentEqual,\n isTargetedMessage: prevIsTargetedMessage,\n lastReceivedId: prevLastReceivedId,\n members: prevMembers,\n message: prevMessage,\n showUnreadUnderlay: prevShowUnreadUnderlay,\n t: prevT,\n } = prevProps;\n const {\n chatContext: { mutedUsers: nextMutedUsers },\n goToMessage: nextGoToMessage,\n groupStyles: nextGroupStyles,\n isTargetedMessage: nextIsTargetedMessage,\n lastReceivedId: nextLastReceivedId,\n members: nextMembers,\n message: nextMessage,\n showUnreadUnderlay: nextShowUnreadUnderlay,\n t: nextT,\n } = nextProps;\n\n const membersEqual = Object.keys(prevMembers).length === Object.keys(nextMembers).length;\n if (!membersEqual) return false;\n\n const repliesEqual = prevMessage.reply_count === nextMessage.reply_count;\n if (!repliesEqual) return false;\n\n const lastReceivedIdChangedAndMatters =\n prevLastReceivedId !== nextLastReceivedId &&\n (prevLastReceivedId === prevMessage.id ||\n prevLastReceivedId === nextMessage.id ||\n nextLastReceivedId === prevMessage.id ||\n nextLastReceivedId === nextMessage.id);\n\n if (lastReceivedIdChangedAndMatters) return false;\n\n const goToMessageChangedAndMatters =\n nextMessage.quoted_message_id && prevGoToMessage !== nextGoToMessage;\n\n if (goToMessageChangedAndMatters) return false;\n\n const groupStylesEqual =\n prevGroupStyles.length === nextGroupStyles.length && prevGroupStyles[0] === nextGroupStyles[0];\n if (!groupStylesEqual) return false;\n\n const isPrevMessageTypeDeleted = prevMessage.type === 'deleted';\n const isNextMessageTypeDeleted = nextMessage.type === 'deleted';\n\n const messageEqual =\n isPrevMessageTypeDeleted === isNextMessageTypeDeleted &&\n (isMessageWithStylesReadByAndDateSeparator(prevMessage) && prevMessage.readBy) ===\n (isMessageWithStylesReadByAndDateSeparator(nextMessage) && nextMessage.readBy) &&\n prevMessage.status === nextMessage.status &&\n prevMessage.type === nextMessage.type &&\n prevMessage.text === nextMessage.text &&\n prevMessage.pinned === nextMessage.pinned &&\n `${prevMessage?.updated_at}` === `${nextMessage?.updated_at}`;\n\n if (!messageEqual) return false;\n\n const isPrevQuotedMessageTypeDeleted = prevMessage.quoted_message?.type === 'deleted';\n const isNextQuotedMessageTypeDeleted = nextMessage.quoted_message?.type === 'deleted';\n\n const quotedMessageEqual =\n prevMessage.quoted_message?.id === nextMessage.quoted_message?.id &&\n isPrevQuotedMessageTypeDeleted === isNextQuotedMessageTypeDeleted;\n\n if (!quotedMessageEqual) return false;\n\n const messageUserBannedEqual = prevMessage.user?.banned === nextMessage.user?.banned;\n if (!messageUserBannedEqual) return false;\n\n const prevMessageAttachments = prevMessage.attachments;\n const nextMessageAttachments = nextMessage.attachments;\n const attachmentsEqual =\n (Array.isArray(prevMessageAttachments) &&\n Array.isArray(nextMessageAttachments) &&\n prevMessageAttachments.length === nextMessageAttachments.length &&\n prevMessageAttachments.every((attachment, index) => {\n const attachmentKeysEqual =\n attachment.type === 'image'\n ? attachment.image_url === nextMessageAttachments[index].image_url &&\n attachment.thumb_url === nextMessageAttachments[index].thumb_url\n : attachment.type === nextMessageAttachments[index].type;\n\n if (isAttachmentEqual)\n return (\n attachmentKeysEqual && !!isAttachmentEqual(attachment, nextMessageAttachments[index])\n );\n\n return attachmentKeysEqual;\n })) ||\n prevMessageAttachments === nextMessageAttachments;\n if (!attachmentsEqual) return false;\n\n const latestReactionsEqual =\n Array.isArray(prevMessage.latest_reactions) && Array.isArray(nextMessage.latest_reactions)\n ? prevMessage.latest_reactions.length === nextMessage.latest_reactions.length &&\n prevMessage.latest_reactions.every(\n ({ type }, index) => type === nextMessage.latest_reactions?.[index].type,\n )\n : prevMessage.latest_reactions === nextMessage.latest_reactions;\n if (!latestReactionsEqual) return false;\n\n const mutedUserSame =\n prevMutedUsers.length === nextMutedUsers.length ||\n prevMutedUsers.some((mutedUser) => mutedUser.target.id === prevMessage.user?.id) ===\n nextMutedUsers.some((mutedUser) => mutedUser.target.id === nextMessage.user?.id);\n if (!mutedUserSame) return false;\n\n const showUnreadUnderlayEqual = prevShowUnreadUnderlay === nextShowUnreadUnderlay;\n if (!showUnreadUnderlayEqual) return false;\n\n const tEqual = prevT === nextT;\n if (!tEqual) return false;\n\n const targetedMessageEqual = prevIsTargetedMessage === nextIsTargetedMessage;\n if (!targetedMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedMessage = React.memo(MessageWithContext, areEqual) as typeof MessageWithContext;\n\nexport type MessageProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<MessagePropsWithContext<StreamChatGenerics>, 'groupStyles' | 'message'>> &\n Pick<MessagePropsWithContext<StreamChatGenerics>, 'groupStyles' | 'message'>;\n\n/**\n * Message - A high level component which implements all the logic required for a message.\n * The actual rendering of the message is delegated via the \"Message\" property\n *\n * @example ./Message.md\n */\nexport const Message = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessageProps<StreamChatGenerics>,\n) => {\n const { channel, disabled, enforceUniqueReaction, members } =\n useChannelContext<StreamChatGenerics>();\n const chatContext = useChatContext<StreamChatGenerics>();\n const { dismissKeyboard } = useKeyboardContext();\n const { setData } = useMessageOverlayContext<StreamChatGenerics>();\n const messagesContext = useMessagesContext<StreamChatGenerics>();\n const { setOverlay } = useOverlayContext();\n const { openThread } = useThreadContext<StreamChatGenerics>();\n const { t } = useTranslationContext();\n\n return (\n <MemoizedMessage<StreamChatGenerics>\n {...messagesContext}\n {...{\n channel,\n chatContext,\n disabled,\n dismissKeyboard,\n enforceUniqueReaction,\n members,\n messagesContext,\n openThread,\n setData,\n setOverlay,\n t,\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAN,OAAA;AAIA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AAIA,IAAAS,eAAA,GAAAT,OAAA;AAKA,IAAAU,sBAAA,GAAAV,OAAA;AAIA,IAAAW,gBAAA,GAAAX,OAAA;AAIA,IAAAY,eAAA,GAAAZ,OAAA;AAIA,IAAAa,uBAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAf,OAAA;AACA,IAAAgB,mBAAA,GAAAhB,OAAA;AAKA,IAAAi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A7B9H,CAAC,GAAA0P,sBAAA,CAAD1P,CAAC;EAET,OACEvH,MAAA,YAAAqR,aAAA,CAAC4E,eAAe,MAAAhG,SAAA,iBACVzK,eAAe;IAEjBnC,OAAO,EAAPA,OAAO;IACP0B,WAAW,EAAXA,WAAW;IACXvB,QAAQ,EAARA,QAAQ;IACRC,eAAe,EAAfA,eAAe;IACfI,qBAAqB,EAArBA,qBAAqB;IACrBoB,OAAO,EAAPA,OAAO;IACPO,eAAe,EAAfA,eAAe;IACfe,UAAU,EAAVA,UAAU;IACVO,OAAO,EAAPA,OAAO;IACPE,UAAU,EAAVA,UAAU;IACVO,CAAC,EAADA;EAAC,GAECxE,KAAK;IAAA2O,MAAA,EAAApQ,KAAA;IAAAqQ,QAAA;MAAAC,QAAA,EAAArQ,YAAA;MAAAsQ,UAAA;MAAAC,YAAA;IAAA;EAAA,EACV,CAAC;AAEN,CAAC;AAACoF,OAAA,CAAAd,OAAA,GAAAA,OAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useCreateMessageContext","_useMessageActionHandlers","_useMessageActions2","_messageActions","_ChannelContext","_ChatContext","_KeyboardContext","_MessageContext","_MessageOverlayContext","_MessagesContext","_OverlayContext","_OwnCapabilitiesContext","_ThemeContext","_ThreadContext","_TranslationContext","_native","_utils","_useMessageList","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessageWithContext","props","_message$user","isMessageTypeDeleted","message","type","sendReaction","channel","deleteMessageFromContext","deleteMessage","disabled","dismissKeyboard","dismissKeyboardOnMessageTouch","_props$enableLongPres","enableLongPress","enforceUniqueReaction","_props$forceAlignMess","forceAlignMessages","goToMessage","_props$groupStyles","groupStyles","handleBlock","handleCopy","handleDelete","handleEdit","handleFlag","handleMute","handlePinMessage","handleQuotedReply","handleReactionProp","handleReaction","handleRetry","handleThreadReply","chatContext","lastReceivedId","members","_props$messageActions","messageActions","messageActionsProp","defaultMessageActions","messageContentOrderProp","messageContentOrder","messagesContext","MessageSimple","onLongPressProp","onLongPress","onLongPressMessageProp","onLongPressMessage","onPressProp","onPress","onPressMessageProp","onPressMessage","onPressInProp","onPressIn","onPressInMessageProp","onPressInMessage","onThreadSelect","openThread","OverlayReactionList","preventPress","removeMessage","deleteReaction","retrySendMessage","selectReaction","setData","setEditingState","setOverlay","setQuotedMessageState","showAvatar","showMessageStatus","showUnreadUnderlay","style","supportedReactions","t","isTargetedMessage","_props$threadList","threadList","updateMessage","client","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","bg_gradient_start","targetedMessageBackground","_useTheme$theme$messa","messageSimple","targetedMessageContainer","targetedMessageUnderlay","actionsEnabled","status","MessageStatusTypes","RECEIVED","isMyMessage","userID","user","id","handleAction","_ref","_asyncToGenerator2","_regenerator","mark","_callee","name","value","data","wrap","_callee$","_context","prev","next","sendAction","_defineProperty2","sent","parent_id","stop","_x","_x2","apply","arguments","onPressQuotedMessage","quotedMessage","errorOrFailed","FAILED","error","length","undefined","Keyboard","dismiss","quoted_message","isBlockedMessage","showMessageOverlay","alignment","attachments","Array","isArray","reduce","acc","cur","files","push","other","og_scrape_url","isVideoPackageAvailable","videos","image_url","asset_url","thumb_url","title_link","images","hasAttachmentActions","some","attachment","actions","filter","content","text","emojiOnlyText","useMemo","hasOnlyEmojis","onlyEmojis","onOpenThread","hasReactions","latest_reactions","clientId","reactions","_message$latest_react","reactionType","reactionsOfReactionType","reaction","hasOwnReaction","user_id","own","ownCapabilities","useOwnCapabilitiesContext","_useMessageActionHand","useMessageActionHandlers","handleDeleteMessage","handleEditMessage","handleQuotedReplyMessage","handleResendMessage","handleToggleBanUser","handleToggleMuteUser","handleTogglePinMessage","handleToggleReaction","_useMessageActions","useMessageActions","blockUser","copyMessage","editMessage","flagMessage","muteUser","pinMessage","quotedReply","retry","threadReply","unpinMessage","_useTranslationContex","useTranslationContext","userLanguage","_ref2","_callee2","messageReactions","isThreadMessage","dismissOverlay","_args2","_callee2$","_context2","Boolean","messageContext","_extends2","messageReactionTitle","otherAttachments","actionHandlers","resendMessage","toggleBanUser","toggleMuteUser","toggleReaction","payload","defaultHandler","emitter","event","triggerHaptic","useCreateMessageContext","lastGroupMessage","onPressArgs","additionalInfo","handleOnPress","onPressInArgs","handleOnpressIn","createElement","View","pinned","backgroundColor","testID","__self","__source","fileName","lineNumber","columnNumber","MessageProvider","areEqual","prevProps","nextProps","_prevMessage$quoted_m","_nextMessage$quoted_m","_prevMessage$quoted_m2","_nextMessage$quoted_m2","_prevMessage$user","_nextMessage$user","prevMutedUsers","mutedUsers","prevGoToMessage","prevGroupStyles","isAttachmentEqual","prevIsTargetedMessage","prevLastReceivedId","prevMembers","prevMessage","prevShowUnreadUnderlay","prevT","nextMutedUsers","nextGoToMessage","nextGroupStyles","nextIsTargetedMessage","nextLastReceivedId","nextMembers","nextMessage","nextShowUnreadUnderlay","nextT","membersEqual","keys","repliesEqual","reply_count","lastReceivedIdChangedAndMatters","goToMessageChangedAndMatters","quoted_message_id","groupStylesEqual","isPrevMessageTypeDeleted","isNextMessageTypeDeleted","messageEqual","isMessageWithStylesReadByAndDateSeparator","readBy","updated_at","isPrevQuotedMessageTypeDeleted","isNextQuotedMessageTypeDeleted","quotedMessageEqual","messageUserBannedEqual","banned","prevMessageAttachments","nextMessageAttachments","attachmentsEqual","every","index","attachmentKeysEqual","latestReactionsEqual","_ref3","_nextMessage$latest_r","mutedUserSame","mutedUser","_prevMessage$user2","target","_nextMessage$user2","showUnreadUnderlayEqual","tEqual","targetedMessageEqual","MemoizedMessage","React","memo","Message","_useChannelContext","useChannelContext","useChatContext","_useKeyboardContext","useKeyboardContext","_useMessageOverlayCon","useMessageOverlayContext","useMessagesContext","_useOverlayContext","useOverlayContext","_useThreadContext","useThreadContext","_useTranslationContex2","exports"],"sources":["Message.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { GestureResponderEvent, Keyboard, StyleProp, View, ViewStyle } from 'react-native';\n\nimport type { Attachment, UserResponse } from 'stream-chat';\n\nimport { useCreateMessageContext } from './hooks/useCreateMessageContext';\nimport { useMessageActionHandlers } from './hooks/useMessageActionHandlers';\nimport { useMessageActions } from './hooks/useMessageActions';\nimport { messageActions as defaultMessageActions } from './utils/messageActions';\n\nimport {\n ChannelContextValue,\n useChannelContext,\n} from '../../contexts/channelContext/ChannelContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\nimport {\n KeyboardContextValue,\n useKeyboardContext,\n} from '../../contexts/keyboardContext/KeyboardContext';\nimport {\n MessageContextValue,\n MessageProvider,\n Reactions,\n} from '../../contexts/messageContext/MessageContext';\nimport {\n MessageOverlayContextValue,\n useMessageOverlayContext,\n} from '../../contexts/messageOverlayContext/MessageOverlayContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport {\n OverlayContextValue,\n useOverlayContext,\n} from '../../contexts/overlayContext/OverlayContext';\nimport { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';\nimport {\n TranslationContextValue,\n useTranslationContext,\n} from '../../contexts/translationContext/TranslationContext';\n\nimport { isVideoPackageAvailable, triggerHaptic } from '../../native';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { hasOnlyEmojis, isBlockedMessage, MessageStatusTypes } from '../../utils/utils';\n\nimport {\n isMessageWithStylesReadByAndDateSeparator,\n MessageType,\n} from '../MessageList/hooks/useMessageList';\nimport type { MessageActionListItemProps } from '../MessageOverlay/MessageActionListItem';\n\nexport type TouchableEmitter =\n | 'fileAttachment'\n | 'gallery'\n | 'giphy'\n | 'message'\n | 'messageContent'\n | 'messageReplies'\n | 'reactionList';\n\nexport type TextMentionTouchableHandlerPayload<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n emitter: 'textMention';\n additionalInfo?: { user?: UserResponse<StreamChatGenerics> };\n};\n\nexport type UrlTouchableHandlerPayload = {\n emitter: 'textLink' | 'card';\n additionalInfo?: { url?: string };\n};\n\nexport type FileAttachmentTouchableHandlerPayload<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n emitter: 'fileAttachment';\n additionalInfo?: { attachment?: Attachment<StreamChatGenerics> };\n};\n\nexport type TouchableHandlerPayload = {\n defaultHandler?: () => void;\n event?: GestureResponderEvent;\n} & (\n | {\n emitter?: Exclude<TouchableEmitter, 'textMention' | 'textLink' | 'card' | 'fileAttachment'>;\n }\n | TextMentionTouchableHandlerPayload\n | UrlTouchableHandlerPayload\n | FileAttachmentTouchableHandlerPayload\n);\n\nexport type MessageTouchableHandlerPayload<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = TouchableHandlerPayload & {\n actionHandlers?: MessageActionHandlers;\n additionalInfo?: Record<string, unknown>;\n message?: MessageType<StreamChatGenerics>;\n};\n\nexport type MessageActionHandlers = {\n deleteMessage: () => Promise<void>;\n editMessage: () => void;\n pinMessage: () => Promise<void>;\n quotedReply: () => void;\n resendMessage: () => Promise<void>;\n showMessageOverlay: () => void;\n toggleBanUser: () => Promise<void>;\n toggleMuteUser: () => Promise<void>;\n toggleReaction: (reactionType: string) => Promise<void>;\n};\n\nexport type MessagePropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n ChannelContextValue<StreamChatGenerics>,\n 'channel' | 'disabled' | 'enforceUniqueReaction' | 'members'\n> &\n Pick<KeyboardContextValue, 'dismissKeyboard'> &\n Partial<Omit<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'>> &\n Pick<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n | 'sendReaction'\n | 'deleteMessage'\n | 'dismissKeyboardOnMessageTouch'\n | 'forceAlignMessages'\n | 'handleBlock'\n | 'handleCopy'\n | 'handleDelete'\n | 'handleEdit'\n | 'handleFlag'\n | 'handleMute'\n | 'handlePinMessage'\n | 'handleQuotedReply'\n | 'handleReaction'\n | 'handleRetry'\n | 'handleThreadReply'\n | 'isAttachmentEqual'\n | 'messageActions'\n | 'messageContentOrder'\n | 'MessageSimple'\n | 'onLongPressMessage'\n | 'onPressInMessage'\n | 'onPressMessage'\n | 'OverlayReactionList'\n | 'removeMessage'\n | 'deleteReaction'\n | 'retrySendMessage'\n | 'selectReaction'\n | 'setEditingState'\n | 'setQuotedMessageState'\n | 'supportedReactions'\n | 'updateMessage'\n > &\n Pick<MessageOverlayContextValue<StreamChatGenerics>, 'setData'> &\n Pick<OverlayContextValue, 'setOverlay'> &\n Pick<ThreadContextValue<StreamChatGenerics>, 'openThread'> &\n Pick<TranslationContextValue, 't'> & {\n chatContext: ChatContextValue<StreamChatGenerics>;\n messagesContext: MessagesContextValue<StreamChatGenerics>;\n /**\n * Whether or not users are able to long press messages.\n */\n enableLongPress?: boolean;\n goToMessage?: (messageId: string) => void;\n isTargetedMessage?: boolean;\n /**\n * Array of allowed actions or null on message, this can also be a function returning the array.\n * If all the actions need to be disabled an empty array should be provided as value of prop\n */\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we show the overlay with all the message actions on long press.\n *\n * @param message Message object which was long pressed\n * @param event Event object for onLongPress event\n **/\n onLongPress?: (payload: Partial<MessageTouchableHandlerPayload<StreamChatGenerics>>) => void;\n\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we will dismiss the keyboard on press.\n *\n * @param message Message object which was long pressed\n * @param event Event object for onLongPress event\n * */\n onPress?: (payload: Partial<MessageTouchableHandlerPayload<StreamChatGenerics>>) => void;\n onPressIn?: (payload: Partial<MessageTouchableHandlerPayload<StreamChatGenerics>>) => void;\n /**\n * Handler to open the thread on message. This is callback for touch event for replies button.\n *\n * @param message A message object to open the thread upon.\n */\n onThreadSelect?: (message: MessageType<StreamChatGenerics>) => void;\n showUnreadUnderlay?: boolean;\n style?: StyleProp<ViewStyle>;\n };\n\n/**\n * Since this component doesn't consume `messages` from `MessagesContext`,\n * we memoized and broke it up to prevent new messages from re-rendering\n * each individual Message component.\n */\nconst MessageWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessagePropsWithContext<StreamChatGenerics>,\n) => {\n const isMessageTypeDeleted = props.message.type === 'deleted';\n\n const {\n sendReaction,\n channel,\n deleteMessage: deleteMessageFromContext,\n disabled,\n dismissKeyboard,\n dismissKeyboardOnMessageTouch,\n enableLongPress = true,\n enforceUniqueReaction,\n forceAlignMessages = false,\n goToMessage,\n groupStyles = ['bottom'],\n handleBlock,\n handleCopy,\n handleDelete,\n handleEdit,\n handleFlag,\n handleMute,\n handlePinMessage,\n handleQuotedReply,\n handleReaction: handleReactionProp,\n handleRetry,\n handleThreadReply,\n chatContext,\n lastReceivedId,\n members,\n message,\n messageActions: messageActionsProp = defaultMessageActions,\n messageContentOrder: messageContentOrderProp,\n messagesContext,\n MessageSimple,\n onLongPress: onLongPressProp,\n onLongPressMessage: onLongPressMessageProp,\n onPress: onPressProp,\n onPressMessage: onPressMessageProp,\n onPressIn: onPressInProp,\n onPressInMessage: onPressInMessageProp,\n onThreadSelect,\n openThread,\n OverlayReactionList,\n preventPress,\n removeMessage,\n deleteReaction,\n retrySendMessage,\n selectReaction,\n setData,\n setEditingState,\n setOverlay,\n setQuotedMessageState,\n showAvatar,\n showMessageStatus,\n showUnreadUnderlay,\n style,\n supportedReactions,\n t,\n isTargetedMessage,\n threadList = false,\n updateMessage,\n } = props;\n const { client } = chatContext;\n const {\n theme: {\n colors: { bg_gradient_start, targetedMessageBackground },\n messageSimple: { targetedMessageContainer, targetedMessageUnderlay },\n },\n } = useTheme();\n\n const actionsEnabled =\n message.type === 'regular' && message.status === MessageStatusTypes.RECEIVED;\n\n const isMyMessage = client && message && client.userID === message.user?.id;\n\n const handleAction = async (name: string, value: string) => {\n if (message.id) {\n const data = await channel?.sendAction(message.id, { [name]: value });\n if (data?.message) {\n updateMessage(data.message);\n } else {\n removeMessage({\n id: message.id,\n parent_id: message.parent_id,\n });\n }\n }\n };\n\n const onPressQuotedMessage = (quotedMessage: MessageType<StreamChatGenerics>) => {\n if (!goToMessage) return;\n\n goToMessage(quotedMessage.id);\n };\n\n const errorOrFailed = message.type === 'error' || message.status === MessageStatusTypes.FAILED;\n\n const onPress = (error = errorOrFailed) => {\n if (dismissKeyboardOnMessageTouch) {\n Keyboard.dismiss();\n }\n const quotedMessage = message.quoted_message as MessageType<StreamChatGenerics>;\n if (error) {\n if (isBlockedMessage(message)) {\n return;\n }\n showMessageOverlay(false, true);\n } else if (quotedMessage) {\n onPressQuotedMessage(quotedMessage);\n }\n };\n\n const alignment =\n forceAlignMessages && (forceAlignMessages === 'left' || forceAlignMessages === 'right')\n ? forceAlignMessages\n : isMyMessage\n ? 'right'\n : 'left';\n\n /**\n * attachments contain files/images or other attachments\n *\n * if a URL attachment is present with a file/image then we\n * show just the text and markdown should make the link\n * clickable\n */\n const attachments =\n !isMessageTypeDeleted && Array.isArray(message.attachments)\n ? message.attachments.reduce(\n (acc, cur) => {\n if (cur.type === 'file') {\n acc.files.push(cur);\n acc.other = []; // remove other attachments if a file exists\n } else if (cur.type === 'video' && !cur.og_scrape_url && isVideoPackageAvailable()) {\n acc.videos.push({\n image_url: cur.asset_url,\n thumb_url: cur.thumb_url,\n type: 'video',\n });\n acc.other = [];\n } else if (cur.type === 'video' && !cur.og_scrape_url) {\n acc.files.push(cur);\n acc.other = []; // remove other attachments if a file exists\n } else if (cur.type === 'audio') {\n acc.files.push(cur);\n } else if (cur.type === 'image' && !cur.title_link && !cur.og_scrape_url) {\n /**\n * this next if is not combined with the above one for cases where we have\n * an image with no url links at all falling back to being an attachment\n */\n if (cur.image_url || cur.thumb_url) {\n acc.images.push(cur);\n acc.other = []; // remove other attachments if an image exists\n }\n // only add other attachments if there are no files/images\n } else if (!acc.files.length && !acc.images.length && !acc.videos.length) {\n acc.other.push(cur);\n }\n\n return acc;\n },\n {\n files: [] as Attachment<StreamChatGenerics>[],\n images: [] as Attachment<StreamChatGenerics>[],\n other: [] as Attachment<StreamChatGenerics>[],\n videos: [] as Attachment<StreamChatGenerics>[],\n },\n )\n : {\n files: [] as Attachment<StreamChatGenerics>[],\n images: [] as Attachment<StreamChatGenerics>[],\n other: [] as Attachment<StreamChatGenerics>[],\n videos: [] as Attachment<StreamChatGenerics>[],\n };\n /**\n * Check if any actions to prevent long press\n */\n const hasAttachmentActions =\n !isMessageTypeDeleted &&\n Array.isArray(message.attachments) &&\n message.attachments.some((attachment) => attachment.actions && attachment.actions.length);\n\n const messageContentOrder = messageContentOrderProp.filter((content) => {\n if (content === 'quoted_reply') {\n return !!message.quoted_message;\n }\n\n switch (content) {\n case 'attachments':\n return !!attachments.other.length;\n case 'files':\n return !!attachments.files.length;\n case 'gallery':\n return !!attachments.images.length || !!attachments.videos.length;\n case 'text':\n default:\n return !!message.text;\n }\n });\n\n const emojiOnlyText = useMemo(() => {\n if (!message.text) return false;\n return hasOnlyEmojis(message.text);\n }, [message.text]);\n\n const onlyEmojis =\n !attachments.files.length &&\n !attachments.images.length &&\n !attachments.other.length &&\n emojiOnlyText;\n\n const onOpenThread = () => {\n if (onThreadSelect) {\n onThreadSelect(message);\n }\n if (openThread) {\n openThread(message);\n }\n };\n\n const hasReactions =\n !isMessageTypeDeleted && !!message.latest_reactions && message.latest_reactions.length > 0;\n\n const clientId = client.userID;\n\n const reactions = hasReactions\n ? supportedReactions.reduce((acc, cur) => {\n const reactionType = cur.type;\n const reactionsOfReactionType = message.latest_reactions?.filter(\n (reaction) => reaction.type === reactionType,\n );\n\n if (reactionsOfReactionType?.length) {\n const hasOwnReaction = reactionsOfReactionType.some(\n (reaction) => reaction.user_id === clientId,\n );\n acc.push({ own: hasOwnReaction, type: reactionType });\n }\n\n return acc;\n }, [] as Reactions)\n : [];\n\n const ownCapabilities = useOwnCapabilitiesContext();\n\n const {\n handleDeleteMessage,\n handleEditMessage,\n handleQuotedReplyMessage,\n handleResendMessage,\n handleToggleBanUser,\n handleToggleMuteUser,\n handleTogglePinMessage,\n handleToggleReaction,\n } = useMessageActionHandlers({\n channel,\n client,\n deleteMessage: deleteMessageFromContext,\n deleteReaction,\n enforceUniqueReaction,\n message,\n retrySendMessage,\n sendReaction,\n setEditingState,\n setQuotedMessageState,\n supportedReactions,\n });\n\n const {\n blockUser,\n copyMessage,\n deleteMessage,\n editMessage,\n flagMessage,\n handleReaction,\n muteUser,\n pinMessage,\n quotedReply,\n retry,\n threadReply,\n unpinMessage,\n } = useMessageActions({\n channel,\n client,\n deleteMessage: deleteMessageFromContext,\n deleteReaction,\n enforceUniqueReaction,\n handleBlock,\n handleCopy,\n handleDelete,\n handleEdit,\n handleFlag,\n handleMute,\n handlePinMessage,\n handleQuotedReply,\n handleReaction: handleReactionProp,\n handleRetry,\n handleThreadReply,\n message,\n onThreadSelect,\n openThread,\n removeMessage,\n retrySendMessage,\n selectReaction,\n sendReaction,\n setEditingState,\n setOverlay,\n setQuotedMessageState,\n supportedReactions,\n t,\n updateMessage,\n });\n\n const { userLanguage } = useTranslationContext();\n\n const showMessageOverlay = async (messageReactions = false, error = errorOrFailed) => {\n await dismissKeyboard();\n\n const isThreadMessage = threadList || !!message.parent_id;\n\n const dismissOverlay = () => setOverlay('none');\n\n const messageActions =\n typeof messageActionsProp !== 'function'\n ? messageActionsProp\n : messageActionsProp({\n blockUser,\n copyMessage,\n deleteMessage,\n dismissOverlay,\n editMessage,\n error,\n flagMessage,\n isMyMessage,\n isThreadMessage,\n message,\n messageReactions,\n muteUser,\n ownCapabilities,\n pinMessage,\n quotedReply,\n retry,\n threadReply,\n unpinMessage,\n });\n\n setData({\n alignment,\n chatContext,\n clientId: client.userID,\n files: attachments.files,\n groupStyles,\n handleReaction: ownCapabilities.sendReaction ? handleReaction : undefined,\n images: attachments.images,\n message,\n messageActions: messageActions?.filter(Boolean) as MessageActionListItemProps[] | undefined,\n messageContext: { ...messageContext, disabled: true, preventPress: true },\n messageReactionTitle: !error && messageReactions ? t('Message Reactions') : undefined,\n messagesContext: { ...messagesContext, messageContentOrder },\n onlyEmojis,\n otherAttachments: attachments.other,\n OverlayReactionList,\n ownCapabilities,\n supportedReactions,\n threadList,\n userLanguage,\n videos: attachments.videos,\n });\n\n setOverlay('message');\n };\n\n const actionHandlers: MessageActionHandlers = {\n deleteMessage: handleDeleteMessage,\n editMessage: handleEditMessage,\n pinMessage: handleTogglePinMessage,\n quotedReply: handleQuotedReplyMessage,\n resendMessage: handleResendMessage,\n showMessageOverlay,\n toggleBanUser: handleToggleBanUser,\n toggleMuteUser: handleToggleMuteUser,\n toggleReaction: handleToggleReaction,\n };\n\n const onLongPressMessage =\n disabled || hasAttachmentActions || isBlockedMessage(message)\n ? () => null\n : onLongPressMessageProp\n ? (payload?: TouchableHandlerPayload) =>\n onLongPressMessageProp({\n actionHandlers,\n defaultHandler: payload?.defaultHandler || showMessageOverlay,\n emitter: payload?.emitter || 'message',\n event: payload?.event,\n message,\n })\n : onLongPressProp\n ? (payload?: TouchableHandlerPayload) =>\n onLongPressProp({\n actionHandlers,\n defaultHandler: payload?.defaultHandler || showMessageOverlay,\n emitter: payload?.emitter || 'message',\n event: payload?.event,\n })\n : enableLongPress\n ? () => {\n triggerHaptic('impactMedium');\n showMessageOverlay(false);\n }\n : () => null;\n\n const messageContext = useCreateMessageContext({\n actionsEnabled,\n alignment,\n channel,\n disabled,\n files: attachments.files,\n goToMessage,\n groupStyles,\n handleAction,\n handleDeleteMessage,\n handleEditMessage,\n handleQuotedReplyMessage,\n handleResendMessage,\n handleToggleBanUser,\n handleToggleMuteUser,\n handleToggleReaction,\n hasReactions,\n images: attachments.images,\n isMyMessage,\n lastGroupMessage: groupStyles?.[0] === 'single' || groupStyles?.[0] === 'bottom',\n lastReceivedId,\n members,\n message,\n messageContentOrder,\n onLongPress: onLongPressMessage,\n onlyEmojis,\n onOpenThread,\n onPress: (payload) => {\n const onPressArgs = {\n actionHandlers,\n additionalInfo: payload.additionalInfo,\n defaultHandler: payload.defaultHandler || onPress,\n emitter: payload.emitter || 'message',\n event: payload.event,\n message,\n };\n\n const handleOnPress = () => {\n if (onPressProp) return onPressProp(onPressArgs);\n if (onPressMessageProp) return onPressMessageProp(onPressArgs);\n if (payload.defaultHandler) return payload.defaultHandler();\n\n return onPress();\n };\n\n handleOnPress();\n },\n onPressIn:\n onPressInProp || onPressInMessageProp\n ? (payload) => {\n const onPressInArgs = {\n actionHandlers,\n defaultHandler: payload.defaultHandler,\n emitter: payload.emitter || 'message',\n event: payload.event,\n message,\n };\n const handleOnpressIn = () => {\n if (onPressInProp) return onPressInProp(onPressInArgs);\n if (onPressInMessageProp) return onPressInMessageProp(onPressInArgs);\n };\n handleOnpressIn();\n }\n : null,\n otherAttachments: attachments.other,\n preventPress,\n reactions,\n showAvatar,\n showMessageOverlay,\n showMessageStatus: typeof showMessageStatus === 'boolean' ? showMessageStatus : isMyMessage,\n threadList,\n videos: attachments.videos,\n });\n\n if (!(isMessageTypeDeleted || messageContentOrder.length)) return null;\n\n return (\n <View\n style={[\n message.pinned && {\n ...targetedMessageContainer,\n backgroundColor: targetedMessageBackground,\n },\n ]}\n testID='message-wrapper'\n >\n <View\n style={[\n style,\n {\n backgroundColor: showUnreadUnderlay ? bg_gradient_start : undefined,\n },\n ]}\n >\n <View\n style={[\n isTargetedMessage\n ? { backgroundColor: targetedMessageBackground, ...targetedMessageUnderlay }\n : {},\n ]}\n >\n <MessageProvider value={messageContext}>\n <MessageSimple />\n </MessageProvider>\n </View>\n </View>\n </View>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: MessagePropsWithContext<StreamChatGenerics>,\n nextProps: MessagePropsWithContext<StreamChatGenerics>,\n) => {\n const {\n chatContext: { mutedUsers: prevMutedUsers },\n goToMessage: prevGoToMessage,\n groupStyles: prevGroupStyles,\n isAttachmentEqual,\n isTargetedMessage: prevIsTargetedMessage,\n lastReceivedId: prevLastReceivedId,\n members: prevMembers,\n message: prevMessage,\n showUnreadUnderlay: prevShowUnreadUnderlay,\n t: prevT,\n } = prevProps;\n const {\n chatContext: { mutedUsers: nextMutedUsers },\n goToMessage: nextGoToMessage,\n groupStyles: nextGroupStyles,\n isTargetedMessage: nextIsTargetedMessage,\n lastReceivedId: nextLastReceivedId,\n members: nextMembers,\n message: nextMessage,\n showUnreadUnderlay: nextShowUnreadUnderlay,\n t: nextT,\n } = nextProps;\n\n const membersEqual = Object.keys(prevMembers).length === Object.keys(nextMembers).length;\n if (!membersEqual) return false;\n\n const repliesEqual = prevMessage.reply_count === nextMessage.reply_count;\n if (!repliesEqual) return false;\n\n const lastReceivedIdChangedAndMatters =\n prevLastReceivedId !== nextLastReceivedId &&\n (prevLastReceivedId === prevMessage.id ||\n prevLastReceivedId === nextMessage.id ||\n nextLastReceivedId === prevMessage.id ||\n nextLastReceivedId === nextMessage.id);\n\n if (lastReceivedIdChangedAndMatters) return false;\n\n const goToMessageChangedAndMatters =\n nextMessage.quoted_message_id && prevGoToMessage !== nextGoToMessage;\n\n if (goToMessageChangedAndMatters) return false;\n\n const groupStylesEqual =\n prevGroupStyles.length === nextGroupStyles.length && prevGroupStyles[0] === nextGroupStyles[0];\n if (!groupStylesEqual) return false;\n\n const isPrevMessageTypeDeleted = prevMessage.type === 'deleted';\n const isNextMessageTypeDeleted = nextMessage.type === 'deleted';\n\n const messageEqual =\n isPrevMessageTypeDeleted === isNextMessageTypeDeleted &&\n (isMessageWithStylesReadByAndDateSeparator(prevMessage) && prevMessage.readBy) ===\n (isMessageWithStylesReadByAndDateSeparator(nextMessage) && nextMessage.readBy) &&\n prevMessage.status === nextMessage.status &&\n prevMessage.type === nextMessage.type &&\n prevMessage.text === nextMessage.text &&\n prevMessage.pinned === nextMessage.pinned &&\n `${prevMessage?.updated_at}` === `${nextMessage?.updated_at}`;\n\n if (!messageEqual) return false;\n\n const isPrevQuotedMessageTypeDeleted = prevMessage.quoted_message?.type === 'deleted';\n const isNextQuotedMessageTypeDeleted = nextMessage.quoted_message?.type === 'deleted';\n\n const quotedMessageEqual =\n prevMessage.quoted_message?.id === nextMessage.quoted_message?.id &&\n isPrevQuotedMessageTypeDeleted === isNextQuotedMessageTypeDeleted;\n\n if (!quotedMessageEqual) return false;\n\n const messageUserBannedEqual = prevMessage.user?.banned === nextMessage.user?.banned;\n if (!messageUserBannedEqual) return false;\n\n const prevMessageAttachments = prevMessage.attachments;\n const nextMessageAttachments = nextMessage.attachments;\n const attachmentsEqual =\n (Array.isArray(prevMessageAttachments) &&\n Array.isArray(nextMessageAttachments) &&\n prevMessageAttachments.length === nextMessageAttachments.length &&\n prevMessageAttachments.every((attachment, index) => {\n const attachmentKeysEqual =\n attachment.type === 'image'\n ? attachment.image_url === nextMessageAttachments[index].image_url &&\n attachment.thumb_url === nextMessageAttachments[index].thumb_url\n : attachment.type === nextMessageAttachments[index].type;\n\n if (isAttachmentEqual)\n return (\n attachmentKeysEqual && !!isAttachmentEqual(attachment, nextMessageAttachments[index])\n );\n\n return attachmentKeysEqual;\n })) ||\n prevMessageAttachments === nextMessageAttachments;\n if (!attachmentsEqual) return false;\n\n const latestReactionsEqual =\n Array.isArray(prevMessage.latest_reactions) && Array.isArray(nextMessage.latest_reactions)\n ? prevMessage.latest_reactions.length === nextMessage.latest_reactions.length &&\n prevMessage.latest_reactions.every(\n ({ type }, index) => type === nextMessage.latest_reactions?.[index].type,\n )\n : prevMessage.latest_reactions === nextMessage.latest_reactions;\n if (!latestReactionsEqual) return false;\n\n const mutedUserSame =\n prevMutedUsers.length === nextMutedUsers.length ||\n prevMutedUsers.some((mutedUser) => mutedUser.target.id === prevMessage.user?.id) ===\n nextMutedUsers.some((mutedUser) => mutedUser.target.id === nextMessage.user?.id);\n if (!mutedUserSame) return false;\n\n const showUnreadUnderlayEqual = prevShowUnreadUnderlay === nextShowUnreadUnderlay;\n if (!showUnreadUnderlayEqual) return false;\n\n const tEqual = prevT === nextT;\n if (!tEqual) return false;\n\n const targetedMessageEqual = prevIsTargetedMessage === nextIsTargetedMessage;\n if (!targetedMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedMessage = React.memo(MessageWithContext, areEqual) as typeof MessageWithContext;\n\nexport type MessageProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<MessagePropsWithContext<StreamChatGenerics>, 'groupStyles' | 'message'>> &\n Pick<MessagePropsWithContext<StreamChatGenerics>, 'groupStyles' | 'message'>;\n\n/**\n * Message - A high level component which implements all the logic required for a message.\n * The actual rendering of the message is delegated via the \"Message\" property\n *\n * @example ./Message.md\n */\nexport const Message = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: MessageProps<StreamChatGenerics>,\n) => {\n const { channel, disabled, enforceUniqueReaction, members } =\n useChannelContext<StreamChatGenerics>();\n const chatContext = useChatContext<StreamChatGenerics>();\n const { dismissKeyboard } = useKeyboardContext();\n const { setData } = useMessageOverlayContext<StreamChatGenerics>();\n const messagesContext = useMessagesContext<StreamChatGenerics>();\n const { setOverlay } = useOverlayContext();\n const { openThread } = useThreadContext<StreamChatGenerics>();\n const { t } = useTranslationContext();\n\n return (\n <MemoizedMessage<StreamChatGenerics>\n {...messagesContext}\n {...{\n channel,\n chatContext,\n disabled,\n dismissKeyboard,\n enforceUniqueReaction,\n members,\n messagesContext,\n openTh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