stream-chat-react-native-core 9.0.0-beta.26 → 9.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/Giphy/Giphy.js +19 -7
- package/lib/commonjs/components/Attachment/Giphy/Giphy.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js +3 -3
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerGenericContent.js +24 -16
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerGenericContent.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +1 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useChannelActionItems.js +0 -15
- package/lib/commonjs/components/ChannelList/hooks/useChannelActionItems.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js +15 -13
- package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js +11 -9
- package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -4
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +3 -3
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +2 -10
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageContent.js +39 -5
- package/lib/commonjs/components/Message/MessageItemView/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js +11 -7
- package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js +18 -8
- package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +3 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +2 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +0 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js +8 -0
- package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollInputDialog.js +1 -1
- package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +15 -5
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadList.js +3 -1
- package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +141 -40
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.utils.js +53 -0
- package/lib/commonjs/components/UIComponents/BottomSheetModal.utils.js.map +1 -0
- package/lib/commonjs/components/UIComponents/StreamBottomSheetModalFlatList.js +9 -5
- package/lib/commonjs/components/UIComponents/StreamBottomSheetModalFlatList.js.map +1 -1
- package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js +1 -1
- package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ui/Button/hooks/useButtonStyles.js +1 -1
- package/lib/commonjs/components/ui/Button/hooks/useButtonStyles.js.map +1 -1
- package/lib/commonjs/contexts/bottomSheetContext/BottomSheetContext.js.map +1 -1
- package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js +4 -4
- package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -0
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js +4 -4
- package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
- package/lib/commonjs/i18n/en.json +3 -2
- package/lib/commonjs/i18n/es.json +3 -2
- package/lib/commonjs/i18n/fr.json +3 -2
- package/lib/commonjs/i18n/he.json +3 -2
- package/lib/commonjs/i18n/hi.json +3 -2
- package/lib/commonjs/i18n/it.json +3 -2
- package/lib/commonjs/i18n/ja.json +3 -2
- package/lib/commonjs/i18n/ko.json +3 -2
- package/lib/commonjs/i18n/nl.json +3 -2
- package/lib/commonjs/i18n/pt-br.json +3 -2
- package/lib/commonjs/i18n/ru.json +3 -2
- package/lib/commonjs/i18n/tr.json +3 -2
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Giphy/Giphy.js +19 -7
- package/lib/module/components/Attachment/Giphy/Giphy.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js +3 -3
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerGenericContent.js +24 -16
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerGenericContent.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +1 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useChannelActionItems.js +0 -15
- package/lib/module/components/ChannelList/hooks/useChannelActionItems.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js +15 -13
- package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewView.js +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js +11 -9
- package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -4
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +3 -3
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/Message/Message.js +2 -10
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageContent.js +39 -5
- package/lib/module/components/Message/MessageItemView/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageItemView.js +11 -7
- package/lib/module/components/Message/MessageItemView/MessageItemView.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageReplies.js +1 -1
- package/lib/module/components/Message/MessageItemView/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageStatus.js +18 -8
- package/lib/module/components/Message/MessageItemView/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +3 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +2 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js +0 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/module/components/Poll/components/MultipleVotesSettings.js +8 -0
- package/lib/module/components/Poll/components/MultipleVotesSettings.js.map +1 -1
- package/lib/module/components/Poll/components/PollInputDialog.js +1 -1
- package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +15 -5
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadList.js +3 -1
- package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +141 -40
- package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.utils.js +53 -0
- package/lib/module/components/UIComponents/BottomSheetModal.utils.js.map +1 -0
- package/lib/module/components/UIComponents/StreamBottomSheetModalFlatList.js +9 -5
- package/lib/module/components/UIComponents/StreamBottomSheetModalFlatList.js.map +1 -1
- package/lib/module/components/ui/Avatar/ChannelAvatar.js +1 -1
- package/lib/module/components/ui/Avatar/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ui/Button/hooks/useButtonStyles.js +1 -1
- package/lib/module/components/ui/Button/hooks/useButtonStyles.js.map +1 -1
- package/lib/module/contexts/bottomSheetContext/BottomSheetContext.js.map +1 -1
- package/lib/module/contexts/messageComposerContext/MessageComposerContext.js +4 -4
- package/lib/module/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +1 -0
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/hooks/messagePreview/useMessagePreviewText.js +4 -4
- package/lib/module/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
- package/lib/module/i18n/en.json +3 -2
- package/lib/module/i18n/es.json +3 -2
- package/lib/module/i18n/fr.json +3 -2
- package/lib/module/i18n/he.json +3 -2
- package/lib/module/i18n/hi.json +3 -2
- package/lib/module/i18n/it.json +3 -2
- package/lib/module/i18n/ja.json +3 -2
- package/lib/module/i18n/ko.json +3 -2
- package/lib/module/i18n/nl.json +3 -2
- package/lib/module/i18n/pt-br.json +3 -2
- package/lib/module/i18n/ru.json +3 -2
- package/lib/module/i18n/tr.json +3 -2
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Giphy/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/Giphy/Giphy.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerGenericContent.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/useChannelActionItems.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts.map +1 -1
- package/lib/typescript/components/Indicators/LoadingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageStatus.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/MultipleVotesSettings.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts +5 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.utils.d.ts +28 -0
- package/lib/typescript/components/UIComponents/BottomSheetModal.utils.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/StreamBottomSheetModalFlatList.d.ts.map +1 -1
- package/lib/typescript/components/ui/Avatar/ChannelAvatar.d.ts.map +1 -1
- package/lib/typescript/contexts/bottomSheetContext/BottomSheetContext.d.ts +1 -0
- package/lib/typescript/contexts/bottomSheetContext/BottomSheetContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/ThemeContext.d.ts +1 -0
- package/lib/typescript/contexts/themeContext/ThemeContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/hooks/messagePreview/useMessagePreviewText.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +3 -2
- package/lib/typescript/i18n/es.json +3 -2
- package/lib/typescript/i18n/fr.json +3 -2
- package/lib/typescript/i18n/he.json +3 -2
- package/lib/typescript/i18n/hi.json +3 -2
- package/lib/typescript/i18n/it.json +3 -2
- package/lib/typescript/i18n/ja.json +3 -2
- package/lib/typescript/i18n/ko.json +3 -2
- package/lib/typescript/i18n/nl.json +3 -2
- package/lib/typescript/i18n/pt-br.json +3 -2
- package/lib/typescript/i18n/ru.json +3 -2
- package/lib/typescript/i18n/tr.json +3 -2
- package/lib/typescript/utils/i18n/Streami18n.d.ts +3 -2
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Attachment/Giphy/Giphy.tsx +19 -7
- package/src/components/Attachment/__tests__/Giphy.test.js +33 -1
- package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx +3 -3
- package/src/components/AttachmentPicker/components/AttachmentPickerGenericContent.tsx +23 -13
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +3 -1
- package/src/components/Channel/Channel.tsx +1 -1
- package/src/components/ChannelList/hooks/__tests__/useChannelActionItems.test.tsx +12 -45
- package/src/components/ChannelList/hooks/useChannelActionItems.tsx +1 -19
- package/src/components/ChannelPreview/ChannelDetailsBottomSheet.tsx +10 -8
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +3 -1
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +1 -1
- package/src/components/ChannelPreview/ChannelPreviewView.tsx +3 -2
- package/src/components/ChannelPreview/ChannelSwipableWrapper.tsx +8 -7
- package/src/components/ChannelPreview/__tests__/ChannelDetailsBottomSheet.test.tsx +1 -1
- package/src/components/ChannelPreview/__tests__/ChannelLastMessagePreview.test.tsx +32 -0
- package/src/components/ChannelPreview/__tests__/ChannelSwipableWrapper.test.tsx +5 -2
- package/src/components/ImageGallery/components/ImageGrid.tsx +3 -1
- package/src/components/Indicators/LoadingIndicator.tsx +7 -5
- package/src/components/Message/Message.tsx +2 -12
- package/src/components/Message/MessageItemView/MessageContent.tsx +44 -7
- package/src/components/Message/MessageItemView/MessageItemView.tsx +15 -7
- package/src/components/Message/MessageItemView/MessageReplies.tsx +1 -1
- package/src/components/Message/MessageItemView/MessageStatus.tsx +16 -5
- package/src/components/Message/MessageItemView/__tests__/MessageContent.test.js +72 -1
- package/src/components/Message/MessageItemView/__tests__/MessageItemView.test.js +52 -1
- package/src/components/Message/hooks/useCreateMessageContext.ts +3 -0
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +1 -0
- package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +1 -1
- package/src/components/MessageMenu/MessageUserReactions.tsx +1 -5
- package/src/components/Poll/components/MultipleVotesSettings.tsx +8 -0
- package/src/components/Poll/components/PollInputDialog.tsx +1 -1
- package/src/components/Poll/components/PollOption.tsx +25 -9
- package/src/components/ThreadList/ThreadList.tsx +1 -1
- package/src/components/UIComponents/BottomSheetModal.tsx +237 -53
- package/src/components/UIComponents/BottomSheetModal.utils.ts +82 -0
- package/src/components/UIComponents/StreamBottomSheetModalFlatList.tsx +14 -5
- package/src/components/UIComponents/__tests__/BottomSheetModal.utils.test.ts +111 -0
- package/src/components/ui/Avatar/ChannelAvatar.tsx +5 -1
- package/src/components/ui/Button/hooks/useButtonStyles.ts +1 -1
- package/src/contexts/bottomSheetContext/BottomSheetContext.tsx +1 -0
- package/src/contexts/messageComposerContext/MessageComposerContext.tsx +1 -1
- package/src/contexts/messageContext/MessageContext.tsx +4 -2
- package/src/contexts/themeContext/utils/theme.ts +2 -0
- package/src/hooks/messagePreview/useMessagePreviewText.tsx +5 -6
- package/src/i18n/en.json +3 -2
- package/src/i18n/es.json +3 -2
- package/src/i18n/fr.json +3 -2
- package/src/i18n/he.json +3 -2
- package/src/i18n/hi.json +3 -2
- package/src/i18n/it.json +3 -2
- package/src/i18n/ja.json +3 -2
- package/src/i18n/ko.json +3 -2
- package/src/i18n/nl.json +3 -2
- package/src/i18n/pt-br.json +3 -2
- package/src/i18n/ru.json +3 -2
- package/src/i18n/tr.json +3 -2
- package/src/version.json +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BOTTOM_SHEET_HANDLE_TOTAL_HEIGHT,
|
|
3
|
+
getBottomSheetBaseHeight,
|
|
4
|
+
getBottomSheetSnapPointTranslateY,
|
|
5
|
+
getBottomSheetSnapPoints,
|
|
6
|
+
getBottomSheetTopSnapIndex,
|
|
7
|
+
} from '../BottomSheetModal.utils';
|
|
8
|
+
|
|
9
|
+
describe('BottomSheetModal.utils', () => {
|
|
10
|
+
it('caps fixed bottom sheet height by maxHeight', () => {
|
|
11
|
+
expect(
|
|
12
|
+
getBottomSheetBaseHeight({
|
|
13
|
+
contentHeight: undefined,
|
|
14
|
+
enableDynamicSizing: false,
|
|
15
|
+
height: 500,
|
|
16
|
+
maxHeight: 420,
|
|
17
|
+
}),
|
|
18
|
+
).toBe(420);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('uses measured content height plus handle and safe area when dynamic sizing is enabled', () => {
|
|
22
|
+
expect(
|
|
23
|
+
getBottomSheetBaseHeight({
|
|
24
|
+
contentHeight: 120,
|
|
25
|
+
enableDynamicSizing: true,
|
|
26
|
+
height: 400,
|
|
27
|
+
maxHeight: 500,
|
|
28
|
+
}),
|
|
29
|
+
).toBe(120 + BOTTOM_SHEET_HANDLE_TOTAL_HEIGHT);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('caps dynamic content height by the provided height', () => {
|
|
33
|
+
expect(
|
|
34
|
+
getBottomSheetBaseHeight({
|
|
35
|
+
contentHeight: 500,
|
|
36
|
+
enableDynamicSizing: true,
|
|
37
|
+
height: 300,
|
|
38
|
+
maxHeight: 600,
|
|
39
|
+
}),
|
|
40
|
+
).toBe(300);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('keeps the expanded snap point when the sheet is shorter than maxHeight', () => {
|
|
44
|
+
expect(
|
|
45
|
+
getBottomSheetSnapPoints({
|
|
46
|
+
baseHeight: 280,
|
|
47
|
+
maxHeight: 640,
|
|
48
|
+
}),
|
|
49
|
+
).toEqual([280, 640]);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('returns two snap points for fixed sizing when maxHeight exceeds baseHeight', () => {
|
|
53
|
+
expect(
|
|
54
|
+
getBottomSheetSnapPoints({
|
|
55
|
+
baseHeight: 280,
|
|
56
|
+
maxHeight: 640,
|
|
57
|
+
}),
|
|
58
|
+
).toEqual([280, 640]);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('returns a single snap point when the sheet is already at maxHeight', () => {
|
|
62
|
+
expect(
|
|
63
|
+
getBottomSheetSnapPoints({
|
|
64
|
+
baseHeight: 640,
|
|
65
|
+
maxHeight: 640,
|
|
66
|
+
}),
|
|
67
|
+
).toEqual([640]);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('returns the correct top snap index', () => {
|
|
71
|
+
expect(
|
|
72
|
+
getBottomSheetTopSnapIndex({
|
|
73
|
+
baseHeight: 280,
|
|
74
|
+
maxHeight: 640,
|
|
75
|
+
}),
|
|
76
|
+
).toBe(1);
|
|
77
|
+
|
|
78
|
+
expect(
|
|
79
|
+
getBottomSheetTopSnapIndex({
|
|
80
|
+
baseHeight: 640,
|
|
81
|
+
maxHeight: 640,
|
|
82
|
+
}),
|
|
83
|
+
).toBe(0);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('returns the correct translateY for each snap point', () => {
|
|
87
|
+
expect(
|
|
88
|
+
getBottomSheetSnapPointTranslateY({
|
|
89
|
+
baseHeight: 280,
|
|
90
|
+
maxHeight: 640,
|
|
91
|
+
snapIndex: 0,
|
|
92
|
+
}),
|
|
93
|
+
).toBe(360);
|
|
94
|
+
|
|
95
|
+
expect(
|
|
96
|
+
getBottomSheetSnapPointTranslateY({
|
|
97
|
+
baseHeight: 280,
|
|
98
|
+
maxHeight: 640,
|
|
99
|
+
snapIndex: 1,
|
|
100
|
+
}),
|
|
101
|
+
).toBe(0);
|
|
102
|
+
|
|
103
|
+
expect(
|
|
104
|
+
getBottomSheetSnapPointTranslateY({
|
|
105
|
+
baseHeight: 640,
|
|
106
|
+
maxHeight: 640,
|
|
107
|
+
snapIndex: 0,
|
|
108
|
+
}),
|
|
109
|
+
).toBe(0);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
@@ -58,7 +58,11 @@ export const ChannelAvatar = (props: ChannelAvatarProps) => {
|
|
|
58
58
|
|
|
59
59
|
if (usersWithoutSelf.length > 1) {
|
|
60
60
|
return (
|
|
61
|
-
<UserAvatarGroup
|
|
61
|
+
<UserAvatarGroup
|
|
62
|
+
size={size}
|
|
63
|
+
users={usersForGroup}
|
|
64
|
+
showOnlineIndicator={showOnlineIndicator}
|
|
65
|
+
/>
|
|
62
66
|
);
|
|
63
67
|
} else {
|
|
64
68
|
return (
|
|
@@ -79,7 +79,7 @@ export const useButtonStyles = ({ variant, type }: ButtonStylesConfig) => {
|
|
|
79
79
|
borderColor: semantics.buttonSecondaryBorder,
|
|
80
80
|
disabledForegroundColor: semantics.textDisabled,
|
|
81
81
|
disabledBackgroundColor: undefined,
|
|
82
|
-
disabledBorderColor: semantics.
|
|
82
|
+
disabledBorderColor: semantics.borderUtilityDisabled,
|
|
83
83
|
},
|
|
84
84
|
secondaryGhost: {
|
|
85
85
|
foregroundColor: semantics.buttonSecondaryText,
|
|
@@ -8,6 +8,7 @@ import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
|
8
8
|
export type BottomSheetContextValue = {
|
|
9
9
|
close: (closeAnimationFinishedCallback?: () => void) => void;
|
|
10
10
|
currentSnapIndex: SharedValue<number>;
|
|
11
|
+
topSnapIndex: SharedValue<number>;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const BottomSheetContext = React.createContext(
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from './MessageComposerAPIContext';
|
|
9
9
|
|
|
10
10
|
import { ChannelProps } from '../../components';
|
|
11
|
-
import { useStableCallback } from '../../hooks';
|
|
11
|
+
import { useStableCallback } from '../../hooks/useStableCallback';
|
|
12
12
|
import { useCreateMessageComposer } from '../messageInputContext/hooks/useCreateMessageComposer';
|
|
13
13
|
import { ThreadContextValue } from '../threadContext/ThreadContext';
|
|
14
14
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
@@ -4,7 +4,7 @@ import type { View } from 'react-native';
|
|
|
4
4
|
import type { Attachment, LocalMessage } from 'stream-chat';
|
|
5
5
|
|
|
6
6
|
import type { ActionHandler } from '../../components/Attachment/Attachment';
|
|
7
|
-
import { ReactionSummary } from '../../components/Message/hooks/useProcessReactions';
|
|
7
|
+
import type { ReactionSummary } from '../../components/Message/hooks/useProcessReactions';
|
|
8
8
|
import type {
|
|
9
9
|
MessagePressableHandlerPayload,
|
|
10
10
|
PressableHandlerPayload,
|
|
@@ -15,7 +15,7 @@ import type { MessageContentType } from '../../contexts/messagesContext/Messages
|
|
|
15
15
|
import type { DeepPartial } from '../../contexts/themeContext/ThemeContext';
|
|
16
16
|
import type { Theme } from '../../contexts/themeContext/utils/theme';
|
|
17
17
|
|
|
18
|
-
import { MessageComposerAPIContextValue } from '../messageComposerContext/MessageComposerAPIContext';
|
|
18
|
+
import type { MessageComposerAPIContextValue } from '../messageComposerContext/MessageComposerAPIContext';
|
|
19
19
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
20
20
|
|
|
21
21
|
export type Alignment = 'right' | 'left';
|
|
@@ -40,6 +40,8 @@ export type MessageContextValue = {
|
|
|
40
40
|
groupStyles: GroupType[];
|
|
41
41
|
/** Handler for actions. Actions in combination with attachments can be used to build [commands](https://getstream.io/chat/docs/#channel_commands). */
|
|
42
42
|
handleAction: ActionHandler;
|
|
43
|
+
/** Whether or not any message attachment exposes actions. */
|
|
44
|
+
hasAttachmentActions: boolean;
|
|
43
45
|
handleToggleReaction: (reactionType: string) => Promise<void>;
|
|
44
46
|
/** Whether or not message has reactions */
|
|
45
47
|
hasReactions: boolean;
|
|
@@ -107,6 +107,7 @@ export type Theme = {
|
|
|
107
107
|
bottomSheetContentContainer: ViewStyle;
|
|
108
108
|
durationText: TextStyle;
|
|
109
109
|
content: {
|
|
110
|
+
actionContainer: ViewStyle;
|
|
110
111
|
container: ViewStyle;
|
|
111
112
|
infoContainer: ViewStyle;
|
|
112
113
|
text: TextStyle;
|
|
@@ -1030,6 +1031,7 @@ export const defaultTheme: Theme = {
|
|
|
1030
1031
|
bottomSheetContentContainer: {},
|
|
1031
1032
|
durationText: {},
|
|
1032
1033
|
content: {
|
|
1034
|
+
actionContainer: {},
|
|
1033
1035
|
container: {},
|
|
1034
1036
|
infoContainer: {},
|
|
1035
1037
|
text: {},
|
|
@@ -35,7 +35,6 @@ export const useMessagePreviewText = ({
|
|
|
35
35
|
const onlyAudio = audios?.length === attachmentsLength;
|
|
36
36
|
const onlyVoiceRecordings =
|
|
37
37
|
voiceRecordings?.length && voiceRecordings?.length === attachmentsLength;
|
|
38
|
-
|
|
39
38
|
if (message?.type === 'deleted') {
|
|
40
39
|
return 'Message deleted';
|
|
41
40
|
}
|
|
@@ -55,8 +54,12 @@ export const useMessagePreviewText = ({
|
|
|
55
54
|
return 'Location';
|
|
56
55
|
}
|
|
57
56
|
|
|
57
|
+
if (giphys?.length) {
|
|
58
|
+
return 'Giphy';
|
|
59
|
+
}
|
|
60
|
+
|
|
58
61
|
if (message?.text) {
|
|
59
|
-
return message
|
|
62
|
+
return message.text;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
if (onlyImages) {
|
|
@@ -91,10 +94,6 @@ export const useMessagePreviewText = ({
|
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
if (giphys?.length) {
|
|
95
|
-
return 'Giphy';
|
|
96
|
-
}
|
|
97
|
-
|
|
98
97
|
if (onlyFiles && files?.length === 1) {
|
|
99
98
|
return files?.[0]?.title;
|
|
100
99
|
}
|
package/src/i18n/en.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Change in Settings",
|
|
165
165
|
"Create a poll and let everyone vote": "Create a poll and let everyone vote",
|
|
166
166
|
"Open Camera": "Open Camera",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Open Files",
|
|
168
|
+
"Select files to share": "Select files to share",
|
|
169
|
+
"Take a photo and share": "Take a photo and share",
|
|
169
170
|
"Take a video and share": "Take a video and share",
|
|
170
171
|
"You have not granted access to your camera": "You have not granted access to your camera",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} Reactions",
|
package/src/i18n/es.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Cambiar en Ajustes",
|
|
165
165
|
"Create a poll and let everyone vote": "Crea una encuesta y deja que todos voten",
|
|
166
166
|
"Open Camera": "Abrir camara",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Abrir archivos",
|
|
168
|
+
"Select files to share": "Selecciona archivos para compartir",
|
|
169
|
+
"Take a photo and share": "Toma una foto y compártela",
|
|
169
170
|
"Take a video and share": "Graba un video y compártelo",
|
|
170
171
|
"You have not granted access to your camera": "No has concedido acceso a tu camara",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} reacciones",
|
package/src/i18n/fr.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Changer dans Réglages",
|
|
165
165
|
"Create a poll and let everyone vote": "Créez un sondage et laissez tout le monde voter",
|
|
166
166
|
"Open Camera": "Ouvrir la caméra",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Ouvrir les fichiers",
|
|
168
|
+
"Select files to share": "Sélectionnez des fichiers à partager",
|
|
169
|
+
"Take a photo and share": "Prenez une photo et partagez-la",
|
|
169
170
|
"Take a video and share": "Prenez une vidéo et partagez-la",
|
|
170
171
|
"You have not granted access to your camera": "Vous n'avez pas accordé l'accès à votre caméra",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} réactions",
|
package/src/i18n/he.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "שנה בהגדרות",
|
|
165
165
|
"Create a poll and let everyone vote": "צור סקר ותן לכולם להצביע",
|
|
166
166
|
"Open Camera": "פתח מצלמה",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "פתח קבצים",
|
|
168
|
+
"Select files to share": "בחר קבצים לשיתוף",
|
|
169
|
+
"Take a photo and share": "צלם תמונה ושתף",
|
|
169
170
|
"Take a video and share": "צלם וידאו ושתף",
|
|
170
171
|
"You have not granted access to your camera": "לא הענקת גישה למצלמה שלך",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} תגובות",
|
package/src/i18n/hi.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "सेटिंग्स में बदलें",
|
|
165
165
|
"Create a poll and let everyone vote": "पोल बनाएँ और सभी को वोट करने दें",
|
|
166
166
|
"Open Camera": "कैमरा खोलें",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "फ़ाइलें खोलें",
|
|
168
|
+
"Select files to share": "साझा करने के लिए फ़ाइलें चुनें",
|
|
169
|
+
"Take a photo and share": "एक फ़ोटो लें और साझा करें",
|
|
169
170
|
"Take a video and share": "वीडियो लें और साझा करें",
|
|
170
171
|
"You have not granted access to your camera": "आपने अपने कैमरे के लिए अनुमति नहीं दी है",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} प्रतिक्रियाएँ",
|
package/src/i18n/it.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Cambia in Impostazioni",
|
|
165
165
|
"Create a poll and let everyone vote": "Crea un sondaggio e lascia che tutti votino",
|
|
166
166
|
"Open Camera": "Apri fotocamera",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Apri file",
|
|
168
|
+
"Select files to share": "Seleziona file da condividere",
|
|
169
|
+
"Take a photo and share": "Scatta una foto e condividila",
|
|
169
170
|
"Take a video and share": "Registra un video e condividilo",
|
|
170
171
|
"You have not granted access to your camera": "Non hai concesso l’accesso alla fotocamera",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} reazioni",
|
package/src/i18n/ja.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "設定で変更",
|
|
165
165
|
"Create a poll and let everyone vote": "投票を作成してみんなに投票してもらう",
|
|
166
166
|
"Open Camera": "カメラを開く",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "ファイルを開く",
|
|
168
|
+
"Select files to share": "共有するファイルを選択",
|
|
169
|
+
"Take a photo and share": "写真を撮って共有",
|
|
169
170
|
"Take a video and share": "動画を撮影して共有",
|
|
170
171
|
"You have not granted access to your camera": "カメラへのアクセスが許可されていません",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}}件のリアクション",
|
package/src/i18n/ko.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "설정에서 변경",
|
|
165
165
|
"Create a poll and let everyone vote": "투표를 만들어 모두가 투표하게 하세요",
|
|
166
166
|
"Open Camera": "카메라 열기",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "파일 열기",
|
|
168
|
+
"Select files to share": "공유할 파일 선택",
|
|
169
|
+
"Take a photo and share": "사진을 찍고 공유",
|
|
169
170
|
"Take a video and share": "동영상을 촬영하고 공유",
|
|
170
171
|
"You have not granted access to your camera": "카메라 접근 권한이 없습니다",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}}개의 반응",
|
package/src/i18n/nl.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Wijzigen in Instellingen",
|
|
165
165
|
"Create a poll and let everyone vote": "Maak een peiling en laat iedereen stemmen",
|
|
166
166
|
"Open Camera": "Camera openen",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Bestanden openen",
|
|
168
|
+
"Select files to share": "Selecteer bestanden om te delen",
|
|
169
|
+
"Take a photo and share": "Maak een foto en deel deze",
|
|
169
170
|
"Take a video and share": "Maak een video en deel deze",
|
|
170
171
|
"You have not granted access to your camera": "Je hebt geen toegang tot je camera verleend",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} reacties",
|
package/src/i18n/pt-br.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Alterar nos Ajustes",
|
|
165
165
|
"Create a poll and let everyone vote": "Crie uma enquete e deixe todos votarem",
|
|
166
166
|
"Open Camera": "Abrir camera",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Abrir arquivos",
|
|
168
|
+
"Select files to share": "Selecione arquivos para compartilhar",
|
|
169
|
+
"Take a photo and share": "Tire uma foto e compartilhe",
|
|
169
170
|
"Take a video and share": "Grave um video e compartilhe",
|
|
170
171
|
"You have not granted access to your camera": "Você não concedeu acesso à sua câmera",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} reações",
|
package/src/i18n/ru.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Изменить в настройках",
|
|
165
165
|
"Create a poll and let everyone vote": "Создайте опрос и дайте всем проголосовать",
|
|
166
166
|
"Open Camera": "Открыть камеру",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Открыть файлы",
|
|
168
|
+
"Select files to share": "Выберите файлы для отправки",
|
|
169
|
+
"Take a photo and share": "Сделайте фото и поделитесь",
|
|
169
170
|
"Take a video and share": "Снимите видео и поделитесь",
|
|
170
171
|
"You have not granted access to your camera": "Вы не предоставили доступ к вашей камере",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} реакций",
|
package/src/i18n/tr.json
CHANGED
|
@@ -164,8 +164,9 @@
|
|
|
164
164
|
"Change in Settings": "Ayarlar'da değiştir",
|
|
165
165
|
"Create a poll and let everyone vote": "Bir anket oluşturun ve herkesin oy vermesine izin verin",
|
|
166
166
|
"Open Camera": "Kamerayı aç",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
167
|
+
"Open Files": "Dosyaları aç",
|
|
168
|
+
"Select files to share": "Paylaşmak için dosyaları seç",
|
|
169
|
+
"Take a photo and share": "Fotoğraf çek ve paylaş",
|
|
169
170
|
"Take a video and share": "Video çek ve paylaş",
|
|
170
171
|
"You have not granted access to your camera": "Kameranıza erişim izni vermediniz",
|
|
171
172
|
"{{count}} Reactions_many": "{{count}} tepki",
|
package/src/version.json
CHANGED