add to RN OSS package.

Summary: Also fix some bugs with fbjs requires.

Reviewed By: mkonicek

Differential Revision: D4635805

fbshipit-source-id: b0663b727632fe5784f1caa1ff20b160a82a3931
This commit is contained in:
Spencer Ahrens 2017-03-01 17:52:52 -08:00 committed by Facebook Github Bot
parent 18eb7aea97
commit e70cdf0cc1
9 changed files with 12 additions and 8 deletions

View File

@ -26,11 +26,11 @@
const React = require('react');
const ReactNative = require('react-native');
const {
FlatList,
StyleSheet,
View,
} = ReactNative;
const FlatList = require('FlatList');
const UIExplorerPage = require('./UIExplorerPage');
const infoLog = require('infoLog');

View File

@ -26,12 +26,12 @@
const React = require('react');
const ReactNative = require('react-native');
const {
FlatList,
StyleSheet,
Text,
View,
} = ReactNative;
const FlatList = require('FlatList');
const UIExplorerPage = require('./UIExplorerPage');
const infoLog = require('infoLog');

View File

@ -26,12 +26,12 @@
const React = require('react');
const ReactNative = require('react-native');
const {
SectionList,
StyleSheet,
Text,
View,
} = ReactNative;
const SectionList = require('SectionList');
const UIExplorerPage = require('./UIExplorerPage');
const infoLog = require('infoLog');

View File

@ -37,7 +37,7 @@ const React = require('React');
const View = require('View');
const VirtualizedList = require('VirtualizedList');
const invariant = require('invariant');
const invariant = require('fbjs/lib/invariant');
import type {StyleObj} from 'StyleSheetTypes';
import type {ViewabilityConfig, ViewToken} from 'ViewabilityHelper';

View File

@ -11,7 +11,7 @@
*/
'use strict';
const invariant = require('invariant');
const invariant = require('fbjs/lib/invariant');
export type ViewToken = {item: any, key: string, index: ?number, isViewable: boolean, section?: any};

View File

@ -11,7 +11,7 @@
*/
'use strict';
const invariant = require('invariant');
const invariant = require('fbjs/lib/invariant');
/**
* Used to find the indices of the frames that overlap the given offsets. Useful for finding the

View File

@ -36,8 +36,8 @@ const React = require('React');
const View = require('View');
const VirtualizedList = require('VirtualizedList');
const invariant = require('invariant');
const warning = require('warning');
const invariant = require('fbjs/lib/invariant');
const warning = require('fbjs/lib/warning');
import type {ViewToken} from 'ViewabilityHelper';
import type {Props as VirtualizedListProps} from 'VirtualizedList';

View File

@ -10,6 +10,7 @@
'use strict';
jest.unmock('ViewabilityHelper');
const ViewabilityHelper = require('ViewabilityHelper');
let rowFrames;

View File

@ -34,6 +34,7 @@ const ReactNative = {
get Button() { return require('Button'); },
get DatePickerIOS() { return require('DatePickerIOS'); },
get DrawerLayoutAndroid() { return require('DrawerLayoutAndroid'); },
get FlatList() { return require('FlatList'); },
get Image() { return require('Image'); },
get ImageEditor() { return require('ImageEditor'); },
get ImageStore() { return require('ImageStore'); },
@ -48,6 +49,7 @@ const ReactNative = {
get ProgressBarAndroid() { return require('ProgressBarAndroid'); },
get ProgressViewIOS() { return require('ProgressViewIOS'); },
get ScrollView() { return require('ScrollView'); },
get SectionList() { return require('SectionList'); },
get SegmentedControlIOS() { return require('SegmentedControlIOS'); },
get Slider() { return require('Slider'); },
get SnapshotViewIOS() { return require('SnapshotViewIOS'); },
@ -67,6 +69,7 @@ const ReactNative = {
get TouchableWithoutFeedback() { return require('TouchableWithoutFeedback'); },
get View() { return require('View'); },
get ViewPagerAndroid() { return require('ViewPagerAndroid'); },
get VirtualizedList() { return require('VirtualizedList'); },
get WebView() { return require('WebView'); },
// APIs