react-native-gifted-chat 2.7.2 → 2.8.0
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 +6 -6
- package/lib/Day/index.d.ts +1 -1
- package/lib/Day/index.js +2 -2
- package/lib/Day/index.js.map +1 -1
- package/lib/GiftedChat/index.d.ts +1 -1
- package/lib/GiftedChat/index.js +6 -3
- package/lib/GiftedChat/index.js.map +1 -1
- package/lib/GiftedChat/types.d.ts +4 -4
- package/lib/GiftedChatContext.d.ts +1 -2
- package/lib/GiftedChatContext.js +3 -3
- package/lib/GiftedChatContext.js.map +1 -1
- package/lib/InputToolbar.js +1 -0
- package/lib/InputToolbar.js.map +1 -1
- package/lib/MessageContainer/components/Item/index.d.ts +2 -1
- package/lib/MessageContainer/components/Item/index.js +2 -5
- package/lib/MessageContainer/components/Item/index.js.map +1 -1
- package/lib/MessageContainer/components/Item/types.d.ts +4 -5
- package/lib/MessageContainer/index.js +45 -29
- package/lib/MessageContainer/index.js.map +1 -1
- package/lib/MessageContainer/types.d.ts +5 -5
- package/lib/Time.d.ts +1 -1
- package/lib/Time.js +3 -3
- package/lib/Time.js.map +1 -1
- package/package.json +1 -3
- package/src/Day/index.tsx +2 -2
- package/src/GiftedChat/index.tsx +13 -10
- package/src/GiftedChat/types.ts +4 -4
- package/src/GiftedChatContext.ts +3 -3
- package/src/InputToolbar.tsx +1 -0
- package/src/MessageContainer/components/Item/index.tsx +4 -16
- package/src/MessageContainer/components/Item/types.ts +4 -5
- package/src/MessageContainer/index.tsx +67 -37
- package/src/MessageContainer/types.ts +5 -4
- package/src/Time.tsx +5 -3
- package/src/__tests__/__snapshots__/MessageContainer.test.tsx.snap +77 -279
|
@@ -14,295 +14,93 @@ exports[`should render <MessageContainer /> and compare with snapshot 1`] = `
|
|
|
14
14
|
]
|
|
15
15
|
}
|
|
16
16
|
>
|
|
17
|
-
<
|
|
18
|
-
|
|
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={
|
|
32
|
+
[
|
|
33
|
+
null,
|
|
34
|
+
false,
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
getItem={[Function]}
|
|
38
|
+
getItemCount={[Function]}
|
|
39
|
+
invertStickyHeaders={true}
|
|
40
|
+
inverted={true}
|
|
41
|
+
isInvertedVirtualizedList={true}
|
|
42
|
+
jestAnimatedStyle={
|
|
19
43
|
{
|
|
20
|
-
"
|
|
21
|
-
"overflow": "hidden",
|
|
22
|
-
"transform": [
|
|
23
|
-
{
|
|
24
|
-
"scaleY": -1,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
44
|
+
"value": {},
|
|
27
45
|
}
|
|
28
46
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
}
|
|
47
|
+
jestInlineStyle={
|
|
48
|
+
{
|
|
49
|
+
"flex": 1,
|
|
66
50
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
}
|
|
52
|
+
keyExtractor={[Function]}
|
|
53
|
+
onContentSizeChange={[Function]}
|
|
54
|
+
onEndReached={[Function]}
|
|
55
|
+
onEndReachedThreshold={0.1}
|
|
56
|
+
onLayout={[Function]}
|
|
57
|
+
onMomentumScrollBegin={[Function]}
|
|
58
|
+
onMomentumScrollEnd={[Function]}
|
|
59
|
+
onScroll={[Function]}
|
|
60
|
+
onScrollBeginDrag={[Function]}
|
|
61
|
+
onScrollEndDrag={[Function]}
|
|
62
|
+
removeClippedSubviews={false}
|
|
63
|
+
renderItem={[Function]}
|
|
64
|
+
scrollEventThrottle={1}
|
|
65
|
+
stickyHeaderIndices={[]}
|
|
66
|
+
style={
|
|
67
|
+
[
|
|
70
68
|
{
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
"transform": [
|
|
70
|
+
{
|
|
71
|
+
"scaleY": -1,
|
|
72
|
+
},
|
|
74
73
|
],
|
|
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={
|
|
74
|
+
},
|
|
97
75
|
{
|
|
98
76
|
"flex": 1,
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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,
|
|
77
|
+
},
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
viewabilityConfigCallbackPairs={[]}
|
|
81
|
+
>
|
|
82
|
+
<View>
|
|
83
|
+
<View
|
|
84
|
+
collapsable={false}
|
|
85
|
+
onLayout={[Function]}
|
|
86
|
+
style={
|
|
87
|
+
{
|
|
88
|
+
"transform": [
|
|
89
|
+
{
|
|
90
|
+
"scaleY": -1,
|
|
91
|
+
},
|
|
143
92
|
],
|
|
144
|
-
|
|
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
|
-
},
|
|
93
|
+
}
|
|
225
94
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
"flexDirection": "column",
|
|
233
|
-
}
|
|
95
|
+
/>
|
|
96
|
+
<View
|
|
97
|
+
style={
|
|
98
|
+
{
|
|
99
|
+
"flex": 1,
|
|
234
100
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
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>
|
|
101
|
+
}
|
|
102
|
+
/>
|
|
103
|
+
</View>
|
|
104
|
+
</RCTScrollView>
|
|
307
105
|
</View>
|
|
308
106
|
`;
|