stream-chat-react-native-core 5.26.1-beta.3 → 5.27.0-beta.2
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 +7 -11
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +27 -0
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -0
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +15 -11
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/i18n/es.json +38 -38
- package/lib/commonjs/i18n/fr.json +38 -38
- package/lib/commonjs/i18n/he.json +38 -38
- package/lib/commonjs/i18n/hi.json +38 -38
- package/lib/commonjs/i18n/it.json +38 -38
- package/lib/commonjs/i18n/ja.json +38 -38
- package/lib/commonjs/i18n/ko.json +38 -38
- package/lib/commonjs/i18n/nl.json +38 -38
- package/lib/commonjs/i18n/pt-BR.json +38 -38
- package/lib/commonjs/i18n/ru.json +38 -38
- package/lib/commonjs/i18n/tr.json +38 -38
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/addReactionToLocalState.js +3 -2
- package/lib/commonjs/utils/addReactionToLocalState.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +7 -11
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +27 -0
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -0
- package/lib/module/contexts/overlayContext/OverlayProvider.js +15 -11
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/i18n/es.json +38 -38
- package/lib/module/i18n/fr.json +38 -38
- package/lib/module/i18n/he.json +38 -38
- package/lib/module/i18n/hi.json +38 -38
- package/lib/module/i18n/it.json +38 -38
- package/lib/module/i18n/ja.json +38 -38
- package/lib/module/i18n/ko.json +38 -38
- package/lib/module/i18n/nl.json +38 -38
- package/lib/module/i18n/pt-BR.json +38 -38
- package/lib/module/i18n/ru.json +38 -38
- package/lib/module/i18n/tr.json +38 -38
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/addReactionToLocalState.js +3 -2
- package/lib/module/utils/addReactionToLocalState.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts +4 -0
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.d.ts +2 -0
- package/lib/typescript/i18n/es.json +38 -38
- package/lib/typescript/i18n/fr.json +38 -38
- package/lib/typescript/i18n/he.json +38 -38
- package/lib/typescript/i18n/hi.json +38 -38
- package/lib/typescript/i18n/it.json +38 -38
- package/lib/typescript/i18n/ja.json +38 -38
- package/lib/typescript/i18n/ko.json +38 -38
- package/lib/typescript/i18n/nl.json +38 -38
- package/lib/typescript/i18n/pt-BR.json +38 -38
- package/lib/typescript/i18n/ru.json +38 -38
- package/lib/typescript/i18n/tr.json +38 -38
- package/lib/typescript/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +8 -19
- package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx +10 -0
- package/src/contexts/overlayContext/OverlayProvider.tsx +3 -0
- package/src/i18n/es.json +38 -38
- package/src/i18n/fr.json +38 -38
- package/src/i18n/he.json +38 -38
- package/src/i18n/hi.json +38 -38
- package/src/i18n/it.json +38 -38
- package/src/i18n/ja.json +38 -38
- package/src/i18n/ko.json +38 -38
- package/src/i18n/nl.json +38 -38
- package/src/i18n/pt-BR.json +38 -38
- package/src/i18n/ru.json +38 -38
- package/src/i18n/tr.json +38 -38
- package/src/index.ts +1 -1
- package/src/utils/addReactionToLocalState.ts +7 -2
- package/src/version.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_hooks","_native","_contexts","_emojiData","_icons","_types","_patchMessageTextCommand","_Streami18n","_utils","_StreamChatRN","_en","_interopRequireDefault","_fr","_hi","_it","_nl","_ru","_tr","_he","_QuickSqliteClient","_version","OfflineStoreApis","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set"],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './hooks';\nexport { registerNativeHandlers, NetInfo } from './native';\nexport * from './contexts';\nexport * from './emoji-data';\n\nexport * from './icons';\n\nexport * from './types/types';\n\nexport * from './utils/patchMessageTextCommand';\nexport * from './utils/Streami18n';\nexport * from './utils/utils';\nexport * from './utils/StreamChatRN';\n\nexport { default as enTranslations } from './i18n/en.json';\nexport { default as frTranslations } from './i18n/fr.json';\nexport { default as hiTranslations } from './i18n/hi.json';\nexport { default as itTranslations } from './i18n/it.json';\nexport { default as nlTranslations } from './i18n/nl.json';\nexport { default as ruTranslations } from './i18n/ru.json';\nexport { default as trTranslations } from './i18n/tr.json';\nexport { default as heTranslations } from './i18n/he.json';\n\nexport { QuickSqliteClient } from './store/QuickSqliteClient';\nexport { version } from './version.json';\n\nimport * as OfflineStoreApis from './store/apis';\nexport { OfflineStoreApis };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_hooks","_native","_contexts","_emojiData","_icons","_types","_patchMessageTextCommand","_Streami18n","_utils","_StreamChatRN","_en","_interopRequireDefault","_fr","_hi","_it","_nl","_ru","_tr","_he","_QuickSqliteClient","_version","OfflineStoreApis","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set"],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './hooks';\nexport { registerNativeHandlers, NetInfo, iOS14RefreshGallerySelection } from './native';\nexport * from './contexts';\nexport * from './emoji-data';\n\nexport * from './icons';\n\nexport * from './types/types';\n\nexport * from './utils/patchMessageTextCommand';\nexport * from './utils/Streami18n';\nexport * from './utils/utils';\nexport * from './utils/StreamChatRN';\n\nexport { default as enTranslations } from './i18n/en.json';\nexport { default as frTranslations } from './i18n/fr.json';\nexport { default as hiTranslations } from './i18n/hi.json';\nexport { default as itTranslations } from './i18n/it.json';\nexport { default as nlTranslations } from './i18n/nl.json';\nexport { default as ruTranslations } from './i18n/ru.json';\nexport { default as trTranslations } from './i18n/tr.json';\nexport { default as heTranslations } from './i18n/he.json';\n\nexport { QuickSqliteClient } from './store/QuickSqliteClient';\nexport { version } from './version.json';\n\nimport * as OfflineStoreApis from './store/apis';\nexport { OfflineStoreApis };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,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A;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAhC,GAAA,CAAA6B,GAAA,SAAAK,MAAA,WAAAC,qBAAA,GAAA9C,MAAA,CAAAS,cAAA,IAAAT,MAAA,CAAA+C,wBAAA,WAAA5C,GAAA,IAAAqC,GAAA,QAAArC,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAkC,GAAA,EAAArC,GAAA,SAAA6C,IAAA,GAAAF,qBAAA,GAAA9C,MAAA,CAAA+C,wBAAA,CAAAP,GAAA,EAAArC,GAAA,cAAA6C,IAAA,KAAAA,IAAA,CAAArC,GAAA,IAAAqC,IAAA,CAAAC,GAAA,KAAAjD,MAAA,CAAAS,cAAA,CAAAoC,MAAA,EAAA1C,GAAA,EAAA6C,IAAA,YAAAH,MAAA,CAAA1C,GAAA,IAAAqC,GAAA,CAAArC,GAAA,SAAA0C,MAAA,cAAAL,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAM,GAAA,CAAAT,GAAA,EAAAK,MAAA,YAAAA,MAAA"}
|
|
@@ -42,7 +42,7 @@ var addReactionToLocalState = function addReactionToLocalState(_ref) {
|
|
|
42
42
|
message.latest_reactions = message.latest_reactions.filter(function (r) {
|
|
43
43
|
return r.user_id !== user.id;
|
|
44
44
|
});
|
|
45
|
-
if (currentReaction && message.reaction_counts) {
|
|
45
|
+
if (currentReaction && message.reaction_counts && message.reaction_counts[currentReaction.type] && message.reaction_counts[currentReaction.type] > 0) {
|
|
46
46
|
message.reaction_counts[currentReaction.type] = message.reaction_counts[currentReaction.type] - 1;
|
|
47
47
|
}
|
|
48
48
|
if (!message.reaction_counts) {
|
|
@@ -55,7 +55,8 @@ var addReactionToLocalState = function addReactionToLocalState(_ref) {
|
|
|
55
55
|
if (!message.reaction_counts) {
|
|
56
56
|
message.reaction_counts = (0, _defineProperty2["default"])({}, reactionType, 1);
|
|
57
57
|
} else {
|
|
58
|
-
|
|
58
|
+
var _message$reaction_cou4;
|
|
59
|
+
message.reaction_counts[reactionType] = (((_message$reaction_cou4 = message.reaction_counts) == null ? void 0 : _message$reaction_cou4[reactionType]) || 0) + 1;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
message.own_reactions = [].concat((0, _toConsumableArray2["default"])(message.own_reactions), [reaction]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_apis","require","_insertReaction","addReactionToLocalState","_ref","channel","enforceUniqueReaction","messageId","reactionType","user","message","state","messages","find","_ref2","id","reaction","created_at","Date","toISOString","message_id","type","updated_at","user_id","hasOwnReaction","own_reactions","length","latest_reactions","currentReaction","filter","r","reaction_counts","_defineProperty2","_message$reaction_cou2","concat","_toConsumableArray2","updateReaction","insertReaction","exports"],"sources":["addReactionToLocalState.ts"],"sourcesContent":["import type { Channel, ReactionResponse, UserResponse } from 'stream-chat';\n\nimport { updateReaction } from '../store/apis';\nimport { insertReaction } from '../store/apis/insertReaction';\n\nimport type { DefaultStreamChatGenerics } from '../types/types';\n\nexport const addReactionToLocalState = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n channel,\n enforceUniqueReaction,\n messageId,\n reactionType,\n user,\n}: {\n channel: Channel<StreamChatGenerics>;\n enforceUniqueReaction: boolean;\n messageId: string;\n reactionType: string;\n user: UserResponse<StreamChatGenerics>;\n}) => {\n const message = channel.state.messages.find(({ id }) => id === messageId);\n\n if (!message) return;\n\n const reaction: ReactionResponse = {\n created_at: new Date().toISOString(),\n message_id: messageId,\n type: reactionType,\n updated_at: new Date().toISOString(),\n user,\n user_id: user?.id,\n };\n\n const hasOwnReaction = message.own_reactions && message.own_reactions.length > 0;\n if (!message.own_reactions) {\n message.own_reactions = [];\n }\n\n if (!message.latest_reactions) {\n message.latest_reactions = [];\n }\n\n if (enforceUniqueReaction) {\n const currentReaction = message.own_reactions[0];\n message.own_reactions = [];\n if (!message.latest_reactions) {\n message.latest_reactions = [];\n }\n message.latest_reactions = message.latest_reactions.filter((r) => r.user_id !== user.id);\n if (currentReaction
|
|
1
|
+
{"version":3,"names":["_apis","require","_insertReaction","addReactionToLocalState","_ref","channel","enforceUniqueReaction","messageId","reactionType","user","message","state","messages","find","_ref2","id","reaction","created_at","Date","toISOString","message_id","type","updated_at","user_id","hasOwnReaction","own_reactions","length","latest_reactions","currentReaction","filter","r","reaction_counts","_defineProperty2","_message$reaction_cou2","_message$reaction_cou4","concat","_toConsumableArray2","updateReaction","insertReaction","exports"],"sources":["addReactionToLocalState.ts"],"sourcesContent":["import type { Channel, ReactionResponse, UserResponse } from 'stream-chat';\n\nimport { updateReaction } from '../store/apis';\nimport { insertReaction } from '../store/apis/insertReaction';\n\nimport type { DefaultStreamChatGenerics } from '../types/types';\n\nexport const addReactionToLocalState = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n channel,\n enforceUniqueReaction,\n messageId,\n reactionType,\n user,\n}: {\n channel: Channel<StreamChatGenerics>;\n enforceUniqueReaction: boolean;\n messageId: string;\n reactionType: string;\n user: UserResponse<StreamChatGenerics>;\n}) => {\n const message = channel.state.messages.find(({ id }) => id === messageId);\n\n if (!message) return;\n\n const reaction: ReactionResponse = {\n created_at: new Date().toISOString(),\n message_id: messageId,\n type: reactionType,\n updated_at: new Date().toISOString(),\n user,\n user_id: user?.id,\n };\n\n const hasOwnReaction = message.own_reactions && message.own_reactions.length > 0;\n if (!message.own_reactions) {\n message.own_reactions = [];\n }\n\n if (!message.latest_reactions) {\n message.latest_reactions = [];\n }\n\n if (enforceUniqueReaction) {\n const currentReaction = message.own_reactions[0];\n message.own_reactions = [];\n if (!message.latest_reactions) {\n message.latest_reactions = [];\n }\n message.latest_reactions = message.latest_reactions.filter((r) => r.user_id !== user.id);\n if (\n currentReaction &&\n message.reaction_counts &&\n message.reaction_counts[currentReaction.type] &&\n message.reaction_counts[currentReaction.type] > 0\n ) {\n message.reaction_counts[currentReaction.type] =\n message.reaction_counts[currentReaction.type] - 1;\n }\n\n if (!message.reaction_counts) {\n message.reaction_counts = {\n [reactionType]: 1,\n };\n } else {\n message.reaction_counts[reactionType] = (message.reaction_counts?.[reactionType] || 0) + 1;\n }\n } else {\n if (!message.reaction_counts) {\n message.reaction_counts = {\n [reactionType]: 1,\n };\n } else {\n message.reaction_counts[reactionType] = (message.reaction_counts?.[reactionType] || 0) + 1;\n }\n }\n\n message.own_reactions = [...message.own_reactions, reaction];\n message.latest_reactions = [...message.latest_reactions, reaction];\n\n if (enforceUniqueReaction && hasOwnReaction) {\n updateReaction({\n message,\n reaction,\n });\n } else {\n insertReaction({\n reaction,\n });\n }\n};\n"],"mappings":";;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAIO,IAAME,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,IAAA,EAc9B;EAAA,IAXJC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,qBAAqB,GAAAF,IAAA,CAArBE,qBAAqB;IACrBC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,IAAI,GAAAL,IAAA,CAAJK,IAAI;EAQJ,IAAMC,OAAO,GAAGL,OAAO,CAACM,KAAK,CAACC,QAAQ,CAACC,IAAI,CAAC,UAAAC,KAAA;IAAA,IAAGC,EAAE,GAAAD,KAAA,CAAFC,EAAE;IAAA,OAAOA,EAAE,KAAKR,SAAS;EAAA,EAAC;EAEzE,IAAI,CAACG,OAAO,EAAE;EAEd,IAAMM,QAA0B,GAAG;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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");
|
|
20
19
|
var _useViewport2 = require("../../hooks/useViewport");
|
|
21
20
|
var _native = require("../../native");
|
|
22
21
|
var _this = this,
|
|
@@ -38,6 +37,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
38
37
|
attachmentPickerErrorButtonText = props.attachmentPickerErrorButtonText,
|
|
39
38
|
AttachmentPickerErrorImage = props.AttachmentPickerErrorImage,
|
|
40
39
|
attachmentPickerErrorText = props.attachmentPickerErrorText,
|
|
40
|
+
AttachmentPickerIOSSelectMorePhotos = props.AttachmentPickerIOSSelectMorePhotos,
|
|
41
41
|
ImageOverlaySelectedComponent = props.ImageOverlaySelectedComponent,
|
|
42
42
|
numberOfAttachmentImagesToLoadPerCall = props.numberOfAttachmentImagesToLoadPerCall,
|
|
43
43
|
numberOfAttachmentPickerImageColumns = props.numberOfAttachmentPickerImageColumns,
|
|
@@ -82,8 +82,6 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
82
82
|
photos = _useState10[0],
|
|
83
83
|
setPhotos = _useState10[1];
|
|
84
84
|
var attemptedToLoadPhotosOnOpenRef = (0, _react.useRef)(false);
|
|
85
|
-
var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
|
|
86
|
-
t = _useTranslationContex.t;
|
|
87
85
|
var getMorePhotos = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
|
|
88
86
|
var endCursor, results;
|
|
89
87
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
@@ -251,17 +249,15 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
251
249
|
__self: _this,
|
|
252
250
|
__source: {
|
|
253
251
|
fileName: _jsxFileName,
|
|
254
|
-
lineNumber:
|
|
252
|
+
lineNumber: 301,
|
|
255
253
|
columnNumber: 9
|
|
256
254
|
}
|
|
257
|
-
}, iOSLimited && _react["default"].createElement(
|
|
258
|
-
onPress: _native.iOS14RefreshGallerySelection,
|
|
259
|
-
title: t('Select More Photos'),
|
|
255
|
+
}, iOSLimited && _react["default"].createElement(AttachmentPickerIOSSelectMorePhotos, {
|
|
260
256
|
__self: _this,
|
|
261
257
|
__source: {
|
|
262
258
|
fileName: _jsxFileName,
|
|
263
|
-
lineNumber:
|
|
264
|
-
columnNumber:
|
|
259
|
+
lineNumber: 317,
|
|
260
|
+
columnNumber: 26
|
|
265
261
|
}
|
|
266
262
|
}), _react["default"].createElement(_bottomSheet.BottomSheetFlatList, {
|
|
267
263
|
contentContainerStyle: [styles.container, {
|
|
@@ -279,7 +275,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
279
275
|
__self: _this,
|
|
280
276
|
__source: {
|
|
281
277
|
fileName: _jsxFileName,
|
|
282
|
-
lineNumber:
|
|
278
|
+
lineNumber: 318,
|
|
283
279
|
columnNumber: 11
|
|
284
280
|
}
|
|
285
281
|
})), selectedPicker === 'images' && photoError && _react["default"].createElement(AttachmentPickerError, {
|
|
@@ -290,7 +286,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
290
286
|
__self: _this,
|
|
291
287
|
__source: {
|
|
292
288
|
fileName: _jsxFileName,
|
|
293
|
-
lineNumber:
|
|
289
|
+
lineNumber: 333,
|
|
294
290
|
columnNumber: 11
|
|
295
291
|
}
|
|
296
292
|
}));
|
|
@@ -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","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;AACA,IAAAW,OAAA,GAAAX,OAAA;AAIsB,IAAAY,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,SAAAhB,wBAAAoB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAA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AAC,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"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_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","AttachmentPickerIOSSelectMorePhotos","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","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","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 { useViewport } from '../../hooks/useViewport';\nimport { getPhotos, oniOS14GalleryLibrarySelectionChange } 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 select more photos for selected gallery access in iOS.\n */\n AttachmentPickerIOSSelectMorePhotos: 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 AttachmentPickerIOSSelectMorePhotos,\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\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 && <AttachmentPickerIOSSelectMorePhotos />}\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,aAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAA+E,IAAAW,KAAA;EAAAC,YAAA;A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C,0BAA0B,EAAEA,0BAA2B;IACvDC,yBAAyB,EAAEA,yBAA0B;IAAAiI,MAAA,EAAA/K,KAAA;IAAAgL,QAAA;MAAAC,QAAA,EAAAhL,YAAA;MAAAiL,UAAA;MAAAC,YAAA;IAAA;EAAA,CACtD,CAEH,CAAC;AAEP,CACF,CAAC;AAACY,OAAA,CAAA5J,gBAAA,GAAAA,gBAAA;AAEFA,gBAAgB,CAAC6J,WAAW,GAAG,kBAAkB"}
|
package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.AttachmentPickerIOSSelectMorePhotos = void 0;
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _TranslationContext = require("../../../contexts/translationContext/TranslationContext");
|
|
9
|
+
var _native = require("../../../native");
|
|
10
|
+
var _this = this,
|
|
11
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx";
|
|
12
|
+
var AttachmentPickerIOSSelectMorePhotos = function AttachmentPickerIOSSelectMorePhotos() {
|
|
13
|
+
var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
|
|
14
|
+
t = _useTranslationContex.t;
|
|
15
|
+
return _react["default"].createElement(_reactNative.Button, {
|
|
16
|
+
onPress: _native.iOS14RefreshGallerySelection,
|
|
17
|
+
title: t('Select More Photos'),
|
|
18
|
+
__self: _this,
|
|
19
|
+
__source: {
|
|
20
|
+
fileName: _jsxFileName,
|
|
21
|
+
lineNumber: 9,
|
|
22
|
+
columnNumber: 10
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
exports.AttachmentPickerIOSSelectMorePhotos = AttachmentPickerIOSSelectMorePhotos;
|
|
27
|
+
//# sourceMappingURL=AttachmentPickerIOSSelectMorePhotos.js.map
|
package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_TranslationContext","_native","_this","_jsxFileName","AttachmentPickerIOSSelectMorePhotos","_useTranslationContex","useTranslationContext","t","createElement","Button","onPress","iOS14RefreshGallerySelection","title","__self","__source","fileName","lineNumber","columnNumber","exports"],"sources":["AttachmentPickerIOSSelectMorePhotos.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from 'react-native';\n\nimport { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';\nimport { iOS14RefreshGallerySelection } from '../../../native';\n\nexport const AttachmentPickerIOSSelectMorePhotos = () => {\n const { t } = useTranslationContext();\n return <Button onPress={iOS14RefreshGallerySelection} title={t('Select More Photos')} />;\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAExD,IAAMC,mCAAmC,GAAG,SAAtCA,mCAAmCA,CAAA,EAAS;EACvD,IAAAC,qBAAA,GAAc,IAAAC,yCAAqB,EAAC,CAAC;IAA7BC,CAAC,GAAAF,qBAAA,CAADE,CAAC;EACT,OAAOX,MAAA,YAAAY,aAAA,CAACT,YAAA,CAAAU,MAAM;IAACC,OAAO,EAAEC,oCAA6B;IAACC,KAAK,EAAEL,CAAC,CAAC,oBAAoB,CAAE;IAAAM,MAAA,EAAAX,KAAA;IAAAY,QAAA;MAAAC,QAAA,EAAAZ,YAAA;MAAAa,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CAAC;AAC1F,CAAC;AAACC,OAAA,CAAAd,mCAAA,GAAAA,mCAAA"}
|
|
@@ -14,6 +14,7 @@ var _AttachmentPicker = require("../../components/AttachmentPicker/AttachmentPic
|
|
|
14
14
|
var _AttachmentPickerBottomSheetHandle = require("../../components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle");
|
|
15
15
|
var _AttachmentPickerError = require("../../components/AttachmentPicker/components/AttachmentPickerError");
|
|
16
16
|
var _AttachmentPickerErrorImage = require("../../components/AttachmentPicker/components/AttachmentPickerErrorImage");
|
|
17
|
+
var _AttachmentPickerIOSSelectMorePhotos = require("../../components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos");
|
|
17
18
|
var _CameraSelectorIcon = require("../../components/AttachmentPicker/components/CameraSelectorIcon");
|
|
18
19
|
var _FileSelectorIcon = require("../../components/AttachmentPicker/components/FileSelectorIcon");
|
|
19
20
|
var _ImageOverlaySelectedComponent = require("../../components/AttachmentPicker/components/ImageOverlaySelectedComponent");
|
|
@@ -45,6 +46,8 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
45
46
|
AttachmentPickerErrorImage = _props$AttachmentPick3 === void 0 ? _AttachmentPickerErrorImage.AttachmentPickerErrorImage : _props$AttachmentPick3,
|
|
46
47
|
attachmentPickerErrorText = props.attachmentPickerErrorText,
|
|
47
48
|
attachmentSelectionBarHeight = props.attachmentSelectionBarHeight,
|
|
49
|
+
_props$AttachmentPick4 = props.AttachmentPickerIOSSelectMorePhotos,
|
|
50
|
+
AttachmentPickerIOSSelectMorePhotos = _props$AttachmentPick4 === void 0 ? _AttachmentPickerIOSSelectMorePhotos.AttachmentPickerIOSSelectMorePhotos : _props$AttachmentPick4,
|
|
48
51
|
bottomInset = props.bottomInset,
|
|
49
52
|
_props$CameraSelector = props.CameraSelectorIcon,
|
|
50
53
|
CameraSelectorIcon = _props$CameraSelector === void 0 ? _CameraSelectorIcon.CameraSelectorIcon : _props$CameraSelector,
|
|
@@ -106,6 +109,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
106
109
|
attachmentPickerErrorButtonText: attachmentPickerErrorButtonText,
|
|
107
110
|
AttachmentPickerErrorImage: AttachmentPickerErrorImage,
|
|
108
111
|
attachmentPickerErrorText: attachmentPickerErrorText,
|
|
112
|
+
AttachmentPickerIOSSelectMorePhotos: AttachmentPickerIOSSelectMorePhotos,
|
|
109
113
|
attachmentSelectionBarHeight: attachmentSelectionBarHeight,
|
|
110
114
|
ImageOverlaySelectedComponent: ImageOverlaySelectedComponent,
|
|
111
115
|
numberOfAttachmentImagesToLoadPerCall: numberOfAttachmentImagesToLoadPerCall,
|
|
@@ -184,7 +188,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
184
188
|
__self: _this,
|
|
185
189
|
__source: {
|
|
186
190
|
fileName: _jsxFileName,
|
|
187
|
-
lineNumber:
|
|
191
|
+
lineNumber: 218,
|
|
188
192
|
columnNumber: 5
|
|
189
193
|
}
|
|
190
194
|
}, _react["default"].createElement(_OverlayContext.OverlayContext.Provider, {
|
|
@@ -192,14 +196,14 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
192
196
|
__self: _this,
|
|
193
197
|
__source: {
|
|
194
198
|
fileName: _jsxFileName,
|
|
195
|
-
lineNumber:
|
|
199
|
+
lineNumber: 219,
|
|
196
200
|
columnNumber: 7
|
|
197
201
|
}
|
|
198
202
|
}, _react["default"].createElement(_MessageOverlayContext.MessageOverlayProvider, {
|
|
199
203
|
__self: _this,
|
|
200
204
|
__source: {
|
|
201
205
|
fileName: _jsxFileName,
|
|
202
|
-
lineNumber:
|
|
206
|
+
lineNumber: 220,
|
|
203
207
|
columnNumber: 9
|
|
204
208
|
}
|
|
205
209
|
}, _react["default"].createElement(_AttachmentPickerContext.AttachmentPickerProvider, {
|
|
@@ -207,14 +211,14 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
207
211
|
__self: _this,
|
|
208
212
|
__source: {
|
|
209
213
|
fileName: _jsxFileName,
|
|
210
|
-
lineNumber:
|
|
214
|
+
lineNumber: 221,
|
|
211
215
|
columnNumber: 11
|
|
212
216
|
}
|
|
213
217
|
}, _react["default"].createElement(_ImageGalleryContext.ImageGalleryProvider, {
|
|
214
218
|
__self: _this,
|
|
215
219
|
__source: {
|
|
216
220
|
fileName: _jsxFileName,
|
|
217
|
-
lineNumber:
|
|
221
|
+
lineNumber: 222,
|
|
218
222
|
columnNumber: 13
|
|
219
223
|
}
|
|
220
224
|
}, children, _react["default"].createElement(_ThemeContext.ThemeProvider, {
|
|
@@ -222,7 +226,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
222
226
|
__self: _this,
|
|
223
227
|
__source: {
|
|
224
228
|
fileName: _jsxFileName,
|
|
225
|
-
lineNumber:
|
|
229
|
+
lineNumber: 224,
|
|
226
230
|
columnNumber: 15
|
|
227
231
|
}
|
|
228
232
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -231,7 +235,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
231
235
|
__self: _this,
|
|
232
236
|
__source: {
|
|
233
237
|
fileName: _jsxFileName,
|
|
234
|
-
lineNumber:
|
|
238
|
+
lineNumber: 225,
|
|
235
239
|
columnNumber: 17
|
|
236
240
|
}
|
|
237
241
|
}, _react["default"].createElement(_OverlayBackdrop.OverlayBackdrop, {
|
|
@@ -242,7 +246,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
242
246
|
__self: _this,
|
|
243
247
|
__source: {
|
|
244
248
|
fileName: _jsxFileName,
|
|
245
|
-
lineNumber:
|
|
249
|
+
lineNumber: 229,
|
|
246
250
|
columnNumber: 19
|
|
247
251
|
}
|
|
248
252
|
})), overlay === 'message' && _react["default"].createElement(_MessageOverlay.MessageOverlay, {
|
|
@@ -256,7 +260,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
256
260
|
__self: _this,
|
|
257
261
|
__source: {
|
|
258
262
|
fileName: _jsxFileName,
|
|
259
|
-
lineNumber:
|
|
263
|
+
lineNumber: 232,
|
|
260
264
|
columnNumber: 19
|
|
261
265
|
}
|
|
262
266
|
}), overlay === 'gallery' && _react["default"].createElement(_ImageGallery.ImageGallery, {
|
|
@@ -270,7 +274,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
270
274
|
__self: _this,
|
|
271
275
|
__source: {
|
|
272
276
|
fileName: _jsxFileName,
|
|
273
|
-
lineNumber:
|
|
277
|
+
lineNumber: 243,
|
|
274
278
|
columnNumber: 19
|
|
275
279
|
}
|
|
276
280
|
}), _react["default"].createElement(_AttachmentPicker.AttachmentPicker, (0, _extends2["default"])({
|
|
@@ -279,7 +283,7 @@ var OverlayProvider = function OverlayProvider(props) {
|
|
|
279
283
|
__self: _this,
|
|
280
284
|
__source: {
|
|
281
285
|
fileName: _jsxFileName,
|
|
282
|
-
lineNumber:
|
|
286
|
+
lineNumber: 253,
|
|
283
287
|
columnNumber: 17
|
|
284
288
|
}
|
|
285
289
|
}))))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_OverlayContext","_AttachmentPicker","_AttachmentPickerBottomSheetHandle","_AttachmentPickerError","_AttachmentPickerErrorImage","_CameraSelectorIcon","_FileSelectorIcon","_ImageOverlaySelectedComponent","_ImageSelectorIcon","_ImageGallery","_MessageOverlay","_OverlayBackdrop","_useStreami18n","_AttachmentPickerContext","_ImageGalleryContext","_MessageOverlayContext","_ThemeContext","_TranslationContext","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OverlayProvider","props","bottomSheetCloseTimeoutRef","useRef","autoPlayVideo","_props$AttachmentPick","AttachmentPickerBottomSheetHandle","DefaultAttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","_props$AttachmentPick2","AttachmentPickerError","DefaultAttachmentPickerError","attachmentPickerErrorButtonText","_props$AttachmentPick3","AttachmentPickerErrorImage","DefaultAttachmentPickerErrorImage","attachmentPickerErrorText","attachmentSelectionBarHeight","bottomInset","_props$CameraSelector","CameraSelectorIcon","DefaultCameraSelectorIcon","children","_props$closePicker","closePicker","ref","_ref$current","current","close","clearTimeout","setTimeout","_ref$current2","_props$FileSelectorIc","FileSelectorIcon","DefaultFileSelectorIcon","giphyVersion","i18nInstance","imageGalleryCustomComponents","imageGalleryGridHandleHeight","imageGalleryGridSnapPoints","_props$ImageOverlaySe","ImageOverlaySelectedComponent","DefaultImageOverlaySelectedComponent","_props$ImageSelectorI","ImageSelectorIcon","DefaultImageSelectorIcon","MessageActionList","MessageActionListItem","messageTextNumberOfLines","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","numberOfImageGalleryGridColumns","_props$openPicker","openPicker","_ref$current3","snapToIndex","console","warn","topInset","translucentStatusBar","OverlayReactionList","OverlayReactions","OverlayReactionsAvatar","value","attachmentPickerProps","bottomSheetRef","_useState","useState","overlay","_useState2","_slicedToArray2","setOverlay","overlayOpacity","useSharedValue","_Dimensions$get","Dimensions","height","width","translators","useStreami18n","useEffect","backAction","backHandler","BackHandler","addEventListener","remove","cancelAnimation","withTiming","attachmentPickerContext","overlayStyle","useAnimatedStyle","opacity","overlayContext","style","createElement","TranslationProvider","_extends2","userLanguage","DEFAULT_USER_LANGUAGE","__self","__source","fileName","lineNumber","columnNumber","OverlayContext","Provider","MessageOverlayProvider","AttachmentPickerProvider","ImageGalleryProvider","ThemeProvider","View","pointerEvents","StyleSheet","absoluteFill","OverlayBackdrop","MessageOverlay","ImageGallery","AttachmentPicker","exports"],"sources":["OverlayProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';\n\nimport { BackHandler, Dimensions, StyleSheet, ViewStyle } from 'react-native';\n\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\n\nimport type BottomSheet from '@gorhom/bottom-sheet';\n\nimport { OverlayContext, OverlayProviderProps } from './OverlayContext';\n\nimport { AttachmentPicker } from '../../components/AttachmentPicker/AttachmentPicker';\n\nimport { AttachmentPickerBottomSheetHandle as DefaultAttachmentPickerBottomSheetHandle } from '../../components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle';\nimport { AttachmentPickerError as DefaultAttachmentPickerError } from '../../components/AttachmentPicker/components/AttachmentPickerError';\nimport { AttachmentPickerErrorImage as DefaultAttachmentPickerErrorImage } from '../../components/AttachmentPicker/components/AttachmentPickerErrorImage';\nimport { CameraSelectorIcon as DefaultCameraSelectorIcon } from '../../components/AttachmentPicker/components/CameraSelectorIcon';\nimport { FileSelectorIcon as DefaultFileSelectorIcon } from '../../components/AttachmentPicker/components/FileSelectorIcon';\nimport { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../../components/AttachmentPicker/components/ImageOverlaySelectedComponent';\nimport { ImageSelectorIcon as DefaultImageSelectorIcon } from '../../components/AttachmentPicker/components/ImageSelectorIcon';\nimport { ImageGallery } from '../../components/ImageGallery/ImageGallery';\nimport { MessageOverlay } from '../../components/MessageOverlay/MessageOverlay';\nimport { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop';\nimport { useStreami18n } from '../../hooks/useStreami18n';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';\nimport { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';\nimport { MessageOverlayProvider } from '../messageOverlayContext/MessageOverlayContext';\nimport { ThemeProvider } from '../themeContext/ThemeContext';\nimport {\n DEFAULT_USER_LANGUAGE,\n TranslationProvider,\n} from '../translationContext/TranslationContext';\n\n/**\n * - The highest level of these components is the `OverlayProvider`. The `OverlayProvider` allows users to interact with messages on long press above the underlying views, use the full screen image viewer, and use the `AttachmentPicker` as a keyboard-esk view.\n * Because these views must exist above all others `OverlayProvider` should wrap your navigation stack as well. Assuming [`React Navigation`](https://reactnavigation.org/) is being used, your highest level navigation stack should be wrapped in the provider:\n *\n * ```js\n * <NavigationContainer>\n * <OverlayProvider>\n * <Stack.Navigator>\n * <Stack.Screen />\n * </Stack.Navigator>\n * </OverlayProvider>\n * </NavigationContainer>\n * ```\n *\n * - Don't forget to check our cookbook section of [OverlayProvider](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#overlayprovider)\n *\n * - Also check the [visual component guide](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#custom-components), to learn about component customizations.\n *\n * @example ./OverlayProvider.md\n */\nexport const OverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: PropsWithChildren<OverlayProviderProps<StreamChatGenerics>>,\n) => {\n const bottomSheetCloseTimeoutRef = useRef<NodeJS.Timeout>();\n const {\n autoPlayVideo,\n AttachmentPickerBottomSheetHandle = DefaultAttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError = DefaultAttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage = DefaultAttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon = DefaultCameraSelectorIcon,\n children,\n closePicker = (ref) => {\n if (ref.current?.close) {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n ref.current.close();\n // Attempt to close the bottomsheet again to circumvent accidental opening on Android.\n // Details: This to prevent a race condition where the close function is called during the point when a internal container layout happens within the bottomsheet due to keyboard affecting the layout\n // If the container layout measures a shorter height than previous but if the close snapped to the previous height's position, the bottom sheet will show up\n // this short delay ensures that close function is always called after a container layout due to keyboard change\n // NOTE: this timeout has to be above 500 as the keyboardAnimationDuration is 500 in the bottomsheet library - see src/hooks/useKeyboard.ts there for more details\n bottomSheetCloseTimeoutRef.current = setTimeout(() => {\n ref.current?.close();\n }, 600);\n }\n },\n FileSelectorIcon = DefaultFileSelectorIcon,\n giphyVersion,\n i18nInstance,\n imageGalleryCustomComponents,\n imageGalleryGridHandleHeight,\n imageGalleryGridSnapPoints,\n ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent,\n ImageSelectorIcon = DefaultImageSelectorIcon,\n MessageActionList,\n MessageActionListItem,\n messageTextNumberOfLines,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n numberOfImageGalleryGridColumns,\n openPicker = (ref) => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n if (ref.current?.snapToIndex) {\n ref.current.snapToIndex(0);\n } else {\n console.warn('bottom and top insets must be set for the image picker to work correctly');\n }\n },\n topInset,\n translucentStatusBar,\n OverlayReactionList,\n OverlayReactions,\n OverlayReactionsAvatar,\n value,\n } = props;\n\n const attachmentPickerProps = {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n };\n\n const bottomSheetRef = useRef<BottomSheet>(null);\n\n const [overlay, setOverlay] = useState(value?.overlay || 'none');\n\n const overlayOpacity = useSharedValue(0);\n const { height, width } = Dimensions.get('screen');\n\n // Setup translators\n const translators = useStreami18n(i18nInstance);\n\n useEffect(() => {\n const backAction = () => {\n if (overlay !== 'none') {\n setOverlay('none');\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [overlay]);\n\n useEffect(\n () =>\n // cleanup the timeout if the component unmounts\n () => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n },\n [],\n );\n\n useEffect(() => {\n closePicker(bottomSheetRef);\n cancelAnimation(overlayOpacity);\n if (overlay !== 'none') {\n overlayOpacity.value = withTiming(1);\n } else {\n overlayOpacity.value = withTiming(0);\n }\n }, [overlay]);\n\n const attachmentPickerContext = {\n attachmentPickerBottomSheetHeight,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon,\n closePicker: () => closePicker(bottomSheetRef),\n FileSelectorIcon,\n ImageSelectorIcon,\n openPicker: () => openPicker(bottomSheetRef),\n topInset,\n };\n\n const overlayStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n opacity: overlayOpacity.value,\n }),\n [],\n );\n\n const overlayContext = {\n overlay,\n setOverlay,\n style: value?.style,\n translucentStatusBar,\n };\n\n return (\n <TranslationProvider value={{ ...translators, userLanguage: DEFAULT_USER_LANGUAGE }}>\n <OverlayContext.Provider value={overlayContext}>\n <MessageOverlayProvider<StreamChatGenerics>>\n <AttachmentPickerProvider value={attachmentPickerContext}>\n <ImageGalleryProvider>\n {children}\n <ThemeProvider style={overlayContext.style}>\n <Animated.View\n pointerEvents={overlay === 'none' ? 'none' : 'auto'}\n style={[StyleSheet.absoluteFill, overlayStyle]}\n >\n <OverlayBackdrop style={[StyleSheet.absoluteFill, { height, width }]} />\n </Animated.View>\n {overlay === 'message' && (\n <MessageOverlay<StreamChatGenerics>\n MessageActionList={MessageActionList}\n MessageActionListItem={MessageActionListItem}\n messageTextNumberOfLines={messageTextNumberOfLines}\n overlayOpacity={overlayOpacity}\n OverlayReactionList={OverlayReactionList}\n OverlayReactions={OverlayReactions}\n OverlayReactionsAvatar={OverlayReactionsAvatar}\n />\n )}\n {overlay === 'gallery' && (\n <ImageGallery<StreamChatGenerics>\n autoPlayVideo={autoPlayVideo}\n giphyVersion={giphyVersion}\n imageGalleryCustomComponents={imageGalleryCustomComponents}\n imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}\n imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}\n numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}\n overlayOpacity={overlayOpacity}\n />\n )}\n <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />\n </ThemeProvider>\n </ImageGalleryProvider>\n </AttachmentPickerProvider>\n </MessageOverlayProvider>\n </OverlayContext.Provider>\n </TranslationProvider>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,eAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kCAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,8BAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AACA,IAAAc,gBAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAf,OAAA;AAGA,IAAAgB,wBAAA,GAAAhB,OAAA;AACA,IAAAiB,oBAAA,GAAAjB,OAAA;AACA,IAAAkB,sBAAA,GAAAlB,OAAA;AACA,IAAAmB,aAAA,GAAAnB,OAAA;AACA,IAAAoB,mBAAA,GAAApB,OAAA;AAGkD,IAAAqB,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YA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;IAC7CC,wBAAwB,EAAEA,wBAAyB;IACnDwB,cAAc,EAAEA,cAAe;IAC/BZ,mBAAmB,EAAEA,mBAAoB;IACzCC,gBAAgB,EAAEA,gBAAiB;IACnCC,sBAAsB,EAAEA,sBAAuB;IAAAqC,MAAA,EAAA5H,KAAA;IAAA6H,QAAA;MAAAC,QAAA,EAAA7H,YAAA;MAAA8H,UAAA;MAAAC,YAAA;IAAA;EAAA,CAChD,CACF,EACAnC,OAAO,KAAK,SAAS,IACpBpH,MAAA,YAAA8I,aAAA,CAAChI,aAAA,CAAAsJ,YAAY;IACXjH,aAAa,EAAEA,aAAc;IAC7BgC,YAAY,EAAEA,YAAa;IAC3BE,4BAA4B,EAAEA,4BAA6B;IAC3DC,4BAA4B,EAAEA,4BAA6B;IAC3DC,0BAA0B,EAAEA,0BAA2B;IACvDY,+BAA+B,EAAEA,+BAAgC;IACjEqB,cAAc,EAAEA,cAAe;IAAA2B,MAAA,EAAA5H,KAAA;IAAA6H,QAAA;MAAAC,QAAA,EAAA7H,YAAA;MAAA8H,UAAA;MAAAC,YAAA;IAAA;EAAA,CAChC,CACF,EACDvJ,MAAA,YAAA8I,aAAA,CAACxI,iBAAA,CAAA+J,gBAAgB,MAAArB,SAAA;IAACvE,GAAG,EAAEwC;EAAe,GAAKD,qBAAqB;IAAAmC,MAAA,EAAA5H,KAAA;IAAA6H,QAAA;MAAAC,QAAA,EAAA7H,YAAA;MAAA8H,UAAA;MAAAC,YAAA;IAAA;EAAA,EAAG,CACtD,CACK,CACE,CACJ,CACD,CACN,CAAC;AAE1B,CAAC;AAACe,OAAA,CAAAvH,eAAA,GAAAA,eAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_OverlayContext","_AttachmentPicker","_AttachmentPickerBottomSheetHandle","_AttachmentPickerError","_AttachmentPickerErrorImage","_AttachmentPickerIOSSelectMorePhotos","_CameraSelectorIcon","_FileSelectorIcon","_ImageOverlaySelectedComponent","_ImageSelectorIcon","_ImageGallery","_MessageOverlay","_OverlayBackdrop","_useStreami18n","_AttachmentPickerContext","_ImageGalleryContext","_MessageOverlayContext","_ThemeContext","_TranslationContext","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OverlayProvider","props","bottomSheetCloseTimeoutRef","useRef","autoPlayVideo","_props$AttachmentPick","AttachmentPickerBottomSheetHandle","DefaultAttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","_props$AttachmentPick2","AttachmentPickerError","DefaultAttachmentPickerError","attachmentPickerErrorButtonText","_props$AttachmentPick3","AttachmentPickerErrorImage","DefaultAttachmentPickerErrorImage","attachmentPickerErrorText","attachmentSelectionBarHeight","_props$AttachmentPick4","AttachmentPickerIOSSelectMorePhotos","DefaultAttachmentPickerIOSSelectMorePhotos","bottomInset","_props$CameraSelector","CameraSelectorIcon","DefaultCameraSelectorIcon","children","_props$closePicker","closePicker","ref","_ref$current","current","close","clearTimeout","setTimeout","_ref$current2","_props$FileSelectorIc","FileSelectorIcon","DefaultFileSelectorIcon","giphyVersion","i18nInstance","imageGalleryCustomComponents","imageGalleryGridHandleHeight","imageGalleryGridSnapPoints","_props$ImageOverlaySe","ImageOverlaySelectedComponent","DefaultImageOverlaySelectedComponent","_props$ImageSelectorI","ImageSelectorIcon","DefaultImageSelectorIcon","MessageActionList","MessageActionListItem","messageTextNumberOfLines","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","numberOfImageGalleryGridColumns","_props$openPicker","openPicker","_ref$current3","snapToIndex","console","warn","topInset","translucentStatusBar","OverlayReactionList","OverlayReactions","OverlayReactionsAvatar","value","attachmentPickerProps","bottomSheetRef","_useState","useState","overlay","_useState2","_slicedToArray2","setOverlay","overlayOpacity","useSharedValue","_Dimensions$get","Dimensions","height","width","translators","useStreami18n","useEffect","backAction","backHandler","BackHandler","addEventListener","remove","cancelAnimation","withTiming","attachmentPickerContext","overlayStyle","useAnimatedStyle","opacity","overlayContext","style","createElement","TranslationProvider","_extends2","userLanguage","DEFAULT_USER_LANGUAGE","__self","__source","fileName","lineNumber","columnNumber","OverlayContext","Provider","MessageOverlayProvider","AttachmentPickerProvider","ImageGalleryProvider","ThemeProvider","View","pointerEvents","StyleSheet","absoluteFill","OverlayBackdrop","MessageOverlay","ImageGallery","AttachmentPicker","exports"],"sources":["OverlayProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';\n\nimport { BackHandler, Dimensions, StyleSheet, ViewStyle } from 'react-native';\n\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\n\nimport type BottomSheet from '@gorhom/bottom-sheet';\n\nimport { OverlayContext, OverlayProviderProps } from './OverlayContext';\n\nimport { AttachmentPicker } from '../../components/AttachmentPicker/AttachmentPicker';\n\nimport { AttachmentPickerBottomSheetHandle as DefaultAttachmentPickerBottomSheetHandle } from '../../components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle';\nimport { AttachmentPickerError as DefaultAttachmentPickerError } from '../../components/AttachmentPicker/components/AttachmentPickerError';\nimport { AttachmentPickerErrorImage as DefaultAttachmentPickerErrorImage } from '../../components/AttachmentPicker/components/AttachmentPickerErrorImage';\nimport { AttachmentPickerIOSSelectMorePhotos as DefaultAttachmentPickerIOSSelectMorePhotos } from '../../components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos';\nimport { CameraSelectorIcon as DefaultCameraSelectorIcon } from '../../components/AttachmentPicker/components/CameraSelectorIcon';\nimport { FileSelectorIcon as DefaultFileSelectorIcon } from '../../components/AttachmentPicker/components/FileSelectorIcon';\nimport { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../../components/AttachmentPicker/components/ImageOverlaySelectedComponent';\nimport { ImageSelectorIcon as DefaultImageSelectorIcon } from '../../components/AttachmentPicker/components/ImageSelectorIcon';\nimport { ImageGallery } from '../../components/ImageGallery/ImageGallery';\nimport { MessageOverlay } from '../../components/MessageOverlay/MessageOverlay';\nimport { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop';\nimport { useStreami18n } from '../../hooks/useStreami18n';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';\nimport { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';\nimport { MessageOverlayProvider } from '../messageOverlayContext/MessageOverlayContext';\nimport { ThemeProvider } from '../themeContext/ThemeContext';\nimport {\n DEFAULT_USER_LANGUAGE,\n TranslationProvider,\n} from '../translationContext/TranslationContext';\n\n/**\n * - The highest level of these components is the `OverlayProvider`. The `OverlayProvider` allows users to interact with messages on long press above the underlying views, use the full screen image viewer, and use the `AttachmentPicker` as a keyboard-esk view.\n * Because these views must exist above all others `OverlayProvider` should wrap your navigation stack as well. Assuming [`React Navigation`](https://reactnavigation.org/) is being used, your highest level navigation stack should be wrapped in the provider:\n *\n * ```js\n * <NavigationContainer>\n * <OverlayProvider>\n * <Stack.Navigator>\n * <Stack.Screen />\n * </Stack.Navigator>\n * </OverlayProvider>\n * </NavigationContainer>\n * ```\n *\n * - Don't forget to check our cookbook section of [OverlayProvider](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#overlayprovider)\n *\n * - Also check the [visual component guide](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#custom-components), to learn about component customizations.\n *\n * @example ./OverlayProvider.md\n */\nexport const OverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: PropsWithChildren<OverlayProviderProps<StreamChatGenerics>>,\n) => {\n const bottomSheetCloseTimeoutRef = useRef<NodeJS.Timeout>();\n const {\n autoPlayVideo,\n AttachmentPickerBottomSheetHandle = DefaultAttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError = DefaultAttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage = DefaultAttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n AttachmentPickerIOSSelectMorePhotos = DefaultAttachmentPickerIOSSelectMorePhotos,\n bottomInset,\n CameraSelectorIcon = DefaultCameraSelectorIcon,\n children,\n closePicker = (ref) => {\n if (ref.current?.close) {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n ref.current.close();\n // Attempt to close the bottomsheet again to circumvent accidental opening on Android.\n // Details: This to prevent a race condition where the close function is called during the point when a internal container layout happens within the bottomsheet due to keyboard affecting the layout\n // If the container layout measures a shorter height than previous but if the close snapped to the previous height's position, the bottom sheet will show up\n // this short delay ensures that close function is always called after a container layout due to keyboard change\n // NOTE: this timeout has to be above 500 as the keyboardAnimationDuration is 500 in the bottomsheet library - see src/hooks/useKeyboard.ts there for more details\n bottomSheetCloseTimeoutRef.current = setTimeout(() => {\n ref.current?.close();\n }, 600);\n }\n },\n FileSelectorIcon = DefaultFileSelectorIcon,\n giphyVersion,\n i18nInstance,\n imageGalleryCustomComponents,\n imageGalleryGridHandleHeight,\n imageGalleryGridSnapPoints,\n ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent,\n ImageSelectorIcon = DefaultImageSelectorIcon,\n MessageActionList,\n MessageActionListItem,\n messageTextNumberOfLines,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n numberOfImageGalleryGridColumns,\n openPicker = (ref) => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n if (ref.current?.snapToIndex) {\n ref.current.snapToIndex(0);\n } else {\n console.warn('bottom and top insets must be set for the image picker to work correctly');\n }\n },\n topInset,\n translucentStatusBar,\n OverlayReactionList,\n OverlayReactions,\n OverlayReactionsAvatar,\n value,\n } = props;\n\n const attachmentPickerProps = {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n AttachmentPickerIOSSelectMorePhotos,\n attachmentSelectionBarHeight,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n };\n\n const bottomSheetRef = useRef<BottomSheet>(null);\n\n const [overlay, setOverlay] = useState(value?.overlay || 'none');\n\n const overlayOpacity = useSharedValue(0);\n const { height, width } = Dimensions.get('screen');\n\n // Setup translators\n const translators = useStreami18n(i18nInstance);\n\n useEffect(() => {\n const backAction = () => {\n if (overlay !== 'none') {\n setOverlay('none');\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [overlay]);\n\n useEffect(\n () =>\n // cleanup the timeout if the component unmounts\n () => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n },\n [],\n );\n\n useEffect(() => {\n closePicker(bottomSheetRef);\n cancelAnimation(overlayOpacity);\n if (overlay !== 'none') {\n overlayOpacity.value = withTiming(1);\n } else {\n overlayOpacity.value = withTiming(0);\n }\n }, [overlay]);\n\n const attachmentPickerContext = {\n attachmentPickerBottomSheetHeight,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon,\n closePicker: () => closePicker(bottomSheetRef),\n FileSelectorIcon,\n ImageSelectorIcon,\n openPicker: () => openPicker(bottomSheetRef),\n topInset,\n };\n\n const overlayStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n opacity: overlayOpacity.value,\n }),\n [],\n );\n\n const overlayContext = {\n overlay,\n setOverlay,\n style: value?.style,\n translucentStatusBar,\n };\n\n return (\n <TranslationProvider value={{ ...translators, userLanguage: DEFAULT_USER_LANGUAGE }}>\n <OverlayContext.Provider value={overlayContext}>\n <MessageOverlayProvider<StreamChatGenerics>>\n <AttachmentPickerProvider value={attachmentPickerContext}>\n <ImageGalleryProvider>\n {children}\n <ThemeProvider style={overlayContext.style}>\n <Animated.View\n pointerEvents={overlay === 'none' ? 'none' : 'auto'}\n style={[StyleSheet.absoluteFill, overlayStyle]}\n >\n <OverlayBackdrop style={[StyleSheet.absoluteFill, { height, width }]} />\n </Animated.View>\n {overlay === 'message' && (\n <MessageOverlay<StreamChatGenerics>\n MessageActionList={MessageActionList}\n MessageActionListItem={MessageActionListItem}\n messageTextNumberOfLines={messageTextNumberOfLines}\n overlayOpacity={overlayOpacity}\n OverlayReactionList={OverlayReactionList}\n OverlayReactions={OverlayReactions}\n OverlayReactionsAvatar={OverlayReactionsAvatar}\n />\n )}\n {overlay === 'gallery' && (\n <ImageGallery<StreamChatGenerics>\n autoPlayVideo={autoPlayVideo}\n giphyVersion={giphyVersion}\n imageGalleryCustomComponents={imageGalleryCustomComponents}\n imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}\n imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}\n numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}\n overlayOpacity={overlayOpacity}\n />\n )}\n <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />\n </ThemeProvider>\n </ImageGalleryProvider>\n </AttachmentPickerProvider>\n </MessageOverlayProvider>\n </OverlayContext.Provider>\n </TranslationProvider>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,eAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AA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