@react-native-oh/react-native-harmony 0.72.23 → 0.72.27
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/Libraries/Alert/Alert.harmony.js +71 -71
- package/Libraries/Alert/AlertManager.ts +35 -35
- package/Libraries/Animated/NativeAnimatedHelper.harmony.js +601 -601
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.harmony.js +445 -426
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.harmony.js +30 -0
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.harmony.js +26 -0
- package/Libraries/Components/Button/Button.harmony.js +450 -450
- package/Libraries/Components/Image/Image.flow.harmony.js +53 -0
- package/Libraries/Components/Image/Image.harmony.js +299 -0
- package/Libraries/Components/Image/NativeImageLoaderHarmony.js +38 -0
- package/Libraries/Components/RefreshControl/RefreshControl.harmony.js +210 -208
- package/Libraries/Components/SafeAreaView/SafeAreaView.harmony.tsx +76 -75
- package/Libraries/Components/ScrollView/ScrollView.harmony.js +1951 -1930
- package/Libraries/Components/ScrollView/processDecelerationRate.harmony.js +24 -24
- package/Libraries/Components/StatusBar/NativeStatusBarManagerHarmony.js +71 -68
- package/Libraries/Components/StatusBar/StatusBar.harmony.js +447 -447
- package/Libraries/Components/TextInput/TextInput.harmony.js +1707 -1697
- package/Libraries/Components/TextInput/TextInputState.harmony.js +220 -220
- package/Libraries/Components/Touchable/TouchableHighlight.harmony.js +396 -396
- package/Libraries/Components/Touchable/TouchableNativeFeedback.harmony.js +364 -364
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.harmony.js +227 -227
- package/Libraries/Components/View/View.harmony.js +149 -149
- package/Libraries/Core/setUpReactDevTools.harmony.js +93 -93
- package/Libraries/Image/AssetSourceResolver.harmony.ts +78 -78
- package/Libraries/NativeComponent/BaseViewConfig.harmony.js +337 -337
- package/Libraries/ReactNative/UIManager.harmony.js +210 -210
- package/Libraries/Settings/Settings.harmony.js +15 -15
- package/Libraries/Share/Share.harmony.js +174 -0
- package/Libraries/StyleSheet/NativePlatformColor.ts +8 -8
- package/Libraries/StyleSheet/PlatformColorValueTypes.harmony.ts +14 -14
- package/Libraries/Utilities/BackHandler.harmony.js +109 -109
- package/Libraries/Utilities/{NativePlatformConstantsHarmony.ts → NativePlatformConstants.harmony.ts} +8 -8
- package/Libraries/Utilities/Platform.d.ts +117 -117
- package/Libraries/Utilities/Platform.harmony.ts +33 -33
- package/Libraries/Utilities/createPerformanceLogger.harmony.js +328 -328
- package/Libraries/Vibration/Vibration.harmony.js +88 -88
- package/index.js +212 -202
- package/jest.config.js +5 -5
- package/metro.config.js +348 -349
- package/package.json +58 -55
- package/react-native.config.js +10 -10
- package/{rnoh-4.1.0.404-vmall.har → react_native_openharmony.har} +0 -0
- package/tsconfig.json +13 -13
- package/types/index.d.ts +101 -101
|
@@ -1,337 +1,337 @@
|
|
|
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
|
-
// RNOH - added missing .harmony file
|
|
12
|
-
|
|
13
|
-
import type {PartialViewConfigWithoutName} from 'react-native/Libraries/NativeComponent/PlatformBaseViewConfig';
|
|
14
|
-
|
|
15
|
-
import ReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
|
|
16
|
-
import {DynamicallyInjectedByGestureHandler} from 'react-native/Libraries/NativeComponent/ViewConfigIgnore';
|
|
17
|
-
|
|
18
|
-
const bubblingEventTypes = {
|
|
19
|
-
// Bubbling events from UIManagerModuleConstants.java
|
|
20
|
-
topChange: {
|
|
21
|
-
phasedRegistrationNames: {
|
|
22
|
-
captured: 'onChangeCapture',
|
|
23
|
-
bubbled: 'onChange',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
topFocus: {
|
|
27
|
-
phasedRegistrationNames: {
|
|
28
|
-
bubbled: 'onFocus',
|
|
29
|
-
captured: 'onFocusCapture',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
topBlur: {
|
|
33
|
-
phasedRegistrationNames: {
|
|
34
|
-
bubbled: 'onBlur',
|
|
35
|
-
captured: 'onBlurCapture',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
topSelect: {
|
|
39
|
-
phasedRegistrationNames: {
|
|
40
|
-
captured: 'onSelectCapture',
|
|
41
|
-
bubbled: 'onSelect',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
topTouchEnd: {
|
|
45
|
-
phasedRegistrationNames: {
|
|
46
|
-
captured: 'onTouchEndCapture',
|
|
47
|
-
bubbled: 'onTouchEnd',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
topTouchCancel: {
|
|
51
|
-
phasedRegistrationNames: {
|
|
52
|
-
captured: 'onTouchCancelCapture',
|
|
53
|
-
bubbled: 'onTouchCancel',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
topTouchStart: {
|
|
57
|
-
phasedRegistrationNames: {
|
|
58
|
-
captured: 'onTouchStartCapture',
|
|
59
|
-
bubbled: 'onTouchStart',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
topTouchMove: {
|
|
63
|
-
phasedRegistrationNames: {
|
|
64
|
-
captured: 'onTouchMoveCapture',
|
|
65
|
-
bubbled: 'onTouchMove',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
// Experimental/Work in Progress Pointer Events (not yet ready for use)
|
|
70
|
-
topPointerCancel: {
|
|
71
|
-
phasedRegistrationNames: {
|
|
72
|
-
captured: 'onPointerCancelCapture',
|
|
73
|
-
bubbled: 'onPointerCancel',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
topPointerDown: {
|
|
77
|
-
phasedRegistrationNames: {
|
|
78
|
-
captured: 'onPointerDownCapture',
|
|
79
|
-
bubbled: 'onPointerDown',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
topPointerEnter: {
|
|
83
|
-
phasedRegistrationNames: {
|
|
84
|
-
captured: 'onPointerEnterCapture',
|
|
85
|
-
bubbled: 'onPointerEnter',
|
|
86
|
-
skipBubbling: true,
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
topPointerLeave: {
|
|
90
|
-
phasedRegistrationNames: {
|
|
91
|
-
captured: 'onPointerLeaveCapture',
|
|
92
|
-
bubbled: 'onPointerLeave',
|
|
93
|
-
skipBubbling: true,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
topPointerMove: {
|
|
97
|
-
phasedRegistrationNames: {
|
|
98
|
-
captured: 'onPointerMoveCapture',
|
|
99
|
-
bubbled: 'onPointerMove',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
topPointerUp: {
|
|
103
|
-
phasedRegistrationNames: {
|
|
104
|
-
captured: 'onPointerUpCapture',
|
|
105
|
-
bubbled: 'onPointerUp',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
topPointerOut: {
|
|
109
|
-
phasedRegistrationNames: {
|
|
110
|
-
captured: 'onPointerOutCapture',
|
|
111
|
-
bubbled: 'onPointerOut',
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
topPointerOver: {
|
|
115
|
-
phasedRegistrationNames: {
|
|
116
|
-
captured: 'onPointerOverCapture',
|
|
117
|
-
bubbled: 'onPointerOver',
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const directEventTypes = {
|
|
123
|
-
topAccessibilityAction: {
|
|
124
|
-
registrationName: 'onAccessibilityAction',
|
|
125
|
-
},
|
|
126
|
-
onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({
|
|
127
|
-
registrationName: 'onGestureHandlerEvent',
|
|
128
|
-
}),
|
|
129
|
-
onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({
|
|
130
|
-
registrationName: 'onGestureHandlerStateChange',
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
// Direct events from UIManagerModuleConstants.java
|
|
134
|
-
topContentSizeChange: {
|
|
135
|
-
registrationName: 'onContentSizeChange',
|
|
136
|
-
},
|
|
137
|
-
topScrollBeginDrag: {
|
|
138
|
-
registrationName: 'onScrollBeginDrag',
|
|
139
|
-
},
|
|
140
|
-
topMessage: {
|
|
141
|
-
registrationName: 'onMessage',
|
|
142
|
-
},
|
|
143
|
-
topSelectionChange: {
|
|
144
|
-
registrationName: 'onSelectionChange',
|
|
145
|
-
},
|
|
146
|
-
topLoadingFinish: {
|
|
147
|
-
registrationName: 'onLoadingFinish',
|
|
148
|
-
},
|
|
149
|
-
topMomentumScrollEnd: {
|
|
150
|
-
registrationName: 'onMomentumScrollEnd',
|
|
151
|
-
},
|
|
152
|
-
topClick: {
|
|
153
|
-
registrationName: 'onClick',
|
|
154
|
-
},
|
|
155
|
-
topLoadingStart: {
|
|
156
|
-
registrationName: 'onLoadingStart',
|
|
157
|
-
},
|
|
158
|
-
topLoadingError: {
|
|
159
|
-
registrationName: 'onLoadingError',
|
|
160
|
-
},
|
|
161
|
-
topMomentumScrollBegin: {
|
|
162
|
-
registrationName: 'onMomentumScrollBegin',
|
|
163
|
-
},
|
|
164
|
-
topScrollEndDrag: {
|
|
165
|
-
registrationName: 'onScrollEndDrag',
|
|
166
|
-
},
|
|
167
|
-
topScroll: {
|
|
168
|
-
registrationName: 'onScroll',
|
|
169
|
-
},
|
|
170
|
-
topLayout: {
|
|
171
|
-
registrationName: 'onLayout',
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
const validAttributesForNonEventProps = {
|
|
176
|
-
// @ReactProps from BaseViewManager
|
|
177
|
-
backgroundColor: {process: require('react-native/Libraries/StyleSheet/processColor').default},
|
|
178
|
-
transform: true,
|
|
179
|
-
opacity: true,
|
|
180
|
-
elevation: true,
|
|
181
|
-
shadowColor: {process: require('react-native/Libraries/StyleSheet/processColor').default},
|
|
182
|
-
zIndex: true,
|
|
183
|
-
renderToHardwareTextureAndroid: true,
|
|
184
|
-
testID: true,
|
|
185
|
-
nativeID: true,
|
|
186
|
-
accessibilityLabelledBy: true,
|
|
187
|
-
accessibilityLabel: true,
|
|
188
|
-
accessibilityHint: true,
|
|
189
|
-
accessibilityRole: true,
|
|
190
|
-
accessibilityCollection: true,
|
|
191
|
-
accessibilityCollectionItem: true,
|
|
192
|
-
accessibilityState: true,
|
|
193
|
-
accessibilityActions: true,
|
|
194
|
-
accessibilityValue: true,
|
|
195
|
-
importantForAccessibility: true,
|
|
196
|
-
rotation: true,
|
|
197
|
-
scaleX: true,
|
|
198
|
-
scaleY: true,
|
|
199
|
-
translateX: true,
|
|
200
|
-
translateY: true,
|
|
201
|
-
accessibilityLiveRegion: true,
|
|
202
|
-
|
|
203
|
-
// @ReactProps from LayoutShadowNode
|
|
204
|
-
width: true,
|
|
205
|
-
minWidth: true,
|
|
206
|
-
collapsable: true,
|
|
207
|
-
maxWidth: true,
|
|
208
|
-
height: true,
|
|
209
|
-
minHeight: true,
|
|
210
|
-
maxHeight: true,
|
|
211
|
-
flex: true,
|
|
212
|
-
flexGrow: true,
|
|
213
|
-
rowGap: true,
|
|
214
|
-
columnGap: true,
|
|
215
|
-
gap: true,
|
|
216
|
-
flexShrink: true,
|
|
217
|
-
flexBasis: true,
|
|
218
|
-
aspectRatio: true,
|
|
219
|
-
flexDirection: true,
|
|
220
|
-
flexWrap: true,
|
|
221
|
-
alignSelf: true,
|
|
222
|
-
alignItems: true,
|
|
223
|
-
alignContent: true,
|
|
224
|
-
justifyContent: true,
|
|
225
|
-
overflow: true,
|
|
226
|
-
display: true,
|
|
227
|
-
|
|
228
|
-
margin: true,
|
|
229
|
-
marginBlock: true,
|
|
230
|
-
marginBlockEnd: true,
|
|
231
|
-
marginBlockStart: true,
|
|
232
|
-
marginBottom: true,
|
|
233
|
-
marginEnd: true,
|
|
234
|
-
marginHorizontal: true,
|
|
235
|
-
marginInline: true,
|
|
236
|
-
marginInlineEnd: true,
|
|
237
|
-
marginInlineStart: true,
|
|
238
|
-
marginLeft: true,
|
|
239
|
-
marginRight: true,
|
|
240
|
-
marginStart: true,
|
|
241
|
-
marginTop: true,
|
|
242
|
-
marginVertical: true,
|
|
243
|
-
|
|
244
|
-
padding: true,
|
|
245
|
-
paddingBlock: true,
|
|
246
|
-
paddingBlockEnd: true,
|
|
247
|
-
paddingBlockStart: true,
|
|
248
|
-
paddingBottom: true,
|
|
249
|
-
paddingEnd: true,
|
|
250
|
-
paddingHorizontal: true,
|
|
251
|
-
paddingInline: true,
|
|
252
|
-
paddingInlineEnd: true,
|
|
253
|
-
paddingInlineStart: true,
|
|
254
|
-
paddingLeft: true,
|
|
255
|
-
paddingRight: true,
|
|
256
|
-
paddingStart: true,
|
|
257
|
-
paddingTop: true,
|
|
258
|
-
paddingVertical: true,
|
|
259
|
-
|
|
260
|
-
borderWidth: true,
|
|
261
|
-
borderStartWidth: true,
|
|
262
|
-
borderEndWidth: true,
|
|
263
|
-
borderTopWidth: true,
|
|
264
|
-
borderBottomWidth: true,
|
|
265
|
-
borderLeftWidth: true,
|
|
266
|
-
borderRightWidth: true,
|
|
267
|
-
|
|
268
|
-
start: true,
|
|
269
|
-
end: true,
|
|
270
|
-
left: true,
|
|
271
|
-
right: true,
|
|
272
|
-
top: true,
|
|
273
|
-
bottom: true,
|
|
274
|
-
|
|
275
|
-
position: true,
|
|
276
|
-
|
|
277
|
-
style: ReactNativeStyleAttributes,
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
// Props for bubbling and direct events
|
|
281
|
-
const validAttributesForEventProps = {
|
|
282
|
-
onLayout: true,
|
|
283
|
-
|
|
284
|
-
// PanResponder handlers
|
|
285
|
-
onMoveShouldSetResponder: true,
|
|
286
|
-
onMoveShouldSetResponderCapture: true,
|
|
287
|
-
onStartShouldSetResponder: true,
|
|
288
|
-
onStartShouldSetResponderCapture: true,
|
|
289
|
-
onResponderGrant: true,
|
|
290
|
-
onResponderReject: true,
|
|
291
|
-
onResponderStart: true,
|
|
292
|
-
onResponderEnd: true,
|
|
293
|
-
onResponderRelease: true,
|
|
294
|
-
onResponderMove: true,
|
|
295
|
-
onResponderTerminate: true,
|
|
296
|
-
onResponderTerminationRequest: true,
|
|
297
|
-
onShouldBlockNativeResponder: true,
|
|
298
|
-
|
|
299
|
-
// Touch events
|
|
300
|
-
onTouchStart: true,
|
|
301
|
-
onTouchMove: true,
|
|
302
|
-
onTouchEnd: true,
|
|
303
|
-
onTouchCancel: true,
|
|
304
|
-
|
|
305
|
-
// Pointer events
|
|
306
|
-
onPointerEnter: true,
|
|
307
|
-
onPointerEnterCapture: true,
|
|
308
|
-
onPointerLeave: true,
|
|
309
|
-
onPointerLeaveCapture: true,
|
|
310
|
-
onPointerMove: true,
|
|
311
|
-
onPointerMoveCapture: true,
|
|
312
|
-
onPointerOut: true,
|
|
313
|
-
onPointerOutCapture: true,
|
|
314
|
-
onPointerOver: true,
|
|
315
|
-
onPointerOverCapture: true,
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* On Android, Props are derived from a ViewManager and its ShadowNode.
|
|
320
|
-
*
|
|
321
|
-
* Where did we find these base platform props from?
|
|
322
|
-
* - Nearly all component ViewManagers descend from BaseViewManager,
|
|
323
|
-
* - and BaseViewManagers' ShadowNodes descend from LayoutShadowNode.
|
|
324
|
-
* - Also, all components inherit ViewConfigs from UIManagerModuleConstants.java.
|
|
325
|
-
*
|
|
326
|
-
* So, these ViewConfigs are generated from LayoutShadowNode and BaseViewManager.
|
|
327
|
-
*/
|
|
328
|
-
const PlatformBaseViewConfigAndroid: PartialViewConfigWithoutName = {
|
|
329
|
-
directEventTypes,
|
|
330
|
-
bubblingEventTypes,
|
|
331
|
-
validAttributes: {
|
|
332
|
-
...validAttributesForNonEventProps,
|
|
333
|
-
...validAttributesForEventProps,
|
|
334
|
-
},
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
export default PlatformBaseViewConfigAndroid;
|
|
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
|
+
// RNOH - added missing .harmony file
|
|
12
|
+
|
|
13
|
+
import type {PartialViewConfigWithoutName} from 'react-native/Libraries/NativeComponent/PlatformBaseViewConfig';
|
|
14
|
+
|
|
15
|
+
import ReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
|
|
16
|
+
import {DynamicallyInjectedByGestureHandler} from 'react-native/Libraries/NativeComponent/ViewConfigIgnore';
|
|
17
|
+
|
|
18
|
+
const bubblingEventTypes = {
|
|
19
|
+
// Bubbling events from UIManagerModuleConstants.java
|
|
20
|
+
topChange: {
|
|
21
|
+
phasedRegistrationNames: {
|
|
22
|
+
captured: 'onChangeCapture',
|
|
23
|
+
bubbled: 'onChange',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
topFocus: {
|
|
27
|
+
phasedRegistrationNames: {
|
|
28
|
+
bubbled: 'onFocus',
|
|
29
|
+
captured: 'onFocusCapture',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
topBlur: {
|
|
33
|
+
phasedRegistrationNames: {
|
|
34
|
+
bubbled: 'onBlur',
|
|
35
|
+
captured: 'onBlurCapture',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
topSelect: {
|
|
39
|
+
phasedRegistrationNames: {
|
|
40
|
+
captured: 'onSelectCapture',
|
|
41
|
+
bubbled: 'onSelect',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
topTouchEnd: {
|
|
45
|
+
phasedRegistrationNames: {
|
|
46
|
+
captured: 'onTouchEndCapture',
|
|
47
|
+
bubbled: 'onTouchEnd',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
topTouchCancel: {
|
|
51
|
+
phasedRegistrationNames: {
|
|
52
|
+
captured: 'onTouchCancelCapture',
|
|
53
|
+
bubbled: 'onTouchCancel',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
topTouchStart: {
|
|
57
|
+
phasedRegistrationNames: {
|
|
58
|
+
captured: 'onTouchStartCapture',
|
|
59
|
+
bubbled: 'onTouchStart',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
topTouchMove: {
|
|
63
|
+
phasedRegistrationNames: {
|
|
64
|
+
captured: 'onTouchMoveCapture',
|
|
65
|
+
bubbled: 'onTouchMove',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
// Experimental/Work in Progress Pointer Events (not yet ready for use)
|
|
70
|
+
topPointerCancel: {
|
|
71
|
+
phasedRegistrationNames: {
|
|
72
|
+
captured: 'onPointerCancelCapture',
|
|
73
|
+
bubbled: 'onPointerCancel',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
topPointerDown: {
|
|
77
|
+
phasedRegistrationNames: {
|
|
78
|
+
captured: 'onPointerDownCapture',
|
|
79
|
+
bubbled: 'onPointerDown',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
topPointerEnter: {
|
|
83
|
+
phasedRegistrationNames: {
|
|
84
|
+
captured: 'onPointerEnterCapture',
|
|
85
|
+
bubbled: 'onPointerEnter',
|
|
86
|
+
skipBubbling: true,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
topPointerLeave: {
|
|
90
|
+
phasedRegistrationNames: {
|
|
91
|
+
captured: 'onPointerLeaveCapture',
|
|
92
|
+
bubbled: 'onPointerLeave',
|
|
93
|
+
skipBubbling: true,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
topPointerMove: {
|
|
97
|
+
phasedRegistrationNames: {
|
|
98
|
+
captured: 'onPointerMoveCapture',
|
|
99
|
+
bubbled: 'onPointerMove',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
topPointerUp: {
|
|
103
|
+
phasedRegistrationNames: {
|
|
104
|
+
captured: 'onPointerUpCapture',
|
|
105
|
+
bubbled: 'onPointerUp',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
topPointerOut: {
|
|
109
|
+
phasedRegistrationNames: {
|
|
110
|
+
captured: 'onPointerOutCapture',
|
|
111
|
+
bubbled: 'onPointerOut',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
topPointerOver: {
|
|
115
|
+
phasedRegistrationNames: {
|
|
116
|
+
captured: 'onPointerOverCapture',
|
|
117
|
+
bubbled: 'onPointerOver',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const directEventTypes = {
|
|
123
|
+
topAccessibilityAction: {
|
|
124
|
+
registrationName: 'onAccessibilityAction',
|
|
125
|
+
},
|
|
126
|
+
onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({
|
|
127
|
+
registrationName: 'onGestureHandlerEvent',
|
|
128
|
+
}),
|
|
129
|
+
onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({
|
|
130
|
+
registrationName: 'onGestureHandlerStateChange',
|
|
131
|
+
}),
|
|
132
|
+
|
|
133
|
+
// Direct events from UIManagerModuleConstants.java
|
|
134
|
+
topContentSizeChange: {
|
|
135
|
+
registrationName: 'onContentSizeChange',
|
|
136
|
+
},
|
|
137
|
+
topScrollBeginDrag: {
|
|
138
|
+
registrationName: 'onScrollBeginDrag',
|
|
139
|
+
},
|
|
140
|
+
topMessage: {
|
|
141
|
+
registrationName: 'onMessage',
|
|
142
|
+
},
|
|
143
|
+
topSelectionChange: {
|
|
144
|
+
registrationName: 'onSelectionChange',
|
|
145
|
+
},
|
|
146
|
+
topLoadingFinish: {
|
|
147
|
+
registrationName: 'onLoadingFinish',
|
|
148
|
+
},
|
|
149
|
+
topMomentumScrollEnd: {
|
|
150
|
+
registrationName: 'onMomentumScrollEnd',
|
|
151
|
+
},
|
|
152
|
+
topClick: {
|
|
153
|
+
registrationName: 'onClick',
|
|
154
|
+
},
|
|
155
|
+
topLoadingStart: {
|
|
156
|
+
registrationName: 'onLoadingStart',
|
|
157
|
+
},
|
|
158
|
+
topLoadingError: {
|
|
159
|
+
registrationName: 'onLoadingError',
|
|
160
|
+
},
|
|
161
|
+
topMomentumScrollBegin: {
|
|
162
|
+
registrationName: 'onMomentumScrollBegin',
|
|
163
|
+
},
|
|
164
|
+
topScrollEndDrag: {
|
|
165
|
+
registrationName: 'onScrollEndDrag',
|
|
166
|
+
},
|
|
167
|
+
topScroll: {
|
|
168
|
+
registrationName: 'onScroll',
|
|
169
|
+
},
|
|
170
|
+
topLayout: {
|
|
171
|
+
registrationName: 'onLayout',
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const validAttributesForNonEventProps = {
|
|
176
|
+
// @ReactProps from BaseViewManager
|
|
177
|
+
backgroundColor: {process: require('react-native/Libraries/StyleSheet/processColor').default},
|
|
178
|
+
transform: true,
|
|
179
|
+
opacity: true,
|
|
180
|
+
elevation: true,
|
|
181
|
+
shadowColor: {process: require('react-native/Libraries/StyleSheet/processColor').default},
|
|
182
|
+
zIndex: true,
|
|
183
|
+
renderToHardwareTextureAndroid: true,
|
|
184
|
+
testID: true,
|
|
185
|
+
nativeID: true,
|
|
186
|
+
accessibilityLabelledBy: true,
|
|
187
|
+
accessibilityLabel: true,
|
|
188
|
+
accessibilityHint: true,
|
|
189
|
+
accessibilityRole: true,
|
|
190
|
+
accessibilityCollection: true,
|
|
191
|
+
accessibilityCollectionItem: true,
|
|
192
|
+
accessibilityState: true,
|
|
193
|
+
accessibilityActions: true,
|
|
194
|
+
accessibilityValue: true,
|
|
195
|
+
importantForAccessibility: true,
|
|
196
|
+
rotation: true,
|
|
197
|
+
scaleX: true,
|
|
198
|
+
scaleY: true,
|
|
199
|
+
translateX: true,
|
|
200
|
+
translateY: true,
|
|
201
|
+
accessibilityLiveRegion: true,
|
|
202
|
+
|
|
203
|
+
// @ReactProps from LayoutShadowNode
|
|
204
|
+
width: true,
|
|
205
|
+
minWidth: true,
|
|
206
|
+
collapsable: true,
|
|
207
|
+
maxWidth: true,
|
|
208
|
+
height: true,
|
|
209
|
+
minHeight: true,
|
|
210
|
+
maxHeight: true,
|
|
211
|
+
flex: true,
|
|
212
|
+
flexGrow: true,
|
|
213
|
+
rowGap: true,
|
|
214
|
+
columnGap: true,
|
|
215
|
+
gap: true,
|
|
216
|
+
flexShrink: true,
|
|
217
|
+
flexBasis: true,
|
|
218
|
+
aspectRatio: true,
|
|
219
|
+
flexDirection: true,
|
|
220
|
+
flexWrap: true,
|
|
221
|
+
alignSelf: true,
|
|
222
|
+
alignItems: true,
|
|
223
|
+
alignContent: true,
|
|
224
|
+
justifyContent: true,
|
|
225
|
+
overflow: true,
|
|
226
|
+
display: true,
|
|
227
|
+
|
|
228
|
+
margin: true,
|
|
229
|
+
marginBlock: true,
|
|
230
|
+
marginBlockEnd: true,
|
|
231
|
+
marginBlockStart: true,
|
|
232
|
+
marginBottom: true,
|
|
233
|
+
marginEnd: true,
|
|
234
|
+
marginHorizontal: true,
|
|
235
|
+
marginInline: true,
|
|
236
|
+
marginInlineEnd: true,
|
|
237
|
+
marginInlineStart: true,
|
|
238
|
+
marginLeft: true,
|
|
239
|
+
marginRight: true,
|
|
240
|
+
marginStart: true,
|
|
241
|
+
marginTop: true,
|
|
242
|
+
marginVertical: true,
|
|
243
|
+
|
|
244
|
+
padding: true,
|
|
245
|
+
paddingBlock: true,
|
|
246
|
+
paddingBlockEnd: true,
|
|
247
|
+
paddingBlockStart: true,
|
|
248
|
+
paddingBottom: true,
|
|
249
|
+
paddingEnd: true,
|
|
250
|
+
paddingHorizontal: true,
|
|
251
|
+
paddingInline: true,
|
|
252
|
+
paddingInlineEnd: true,
|
|
253
|
+
paddingInlineStart: true,
|
|
254
|
+
paddingLeft: true,
|
|
255
|
+
paddingRight: true,
|
|
256
|
+
paddingStart: true,
|
|
257
|
+
paddingTop: true,
|
|
258
|
+
paddingVertical: true,
|
|
259
|
+
|
|
260
|
+
borderWidth: true,
|
|
261
|
+
borderStartWidth: true,
|
|
262
|
+
borderEndWidth: true,
|
|
263
|
+
borderTopWidth: true,
|
|
264
|
+
borderBottomWidth: true,
|
|
265
|
+
borderLeftWidth: true,
|
|
266
|
+
borderRightWidth: true,
|
|
267
|
+
|
|
268
|
+
start: true,
|
|
269
|
+
end: true,
|
|
270
|
+
left: true,
|
|
271
|
+
right: true,
|
|
272
|
+
top: true,
|
|
273
|
+
bottom: true,
|
|
274
|
+
|
|
275
|
+
position: true,
|
|
276
|
+
|
|
277
|
+
style: ReactNativeStyleAttributes,
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
// Props for bubbling and direct events
|
|
281
|
+
const validAttributesForEventProps = {
|
|
282
|
+
onLayout: true,
|
|
283
|
+
|
|
284
|
+
// PanResponder handlers
|
|
285
|
+
onMoveShouldSetResponder: true,
|
|
286
|
+
onMoveShouldSetResponderCapture: true,
|
|
287
|
+
onStartShouldSetResponder: true,
|
|
288
|
+
onStartShouldSetResponderCapture: true,
|
|
289
|
+
onResponderGrant: true,
|
|
290
|
+
onResponderReject: true,
|
|
291
|
+
onResponderStart: true,
|
|
292
|
+
onResponderEnd: true,
|
|
293
|
+
onResponderRelease: true,
|
|
294
|
+
onResponderMove: true,
|
|
295
|
+
onResponderTerminate: true,
|
|
296
|
+
onResponderTerminationRequest: true,
|
|
297
|
+
onShouldBlockNativeResponder: true,
|
|
298
|
+
|
|
299
|
+
// Touch events
|
|
300
|
+
onTouchStart: true,
|
|
301
|
+
onTouchMove: true,
|
|
302
|
+
onTouchEnd: true,
|
|
303
|
+
onTouchCancel: true,
|
|
304
|
+
|
|
305
|
+
// Pointer events
|
|
306
|
+
onPointerEnter: true,
|
|
307
|
+
onPointerEnterCapture: true,
|
|
308
|
+
onPointerLeave: true,
|
|
309
|
+
onPointerLeaveCapture: true,
|
|
310
|
+
onPointerMove: true,
|
|
311
|
+
onPointerMoveCapture: true,
|
|
312
|
+
onPointerOut: true,
|
|
313
|
+
onPointerOutCapture: true,
|
|
314
|
+
onPointerOver: true,
|
|
315
|
+
onPointerOverCapture: true,
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* On Android, Props are derived from a ViewManager and its ShadowNode.
|
|
320
|
+
*
|
|
321
|
+
* Where did we find these base platform props from?
|
|
322
|
+
* - Nearly all component ViewManagers descend from BaseViewManager,
|
|
323
|
+
* - and BaseViewManagers' ShadowNodes descend from LayoutShadowNode.
|
|
324
|
+
* - Also, all components inherit ViewConfigs from UIManagerModuleConstants.java.
|
|
325
|
+
*
|
|
326
|
+
* So, these ViewConfigs are generated from LayoutShadowNode and BaseViewManager.
|
|
327
|
+
*/
|
|
328
|
+
const PlatformBaseViewConfigAndroid: PartialViewConfigWithoutName = {
|
|
329
|
+
directEventTypes,
|
|
330
|
+
bubblingEventTypes,
|
|
331
|
+
validAttributes: {
|
|
332
|
+
...validAttributesForNonEventProps,
|
|
333
|
+
...validAttributesForEventProps,
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export default PlatformBaseViewConfigAndroid;
|