stream-chat-react-native-core 5.21.0-beta.1 → 5.21.0-beta.3

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.
Files changed (66) hide show
  1. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +34 -17
  2. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  3. package/lib/commonjs/components/MessageInput/MessageInput.js +36 -30
  4. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  5. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +5 -3
  6. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  7. package/lib/commonjs/i18n/en.json +3 -1
  8. package/lib/commonjs/i18n/fr.json +48 -46
  9. package/lib/commonjs/i18n/he.json +1 -0
  10. package/lib/commonjs/i18n/hi.json +48 -46
  11. package/lib/commonjs/i18n/it.json +48 -46
  12. package/lib/commonjs/i18n/ja.json +1 -0
  13. package/lib/commonjs/i18n/ko.json +1 -0
  14. package/lib/commonjs/i18n/nl.json +48 -46
  15. package/lib/commonjs/i18n/ru.json +48 -46
  16. package/lib/commonjs/i18n/tr.json +48 -46
  17. package/lib/commonjs/native.js +6 -1
  18. package/lib/commonjs/native.js.map +1 -1
  19. package/lib/commonjs/version.json +1 -1
  20. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +34 -17
  21. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  22. package/lib/module/components/MessageInput/MessageInput.js +36 -30
  23. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  24. package/lib/module/contexts/messageInputContext/MessageInputContext.js +5 -3
  25. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  26. package/lib/module/i18n/en.json +3 -1
  27. package/lib/module/i18n/fr.json +48 -46
  28. package/lib/module/i18n/he.json +1 -0
  29. package/lib/module/i18n/hi.json +48 -46
  30. package/lib/module/i18n/it.json +48 -46
  31. package/lib/module/i18n/ja.json +1 -0
  32. package/lib/module/i18n/ko.json +1 -0
  33. package/lib/module/i18n/nl.json +48 -46
  34. package/lib/module/i18n/ru.json +48 -46
  35. package/lib/module/i18n/tr.json +48 -46
  36. package/lib/module/native.js +6 -1
  37. package/lib/module/native.js.map +1 -1
  38. package/lib/module/version.json +1 -1
  39. package/lib/typescript/i18n/en.json +3 -1
  40. package/lib/typescript/i18n/fr.json +48 -46
  41. package/lib/typescript/i18n/he.json +1 -0
  42. package/lib/typescript/i18n/hi.json +48 -46
  43. package/lib/typescript/i18n/it.json +48 -46
  44. package/lib/typescript/i18n/ja.json +1 -0
  45. package/lib/typescript/i18n/ko.json +1 -0
  46. package/lib/typescript/i18n/nl.json +48 -46
  47. package/lib/typescript/i18n/ru.json +48 -46
  48. package/lib/typescript/i18n/tr.json +48 -46
  49. package/lib/typescript/native.d.ts +4 -0
  50. package/lib/typescript/utils/Streami18n.d.ts +2 -0
  51. package/package.json +1 -1
  52. package/src/components/AttachmentPicker/AttachmentPicker.tsx +21 -2
  53. package/src/components/MessageInput/MessageInput.tsx +9 -2
  54. package/src/contexts/messageInputContext/MessageInputContext.tsx +4 -1
  55. package/src/i18n/en.json +3 -1
  56. package/src/i18n/fr.json +48 -46
  57. package/src/i18n/he.json +1 -0
  58. package/src/i18n/hi.json +48 -46
  59. package/src/i18n/it.json +48 -46
  60. package/src/i18n/ja.json +1 -0
  61. package/src/i18n/ko.json +1 -0
  62. package/src/i18n/nl.json +48 -46
  63. package/src/i18n/ru.json +48 -46
  64. package/src/i18n/tr.json +48 -46
  65. package/src/native.ts +9 -0
  66. package/src/version.json +1 -1
@@ -16,6 +16,7 @@ var _duration = _interopRequireDefault(require("dayjs/plugin/duration"));
16
16
  var _AttachmentPickerItem = require("./components/AttachmentPickerItem");
17
17
  var _AttachmentPickerContext = require("../../contexts/attachmentPickerContext/AttachmentPickerContext");
18
18
  var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
19
+ var _TranslationContext = require("../../contexts/translationContext/TranslationContext");
19
20
  var _native = require("../../native");
20
21
  var _utils = require("../../utils/utils");
21
22
  var _this = this,
@@ -65,23 +66,29 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
65
66
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
66
67
  photoError = _useState4[0],
67
68
  setPhotoError = _useState4[1];
68
- var hasNextPageRef = (0, _react.useRef)(true);
69
69
  var _useState5 = (0, _react.useState)(false),
70
70
  _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
71
- loadingPhotos = _useState6[0],
72
- setLoadingPhotos = _useState6[1];
73
- var _useState7 = (0, _react.useState)([]),
71
+ iOSLimited = _useState6[0],
72
+ setIosLimited = _useState6[1];
73
+ var hasNextPageRef = (0, _react.useRef)(true);
74
+ var _useState7 = (0, _react.useState)(false),
74
75
  _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
75
- photos = _useState8[0],
76
- setPhotos = _useState8[1];
76
+ loadingPhotos = _useState8[0],
77
+ setLoadingPhotos = _useState8[1];
78
+ var _useState9 = (0, _react.useState)([]),
79
+ _useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
80
+ photos = _useState10[0],
81
+ setPhotos = _useState10[1];
77
82
  var attemptedToLoadPhotosOnOpenRef = (0, _react.useRef)(false);
83
+ var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
84
+ t = _useTranslationContex.t;
78
85
  var getMorePhotos = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
79
86
  var endCursor, results;
80
87
  return _regenerator["default"].wrap(function _callee$(_context) {
81
88
  while (1) switch (_context.prev = _context.next) {
82
89
  case 0:
83
90
  if (!(hasNextPageRef.current && !loadingPhotos && currentIndex > -1 && selectedPicker === 'images')) {
84
- _context.next = 17;
91
+ _context.next = 18;
85
92
  break;
86
93
  }
87
94
  setPhotoError(false);
@@ -99,20 +106,21 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
99
106
  setPhotos(function (prevPhotos) {
100
107
  return endCursor ? [].concat((0, _toConsumableArray2["default"])(prevPhotos), (0, _toConsumableArray2["default"])(results.assets)) : results.assets;
101
108
  });
109
+ setIosLimited(results.iOSLimited);
102
110
  hasNextPageRef.current = !!results.hasNextPage;
103
- _context.next = 16;
111
+ _context.next = 17;
104
112
  break;
105
- case 13:
106
- _context.prev = 13;
113
+ case 14:
114
+ _context.prev = 14;
107
115
  _context.t0 = _context["catch"](4);
108
116
  setPhotoError(true);
109
- case 16:
110
- setLoadingPhotos(false);
111
117
  case 17:
118
+ setLoadingPhotos(false);
119
+ case 18:
112
120
  case "end":
113
121
  return _context.stop();
114
122
  }
115
- }, _callee, null, [[4, 13]]);
123
+ }, _callee, null, [[4, 14]]);
116
124
  })), [currentIndex, selectedPicker, loadingPhotos]);
117
125
  var getMorePhotosRef = (0, _react.useRef)(getMorePhotos);
118
126
  getMorePhotosRef.current = getMorePhotos;
@@ -235,10 +243,19 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
235
243
  __self: _this,
236
244
  __source: {
237
245
  fileName: _jsxFileName,
238
- lineNumber: 286,
246
+ lineNumber: 302,
239
247
  columnNumber: 9
240
248
  }
241
- }, _react["default"].createElement(_bottomSheet.BottomSheetFlatList, {
249
+ }, iOSLimited && _react["default"].createElement(_reactNative.Button, {
250
+ onPress: _native.iOS14RefreshGallerySelection,
251
+ title: t('Select More Photos'),
252
+ __self: _this,
253
+ __source: {
254
+ fileName: _jsxFileName,
255
+ lineNumber: 319,
256
+ columnNumber: 13
257
+ }
258
+ }), _react["default"].createElement(_bottomSheet.BottomSheetFlatList, {
242
259
  contentContainerStyle: [styles.container, {
243
260
  backgroundColor: white
244
261
  }, bottomSheetContentContainer, {
@@ -254,7 +271,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
254
271
  __self: _this,
255
272
  __source: {
256
273
  fileName: _jsxFileName,
257
- lineNumber: 302,
274
+ lineNumber: 321,
258
275
  columnNumber: 11
259
276
  }
260
277
  })), selectedPicker === 'images' && photoError && _react["default"].createElement(AttachmentPickerError, {
@@ -265,7 +282,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
265
282
  __self: _this,
266
283
  __source: {
267
284
  fileName: _jsxFileName,
268
- lineNumber: 317,
285
+ lineNumber: 336,
269
286
  columnNumber: 11
270
287
  }
271
288
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_native","_utils","_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","screenHeight","vh","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","_useState","useState","_useState2","_slicedToArray2","currentIndex","setCurrentIndex","endCursorRef","useRef","_useState3","_useState4","photoError","setPhotoError","hasNextPageRef","_useState5","_useState6","loadingPhotos","setLoadingPhotos","_useState7","_useState8","photos","setPhotos","attemptedToLoadPhotosOnOpenRef","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","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 { BackHandler, Dimensions, Keyboard, Platform, StatusBar, StyleSheet } 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 { getPhotos, oniOS14GalleryLibrarySelectionChange } from '../../native';\nimport type { Asset } from '../../types/types';\nimport { vh } from '../../utils/utils';\n\ndayjs.extend(duration);\n\nconst styles = StyleSheet.create({\n container: {\n flexGrow: 1,\n },\n});\n\nconst screenHeight = vh(100);\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\n const [currentIndex, setCurrentIndex] = useState(-1);\n const endCursorRef = useRef<string>();\n const [photoError, setPhotoError] = 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\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 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 <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;AAEA,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,OAAA,GAAAT,OAAA;AAEA,IAAAU,MAAA,GAAAV,OAAA;AAAuC,IAAAW,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAf,wBAAAmB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,G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AAA;IAAA;EAAA,CACxC,CACU,CAAC,EACbxG,cAAc,KAAK,QAAQ,IAAIe,UAAU,IACxC/F,MAAA,YAAA6K,aAAA,CAACnH,qBAAqB;IACpBD,iCAAiC,EAAEgH,gBAAiB;IACpD9G,+BAA+B,EAAEA,+BAAgC;IACjEC,0BAA0B,EAAEA,0BAA2B;IACvDC,yBAAyB,EAAEA,yBAA0B;IAAAuH,MAAA,EAAAvK,KAAA;IAAAwK,QAAA;MAAAC,QAAA,EAAAxK,YAAA;MAAAyK,UAAA;MAAAC,YAAA;IAAA;EAAA,CACtD,CAEH,CAAC;AAEP,CACF,CAAC;AAACY,OAAA,CAAAlJ,gBAAA,GAAAA,gBAAA;AAEFA,gBAAgB,CAACmJ,WAAW,GAAG,kBAAkB"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_TranslationContext","_native","_utils","_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","screenHeight","vh","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","_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 {\n getPhotos,\n iOS14RefreshGallerySelection,\n oniOS14GalleryLibrarySelectionChange,\n} from '../../native';\nimport type { Asset } from '../../types/types';\nimport { vh } from '../../utils/utils';\n\ndayjs.extend(duration);\n\nconst styles = StyleSheet.create({\n container: {\n flexGrow: 1,\n },\n});\n\nconst screenHeight = vh(100);\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\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;AAI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A,YAAAqL,aAAA,CAAC1H,qBAAqB;IACpBD,iCAAiC,EAAEuH,gBAAiB;IACpDrH,+BAA+B,EAAEA,+BAAgC;IACjEC,0BAA0B,EAAEA,0BAA2B;IACvDC,yBAAyB,EAAEA,yBAA0B;IAAA8H,MAAA,EAAA9K,KAAA;IAAA+K,QAAA;MAAAC,QAAA,EAAA/K,YAAA;MAAAgL,UAAA;MAAAC,YAAA;IAAA;EAAA,CACtD,CAEH,CAAC;AAEP,CACF,CAAC;AAACgB,OAAA,CAAA7J,gBAAA,GAAAA,gBAAA;AAEFA,gBAAgB,CAAC8J,WAAW,GAAG,kBAAkB"}
@@ -126,6 +126,8 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
126
126
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
127
127
  height = _useState2[0],
128
128
  setHeight = _useState2[1];
129
+ var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
130
+ t = _useTranslationContex.t;
129
131
  var _useTheme = (0, _ThemeContext.useTheme)(),
130
132
  _useTheme$theme = _useTheme.theme,
131
133
  _useTheme$theme$color = _useTheme$theme.colors,
@@ -221,7 +223,9 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
221
223
  return !uploadedImage;
222
224
  });
223
225
  if (imageToUpload && Number(imageToUpload.fileSize) / MEGA_BYTES_TO_BYTES > MAX_FILE_SIZE_TO_UPLOAD_IN_MB) {
224
- _reactNative.Alert.alert("Maximum file size upload limit reached, please upload an image below " + MAX_FILE_SIZE_TO_UPLOAD_IN_MB + "MB.");
226
+ _reactNative.Alert.alert(t("Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.", {
227
+ MAX_FILE_SIZE_TO_UPLOAD_IN_MB: MAX_FILE_SIZE_TO_UPLOAD_IN_MB
228
+ }));
225
229
  setSelectedImages(selectedImages.filter(function (selectedImage) {
226
230
  return selectedImage.uri !== imageToUpload.uri;
227
231
  }));
@@ -257,7 +261,9 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
257
261
  return !uploadedFile;
258
262
  });
259
263
  if (fileToUpload && Number(fileToUpload.size) / MEGA_BYTES_TO_BYTES > MAX_FILE_SIZE_TO_UPLOAD_IN_MB) {
260
- _reactNative.Alert.alert("Maximum file size upload limit reached, please upload a file below " + MAX_FILE_SIZE_TO_UPLOAD_IN_MB + "MB.");
264
+ _reactNative.Alert.alert(t("Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.", {
265
+ MAX_FILE_SIZE_TO_UPLOAD_IN_MB: MAX_FILE_SIZE_TO_UPLOAD_IN_MB
266
+ }));
261
267
  setSelectedFiles(selectedFiles.filter(function (selectedFile) {
262
268
  return selectedFile.uri !== fileToUpload.uri;
263
269
  }));
@@ -387,21 +393,21 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
387
393
  __self: _this,
388
394
  __source: {
389
395
  fileName: _jsxFileName,
390
- lineNumber: 511,
396
+ lineNumber: 518,
391
397
  columnNumber: 7
392
398
  }
393
399
  }, editing && _react["default"].createElement(InputEditingStateHeader, {
394
400
  __self: _this,
395
401
  __source: {
396
402
  fileName: _jsxFileName,
397
- lineNumber: 519,
403
+ lineNumber: 526,
398
404
  columnNumber: 21
399
405
  }
400
406
  }), quotedMessage && _react["default"].createElement(InputReplyStateHeader, {
401
407
  __self: _this,
402
408
  __source: {
403
409
  fileName: _jsxFileName,
404
- lineNumber: 520,
410
+ lineNumber: 527,
405
411
  columnNumber: 27
406
412
  }
407
413
  }), _react["default"].createElement(_reactNative.View, {
@@ -409,7 +415,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
409
415
  __self: _this,
410
416
  __source: {
411
417
  fileName: _jsxFileName,
412
- lineNumber: 521,
418
+ lineNumber: 528,
413
419
  columnNumber: 9
414
420
  }
415
421
  }, Input ? _react["default"].createElement(Input, {
@@ -418,7 +424,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
418
424
  __self: _this,
419
425
  __source: {
420
426
  fileName: _jsxFileName,
421
- lineNumber: 523,
427
+ lineNumber: 530,
422
428
  columnNumber: 13
423
429
  }
424
430
  }) : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_reactNative.View, {
@@ -426,14 +432,14 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
426
432
  __self: _this,
427
433
  __source: {
428
434
  fileName: _jsxFileName,
429
- lineNumber: 529,
435
+ lineNumber: 536,
430
436
  columnNumber: 15
431
437
  }
432
438
  }, InputButtons && _react["default"].createElement(InputButtons, {
433
439
  __self: _this,
434
440
  __source: {
435
441
  fileName: _jsxFileName,
436
- lineNumber: 530,
442
+ lineNumber: 537,
437
443
  columnNumber: 34
438
444
  }
439
445
  })), _react["default"].createElement(_reactNative.View, {
@@ -444,7 +450,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
444
450
  __self: _this,
445
451
  __source: {
446
452
  fileName: _jsxFileName,
447
- lineNumber: 532,
453
+ lineNumber: 539,
448
454
  columnNumber: 15
449
455
  }
450
456
  }, (typeof editing !== 'boolean' && (editing == null ? void 0 : editing.quoted_message) || quotedMessage) && _react["default"].createElement(_reactNative.View, {
@@ -452,21 +458,21 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
452
458
  __self: _this,
453
459
  __source: {
454
460
  fileName: _jsxFileName,
455
- lineNumber: 543,
461
+ lineNumber: 550,
456
462
  columnNumber: 19
457
463
  }
458
464
  }, _react["default"].createElement(Reply, {
459
465
  __self: _this,
460
466
  __source: {
461
467
  fileName: _jsxFileName,
462
- lineNumber: 544,
468
+ lineNumber: 551,
463
469
  columnNumber: 21
464
470
  }
465
471
  })), imageUploads.length ? _react["default"].createElement(ImageUploadPreview, {
466
472
  __self: _this,
467
473
  __source: {
468
474
  fileName: _jsxFileName,
469
- lineNumber: 547,
475
+ lineNumber: 554,
470
476
  columnNumber: 40
471
477
  }
472
478
  }) : null, imageUploads.length && fileUploads.length ? _react["default"].createElement(_reactNative.View, {
@@ -477,14 +483,14 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
477
483
  __self: _this,
478
484
  __source: {
479
485
  fileName: _jsxFileName,
480
- lineNumber: 549,
486
+ lineNumber: 556,
481
487
  columnNumber: 19
482
488
  }
483
489
  }) : null, fileUploads.length ? _react["default"].createElement(FileUploadPreview, {
484
490
  __self: _this,
485
491
  __source: {
486
492
  fileName: _jsxFileName,
487
- lineNumber: 559,
493
+ lineNumber: 566,
488
494
  columnNumber: 39
489
495
  }
490
496
  }) : null, giphyActive ? _react["default"].createElement(InputGiphySearch, {
@@ -492,7 +498,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
492
498
  __self: _this,
493
499
  __source: {
494
500
  fileName: _jsxFileName,
495
- lineNumber: 561,
501
+ lineNumber: 568,
496
502
  columnNumber: 19
497
503
  }
498
504
  }) : _react["default"].createElement(_reactNative.View, {
@@ -500,7 +506,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
500
506
  __self: _this,
501
507
  __source: {
502
508
  fileName: _jsxFileName,
503
- lineNumber: 563,
509
+ lineNumber: 570,
504
510
  columnNumber: 19
505
511
  }
506
512
  }, _react["default"].createElement(_AutoCompleteInput.AutoCompleteInput, {
@@ -509,7 +515,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
509
515
  __self: _this,
510
516
  __source: {
511
517
  fileName: _jsxFileName,
512
- lineNumber: 564,
518
+ lineNumber: 571,
513
519
  columnNumber: 21
514
520
  }
515
521
  }))), _react["default"].createElement(_reactNative.View, {
@@ -517,7 +523,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
517
523
  __self: _this,
518
524
  __source: {
519
525
  fileName: _jsxFileName,
520
- lineNumber: 571,
526
+ lineNumber: 578,
521
527
  columnNumber: 15
522
528
  }
523
529
  }, cooldownRemainingSeconds ? _react["default"].createElement(CooldownTimer, {
@@ -525,7 +531,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
525
531
  __self: _this,
526
532
  __source: {
527
533
  fileName: _jsxFileName,
528
- lineNumber: 573,
534
+ lineNumber: 580,
529
535
  columnNumber: 19
530
536
  }
531
537
  }) : _react["default"].createElement(SendButton, {
@@ -533,7 +539,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
533
539
  __self: _this,
534
540
  __source: {
535
541
  fileName: _jsxFileName,
536
- lineNumber: 575,
542
+ lineNumber: 582,
537
543
  columnNumber: 19
538
544
  }
539
545
  })))), _react["default"].createElement(ShowThreadMessageInChannelButton, {
@@ -541,7 +547,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
541
547
  __self: _this,
542
548
  __source: {
543
549
  fileName: _jsxFileName,
544
- lineNumber: 585,
550
+ lineNumber: 592,
545
551
  columnNumber: 9
546
552
  }
547
553
  })), triggerType && suggestions ? _react["default"].createElement(_reactNative.View, {
@@ -552,7 +558,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
552
558
  __self: _this,
553
559
  __source: {
554
560
  fileName: _jsxFileName,
555
- lineNumber: 589,
561
+ lineNumber: 596,
556
562
  columnNumber: 9
557
563
  }
558
564
  }, _react["default"].createElement(AutoCompleteSuggestionList, {
@@ -564,7 +570,7 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
564
570
  __self: _this,
565
571
  __source: {
566
572
  fileName: _jsxFileName,
567
- lineNumber: 596,
573
+ lineNumber: 603,
568
574
  columnNumber: 11
569
575
  }
570
576
  })) : null, selectedPicker && _react["default"].createElement(_reactNative.View, {
@@ -575,14 +581,14 @@ var MessageInputWithContext = function MessageInputWithContext(props) {
575
581
  __self: _this,
576
582
  __source: {
577
583
  fileName: _jsxFileName,
578
- lineNumber: 606,
584
+ lineNumber: 613,
579
585
  columnNumber: 9
580
586
  }
581
587
  }, _react["default"].createElement(_AttachmentSelectionBar.AttachmentSelectionBar, {
582
588
  __self: _this,
583
589
  __source: {
584
590
  fileName: _jsxFileName,
585
- lineNumber: 618,
591
+ lineNumber: 625,
586
592
  columnNumber: 11
587
593
  }
588
594
  })));
@@ -722,14 +728,14 @@ var MessageInput = function MessageInput(props) {
722
728
  triggerType = _useSuggestionsContex.triggerType;
723
729
  var _useThreadContext = (0, _ThreadContext.useThreadContext)(),
724
730
  thread = _useThreadContext.thread;
725
- var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
726
- t = _useTranslationContex.t;
731
+ var _useTranslationContex2 = (0, _TranslationContext.useTranslationContext)(),
732
+ t = _useTranslationContex2.t;
727
733
  if (!ownCapabilities.sendMessage && SendMessageDisallowedIndicator) {
728
734
  return _react["default"].createElement(SendMessageDisallowedIndicator, {
729
735
  __self: _this,
730
736
  __source: {
731
737
  fileName: _jsxFileName,
732
- lineNumber: 824,
738
+ lineNumber: 831,
733
739
  columnNumber: 12
734
740
  }
735
741
  });
@@ -788,7 +794,7 @@ var MessageInput = function MessageInput(props) {
788
794
  __self: _this,
789
795
  __source: {
790
796
  fileName: _jsxFileName,
791
- lineNumber: 828,
797
+ lineNumber: 835,
792
798
  columnNumber: 5
793
799
  }
794
800
  }));