stream-chat-react-native-core 5.13.0-beta.2 → 5.13.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/lib/commonjs/components/MessageInput/AttachButton.js +4 -10
  2. package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
  3. package/lib/commonjs/components/MessageInput/CommandsButton.js +4 -10
  4. package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
  5. package/lib/commonjs/components/MessageInput/SendButton.js +7 -7
  6. package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
  7. package/lib/commonjs/mock-builders/api/sendReaction.js.map +1 -1
  8. package/lib/commonjs/version.json +1 -1
  9. package/lib/module/components/MessageInput/AttachButton.js +4 -10
  10. package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
  11. package/lib/module/components/MessageInput/CommandsButton.js +4 -10
  12. package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
  13. package/lib/module/components/MessageInput/SendButton.js +7 -7
  14. package/lib/module/components/MessageInput/SendButton.js.map +1 -1
  15. package/lib/module/mock-builders/api/sendReaction.js.map +1 -1
  16. package/lib/module/version.json +1 -1
  17. package/package.json +1 -1
  18. package/src/__tests__/offline-support/index.test.ts +13 -0
  19. package/src/__tests__/offline-support/offline-feature.js +686 -0
  20. package/src/__tests__/offline-support/optimistic-update.js +374 -0
  21. package/src/components/MessageInput/AttachButton.tsx +3 -4
  22. package/src/components/MessageInput/CommandsButton.tsx +3 -4
  23. package/src/components/MessageInput/SendButton.tsx +4 -3
  24. package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +120 -152
  25. package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +248 -248
  26. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +182 -214
  27. package/src/version.json +1 -1
  28. package/lib/typescript/components/Attachment/__tests__/openUrlSafely.test.d.ts +0 -1
  29. package/lib/typescript/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.d.ts +0 -1
  30. package/lib/typescript/components/ChannelPreview/__tests__/ChannelPreview.test.d.ts +0 -1
  31. package/lib/typescript/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.d.ts +0 -1
  32. package/lib/typescript/components/ChannelPreview/hooks/__tests__/useLatestMessagePreview.test.d.ts +0 -1
  33. package/lib/typescript/components/Chat/hooks/__tests__/useAppSettings.test.d.ts +0 -1
  34. package/lib/typescript/components/ImageGallery/__tests__/AnimatedVideoGallery.test.d.ts +0 -1
  35. package/lib/typescript/components/ImageGallery/__tests__/ImageGallery.test.d.ts +0 -1
  36. package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryFooter.test.d.ts +0 -1
  37. package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryGrid.test.d.ts +0 -1
  38. package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryGridHandle.test.d.ts +0 -1
  39. package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryHeader.test.d.ts +0 -1
  40. package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryOverlay.test.d.ts +0 -1
  41. package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryVideoControl.test.d.ts +0 -1
  42. package/lib/typescript/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +0 -1
  43. package/lib/typescript/components/Message/MessageSimple/__tests__/MessageTextContainer.test.d.ts +0 -1
  44. package/lib/typescript/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.d.ts +0 -1
  45. package/lib/typescript/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.d.ts +0 -1
  46. package/lib/typescript/components/MessageList/__tests__/useMessageList.test.d.ts +0 -1
  47. package/lib/typescript/components/MessageList/utils/__tests__/getDateSeparators.test.d.ts +0 -1
  48. package/lib/typescript/components/Reply/__tests__/Reply.test.d.ts +0 -1
  49. package/lib/typescript/contexts/__tests__/index.test.d.ts +0 -1
  50. package/lib/typescript/contexts/messageInputContext/__tests__/MessageInputContext.test.d.ts +0 -1
  51. package/lib/typescript/contexts/messageInputContext/__tests__/isValidMessage.test.d.ts +0 -1
  52. package/lib/typescript/contexts/messageInputContext/__tests__/pickFile.test.d.ts +0 -1
  53. package/lib/typescript/contexts/messageInputContext/__tests__/removeFile.test.d.ts +0 -1
  54. package/lib/typescript/contexts/messageInputContext/__tests__/removeImage.test.d.ts +0 -1
  55. package/lib/typescript/contexts/messageInputContext/__tests__/sendMessage.test.d.ts +0 -1
  56. package/lib/typescript/contexts/messageInputContext/__tests__/sendMessageAsync.test.d.ts +0 -1
  57. package/lib/typescript/contexts/messageInputContext/__tests__/updateMessage.test.d.ts +0 -1
  58. package/lib/typescript/contexts/messageInputContext/__tests__/uploadFile.test.d.ts +0 -1
  59. package/lib/typescript/contexts/messageInputContext/__tests__/uploadImage.test.d.ts +0 -1
  60. package/lib/typescript/contexts/messageInputContext/__tests__/useMessageDetailsForState.test.d.ts +0 -1
  61. package/lib/typescript/hooks/__tests__/useAppStateListener.test.d.ts +0 -1
  62. package/lib/typescript/hooks/__tests__/useTranslatedMessage.test.d.ts +0 -1
  63. package/lib/typescript/mock-builders/api/channelMocks.d.ts +0 -14
  64. package/lib/typescript/mock-builders/api/getOrCreateChannel.d.ts +0 -19
  65. package/lib/typescript/mock-builders/api/queryMembers.d.ts +0 -161
  66. package/lib/typescript/mock-builders/api/useMockedApis.d.ts +0 -1
  67. package/lib/typescript/mock-builders/api/utils.d.ts +0 -7
  68. package/lib/typescript/mock-builders/event/messageNew.d.ts +0 -2
  69. package/lib/typescript/mock-builders/event/messageRead.d.ts +0 -8
  70. package/lib/typescript/mock-builders/generator/attachment.d.ts +0 -10
  71. package/lib/typescript/mock-builders/generator/channel.d.ts +0 -120
  72. package/lib/typescript/mock-builders/generator/message.d.ts +0 -38
  73. package/lib/typescript/mock-builders/generator/user.d.ts +0 -30
  74. package/lib/typescript/mock-builders/mock.d.ts +0 -3
  75. package/lib/typescript/store/sqlite-utils/__tests__/createSelectQuery.test.d.ts +0 -1
  76. package/lib/typescript/utils/__tests__/patchMessageTextCommand.test.d.ts +0 -1
  77. package/src/__tests__/offline-feature.test.js +0 -675
  78. package/src/__tests__/optimistic-update.test.js +0 -369
  79. /package/src/mock-builders/api/{sendReaction.tsx → sendReaction.ts} +0 -0
@@ -1,285 +1,285 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`SendButton should render a non-editing disabled SendButton 1`] = `
4
- <RNGestureHandlerButton
4
+ <View
5
+ accessibilityState={
6
+ Object {
7
+ "disabled": true,
8
+ }
9
+ }
10
+ accessible={true}
5
11
  collapsable={false}
6
- delayLongPress={600}
7
- enabled={false}
8
- exclusive={true}
9
- handlerTag={2}
10
- handlerType="NativeViewGestureHandler"
11
- onGestureEvent={[Function]}
12
- onGestureHandlerEvent={[Function]}
13
- onGestureHandlerStateChange={[Function]}
14
- onHandlerStateChange={[Function]}
15
- rippleColor={0}
12
+ focusable={true}
13
+ onBlur={[Function]}
14
+ onClick={[Function]}
15
+ onFocus={[Function]}
16
+ onResponderGrant={[Function]}
17
+ onResponderMove={[Function]}
18
+ onResponderRelease={[Function]}
19
+ onResponderTerminate={[Function]}
20
+ onResponderTerminationRequest={[Function]}
21
+ onStartShouldSetResponder={[Function]}
22
+ style={
23
+ Array [
24
+ Object {},
25
+ ]
26
+ }
16
27
  testID="send-button"
17
- touchSoundDisabled={false}
18
28
  >
19
- <View
20
- accessible={true}
21
- collapsable={false}
29
+ <RNSVGSvgView
30
+ align="xMidYMid"
31
+ bbHeight={24}
32
+ bbWidth={24}
33
+ focusable={false}
34
+ height={24}
35
+ meetOrSlice={0}
36
+ minX={0}
37
+ minY={0}
38
+ pathFill="#DBDBDB"
22
39
  style={
23
- Object {
24
- "opacity": 1,
25
- }
40
+ Array [
41
+ Object {
42
+ "backgroundColor": "transparent",
43
+ "borderWidth": 0,
44
+ },
45
+ Object {
46
+ "flex": 0,
47
+ "height": 24,
48
+ "width": 24,
49
+ },
50
+ ]
26
51
  }
52
+ vbHeight={24}
53
+ vbWidth={24}
54
+ width={24}
27
55
  >
28
- <RNSVGSvgView
29
- align="xMidYMid"
30
- bbHeight={24}
31
- bbWidth={24}
32
- focusable={false}
33
- height={24}
34
- meetOrSlice={0}
35
- minX={0}
36
- minY={0}
37
- pathFill="#DBDBDB"
38
- style={
39
- Array [
40
- Object {
41
- "backgroundColor": "transparent",
42
- "borderWidth": 0,
43
- },
44
- Object {
45
- "flex": 0,
46
- "height": 24,
47
- "width": 24,
48
- },
49
- ]
50
- }
51
- vbHeight={24}
52
- vbWidth={24}
53
- width={24}
54
- >
55
- <RNSVGGroup>
56
- <RNSVGPath
57
- clipRule={0}
58
- d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10zM8 11h4V8l4 4-4 4v-3H8v-2z"
59
- fill={4292598747}
60
- fillRule={0}
61
- propList={
62
- Array [
63
- "fill",
64
- "fillRule",
65
- ]
66
- }
67
- />
68
- </RNSVGGroup>
69
- </RNSVGSvgView>
70
- </View>
71
- </RNGestureHandlerButton>
56
+ <RNSVGGroup>
57
+ <RNSVGPath
58
+ clipRule={0}
59
+ d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10zM8 11h4V8l4 4-4 4v-3H8v-2z"
60
+ fill={4292598747}
61
+ fillRule={0}
62
+ propList={
63
+ Array [
64
+ "fill",
65
+ "fillRule",
66
+ ]
67
+ }
68
+ />
69
+ </RNSVGGroup>
70
+ </RNSVGSvgView>
71
+ </View>
72
72
  `;
73
73
 
74
74
  exports[`SendButton should render a non-editing enabled SendButton 1`] = `
75
- <RNGestureHandlerButton
75
+ <View
76
+ accessibilityState={
77
+ Object {
78
+ "disabled": false,
79
+ }
80
+ }
81
+ accessible={true}
76
82
  collapsable={false}
77
- delayLongPress={600}
78
- enabled={true}
79
- exclusive={true}
80
- handlerTag={1}
81
- handlerType="NativeViewGestureHandler"
82
- onGestureEvent={[Function]}
83
- onGestureHandlerEvent={[Function]}
84
- onGestureHandlerStateChange={[Function]}
85
- onHandlerStateChange={[Function]}
86
- rippleColor={0}
83
+ focusable={true}
84
+ onBlur={[Function]}
85
+ onClick={[Function]}
86
+ onFocus={[Function]}
87
+ onResponderGrant={[Function]}
88
+ onResponderMove={[Function]}
89
+ onResponderRelease={[Function]}
90
+ onResponderTerminate={[Function]}
91
+ onResponderTerminationRequest={[Function]}
92
+ onStartShouldSetResponder={[Function]}
93
+ style={
94
+ Array [
95
+ Object {},
96
+ ]
97
+ }
87
98
  testID="send-button"
88
- touchSoundDisabled={false}
89
99
  >
90
- <View
91
- accessible={true}
92
- collapsable={false}
100
+ <RNSVGSvgView
101
+ align="xMidYMid"
102
+ bbHeight={24}
103
+ bbWidth={24}
104
+ focusable={false}
105
+ height={24}
106
+ meetOrSlice={0}
107
+ minX={0}
108
+ minY={0}
109
+ pathFill="#005FFF"
93
110
  style={
94
- Object {
95
- "opacity": 1,
96
- }
111
+ Array [
112
+ Object {
113
+ "backgroundColor": "transparent",
114
+ "borderWidth": 0,
115
+ },
116
+ Object {
117
+ "flex": 0,
118
+ "height": 24,
119
+ "width": 24,
120
+ },
121
+ ]
97
122
  }
123
+ vbHeight={24}
124
+ vbWidth={24}
125
+ width={24}
98
126
  >
99
- <RNSVGSvgView
100
- align="xMidYMid"
101
- bbHeight={24}
102
- bbWidth={24}
103
- focusable={false}
104
- height={24}
105
- meetOrSlice={0}
106
- minX={0}
107
- minY={0}
108
- pathFill="#005FFF"
109
- style={
110
- Array [
111
- Object {
112
- "backgroundColor": "transparent",
113
- "borderWidth": 0,
114
- },
115
- Object {
116
- "flex": 0,
117
- "height": 24,
118
- "width": 24,
119
- },
120
- ]
121
- }
122
- vbHeight={24}
123
- vbWidth={24}
124
- width={24}
125
- >
126
- <RNSVGGroup>
127
- <RNSVGPath
128
- clipRule={0}
129
- d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14v-4H8l4-4 4 4h-3v4h-2z"
130
- fill={4278214655}
131
- fillRule={0}
132
- propList={
133
- Array [
134
- "fill",
135
- "fillRule",
136
- ]
137
- }
138
- />
139
- </RNSVGGroup>
140
- </RNSVGSvgView>
141
- </View>
142
- </RNGestureHandlerButton>
127
+ <RNSVGGroup>
128
+ <RNSVGPath
129
+ clipRule={0}
130
+ d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14v-4H8l4-4 4 4h-3v4h-2z"
131
+ fill={4278214655}
132
+ fillRule={0}
133
+ propList={
134
+ Array [
135
+ "fill",
136
+ "fillRule",
137
+ ]
138
+ }
139
+ />
140
+ </RNSVGGroup>
141
+ </RNSVGSvgView>
142
+ </View>
143
143
  `;
144
144
 
145
145
  exports[`SendButton should render an editing disabled SendButton 1`] = `
146
- <RNGestureHandlerButton
146
+ <View
147
+ accessibilityState={
148
+ Object {
149
+ "disabled": true,
150
+ }
151
+ }
152
+ accessible={true}
147
153
  collapsable={false}
148
- delayLongPress={600}
149
- enabled={false}
150
- exclusive={true}
151
- handlerTag={4}
152
- handlerType="NativeViewGestureHandler"
153
- onGestureEvent={[Function]}
154
- onGestureHandlerEvent={[Function]}
155
- onGestureHandlerStateChange={[Function]}
156
- onHandlerStateChange={[Function]}
157
- rippleColor={0}
154
+ focusable={true}
155
+ onBlur={[Function]}
156
+ onClick={[Function]}
157
+ onFocus={[Function]}
158
+ onResponderGrant={[Function]}
159
+ onResponderMove={[Function]}
160
+ onResponderRelease={[Function]}
161
+ onResponderTerminate={[Function]}
162
+ onResponderTerminationRequest={[Function]}
163
+ onStartShouldSetResponder={[Function]}
164
+ style={
165
+ Array [
166
+ Object {},
167
+ ]
168
+ }
158
169
  testID="send-button"
159
- touchSoundDisabled={false}
160
170
  >
161
- <View
162
- accessible={true}
163
- collapsable={false}
171
+ <RNSVGSvgView
172
+ align="xMidYMid"
173
+ bbHeight={24}
174
+ bbWidth={24}
175
+ focusable={false}
176
+ height={24}
177
+ meetOrSlice={0}
178
+ minX={0}
179
+ minY={0}
180
+ pathFill="#DBDBDB"
164
181
  style={
165
- Object {
166
- "opacity": 1,
167
- }
182
+ Array [
183
+ Object {
184
+ "backgroundColor": "transparent",
185
+ "borderWidth": 0,
186
+ },
187
+ Object {
188
+ "flex": 0,
189
+ "height": 24,
190
+ "width": 24,
191
+ },
192
+ ]
168
193
  }
194
+ vbHeight={24}
195
+ vbWidth={24}
196
+ width={24}
169
197
  >
170
- <RNSVGSvgView
171
- align="xMidYMid"
172
- bbHeight={24}
173
- bbWidth={24}
174
- focusable={false}
175
- height={24}
176
- meetOrSlice={0}
177
- minX={0}
178
- minY={0}
179
- pathFill="#DBDBDB"
180
- style={
181
- Array [
182
- Object {
183
- "backgroundColor": "transparent",
184
- "borderWidth": 0,
185
- },
186
- Object {
187
- "flex": 0,
188
- "height": 24,
189
- "width": 24,
190
- },
191
- ]
192
- }
193
- vbHeight={24}
194
- vbWidth={24}
195
- width={24}
196
- >
197
- <RNSVGGroup>
198
- <RNSVGPath
199
- clipRule={0}
200
- d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10zM8 11h4V8l4 4-4 4v-3H8v-2z"
201
- fill={4292598747}
202
- fillRule={0}
203
- propList={
204
- Array [
205
- "fill",
206
- "fillRule",
207
- ]
208
- }
209
- />
210
- </RNSVGGroup>
211
- </RNSVGSvgView>
212
- </View>
213
- </RNGestureHandlerButton>
198
+ <RNSVGGroup>
199
+ <RNSVGPath
200
+ clipRule={0}
201
+ d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10zM8 11h4V8l4 4-4 4v-3H8v-2z"
202
+ fill={4292598747}
203
+ fillRule={0}
204
+ propList={
205
+ Array [
206
+ "fill",
207
+ "fillRule",
208
+ ]
209
+ }
210
+ />
211
+ </RNSVGGroup>
212
+ </RNSVGSvgView>
213
+ </View>
214
214
  `;
215
215
 
216
216
  exports[`SendButton should render an editing enabled SendButton 1`] = `
217
- <RNGestureHandlerButton
217
+ <View
218
+ accessibilityState={
219
+ Object {
220
+ "disabled": false,
221
+ }
222
+ }
223
+ accessible={true}
218
224
  collapsable={false}
219
- delayLongPress={600}
220
- enabled={true}
221
- exclusive={true}
222
- handlerTag={3}
223
- handlerType="NativeViewGestureHandler"
224
- onGestureEvent={[Function]}
225
- onGestureHandlerEvent={[Function]}
226
- onGestureHandlerStateChange={[Function]}
227
- onHandlerStateChange={[Function]}
228
- rippleColor={0}
225
+ focusable={true}
226
+ onBlur={[Function]}
227
+ onClick={[Function]}
228
+ onFocus={[Function]}
229
+ onResponderGrant={[Function]}
230
+ onResponderMove={[Function]}
231
+ onResponderRelease={[Function]}
232
+ onResponderTerminate={[Function]}
233
+ onResponderTerminationRequest={[Function]}
234
+ onStartShouldSetResponder={[Function]}
235
+ style={
236
+ Array [
237
+ Object {},
238
+ ]
239
+ }
229
240
  testID="send-button"
230
- touchSoundDisabled={false}
231
241
  >
232
- <View
233
- accessible={true}
234
- collapsable={false}
242
+ <RNSVGSvgView
243
+ align="xMidYMid"
244
+ bbHeight={24}
245
+ bbWidth={24}
246
+ focusable={false}
247
+ height={24}
248
+ meetOrSlice={0}
249
+ minX={0}
250
+ minY={0}
251
+ pathFill="#005FFF"
235
252
  style={
236
- Object {
237
- "opacity": 1,
238
- }
253
+ Array [
254
+ Object {
255
+ "backgroundColor": "transparent",
256
+ "borderWidth": 0,
257
+ },
258
+ Object {
259
+ "flex": 0,
260
+ "height": 24,
261
+ "width": 24,
262
+ },
263
+ ]
239
264
  }
265
+ vbHeight={24}
266
+ vbWidth={24}
267
+ width={24}
240
268
  >
241
- <RNSVGSvgView
242
- align="xMidYMid"
243
- bbHeight={24}
244
- bbWidth={24}
245
- focusable={false}
246
- height={24}
247
- meetOrSlice={0}
248
- minX={0}
249
- minY={0}
250
- pathFill="#005FFF"
251
- style={
252
- Array [
253
- Object {
254
- "backgroundColor": "transparent",
255
- "borderWidth": 0,
256
- },
257
- Object {
258
- "flex": 0,
259
- "height": 24,
260
- "width": 24,
261
- },
262
- ]
263
- }
264
- vbHeight={24}
265
- vbWidth={24}
266
- width={24}
267
- >
268
- <RNSVGGroup>
269
- <RNSVGPath
270
- clipRule={0}
271
- d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14v-4H8l4-4 4 4h-3v4h-2z"
272
- fill={4278214655}
273
- fillRule={0}
274
- propList={
275
- Array [
276
- "fill",
277
- "fillRule",
278
- ]
279
- }
280
- />
281
- </RNSVGGroup>
282
- </RNSVGSvgView>
283
- </View>
284
- </RNGestureHandlerButton>
269
+ <RNSVGGroup>
270
+ <RNSVGPath
271
+ clipRule={0}
272
+ d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14v-4H8l4-4 4 4h-3v4h-2z"
273
+ fill={4278214655}
274
+ fillRule={0}
275
+ propList={
276
+ Array [
277
+ "fill",
278
+ "fillRule",
279
+ ]
280
+ }
281
+ />
282
+ </RNSVGGroup>
283
+ </RNSVGSvgView>
284
+ </View>
285
285
  `;