@office-iss/react-native-win32 0.68.0-preview.3 → 0.69.0-preview.2

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 (180) hide show
  1. package/.flowconfig +1 -3
  2. package/CHANGELOG.json +388 -22
  3. package/CHANGELOG.md +162 -13
  4. package/IntegrationTests/BUCK +4 -1
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -0
  6. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
  7. package/Libraries/Alert/Alert.win32.js +1 -1
  8. package/Libraries/Animated/AnimatedImplementation.js +1 -1
  9. package/Libraries/Animated/NativeAnimatedHelper.js +55 -9
  10. package/Libraries/Animated/NativeAnimatedModule.js +1 -0
  11. package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
  12. package/Libraries/Animated/animations/TimingAnimation.js +6 -11
  13. package/Libraries/Animated/createAnimatedComponent.js +2 -2
  14. package/Libraries/Animated/nodes/AnimatedColor.js +95 -29
  15. package/Libraries/Animated/nodes/AnimatedInterpolation.js +19 -22
  16. package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
  17. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  18. package/Libraries/AppState/AppState.js +1 -1
  19. package/Libraries/Blob/URL.js +7 -1
  20. package/Libraries/Components/Button.js +3 -0
  21. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +5 -0
  22. package/Libraries/Components/Pressable/Pressable.js +3 -3
  23. package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
  24. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +47 -38
  25. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +15 -7
  26. package/Libraries/Components/ScrollView/ScrollView.js +1 -1
  27. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -3
  28. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +3 -1
  29. package/Libraries/Components/Slider/Slider.js +0 -2
  30. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -1
  31. package/Libraries/Components/StatusBar/StatusBar.js +6 -1
  32. package/Libraries/Components/Switch/Switch.js +13 -2
  33. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +114 -109
  34. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +17 -9
  35. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +13 -5
  36. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  37. package/Libraries/Components/TextInput/TextInput.js +1 -8
  38. package/Libraries/Components/TextInput/TextInputState.js +10 -2
  39. package/Libraries/Components/TextInput/TextInputState.win32.js +10 -2
  40. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  41. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  42. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -0
  43. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -0
  44. package/Libraries/Components/Touchable/TouchableOpacity.js +7 -1
  45. package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +3 -1
  46. package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
  47. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -0
  48. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  49. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  50. package/Libraries/Components/View/View.win32.js +33 -1
  51. package/Libraries/Components/View/ViewNativeComponent.js +68 -8
  52. package/Libraries/Components/View/ViewPropTypes.js +36 -4
  53. package/Libraries/Components/View/ViewPropTypes.win32.js +36 -4
  54. package/Libraries/Components/View/ViewWin32.Props.d.ts +1 -1
  55. package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
  56. package/Libraries/Core/Devtools/parseHermesStack.js +1 -1
  57. package/Libraries/Core/ExceptionsManager.js +1 -1
  58. package/Libraries/Core/RawEventEmitter.js +38 -0
  59. package/Libraries/Core/ReactNativeVersion.js +2 -2
  60. package/Libraries/Core/polyfillPromise.js +32 -0
  61. package/Libraries/Core/setUpReactDevTools.js +3 -2
  62. package/Libraries/EventEmitter/NativeEventEmitter.js +3 -3
  63. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -1
  64. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +3 -3
  65. package/Libraries/Events/CustomEvent.js +32 -0
  66. package/Libraries/Events/EventPolyfill.js +239 -0
  67. package/Libraries/Image/Image.android.js +0 -6
  68. package/Libraries/Image/Image.ios.js +0 -6
  69. package/Libraries/Image/Image.win32.js +2 -8
  70. package/Libraries/Image/ImageViewNativeComponent.js +18 -3
  71. package/Libraries/Image/TextInlineImageNativeComponent.js +23 -15
  72. package/Libraries/Image/resolveAssetSource.win32.js +1 -1
  73. package/Libraries/Inspector/Inspector.js +2 -4
  74. package/Libraries/Inspector/Inspector.win32.js +7 -9
  75. package/Libraries/Interaction/BridgeSpyStallHandler.js +4 -3
  76. package/Libraries/Interaction/InteractionManager.js +1 -12
  77. package/Libraries/Interaction/TaskQueue.js +5 -4
  78. package/Libraries/LayoutAnimation/LayoutAnimation.js +13 -0
  79. package/Libraries/Linking/Linking.js +1 -1
  80. package/Libraries/Lists/FlatList.js +27 -6
  81. package/Libraries/Lists/VirtualizedList.js +71 -55
  82. package/Libraries/Lists/VirtualizedListContext.js +7 -3
  83. package/Libraries/Lists/VirtualizedSectionList.js +2 -2
  84. package/Libraries/Lists/__tests__/{FillRateHelper-test.windows.js → FillRateHelper-test.js} +2 -2
  85. package/Libraries/Lists/__tests__/{FlatList-test.windows.js → FlatList-test.js} +2 -2
  86. package/Libraries/Lists/__tests__/{SectionList-test.windows.js → SectionList-test.js} +14 -14
  87. package/Libraries/Lists/__tests__/{VirtualizeUtils-test.windows.js → VirtualizeUtils-test.js} +3 -3
  88. package/Libraries/Lists/__tests__/{VirtualizedList-test.windows.js → VirtualizedList-test.js} +92 -43
  89. package/Libraries/Lists/__tests__/{VirtualizedSectionList-test.windows.js → VirtualizedSectionList-test.js} +16 -14
  90. package/Libraries/LogBox/Data/LogBoxData.js +2 -2
  91. package/Libraries/LogBox/Data/LogBoxLog.js +1 -1
  92. package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
  93. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  94. package/Libraries/LogBox/LogBox.js +2 -21
  95. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -0
  96. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +2 -1
  97. package/Libraries/NativeComponent/BaseViewConfig.android.js +295 -0
  98. package/Libraries/NativeComponent/BaseViewConfig.ios.js +333 -0
  99. package/Libraries/NativeComponent/BaseViewConfig.win32.js +334 -0
  100. package/Libraries/NativeComponent/NativeComponentRegistry.js +0 -2
  101. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +24 -0
  102. package/Libraries/NativeComponent/StaticViewConfigValidator.js +7 -42
  103. package/Libraries/NativeComponent/ViewConfig.js +4 -4
  104. package/Libraries/NativeComponent/ViewConfigIgnore.js +54 -0
  105. package/Libraries/Network/FormData.js +7 -1
  106. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  107. package/Libraries/Pressability/Pressability.js +115 -46
  108. package/Libraries/Pressability/Pressability.win32.js +174 -69
  109. package/Libraries/Pressability/PressabilityDebug.js +5 -9
  110. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
  111. package/Libraries/ReactNative/AppContainer.js +1 -1
  112. package/Libraries/ReactNative/{DummyUIManager.js → BridgelessUIManager.js} +62 -40
  113. package/Libraries/ReactNative/PaperUIManager.win32.js +5 -5
  114. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +39 -0
  115. package/Libraries/ReactNative/UIManager.js +2 -3
  116. package/Libraries/ReactNative/renderApplication.js +4 -0
  117. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +8 -0
  118. package/Libraries/Renderer/implementations/ReactFabric-dev.js +5908 -4906
  119. package/Libraries/Renderer/implementations/ReactFabric-prod.js +2100 -1918
  120. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +2567 -2352
  121. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5610 -4844
  122. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1710 -1556
  123. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1830 -1639
  124. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  125. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -1
  126. package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -1
  127. package/Libraries/StyleSheet/StyleSheetTypes.js +59 -66
  128. package/Libraries/StyleSheet/normalizeColor.js +1 -1
  129. package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
  130. package/Libraries/StyleSheet/private/_TransformStyle.js +53 -0
  131. package/Libraries/Text/Text.js +13 -7
  132. package/Libraries/Text/TextNativeComponent.js +2 -0
  133. package/Libraries/Text/TextNativeComponent.win32.js +2 -0
  134. package/Libraries/Text/TextProps.js +10 -0
  135. package/Libraries/Types/CoreEventTypes.js +13 -1
  136. package/Libraries/Types/CoreEventTypes.win32.js +26 -1
  137. package/Libraries/Utilities/Appearance.js +0 -8
  138. package/Libraries/Utilities/HMRClient.js +1 -1
  139. package/Libraries/Utilities/ReactNativeTestTools.js +1 -0
  140. package/Libraries/Utilities/codegenNativeComponent.js +17 -6
  141. package/Libraries/Utilities/stringifySafe.js +4 -1
  142. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +3 -3
  143. package/Libraries/WebSocket/WebSocket.js +1 -1
  144. package/Libraries/vendor/emitter/_EmitterSubscription.js +1 -1
  145. package/Libraries/vendor/emitter/_EventEmitter.js +1 -1
  146. package/Libraries/vendor/emitter/_EventSubscription.js +1 -1
  147. package/index.js +30 -25
  148. package/index.win32.js +30 -25
  149. package/jest/preprocessor.js +24 -107
  150. package/jest/preprocessor_DO_NOT_USE.js +122 -0
  151. package/metro.config.js +3 -47
  152. package/overrides.json +39 -46
  153. package/package.json +28 -27
  154. package/rntypes/index.d.ts +19 -7
  155. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +1 -1
  156. package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +3 -1
  157. package/src/Libraries/Components/View/ViewWin32.Props.ts +1 -0
  158. package/src/Libraries/Lists/__tests__/__snapshots__/FlatList-test.js.snap +427 -0
  159. package/src/Libraries/Lists/__tests__/__snapshots__/SectionList-test.js.snap +391 -0
  160. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +3 -0
  161. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +4565 -0
  162. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +1153 -0
  163. package/src/rntypes/index.d.ts +19 -7
  164. package/typings-index.js +5 -1
  165. package/typings-index.js.map +1 -1
  166. package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -44
  167. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -45
  168. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
  169. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.js +0 -45
  170. package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -360
  171. package/Libraries/Components/View/ReactNativeViewViewConfig.win32.js +0 -401
  172. package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
  173. package/Libraries/ReactNative/UIManagerInjection.js +0 -15
  174. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -24527
  175. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -8309
  176. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8961
  177. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -24948
  178. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -8400
  179. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -9049
  180. package/flow/Promise.js +0 -47
@@ -0,0 +1,1153 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`VirtualizedSectionList handles nested lists 1`] = `
4
+ <RCTScrollView
5
+ data={
6
+ Array [
7
+ Object {
8
+ "data": Array [
9
+ Object {
10
+ "key": "outer0",
11
+ },
12
+ Object {
13
+ "key": "outer1",
14
+ },
15
+ ],
16
+ "title": "outer",
17
+ },
18
+ ]
19
+ }
20
+ getItem={[Function]}
21
+ getItemCount={[Function]}
22
+ keyExtractor={[Function]}
23
+ onContentSizeChange={[Function]}
24
+ onLayout={[Function]}
25
+ onMomentumScrollBegin={[Function]}
26
+ onMomentumScrollEnd={[Function]}
27
+ onScroll={[Function]}
28
+ onScrollBeginDrag={[Function]}
29
+ onScrollEndDrag={[Function]}
30
+ renderItem={[Function]}
31
+ scrollEventThrottle={50}
32
+ stickyHeaderIndices={Array []}
33
+ >
34
+ <View>
35
+ <View
36
+ onLayout={[Function]}
37
+ style={null}
38
+ />
39
+ <View
40
+ onLayout={[Function]}
41
+ style={null}
42
+ >
43
+ <View
44
+ data={
45
+ Array [
46
+ Object {
47
+ "data": Array [
48
+ Object {
49
+ "key": "outer0:inner0",
50
+ },
51
+ Object {
52
+ "key": "outer0:inner1",
53
+ },
54
+ ],
55
+ "title": "inner",
56
+ },
57
+ ]
58
+ }
59
+ getItem={[Function]}
60
+ getItemCount={[Function]}
61
+ horizontal={false}
62
+ keyExtractor={[Function]}
63
+ onContentSizeChange={[Function]}
64
+ onLayout={[Function]}
65
+ onMomentumScrollBegin={[Function]}
66
+ onMomentumScrollEnd={[Function]}
67
+ onScroll={[Function]}
68
+ onScrollBeginDrag={[Function]}
69
+ onScrollEndDrag={[Function]}
70
+ renderItem={[Function]}
71
+ scrollEventThrottle={50}
72
+ stickyHeaderIndices={Array []}
73
+ >
74
+ <View
75
+ onLayout={[Function]}
76
+ style={null}
77
+ />
78
+ <View
79
+ onLayout={[Function]}
80
+ style={null}
81
+ >
82
+ <item
83
+ title="outer0:inner0"
84
+ />
85
+ </View>
86
+ <View
87
+ onLayout={[Function]}
88
+ style={null}
89
+ >
90
+ <item
91
+ title="outer0:inner1"
92
+ />
93
+ </View>
94
+ <View
95
+ onLayout={[Function]}
96
+ style={null}
97
+ />
98
+ </View>
99
+ </View>
100
+ <View
101
+ onLayout={[Function]}
102
+ style={null}
103
+ >
104
+ <RCTScrollView
105
+ data={
106
+ Array [
107
+ Object {
108
+ "data": Array [
109
+ Object {
110
+ "key": "outer1:inner0",
111
+ },
112
+ Object {
113
+ "key": "outer1:inner1",
114
+ },
115
+ ],
116
+ "title": "inner",
117
+ },
118
+ ]
119
+ }
120
+ getItem={[Function]}
121
+ getItemCount={[Function]}
122
+ horizontal={true}
123
+ keyExtractor={[Function]}
124
+ onContentSizeChange={[Function]}
125
+ onLayout={[Function]}
126
+ onMomentumScrollBegin={[Function]}
127
+ onMomentumScrollEnd={[Function]}
128
+ onScroll={[Function]}
129
+ onScrollBeginDrag={[Function]}
130
+ onScrollEndDrag={[Function]}
131
+ renderItem={[Function]}
132
+ scrollEventThrottle={50}
133
+ stickyHeaderIndices={Array []}
134
+ >
135
+ <View>
136
+ <View
137
+ onLayout={[Function]}
138
+ style={
139
+ Array [
140
+ Object {
141
+ "flexDirection": "row",
142
+ },
143
+ null,
144
+ ]
145
+ }
146
+ />
147
+ <View
148
+ onLayout={[Function]}
149
+ style={
150
+ Array [
151
+ Object {
152
+ "flexDirection": "row",
153
+ },
154
+ null,
155
+ ]
156
+ }
157
+ >
158
+ <item
159
+ title="outer1:inner0"
160
+ />
161
+ </View>
162
+ <View
163
+ onLayout={[Function]}
164
+ style={
165
+ Array [
166
+ Object {
167
+ "flexDirection": "row",
168
+ },
169
+ null,
170
+ ]
171
+ }
172
+ >
173
+ <item
174
+ title="outer1:inner1"
175
+ />
176
+ </View>
177
+ <View
178
+ onLayout={[Function]}
179
+ style={
180
+ Array [
181
+ Object {
182
+ "flexDirection": "row",
183
+ },
184
+ null,
185
+ ]
186
+ }
187
+ />
188
+ </View>
189
+ </RCTScrollView>
190
+ </View>
191
+ <View
192
+ onLayout={[Function]}
193
+ style={null}
194
+ />
195
+ </View>
196
+ </RCTScrollView>
197
+ `;
198
+
199
+ exports[`VirtualizedSectionList handles separators correctly 1`] = `
200
+ <RCTScrollView
201
+ data={
202
+ Array [
203
+ Object {
204
+ "data": Array [
205
+ Object {
206
+ "key": "i0",
207
+ },
208
+ Object {
209
+ "key": "i1",
210
+ },
211
+ Object {
212
+ "key": "i2",
213
+ },
214
+ ],
215
+ "title": "s0",
216
+ },
217
+ ]
218
+ }
219
+ getItem={[Function]}
220
+ getItemCount={[Function]}
221
+ keyExtractor={[Function]}
222
+ onContentSizeChange={[Function]}
223
+ onLayout={[Function]}
224
+ onMomentumScrollBegin={[Function]}
225
+ onMomentumScrollEnd={[Function]}
226
+ onScroll={[Function]}
227
+ onScrollBeginDrag={[Function]}
228
+ onScrollEndDrag={[Function]}
229
+ renderItem={[Function]}
230
+ scrollEventThrottle={50}
231
+ stickyHeaderIndices={Array []}
232
+ >
233
+ <View>
234
+ <View
235
+ onLayout={[Function]}
236
+ style={null}
237
+ />
238
+ <View
239
+ onLayout={[Function]}
240
+ style={null}
241
+ >
242
+ <View>
243
+ <item
244
+ title="i0"
245
+ />
246
+ <separator
247
+ highlighted={false}
248
+ leadingItem={
249
+ Object {
250
+ "key": "i0",
251
+ }
252
+ }
253
+ section={
254
+ Object {
255
+ "data": Array [
256
+ Object {
257
+ "key": "i0",
258
+ },
259
+ Object {
260
+ "key": "i1",
261
+ },
262
+ Object {
263
+ "key": "i2",
264
+ },
265
+ ],
266
+ "title": "s0",
267
+ }
268
+ }
269
+ trailingItem={
270
+ Object {
271
+ "key": "i1",
272
+ }
273
+ }
274
+ />
275
+ </View>
276
+ </View>
277
+ <View
278
+ onLayout={[Function]}
279
+ style={null}
280
+ >
281
+ <View>
282
+ <item
283
+ title="i1"
284
+ />
285
+ <separator
286
+ highlighted={false}
287
+ leadingItem={
288
+ Object {
289
+ "key": "i1",
290
+ }
291
+ }
292
+ section={
293
+ Object {
294
+ "data": Array [
295
+ Object {
296
+ "key": "i0",
297
+ },
298
+ Object {
299
+ "key": "i1",
300
+ },
301
+ Object {
302
+ "key": "i2",
303
+ },
304
+ ],
305
+ "title": "s0",
306
+ }
307
+ }
308
+ trailingItem={
309
+ Object {
310
+ "key": "i2",
311
+ }
312
+ }
313
+ />
314
+ </View>
315
+ </View>
316
+ <View
317
+ onLayout={[Function]}
318
+ style={null}
319
+ >
320
+ <item
321
+ title="i2"
322
+ />
323
+ </View>
324
+ <View
325
+ onLayout={[Function]}
326
+ style={null}
327
+ />
328
+ </View>
329
+ </RCTScrollView>
330
+ `;
331
+
332
+ exports[`VirtualizedSectionList handles separators correctly 2`] = `
333
+ <RCTScrollView
334
+ data={
335
+ Array [
336
+ Object {
337
+ "data": Array [
338
+ Object {
339
+ "key": "i0",
340
+ },
341
+ Object {
342
+ "key": "i1",
343
+ },
344
+ Object {
345
+ "key": "i2",
346
+ },
347
+ ],
348
+ "title": "s0",
349
+ },
350
+ ]
351
+ }
352
+ getItem={[Function]}
353
+ getItemCount={[Function]}
354
+ keyExtractor={[Function]}
355
+ onContentSizeChange={[Function]}
356
+ onLayout={[Function]}
357
+ onMomentumScrollBegin={[Function]}
358
+ onMomentumScrollEnd={[Function]}
359
+ onScroll={[Function]}
360
+ onScrollBeginDrag={[Function]}
361
+ onScrollEndDrag={[Function]}
362
+ renderItem={[Function]}
363
+ scrollEventThrottle={50}
364
+ stickyHeaderIndices={Array []}
365
+ >
366
+ <View>
367
+ <View
368
+ onLayout={[Function]}
369
+ style={null}
370
+ />
371
+ <View
372
+ onLayout={[Function]}
373
+ style={null}
374
+ >
375
+ <View>
376
+ <item
377
+ title="i0"
378
+ />
379
+ <separator
380
+ highlighted={true}
381
+ leadingItem={
382
+ Object {
383
+ "key": "i0",
384
+ }
385
+ }
386
+ section={
387
+ Object {
388
+ "data": Array [
389
+ Object {
390
+ "key": "i0",
391
+ },
392
+ Object {
393
+ "key": "i1",
394
+ },
395
+ Object {
396
+ "key": "i2",
397
+ },
398
+ ],
399
+ "title": "s0",
400
+ }
401
+ }
402
+ trailingItem={
403
+ Object {
404
+ "key": "i1",
405
+ }
406
+ }
407
+ />
408
+ </View>
409
+ </View>
410
+ <View
411
+ onLayout={[Function]}
412
+ style={null}
413
+ >
414
+ <View>
415
+ <item
416
+ title="i1"
417
+ />
418
+ <separator
419
+ highlighted={true}
420
+ leadingItem={
421
+ Object {
422
+ "key": "i1",
423
+ }
424
+ }
425
+ section={
426
+ Object {
427
+ "data": Array [
428
+ Object {
429
+ "key": "i0",
430
+ },
431
+ Object {
432
+ "key": "i1",
433
+ },
434
+ Object {
435
+ "key": "i2",
436
+ },
437
+ ],
438
+ "title": "s0",
439
+ }
440
+ }
441
+ trailingItem={
442
+ Object {
443
+ "key": "i2",
444
+ }
445
+ }
446
+ />
447
+ </View>
448
+ </View>
449
+ <View
450
+ onLayout={[Function]}
451
+ style={null}
452
+ >
453
+ <item
454
+ title="i2"
455
+ />
456
+ </View>
457
+ <View
458
+ onLayout={[Function]}
459
+ style={null}
460
+ />
461
+ </View>
462
+ </RCTScrollView>
463
+ `;
464
+
465
+ exports[`VirtualizedSectionList handles separators correctly 3`] = `
466
+ <RCTScrollView
467
+ data={
468
+ Array [
469
+ Object {
470
+ "data": Array [
471
+ Object {
472
+ "key": "i0",
473
+ },
474
+ Object {
475
+ "key": "i1",
476
+ },
477
+ Object {
478
+ "key": "i2",
479
+ },
480
+ ],
481
+ "title": "s0",
482
+ },
483
+ ]
484
+ }
485
+ getItem={[Function]}
486
+ getItemCount={[Function]}
487
+ keyExtractor={[Function]}
488
+ onContentSizeChange={[Function]}
489
+ onLayout={[Function]}
490
+ onMomentumScrollBegin={[Function]}
491
+ onMomentumScrollEnd={[Function]}
492
+ onScroll={[Function]}
493
+ onScrollBeginDrag={[Function]}
494
+ onScrollEndDrag={[Function]}
495
+ renderItem={[Function]}
496
+ scrollEventThrottle={50}
497
+ stickyHeaderIndices={Array []}
498
+ >
499
+ <View>
500
+ <View
501
+ onLayout={[Function]}
502
+ style={null}
503
+ />
504
+ <View
505
+ onLayout={[Function]}
506
+ style={null}
507
+ >
508
+ <View>
509
+ <item
510
+ title="i0"
511
+ />
512
+ <separator
513
+ highlighted={true}
514
+ leadingItem={
515
+ Object {
516
+ "key": "i0",
517
+ }
518
+ }
519
+ section={
520
+ Object {
521
+ "data": Array [
522
+ Object {
523
+ "key": "i0",
524
+ },
525
+ Object {
526
+ "key": "i1",
527
+ },
528
+ Object {
529
+ "key": "i2",
530
+ },
531
+ ],
532
+ "title": "s0",
533
+ }
534
+ }
535
+ trailingItem={
536
+ Object {
537
+ "key": "i1",
538
+ }
539
+ }
540
+ />
541
+ </View>
542
+ </View>
543
+ <View
544
+ onLayout={[Function]}
545
+ style={null}
546
+ >
547
+ <View>
548
+ <item
549
+ title="i1"
550
+ />
551
+ <separator
552
+ highlighted={true}
553
+ leadingItem={
554
+ Object {
555
+ "key": "i1",
556
+ }
557
+ }
558
+ press={true}
559
+ section={
560
+ Object {
561
+ "data": Array [
562
+ Object {
563
+ "key": "i0",
564
+ },
565
+ Object {
566
+ "key": "i1",
567
+ },
568
+ Object {
569
+ "key": "i2",
570
+ },
571
+ ],
572
+ "title": "s0",
573
+ }
574
+ }
575
+ trailingItem={
576
+ Object {
577
+ "key": "i2",
578
+ }
579
+ }
580
+ />
581
+ </View>
582
+ </View>
583
+ <View
584
+ onLayout={[Function]}
585
+ style={null}
586
+ >
587
+ <item
588
+ title="i2"
589
+ />
590
+ </View>
591
+ <View
592
+ onLayout={[Function]}
593
+ style={null}
594
+ />
595
+ </View>
596
+ </RCTScrollView>
597
+ `;
598
+
599
+ exports[`VirtualizedSectionList handles separators correctly 4`] = `
600
+ <RCTScrollView
601
+ data={
602
+ Array [
603
+ Object {
604
+ "data": Array [
605
+ Object {
606
+ "key": "i0",
607
+ },
608
+ Object {
609
+ "key": "i1",
610
+ },
611
+ Object {
612
+ "key": "i2",
613
+ },
614
+ ],
615
+ "title": "s0",
616
+ },
617
+ ]
618
+ }
619
+ getItem={[Function]}
620
+ getItemCount={[Function]}
621
+ keyExtractor={[Function]}
622
+ onContentSizeChange={[Function]}
623
+ onLayout={[Function]}
624
+ onMomentumScrollBegin={[Function]}
625
+ onMomentumScrollEnd={[Function]}
626
+ onScroll={[Function]}
627
+ onScrollBeginDrag={[Function]}
628
+ onScrollEndDrag={[Function]}
629
+ renderItem={[Function]}
630
+ scrollEventThrottle={50}
631
+ stickyHeaderIndices={Array []}
632
+ >
633
+ <View>
634
+ <View
635
+ onLayout={[Function]}
636
+ style={null}
637
+ />
638
+ <View
639
+ onLayout={[Function]}
640
+ style={null}
641
+ >
642
+ <View>
643
+ <item
644
+ title="i0"
645
+ />
646
+ <separator
647
+ highlighted={false}
648
+ leadingItem={
649
+ Object {
650
+ "key": "i0",
651
+ }
652
+ }
653
+ section={
654
+ Object {
655
+ "data": Array [
656
+ Object {
657
+ "key": "i0",
658
+ },
659
+ Object {
660
+ "key": "i1",
661
+ },
662
+ Object {
663
+ "key": "i2",
664
+ },
665
+ ],
666
+ "title": "s0",
667
+ }
668
+ }
669
+ trailingItem={
670
+ Object {
671
+ "key": "i1",
672
+ }
673
+ }
674
+ />
675
+ </View>
676
+ </View>
677
+ <View
678
+ onLayout={[Function]}
679
+ style={null}
680
+ >
681
+ <View>
682
+ <item
683
+ title="i1"
684
+ />
685
+ <separator
686
+ highlighted={false}
687
+ leadingItem={
688
+ Object {
689
+ "key": "i1",
690
+ }
691
+ }
692
+ press={true}
693
+ section={
694
+ Object {
695
+ "data": Array [
696
+ Object {
697
+ "key": "i0",
698
+ },
699
+ Object {
700
+ "key": "i1",
701
+ },
702
+ Object {
703
+ "key": "i2",
704
+ },
705
+ ],
706
+ "title": "s0",
707
+ }
708
+ }
709
+ trailingItem={
710
+ Object {
711
+ "key": "i2",
712
+ }
713
+ }
714
+ />
715
+ </View>
716
+ </View>
717
+ <View
718
+ onLayout={[Function]}
719
+ style={null}
720
+ >
721
+ <item
722
+ title="i2"
723
+ />
724
+ </View>
725
+ <View
726
+ onLayout={[Function]}
727
+ style={null}
728
+ />
729
+ </View>
730
+ </RCTScrollView>
731
+ `;
732
+
733
+ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
734
+ <RCTScrollView
735
+ ListEmptyComponent={[Function]}
736
+ ListFooterComponent={[Function]}
737
+ ListHeaderComponent={[Function]}
738
+ data={
739
+ Array [
740
+ Object {
741
+ "data": Array [
742
+ Object {
743
+ "id": "0",
744
+ },
745
+ Object {
746
+ "id": "1",
747
+ },
748
+ Object {
749
+ "id": "2",
750
+ },
751
+ Object {
752
+ "id": "3",
753
+ },
754
+ Object {
755
+ "id": "4",
756
+ },
757
+ ],
758
+ "title": "s1",
759
+ },
760
+ ]
761
+ }
762
+ getItem={[Function]}
763
+ getItemCount={[Function]}
764
+ getItemLayout={[Function]}
765
+ invertStickyHeaders={true}
766
+ inverted={true}
767
+ keyExtractor={[Function]}
768
+ onContentSizeChange={[Function]}
769
+ onLayout={[Function]}
770
+ onMomentumScrollBegin={[Function]}
771
+ onMomentumScrollEnd={[Function]}
772
+ onRefresh={[MockFunction]}
773
+ onScroll={[Function]}
774
+ onScrollBeginDrag={[Function]}
775
+ onScrollEndDrag={[Function]}
776
+ refreshControl={
777
+ <RefreshControlMock
778
+ onRefresh={[MockFunction]}
779
+ refreshing={false}
780
+ />
781
+ }
782
+ refreshing={false}
783
+ renderItem={[Function]}
784
+ scrollEventThrottle={50}
785
+ stickyHeaderIndices={Array []}
786
+ style={
787
+ Array [
788
+ Object {
789
+ "transform": Array [
790
+ Object {
791
+ "scaleY": -1,
792
+ },
793
+ ],
794
+ },
795
+ undefined,
796
+ ]
797
+ }
798
+ >
799
+ <RCTRefreshControl />
800
+ <View>
801
+ <View
802
+ onLayout={[Function]}
803
+ style={
804
+ Object {
805
+ "transform": Array [
806
+ Object {
807
+ "scaleY": -1,
808
+ },
809
+ ],
810
+ }
811
+ }
812
+ >
813
+ <header />
814
+ </View>
815
+ <View
816
+ style={
817
+ Array [
818
+ Object {
819
+ "flexDirection": "column-reverse",
820
+ },
821
+ Object {
822
+ "transform": Array [
823
+ Object {
824
+ "scaleY": -1,
825
+ },
826
+ ],
827
+ },
828
+ ]
829
+ }
830
+ />
831
+ <View
832
+ style={
833
+ Array [
834
+ Object {
835
+ "flexDirection": "column-reverse",
836
+ },
837
+ Object {
838
+ "transform": Array [
839
+ Object {
840
+ "scaleY": -1,
841
+ },
842
+ ],
843
+ },
844
+ ]
845
+ }
846
+ >
847
+ <View>
848
+ <separator />
849
+ <item
850
+ value="0"
851
+ />
852
+ </View>
853
+ </View>
854
+ <View
855
+ style={
856
+ Array [
857
+ Object {
858
+ "flexDirection": "column-reverse",
859
+ },
860
+ Object {
861
+ "transform": Array [
862
+ Object {
863
+ "scaleY": -1,
864
+ },
865
+ ],
866
+ },
867
+ ]
868
+ }
869
+ >
870
+ <View>
871
+ <separator />
872
+ <item
873
+ value="1"
874
+ />
875
+ </View>
876
+ </View>
877
+ <View
878
+ style={
879
+ Array [
880
+ Object {
881
+ "flexDirection": "column-reverse",
882
+ },
883
+ Object {
884
+ "transform": Array [
885
+ Object {
886
+ "scaleY": -1,
887
+ },
888
+ ],
889
+ },
890
+ ]
891
+ }
892
+ >
893
+ <View>
894
+ <separator />
895
+ <item
896
+ value="2"
897
+ />
898
+ </View>
899
+ </View>
900
+ <View
901
+ style={
902
+ Array [
903
+ Object {
904
+ "flexDirection": "column-reverse",
905
+ },
906
+ Object {
907
+ "transform": Array [
908
+ Object {
909
+ "scaleY": -1,
910
+ },
911
+ ],
912
+ },
913
+ ]
914
+ }
915
+ >
916
+ <View>
917
+ <separator />
918
+ <item
919
+ value="3"
920
+ />
921
+ </View>
922
+ </View>
923
+ <View
924
+ style={
925
+ Array [
926
+ Object {
927
+ "flexDirection": "column-reverse",
928
+ },
929
+ Object {
930
+ "transform": Array [
931
+ Object {
932
+ "scaleY": -1,
933
+ },
934
+ ],
935
+ },
936
+ ]
937
+ }
938
+ >
939
+ <item
940
+ value="4"
941
+ />
942
+ </View>
943
+ <View
944
+ style={
945
+ Array [
946
+ Object {
947
+ "flexDirection": "column-reverse",
948
+ },
949
+ Object {
950
+ "transform": Array [
951
+ Object {
952
+ "scaleY": -1,
953
+ },
954
+ ],
955
+ },
956
+ ]
957
+ }
958
+ />
959
+ <View
960
+ onLayout={[Function]}
961
+ style={
962
+ Object {
963
+ "transform": Array [
964
+ Object {
965
+ "scaleY": -1,
966
+ },
967
+ ],
968
+ }
969
+ }
970
+ >
971
+ <footer />
972
+ </View>
973
+ </View>
974
+ </RCTScrollView>
975
+ `;
976
+
977
+ exports[`VirtualizedSectionList renders empty list 1`] = `
978
+ <RCTScrollView
979
+ data={Array []}
980
+ getItem={[Function]}
981
+ getItemCount={[Function]}
982
+ keyExtractor={[Function]}
983
+ onContentSizeChange={[Function]}
984
+ onLayout={[Function]}
985
+ onMomentumScrollBegin={[Function]}
986
+ onMomentumScrollEnd={[Function]}
987
+ onScroll={[Function]}
988
+ onScrollBeginDrag={[Function]}
989
+ onScrollEndDrag={[Function]}
990
+ renderItem={[Function]}
991
+ scrollEventThrottle={50}
992
+ stickyHeaderIndices={Array []}
993
+ >
994
+ <View />
995
+ </RCTScrollView>
996
+ `;
997
+
998
+ exports[`VirtualizedSectionList renders empty list with empty component 1`] = `
999
+ <RCTScrollView
1000
+ ListEmptyComponent={[Function]}
1001
+ ListFooterComponent={[Function]}
1002
+ ListHeaderComponent={[Function]}
1003
+ data={Array []}
1004
+ getItem={[Function]}
1005
+ getItemCount={[Function]}
1006
+ keyExtractor={[Function]}
1007
+ onContentSizeChange={[Function]}
1008
+ onLayout={[Function]}
1009
+ onMomentumScrollBegin={[Function]}
1010
+ onMomentumScrollEnd={[Function]}
1011
+ onScroll={[Function]}
1012
+ onScrollBeginDrag={[Function]}
1013
+ onScrollEndDrag={[Function]}
1014
+ renderItem={[Function]}
1015
+ scrollEventThrottle={50}
1016
+ stickyHeaderIndices={Array []}
1017
+ >
1018
+ <View>
1019
+ <View
1020
+ onLayout={[Function]}
1021
+ >
1022
+ <header />
1023
+ </View>
1024
+ <empty />
1025
+ <View
1026
+ onLayout={[Function]}
1027
+ >
1028
+ <footer />
1029
+ </View>
1030
+ </View>
1031
+ </RCTScrollView>
1032
+ `;
1033
+
1034
+ exports[`VirtualizedSectionList renders list with empty component 1`] = `
1035
+ <RCTScrollView
1036
+ ListEmptyComponent={[Function]}
1037
+ data={
1038
+ Array [
1039
+ Object {
1040
+ "data": Array [
1041
+ Object {
1042
+ "key": "hello",
1043
+ },
1044
+ ],
1045
+ "title": "s1",
1046
+ },
1047
+ ]
1048
+ }
1049
+ getItem={[Function]}
1050
+ getItemCount={[Function]}
1051
+ keyExtractor={[Function]}
1052
+ onContentSizeChange={[Function]}
1053
+ onLayout={[Function]}
1054
+ onMomentumScrollBegin={[Function]}
1055
+ onMomentumScrollEnd={[Function]}
1056
+ onScroll={[Function]}
1057
+ onScrollBeginDrag={[Function]}
1058
+ onScrollEndDrag={[Function]}
1059
+ renderItem={[Function]}
1060
+ scrollEventThrottle={50}
1061
+ stickyHeaderIndices={Array []}
1062
+ >
1063
+ <View>
1064
+ <View
1065
+ onLayout={[Function]}
1066
+ style={null}
1067
+ />
1068
+ <View
1069
+ onLayout={[Function]}
1070
+ style={null}
1071
+ >
1072
+ <item
1073
+ value="hello"
1074
+ />
1075
+ </View>
1076
+ <View
1077
+ onLayout={[Function]}
1078
+ style={null}
1079
+ />
1080
+ </View>
1081
+ </RCTScrollView>
1082
+ `;
1083
+
1084
+ exports[`VirtualizedSectionList renders simple list 1`] = `
1085
+ <RCTScrollView
1086
+ data={
1087
+ Array [
1088
+ Object {
1089
+ "data": Array [
1090
+ Object {
1091
+ "key": "i1",
1092
+ },
1093
+ Object {
1094
+ "key": "i2",
1095
+ },
1096
+ Object {
1097
+ "key": "i3",
1098
+ },
1099
+ ],
1100
+ "title": "s1",
1101
+ },
1102
+ ]
1103
+ }
1104
+ getItem={[Function]}
1105
+ getItemCount={[Function]}
1106
+ keyExtractor={[Function]}
1107
+ onContentSizeChange={[Function]}
1108
+ onLayout={[Function]}
1109
+ onMomentumScrollBegin={[Function]}
1110
+ onMomentumScrollEnd={[Function]}
1111
+ onScroll={[Function]}
1112
+ onScrollBeginDrag={[Function]}
1113
+ onScrollEndDrag={[Function]}
1114
+ renderItem={[Function]}
1115
+ scrollEventThrottle={50}
1116
+ stickyHeaderIndices={Array []}
1117
+ >
1118
+ <View>
1119
+ <View
1120
+ onLayout={[Function]}
1121
+ style={null}
1122
+ />
1123
+ <View
1124
+ onLayout={[Function]}
1125
+ style={null}
1126
+ >
1127
+ <item
1128
+ value="i1"
1129
+ />
1130
+ </View>
1131
+ <View
1132
+ onLayout={[Function]}
1133
+ style={null}
1134
+ >
1135
+ <item
1136
+ value="i2"
1137
+ />
1138
+ </View>
1139
+ <View
1140
+ onLayout={[Function]}
1141
+ style={null}
1142
+ >
1143
+ <item
1144
+ value="i3"
1145
+ />
1146
+ </View>
1147
+ <View
1148
+ onLayout={[Function]}
1149
+ style={null}
1150
+ />
1151
+ </View>
1152
+ </RCTScrollView>
1153
+ `;