Revert Slider and Activity indicator view configs
Summary: Reverting the generated view configs due to a potential issue Reviewed By: mdvacca Differential Revision: D15539319 fbshipit-source-id: bddf923dcfda18bd074196f06610fea8bb4561b4
This commit is contained in:
Родитель
71461cb3dd
Коммит
40625ceabf
|
@ -18,6 +18,8 @@ import type {
|
|||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
||||
|
||||
type NativeProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
|
||||
|
@ -61,4 +63,6 @@ type ActivityIndicatorNativeType = CodegenNativeComponent<
|
|||
Options,
|
||||
>;
|
||||
|
||||
module.exports = ((require('./ActivityIndicatorViewNativeViewConfig'): any): ActivityIndicatorNativeType);
|
||||
module.exports = ((requireNativeComponent(
|
||||
'RCTActivityIndicatorView',
|
||||
): any): ActivityIndicatorNativeType);
|
||||
|
|
|
@ -1,45 +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.
|
||||
*
|
||||
* @flow
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
|
||||
const ReactNativeViewViewConfig = require('ReactNativeViewViewConfig');
|
||||
const verifyComponentAttributeEquivalence = require('verifyComponentAttributeEquivalence');
|
||||
|
||||
const ActivityIndicatorViewViewConfig = {
|
||||
uiViewClassName: 'RCTActivityIndicatorView',
|
||||
Commands: {},
|
||||
|
||||
bubblingEventTypes: {
|
||||
...ReactNativeViewViewConfig.bubblingEventTypes,
|
||||
},
|
||||
|
||||
directEventTypes: {
|
||||
...ReactNativeViewViewConfig.directEventTypes,
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
...ReactNativeViewViewConfig.validAttributes,
|
||||
hidesWhenStopped: true,
|
||||
animating: true,
|
||||
color: { process: require('processColor') },
|
||||
size: true,
|
||||
},
|
||||
};
|
||||
|
||||
verifyComponentAttributeEquivalence('RCTActivityIndicatorView', ActivityIndicatorViewViewConfig);
|
||||
|
||||
ReactNativeViewConfigRegistry.register(
|
||||
'RCTActivityIndicatorView',
|
||||
() => ActivityIndicatorViewViewConfig,
|
||||
);
|
||||
|
||||
module.exports = 'RCTActivityIndicatorView'; // RCT prefix present for paper support
|
|
@ -22,6 +22,8 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
|||
import type {ImageSource} from '../../Image/ImageSource';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
||||
|
||||
type Event = $ReadOnly<{|
|
||||
value: Float,
|
||||
fromUser?: boolean,
|
||||
|
@ -59,4 +61,4 @@ type Options = {
|
|||
|
||||
type SliderType = CodegenNativeComponent<'Slider', NativeProps, Options>;
|
||||
|
||||
module.exports = ((require('SliderNativeViewConfig'): any): SliderType);
|
||||
module.exports = ((requireNativeComponent('RCTSlider'): any): SliderType);
|
||||
|
|
|
@ -1,76 +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.
|
||||
*
|
||||
* @flow
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
|
||||
const ReactNativeViewViewConfig = require('ReactNativeViewViewConfig');
|
||||
const verifyComponentAttributeEquivalence = require('verifyComponentAttributeEquivalence');
|
||||
|
||||
const SliderViewConfig = {
|
||||
uiViewClassName: 'RCTSlider',
|
||||
Commands: {},
|
||||
|
||||
bubblingEventTypes: {
|
||||
...ReactNativeViewViewConfig.bubblingEventTypes,
|
||||
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
|
||||
topValueChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onValueChangeCapture',
|
||||
bubbled: 'onValueChange',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
directEventTypes: {
|
||||
...ReactNativeViewViewConfig.directEventTypes,
|
||||
|
||||
topSlidingComplete: {
|
||||
registrationName: 'onSlidingComplete',
|
||||
},
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
...ReactNativeViewViewConfig.validAttributes,
|
||||
disabled: true,
|
||||
enabled: true,
|
||||
maximumTrackImage: { process: require('resolveAssetSource') },
|
||||
maximumTrackTintColor: { process: require('processColor') },
|
||||
maximumValue: true,
|
||||
minimumTrackImage: { process: require('resolveAssetSource') },
|
||||
minimumTrackTintColor: { process: require('processColor') },
|
||||
minimumValue: true,
|
||||
step: true,
|
||||
testID: true,
|
||||
thumbImage: { process: require('resolveAssetSource') },
|
||||
thumbTintColor: { process: require('processColor') },
|
||||
trackImage: { process: require('resolveAssetSource') },
|
||||
value: true,
|
||||
onChange: true,
|
||||
onValueChange: true,
|
||||
onSlidingComplete: true,
|
||||
},
|
||||
};
|
||||
|
||||
verifyComponentAttributeEquivalence('RCTSlider', SliderViewConfig);
|
||||
|
||||
ReactNativeViewConfigRegistry.register(
|
||||
'RCTSlider',
|
||||
() => SliderViewConfig,
|
||||
);
|
||||
|
||||
module.exports = 'RCTSlider'; // RCT prefix present for paper support
|
|
@ -23,11 +23,7 @@ const yargv = yargs.strict().option('t', {
|
|||
const argv = yargv.argv;
|
||||
const fileList = argv._[0].split('\n');
|
||||
|
||||
const CURRENT_VIEW_CONFIG_FILES = [
|
||||
'SliderNativeComponent.js',
|
||||
'ActivityIndicatorViewNativeComponent.js',
|
||||
'PullToRefreshViewNativeComponent.js',
|
||||
];
|
||||
const CURRENT_VIEW_CONFIG_FILES = [];
|
||||
|
||||
generate(
|
||||
fileList.filter(fileName =>
|
||||
|
|
Загрузка…
Ссылка в новой задаче