stream-chat-react-native-core 4.3.1 → 4.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/commonjs/components/Attachment/Card.js +25 -28
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +19 -24
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +27 -25
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/hooks/useGoToURL.js +42 -0
- package/lib/commonjs/components/Attachment/hooks/useGoToURL.js.map +1 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +11 -7
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +4 -12
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js +4 -12
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +8 -4
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js +80 -0
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -0
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +3 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +27 -22
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +28 -14
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +108 -40
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +117 -24
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +52 -20
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +8 -6
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +145 -119
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/i18n/en.json +2 -0
- package/lib/commonjs/i18n/fr.json +2 -0
- package/lib/commonjs/i18n/hi.json +2 -0
- package/lib/commonjs/i18n/it.json +2 -0
- package/lib/commonjs/i18n/ja.json +3 -1
- package/lib/commonjs/i18n/ko.json +3 -1
- package/lib/commonjs/i18n/nl.json +2 -0
- package/lib/commonjs/i18n/ru.json +2 -0
- package/lib/commonjs/i18n/tr.json +2 -0
- package/lib/commonjs/icons/Warning.js +38 -0
- package/lib/commonjs/icons/Warning.js.map +1 -0
- package/lib/commonjs/icons/index.js +13 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/utils/utils.js +33 -2
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Card.js +25 -28
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +19 -24
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +27 -25
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/hooks/useGoToURL.js +42 -0
- package/lib/module/components/Attachment/hooks/useGoToURL.js.map +1 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +11 -7
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +4 -12
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js +4 -12
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +8 -4
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useAppSettings.js +80 -0
- package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -0
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +3 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Message/Message.js +27 -22
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +28 -14
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +108 -40
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +117 -24
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/UploadProgressIndicator.js +52 -20
- package/lib/module/components/MessageInput/UploadProgressIndicator.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +8 -6
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -2
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +145 -119
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/i18n/en.json +2 -0
- package/lib/module/i18n/fr.json +2 -0
- package/lib/module/i18n/hi.json +2 -0
- package/lib/module/i18n/it.json +2 -0
- package/lib/module/i18n/ja.json +3 -1
- package/lib/module/i18n/ko.json +3 -1
- package/lib/module/i18n/nl.json +2 -0
- package/lib/module/i18n/ru.json +2 -0
- package/lib/module/i18n/tr.json +2 -0
- package/lib/module/icons/Warning.js +38 -0
- package/lib/module/icons/Warning.js.map +1 -0
- package/lib/module/icons/index.js +13 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/utils/utils.js +33 -2
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +0 -1
- package/lib/typescript/components/Attachment/hooks/useGoToURL.d.ts +2 -0
- package/lib/typescript/components/Chat/hooks/__tests__/useAppSettings.test.d.ts +1 -0
- package/lib/typescript/components/Chat/hooks/useAppSettings.d.ts +3 -0
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts +12 -2
- package/lib/typescript/components/MessageInput/UploadProgressIndicator.d.ts +1 -3
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +5 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -4
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +3 -3
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
- package/lib/typescript/i18n/en.json +2 -0
- package/lib/typescript/i18n/fr.json +2 -0
- package/lib/typescript/i18n/hi.json +2 -0
- package/lib/typescript/i18n/it.json +2 -0
- package/lib/typescript/i18n/ja.json +3 -1
- package/lib/typescript/i18n/ko.json +3 -1
- package/lib/typescript/i18n/nl.json +2 -0
- package/lib/typescript/i18n/ru.json +2 -0
- package/lib/typescript/i18n/tr.json +2 -0
- package/lib/typescript/icons/Warning.d.ts +3 -0
- package/lib/typescript/icons/index.d.ts +1 -0
- package/lib/typescript/utils/Streami18n.d.ts +6 -0
- package/lib/typescript/utils/utils.d.ts +15 -2
- package/package.json +2 -2
- package/src/components/Attachment/Card.tsx +5 -13
- package/src/components/Attachment/FileAttachment.tsx +5 -13
- package/src/components/Attachment/Giphy.tsx +3 -1
- package/src/components/Attachment/__tests__/Attachment.test.js +39 -0
- package/src/components/Attachment/hooks/useGoToURL.ts +27 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +23 -13
- package/src/components/Channel/Channel.tsx +1 -1
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +3 -9
- package/src/components/Channel/hooks/useCreateThreadContext.ts +3 -9
- package/src/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.tsx +1 -0
- package/src/components/Chat/Chat.tsx +4 -0
- package/src/components/Chat/hooks/__tests__/useAppSettings.test.tsx +34 -0
- package/src/components/Chat/hooks/useAppSettings.ts +39 -0
- package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
- package/src/components/Message/Message.tsx +56 -48
- package/src/components/Message/MessageSimple/utils/renderText.tsx +17 -2
- package/src/components/MessageInput/FileUploadPreview.tsx +60 -14
- package/src/components/MessageInput/ImageUploadPreview.tsx +95 -42
- package/src/components/MessageInput/UploadProgressIndicator.tsx +49 -22
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +50 -80
- package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +49 -74
- package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +36 -13
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +2 -2
- package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap +122 -17
- package/src/components/MessageList/ScrollToBottomButton.tsx +2 -1
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.js.snap +1 -0
- package/src/contexts/chatContext/ChatContext.tsx +5 -1
- package/src/contexts/messageContext/MessageContext.tsx +7 -4
- package/src/contexts/messageInputContext/MessageInputContext.tsx +127 -96
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +2 -2
- package/src/contexts/themeContext/utils/theme.ts +1 -0
- package/src/i18n/en.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hi.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +3 -1
- package/src/i18n/ko.json +3 -1
- package/src/i18n/nl.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/icons/Warning.tsx +12 -0
- package/src/icons/index.ts +1 -0
- package/src/utils/utils.ts +53 -1
- package/src/version.json +1 -1
- package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +0 -4413
- package/src/components/MessageInput/__tests__/__snapshots__/ImageUploadPreview.test.js.snap +0 -2373
|
@@ -7,14 +7,14 @@ import { ProgressIndicatorTypes } from '../../../utils/utils';
|
|
|
7
7
|
import { UploadProgressIndicator } from '../UploadProgressIndicator';
|
|
8
8
|
|
|
9
9
|
describe('UploadProgressIndicator', () => {
|
|
10
|
-
it('should render an inactive
|
|
10
|
+
it('should render an inactive UploadProgressIndicator', async () => {
|
|
11
11
|
const action = jest.fn();
|
|
12
12
|
|
|
13
13
|
const { queryByTestId, toJSON } = render(
|
|
14
14
|
<ThemeProvider>
|
|
15
15
|
<UploadProgressIndicator
|
|
16
16
|
action={action}
|
|
17
|
-
type={ProgressIndicatorTypes.
|
|
17
|
+
type={ProgressIndicatorTypes.INACTIVE}
|
|
18
18
|
></UploadProgressIndicator>
|
|
19
19
|
</ThemeProvider>,
|
|
20
20
|
);
|
|
@@ -32,21 +32,21 @@ describe('UploadProgressIndicator', () => {
|
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
it('should render an
|
|
35
|
+
it('should render an active UploadProgressIndicator', async () => {
|
|
36
36
|
const action = jest.fn();
|
|
37
37
|
|
|
38
38
|
const { queryByTestId, toJSON } = render(
|
|
39
39
|
<ThemeProvider>
|
|
40
40
|
<UploadProgressIndicator
|
|
41
41
|
action={action}
|
|
42
|
-
type={ProgressIndicatorTypes.
|
|
42
|
+
type={ProgressIndicatorTypes.IN_PROGRESS}
|
|
43
43
|
></UploadProgressIndicator>
|
|
44
44
|
</ThemeProvider>,
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
await waitFor(() => {
|
|
48
|
-
expect(queryByTestId('active-upload-progress-indicator')).
|
|
49
|
-
expect(queryByTestId('inactive-upload-progress-indicator')).
|
|
48
|
+
expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
|
|
49
|
+
expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
|
|
50
50
|
expect(action).toHaveBeenCalledTimes(0);
|
|
51
51
|
});
|
|
52
52
|
|
|
@@ -57,24 +57,48 @@ describe('UploadProgressIndicator', () => {
|
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
it('should render an active
|
|
60
|
+
it('should render an active UploadProgressIndicator and not-supported indicator', async () => {
|
|
61
61
|
const action = jest.fn();
|
|
62
62
|
|
|
63
63
|
const { queryByTestId, toJSON } = render(
|
|
64
64
|
<ThemeProvider>
|
|
65
65
|
<UploadProgressIndicator
|
|
66
66
|
action={action}
|
|
67
|
-
|
|
68
|
-
type={ProgressIndicatorTypes.IN_PROGRESS}
|
|
67
|
+
type={ProgressIndicatorTypes.NOT_SUPPORTED}
|
|
69
68
|
></UploadProgressIndicator>
|
|
70
69
|
</ThemeProvider>,
|
|
71
70
|
);
|
|
72
71
|
|
|
73
72
|
await waitFor(() => {
|
|
74
73
|
expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
|
|
74
|
+
expect(queryByTestId('not-supported-upload-progress-indicator')).toBeTruthy();
|
|
75
75
|
expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
|
|
76
|
+
expect(action).toHaveBeenCalledTimes(0);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const snapshot = toJSON();
|
|
80
|
+
|
|
81
|
+
await waitFor(() => {
|
|
82
|
+
expect(snapshot).toMatchSnapshot();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('should render an active UploadProgressIndicator and in-progress indicator', async () => {
|
|
87
|
+
const action = jest.fn();
|
|
88
|
+
|
|
89
|
+
const { queryByTestId, toJSON } = render(
|
|
90
|
+
<ThemeProvider>
|
|
91
|
+
<UploadProgressIndicator
|
|
92
|
+
action={action}
|
|
93
|
+
type={ProgressIndicatorTypes.IN_PROGRESS}
|
|
94
|
+
></UploadProgressIndicator>
|
|
95
|
+
</ThemeProvider>,
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
await waitFor(() => {
|
|
99
|
+
expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
|
|
76
100
|
expect(queryByTestId('upload-progress-indicator')).toBeTruthy();
|
|
77
|
-
expect(queryByTestId('
|
|
101
|
+
expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
|
|
78
102
|
expect(action).toHaveBeenCalledTimes(0);
|
|
79
103
|
});
|
|
80
104
|
|
|
@@ -85,14 +109,13 @@ describe('UploadProgressIndicator', () => {
|
|
|
85
109
|
});
|
|
86
110
|
});
|
|
87
111
|
|
|
88
|
-
it('should render an active
|
|
112
|
+
it('should render an active UploadProgressIndicator and retry indicator', async () => {
|
|
89
113
|
const action = jest.fn();
|
|
90
114
|
|
|
91
115
|
const { getByTestId, queryByTestId, toJSON } = render(
|
|
92
116
|
<ThemeProvider>
|
|
93
117
|
<UploadProgressIndicator
|
|
94
118
|
action={action}
|
|
95
|
-
active
|
|
96
119
|
type={ProgressIndicatorTypes.RETRY}
|
|
97
120
|
></UploadProgressIndicator>
|
|
98
121
|
</ThemeProvider>,
|
|
@@ -100,8 +123,8 @@ describe('UploadProgressIndicator', () => {
|
|
|
100
123
|
|
|
101
124
|
await waitFor(() => {
|
|
102
125
|
expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
|
|
103
|
-
expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
|
|
104
126
|
expect(queryByTestId('upload-progress-indicator')).toBeFalsy();
|
|
127
|
+
expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
|
|
105
128
|
expect(queryByTestId('retry-upload-progress-indicator')).toBeTruthy();
|
|
106
129
|
expect(action).toHaveBeenCalledTimes(0);
|
|
107
130
|
});
|
package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`UploadProgressIndicator should render an active
|
|
3
|
+
exports[`UploadProgressIndicator should render an active UploadProgressIndicator 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
style={
|
|
6
6
|
Array [
|
|
@@ -46,6 +46,7 @@ exports[`UploadProgressIndicator should render an active IN_PROGRESS UploadProgr
|
|
|
46
46
|
Object {},
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
|
+
testID="not-supported-upload-progress-indicator"
|
|
49
50
|
>
|
|
50
51
|
<View
|
|
51
52
|
style={
|
|
@@ -69,7 +70,7 @@ exports[`UploadProgressIndicator should render an active IN_PROGRESS UploadProgr
|
|
|
69
70
|
</View>
|
|
70
71
|
`;
|
|
71
72
|
|
|
72
|
-
exports[`UploadProgressIndicator should render an active
|
|
73
|
+
exports[`UploadProgressIndicator should render an active UploadProgressIndicator and in-progress indicator 1`] = `
|
|
73
74
|
<View
|
|
74
75
|
style={
|
|
75
76
|
Array [
|
|
@@ -115,6 +116,124 @@ exports[`UploadProgressIndicator should render an active RETRY UploadProgressInd
|
|
|
115
116
|
Object {},
|
|
116
117
|
]
|
|
117
118
|
}
|
|
119
|
+
testID="not-supported-upload-progress-indicator"
|
|
120
|
+
>
|
|
121
|
+
<View
|
|
122
|
+
style={
|
|
123
|
+
Object {
|
|
124
|
+
"alignItems": "center",
|
|
125
|
+
"bottom": 0,
|
|
126
|
+
"justifyContent": "center",
|
|
127
|
+
"left": 0,
|
|
128
|
+
"position": "absolute",
|
|
129
|
+
"right": 0,
|
|
130
|
+
"top": 0,
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
>
|
|
134
|
+
<ActivityIndicator
|
|
135
|
+
color="#F2F2F2"
|
|
136
|
+
testID="upload-progress-indicator"
|
|
137
|
+
/>
|
|
138
|
+
</View>
|
|
139
|
+
</View>
|
|
140
|
+
</View>
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
exports[`UploadProgressIndicator should render an active UploadProgressIndicator and not-supported indicator 1`] = `
|
|
144
|
+
<View
|
|
145
|
+
style={
|
|
146
|
+
Array [
|
|
147
|
+
Object {
|
|
148
|
+
"overflow": "hidden",
|
|
149
|
+
},
|
|
150
|
+
undefined,
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
testID="active-upload-progress-indicator"
|
|
154
|
+
>
|
|
155
|
+
<View
|
|
156
|
+
style={
|
|
157
|
+
Array [
|
|
158
|
+
Object {
|
|
159
|
+
"alignItems": "center",
|
|
160
|
+
"height": "100%",
|
|
161
|
+
"justifyContent": "center",
|
|
162
|
+
"opacity": 0,
|
|
163
|
+
"position": "absolute",
|
|
164
|
+
"width": "100%",
|
|
165
|
+
},
|
|
166
|
+
Object {
|
|
167
|
+
"backgroundColor": "#000000CC",
|
|
168
|
+
},
|
|
169
|
+
Object {},
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
/>
|
|
173
|
+
<View
|
|
174
|
+
style={
|
|
175
|
+
Array [
|
|
176
|
+
Object {
|
|
177
|
+
"overflow": "hidden",
|
|
178
|
+
},
|
|
179
|
+
Object {
|
|
180
|
+
"backgroundColor": "#000000CC",
|
|
181
|
+
},
|
|
182
|
+
Object {},
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
testID="not-supported-upload-progress-indicator"
|
|
186
|
+
/>
|
|
187
|
+
</View>
|
|
188
|
+
`;
|
|
189
|
+
|
|
190
|
+
exports[`UploadProgressIndicator should render an active UploadProgressIndicator and retry indicator 1`] = `
|
|
191
|
+
<View
|
|
192
|
+
style={
|
|
193
|
+
Array [
|
|
194
|
+
Object {
|
|
195
|
+
"overflow": "hidden",
|
|
196
|
+
},
|
|
197
|
+
undefined,
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
testID="active-upload-progress-indicator"
|
|
201
|
+
>
|
|
202
|
+
<View
|
|
203
|
+
style={
|
|
204
|
+
Array [
|
|
205
|
+
Object {
|
|
206
|
+
"alignItems": "center",
|
|
207
|
+
"height": "100%",
|
|
208
|
+
"justifyContent": "center",
|
|
209
|
+
"opacity": 0,
|
|
210
|
+
"position": "absolute",
|
|
211
|
+
"width": "100%",
|
|
212
|
+
},
|
|
213
|
+
Object {
|
|
214
|
+
"backgroundColor": "#000000CC",
|
|
215
|
+
},
|
|
216
|
+
Object {},
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
/>
|
|
220
|
+
<View
|
|
221
|
+
style={
|
|
222
|
+
Array [
|
|
223
|
+
Object {
|
|
224
|
+
"alignItems": "center",
|
|
225
|
+
"height": "100%",
|
|
226
|
+
"justifyContent": "center",
|
|
227
|
+
"position": "absolute",
|
|
228
|
+
"width": "100%",
|
|
229
|
+
},
|
|
230
|
+
Object {
|
|
231
|
+
"backgroundColor": "#000000CC",
|
|
232
|
+
},
|
|
233
|
+
Object {},
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
testID="not-supported-upload-progress-indicator"
|
|
118
237
|
>
|
|
119
238
|
<View
|
|
120
239
|
accessible={true}
|
|
@@ -188,21 +307,7 @@ exports[`UploadProgressIndicator should render an active RETRY UploadProgressInd
|
|
|
188
307
|
</View>
|
|
189
308
|
`;
|
|
190
309
|
|
|
191
|
-
exports[`UploadProgressIndicator should render an inactive
|
|
192
|
-
<View
|
|
193
|
-
style={
|
|
194
|
-
Array [
|
|
195
|
-
Object {
|
|
196
|
-
"overflow": "hidden",
|
|
197
|
-
},
|
|
198
|
-
undefined,
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
testID="inactive-upload-progress-indicator"
|
|
202
|
-
/>
|
|
203
|
-
`;
|
|
204
|
-
|
|
205
|
-
exports[`UploadProgressIndicator should render an inactive RETRY UploadProgressIndicator 1`] = `
|
|
310
|
+
exports[`UploadProgressIndicator should render an inactive UploadProgressIndicator 1`] = `
|
|
206
311
|
<View
|
|
207
312
|
style={
|
|
208
313
|
Array [
|
|
@@ -63,6 +63,7 @@ export const ScrollToBottomButton: React.FC<ScrollToBottomButtonProps> = (props)
|
|
|
63
63
|
colors: { accent_blue, black, white },
|
|
64
64
|
messageList: {
|
|
65
65
|
scrollToBottomButton: {
|
|
66
|
+
chevronColor,
|
|
66
67
|
container,
|
|
67
68
|
touchable,
|
|
68
69
|
unreadCountNotificationContainer,
|
|
@@ -83,7 +84,7 @@ export const ScrollToBottomButton: React.FC<ScrollToBottomButtonProps> = (props)
|
|
|
83
84
|
>
|
|
84
85
|
<View style={[styles.wrapper, wrapper]}>
|
|
85
86
|
<View style={[styles.container, { backgroundColor: white, shadowColor: black }, container]}>
|
|
86
|
-
<Down />
|
|
87
|
+
<Down pathFill={chevronColor ? chevronColor : black} />
|
|
87
88
|
</View>
|
|
88
89
|
{!!unreadCount && (
|
|
89
90
|
<View
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import type { Channel, Mute, StreamChat } from 'stream-chat';
|
|
3
|
+
import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
|
|
4
4
|
|
|
5
5
|
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
6
6
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
@@ -8,6 +8,10 @@ import { getDisplayName } from '../utils/getDisplayName';
|
|
|
8
8
|
export type ChatContextValue<
|
|
9
9
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
10
10
|
> = {
|
|
11
|
+
/**
|
|
12
|
+
* Object of application settings returned from Stream.
|
|
13
|
+
* */
|
|
14
|
+
appSettings: AppSettingsAPIResponse<StreamChatGenerics> | null;
|
|
11
15
|
/**
|
|
12
16
|
* The StreamChat client object
|
|
13
17
|
*
|
|
@@ -3,7 +3,10 @@ import React, { PropsWithChildren, useContext } from 'react';
|
|
|
3
3
|
import type { Attachment } from 'stream-chat';
|
|
4
4
|
|
|
5
5
|
import type { ActionHandler } from '../../components/Attachment/Attachment';
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
MessageTouchableHandlerPayload,
|
|
8
|
+
TouchableHandlerPayload,
|
|
9
|
+
} from '../../components/Message/Message';
|
|
7
10
|
import type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
8
11
|
import type { ChannelContextValue } from '../../contexts/channelContext/ChannelContext';
|
|
9
12
|
import type { MessageContentType } from '../../contexts/messagesContext/MessagesContext';
|
|
@@ -62,7 +65,7 @@ export type MessageContextValue<
|
|
|
62
65
|
*
|
|
63
66
|
* By default, we show the overlay with all the message actions on long press.
|
|
64
67
|
*
|
|
65
|
-
* @param
|
|
68
|
+
* @param payload Payload object for onLongPress event
|
|
66
69
|
*/
|
|
67
70
|
onLongPress: (payload: TouchableHandlerPayload) => void;
|
|
68
71
|
/** Whether the message is only text and the text is only emojis */
|
|
@@ -77,9 +80,9 @@ export type MessageContextValue<
|
|
|
77
80
|
*
|
|
78
81
|
* By default, we will dismiss the keyboard on press.
|
|
79
82
|
*
|
|
80
|
-
* @param
|
|
83
|
+
* @param payload Payload object for onPress event
|
|
81
84
|
*/
|
|
82
|
-
onPress: (payload:
|
|
85
|
+
onPress: (payload: MessageTouchableHandlerPayload) => void;
|
|
83
86
|
onPressIn: ((payload: TouchableHandlerPayload) => void) | null;
|
|
84
87
|
/** The images attached to a message */
|
|
85
88
|
otherAttachments: Attachment<StreamChatGenerics>[];
|