@@ -126,8 +126,13 @@ import { ImageLoadingFailedIndicator as ImageLoadingFailedIndicatorDefault } fro
126126import { ImageLoadingIndicator as ImageLoadingIndicatorDefault } from '../Attachment/ImageLoadingIndicator' ;
127127import { ImageReloadIndicator as ImageReloadIndicatorDefault } from '../Attachment/ImageReloadIndicator' ;
128128import { VideoThumbnail as VideoThumbnailDefault } from '../Attachment/VideoThumbnail' ;
129+ import { AttachmentPicker , AttachmentPickerProps } from '../AttachmentPicker/AttachmentPicker' ;
129130import { AttachmentPickerBottomSheetHandle as DefaultAttachmentPickerBottomSheetHandle } from '../AttachmentPicker/components/AttachmentPickerBottomSheetHandle' ;
131+ import { AttachmentPickerError as DefaultAttachmentPickerError } from '../AttachmentPicker/components/AttachmentPickerError' ;
132+ import { AttachmentPickerErrorImage as DefaultAttachmentPickerErrorImage } from '../AttachmentPicker/components/AttachmentPickerErrorImage' ;
133+ import { AttachmentPickerIOSSelectMorePhotos as DefaultAttachmentPickerIOSSelectMorePhotos } from '../AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos' ;
130134import { AttachmentPickerSelectionBar as DefaultAttachmentPickerSelectionBar } from '../AttachmentPicker/components/AttachmentPickerSelectionBar' ;
135+ import { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../AttachmentPicker/components/ImageOverlaySelectedComponent' ;
131136import { AutoCompleteSuggestionHeader as AutoCompleteSuggestionHeaderDefault } from '../AutoCompleteInput/AutoCompleteSuggestionHeader' ;
132137import { AutoCompleteSuggestionItem as AutoCompleteSuggestionItemDefault } from '../AutoCompleteInput/AutoCompleteSuggestionItem' ;
133138import { AutoCompleteSuggestionList as AutoCompleteSuggestionListDefault } from '../AutoCompleteInput/AutoCompleteSuggestionList' ;
@@ -257,6 +262,19 @@ const debounceOptions = {
257262
258263export type ChannelPropsWithContext = Pick < ChannelContextValue , 'channel' > &
259264 Partial < Pick < AttachmentPickerContextValue , 'bottomInset' | 'topInset' > > &
265+ Partial <
266+ Pick <
267+ AttachmentPickerProps ,
268+ | 'AttachmentPickerError'
269+ | 'AttachmentPickerErrorImage'
270+ | 'AttachmentPickerIOSSelectMorePhotos'
271+ | 'ImageOverlaySelectedComponent'
272+ | 'attachmentPickerErrorButtonText'
273+ | 'attachmentPickerErrorText'
274+ | 'numberOfAttachmentImagesToLoadPerCall'
275+ | 'numberOfAttachmentPickerImageColumns'
276+ >
277+ > &
260278 Partial <
261279 Pick <
262280 ChannelContextValue ,
@@ -508,6 +526,14 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
508526 AutoCompleteSuggestionHeader = AutoCompleteSuggestionHeaderDefault ,
509527 AutoCompleteSuggestionItem = AutoCompleteSuggestionItemDefault ,
510528 AutoCompleteSuggestionList = AutoCompleteSuggestionListDefault ,
529+ AttachmentPickerError = DefaultAttachmentPickerError ,
530+ AttachmentPickerErrorImage = DefaultAttachmentPickerErrorImage ,
531+ AttachmentPickerIOSSelectMorePhotos = DefaultAttachmentPickerIOSSelectMorePhotos ,
532+ ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent ,
533+ attachmentPickerErrorButtonText,
534+ attachmentPickerErrorText,
535+ numberOfAttachmentImagesToLoadPerCall = 60 ,
536+ numberOfAttachmentPickerImageColumns = 3 ,
511537
512538 autoCompleteSuggestionsLimit,
513539 bottomInset = 0 ,
@@ -677,7 +703,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
677703 thread : threadFromProps ,
678704 threadList,
679705 threadMessages,
680- topInset = 0 ,
706+ topInset,
681707 TypingIndicator = TypingIndicatorDefault ,
682708 TypingIndicatorContainer = TypingIndicatorContainerDefault ,
683709 UnreadMessagesNotification = UnreadMessagesNotificationDefault ,
@@ -1654,6 +1680,37 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
16541680 }
16551681 } ) ;
16561682
1683+ const attachmentPickerProps = useMemo (
1684+ ( ) => ( {
1685+ AttachmentPickerBottomSheetHandle,
1686+ attachmentPickerBottomSheetHandleHeight,
1687+ attachmentPickerBottomSheetHeight,
1688+ AttachmentPickerError,
1689+ attachmentPickerErrorButtonText,
1690+ AttachmentPickerErrorImage,
1691+ attachmentPickerErrorText,
1692+ AttachmentPickerIOSSelectMorePhotos,
1693+ attachmentSelectionBarHeight,
1694+ ImageOverlaySelectedComponent,
1695+ numberOfAttachmentImagesToLoadPerCall,
1696+ numberOfAttachmentPickerImageColumns,
1697+ } ) ,
1698+ [
1699+ AttachmentPickerBottomSheetHandle ,
1700+ attachmentPickerBottomSheetHandleHeight ,
1701+ attachmentPickerBottomSheetHeight ,
1702+ AttachmentPickerError ,
1703+ attachmentPickerErrorButtonText ,
1704+ AttachmentPickerErrorImage ,
1705+ attachmentPickerErrorText ,
1706+ AttachmentPickerIOSSelectMorePhotos ,
1707+ attachmentSelectionBarHeight ,
1708+ ImageOverlaySelectedComponent ,
1709+ numberOfAttachmentImagesToLoadPerCall ,
1710+ numberOfAttachmentPickerImageColumns ,
1711+ ] ,
1712+ ) ;
1713+
16571714 const attachmentPickerContext = useMemo (
16581715 ( ) => ( {
16591716 bottomInset,
@@ -1962,6 +2019,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
19622019 < AttachmentPickerProvider value = { attachmentPickerContext } >
19632020 < MessageInputProvider value = { inputMessageInputContext } >
19642021 < View style = { { height : '100%' } } > { children } </ View >
2022+ < AttachmentPicker ref = { bottomSheetRef } { ...attachmentPickerProps } />
19652023 </ MessageInputProvider >
19662024 </ AttachmentPickerProvider >
19672025 </ ThreadProvider >
0 commit comments