react-native-gifted-chat 2.7.3 → 2.8.1

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 (47) hide show
  1. package/README.md +14 -6
  2. package/lib/Bubble/index.d.ts +2 -26
  3. package/lib/Bubble/index.js +151 -123
  4. package/lib/Bubble/index.js.map +1 -1
  5. package/lib/Day/index.d.ts +1 -1
  6. package/lib/Day/index.js +2 -2
  7. package/lib/Day/index.js.map +1 -1
  8. package/lib/GiftedChat/index.d.ts +1 -1
  9. package/lib/GiftedChat/index.js +1 -2
  10. package/lib/GiftedChat/index.js.map +1 -1
  11. package/lib/GiftedChat/types.d.ts +7 -7
  12. package/lib/GiftedChatContext.d.ts +1 -2
  13. package/lib/GiftedChatContext.js +3 -3
  14. package/lib/GiftedChatContext.js.map +1 -1
  15. package/lib/InputToolbar.js +1 -0
  16. package/lib/InputToolbar.js.map +1 -1
  17. package/lib/Message/index.js +7 -12
  18. package/lib/Message/index.js.map +1 -1
  19. package/lib/Message/types.d.ts +2 -2
  20. package/lib/MessageContainer/components/Item/index.d.ts +2 -1
  21. package/lib/MessageContainer/components/Item/index.js +5 -6
  22. package/lib/MessageContainer/components/Item/index.js.map +1 -1
  23. package/lib/MessageContainer/components/Item/types.d.ts +4 -5
  24. package/lib/MessageContainer/index.js +61 -33
  25. package/lib/MessageContainer/index.js.map +1 -1
  26. package/lib/MessageContainer/types.d.ts +5 -5
  27. package/lib/MessageText.js +2 -2
  28. package/lib/MessageText.js.map +1 -1
  29. package/lib/Time.d.ts +1 -1
  30. package/lib/Time.js +3 -3
  31. package/lib/Time.js.map +1 -1
  32. package/package.json +13 -15
  33. package/src/Bubble/index.tsx +170 -146
  34. package/src/Day/index.tsx +2 -2
  35. package/src/GiftedChat/index.tsx +7 -9
  36. package/src/GiftedChat/types.ts +7 -7
  37. package/src/GiftedChatContext.ts +3 -3
  38. package/src/InputToolbar.tsx +1 -0
  39. package/src/Message/index.tsx +10 -16
  40. package/src/Message/types.ts +2 -2
  41. package/src/MessageContainer/components/Item/index.tsx +5 -16
  42. package/src/MessageContainer/components/Item/types.ts +4 -5
  43. package/src/MessageContainer/index.tsx +98 -54
  44. package/src/MessageContainer/types.ts +5 -4
  45. package/src/MessageText.tsx +2 -2
  46. package/src/Time.tsx +5 -3
  47. package/src/__tests__/__snapshots__/MessageContainer.test.tsx.snap +72 -279
@@ -14,295 +14,88 @@ exports[`should render <MessageContainer /> and compare with snapshot 1`] = `
14
14
  ]
15
15
  }
16
16
  >
17
- <View
18
- style={
17
+ <RCTScrollView
18
+ CellRendererComponent={[Function]}
19
+ ListEmptyComponent={[Function]}
20
+ ListFooterComponent={null}
21
+ ListHeaderComponent={
22
+ <React.Fragment>
23
+ <TypingIndicator
24
+ isTyping={false}
25
+ />
26
+ </React.Fragment>
27
+ }
28
+ automaticallyAdjustContentInsets={false}
29
+ collapsable={false}
30
+ data={[]}
31
+ extraData={null}
32
+ getItem={[Function]}
33
+ getItemCount={[Function]}
34
+ invertStickyHeaders={true}
35
+ inverted={true}
36
+ isInvertedVirtualizedList={true}
37
+ jestAnimatedStyle={
19
38
  {
20
- "flex": 1,
21
- "overflow": "hidden",
22
- "transform": [
23
- {
24
- "scaleY": -1,
25
- },
26
- ],
39
+ "value": {},
27
40
  }
28
41
  }
29
- >
30
- <RCTScrollView
31
- ListEmptyComponent={[Function]}
32
- ListFooterComponent={null}
33
- ListHeaderComponent={
34
- <React.Fragment>
35
- <TypingIndicator
36
- isTyping={false}
37
- />
38
- </React.Fragment>
39
- }
40
- applyWindowCorrection={[Function]}
41
- automaticallyAdjustContentInsets={false}
42
- canChangeSize={true}
43
- collapsable={false}
44
- contentContainerStyle={
45
- {
46
- "backgroundColor": undefined,
47
- "minHeight": 1,
48
- "minWidth": 1,
49
- "paddingLeft": 0,
50
- "paddingRight": 0,
51
- }
52
- }
53
- contentHeight={0}
54
- contentWidth={0}
55
- data={[]}
56
- dataProvider={
57
- DataProvider {
58
- "_data": [],
59
- "_firstIndexToProcess": 0,
60
- "_hasStableIds": true,
61
- "_requiresDataChangeHandling": false,
62
- "_size": 0,
63
- "getStableId": [Function],
64
- "rowHasChanged": [Function],
65
- }
42
+ jestInlineStyle={
43
+ {
44
+ "flex": 1,
66
45
  }
67
- disableRecycling={false}
68
- estimatedItemSize={100}
69
- extendedState={
46
+ }
47
+ keyExtractor={[Function]}
48
+ onContentSizeChange={[Function]}
49
+ onEndReached={[Function]}
50
+ onEndReachedThreshold={0.1}
51
+ onLayout={[Function]}
52
+ onMomentumScrollBegin={[Function]}
53
+ onMomentumScrollEnd={[Function]}
54
+ onScroll={[Function]}
55
+ onScrollBeginDrag={[Function]}
56
+ onScrollEndDrag={[Function]}
57
+ removeClippedSubviews={false}
58
+ renderItem={[Function]}
59
+ scrollEventThrottle={1}
60
+ stickyHeaderIndices={[]}
61
+ style={
62
+ [
70
63
  {
71
- "value": [
72
- null,
73
- false,
64
+ "transform": [
65
+ {
66
+ "scaleY": -1,
67
+ },
74
68
  ],
75
- }
76
- }
77
- externalScrollView={[Function]}
78
- extraData={
79
- [
80
- null,
81
- false,
82
- ]
83
- }
84
- finalRenderAheadOffset={250}
85
- forceNonDeterministicRendering={true}
86
- horizontal={false}
87
- initialOffset={0}
88
- initialRenderIndex={0}
89
- inverted={true}
90
- isHorizontal={false}
91
- jestAnimatedStyle={
92
- {
93
- "value": {},
94
- }
95
- }
96
- jestInlineStyle={
69
+ },
97
70
  {
98
71
  "flex": 1,
99
- }
100
- }
101
- keyExtractor={[Function]}
102
- layoutProvider={
103
- GridLayoutProviderWithProps {
104
- "_acceptableRelayoutDelta": 1,
105
- "_getHeightOrWidth": [Function],
106
- "_getLayoutTypeForIndex": [Function],
107
- "_getSpan": [Function],
108
- "_hasExpired": false,
109
- "_maxSpan": 1,
110
- "_setLayoutForType": [Function],
111
- "_tempDim": {
112
- "height": 0,
113
- "width": 0,
114
- },
115
- "averageWindow": AverageWindow {
116
- "currentAverage": 100,
117
- "currentCount": 1,
118
- "inputValues": [
119
- 100,
120
- ],
121
- "nextIndex": 1,
122
- },
123
- "defaultEstimatedItemSize": 100,
124
- "layoutObject": {
125
- "size": undefined,
126
- "span": undefined,
127
- },
128
- "props": {
129
- "ListEmptyComponent": [Function],
130
- "ListFooterComponent": null,
131
- "ListHeaderComponent": <React.Fragment>
132
- <TypingIndicator
133
- isTyping={false}
134
- />
135
- </React.Fragment>,
136
- "automaticallyAdjustContentInsets": false,
137
- "collapsable": false,
138
- "data": [],
139
- "estimatedItemSize": 100,
140
- "extraData": [
141
- null,
142
- false,
72
+ },
73
+ ]
74
+ }
75
+ viewabilityConfigCallbackPairs={[]}
76
+ >
77
+ <View>
78
+ <View
79
+ collapsable={false}
80
+ onLayout={[Function]}
81
+ style={
82
+ {
83
+ "transform": [
84
+ {
85
+ "scaleY": -1,
86
+ },
143
87
  ],
144
- "inverted": true,
145
- "jestAnimatedStyle": {
146
- "value": {},
147
- },
148
- "jestInlineStyle": {
149
- "flex": 1,
150
- },
151
- "keyExtractor": [Function],
152
- "nativeID": undefined,
153
- "numColumns": 1,
154
- "onEndReached": [Function],
155
- "onEndReachedThreshold": 0.1,
156
- "onLayout": [Function],
157
- "onScroll": [Function],
158
- "renderItem": [Function],
159
- "scrollEventThrottle": 16,
160
- "style": {
161
- "flex": 1,
162
- },
163
- },
164
- "renderWindowInsets": {
165
- "height": 0,
166
- "width": 0,
167
- },
168
- "shouldRefreshWithAnchoring": true,
169
- }
170
- }
171
- maxRenderAhead={750}
172
- numColumns={1}
173
- onEndReached={[Function]}
174
- onEndReachedThreshold={0}
175
- onEndReachedThresholdRelative={0.1}
176
- onItemLayout={[Function]}
177
- onLayout={[Function]}
178
- onScroll={[Function]}
179
- onScrollBeginDrag={[Function]}
180
- onSizeChanged={[Function]}
181
- onVisibleIndicesChanged={[Function]}
182
- removeClippedSubviews={false}
183
- renderAheadOffset={0}
184
- renderAheadStep={250}
185
- renderContentContainer={[Function]}
186
- renderItem={[Function]}
187
- renderItemContainer={[Function]}
188
- rowRenderer={[Function]}
189
- scrollEventThrottle={16}
190
- scrollThrottle={16}
191
- scrollViewProps={
192
- {
193
- "contentContainerStyle": {
194
- "backgroundColor": undefined,
195
- "minHeight": 1,
196
- "minWidth": 1,
197
- "paddingLeft": 0,
198
- "paddingRight": 0,
199
- },
200
- "onLayout": [Function],
201
- "onScrollBeginDrag": [Function],
202
- "refreshControl": undefined,
203
- "style": {
204
- "minHeight": 1,
205
- "minWidth": 1,
206
- },
207
- }
208
- }
209
- style={
210
- {
211
- "minHeight": 1,
212
- "minWidth": 1,
213
- }
214
- }
215
- suppressBoundedSizeException={true}
216
- windowCorrectionConfig={
217
- {
218
- "applyToInitialOffset": true,
219
- "applyToItemScroll": true,
220
- "value": {
221
- "endCorrection": 0,
222
- "startCorrection": 0,
223
- "windowShift": -1,
224
- },
88
+ }
225
89
  }
226
- }
227
- >
228
- <View>
229
- <View
230
- style={
231
- {
232
- "flexDirection": "column",
233
- }
90
+ />
91
+ <View
92
+ style={
93
+ {
94
+ "flex": 1,
234
95
  }
235
- >
236
- <View
237
- style={
238
- {
239
- "paddingLeft": 0,
240
- "paddingTop": 0,
241
- }
242
- }
243
- />
244
- <View
245
- style={
246
- [
247
- undefined,
248
- {
249
- "transform": [
250
- {
251
- "scaleY": -1,
252
- },
253
- ],
254
- },
255
- ]
256
- }
257
- />
258
- <AutoLayoutView
259
- enableInstrumentation={false}
260
- horizontal={false}
261
- onBlankAreaEvent={[Function]}
262
- onLayout={[Function]}
263
- renderAheadOffset={0}
264
- scrollOffset={0}
265
- style={
266
- {
267
- "height": 0,
268
- "width": 0,
269
- }
270
- }
271
- windowSize={0}
272
- />
273
- <View
274
- style={
275
- {
276
- "flex": 1,
277
- }
278
- }
279
- />
280
- <CellContainer
281
- index={-1}
282
- style={
283
- [
284
- undefined,
285
- {
286
- "transform": [
287
- {
288
- "scaleY": -1,
289
- },
290
- ],
291
- },
292
- ]
293
- }
294
- />
295
- <View
296
- style={
297
- {
298
- "paddingBottom": 0,
299
- "paddingRight": 0,
300
- }
301
- }
302
- />
303
- </View>
304
- </View>
305
- </RCTScrollView>
306
- </View>
96
+ }
97
+ />
98
+ </View>
99
+ </RCTScrollView>
307
100
  </View>
308
101
  `;