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,175 +1,143 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`AttachButton should render a disabled AttachButton 1`] = `
4
- <RNGestureHandlerButton
5
- collapsable={false}
6
- delayLongPress={600}
7
- enabled={false}
8
- exclusive={true}
9
- handlerTag={2}
10
- handlerType="NativeViewGestureHandler"
11
- hitSlop={
4
+ <View
5
+ accessibilityState={
12
6
  Object {
13
- "bottom": 15,
14
- "left": 15,
15
- "right": 5,
16
- "top": 15,
7
+ "disabled": true,
17
8
  }
18
9
  }
19
- onGestureEvent={[Function]}
20
- onGestureHandlerEvent={[Function]}
21
- onGestureHandlerStateChange={[Function]}
22
- onHandlerStateChange={[Function]}
23
- rippleColor={0}
10
+ accessible={true}
11
+ collapsable={false}
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
+ }
24
27
  testID="attach-button"
25
- touchSoundDisabled={false}
26
28
  >
27
- <View
28
- accessible={true}
29
- collapsable={false}
30
- hitSlop={
31
- Object {
32
- "bottom": 15,
33
- "left": 15,
34
- "right": 5,
35
- "top": 15,
36
- }
37
- }
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="#7A7A7A"
38
39
  style={
39
- Object {
40
- "opacity": 1,
41
- }
40
+ Array [
41
+ Object {
42
+ "backgroundColor": "transparent",
43
+ "borderWidth": 0,
44
+ },
45
+ Object {
46
+ "flex": 0,
47
+ "height": 24,
48
+ "width": 24,
49
+ },
50
+ ]
42
51
  }
52
+ vbHeight={24}
53
+ vbWidth={24}
54
+ width={24}
43
55
  >
44
- <RNSVGSvgView
45
- align="xMidYMid"
46
- bbHeight={24}
47
- bbWidth={24}
48
- focusable={false}
49
- height={24}
50
- meetOrSlice={0}
51
- minX={0}
52
- minY={0}
53
- pathFill="#7A7A7A"
54
- style={
55
- Array [
56
- Object {
57
- "backgroundColor": "transparent",
58
- "borderWidth": 0,
59
- },
60
- Object {
61
- "flex": 0,
62
- "height": 24,
63
- "width": 24,
64
- },
65
- ]
66
- }
67
- vbHeight={24}
68
- vbWidth={24}
69
- width={24}
70
- >
71
- <RNSVGGroup>
72
- <RNSVGPath
73
- clipRule={0}
74
- d="M13.468 2.888a5.07 5.07 0 012.983.635 5.07 5.07 0 012.041 2.265c.45 1.01.546 2.254-.144 3.449l-4.5 7.794a3.232 3.232 0 01-1.427 1.294c-.757.342-1.696.367-2.671-.196-.975-.563-1.422-1.389-1.506-2.215a3.233 3.233 0 01.408-1.883l4-6.928a1 1 0 011.732 1l-4 6.928c-.087.15-.176.425-.15.682.02.196.105.447.516.684.41.237.671.185.85.105.236-.107.43-.32.516-.47l4.5-7.795c.31-.538.29-1.093.049-1.636a3.072 3.072 0 00-1.214-1.346 3.072 3.072 0 00-1.773-.378c-.591.062-1.082.322-1.392.86l-5 8.66c-.654 1.133-.286 3.3 1.964 4.598 2.25 1.3 4.31.535 4.964-.598l3.5-6.062a1 1 0 111.732 1l-3.5 6.062c-1.345 2.33-4.75 3.031-7.696 1.33-2.946-1.7-4.042-5-2.696-7.33l5-8.66c.69-1.195 1.815-1.733 2.914-1.85z"
75
- fill={4286216826}
76
- fillRule={0}
77
- propList={
78
- Array [
79
- "fill",
80
- "fillRule",
81
- ]
82
- }
83
- />
84
- </RNSVGGroup>
85
- </RNSVGSvgView>
86
- </View>
87
- </RNGestureHandlerButton>
56
+ <RNSVGGroup>
57
+ <RNSVGPath
58
+ clipRule={0}
59
+ d="M13.468 2.888a5.07 5.07 0 012.983.635 5.07 5.07 0 012.041 2.265c.45 1.01.546 2.254-.144 3.449l-4.5 7.794a3.232 3.232 0 01-1.427 1.294c-.757.342-1.696.367-2.671-.196-.975-.563-1.422-1.389-1.506-2.215a3.233 3.233 0 01.408-1.883l4-6.928a1 1 0 011.732 1l-4 6.928c-.087.15-.176.425-.15.682.02.196.105.447.516.684.41.237.671.185.85.105.236-.107.43-.32.516-.47l4.5-7.795c.31-.538.29-1.093.049-1.636a3.072 3.072 0 00-1.214-1.346 3.072 3.072 0 00-1.773-.378c-.591.062-1.082.322-1.392.86l-5 8.66c-.654 1.133-.286 3.3 1.964 4.598 2.25 1.3 4.31.535 4.964-.598l3.5-6.062a1 1 0 111.732 1l-3.5 6.062c-1.345 2.33-4.75 3.031-7.696 1.33-2.946-1.7-4.042-5-2.696-7.33l5-8.66c.69-1.195 1.815-1.733 2.914-1.85z"
60
+ fill={4286216826}
61
+ fillRule={0}
62
+ propList={
63
+ Array [
64
+ "fill",
65
+ "fillRule",
66
+ ]
67
+ }
68
+ />
69
+ </RNSVGGroup>
70
+ </RNSVGSvgView>
71
+ </View>
88
72
  `;
89
73
 
90
74
  exports[`AttachButton should render an enabled AttachButton 1`] = `
91
- <RNGestureHandlerButton
92
- collapsable={false}
93
- delayLongPress={600}
94
- enabled={true}
95
- exclusive={true}
96
- handlerTag={1}
97
- handlerType="NativeViewGestureHandler"
98
- hitSlop={
75
+ <View
76
+ accessibilityState={
99
77
  Object {
100
- "bottom": 15,
101
- "left": 15,
102
- "right": 5,
103
- "top": 15,
78
+ "disabled": false,
104
79
  }
105
80
  }
106
- onGestureEvent={[Function]}
107
- onGestureHandlerEvent={[Function]}
108
- onGestureHandlerStateChange={[Function]}
109
- onHandlerStateChange={[Function]}
110
- rippleColor={0}
81
+ accessible={true}
82
+ collapsable={false}
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
+ }
111
98
  testID="attach-button"
112
- touchSoundDisabled={false}
113
99
  >
114
- <View
115
- accessible={true}
116
- collapsable={false}
117
- hitSlop={
118
- Object {
119
- "bottom": 15,
120
- "left": 15,
121
- "right": 5,
122
- "top": 15,
123
- }
124
- }
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="#7A7A7A"
125
110
  style={
126
- Object {
127
- "opacity": 1,
128
- }
111
+ Array [
112
+ Object {
113
+ "backgroundColor": "transparent",
114
+ "borderWidth": 0,
115
+ },
116
+ Object {
117
+ "flex": 0,
118
+ "height": 24,
119
+ "width": 24,
120
+ },
121
+ ]
129
122
  }
123
+ vbHeight={24}
124
+ vbWidth={24}
125
+ width={24}
130
126
  >
131
- <RNSVGSvgView
132
- align="xMidYMid"
133
- bbHeight={24}
134
- bbWidth={24}
135
- focusable={false}
136
- height={24}
137
- meetOrSlice={0}
138
- minX={0}
139
- minY={0}
140
- pathFill="#7A7A7A"
141
- style={
142
- Array [
143
- Object {
144
- "backgroundColor": "transparent",
145
- "borderWidth": 0,
146
- },
147
- Object {
148
- "flex": 0,
149
- "height": 24,
150
- "width": 24,
151
- },
152
- ]
153
- }
154
- vbHeight={24}
155
- vbWidth={24}
156
- width={24}
157
- >
158
- <RNSVGGroup>
159
- <RNSVGPath
160
- clipRule={0}
161
- d="M13.468 2.888a5.07 5.07 0 012.983.635 5.07 5.07 0 012.041 2.265c.45 1.01.546 2.254-.144 3.449l-4.5 7.794a3.232 3.232 0 01-1.427 1.294c-.757.342-1.696.367-2.671-.196-.975-.563-1.422-1.389-1.506-2.215a3.233 3.233 0 01.408-1.883l4-6.928a1 1 0 011.732 1l-4 6.928c-.087.15-.176.425-.15.682.02.196.105.447.516.684.41.237.671.185.85.105.236-.107.43-.32.516-.47l4.5-7.795c.31-.538.29-1.093.049-1.636a3.072 3.072 0 00-1.214-1.346 3.072 3.072 0 00-1.773-.378c-.591.062-1.082.322-1.392.86l-5 8.66c-.654 1.133-.286 3.3 1.964 4.598 2.25 1.3 4.31.535 4.964-.598l3.5-6.062a1 1 0 111.732 1l-3.5 6.062c-1.345 2.33-4.75 3.031-7.696 1.33-2.946-1.7-4.042-5-2.696-7.33l5-8.66c.69-1.195 1.815-1.733 2.914-1.85z"
162
- fill={4286216826}
163
- fillRule={0}
164
- propList={
165
- Array [
166
- "fill",
167
- "fillRule",
168
- ]
169
- }
170
- />
171
- </RNSVGGroup>
172
- </RNSVGSvgView>
173
- </View>
174
- </RNGestureHandlerButton>
127
+ <RNSVGGroup>
128
+ <RNSVGPath
129
+ clipRule={0}
130
+ d="M13.468 2.888a5.07 5.07 0 012.983.635 5.07 5.07 0 012.041 2.265c.45 1.01.546 2.254-.144 3.449l-4.5 7.794a3.232 3.232 0 01-1.427 1.294c-.757.342-1.696.367-2.671-.196-.975-.563-1.422-1.389-1.506-2.215a3.233 3.233 0 01.408-1.883l4-6.928a1 1 0 011.732 1l-4 6.928c-.087.15-.176.425-.15.682.02.196.105.447.516.684.41.237.671.185.85.105.236-.107.43-.32.516-.47l4.5-7.795c.31-.538.29-1.093.049-1.636a3.072 3.072 0 00-1.214-1.346 3.072 3.072 0 00-1.773-.378c-.591.062-1.082.322-1.392.86l-5 8.66c-.654 1.133-.286 3.3 1.964 4.598 2.25 1.3 4.31.535 4.964-.598l3.5-6.062a1 1 0 111.732 1l-3.5 6.062c-1.345 2.33-4.75 3.031-7.696 1.33-2.946-1.7-4.042-5-2.696-7.33l5-8.66c.69-1.195 1.815-1.733 2.914-1.85z"
131
+ fill={4286216826}
132
+ fillRule={0}
133
+ propList={
134
+ Array [
135
+ "fill",
136
+ "fillRule",
137
+ ]
138
+ }
139
+ />
140
+ </RNSVGGroup>
141
+ </RNSVGSvgView>
142
+ </View>
175
143
  `;