From 3ca19c048184e6e05abff96c6e0d3137f4df43b1 Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Thu, 27 Jun 2019 08:00:40 -0700 Subject: [PATCH] Remove Schema.js files replaced with flow types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: These files are no longer needed since all files codegen'd use flow types as the source 🎉 Reviewed By: cpojer Differential Revision: D15961378 fbshipit-source-id: 510a298b2e97cd78a9a3648cbaa239e8134daa75 --- .../ActivityIndicatorViewSchema.js | 77 ------ .../AndroidSwipeRefreshLayoutSchema.js | 99 -------- .../RefreshControl/PullToRefreshViewSchema.js | 81 ------- Libraries/Components/Slider/SliderSchema.js | 220 ------------------ Libraries/Components/Switch/SwitchSchema.js | 95 -------- .../UnimplementedNativeViewSchema.js | 44 ---- Libraries/Modal/ModalSchema.js | 209 ----------------- 7 files changed, 825 deletions(-) delete mode 100644 Libraries/Components/ActivityIndicator/ActivityIndicatorViewSchema.js delete mode 100644 Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutSchema.js delete mode 100644 Libraries/Components/RefreshControl/PullToRefreshViewSchema.js delete mode 100644 Libraries/Components/Slider/SliderSchema.js delete mode 100644 Libraries/Components/Switch/SwitchSchema.js delete mode 100644 Libraries/Components/UnimplementedViews/UnimplementedNativeViewSchema.js delete mode 100644 Libraries/Modal/ModalSchema.js diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicatorViewSchema.js b/Libraries/Components/ActivityIndicator/ActivityIndicatorViewSchema.js deleted file mode 100644 index 495d18c5100..00000000000 --- a/Libraries/Components/ActivityIndicator/ActivityIndicatorViewSchema.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js'; - -const SwitchSchema: SchemaType = { - modules: { - ActivityIndicatorSchema: { - components: { - ActivityIndicatorView: { - paperComponentName: 'RCTActivityIndicatorView', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'hidesWhenStopped', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'animating', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'color', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'size', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'small', - options: [ - { - name: 'small', - }, - { - name: 'large', - }, - ], - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = SwitchSchema; diff --git a/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutSchema.js b/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutSchema.js deleted file mode 100644 index 7d8c788c534..00000000000 --- a/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutSchema.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ -'use strict'; - -import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js'; - -const AndroidSwipeRefreshLayoutSchema: SchemaType = { - modules: { - AndroidSwipeRefreshLayout: { - components: { - AndroidSwipeRefreshLayout: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onRefresh', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - }, - ], - props: [ - { - name: 'enabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: true, - }, - }, - { - name: 'colors', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - }, - { - name: 'progressBackgroundColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'size', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 1, - }, - }, - { - name: 'progressViewOffset', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0, - }, - }, - { - name: 'refreshing', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = AndroidSwipeRefreshLayoutSchema; diff --git a/Libraries/Components/RefreshControl/PullToRefreshViewSchema.js b/Libraries/Components/RefreshControl/PullToRefreshViewSchema.js deleted file mode 100644 index cba10d9fdd1..00000000000 --- a/Libraries/Components/RefreshControl/PullToRefreshViewSchema.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js'; - -const PullToRefreshViewSchema: SchemaType = { - modules: { - PullToRefreshView: { - components: { - PullToRefreshView: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onRefresh', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - }, - ], - props: [ - { - name: 'tintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'titleColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'title', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - { - name: 'refreshing', - optional: false, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = PullToRefreshViewSchema; diff --git a/Libraries/Components/Slider/SliderSchema.js b/Libraries/Components/Slider/SliderSchema.js deleted file mode 100644 index f5b6faddb57..00000000000 --- a/Libraries/Components/Slider/SliderSchema.js +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js'; - -const SliderSchema: SchemaType = { - modules: { - SliderSchema: { - components: { - Slider: { - interfaceOnly: true, - paperComponentName: 'RCTSlider', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - type: 'FloatTypeAnnotation', - name: 'value', - optional: false, - }, - { - type: 'BooleanTypeAnnotation', - name: 'fromUser', - optional: false, - }, - ], - }, - }, - }, - { - name: 'onSlidingComplete', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - type: 'FloatTypeAnnotation', - name: 'value', - optional: false, - }, - { - type: 'BooleanTypeAnnotation', - name: 'fromUser', - optional: false, - }, - ], - }, - }, - }, - { - name: 'onValueChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - type: 'FloatTypeAnnotation', - name: 'value', - optional: false, - }, - { - type: 'BooleanTypeAnnotation', - name: 'fromUser', - optional: false, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'enabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'maximumTrackImage', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'maximumTrackTintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'maximumValue', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 1, - }, - }, - { - name: 'minimumTrackImage', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'minimumTrackTintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'minimumValue', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0, - }, - }, - { - name: 'step', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0, - }, - }, - { - name: 'testID', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - { - name: 'thumbImage', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'trackImage', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ImageSourcePrimitive', - }, - }, - { - name: 'thumbTintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'value', - optional: true, - typeAnnotation: { - type: 'FloatTypeAnnotation', - default: 0, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = SliderSchema; diff --git a/Libraries/Components/Switch/SwitchSchema.js b/Libraries/Components/Switch/SwitchSchema.js deleted file mode 100644 index 654834546e9..00000000000 --- a/Libraries/Components/Switch/SwitchSchema.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js'; - -const SwitchSchema: SchemaType = { - modules: { - Switch: { - components: { - Switch: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onChange', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - type: 'BooleanTypeAnnotation', - name: 'value', - optional: false, - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'disabled', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'value', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'tintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'onTintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - { - name: 'thumbTintColor', - optional: true, - typeAnnotation: { - type: 'NativePrimitiveTypeAnnotation', - name: 'ColorPrimitive', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = SwitchSchema; diff --git a/Libraries/Components/UnimplementedViews/UnimplementedNativeViewSchema.js b/Libraries/Components/UnimplementedViews/UnimplementedNativeViewSchema.js deleted file mode 100644 index e9fb0784944..00000000000 --- a/Libraries/Components/UnimplementedViews/UnimplementedNativeViewSchema.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js'; - -const UnimplementedNativeViewSchema: SchemaType = { - modules: { - UnimplementedNativeViewSchema: { - components: { - UnimplementedNativeView: { - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [], - props: [ - { - name: 'name', - optional: true, - typeAnnotation: { - type: 'StringTypeAnnotation', - default: '', - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = UnimplementedNativeViewSchema; diff --git a/Libraries/Modal/ModalSchema.js b/Libraries/Modal/ModalSchema.js deleted file mode 100644 index a3db92220c0..00000000000 --- a/Libraries/Modal/ModalSchema.js +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ -'use strict'; - -import type {SchemaType} from '../../packages/react-native-codegen/src/CodegenSchema.js'; - -const ModalSchema: SchemaType = { - modules: { - ModalHostView: { - components: { - ModalHostView: { - interfaceOnly: true, - paperComponentName: 'RCTModalHostView', - extendsProps: [ - { - type: 'ReactNativeBuiltInType', - knownTypeName: 'ReactNativeCoreViewProps', - }, - ], - events: [ - { - name: 'onRequestClose', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - }, - { - name: 'onShow', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - }, - { - name: 'onDismiss', - optional: true, - bubblingType: 'bubble', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [], - }, - }, - }, - { - name: 'onOrientationChange', - optional: true, - bubblingType: 'direct', - typeAnnotation: { - type: 'EventTypeAnnotation', - argument: { - type: 'ObjectTypeAnnotation', - properties: [ - { - type: 'StringEnumTypeAnnotation', - name: 'orientation', - optional: false, - options: [ - { - name: 'portrait', - }, - { - name: 'landscape', - }, - ], - }, - ], - }, - }, - }, - ], - props: [ - { - name: 'animationType', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'none', - options: [ - { - name: 'none', - }, - { - name: 'slide', - }, - { - name: 'fade', - }, - ], - }, - }, - { - name: 'presentationStyle', - optional: true, - typeAnnotation: { - type: 'StringEnumTypeAnnotation', - default: 'fullScreen', - options: [ - { - name: 'fullScreen', - }, - { - name: 'pageSheet', - }, - { - name: 'formSheet', - }, - { - name: 'overFullScreen', - }, - ], - }, - }, - { - name: 'transparent', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'hardwareAccelerated', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'visible', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'animated', - optional: true, - typeAnnotation: { - type: 'BooleanTypeAnnotation', - default: false, - }, - }, - { - name: 'supportedOrientations', - optional: true, - typeAnnotation: { - type: 'ArrayTypeAnnotation', - elementType: { - type: 'StringEnumTypeAnnotation', - default: 'portrait', - options: [ - { - name: 'portrait', - }, - { - name: 'portrait-upside-down', - }, - { - name: 'landscape', - }, - { - name: 'landscape-left', - }, - { - name: 'landscape-right', - }, - ], - }, - }, - }, - { - name: 'identifier', - optional: true, - typeAnnotation: { - type: 'Int32TypeAnnotation', - default: 0, - }, - }, - ], - commands: [], - }, - }, - }, - }, -}; - -module.exports = ModalSchema;