@office-iss/react-native-win32 0.71.17 → 0.71.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +1 -0
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +6 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +49 -7
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js +37 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +3 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/ReactNative/AppContainer.js +28 -6
- package/Libraries/promiseRejectionTrackingOptions.js +26 -7
- package/overrides.json +15 -4
- package/package.json +9 -6
- package/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +161 -0
package/.flowconfig
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
; initRNLibraries build step
|
|
11
11
|
<PROJECT_ROOT>/index.js
|
|
12
12
|
<PROJECT_ROOT>/Libraries/Alert/Alert.js
|
|
13
|
+
<PROJECT_ROOT>/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js
|
|
13
14
|
<PROJECT_ROOT>/Libraries/Components/Pressable/Pressable.js
|
|
14
15
|
<PROJECT_ROOT>/Libraries/Components/SafeAreaView/SafeAreaView.js
|
|
15
16
|
<PROJECT_ROOT>/Libraries/Components/TextInput/TextInput.js
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 27 May 2024 15:13:13 GMT",
|
|
6
|
+
"tag": "@office-iss/react-native-win32_v0.71.19",
|
|
7
|
+
"version": "0.71.19",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "cbfeca1bf8402bb8615d899328329d2690534f08",
|
|
14
|
+
"comment": "integrate react-native 0.71.19"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 23 Oct 2023 15:14:24 GMT",
|
|
21
|
+
"tag": "@office-iss/react-native-win32_v0.71.18",
|
|
22
|
+
"version": "0.71.18",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "krsiler@microsoft.com",
|
|
27
|
+
"package": "@office-iss/react-native-win32",
|
|
28
|
+
"commit": "7f2e4a1c25ff31e216473db135cbd445406d1f5c",
|
|
29
|
+
"comment": "add support for announceForAccessibilityWithOptions"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Tue, 03 Oct 2023 02:37:00 GMT",
|
|
6
36
|
"tag": "@office-iss/react-native-win32_v0.71.17",
|
|
7
37
|
"version": "0.71.17",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 27 May 2024 15:13:13 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.71.
|
|
7
|
+
## 0.71.19
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Mon, 27 May 2024 15:13:13 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- integrate react-native 0.71.19 (email not defined)
|
|
14
14
|
|
|
15
|
+
## 0.71.18
|
|
16
|
+
|
|
17
|
+
Mon, 23 Oct 2023 15:14:24 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- add support for announceForAccessibilityWithOptions (krsiler@microsoft.com)
|
|
22
|
+
|
|
23
|
+
## 0.71.17
|
|
24
|
+
|
|
25
|
+
Tue, 03 Oct 2023 02:37:00 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- Have RCTNetworking.win32 fork RCTNetworking.ios (#12199) (julio.rocha@microsoft.com)
|
|
30
|
+
|
|
15
31
|
## 0.71.16
|
|
16
32
|
|
|
17
33
|
Mon, 11 Sep 2023 15:13:29 GMT
|
|
@@ -37,7 +37,7 @@ type AccessibilityAnnouncementFinishedEventHandler = (
|
|
|
37
37
|
event: AccessibilityAnnouncementFinishedEvent,
|
|
38
38
|
) => void;
|
|
39
39
|
|
|
40
|
-
type AccessibilityEventTypes = 'click' | 'focus';
|
|
40
|
+
type AccessibilityEventTypes = 'click' | 'focus' | 'viewHoverEnter';
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @see https://reactnative.dev/docs/accessibilityinfo
|
|
@@ -134,10 +134,14 @@ export interface AccessibilityInfoStatic {
|
|
|
134
134
|
* - `announcement`: The string announced by the screen reader.
|
|
135
135
|
* - `options`: An object that configures the reading options.
|
|
136
136
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
137
|
+
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
137
138
|
*/
|
|
138
139
|
announceForAccessibilityWithOptions(
|
|
139
140
|
announcement: string,
|
|
140
|
-
options: {
|
|
141
|
+
options: {
|
|
142
|
+
queue?: boolean | undefined;
|
|
143
|
+
nativeID?: string | undefined; // win32
|
|
144
|
+
},
|
|
141
145
|
): void;
|
|
142
146
|
|
|
143
147
|
/**
|
|
@@ -18,6 +18,7 @@ import {sendAccessibilityEvent} from '../../ReactNative/RendererProxy';
|
|
|
18
18
|
import Platform from '../../Utilities/Platform';
|
|
19
19
|
import legacySendAccessibilityEvent from './legacySendAccessibilityEvent';
|
|
20
20
|
import NativeAccessibilityInfo from './NativeAccessibilityInfo';
|
|
21
|
+
import NativeAccessibilityInfoWin32 from './NativeAccessibilityInfoWin32';
|
|
21
22
|
import NativeAccessibilityManagerIOS from './NativeAccessibilityManager';
|
|
22
23
|
|
|
23
24
|
// Events that are only supported on Android.
|
|
@@ -167,12 +168,18 @@ const AccessibilityInfo: AccessibilityInfoType = {
|
|
|
167
168
|
*/
|
|
168
169
|
isReduceMotionEnabled(): Promise<boolean> {
|
|
169
170
|
return new Promise((resolve, reject) => {
|
|
170
|
-
if (Platform.OS === 'android'
|
|
171
|
+
if (Platform.OS === 'android') {
|
|
171
172
|
if (NativeAccessibilityInfo != null) {
|
|
172
173
|
NativeAccessibilityInfo.isReduceMotionEnabled(resolve);
|
|
173
174
|
} else {
|
|
174
175
|
reject(null);
|
|
175
176
|
}
|
|
177
|
+
} else if (Platform.OS === 'win32') {
|
|
178
|
+
if (NativeAccessibilityInfoWin32 != null) {
|
|
179
|
+
NativeAccessibilityInfoWin32.isReduceMotionEnabled(resolve);
|
|
180
|
+
} else {
|
|
181
|
+
reject(null);
|
|
182
|
+
}
|
|
176
183
|
} else {
|
|
177
184
|
if (NativeAccessibilityManagerIOS != null) {
|
|
178
185
|
NativeAccessibilityManagerIOS.getCurrentReduceMotionState(
|
|
@@ -249,12 +256,18 @@ const AccessibilityInfo: AccessibilityInfoType = {
|
|
|
249
256
|
*/
|
|
250
257
|
isScreenReaderEnabled(): Promise<boolean> {
|
|
251
258
|
return new Promise((resolve, reject) => {
|
|
252
|
-
if (Platform.OS === 'android'
|
|
259
|
+
if (Platform.OS === 'android') {
|
|
253
260
|
if (NativeAccessibilityInfo != null) {
|
|
254
261
|
NativeAccessibilityInfo.isTouchExplorationEnabled(resolve);
|
|
255
262
|
} else {
|
|
256
263
|
reject(null);
|
|
257
264
|
}
|
|
265
|
+
} else if (Platform.OS === 'win32') {
|
|
266
|
+
if (NativeAccessibilityInfoWin32 != null) {
|
|
267
|
+
NativeAccessibilityInfoWin32.isTouchExplorationEnabled(resolve);
|
|
268
|
+
} else {
|
|
269
|
+
reject(null);
|
|
270
|
+
}
|
|
258
271
|
} else {
|
|
259
272
|
if (NativeAccessibilityManagerIOS != null) {
|
|
260
273
|
NativeAccessibilityManagerIOS.getCurrentVoiceOverState(
|
|
@@ -371,8 +384,10 @@ const AccessibilityInfo: AccessibilityInfoType = {
|
|
|
371
384
|
* See https://reactnative.dev/docs/accessibilityinfo#announceforaccessibility
|
|
372
385
|
*/
|
|
373
386
|
announceForAccessibility(announcement: string): void {
|
|
374
|
-
if (Platform.OS === 'android'
|
|
387
|
+
if (Platform.OS === 'android') {
|
|
375
388
|
NativeAccessibilityInfo?.announceForAccessibility(announcement);
|
|
389
|
+
} else if (Platform.OS === 'win32') {
|
|
390
|
+
NativeAccessibilityInfoWin32?.announceForAccessibility(announcement);
|
|
376
391
|
} else {
|
|
377
392
|
NativeAccessibilityManagerIOS?.announceForAccessibility(announcement);
|
|
378
393
|
}
|
|
@@ -383,18 +398,34 @@ const AccessibilityInfo: AccessibilityInfoType = {
|
|
|
383
398
|
* - `announcement`: The string announced by the screen reader.
|
|
384
399
|
* - `options`: An object that configures the reading options.
|
|
385
400
|
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
401
|
+
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
386
402
|
*/
|
|
403
|
+
// $FlowIgnore[prop-missing]
|
|
387
404
|
announceForAccessibilityWithOptions(
|
|
388
405
|
announcement: string,
|
|
389
|
-
options: {
|
|
406
|
+
options: {
|
|
407
|
+
queue?: boolean,
|
|
408
|
+
nativeID?: string, // win32
|
|
409
|
+
},
|
|
390
410
|
): void {
|
|
391
|
-
if (Platform.OS === 'android'
|
|
411
|
+
if (Platform.OS === 'android') {
|
|
392
412
|
NativeAccessibilityInfo?.announceForAccessibility(announcement);
|
|
413
|
+
} else if (Platform.OS === 'win32') {
|
|
414
|
+
if (NativeAccessibilityInfoWin32?.announceForAccessibilityWithOptions) {
|
|
415
|
+
NativeAccessibilityInfoWin32?.announceForAccessibilityWithOptions(
|
|
416
|
+
announcement,
|
|
417
|
+
options,
|
|
418
|
+
);
|
|
419
|
+
} else {
|
|
420
|
+
NativeAccessibilityInfoWin32?.announceForAccessibility(announcement);
|
|
421
|
+
}
|
|
393
422
|
} else {
|
|
394
423
|
if (NativeAccessibilityManagerIOS?.announceForAccessibilityWithOptions) {
|
|
424
|
+
const {nativeID: _, ...iosOptions} = options;
|
|
425
|
+
// $FlowFixMe[prop-missing]
|
|
395
426
|
NativeAccessibilityManagerIOS?.announceForAccessibilityWithOptions(
|
|
396
427
|
announcement,
|
|
397
|
-
|
|
428
|
+
iosOptions,
|
|
398
429
|
);
|
|
399
430
|
} else {
|
|
400
431
|
NativeAccessibilityManagerIOS?.announceForAccessibility(announcement);
|
|
@@ -408,7 +439,7 @@ const AccessibilityInfo: AccessibilityInfoType = {
|
|
|
408
439
|
* See https://reactnative.dev/docs/accessibilityinfo#getrecommendedtimeoutmillis
|
|
409
440
|
*/
|
|
410
441
|
getRecommendedTimeoutMillis(originalTimeout: number): Promise<number> {
|
|
411
|
-
if (Platform.OS === 'android'
|
|
442
|
+
if (Platform.OS === 'android') {
|
|
412
443
|
return new Promise((resolve, reject) => {
|
|
413
444
|
if (NativeAccessibilityInfo?.getRecommendedTimeoutMillis) {
|
|
414
445
|
NativeAccessibilityInfo.getRecommendedTimeoutMillis(
|
|
@@ -419,6 +450,17 @@ const AccessibilityInfo: AccessibilityInfoType = {
|
|
|
419
450
|
resolve(originalTimeout);
|
|
420
451
|
}
|
|
421
452
|
});
|
|
453
|
+
} else if (Platform.OS === 'win32') {
|
|
454
|
+
return new Promise((resolve, reject) => {
|
|
455
|
+
if (NativeAccessibilityInfoWin32?.getRecommendedTimeoutMillis) {
|
|
456
|
+
NativeAccessibilityInfoWin32.getRecommendedTimeoutMillis(
|
|
457
|
+
originalTimeout,
|
|
458
|
+
resolve,
|
|
459
|
+
);
|
|
460
|
+
} else {
|
|
461
|
+
resolve(originalTimeout);
|
|
462
|
+
}
|
|
463
|
+
});
|
|
422
464
|
} else {
|
|
423
465
|
return Promise.resolve(originalTimeout);
|
|
424
466
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* @format
|
|
6
|
+
* @flow
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type {TurboModule} from '../../TurboModule/RCTExport';
|
|
10
|
+
|
|
11
|
+
import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
|
|
12
|
+
|
|
13
|
+
export interface Spec extends TurboModule {
|
|
14
|
+
+isReduceMotionEnabled: (
|
|
15
|
+
onSuccess: (isReduceMotionEnabled: boolean) => void,
|
|
16
|
+
) => void;
|
|
17
|
+
+isTouchExplorationEnabled: (
|
|
18
|
+
onSuccess: (isScreenReaderEnabled: boolean) => void,
|
|
19
|
+
) => void;
|
|
20
|
+
+isAccessibilityServiceEnabled?: ?(
|
|
21
|
+
onSuccess: (isAccessibilityServiceEnabled: boolean) => void,
|
|
22
|
+
) => void;
|
|
23
|
+
+setAccessibilityFocus: (reactTag: number) => void;
|
|
24
|
+
+announceForAccessibility: (announcement: string) => void;
|
|
25
|
+
// [Win32
|
|
26
|
+
+announceForAccessibilityWithOptions?: (
|
|
27
|
+
announcement: string,
|
|
28
|
+
options: {queue?: boolean, nativeID?: string},
|
|
29
|
+
) => void;
|
|
30
|
+
// Win32]
|
|
31
|
+
+getRecommendedTimeoutMillis?: (
|
|
32
|
+
mSec: number,
|
|
33
|
+
onSuccess: (recommendedTimeoutMillis: number) => void,
|
|
34
|
+
) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);
|
|
@@ -30,6 +30,7 @@ export type LogData = $ReadOnly<{|
|
|
|
30
30
|
message: Message,
|
|
31
31
|
category: Category,
|
|
32
32
|
componentStack: ComponentStack,
|
|
33
|
+
stack?: string,
|
|
33
34
|
|}>;
|
|
34
35
|
|
|
35
36
|
export type Observer = (
|
|
@@ -154,7 +155,7 @@ function appendNewLog(newLog: LogBoxLog) {
|
|
|
154
155
|
if (newLog.level === 'fatal') {
|
|
155
156
|
// If possible, to avoid jank, we don't want to open the error before
|
|
156
157
|
// it's symbolicated. To do that, we optimistically wait for
|
|
157
|
-
//
|
|
158
|
+
// symbolication for up to a second before adding the log.
|
|
158
159
|
const OPTIMISTIC_WAIT_TIME = 1000;
|
|
159
160
|
|
|
160
161
|
let addPendingLog: ?() => void = () => {
|
|
@@ -198,7 +199,7 @@ export function addLog(log: LogData): void {
|
|
|
198
199
|
// otherwise spammy logs would pause rendering.
|
|
199
200
|
setImmediate(() => {
|
|
200
201
|
try {
|
|
201
|
-
const stack = parseErrorStack(errorForStackTrace?.stack);
|
|
202
|
+
const stack = parseErrorStack(log.stack ?? errorForStackTrace?.stack);
|
|
202
203
|
|
|
203
204
|
appendNewLog(
|
|
204
205
|
new LogBoxLog({
|
|
@@ -192,7 +192,7 @@ export function parseComponentStack(message: string): ComponentStack {
|
|
|
192
192
|
if (!s) {
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
|
-
const match = s.match(/(.*) \(at (.*\.js):([\d]+)\)/);
|
|
195
|
+
const match = s.match(/(.*) \(at (.*\.(?:js|jsx|ts|tsx)):([\d]+)\)/);
|
|
196
196
|
if (!match) {
|
|
197
197
|
return null;
|
|
198
198
|
}
|
|
@@ -17,6 +17,8 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
|
|
17
17
|
import {RootTagContext, createRootTag} from './RootTag';
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
|
|
20
|
+
const reactDevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
21
|
+
|
|
20
22
|
type Props = $ReadOnly<{|
|
|
21
23
|
children?: React.Node,
|
|
22
24
|
fabric?: boolean,
|
|
@@ -45,9 +47,17 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
45
47
|
};
|
|
46
48
|
_mainRef: ?React.ElementRef<typeof View>;
|
|
47
49
|
_subscription: ?EventSubscription = null;
|
|
50
|
+
_reactDevToolsAgentListener: ?() => void = null;
|
|
48
51
|
|
|
49
52
|
static getDerivedStateFromError: any = undefined;
|
|
50
53
|
|
|
54
|
+
mountReactDevToolsOverlays(): void {
|
|
55
|
+
const DevtoolsOverlay = require('../Inspector/DevtoolsOverlay').default;
|
|
56
|
+
const devtoolsOverlay = <DevtoolsOverlay inspectedView={this._mainRef} />;
|
|
57
|
+
|
|
58
|
+
this.setState({devtoolsOverlay});
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
componentDidMount(): void {
|
|
52
62
|
if (__DEV__) {
|
|
53
63
|
if (!this.props.internal_excludeInspector) {
|
|
@@ -69,13 +79,21 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
69
79
|
this.setState({inspector});
|
|
70
80
|
},
|
|
71
81
|
);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
|
|
83
|
+
if (reactDevToolsHook != null) {
|
|
84
|
+
if (reactDevToolsHook.reactDevtoolsAgent) {
|
|
85
|
+
// In case if this is not the first AppContainer rendered and React DevTools are already attached
|
|
86
|
+
this.mountReactDevToolsOverlays();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this._reactDevToolsAgentListener = () =>
|
|
91
|
+
this.mountReactDevToolsOverlays();
|
|
92
|
+
|
|
93
|
+
reactDevToolsHook.on(
|
|
94
|
+
'react-devtools',
|
|
95
|
+
this._reactDevToolsAgentListener,
|
|
77
96
|
);
|
|
78
|
-
this.setState({devtoolsOverlay});
|
|
79
97
|
}
|
|
80
98
|
}
|
|
81
99
|
}
|
|
@@ -85,6 +103,10 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
85
103
|
if (this._subscription != null) {
|
|
86
104
|
this._subscription.remove();
|
|
87
105
|
}
|
|
106
|
+
|
|
107
|
+
if (reactDevToolsHook != null && this._reactDevToolsAgentListener != null) {
|
|
108
|
+
reactDevToolsHook.off('react-devtools', this._reactDevToolsAgentListener);
|
|
109
|
+
}
|
|
88
110
|
}
|
|
89
111
|
|
|
90
112
|
render(): React.Node {
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
import typeof {enable} from 'promise/setimmediate/rejection-tracking';
|
|
12
12
|
|
|
13
|
+
import LogBox from './LogBox/LogBox';
|
|
14
|
+
|
|
13
15
|
type ExtractOptionsType = <P>(((options?: ?P) => void)) => P;
|
|
14
16
|
|
|
15
17
|
let rejectionTrackingOptions: $Call<ExtractOptionsType, enable> = {
|
|
@@ -34,19 +36,36 @@ let rejectionTrackingOptions: $Call<ExtractOptionsType, enable> = {
|
|
|
34
36
|
? rejection
|
|
35
37
|
: JSON.stringify((rejection: $FlowFixMe));
|
|
36
38
|
}
|
|
39
|
+
// It could although this object is not a standard error, it still has stack information to unwind
|
|
40
|
+
// $FlowFixMe ignore types just check if stack is there
|
|
41
|
+
if (rejection.stack && typeof rejection.stack === 'string') {
|
|
42
|
+
stack = rejection.stack;
|
|
43
|
+
}
|
|
37
44
|
}
|
|
38
45
|
|
|
39
|
-
const warning =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
const warning = `Possible unhandled promise rejection (id: ${id}):\n${
|
|
47
|
+
message ?? ''
|
|
48
|
+
}`;
|
|
49
|
+
if (__DEV__) {
|
|
50
|
+
LogBox.addLog({
|
|
51
|
+
level: 'warn',
|
|
52
|
+
message: {
|
|
53
|
+
content: warning,
|
|
54
|
+
substitutions: [],
|
|
55
|
+
},
|
|
56
|
+
componentStack: [],
|
|
57
|
+
stack,
|
|
58
|
+
category: 'possible_unhandled_promise_rejection',
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
console.warn(warning);
|
|
62
|
+
}
|
|
44
63
|
},
|
|
45
64
|
onHandled: id => {
|
|
46
65
|
const warning =
|
|
47
|
-
`Promise
|
|
66
|
+
`Promise rejection handled (id: ${id})\n` +
|
|
48
67
|
'This means you can ignore any previous messages of the form ' +
|
|
49
|
-
`"Possible
|
|
68
|
+
`"Possible unhandled promise rejection (id: ${id}):"`;
|
|
50
69
|
console.warn(warning);
|
|
51
70
|
},
|
|
52
71
|
};
|
package/overrides.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.71.
|
|
10
|
+
"baseVersion": "0.71.19",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
@@ -32,11 +32,16 @@
|
|
|
32
32
|
"baseHash": "897569d77df852480332b7ce7ec1b594cf40aa28"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
"type": "
|
|
35
|
+
"type": "derived",
|
|
36
|
+
"file": "src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts",
|
|
37
|
+
"baseFile": "Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts",
|
|
38
|
+
"baseHash": "7b4cf9114df53038aeb1508f77d868b45e09049b"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "derived",
|
|
36
42
|
"file": "src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js",
|
|
37
43
|
"baseFile": "Libraries/Components/AccessibilityInfo/AccessibilityInfo.js",
|
|
38
|
-
"baseHash": "8ed7c87f3165558abe517218143dc6f73d91cc46"
|
|
39
|
-
"issue": 4578
|
|
44
|
+
"baseHash": "8ed7c87f3165558abe517218143dc6f73d91cc46"
|
|
40
45
|
},
|
|
41
46
|
{
|
|
42
47
|
"type": "copy",
|
|
@@ -45,6 +50,12 @@
|
|
|
45
50
|
"baseHash": "d37b2f72125246ababf3260e99ef790ce76fe3bb",
|
|
46
51
|
"issue": 4578
|
|
47
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"type": "derived",
|
|
55
|
+
"file": "src/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js",
|
|
56
|
+
"baseFile": "Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js",
|
|
57
|
+
"baseHash": "9427a7feebfbe3de606b2d100439cabf2faa8661"
|
|
58
|
+
},
|
|
48
59
|
{
|
|
49
60
|
"type": "platform",
|
|
50
61
|
"file": "src/Libraries/Components/Button/ButtonWin32.Props.ts"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.19",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./index.win32.js",
|
|
@@ -21,20 +21,22 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.0.0",
|
|
23
23
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
24
|
-
"@react-native-community/cli": "10.2.
|
|
24
|
+
"@react-native-community/cli": "10.2.7",
|
|
25
25
|
"@react-native-community/cli-platform-android": "10.2.0",
|
|
26
|
-
"@react-native-community/cli-platform-ios": "10.2.
|
|
26
|
+
"@react-native-community/cli-platform-ios": "10.2.5",
|
|
27
27
|
"@react-native/assets": "1.0.0",
|
|
28
28
|
"@react-native/normalize-color": "2.1.0",
|
|
29
29
|
"@react-native/polyfills": "2.0.0",
|
|
30
30
|
"abort-controller": "^3.0.0",
|
|
31
31
|
"anser": "^1.4.9",
|
|
32
|
+
"ansi-regex": "^5.0.0",
|
|
32
33
|
"art": "^0.10.0",
|
|
33
34
|
"base64-js": "^1.1.2",
|
|
34
35
|
"deprecated-react-native-prop-types": "^3.0.1",
|
|
35
36
|
"event-target-shim": "^5.0.1",
|
|
36
37
|
"invariant": "^2.2.4",
|
|
37
38
|
"jest-environment-node": "^29.2.1",
|
|
39
|
+
"jsc-android": "^250231.0.0",
|
|
38
40
|
"memoize-one": "^5.0.0",
|
|
39
41
|
"metro-react-native-babel-transformer": "0.73.10",
|
|
40
42
|
"metro-runtime": "0.73.10",
|
|
@@ -45,7 +47,8 @@
|
|
|
45
47
|
"promise": "^8.3.0",
|
|
46
48
|
"react-clone-referenced-element": "^1.0.1",
|
|
47
49
|
"react-devtools-core": "^4.26.1",
|
|
48
|
-
"react-native-codegen": "^0.71.
|
|
50
|
+
"react-native-codegen": "^0.71.6",
|
|
51
|
+
"react-native-gradle-plugin": "^0.71.19",
|
|
49
52
|
"react-refresh": "^0.4.0",
|
|
50
53
|
"react-shallow-renderer": "^16.15.0",
|
|
51
54
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -69,11 +72,11 @@
|
|
|
69
72
|
"@types/react": "^18.0.18",
|
|
70
73
|
"eslint": "^8.19.0",
|
|
71
74
|
"flow-bin": "^0.191.0",
|
|
72
|
-
"jscodeshift": "^0.
|
|
75
|
+
"jscodeshift": "^0.14.0",
|
|
73
76
|
"just-scripts": "^1.3.3",
|
|
74
77
|
"prettier": "^2.4.1",
|
|
75
78
|
"react": "18.2.0",
|
|
76
|
-
"react-native": "0.71.
|
|
79
|
+
"react-native": "0.71.19",
|
|
77
80
|
"react-native-platform-override": "^1.8.3",
|
|
78
81
|
"typescript": "^4.9.5"
|
|
79
82
|
},
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type * as React from 'react';
|
|
11
|
+
import {HostComponent} from '../../../types/public/ReactNativeTypes';
|
|
12
|
+
import {EmitterSubscription} from '../../vendor/emitter/EventEmitter';
|
|
13
|
+
|
|
14
|
+
type AccessibilityChangeEventName =
|
|
15
|
+
| 'change' // deprecated, maps to screenReaderChanged
|
|
16
|
+
| 'boldTextChanged' // iOS-only Event
|
|
17
|
+
| 'grayscaleChanged' // iOS-only Event
|
|
18
|
+
| 'invertColorsChanged' // iOS-only Event
|
|
19
|
+
| 'reduceMotionChanged'
|
|
20
|
+
| 'screenReaderChanged'
|
|
21
|
+
| 'reduceTransparencyChanged'; // iOS-only Event
|
|
22
|
+
|
|
23
|
+
type AccessibilityChangeEvent = boolean;
|
|
24
|
+
|
|
25
|
+
type AccessibilityChangeEventHandler = (
|
|
26
|
+
event: AccessibilityChangeEvent,
|
|
27
|
+
) => void;
|
|
28
|
+
|
|
29
|
+
type AccessibilityAnnouncementEventName = 'announcementFinished'; // iOS-only Event
|
|
30
|
+
|
|
31
|
+
type AccessibilityAnnouncementFinishedEvent = {
|
|
32
|
+
announcement: string;
|
|
33
|
+
success: boolean;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type AccessibilityAnnouncementFinishedEventHandler = (
|
|
37
|
+
event: AccessibilityAnnouncementFinishedEvent,
|
|
38
|
+
) => void;
|
|
39
|
+
|
|
40
|
+
type AccessibilityEventTypes = 'click' | 'focus' | 'viewHoverEnter';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @see https://reactnative.dev/docs/accessibilityinfo
|
|
44
|
+
*/
|
|
45
|
+
export interface AccessibilityInfoStatic {
|
|
46
|
+
/**
|
|
47
|
+
* Query whether bold text is currently enabled.
|
|
48
|
+
*
|
|
49
|
+
* @platform ios
|
|
50
|
+
*/
|
|
51
|
+
isBoldTextEnabled: () => Promise<boolean>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Query whether grayscale is currently enabled.
|
|
55
|
+
*
|
|
56
|
+
* @platform ios
|
|
57
|
+
*/
|
|
58
|
+
isGrayscaleEnabled: () => Promise<boolean>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Query whether invert colors is currently enabled.
|
|
62
|
+
*
|
|
63
|
+
* @platform ios
|
|
64
|
+
*/
|
|
65
|
+
isInvertColorsEnabled: () => Promise<boolean>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Query whether reduce motion is currently enabled.
|
|
69
|
+
*/
|
|
70
|
+
isReduceMotionEnabled: () => Promise<boolean>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Query whether reduce motion and prefer cross-fade transitions settings are currently enabled.
|
|
74
|
+
*
|
|
75
|
+
* Returns a promise which resolves to a boolean.
|
|
76
|
+
* The result is `true` when prefer cross-fade transitions is enabled and `false` otherwise.
|
|
77
|
+
*/
|
|
78
|
+
prefersCrossFadeTransitions(): Promise<boolean>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Query whether reduce transparency is currently enabled.
|
|
82
|
+
*
|
|
83
|
+
* @platform ios
|
|
84
|
+
*/
|
|
85
|
+
isReduceTransparencyEnabled: () => Promise<boolean>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Query whether a screen reader is currently enabled.
|
|
89
|
+
*/
|
|
90
|
+
isScreenReaderEnabled: () => Promise<boolean>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Query whether Accessibility Service is currently enabled.
|
|
94
|
+
*
|
|
95
|
+
* Returns a promise which resolves to a boolean.
|
|
96
|
+
* The result is `true` when any service is enabled and `false` otherwise.
|
|
97
|
+
*
|
|
98
|
+
* @platform android
|
|
99
|
+
*/
|
|
100
|
+
isAccessibilityServiceEnabled(): Promise<boolean>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Add an event handler. Supported events:
|
|
104
|
+
* - announcementFinished: iOS-only event. Fires when the screen reader has finished making an announcement.
|
|
105
|
+
* The argument to the event handler is a dictionary with these keys:
|
|
106
|
+
* - announcement: The string announced by the screen reader.
|
|
107
|
+
* - success: A boolean indicating whether the announcement was successfully made.
|
|
108
|
+
* - AccessibilityEventName constants other than announcementFinished: Fires on accessibility feature change.
|
|
109
|
+
* The argument to the event handler is a boolean.
|
|
110
|
+
* The boolean is true when the related event's feature is enabled and false otherwise.
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
addEventListener(
|
|
114
|
+
eventName: AccessibilityChangeEventName,
|
|
115
|
+
handler: AccessibilityChangeEventHandler,
|
|
116
|
+
): EmitterSubscription;
|
|
117
|
+
addEventListener(
|
|
118
|
+
eventName: AccessibilityAnnouncementEventName,
|
|
119
|
+
handler: AccessibilityAnnouncementFinishedEventHandler,
|
|
120
|
+
): EmitterSubscription;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Set accessibility focus to a react component.
|
|
124
|
+
*/
|
|
125
|
+
setAccessibilityFocus: (reactTag: number) => void;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Post a string to be announced by the screen reader.
|
|
129
|
+
*/
|
|
130
|
+
announceForAccessibility: (announcement: string) => void;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Post a string to be announced by the screen reader.
|
|
134
|
+
* - `announcement`: The string announced by the screen reader.
|
|
135
|
+
* - `options`: An object that configures the reading options.
|
|
136
|
+
* - `queue`: The announcement will be queued behind existing announcements. iOS only.
|
|
137
|
+
* - `nativeID`: The nativeID of the element to send the announcement from. win32 only.
|
|
138
|
+
*/
|
|
139
|
+
announceForAccessibilityWithOptions(
|
|
140
|
+
announcement: string,
|
|
141
|
+
options: {
|
|
142
|
+
queue?: boolean | undefined;
|
|
143
|
+
nativeID?: string | undefined; // win32
|
|
144
|
+
},
|
|
145
|
+
): void;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Gets the timeout in millisecond that the user needs.
|
|
149
|
+
* This value is set in "Time to take action (Accessibility timeout)" of "Accessibility" settings.
|
|
150
|
+
*
|
|
151
|
+
* @platform android
|
|
152
|
+
*/
|
|
153
|
+
getRecommendedTimeoutMillis: (originalTimeout: number) => Promise<number>;
|
|
154
|
+
sendAccessibilityEvent: (
|
|
155
|
+
handle: React.ElementRef<HostComponent<unknown>>,
|
|
156
|
+
eventType: AccessibilityEventTypes,
|
|
157
|
+
) => void;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export const AccessibilityInfo: AccessibilityInfoStatic;
|
|
161
|
+
export type AccessibilityInfo = AccessibilityInfoStatic;
|