@office-iss/react-native-win32 0.68.0-preview.3 → 0.69.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +1 -3
- package/CHANGELOG.json +388 -22
- package/CHANGELOG.md +162 -13
- package/IntegrationTests/BUCK +4 -1
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -0
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
- package/Libraries/Alert/Alert.win32.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +1 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +55 -9
- package/Libraries/Animated/NativeAnimatedModule.js +1 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
- package/Libraries/Animated/animations/TimingAnimation.js +6 -11
- package/Libraries/Animated/createAnimatedComponent.js +2 -2
- package/Libraries/Animated/nodes/AnimatedColor.js +95 -29
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +19 -22
- package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/Blob/URL.js +7 -1
- package/Libraries/Components/Button.js +3 -0
- package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +47 -38
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +15 -7
- package/Libraries/Components/ScrollView/ScrollView.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +3 -1
- package/Libraries/Components/Slider/Slider.js +0 -2
- package/Libraries/Components/Slider/SliderNativeComponent.js +0 -1
- package/Libraries/Components/StatusBar/StatusBar.js +6 -1
- package/Libraries/Components/Switch/Switch.js +13 -2
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +114 -109
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +17 -9
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +13 -5
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
- package/Libraries/Components/TextInput/TextInput.js +1 -8
- package/Libraries/Components/TextInput/TextInputState.js +10 -2
- package/Libraries/Components/TextInput/TextInputState.win32.js +10 -2
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +7 -1
- package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +3 -1
- package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.win32.js +33 -1
- package/Libraries/Components/View/ViewNativeComponent.js +68 -8
- package/Libraries/Components/View/ViewPropTypes.js +36 -4
- package/Libraries/Components/View/ViewPropTypes.win32.js +36 -4
- package/Libraries/Components/View/ViewWin32.Props.d.ts +1 -1
- package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
- package/Libraries/Core/Devtools/parseHermesStack.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +1 -1
- package/Libraries/Core/RawEventEmitter.js +38 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/polyfillPromise.js +32 -0
- package/Libraries/Core/setUpReactDevTools.js +3 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +3 -3
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -1
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +3 -3
- package/Libraries/Events/CustomEvent.js +32 -0
- package/Libraries/Events/EventPolyfill.js +239 -0
- package/Libraries/Image/Image.android.js +0 -6
- package/Libraries/Image/Image.ios.js +0 -6
- package/Libraries/Image/Image.win32.js +2 -8
- package/Libraries/Image/ImageViewNativeComponent.js +18 -3
- package/Libraries/Image/TextInlineImageNativeComponent.js +23 -15
- package/Libraries/Image/resolveAssetSource.win32.js +1 -1
- package/Libraries/Inspector/Inspector.js +2 -4
- package/Libraries/Inspector/Inspector.win32.js +7 -9
- package/Libraries/Interaction/BridgeSpyStallHandler.js +4 -3
- package/Libraries/Interaction/InteractionManager.js +1 -12
- package/Libraries/Interaction/TaskQueue.js +5 -4
- package/Libraries/LayoutAnimation/LayoutAnimation.js +13 -0
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +27 -6
- package/Libraries/Lists/VirtualizedList.js +71 -55
- package/Libraries/Lists/VirtualizedListContext.js +7 -3
- package/Libraries/Lists/VirtualizedSectionList.js +2 -2
- package/Libraries/Lists/__tests__/{FillRateHelper-test.windows.js → FillRateHelper-test.js} +2 -2
- package/Libraries/Lists/__tests__/{FlatList-test.windows.js → FlatList-test.js} +2 -2
- package/Libraries/Lists/__tests__/{SectionList-test.windows.js → SectionList-test.js} +14 -14
- package/Libraries/Lists/__tests__/{VirtualizeUtils-test.windows.js → VirtualizeUtils-test.js} +3 -3
- package/Libraries/Lists/__tests__/{VirtualizedList-test.windows.js → VirtualizedList-test.js} +92 -43
- package/Libraries/Lists/__tests__/{VirtualizedSectionList-test.windows.js → VirtualizedSectionList-test.js} +16 -14
- package/Libraries/LogBox/Data/LogBoxData.js +2 -2
- package/Libraries/LogBox/Data/LogBoxLog.js +1 -1
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/LogBox.js +2 -21
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -0
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +2 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +295 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +333 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +334 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +0 -2
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +24 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +7 -42
- package/Libraries/NativeComponent/ViewConfig.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +54 -0
- package/Libraries/Network/FormData.js +7 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Pressability/Pressability.js +115 -46
- package/Libraries/Pressability/Pressability.win32.js +174 -69
- package/Libraries/Pressability/PressabilityDebug.js +5 -9
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/{DummyUIManager.js → BridgelessUIManager.js} +62 -40
- package/Libraries/ReactNative/PaperUIManager.win32.js +5 -5
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +39 -0
- package/Libraries/ReactNative/UIManager.js +2 -3
- package/Libraries/ReactNative/renderApplication.js +4 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +8 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +5908 -4906
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +2100 -1918
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +2567 -2352
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5610 -4844
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1710 -1556
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1830 -1639
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -1
- package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +59 -66
- package/Libraries/StyleSheet/normalizeColor.js +1 -1
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
- package/Libraries/StyleSheet/private/_TransformStyle.js +53 -0
- package/Libraries/Text/Text.js +13 -7
- package/Libraries/Text/TextNativeComponent.js +2 -0
- package/Libraries/Text/TextNativeComponent.win32.js +2 -0
- package/Libraries/Text/TextProps.js +10 -0
- package/Libraries/Types/CoreEventTypes.js +13 -1
- package/Libraries/Types/CoreEventTypes.win32.js +26 -1
- package/Libraries/Utilities/Appearance.js +0 -8
- package/Libraries/Utilities/HMRClient.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -0
- package/Libraries/Utilities/codegenNativeComponent.js +17 -6
- package/Libraries/Utilities/stringifySafe.js +4 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +3 -3
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/vendor/emitter/_EmitterSubscription.js +1 -1
- package/Libraries/vendor/emitter/_EventEmitter.js +1 -1
- package/Libraries/vendor/emitter/_EventSubscription.js +1 -1
- package/index.js +30 -25
- package/index.win32.js +30 -25
- package/jest/preprocessor.js +24 -107
- package/jest/preprocessor_DO_NOT_USE.js +122 -0
- package/metro.config.js +3 -47
- package/overrides.json +39 -46
- package/package.json +28 -27
- package/rntypes/index.d.ts +19 -7
- package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +1 -1
- package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +3 -1
- package/src/Libraries/Components/View/ViewWin32.Props.ts +1 -0
- package/src/Libraries/Lists/__tests__/__snapshots__/FlatList-test.js.snap +427 -0
- package/src/Libraries/Lists/__tests__/__snapshots__/SectionList-test.js.snap +391 -0
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +3 -0
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +4565 -0
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +1153 -0
- package/src/rntypes/index.d.ts +19 -7
- package/typings-index.js +5 -1
- package/typings-index.js.map +1 -1
- package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -44
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -45
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.js +0 -45
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -360
- package/Libraries/Components/View/ReactNativeViewViewConfig.win32.js +0 -401
- package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
- package/Libraries/ReactNative/UIManagerInjection.js +0 -15
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -24527
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -8309
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8961
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -24948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -8400
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -9049
- package/flow/Promise.js +0 -47
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @flow
|
|
7
|
+
* @flow strict
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -75,24 +75,6 @@ if (__DEV__) {
|
|
|
75
75
|
consoleErrorImpl = registerError;
|
|
76
76
|
consoleWarnImpl = registerWarning;
|
|
77
77
|
|
|
78
|
-
if ((console: any).disableYellowBox === true) {
|
|
79
|
-
LogBoxData.setDisabled(true);
|
|
80
|
-
console.warn(
|
|
81
|
-
'console.disableYellowBox has been deprecated and will be removed in a future release. Please use LogBox.ignoreAllLogs(value) instead.',
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
(Object.defineProperty: any)(console, 'disableYellowBox', {
|
|
86
|
-
configurable: true,
|
|
87
|
-
get: () => LogBoxData.isDisabled(),
|
|
88
|
-
set: value => {
|
|
89
|
-
LogBoxData.setDisabled(value);
|
|
90
|
-
console.warn(
|
|
91
|
-
'console.disableYellowBox has been deprecated and will be removed in a future release. Please use LogBox.ignoreAllLogs(value) instead.',
|
|
92
|
-
);
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
|
|
96
78
|
if (Platform.isTesting) {
|
|
97
79
|
LogBoxData.setDisabled(true);
|
|
98
80
|
}
|
|
@@ -115,7 +97,6 @@ if (__DEV__) {
|
|
|
115
97
|
// After uninstalling: original > LogBox (noop) > OtherErrorHandler
|
|
116
98
|
consoleErrorImpl = originalConsoleError;
|
|
117
99
|
consoleWarnImpl = originalConsoleWarn;
|
|
118
|
-
delete (console: any).disableLogBox;
|
|
119
100
|
},
|
|
120
101
|
|
|
121
102
|
isInstalled(): boolean {
|
|
@@ -153,7 +134,7 @@ if (__DEV__) {
|
|
|
153
134
|
return typeof args[0] === 'string' && args[0].startsWith('(ADVICE)');
|
|
154
135
|
};
|
|
155
136
|
|
|
156
|
-
const isWarningModuleWarning = (...args:
|
|
137
|
+
const isWarningModuleWarning = (...args: Array<mixed>) => {
|
|
157
138
|
return typeof args[0] === 'string' && args[0].startsWith('Warning: ');
|
|
158
139
|
};
|
|
159
140
|
|
|
@@ -18,6 +18,7 @@ import StatusBar from '../../Components/StatusBar/StatusBar';
|
|
|
18
18
|
import LogBoxButton from './LogBoxButton';
|
|
19
19
|
import * as LogBoxStyle from './LogBoxStyle';
|
|
20
20
|
import type {LogLevel} from '../Data/LogBoxLog';
|
|
21
|
+
import type {ImageSource} from '../../Image/ImageSource';
|
|
21
22
|
type Props = $ReadOnly<{|
|
|
22
23
|
onSelectIndex: (selectedIndex: number) => void,
|
|
23
24
|
selectedIndex: number,
|
|
@@ -91,7 +92,7 @@ const backgroundForLevel = (level: LogLevel) =>
|
|
|
91
92
|
function LogBoxInspectorHeaderButton(
|
|
92
93
|
props: $ReadOnly<{|
|
|
93
94
|
disabled: boolean,
|
|
94
|
-
image:
|
|
95
|
+
image: ImageSource,
|
|
95
96
|
level: LogLevel,
|
|
96
97
|
onPress?: ?() => void,
|
|
97
98
|
|}>,
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @flow strict-local
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {DynamicallyInjectedByGestureHandler} from './ViewConfigIgnore';
|
|
12
|
+
import ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes';
|
|
13
|
+
import type {PartialViewConfigWithoutName} from './PlatformBaseViewConfig';
|
|
14
|
+
|
|
15
|
+
const bubblingEventTypes = {
|
|
16
|
+
// Bubbling events from UIManagerModuleConstants.java
|
|
17
|
+
topChange: {
|
|
18
|
+
phasedRegistrationNames: {
|
|
19
|
+
captured: 'onChangeCapture',
|
|
20
|
+
bubbled: 'onChange',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
topSelect: {
|
|
24
|
+
phasedRegistrationNames: {
|
|
25
|
+
captured: 'onSelectCapture',
|
|
26
|
+
bubbled: 'onSelect',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
topTouchEnd: {
|
|
30
|
+
phasedRegistrationNames: {
|
|
31
|
+
captured: 'onTouchEndCapture',
|
|
32
|
+
bubbled: 'onTouchEnd',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
topTouchCancel: {
|
|
36
|
+
phasedRegistrationNames: {
|
|
37
|
+
captured: 'onTouchCancelCapture',
|
|
38
|
+
bubbled: 'onTouchCancel',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
topTouchStart: {
|
|
42
|
+
phasedRegistrationNames: {
|
|
43
|
+
captured: 'onTouchStartCapture',
|
|
44
|
+
bubbled: 'onTouchStart',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
topTouchMove: {
|
|
48
|
+
phasedRegistrationNames: {
|
|
49
|
+
captured: 'onTouchMoveCapture',
|
|
50
|
+
bubbled: 'onTouchMove',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
// Experimental/Work in Progress Pointer Events (not yet ready for use)
|
|
55
|
+
topPointerCancel: {
|
|
56
|
+
phasedRegistrationNames: {
|
|
57
|
+
captured: 'onPointerCancelCapture',
|
|
58
|
+
bubbled: 'onPointerCancel',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
topPointerDown: {
|
|
62
|
+
phasedRegistrationNames: {
|
|
63
|
+
captured: 'onPointerDownCapture',
|
|
64
|
+
bubbled: 'onPointerDown',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
topPointerEnter2: {
|
|
68
|
+
phasedRegistrationNames: {
|
|
69
|
+
captured: 'onPointerEnter2Capture',
|
|
70
|
+
bubbled: 'onPointerEnter2',
|
|
71
|
+
skipBubbling: true,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
topPointerLeave2: {
|
|
75
|
+
phasedRegistrationNames: {
|
|
76
|
+
captured: 'onPointerLeave2Capture',
|
|
77
|
+
bubbled: 'onPointerLeave2',
|
|
78
|
+
skipBubbling: true,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
topPointerMove2: {
|
|
82
|
+
phasedRegistrationNames: {
|
|
83
|
+
captured: 'onPointerMove2Capture',
|
|
84
|
+
bubbled: 'onPointerMove2',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
topPointerUp: {
|
|
88
|
+
phasedRegistrationNames: {
|
|
89
|
+
captured: 'onPointerUpCapture',
|
|
90
|
+
bubbled: 'onPointerUp',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const directEventTypes = {
|
|
96
|
+
topAccessibilityAction: {
|
|
97
|
+
registrationName: 'onAccessibilityAction',
|
|
98
|
+
},
|
|
99
|
+
topPointerEnter: {
|
|
100
|
+
registrationName: 'onPointerEnter',
|
|
101
|
+
},
|
|
102
|
+
topPointerLeave: {
|
|
103
|
+
registrationName: 'onPointerLeave',
|
|
104
|
+
},
|
|
105
|
+
topPointerMove: {
|
|
106
|
+
registrationName: 'onPointerMove',
|
|
107
|
+
},
|
|
108
|
+
onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({
|
|
109
|
+
registrationName: 'onGestureHandlerEvent',
|
|
110
|
+
}),
|
|
111
|
+
onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({
|
|
112
|
+
registrationName: 'onGestureHandlerStateChange',
|
|
113
|
+
}),
|
|
114
|
+
|
|
115
|
+
// Direct events from UIManagerModuleConstants.java
|
|
116
|
+
topContentSizeChange: {
|
|
117
|
+
registrationName: 'onContentSizeChange',
|
|
118
|
+
},
|
|
119
|
+
topScrollBeginDrag: {
|
|
120
|
+
registrationName: 'onScrollBeginDrag',
|
|
121
|
+
},
|
|
122
|
+
topMessage: {
|
|
123
|
+
registrationName: 'onMessage',
|
|
124
|
+
},
|
|
125
|
+
topSelectionChange: {
|
|
126
|
+
registrationName: 'onSelectionChange',
|
|
127
|
+
},
|
|
128
|
+
topLoadingFinish: {
|
|
129
|
+
registrationName: 'onLoadingFinish',
|
|
130
|
+
},
|
|
131
|
+
topMomentumScrollEnd: {
|
|
132
|
+
registrationName: 'onMomentumScrollEnd',
|
|
133
|
+
},
|
|
134
|
+
topClick: {
|
|
135
|
+
registrationName: 'onClick',
|
|
136
|
+
},
|
|
137
|
+
topLoadingStart: {
|
|
138
|
+
registrationName: 'onLoadingStart',
|
|
139
|
+
},
|
|
140
|
+
topLoadingError: {
|
|
141
|
+
registrationName: 'onLoadingError',
|
|
142
|
+
},
|
|
143
|
+
topMomentumScrollBegin: {
|
|
144
|
+
registrationName: 'onMomentumScrollBegin',
|
|
145
|
+
},
|
|
146
|
+
topScrollEndDrag: {
|
|
147
|
+
registrationName: 'onScrollEndDrag',
|
|
148
|
+
},
|
|
149
|
+
topScroll: {
|
|
150
|
+
registrationName: 'onScroll',
|
|
151
|
+
},
|
|
152
|
+
topLayout: {
|
|
153
|
+
registrationName: 'onLayout',
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const validAttributesForNonEventProps = {
|
|
158
|
+
// @ReactProps from BaseViewManager
|
|
159
|
+
backgroundColor: {process: require('../StyleSheet/processColor')},
|
|
160
|
+
transform: true,
|
|
161
|
+
opacity: true,
|
|
162
|
+
elevation: true,
|
|
163
|
+
shadowColor: {process: require('../StyleSheet/processColor')},
|
|
164
|
+
zIndex: true,
|
|
165
|
+
renderToHardwareTextureAndroid: true,
|
|
166
|
+
testID: true,
|
|
167
|
+
nativeID: true,
|
|
168
|
+
accessibilityLabelledBy: true,
|
|
169
|
+
accessibilityLabel: true,
|
|
170
|
+
accessibilityHint: true,
|
|
171
|
+
accessibilityRole: true,
|
|
172
|
+
accessibilityState: true,
|
|
173
|
+
accessibilityActions: true,
|
|
174
|
+
accessibilityValue: true,
|
|
175
|
+
importantForAccessibility: true,
|
|
176
|
+
rotation: true,
|
|
177
|
+
scaleX: true,
|
|
178
|
+
scaleY: true,
|
|
179
|
+
translateX: true,
|
|
180
|
+
translateY: true,
|
|
181
|
+
accessibilityLiveRegion: true,
|
|
182
|
+
|
|
183
|
+
// @ReactProps from LayoutShadowNode
|
|
184
|
+
width: true,
|
|
185
|
+
minWidth: true,
|
|
186
|
+
collapsable: true,
|
|
187
|
+
maxWidth: true,
|
|
188
|
+
height: true,
|
|
189
|
+
minHeight: true,
|
|
190
|
+
maxHeight: true,
|
|
191
|
+
flex: true,
|
|
192
|
+
flexGrow: true,
|
|
193
|
+
flexShrink: true,
|
|
194
|
+
flexBasis: true,
|
|
195
|
+
aspectRatio: true,
|
|
196
|
+
flexDirection: true,
|
|
197
|
+
flexWrap: true,
|
|
198
|
+
alignSelf: true,
|
|
199
|
+
alignItems: true,
|
|
200
|
+
alignContent: true,
|
|
201
|
+
justifyContent: true,
|
|
202
|
+
overflow: true,
|
|
203
|
+
display: true,
|
|
204
|
+
|
|
205
|
+
margin: true,
|
|
206
|
+
marginVertical: true,
|
|
207
|
+
marginHorizontal: true,
|
|
208
|
+
marginStart: true,
|
|
209
|
+
marginEnd: true,
|
|
210
|
+
marginTop: true,
|
|
211
|
+
marginBottom: true,
|
|
212
|
+
marginLeft: true,
|
|
213
|
+
marginRight: true,
|
|
214
|
+
|
|
215
|
+
padding: true,
|
|
216
|
+
paddingVertical: true,
|
|
217
|
+
paddingHorizontal: true,
|
|
218
|
+
paddingStart: true,
|
|
219
|
+
paddingEnd: true,
|
|
220
|
+
paddingTop: true,
|
|
221
|
+
paddingBottom: true,
|
|
222
|
+
paddingLeft: true,
|
|
223
|
+
paddingRight: true,
|
|
224
|
+
|
|
225
|
+
borderWidth: true,
|
|
226
|
+
borderStartWidth: true,
|
|
227
|
+
borderEndWidth: true,
|
|
228
|
+
borderTopWidth: true,
|
|
229
|
+
borderBottomWidth: true,
|
|
230
|
+
borderLeftWidth: true,
|
|
231
|
+
borderRightWidth: true,
|
|
232
|
+
|
|
233
|
+
start: true,
|
|
234
|
+
end: true,
|
|
235
|
+
left: true,
|
|
236
|
+
right: true,
|
|
237
|
+
top: true,
|
|
238
|
+
bottom: true,
|
|
239
|
+
|
|
240
|
+
position: true,
|
|
241
|
+
|
|
242
|
+
style: ReactNativeStyleAttributes,
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
// Props for bubbling and direct events
|
|
246
|
+
const validAttributesForEventProps = {
|
|
247
|
+
onLayout: true,
|
|
248
|
+
|
|
249
|
+
// PanResponder handlers
|
|
250
|
+
onMoveShouldSetResponder: true,
|
|
251
|
+
onMoveShouldSetResponderCapture: true,
|
|
252
|
+
onStartShouldSetResponder: true,
|
|
253
|
+
onStartShouldSetResponderCapture: true,
|
|
254
|
+
onResponderGrant: true,
|
|
255
|
+
onResponderReject: true,
|
|
256
|
+
onResponderStart: true,
|
|
257
|
+
onResponderEnd: true,
|
|
258
|
+
onResponderRelease: true,
|
|
259
|
+
onResponderMove: true,
|
|
260
|
+
onResponderTerminate: true,
|
|
261
|
+
onResponderTerminationRequest: true,
|
|
262
|
+
onShouldBlockNativeResponder: true,
|
|
263
|
+
|
|
264
|
+
// Touch events
|
|
265
|
+
onTouchStart: true,
|
|
266
|
+
onTouchMove: true,
|
|
267
|
+
onTouchEnd: true,
|
|
268
|
+
onTouchCancel: true,
|
|
269
|
+
|
|
270
|
+
// Pointer events
|
|
271
|
+
onPointerEnter: true,
|
|
272
|
+
onPointerLeave: true,
|
|
273
|
+
onPointerMove: true,
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* On Android, Props are derived from a ViewManager and its ShadowNode.
|
|
278
|
+
*
|
|
279
|
+
* Where did we find these base platform props from?
|
|
280
|
+
* - Nearly all component ViewManagers descend from BaseViewManager,
|
|
281
|
+
* - and BaseViewManagers' ShadowNodes descend from LayoutShadowNode.
|
|
282
|
+
* - Also, all components inherit ViewConfigs from UIManagerModuleConstants.java.
|
|
283
|
+
*
|
|
284
|
+
* So, these ViewConfigs are generated from LayoutShadowNode and BaseViewManager.
|
|
285
|
+
*/
|
|
286
|
+
const PlatformBaseViewConfigAndroid: PartialViewConfigWithoutName = {
|
|
287
|
+
directEventTypes,
|
|
288
|
+
bubblingEventTypes,
|
|
289
|
+
validAttributes: {
|
|
290
|
+
...validAttributesForNonEventProps,
|
|
291
|
+
...validAttributesForEventProps,
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export default PlatformBaseViewConfigAndroid;
|