[react-native] Minor UIManager update, and removal of dead types (#38128)

* Minor UIManger update, and removal of dead types

* Remove tests for removed features

* Add eli to list of definition owners

* Remove the React Native WebView from inside Styled Components, now that it's been taken out of RN core
This commit is contained in:
Andrew Coates 2019-09-09 02:29:03 +02:00 committed by Mine Starks
parent 4fe80e3fcc
commit e43e44dc66
4 changed files with 70 additions and 849 deletions

File diff suppressed because it is too large Load Diff

View File

@ -13,9 +13,6 @@ import {
ViewPropsAndroid,
ToolbarAndroidProps,
ViewPagerAndroidProps,
WebViewProps,
WebViewPropsIOS,
WebViewPropsAndroid,
SegmentedControlIOSProps,
ScrollViewProps,
ScrollViewPropsIOS,
@ -117,15 +114,6 @@ declare module "react-native" {
/** @deprecated Use ViewPagerAndroidProps */
export type ViewPagerAndroidProperties = ViewPagerAndroidProps;
/** @deprecated Use WebViewProps */
export type WebViewProperties = WebViewProps;
/** @deprecated Use WebViewPropsIOS */
export type WebViewPropertiesIOS = WebViewPropsIOS;
/** @deprecated Use WebViewPropsAndroid */
export type WebViewPropertiesAndroid = WebViewPropsAndroid;
/** @deprecated Use SegmentedControlIOSProps */
export type SegmentedControlIOSProperties = SegmentedControlIOSProps;

View File

@ -16,9 +16,6 @@ import * as React from "react";
import {
Alert,
AppState,
AppStateIOS,
AlertIOS,
BackAndroid,
BackHandler,
Button,
CheckBox,
@ -79,7 +76,6 @@ import {
TextInputContentSizeChangeEventData,
TextInputEndEditingEventData,
TextInputSubmitEditingEventData,
WebView,
KeyboardAvoidingView,
Modal,
TimePickerAndroid,
@ -87,7 +83,6 @@ import {
ViewPropTypes,
requireNativeComponent,
Keyboard,
NetInfo,
PermissionsAndroid,
Platform,
ProgressBarAndroid,
@ -123,8 +118,6 @@ function testDimensions() {
BackHandler.addEventListener("hardwareBackPress", () => {}).remove();
BackAndroid.addEventListener("hardwareBackPress", () => {});
interface LocalStyles {
container: ViewStyle;
welcome: TextStyle;
@ -310,11 +303,6 @@ function appStateTest() {
AppState.addEventListener("change", appStateListener);
}
function appStateIOSTest() {
console.log("Current state: " + AppStateIOS.currentState);
AppStateIOS.addEventListener("change", appStateListener);
}
// ViewPagerAndroid
export class ViewPagerAndroidTest {
render() {
@ -687,21 +675,6 @@ class StatusBarTest extends React.Component {
}
}
class WebViewTest extends React.Component {
render() {
return (
<WebView
nativeConfig={{ component: "test", props: {}, viewManager: {} }}
onShouldStartLoadWithRequest={event => event.navigationType !== "formresubmit"}
originWhitelist={["https://origin.test"]}
saveFormDataDisabled={false}
useWebKit={true}
allowFileAccess={true}
/>
);
}
}
export class ImageTest extends React.Component {
componentDidMount(): void {
const uri = "https://seeklogo.com/images/T/typescript-logo-B29A3F462D-seeklogo.com.png";
@ -794,27 +767,6 @@ class AccessibilityTest extends React.Component {
const KeyboardAvoidingViewTest = () => <KeyboardAvoidingView enabled />;
const AlertIOSTest = () => {
AlertIOS.prompt(
"My Prompt",
"Enter your email",
[
{
text: "Cancel",
style: "cancel",
},
{
text: "Add",
onPress: (value: string) => {
console.log(value);
},
},
],
"default",
"email-address"
);
};
const ModalTest = () => <Modal hardwareAccelerated />;
const TimePickerAndroidTest = () => {
@ -886,11 +838,6 @@ const KeyboardTest = () => {
subscriber.remove();
}
const NetInfoTest = () => {
const subscription = NetInfo.addEventListener('connectionChange', (result) => console.log(result));
subscription.remove();
}
const PermissionsAndroidTest = () => {
PermissionsAndroid.request('android.permission.CAMERA').then(result => {
switch (result) {

View File

@ -205,10 +205,6 @@ export interface ReactNativeStyledInterface<T extends object> extends ReactNativ
typeof ReactNative.ViewPagerAndroid,
T
>;
WebView: ReactNativeThemedStyledFunction<
typeof ReactNative.WebView,
T
>;
}
export interface ReactNativeThemedStyledComponentsModule<