Integrate RN Nightly Build 11/16 (#12545)
* integrate 1e21e3469 * Change files * integrate 05d92bf2a * integrate 9b33e752c * fix build * integrate 6962b5fdd * remove deleted method * remove extra method * integrate fa89dd68b * fix build * fix linter and merge * add issue number * add issues number
This commit is contained in:
Родитель
3f1391c2f5
Коммит
828085aa1b
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "prerelease",
|
||||
"comment": "integrate 11/14",
|
||||
"packageName": "@office-iss/react-native-win32",
|
||||
"email": "tatianakapos@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "patch",
|
||||
"comment": "integrate 11/14",
|
||||
"packageName": "@react-native-windows/automation-channel",
|
||||
"email": "tatianakapos@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "prerelease",
|
||||
"comment": "integrate 11/14",
|
||||
"packageName": "react-native-windows",
|
||||
"email": "tatianakapos@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -5,19 +5,19 @@
|
|||
"excludePatterns": [
|
||||
"src/js/examples-win32/**"
|
||||
],
|
||||
"baseVersion": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"baseVersion": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "src/js/components/ListExampleShared.win32.js",
|
||||
"baseFile": "packages/rn-tester/js/components/ListExampleShared.js",
|
||||
"baseHash": "7bdaba03bf529cfb9920c1be2c8af1443fc628c9"
|
||||
"baseHash": "d3b62b2faecf0aa449cb438b3e09064b7ae5102f"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "src/js/components/RNTesterExampleFilter.win32.js",
|
||||
"baseFile": "packages/rn-tester/js/components/RNTesterExampleFilter.js",
|
||||
"baseHash": "3d9f0be3317ac705673daed4c75ec7a49a2f7652"
|
||||
"baseHash": "749b9de3afedb843fe9fe8c63c2e910b9f4e4c29"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -35,7 +35,7 @@
|
|||
"type": "copy",
|
||||
"file": "src/js/RNTesterApp.win32.js",
|
||||
"baseFile": "packages/rn-tester/js/RNTesterApp.android.js",
|
||||
"baseHash": "27a275e7409dc4b45503492d243607a2d93d55d5",
|
||||
"baseHash": "5e73edb50a1156756f2d1bec70d95a92f701ec22",
|
||||
"issue": 4586
|
||||
},
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"peerDependencies": {
|
||||
"@office-iss/react-native-win32": "^0.0.0-canary.224",
|
||||
"react": "18.0.0",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba"
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@office-iss/react-native-win32": "^0.0.0-canary.224",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
"just-scripts": "^1.3.3",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
import RNTesterApp from './RNTesterAppShared';
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
AppRegistry.registerComponent('RNTesterApp', () => RNTesterApp);
|
||||
|
||||
|
|
|
@ -11,17 +11,16 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {
|
||||
ActivityIndicator,
|
||||
Animated,
|
||||
Image,
|
||||
Platform,
|
||||
TouchableHighlight,
|
||||
StyleSheet,
|
||||
Switch,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableHighlight,
|
||||
View,
|
||||
} = require('react-native');
|
||||
|
||||
|
|
|
@ -8,19 +8,20 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
import type {SectionData} from '../types/RNTesterTypes';
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
const RNTesterListFilters = require('./RNTesterListFilters');
|
||||
const React = require('react');
|
||||
const {
|
||||
Image,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
TextInput,
|
||||
View,
|
||||
ScrollView,
|
||||
Image,
|
||||
Platform,
|
||||
} = require('react-native');
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
import type {SectionData} from '../types/RNTesterTypes';
|
||||
|
||||
type Props<T> = {
|
||||
filter: Function,
|
||||
|
|
|
@ -92,6 +92,7 @@ flow/
|
|||
[options]
|
||||
experimental.global_find_ref=true
|
||||
enums=true
|
||||
casting_syntax=both
|
||||
|
||||
emoji=true
|
||||
|
||||
|
@ -147,4 +148,4 @@ untyped-import
|
|||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.219.4
|
||||
^0.222.0
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
"**/__snapshots__/**",
|
||||
"src/rntypes/**"
|
||||
],
|
||||
"baseVersion": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"baseVersion": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "derived",
|
||||
"file": ".flowconfig",
|
||||
"baseFile": ".flowconfig",
|
||||
"baseHash": "55a2906a48f5d54bd1daf47d2b127ce2848199e9"
|
||||
"baseHash": "397a9d59e4415e8758adc635d5e016070e6d85d7"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
"file": "src/index.win32.js",
|
||||
"baseFile": "packages/react-native/index.js",
|
||||
"baseHash": "287445ef805383901c37da6026f8cf423ab0f078"
|
||||
"baseHash": "b658f287732c27fdd28722a8765c3b1b0c1316fa"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -170,7 +170,7 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js",
|
||||
"baseHash": "2082604bf871d04091717d7808ebf0b2355fc8ae"
|
||||
"baseHash": "ac429ef22142f8bb7a274a6eb98575f6de07295f"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -212,7 +212,7 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Components/View/ViewPropTypes.d.ts",
|
||||
"baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts",
|
||||
"baseHash": "8a7908f1ebfde292f2d70f6672c96c05eb7397c8"
|
||||
"baseHash": "7ab8da32f3f0390cd415db0c2c4127d8b7b930f8"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
|
@ -306,13 +306,13 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/Inspector/Inspector.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Inspector/Inspector.js",
|
||||
"baseHash": "db933614c0c15f0ce69907e37baae6b31dd39867"
|
||||
"baseHash": "03565787cbe09078824ee3fcfc12401085995454"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "src/Libraries/Inspector/InspectorOverlay.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Inspector/InspectorOverlay.js",
|
||||
"baseHash": "e485323ee22cfae5c8b5e58b1283e2c00d650145"
|
||||
"baseHash": "b2d22b7a448802373d619df28cf8a70756c0ce33"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
|
|
@ -26,18 +26,18 @@
|
|||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"@jest/create-cache-key-function": "^29.6.3",
|
||||
"@react-native-community/cli": "12.0.0-alpha.15",
|
||||
"@react-native-community/cli-platform-android": "12.0.0-alpha.15",
|
||||
"@react-native-community/cli-platform-ios": "12.0.0-alpha.15",
|
||||
"@react-native-community/cli": "12.0.0",
|
||||
"@react-native-community/cli-platform-android": "12.0.0",
|
||||
"@react-native-community/cli-platform-ios": "12.0.0",
|
||||
"@react-native/assets": "1.0.0",
|
||||
"@react-native/assets-registry": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/codegen": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/community-cli-plugin": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/gradle-plugin": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/js-polyfills": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/assets-registry": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"@react-native/codegen": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"@react-native/community-cli-plugin": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"@react-native/gradle-plugin": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"@react-native/js-polyfills": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"@react-native/metro-config": "^0.73.0",
|
||||
"@react-native/normalize-colors": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/virtualized-lists": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"@react-native/normalize-colors": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"@react-native/virtualized-lists": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"abort-controller": "^3.0.0",
|
||||
"anser": "^1.4.9",
|
||||
"ansi-regex": "^5.0.0",
|
||||
|
@ -85,13 +85,13 @@
|
|||
"just-scripts": "^1.3.3",
|
||||
"prettier": "^2.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba"
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b"
|
||||
},
|
||||
"beachball": {
|
||||
"defaultNpmTag": "canary",
|
||||
|
|
|
@ -150,6 +150,17 @@ export interface ViewPropsAndroid {
|
|||
* Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
||||
*/
|
||||
focusable?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
||||
* for more details.
|
||||
*
|
||||
* Supports the following values:
|
||||
* - 0 (View is focusable)
|
||||
* - -1 (View is not focusable)
|
||||
*/
|
||||
// tabIndex?: 0 | -1 | undefined; [Windows fix to get react-native-picker working #12548]
|
||||
}
|
||||
|
||||
// [Win32
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import type {TouchedViewDataAtPoint} from '../Renderer/shims/ReactNativeTypes';
|
||||
import type {
|
||||
InspectorData,
|
||||
TouchedViewDataAtPoint,
|
||||
} from '../Renderer/shims/ReactNativeTypes';
|
||||
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import type {ReactDevToolsAgent} from '../Types/ReactDevToolsTypes';
|
||||
import type {HostRef} from './getInspectorDataForViewAtPoint';
|
||||
|
||||
// import Dimensions from '../Utilities/Dimensions'; [win32]
|
||||
|
||||
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
|
||||
const PressabilityDebug = require('../Pressability/PressabilityDebug');
|
||||
const ReactNative = require('../Renderer/shims/ReactNative');
|
||||
const {findNodeHandle} = require('../ReactNative/RendererProxy');
|
||||
|
@ -27,111 +29,70 @@ const InspectorOverlay = require('./InspectorOverlay');
|
|||
const InspectorPanel = require('./InspectorPanel');
|
||||
const React = require('react');
|
||||
|
||||
const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
const {useState} = React;
|
||||
|
||||
// Required for React DevTools to view/edit React Native styles in Flipper.
|
||||
// Flipper doesn't inject these values when initializing DevTools.
|
||||
hook.resolveRNStyle = require('../StyleSheet/flattenStyle');
|
||||
hook.nativeStyleEditorValidAttributes = Object.keys(ReactNativeStyleAttributes);
|
||||
type PanelPosition = 'top' | 'bottom';
|
||||
type SelectedTab =
|
||||
| 'elements-inspector'
|
||||
| 'network-profiling'
|
||||
| 'performance-profiling';
|
||||
|
||||
export type InspectedElementFrame = TouchedViewDataAtPoint['frame'];
|
||||
export type InspectedElementSource = InspectorData['source'];
|
||||
export type InspectedElement = $ReadOnly<{
|
||||
frame: InspectedElementFrame,
|
||||
source?: InspectedElementSource,
|
||||
style?: ViewStyleProp,
|
||||
}>;
|
||||
export type ElementsHierarchy = InspectorData['hierarchy'];
|
||||
|
||||
type Props = {
|
||||
inspectedView: ?HostRef,
|
||||
onRequestRerenderApp: () => void,
|
||||
reactDevToolsAgent?: ReactDevToolsAgent,
|
||||
};
|
||||
|
||||
const UIManager = require('../ReactNative/UIManager'); // [Win32]
|
||||
|
||||
class Inspector extends React.Component<
|
||||
{
|
||||
inspectedView: ?HostRef,
|
||||
onRequestRerenderApp: (callback: (instance: ?HostRef) => void) => void,
|
||||
...
|
||||
},
|
||||
{
|
||||
devtoolsAgent: ?Object,
|
||||
hierarchy: any,
|
||||
panelPos: string,
|
||||
inspecting: boolean,
|
||||
selection: ?number,
|
||||
perfing: boolean,
|
||||
inspected: any,
|
||||
inspectedView: ?HostRef,
|
||||
networking: boolean,
|
||||
...
|
||||
},
|
||||
> {
|
||||
_hideTimeoutID: TimeoutID | null = null;
|
||||
_subs: ?Array<() => void>;
|
||||
_setTouchedViewData: ?(TouchedViewDataAtPoint) => void;
|
||||
function Inspector({
|
||||
inspectedView,
|
||||
onRequestRerenderApp,
|
||||
reactDevToolsAgent,
|
||||
}: Props): React.Node {
|
||||
const [selectedTab, setSelectedTab] =
|
||||
useState<?SelectedTab>('elements-inspector');
|
||||
|
||||
constructor(props: Object) {
|
||||
super(props);
|
||||
const [panelPosition, setPanelPosition] = useState<PanelPosition>('bottom');
|
||||
const [inspectedElement, setInspectedElement] =
|
||||
useState<?InspectedElement>(null);
|
||||
const [selectionIndex, setSelectionIndex] = useState<?number>(null);
|
||||
const [elementsHierarchy, setElementsHierarchy] =
|
||||
useState<?ElementsHierarchy>(null);
|
||||
|
||||
this.state = {
|
||||
devtoolsAgent: null,
|
||||
hierarchy: null,
|
||||
panelPos: 'bottom',
|
||||
inspecting: true,
|
||||
perfing: false,
|
||||
inspected: null,
|
||||
selection: null,
|
||||
inspectedView: this.props.inspectedView,
|
||||
networking: false,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
hook.on('react-devtools', this._attachToDevtools);
|
||||
// if devtools is already started
|
||||
if (hook.reactDevtoolsAgent) {
|
||||
this._attachToDevtools(hook.reactDevtoolsAgent);
|
||||
const setSelection = (i: number) => {
|
||||
const hierarchyItem = elementsHierarchy?.[i];
|
||||
if (hierarchyItem == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this._subs) {
|
||||
this._subs.map(fn => fn());
|
||||
}
|
||||
hook.off('react-devtools', this._attachToDevtools);
|
||||
this._setTouchedViewData = null;
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(newProps: Object) {
|
||||
this.setState({inspectedView: newProps.inspectedView});
|
||||
}
|
||||
|
||||
_attachToDevtools = (agent: Object) => {
|
||||
agent.addListener('shutdown', this._onAgentShutdown);
|
||||
|
||||
this.setState({
|
||||
devtoolsAgent: agent,
|
||||
});
|
||||
};
|
||||
|
||||
_onAgentShutdown = () => {
|
||||
const agent = this.state.devtoolsAgent;
|
||||
if (agent != null) {
|
||||
agent.removeListener('shutdown', this._onAgentShutdown);
|
||||
|
||||
this.setState({devtoolsAgent: null});
|
||||
}
|
||||
};
|
||||
|
||||
setSelection(i: number) {
|
||||
const hierarchyItem = this.state.hierarchy[i];
|
||||
// we pass in findNodeHandle as the method is injected
|
||||
// We pass in findNodeHandle as the method is injected
|
||||
const {measure, props, source} =
|
||||
hierarchyItem.getInspectorData(findNodeHandle);
|
||||
|
||||
measure((x, y, width, height, left, top) => {
|
||||
this.setState({
|
||||
inspected: {
|
||||
frame: {left, top, width, height},
|
||||
style: props.style,
|
||||
source,
|
||||
},
|
||||
selection: i,
|
||||
// $FlowFixMe[incompatible-call] `props` from InspectorData are defined as <string, string> dictionary, which is incompatible with ViewStyleProp
|
||||
setInspectedElement({
|
||||
frame: {left, top, width, height},
|
||||
source,
|
||||
style: props.style,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
onTouchPoint(locationX: number, locationY: number) {
|
||||
this._setTouchedViewData = viewData => {
|
||||
setSelectionIndex(i);
|
||||
});
|
||||
};
|
||||
|
||||
const onTouchPoint = (locationX: number, locationY: number) => {
|
||||
const setTouchedViewData = (viewData: TouchedViewDataAtPoint) => {
|
||||
const {
|
||||
hierarchy,
|
||||
props,
|
||||
|
@ -146,117 +107,94 @@ class Inspector extends React.Component<
|
|||
// Sync the touched view with React DevTools.
|
||||
// Note: This is Paper only. To support Fabric,
|
||||
// DevTools needs to be updated to not rely on view tags.
|
||||
const agent = this.state.devtoolsAgent;
|
||||
if (agent) {
|
||||
agent.selectNode(findNodeHandle(touchedViewTag));
|
||||
if (reactDevToolsAgent) {
|
||||
reactDevToolsAgent.selectNode(findNodeHandle(touchedViewTag));
|
||||
if (closestInstance != null) {
|
||||
agent.selectNode(closestInstance);
|
||||
reactDevToolsAgent.selectNode(closestInstance);
|
||||
}
|
||||
}
|
||||
|
||||
// [Win32 Avoid Dimensions call
|
||||
const node = ReactNative.findNodeHandle(this);
|
||||
const node = ReactNative.findNodeHandle(inspectedView);
|
||||
// $FlowFixMe[incompatible-call]
|
||||
UIManager.measure(node, (x, y, width, height, left, top) => {
|
||||
this.setState({
|
||||
panelPos: pointerY > height / 2 ? 'top' : 'bottom',
|
||||
selection: selectedIndex,
|
||||
hierarchy,
|
||||
inspected: {
|
||||
style: props.style,
|
||||
frame,
|
||||
source,
|
||||
},
|
||||
setPanelPosition(pointerY > height / 2 ? 'top' : 'bottom');
|
||||
setSelectionIndex(selectedIndex);
|
||||
setElementsHierarchy(hierarchy);
|
||||
// $FlowFixMe[incompatible-call] `props` from InspectorData are defined as <string, string> dictionary, which is incompatible with ViewStyleProp
|
||||
setInspectedElement({
|
||||
frame,
|
||||
source,
|
||||
style: props.style,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// ]Win32
|
||||
getInspectorDataForViewAtPoint(
|
||||
this.state.inspectedView,
|
||||
inspectedView,
|
||||
locationX,
|
||||
locationY,
|
||||
viewData => {
|
||||
if (this._setTouchedViewData != null) {
|
||||
this._setTouchedViewData(viewData);
|
||||
this._setTouchedViewData = null;
|
||||
}
|
||||
setTouchedViewData(viewData);
|
||||
return false;
|
||||
},
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
setPerfing(val: boolean) {
|
||||
this.setState({
|
||||
perfing: val,
|
||||
inspecting: false,
|
||||
inspected: null,
|
||||
networking: false,
|
||||
});
|
||||
}
|
||||
const setInspecting = (enabled: boolean) => {
|
||||
setSelectedTab(enabled ? 'elements-inspector' : null);
|
||||
setInspectedElement(null);
|
||||
};
|
||||
|
||||
setInspecting(val: boolean) {
|
||||
this.setState({
|
||||
inspecting: val,
|
||||
inspected: null,
|
||||
});
|
||||
}
|
||||
const setPerfing = (enabled: boolean) => {
|
||||
setSelectedTab(enabled ? 'performance-profiling' : null);
|
||||
setInspectedElement(null);
|
||||
};
|
||||
|
||||
setTouchTargeting(val: boolean) {
|
||||
const setNetworking = (enabled: boolean) => {
|
||||
setSelectedTab(enabled ? 'network-profiling' : null);
|
||||
setInspectedElement(null);
|
||||
};
|
||||
|
||||
const setTouchTargeting = (val: boolean) => {
|
||||
PressabilityDebug.setEnabled(val);
|
||||
this.props.onRequestRerenderApp(inspectedView => {
|
||||
this.setState({inspectedView});
|
||||
});
|
||||
}
|
||||
onRequestRerenderApp();
|
||||
};
|
||||
|
||||
setNetworking(val: boolean) {
|
||||
this.setState({
|
||||
networking: val,
|
||||
perfing: false,
|
||||
inspecting: false,
|
||||
inspected: null,
|
||||
});
|
||||
}
|
||||
const panelContainerStyle =
|
||||
panelPosition === 'bottom'
|
||||
? {bottom: 0}
|
||||
: Platform.select({ios: {top: 0}, default: {top: 0}});
|
||||
|
||||
render(): React.Node {
|
||||
const panelContainerStyle =
|
||||
this.state.panelPos === 'bottom'
|
||||
? {bottom: 0}
|
||||
: {top: Platform.OS === 'ios' ? 20 : 0};
|
||||
return (
|
||||
<View style={styles.container} pointerEvents="box-none">
|
||||
{this.state.inspecting && (
|
||||
<InspectorOverlay
|
||||
inspected={this.state.inspected}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
onTouchPoint={this.onTouchPoint.bind(this)}
|
||||
/>
|
||||
)}
|
||||
<View style={[styles.panelContainer, panelContainerStyle]}>
|
||||
<InspectorPanel
|
||||
devtoolsIsOpen={!!this.state.devtoolsAgent}
|
||||
inspecting={this.state.inspecting}
|
||||
perfing={this.state.perfing}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
setPerfing={this.setPerfing.bind(this)}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
setInspecting={this.setInspecting.bind(this)}
|
||||
inspected={this.state.inspected}
|
||||
hierarchy={this.state.hierarchy}
|
||||
selection={this.state.selection}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
setSelection={this.setSelection.bind(this)}
|
||||
touchTargeting={PressabilityDebug.isEnabled()}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
setTouchTargeting={this.setTouchTargeting.bind(this)}
|
||||
networking={this.state.networking}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
setNetworking={this.setNetworking.bind(this)}
|
||||
/>
|
||||
</View>
|
||||
return (
|
||||
<View style={styles.container} pointerEvents="box-none">
|
||||
{selectedTab === 'elements-inspector' && (
|
||||
<InspectorOverlay
|
||||
inspected={inspectedElement}
|
||||
onTouchPoint={onTouchPoint}
|
||||
/>
|
||||
)}
|
||||
|
||||
<View style={[styles.panelContainer, panelContainerStyle]}>
|
||||
<InspectorPanel
|
||||
devtoolsIsOpen={!!reactDevToolsAgent}
|
||||
inspecting={selectedTab === 'elements-inspector'}
|
||||
perfing={selectedTab === 'performance-profiling'}
|
||||
setPerfing={setPerfing}
|
||||
setInspecting={setInspecting}
|
||||
inspected={inspectedElement}
|
||||
hierarchy={elementsHierarchy}
|
||||
selection={selectionIndex}
|
||||
setSelection={setSelection}
|
||||
touchTargeting={PressabilityDebug.isEnabled()}
|
||||
setTouchTargeting={setTouchTargeting}
|
||||
networking={selectedTab === 'network-profiling'}
|
||||
setNetworking={setNetworking}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import type {PressEvent} from '../Types/CoreEventTypes';
|
||||
import type {InspectedElement} from './Inspector';
|
||||
|
||||
// import Dimensions from '../Utilities/Dimensions'; [Win32]
|
||||
|
||||
|
@ -20,50 +20,38 @@ const StyleSheet = require('../StyleSheet/StyleSheet');
|
|||
const ElementBox = require('./ElementBox');
|
||||
const React = require('react');
|
||||
|
||||
type Inspected = $ReadOnly<{|
|
||||
frame?: Object,
|
||||
style?: ViewStyleProp,
|
||||
|}>;
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
inspected?: Inspected,
|
||||
inspected?: ?InspectedElement,
|
||||
onTouchPoint: (locationX: number, locationY: number) => void,
|
||||
|}>;
|
||||
|
||||
class InspectorOverlay extends React.Component<Props> {
|
||||
findViewForTouchEvent: (e: PressEvent) => void = (e: PressEvent) => {
|
||||
function InspectorOverlay({inspected, onTouchPoint}: Props): React.Node {
|
||||
const findViewForTouchEvent = (e: PressEvent) => {
|
||||
const {locationX, locationY} = e.nativeEvent.touches[0];
|
||||
|
||||
this.props.onTouchPoint(locationX, locationY);
|
||||
onTouchPoint(locationX, locationY);
|
||||
};
|
||||
|
||||
shouldSetResponser: (e: PressEvent) => boolean = (e: PressEvent): boolean => {
|
||||
this.findViewForTouchEvent(e);
|
||||
const handleStartShouldSetResponder = (e: PressEvent): boolean => {
|
||||
findViewForTouchEvent(e);
|
||||
return true;
|
||||
};
|
||||
|
||||
render(): React.Node {
|
||||
let content = null;
|
||||
if (this.props.inspected) {
|
||||
content = (
|
||||
<ElementBox
|
||||
frame={this.props.inspected.frame}
|
||||
style={this.props.inspected.style}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// [Win32, height replaced with 100% to avoid Dimensions call]
|
||||
return (
|
||||
<View
|
||||
onStartShouldSetResponder={this.shouldSetResponser}
|
||||
onResponderMove={this.findViewForTouchEvent}
|
||||
nativeID="inspectorOverlay" /* TODO: T68258846. */
|
||||
style={[styles.inspector, {height: '100%'}]}>
|
||||
{content}
|
||||
</View>
|
||||
);
|
||||
let content = null;
|
||||
if (inspected) {
|
||||
content = <ElementBox frame={inspected.frame} style={inspected.style} />;
|
||||
}
|
||||
|
||||
// [Win32, height replaced with 100% to avoid Dimensions call]
|
||||
return (
|
||||
<View
|
||||
onStartShouldSetResponder={handleStartShouldSetResponder}
|
||||
onResponderMove={findViewForTouchEvent}
|
||||
nativeID="inspectorOverlay" /* TODO: T68258846. */
|
||||
style={[styles.inspector, {height: '100%'}]}>
|
||||
{content}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
|
@ -10,99 +10,96 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
// APIs
|
||||
import typeof ActionSheetIOS from './Libraries/ActionSheetIOS/ActionSheetIOS';
|
||||
import typeof Alert from './Libraries/Alert/Alert';
|
||||
import typeof Animated from './Libraries/Animated/Animated';
|
||||
import typeof * as AnimatedModule from './Libraries/Animated/Animated';
|
||||
import typeof Easing from './Libraries/Animated/Easing';
|
||||
import typeof useAnimatedValue from './Libraries/Animated/useAnimatedValue';
|
||||
import typeof AppState from './Libraries/AppState/AppState';
|
||||
import typeof FocusManager from './Libraries/Utilities/FocusManager';
|
||||
import typeof NativeModules from './Libraries/BatchedBridge/NativeModules';
|
||||
// Components
|
||||
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
|
||||
import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator';
|
||||
import typeof Button from './Libraries/Components/Button';
|
||||
import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
|
||||
import typeof DrawerLayoutAndroid from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
|
||||
import typeof FlatList from './Libraries/Lists/FlatList';
|
||||
import typeof Image from './Libraries/Image/Image';
|
||||
import typeof ImageBackground from './Libraries/Image/ImageBackground';
|
||||
import typeof InputAccessoryView from './Libraries/Components/TextInput/InputAccessoryView';
|
||||
import typeof Keyboard from './Libraries/Components/Keyboard/Keyboard';
|
||||
import typeof KeyboardAvoidingView from './Libraries/Components/Keyboard/KeyboardAvoidingView';
|
||||
import typeof Modal from './Libraries/Modal/Modal';
|
||||
import typeof Pressable from './Libraries/Components/Pressable/Pressable';
|
||||
import typeof ProgressBarAndroid from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
|
||||
import typeof RefreshControl from './Libraries/Components/RefreshControl/RefreshControl';
|
||||
import typeof SafeAreaView from './Libraries/Components/SafeAreaView/SafeAreaView';
|
||||
import typeof ScrollView from './Libraries/Components/ScrollView/ScrollView';
|
||||
import typeof SectionList from './Libraries/Lists/SectionList';
|
||||
import typeof StatusBar from './Libraries/Components/StatusBar/StatusBar';
|
||||
import typeof Switch from './Libraries/Components/Switch/Switch';
|
||||
import typeof Text from './Libraries/Text/Text';
|
||||
import typeof InputAccessoryView from './Libraries/Components/TextInput/InputAccessoryView';
|
||||
import typeof TextInput from './Libraries/Components/TextInput/TextInput';
|
||||
import typeof ToastAndroid from './Libraries/Components/ToastAndroid/ToastAndroid';
|
||||
import typeof Touchable from './Libraries/Components/Touchable/Touchable';
|
||||
import typeof TouchableHighlight from './Libraries/Components/Touchable/TouchableHighlight';
|
||||
import typeof TouchableNativeFeedback from './Libraries/Components/Touchable/TouchableNativeFeedback';
|
||||
import typeof TouchableOpacity from './Libraries/Components/Touchable/TouchableOpacity';
|
||||
import typeof TouchableWithoutFeedback from './Libraries/Components/Touchable/TouchableWithoutFeedback';
|
||||
import typeof View from './Libraries/Components/View/View';
|
||||
import typeof NativeEventEmitter from './Libraries/EventEmitter/NativeEventEmitter';
|
||||
import typeof RCTDeviceEventEmitter from './Libraries/EventEmitter/RCTDeviceEventEmitter';
|
||||
import typeof RCTNativeAppEventEmitter from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
|
||||
import typeof Image from './Libraries/Image/Image';
|
||||
import typeof ImageBackground from './Libraries/Image/ImageBackground';
|
||||
import typeof InteractionManager from './Libraries/Interaction/InteractionManager';
|
||||
import typeof PanResponder from './Libraries/Interaction/PanResponder';
|
||||
import typeof LayoutAnimation from './Libraries/LayoutAnimation/LayoutAnimation';
|
||||
import typeof Linking from './Libraries/Linking/Linking';
|
||||
import typeof FlatList from './Libraries/Lists/FlatList';
|
||||
import typeof SectionList from './Libraries/Lists/SectionList';
|
||||
import typeof VirtualizedList from './Libraries/Lists/VirtualizedList';
|
||||
import typeof VirtualizedSectionList from './Libraries/Lists/VirtualizedSectionList';
|
||||
|
||||
// APIs
|
||||
import typeof ActionSheetIOS from './Libraries/ActionSheetIOS/ActionSheetIOS';
|
||||
import typeof Alert from './Libraries/Alert/Alert';
|
||||
import typeof Animated from './Libraries/Animated/Animated';
|
||||
import typeof * as AnimatedModule from './Libraries/Animated/Animated';
|
||||
import typeof Appearance from './Libraries/Utilities/Appearance';
|
||||
import typeof LogBox from './Libraries/LogBox/LogBox';
|
||||
import typeof Modal from './Libraries/Modal/Modal';
|
||||
import typeof NativeDialogManagerAndroid from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
|
||||
import typeof Networking from './Libraries/Network/RCTNetworking';
|
||||
import typeof * as Systrace from './Libraries/Performance/Systrace';
|
||||
import typeof PermissionsAndroid from './Libraries/PermissionsAndroid/PermissionsAndroid';
|
||||
import typeof PushNotificationIOS from './Libraries/PushNotificationIOS/PushNotificationIOS';
|
||||
import typeof AppRegistry from './Libraries/ReactNative/AppRegistry';
|
||||
import typeof AppState from './Libraries/AppState/AppState';
|
||||
import typeof I18nManager from './Libraries/ReactNative/I18nManager';
|
||||
import typeof {RootTagContext} from './Libraries/ReactNative/RootTag';
|
||||
import typeof UIManager from './Libraries/ReactNative/UIManager';
|
||||
import typeof ReactNative from './Libraries/Renderer/shims/ReactNative';
|
||||
import type {HostComponent as _HostComponentInternal} from './Libraries/Renderer/shims/ReactNativeTypes';
|
||||
import typeof Settings from './Libraries/Settings/Settings';
|
||||
import typeof Share from './Libraries/Share/Share';
|
||||
import typeof {PlatformColor} from './Libraries/StyleSheet/PlatformColorValueTypes';
|
||||
// Plugins
|
||||
import typeof {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
|
||||
import typeof processColor from './Libraries/StyleSheet/processColor';
|
||||
import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
|
||||
import typeof Text from './Libraries/Text/Text';
|
||||
import typeof * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
|
||||
import typeof UTFSequence from './Libraries/UTFSequence';
|
||||
import typeof Appearance from './Libraries/Utilities/Appearance';
|
||||
import typeof BackHandler from './Libraries/Utilities/BackHandler';
|
||||
import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
|
||||
import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
|
||||
import typeof DevSettings from './Libraries/Utilities/DevSettings';
|
||||
import typeof Dimensions from './Libraries/Utilities/Dimensions';
|
||||
import typeof Easing from './Libraries/Animated/Easing';
|
||||
import typeof FocusManager from './Libraries/Utilities/FocusManager';
|
||||
import typeof ReactNative from './Libraries/Renderer/shims/ReactNative';
|
||||
import typeof I18nManager from './Libraries/ReactNative/I18nManager';
|
||||
import typeof InteractionManager from './Libraries/Interaction/InteractionManager';
|
||||
import typeof Keyboard from './Libraries/Components/Keyboard/Keyboard';
|
||||
import typeof LayoutAnimation from './Libraries/LayoutAnimation/LayoutAnimation';
|
||||
import typeof Linking from './Libraries/Linking/Linking';
|
||||
import typeof LogBox from './Libraries/LogBox/LogBox';
|
||||
import typeof NativeDialogManagerAndroid from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
|
||||
import typeof NativeEventEmitter from './Libraries/EventEmitter/NativeEventEmitter';
|
||||
import typeof Networking from './Libraries/Network/RCTNetworking';
|
||||
import typeof PanResponder from './Libraries/Interaction/PanResponder';
|
||||
import typeof PermissionsAndroid from './Libraries/PermissionsAndroid/PermissionsAndroid';
|
||||
import typeof PixelRatio from './Libraries/Utilities/PixelRatio';
|
||||
import typeof PushNotificationIOS from './Libraries/PushNotificationIOS/PushNotificationIOS';
|
||||
import typeof Settings from './Libraries/Settings/Settings';
|
||||
import typeof Share from './Libraries/Share/Share';
|
||||
import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
|
||||
import typeof * as Systrace from './Libraries/Performance/Systrace';
|
||||
import typeof ToastAndroid from './Libraries/Components/ToastAndroid/ToastAndroid';
|
||||
import typeof * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
|
||||
import typeof UIManager from './Libraries/ReactNative/UIManager';
|
||||
import typeof useAnimatedValue from './Libraries/Animated/useAnimatedValue';
|
||||
import typeof Platform from './Libraries/Utilities/Platform';
|
||||
import typeof useColorScheme from './Libraries/Utilities/useColorScheme';
|
||||
import typeof useWindowDimensions from './Libraries/Utilities/useWindowDimensions';
|
||||
import typeof UTFSequence from './Libraries/UTFSequence';
|
||||
import typeof Vibration from './Libraries/Vibration/Vibration';
|
||||
import typeof YellowBox from './Libraries/YellowBox/YellowBoxDeprecated';
|
||||
|
||||
// Plugins
|
||||
import typeof {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
|
||||
import typeof NativeModules from './Libraries/BatchedBridge/NativeModules';
|
||||
import typeof Platform from './Libraries/Utilities/Platform';
|
||||
import typeof {PlatformColor} from './Libraries/StyleSheet/PlatformColorValueTypes';
|
||||
import typeof processColor from './Libraries/StyleSheet/processColor';
|
||||
import typeof RCTDeviceEventEmitter from './Libraries/EventEmitter/RCTDeviceEventEmitter';
|
||||
import typeof RCTNativeAppEventEmitter from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
|
||||
import typeof {RootTagContext} from './Libraries/ReactNative/RootTag';
|
||||
|
||||
import type {HostComponent as _HostComponentInternal} from './Libraries/Renderer/shims/ReactNativeTypes';
|
||||
const warnOnce = require('./Libraries/Utilities/warnOnce');
|
||||
const invariant = require('invariant');
|
||||
|
||||
// Windows types
|
||||
import typeof {ColorGradientWin32} from './Libraries/StyleSheet/PlatformColorValueTypesWin32';
|
||||
|
||||
export type HostComponent<T> = _HostComponentInternal<T>;
|
||||
|
||||
const invariant = require('invariant');
|
||||
const warnOnce = require('./Libraries/Utilities/warnOnce');
|
||||
|
||||
module.exports = {
|
||||
// Components
|
||||
get AccessibilityInfo(): AccessibilityInfo {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"just-scripts": "^1.3.2",
|
||||
"prettier": "^2.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"react-native-windows": "^0.0.0-canary.748",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
"excludePatterns": [
|
||||
"src/js/examples-win/**"
|
||||
],
|
||||
"baseVersion": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"baseVersion": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "derived",
|
||||
"file": "src/js/examples-win/Button/ButtonExample.windows.js",
|
||||
"baseFile": "packages/rn-tester/js/examples/Button/ButtonExample.js",
|
||||
"baseHash": "36c55afe75ac9c6efdec22e5ceb1f114a84ebd45"
|
||||
"baseHash": "e03b21d229ecb631c12e4ac04ddf73fbe6059da7"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
"file": "src/js/examples-win/Switch/SwitchExample.windows.js",
|
||||
"baseFile": "packages/rn-tester/js/examples/Switch/SwitchExample.js",
|
||||
"baseHash": "ba4cd945121522ef59ed862bb6104d8767e66e5e"
|
||||
"baseHash": "fdf533bef0d75f8126faf21186b160ae7616e81f"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -38,20 +38,20 @@
|
|||
"type": "patch",
|
||||
"file": "src/js/examples/TextInput/TextInputExample.windows.js",
|
||||
"baseFile": "packages/rn-tester/js/examples/TextInput/TextInputExample.android.js",
|
||||
"baseHash": "31a84344d3437b2a9362d3bc85a1384eb934399e",
|
||||
"baseHash": "528b850e74260e8059797a7fbf771ce8a07f27dd",
|
||||
"issue": 5688
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "src/js/examples/View/ViewExample.windows.js",
|
||||
"baseFile": "packages/rn-tester/js/examples/View/ViewExample.js",
|
||||
"baseHash": "49688bf21c5a2f64aa185180983fb1a81a0e1312"
|
||||
"baseHash": "4904becf311eeeb2b3a324f7efb5c82531e50969"
|
||||
},
|
||||
{
|
||||
"type": "copy",
|
||||
"file": "src/js/RNTesterApp.windows.js",
|
||||
"baseFile": "packages/rn-tester/js/RNTesterApp.android.js",
|
||||
"baseHash": "27a275e7409dc4b45503492d243607a2d93d55d5",
|
||||
"baseHash": "5e73edb50a1156756f2d1bec70d95a92f701ec22",
|
||||
"issue": 4586
|
||||
},
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"peerDependencies": {
|
||||
"@react-native-picker/picker": "2.4.10",
|
||||
"react": "18.0.0",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"react-native-windows": "^0.0.0-canary.748",
|
||||
"react-native-xaml": "^0.0.50"
|
||||
},
|
||||
|
@ -31,7 +31,7 @@
|
|||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
"just-scripts": "^1.3.3",
|
||||
"react-native": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"react-native": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"react-native-windows": "^0.0.0-canary.748",
|
||||
"typescript": "^4.9.5"
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
import RNTesterApp from './RNTesterAppShared';
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
AppRegistry.registerComponent('RNTesterApp', () => RNTesterApp);
|
||||
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {Alert, Button, View, StyleSheet} = require('react-native');
|
||||
const {RNTesterThemeContext} = require('../../components/RNTesterTheme');
|
||||
const React = require('react');
|
||||
const {Alert, Button, StyleSheet, View} = require('react-native');
|
||||
|
||||
function onButtonPress(buttonName: string) {
|
||||
Alert.alert(`Your application has been ${buttonName}!`);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const {Switch, Text, View, Platform} = require('react-native');
|
||||
const {Platform, Switch, Text, View} = require('react-native');
|
||||
|
||||
type OnOffIndicatorProps = $ReadOnly<{|on: boolean, testID: string|}>;
|
||||
function OnOffIndicator({on, testID}: OnOffIndicatorProps) {
|
||||
|
|
|
@ -10,18 +10,16 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {Text, TextInput, View, StyleSheet, Switch} = require('react-native');
|
||||
|
||||
const TextInputSharedExamples = require('./TextInputSharedExamples');
|
||||
const {useState} = React;
|
||||
|
||||
import type {
|
||||
RNTesterModule,
|
||||
RNTesterModuleExample,
|
||||
} from '../../types/RNTesterTypes';
|
||||
|
||||
const TextInputSharedExamples = require('./TextInputSharedExamples.js');
|
||||
const React = require('react');
|
||||
const {StyleSheet, Switch, Text, TextInput, View} = require('react-native');
|
||||
const {useState} = React;
|
||||
|
||||
class ToggleDefaultPaddingExample extends React.Component<
|
||||
$FlowFixMeProps,
|
||||
$FlowFixMeState,
|
||||
|
|
|
@ -10,14 +10,15 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import {RNTesterModule} from '../../types/RNTesterTypes';
|
||||
import type {RNTesterModule} from '../../types/RNTesterTypes';
|
||||
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Platform,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
Platform,
|
||||
Alert,
|
||||
} from 'react-native';
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"baseVersion": "0.74.0-nightly-20231031-572dd76ba",
|
||||
"baseVersion": "0.74.0-nightly-20231116-fa89dd68b",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "package.json",
|
||||
"baseFile": "package.json",
|
||||
"baseHash": "ab665294fdba261fa262915875342f145ba765e7"
|
||||
"baseHash": "fefc1a41353735adfc86885e6d11eebb659501a5"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -80,10 +80,10 @@
|
|||
"eslint-plugin-react-native": "^4.0.0",
|
||||
"eslint-plugin-redundant-undefined": "^0.4.0",
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"flow-api-translator": "0.17.0",
|
||||
"flow-bin": "^0.219.4",
|
||||
"flow-api-translator": "0.17.1",
|
||||
"flow-bin": "^0.222.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.17.0",
|
||||
"hermes-eslint": "0.17.1",
|
||||
"inquirer": "^7.1.0",
|
||||
"jest": "^29.6.3",
|
||||
"jest-junit": "^10.0.0",
|
||||
|
@ -95,7 +95,7 @@
|
|||
"mock-fs": "^5.1.4",
|
||||
"nullthrows": "^1.1.1",
|
||||
"prettier": "2.8.8",
|
||||
"prettier-plugin-hermes-parser": "0.17.0",
|
||||
"prettier-plugin-hermes-parser": "0.17.1",
|
||||
"react": "18.2.0",
|
||||
"react-test-renderer": "18.2.0",
|
||||
"rimraf": "^3.0.2",
|
||||
|
|
|
@ -8,16 +8,17 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {useRef, useState} from 'react';
|
||||
import {View, Button, Text, UIManager} from 'react-native';
|
||||
import type {MyLegacyViewType} from './MyLegacyViewNativeComponent';
|
||||
import type {MyNativeViewType} from './MyNativeViewNativeComponent';
|
||||
|
||||
import RNTMyLegacyNativeView from './MyLegacyViewNativeComponent';
|
||||
import {callNativeMethodToChangeBackgroundColor} from './MyLegacyViewNativeComponent';
|
||||
import RNTMyNativeView, {
|
||||
Commands as RNTMyNativeViewCommands,
|
||||
} from './MyNativeViewNativeComponent';
|
||||
import RNTMyLegacyNativeView from './MyLegacyViewNativeComponent';
|
||||
import type {MyLegacyViewType} from './MyLegacyViewNativeComponent';
|
||||
import type {MyNativeViewType} from './MyNativeViewNativeComponent';
|
||||
import {callNativeMethodToChangeBackgroundColor} from './MyLegacyViewNativeComponent';
|
||||
import * as React from 'react';
|
||||
import {useRef, useState} from 'react';
|
||||
import {Button, Text, UIManager, View} from 'react-native';
|
||||
const colors = [
|
||||
'#0000FF',
|
||||
'#FF0000',
|
||||
|
|
|
@ -8,17 +8,18 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
||||
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
||||
import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
|
||||
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
|
||||
import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
|
||||
import type {
|
||||
Float,
|
||||
Double,
|
||||
Int32,
|
||||
BubblingEventHandler,
|
||||
Double,
|
||||
Float,
|
||||
Int32,
|
||||
} from 'react-native/Libraries/Types/CodegenTypes';
|
||||
|
||||
import * as React from 'react';
|
||||
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
||||
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
||||
|
||||
type Event = $ReadOnly<{
|
||||
values: $ReadOnlyArray<Int32>,
|
||||
|
|
|
@ -73,6 +73,9 @@ export interface Spec extends TurboModule {
|
|||
+getUnion: (x: UnionFloat, y: UnionString, z: UnionObject) => string;
|
||||
+getValue: (x: number, y: string, z: ObjectStruct) => ValueStruct;
|
||||
+getValueWithCallback: (callback: (value: string) => void) => void;
|
||||
+setValueCallbackWithSubscription: (
|
||||
callback: (value: string) => void,
|
||||
) => () => void;
|
||||
+getValueWithPromise: (error: boolean) => Promise<string>;
|
||||
+getWithWithOptionalArgs: (optionalArg?: boolean) => ?boolean;
|
||||
+voidFunc: () => void;
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
*/
|
||||
|
||||
import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
|
||||
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
|
||||
import type {UnsafeObject} from 'react-native/Libraries/Types/CodegenTypes';
|
||||
|
||||
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
|
||||
|
||||
export type ScreenshotManagerOptions = UnsafeObject;
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
import RNTesterApp from './RNTesterAppShared';
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
AppRegistry.registerComponent('RNTesterApp', () => RNTesterApp);
|
||||
|
||||
|
|
|
@ -8,16 +8,15 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import type {RNTesterModuleInfo} from './types/RNTesterTypes';
|
||||
import type {Node} from 'react';
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
import React from 'react';
|
||||
|
||||
import SnapshotViewIOS from './examples/Snapshot/SnapshotViewIOS.ios';
|
||||
import RNTesterModuleContainer from './components/RNTesterModuleContainer';
|
||||
import RNTesterList from './utils/RNTesterList';
|
||||
import SnapshotViewIOS from './examples/Snapshot/SnapshotViewIOS.ios';
|
||||
import RNTesterApp from './RNTesterAppShared';
|
||||
import type {RNTesterModuleInfo} from './types/RNTesterTypes';
|
||||
import RNTesterList from './utils/RNTesterList';
|
||||
import React from 'react';
|
||||
import {AppRegistry} from 'react-native';
|
||||
|
||||
AppRegistry.registerComponent('SetPropertiesExampleApp', () =>
|
||||
require('./examples/SetPropertiesExample/SetPropertiesExampleApp'),
|
||||
|
|
|
@ -11,17 +11,16 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {
|
||||
ActivityIndicator,
|
||||
Animated,
|
||||
Image,
|
||||
Platform,
|
||||
TouchableHighlight,
|
||||
StyleSheet,
|
||||
Switch,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableHighlight,
|
||||
View,
|
||||
} = require('react-native');
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
children?: ?React.Node,
|
||||
|
|
|
@ -10,11 +10,12 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import * as React from 'react';
|
||||
import {Text, Pressable, StyleSheet, View} from 'react-native';
|
||||
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {Pressable, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
testID?: ?string,
|
||||
|
|
|
@ -8,11 +8,10 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import RNTesterComponentTitle from './RNTesterComponentTitle';
|
||||
|
||||
import {Platform, StyleSheet, Pressable, Text, View} from 'react-native';
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {Platform, Pressable, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
type ViewStyleProp = $ElementType<React.ElementConfig<typeof View>, 'style'>;
|
||||
type Props = {
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {View, Text, StyleSheet, Button, Platform} from 'react-native';
|
||||
import {type RNTesterTheme} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {Button, Platform, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
function RNTTestDetails({
|
||||
description,
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import {
|
||||
Text,
|
||||
View,
|
||||
SafeAreaView,
|
||||
Button,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
} from 'react-native';
|
||||
import * as React from 'react';
|
||||
import RNTesterDocumentationURL from './RNTesterDocumentationURL';
|
||||
import {type RNTesterTheme} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Button,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
const HeaderIOS = ({
|
||||
onBack,
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
|
|
|
@ -10,12 +10,11 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {Pressable, StyleSheet, Text} = require('react-native');
|
||||
|
||||
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
const React = require('react');
|
||||
const {Pressable, StyleSheet, Text} = require('react-native');
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
testID?: string,
|
||||
textTestID?: string,
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
const React = require('react');
|
||||
const {StyleSheet, Text} = require('react-native');
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
|
|
|
@ -8,19 +8,20 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
import type {SectionData} from '../types/RNTesterTypes';
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
const RNTesterListFilters = require('./RNTesterListFilters');
|
||||
const React = require('react');
|
||||
const {
|
||||
Image,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
TextInput,
|
||||
View,
|
||||
ScrollView,
|
||||
Image,
|
||||
Platform,
|
||||
} = require('react-native');
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
import type {SectionData} from '../types/RNTesterTypes';
|
||||
|
||||
type Props<T> = {
|
||||
filter: Function,
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {StyleSheet, Text, TouchableOpacity, View} = require('react-native');
|
||||
|
||||
const filters = ['Basic', 'UI', 'ListView', 'iOS', 'Android'];
|
||||
|
|
|
@ -8,19 +8,20 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
const RNTesterBlock = require('./RNTesterBlock');
|
||||
const RNTesterExampleFilter = require('./RNTesterExampleFilter');
|
||||
import RNTPressableRow from './RNTPressableRow';
|
||||
import {RNTesterThemeContext, type RNTesterTheme} from './RNTesterTheme';
|
||||
import {View, Text, StyleSheet, Platform} from 'react-native';
|
||||
import RNTTestDetails from './RNTTestDetails';
|
||||
|
||||
import type {
|
||||
RNTesterModule,
|
||||
RNTesterModuleExample,
|
||||
} from '../types/RNTesterTypes';
|
||||
|
||||
import {type RNTesterTheme, RNTesterThemeContext} from './RNTesterTheme';
|
||||
import RNTPressableRow from './RNTPressableRow';
|
||||
import RNTTestDetails from './RNTTestDetails';
|
||||
import * as React from 'react';
|
||||
import {Platform, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const RNTesterBlock = require('./RNTesterBlock');
|
||||
const RNTesterExampleFilter = require('./RNTesterExampleFilter');
|
||||
|
||||
type Props = {
|
||||
module: RNTesterModule,
|
||||
example?: ?RNTesterModuleExample,
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
const RNTesterExampleFilter = require('./RNTesterExampleFilter');
|
||||
import RNTPressableRow from './RNTPressableRow';
|
||||
const React = require('react');
|
||||
|
||||
const {Platform, SectionList, StyleSheet, Text, View} = require('react-native');
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import RNTPressableRow from './RNTPressableRow';
|
||||
|
||||
const RNTesterExampleFilter = require('./RNTesterExampleFilter');
|
||||
const React = require('react');
|
||||
const {Platform, SectionList, StyleSheet, Text, View} = require('react-native');
|
||||
|
||||
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
|
||||
* LTI update could not be added via codemod */
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
|
||||
import type {RNTesterTheme} from './RNTesterTheme';
|
||||
|
||||
import * as React from 'react';
|
||||
import {Text, View, StyleSheet, Image, Pressable} from 'react-native';
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {Image, Pressable, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
|
||||
* LTI update could not be added via codemod */
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import {useContext} from 'react';
|
||||
|
||||
const RNTesterTitle = require('./RNTesterTitle');
|
||||
const React = require('react');
|
||||
const {SafeAreaView, ScrollView, StyleSheet, View} = require('react-native');
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
import {useContext} from 'react';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
children?: React.Node,
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
|
||||
import * as React from 'react';
|
||||
import {Appearance} from 'react-native';
|
||||
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
|
||||
export type RNTesterTheme = {
|
||||
LabelColor: ColorValue,
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {StyleSheet, Text, View} = require('react-native');
|
||||
import {RNTesterThemeContext} from './RNTesterTheme';
|
||||
|
||||
const React = require('react');
|
||||
const {StyleSheet, Text, View} = require('react-native');
|
||||
|
||||
class RNTesterTitle extends React.Component<$FlowFixMeProps> {
|
||||
render(): React.Node {
|
||||
return (
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {Image, Text, TouchableHighlight, View} = require('react-native');
|
||||
|
||||
function Basic(): React.Node {
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {Text, View, StyleSheet} from 'react-native';
|
||||
import RNTOption from './RNTOption';
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const PANGRAMS = {
|
||||
arabic:
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
import type {RNTesterModule} from '../types/RNTesterTypes';
|
||||
|
||||
import RNTesterModuleContainer from './RNTesterModuleContainer';
|
||||
import type {RNTesterModule} from '../types/RNTesterTypes';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const createExamplePage = function (
|
||||
title: ?string,
|
||||
|
|
|
@ -10,17 +10,18 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
import RNTesterBlock from '../../components/RNTesterBlock';
|
||||
import RNTesterPage from '../../components/RNTesterPage';
|
||||
import {
|
||||
Alert,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const importantForAccessibilityValues = [
|
||||
'auto',
|
||||
'yes',
|
||||
|
|
|
@ -11,33 +11,31 @@
|
|||
'use strict';
|
||||
|
||||
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
const React = require('react');
|
||||
const {
|
||||
ImageBackground,
|
||||
AccessibilityInfo,
|
||||
TextInput,
|
||||
Button,
|
||||
Image,
|
||||
Text,
|
||||
View,
|
||||
TouchableOpacity,
|
||||
TouchableNativeFeedback,
|
||||
TouchableWithoutFeedback,
|
||||
Alert,
|
||||
StyleSheet,
|
||||
Platform,
|
||||
Switch,
|
||||
ScrollView,
|
||||
} = require('react-native');
|
||||
import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
|
||||
|
||||
const RNTesterBlock = require('../../components/RNTesterBlock');
|
||||
|
||||
const checkImageSource = require('./check.png');
|
||||
const uncheckImageSource = require('./uncheck.png');
|
||||
const mixedCheckboxImageSource = require('./mixed.png');
|
||||
const uncheckImageSource = require('./uncheck.png');
|
||||
const React = require('react');
|
||||
const {createRef} = require('react');
|
||||
const {
|
||||
AccessibilityInfo,
|
||||
Alert,
|
||||
Button,
|
||||
Image,
|
||||
ImageBackground,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Switch,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableNativeFeedback,
|
||||
TouchableOpacity,
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
} = require('react-native');
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sectionContainer: {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const {Text, View, Alert} = require('react-native');
|
||||
const {Alert, Text, View} = require('react-native');
|
||||
|
||||
type Props = $ReadOnly<{||}>;
|
||||
class AccessibilityIOSExample extends React.Component<Props> {
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
|
||||
import type {NativeMethods} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
|
||||
|
||||
const ScreenshotManager = require('../../../NativeModuleExample/NativeScreenshotManager');
|
||||
const React = require('react');
|
||||
const {
|
||||
ActionSheetIOS,
|
||||
Alert,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Alert,
|
||||
findNodeHandle,
|
||||
} = require('react-native');
|
||||
const ScreenshotManager = require('../../../NativeModuleExample/NativeScreenshotManager');
|
||||
|
||||
const BUTTONS = ['Option 0', 'Option 1', 'Option 2', 'Delete', 'Cancel'];
|
||||
const DESTRUCTIVE_INDEX = 3;
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import type {RNTesterModule} from '../../types/RNTesterTypes';
|
||||
import {Alert, StyleSheet, Text, Pressable, View} from 'react-native';
|
||||
|
||||
import * as React from 'react';
|
||||
import {Alert, Pressable, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
// Shows log on the screen
|
||||
const Log = ({message}: {message: string}) =>
|
||||
|
|
|
@ -9,17 +9,18 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModule} from '../../types/RNTesterTypes';
|
||||
import RotatingImagesExample from './RotatingImagesExample';
|
||||
|
||||
import ColorStylesExample from './ColorStylesExample';
|
||||
import ComposeAnimationsWithEasingExample from './ComposeAnimationsWithEasingExample';
|
||||
import ComposingExample from './ComposingExample';
|
||||
import ContinuousInteractionsExample from './ContinuousInteractionsExample';
|
||||
import LoopingExample from './LoopingExample';
|
||||
import MovingBoxExample from './MovingBoxExample';
|
||||
import EasingExample from './EasingExample';
|
||||
import FadeInViewExample from './FadeInViewExample';
|
||||
import ComposeAnimationsWithEasingExample from './ComposeAnimationsWithEasingExample';
|
||||
import LoopingExample from './LoopingExample';
|
||||
import MovingBoxExample from './MovingBoxExample';
|
||||
import RotatingImagesExample from './RotatingImagesExample';
|
||||
import TransformBounceExample from './TransformBounceExample';
|
||||
import ComposingExample from './ComposingExample';
|
||||
import TransformStylesExample from './TransformStylesExample';
|
||||
import ColorStylesExample from './ColorStylesExample';
|
||||
|
||||
export default ({
|
||||
framework: 'React',
|
||||
|
|
|
@ -9,11 +9,12 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import * as React from 'react';
|
||||
import {Animated, View, StyleSheet, Text} from 'react-native';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
function AnimatedView({useNativeDriver}: {useNativeDriver: boolean}) {
|
||||
const animations = [];
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import * as React from 'react';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import {Text, Easing, StyleSheet, View, Animated} from 'react-native';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import * as React from 'react';
|
||||
import {Animated, Easing, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
content: {
|
||||
|
|
|
@ -11,16 +11,17 @@
|
|||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import type {CompositeAnimation} from 'react-native/Libraries/Animated/AnimatedMock';
|
||||
import type AnimatedValue from 'react-native/Libraries/Animated/nodes/AnimatedValue';
|
||||
import * as React from 'react';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Text,
|
||||
StyleSheet,
|
||||
View,
|
||||
Animated,
|
||||
FlatList,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
useWindowDimensions,
|
||||
} from 'react-native';
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
|
||||
import * as React from 'react';
|
||||
import {Text} from 'react-native';
|
||||
|
||||
|
|
|
@ -9,17 +9,18 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import * as React from 'react';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Text,
|
||||
StyleSheet,
|
||||
View,
|
||||
Animated,
|
||||
SectionList,
|
||||
Easing,
|
||||
SectionList,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{||}>;
|
||||
|
|
|
@ -9,11 +9,12 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import * as React from 'react';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import {Text, StyleSheet, View, Animated} from 'react-native';
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
content: {
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {useEffect} from 'react';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
export default ({
|
||||
title: 'Looping Example',
|
||||
|
|
|
@ -9,11 +9,12 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import * as React from 'react';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import {Text, StyleSheet, View, Animated} from 'react-native';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
const containerWidth = 200;
|
||||
const boxSize = 50;
|
||||
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import {Animated, View, StyleSheet} from 'react-native';
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
rotatingImage: {
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import {Text, StyleSheet, View, Animated} from 'react-native';
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
content: {
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
*/
|
||||
|
||||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
|
||||
import {RNTesterThemeContext} from '../../components/RNTesterTheme';
|
||||
import RNTOption from '../../components/RNTOption';
|
||||
import * as React from 'react';
|
||||
import {Animated, Text, View, StyleSheet} from 'react-native';
|
||||
|
||||
import RNTConfigurationBlock from '../../components/RNTConfigurationBlock';
|
||||
import RNTesterButton from '../../components/RNTesterButton';
|
||||
import {RNTesterThemeContext} from '../../components/RNTesterTheme';
|
||||
import RNTOption from '../../components/RNTOption';
|
||||
import ToggleNativeDriver from './utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const transformProperties = {
|
||||
rotate: {outputRange: ['0deg', '360deg'], selected: false},
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import {View, Text, StyleSheet, Switch} from 'react-native';
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Switch, Text, View} from 'react-native';
|
||||
|
||||
type ViewStyleProp = $ElementType<React.ElementConfig<typeof View>, 'style'>;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const AnExSet = require('./AnExSet');
|
||||
const React = require('react');
|
||||
const {
|
||||
Animated,
|
||||
|
@ -19,8 +20,6 @@ const {
|
|||
View,
|
||||
} = require('react-native');
|
||||
|
||||
const AnExSet = require('./AnExSet');
|
||||
|
||||
const CIRCLE_SIZE = 80;
|
||||
const CIRCLE_MARGIN = 18;
|
||||
const NUM_CIRCLES = 30;
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
import type {GestureState} from 'react-native/Libraries/Interaction/PanResponder';
|
||||
import type {PressEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {Animated, PanResponder, StyleSheet, View} = require('react-native');
|
||||
|
||||
class AnExChained extends React.Component<Object, any> {
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {
|
||||
Animated,
|
||||
Image,
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const AnExBobble = require('./AnExBobble');
|
||||
const AnExChained = require('./AnExChained');
|
||||
const AnExScroll = require('./AnExScroll');
|
||||
const AnExTilt = require('./AnExTilt');
|
||||
const React = require('react');
|
||||
const {
|
||||
Animated,
|
||||
|
@ -19,11 +23,6 @@ const {
|
|||
View,
|
||||
} = require('react-native');
|
||||
|
||||
const AnExBobble = require('./AnExBobble');
|
||||
const AnExChained = require('./AnExChained');
|
||||
const AnExScroll = require('./AnExScroll');
|
||||
const AnExTilt = require('./AnExTilt');
|
||||
|
||||
class AnExSet extends React.Component<Object, any> {
|
||||
constructor(props: Object) {
|
||||
super(props);
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
import type {AppStateValues} from 'react-native/Libraries/AppState/AppState';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
import {type EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
|
||||
const {AppState, Text, View, Platform} = require('react-native');
|
||||
|
||||
const React = require('react');
|
||||
const {AppState, Platform, Text, View} = require('react-native');
|
||||
|
||||
class AppStateSubscription extends React.Component<
|
||||
$FlowFixMeProps,
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {useState, useEffect} from 'react';
|
||||
import {Appearance, Text, useColorScheme, View, Button} from 'react-native';
|
||||
import type {
|
||||
AppearancePreferences,
|
||||
ColorSchemeName,
|
||||
} from 'react-native/Libraries/Utilities/NativeAppearance';
|
||||
|
||||
import {RNTesterThemeContext, themes} from '../../components/RNTesterTheme';
|
||||
import * as React from 'react';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {Appearance, Button, Text, View, useColorScheme} from 'react-native';
|
||||
|
||||
function ColorSchemeSubscription() {
|
||||
const [colorScheme, setScheme] = useState<?ColorSchemeName | string>(
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
'use strict';
|
||||
|
||||
import type {RNTesterModule} from '../../types/RNTesterTypes';
|
||||
import * as React from 'react';
|
||||
|
||||
import * as React from 'react';
|
||||
import {
|
||||
DynamicColorIOS,
|
||||
Platform,
|
||||
PlatformColor,
|
||||
StyleSheet,
|
||||
View,
|
||||
PlatformColor,
|
||||
Platform,
|
||||
DynamicColorIOS,
|
||||
} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {Alert, Button, View, StyleSheet} = require('react-native');
|
||||
const {RNTesterThemeContext} = require('../../components/RNTesterTheme');
|
||||
const React = require('react');
|
||||
const {Alert, Button, StyleSheet, View} = require('react-native');
|
||||
|
||||
function onButtonPress(buttonName: string) {
|
||||
Alert.alert(`Your application has been ${buttonName}!`);
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
*/
|
||||
|
||||
import type {Node} from 'react';
|
||||
import {Button} from 'react-native';
|
||||
|
||||
import React from 'react';
|
||||
import {Button} from 'react-native';
|
||||
|
||||
exports.displayName = (undefined: ?string);
|
||||
exports.framework = 'React';
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import {Dimensions, Text, useWindowDimensions} from 'react-native';
|
||||
import * as React from 'react';
|
||||
import {useState, useEffect} from 'react';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {Dimensions, Text, useWindowDimensions} from 'react-native';
|
||||
|
||||
type Props = {dim: string};
|
||||
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {Text, Animated, StyleSheet} from 'react-native';
|
||||
import type {RNTesterModuleExample} from '../../../types/RNTesterTypes';
|
||||
|
||||
import ToggleNativeDriver from '../../Animated/utils/ToggleNativeDriver';
|
||||
import * as React from 'react';
|
||||
import {Animated, StyleSheet, Text} from 'react-native';
|
||||
|
||||
const WIDTH = 200;
|
||||
const HEIGHT = 250;
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {ScrollView, View, StyleSheet} from 'react-native';
|
||||
import EventfulView from '../W3CPointerEventsEventfulView';
|
||||
import type {RNTesterModuleExample} from '../../../types/RNTesterTypes';
|
||||
|
||||
import EventfulView from '../W3CPointerEventsEventfulView';
|
||||
import * as React from 'react';
|
||||
import {ScrollView, StyleSheet, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
borderWidth: 1,
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {View, Text, StyleSheet} from 'react-native';
|
||||
import type {RNTesterModuleExample} from '../../../types/RNTesterTypes';
|
||||
import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {height: '30%', width: '100%', backgroundColor: 'black'},
|
||||
properties: {},
|
||||
|
|
|
@ -10,12 +10,11 @@
|
|||
|
||||
import type {PlatformTestComponentBaseProps} from './RNTesterPlatformTestTypes';
|
||||
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, View, Text} from 'react-native';
|
||||
|
||||
import RNTesterPlatformTestInstructions from './RNTesterPlatformTestInstructions';
|
||||
import usePlatformTestHarness from './usePlatformTestHarness';
|
||||
import RNTesterPlatformTestResultView from './RNTesterPlatformTestResultView';
|
||||
import usePlatformTestHarness from './usePlatformTestHarness';
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
title: string,
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {View, Text, StyleSheet} from 'react-native';
|
||||
|
||||
import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
instructions?: $ReadOnlyArray<string>,
|
||||
style?: ?ViewStyleProp,
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
|
||||
import RNTesterPlatformTestResultsText from './RNTesterPlatformTestResultsText';
|
||||
|
||||
import * as React from 'react';
|
||||
import {View, Text, StyleSheet, TouchableHighlight} from 'react-native';
|
||||
import {StyleSheet, Text, TouchableHighlight, View} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
numFail: number,
|
||||
|
|
|
@ -8,34 +8,33 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import type {RenderItemProps} from 'react-native/Libraries/Lists/VirtualizedList';
|
||||
import type {
|
||||
ViewStyleProp,
|
||||
TextStyle,
|
||||
} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
import type {
|
||||
PlatformTestResult,
|
||||
PlatformTestResultStatus,
|
||||
} from './RNTesterPlatformTestTypes';
|
||||
import type {RenderItemProps} from 'react-native/Libraries/Lists/VirtualizedList';
|
||||
import type {
|
||||
TextStyle,
|
||||
ViewStyleProp,
|
||||
} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
|
||||
import RNTesterPlatformTestMinimizedResultView from './RNTesterPlatformTestMinimizedResultView';
|
||||
import RNTesterPlatformTestResultsText from './RNTesterPlatformTestResultsText';
|
||||
|
||||
import * as React from 'react';
|
||||
import {useMemo, useState, useCallback} from 'react';
|
||||
import {useCallback, useMemo, useState} from 'react';
|
||||
import {
|
||||
Button,
|
||||
Switch,
|
||||
View,
|
||||
Text,
|
||||
StyleSheet,
|
||||
FlatList,
|
||||
Modal,
|
||||
SafeAreaView,
|
||||
TextInput,
|
||||
KeyboardAvoidingView,
|
||||
Modal,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
Switch,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
const DISPLAY_STATUS_MAPPING: {[PlatformTestResultStatus]: string} = {
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import {Text, StyleSheet} from 'react-native';
|
||||
import * as React from 'react';
|
||||
import {StyleSheet, Text} from 'react-native';
|
||||
|
||||
type Props = $ReadOnly<{
|
||||
numPass: number,
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import {useState, useCallback, useMemo, useRef, useEffect} from 'react';
|
||||
|
||||
import type {
|
||||
PlatformTestResult,
|
||||
PlatformTestHarness,
|
||||
PlatformTestCase,
|
||||
PlatformTestAssertionResult,
|
||||
PlatformTestCase,
|
||||
PlatformTestContext,
|
||||
PlatformTestHarness,
|
||||
PlatformTestResult,
|
||||
SyncTestOptions,
|
||||
} from './RNTesterPlatformTestTypes';
|
||||
|
||||
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
|
||||
|
||||
type AsyncTestStatus = 'NOT_RAN' | 'COMPLETED' | 'TIMED_OUT';
|
||||
|
||||
function didAllAssertionsPass(
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import {useState} from 'react';
|
||||
import {StyleSheet, View, Pressable, ScrollView, Text} from 'react-native';
|
||||
import {EventTracker} from './PointerEventSupport';
|
||||
import type {EventOccurrence} from './PointerEventSupport';
|
||||
import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import {EventTracker} from './PointerEventSupport';
|
||||
import * as React from 'react';
|
||||
import {useState} from 'react';
|
||||
import {Pressable, ScrollView, StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
const eventsToTrack = ['onClick'];
|
||||
|
||||
export default function PointerEventAccessibility(props: {}): React.MixedElement {
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
*/
|
||||
|
||||
import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
import type {ElementRef} from 'react';
|
||||
import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useRef} from 'react';
|
||||
import {StyleSheet, View, Text} from 'react-native';
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import type {ElementRef} from 'react';
|
||||
import {StyleSheet, Text, View} from 'react-native';
|
||||
|
||||
// adapted from https://github.com/web-platform-tests/wpt/blob/master/pointerevents/pointerevent_capture_mouse.html
|
||||
function PointerEventCaptureMouseTestCase(
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
*/
|
||||
|
||||
import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
import type {PlatformTestContext} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import {check_PointerEvent} from './PointerEventSupport';
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import {check_PointerEvent} from './PointerEventSupport';
|
||||
import * as React from 'react';
|
||||
import {useRef, useCallback} from 'react';
|
||||
import {useCallback, useRef} from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
import type {PlatformTestContext} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
|
||||
function checkClickEventProperties(
|
||||
assert_equals: PlatformTestContext['assert_equals'],
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
*/
|
||||
|
||||
import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
import type {EventOccurrence} from './PointerEventSupport';
|
||||
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import {EventTracker} from './PointerEventSupport';
|
||||
import {mkEvent} from './PointerEventSupport';
|
||||
import * as React from 'react';
|
||||
import {useRef} from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
import {EventTracker} from './PointerEventSupport';
|
||||
import type {EventOccurrence} from './PointerEventSupport';
|
||||
import {mkEvent} from './PointerEventSupport';
|
||||
|
||||
const eventsToTrack = ['onClick', 'onPointerDown', 'onPointerUp'];
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatf
|
|||
import type {EventOccurrence, EventTrackerProps} from './PointerEventSupport';
|
||||
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
|
||||
|
||||
import {EventTracker, mkEvent} from './PointerEventSupport';
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import {EventTracker, mkEvent} from './PointerEventSupport';
|
||||
import * as React from 'react';
|
||||
import {useRef} from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
|
|
@ -13,7 +13,7 @@ import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
|||
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import * as React from 'react';
|
||||
import {useRef, useCallback, useState, useMemo} from 'react';
|
||||
import {useCallback, useMemo, useRef, useState} from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
|
@ -15,7 +15,7 @@ import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
|||
import {check_PointerEvent} from './PointerEventSupport';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useRef} from 'react';
|
||||
import {StyleSheet, View, ScrollView} from 'react-native';
|
||||
import {ScrollView, StyleSheet, View} from 'react-native';
|
||||
|
||||
// adapted from https://github.com/web-platform-tests/wpt/blob/master/pointerevents/pointerevent_pointercancel_touch.html
|
||||
function PointerEventPointerCancelTouchTestCase(
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import {useTestEventHandler} from './PointerEventSupport';
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import {useTestEventHandler} from './PointerEventSupport';
|
||||
import * as React from 'react';
|
||||
import {useRef} from 'react';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
|
|
@ -14,7 +14,7 @@ import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
|||
import RNTesterPlatformTestEventRecorder from '../PlatformTest/RNTesterPlatformTestEventRecorder';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useState} from 'react';
|
||||
import {View, StyleSheet} from 'react-native';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
a: {
|
||||
|
|
|
@ -14,7 +14,7 @@ import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
|||
import RNTesterPlatformTestEventRecorder from '../PlatformTest/RNTesterPlatformTestEventRecorder';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useState} from 'react';
|
||||
import {View, StyleSheet} from 'react-native';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
a: {
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
import type {PlatformTestComponentBaseProps} from '../PlatformTest/RNTesterPlatformTestTypes';
|
||||
import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
||||
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import RNTesterPlatformTestEventRecorder from '../PlatformTest/RNTesterPlatformTestEventRecorder';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useState} from 'react';
|
||||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
import RNTesterPlatformTestEventRecorder from '../PlatformTest/RNTesterPlatformTestEventRecorder';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
end: {
|
||||
|
|
|
@ -14,7 +14,7 @@ import type {PointerEvent} from 'react-native/Libraries/Types/CoreEventTypes';
|
|||
import RNTesterPlatformTest from '../PlatformTest/RNTesterPlatformTest';
|
||||
import * as React from 'react';
|
||||
import {useCallback, useRef} from 'react';
|
||||
import {View, StyleSheet} from 'react-native';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
target: {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче