diff --git a/packages/babel-plugin-react-native-web/src/moduleMap.js b/packages/babel-plugin-react-native-web/src/moduleMap.js index 5d02dceb..f1752c0b 100644 --- a/packages/babel-plugin-react-native-web/src/moduleMap.js +++ b/packages/babel-plugin-react-native-web/src/moduleMap.js @@ -45,6 +45,7 @@ module.exports = { Slider: true, StatusBar: true, StyleSheet: true, + SwipeableListView: true, Switch: true, Text: true, TextInput: true, diff --git a/packages/react-native-web/src/index.js b/packages/react-native-web/src/index.js index b14e815f..a62aeb99 100644 --- a/packages/react-native-web/src/index.js +++ b/packages/react-native-web/src/index.js @@ -1,3 +1,5 @@ +import UnimplementedView from './modules/UnimplementedView'; + import createElement from './exports/createElement'; import findNodeHandle from './exports/findNodeHandle'; import processColor from './exports/processColor'; @@ -69,6 +71,43 @@ import ColorPropType from './exports/ColorPropType'; import EdgeInsetsPropType from './exports/EdgeInsetsPropType'; import PointPropType from './exports/PointPropType'; +const emptyObject = {}; +// compat (components) +const DatePickerIOS = UnimplementedView; +const DrawerLayoutAndroid = UnimplementedView; +const ImageEditor = UnimplementedView; +const ImageStore = UnimplementedView; +const InputAccessoryView = UnimplementedView; +const MaskedViewIOS = UnimplementedView; +const NavigatorIOS = UnimplementedView; +const PickerIOS = UnimplementedView; +const ProgressBarAndroid = UnimplementedView; +const ProgressViewIOS = UnimplementedView; +const SegmentedControlIOS = UnimplementedView; +const SnapshotViewIOS = UnimplementedView; +const SwipeableFlatList = UnimplementedView; +const SwipeableListView = UnimplementedView; +const TabBarIOS = UnimplementedView; +const ToastAndroid = UnimplementedView; +const ToolbarAndroid = UnimplementedView; +const ViewPagerAndroid = UnimplementedView; +const WebView = UnimplementedView; +const YellowBox = UnimplementedView; +// compat (apis) +const ActionSheetIOS = emptyObject; +const AlertIOS = emptyObject; +const CameraRoll = emptyObject; +const DatePickerAndroid = emptyObject; +const ImagePickerIOS = emptyObject; +const PermissionsAndroid = emptyObject; +const PushNotificationIOS = emptyObject; +const Settings = emptyObject; +const StatusBarIOS = emptyObject; +const Systrace = emptyObject; +const TimePickerAndroid = emptyObject; +const TVEventHandler = emptyObject; +const VibrationIOS = emptyObject; + export { // top-level API createElement, @@ -138,7 +177,42 @@ export { // propTypes ColorPropType, EdgeInsetsPropType, - PointPropType + PointPropType, + // compat (components) + DatePickerIOS, + DrawerLayoutAndroid, + ImageEditor, + ImageStore, + InputAccessoryView, + MaskedViewIOS, + NavigatorIOS, + PickerIOS, + ProgressBarAndroid, + ProgressViewIOS, + SegmentedControlIOS, + SnapshotViewIOS, + SwipeableFlatList, + SwipeableListView, + TabBarIOS, + ToastAndroid, + ToolbarAndroid, + ViewPagerAndroid, + WebView, + YellowBox, + // compat (apis) + ActionSheetIOS, + AlertIOS, + CameraRoll, + DatePickerAndroid, + ImagePickerIOS, + PermissionsAndroid, + PushNotificationIOS, + Settings, + StatusBarIOS, + Systrace, + TimePickerAndroid, + TVEventHandler, + VibrationIOS }; const ReactNative = { @@ -210,7 +284,43 @@ const ReactNative = { // propTypes ColorPropType, EdgeInsetsPropType, - PointPropType + PointPropType, + + // compat (components) + DatePickerIOS, + DrawerLayoutAndroid, + ImageEditor, + ImageStore, + InputAccessoryView, + MaskedViewIOS, + NavigatorIOS, + PickerIOS, + ProgressBarAndroid, + ProgressViewIOS, + SegmentedControlIOS, + SnapshotViewIOS, + SwipeableFlatList, + SwipeableListView, + TabBarIOS, + ToastAndroid, + ToolbarAndroid, + ViewPagerAndroid, + WebView, + YellowBox, + // compat (apis) + ActionSheetIOS, + AlertIOS, + CameraRoll, + DatePickerAndroid, + ImagePickerIOS, + PermissionsAndroid, + PushNotificationIOS, + Settings, + StatusBarIOS, + Systrace, + TimePickerAndroid, + TVEventHandler, + VibrationIOS }; export default ReactNative;