@office-iss/react-native-win32 0.66.0 → 0.67.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.flowconfig +1 -1
- package/CHANGELOG.json +195 -19
- package/CHANGELOG.md +89 -13
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +14 -1
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
- package/Libraries/Animated/AnimatedEvent.js +23 -4
- package/Libraries/Animated/NativeAnimatedHelper.js +2 -2
- package/Libraries/Animated/components/AnimatedImage.js +3 -3
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -3
- package/Libraries/Animated/components/AnimatedText.js +3 -3
- package/Libraries/Animated/components/AnimatedView.js +1 -3
- package/Libraries/Animated/createAnimatedComponent.js +3 -34
- package/Libraries/Components/Button/ButtonWin32.js +2 -2
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Button.js +3 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
- package/Libraries/Components/EnterString.win32.js +3 -3
- package/Libraries/Components/EnterString.win32.js.map +1 -1
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
- package/Libraries/Components/ScrollView/ScrollView.js +17 -16
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
- package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -1
- package/Libraries/Components/Text/TextWin32.Props.d.ts +2 -2
- package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
- package/Libraries/Components/Text/TextWin32.js +1 -1
- package/Libraries/Components/Text/TextWin32.js.map +1 -1
- package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +0 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +6 -6
- package/Libraries/Components/TextInput/TextInput.win32.js.map +1 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +0 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +1 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +2 -2
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/View/ReactNativeViewViewConfig.win32.js +1 -0
- package/Libraries/Components/View/Tests/ViewWin32Test.d.ts +0 -1
- package/Libraries/Components/View/Tests/ViewWin32Test.js +44 -2
- package/Libraries/Components/View/Tests/ViewWin32Test.js.map +1 -1
- package/Libraries/Components/View/View.js +1 -1
- package/Libraries/Components/View/View.win32.js +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +1 -1
- package/Libraries/Components/View/ViewWin32.Props.d.ts +4 -6
- package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
- package/Libraries/Components/View/ViewWin32.js +5 -5
- package/Libraries/Components/View/ViewWin32.js.map +1 -1
- package/Libraries/Core/ExceptionsManager.js +45 -80
- package/Libraries/Core/ExtendedError.js +0 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpBatchedBridge.js +1 -1
- package/Libraries/Core/setUpGlobals.js +2 -4
- package/Libraries/Core/setUpTimers.js +2 -2
- package/Libraries/Image/Image.ios.js +6 -0
- package/Libraries/Image/Image.win32.js +6 -0
- package/Libraries/Image/ImageBackground.js +10 -8
- package/Libraries/Image/ImageProps.js +28 -0
- package/Libraries/Image/Tests/ImageWin32Test.d.ts +0 -1
- package/Libraries/LogBox/Data/LogBoxData.js +18 -19
- package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +2 -0
- package/Libraries/PersonaCoin/PersonaCoin.js +3 -2
- package/Libraries/PersonaCoin/PersonaCoin.js.map +1 -1
- package/Libraries/Pressability/Pressability.js +13 -13
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/ReactNative/AppRegistry.js +4 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +1569 -875
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +529 -319
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +570 -362
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +1592 -891
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +521 -311
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +562 -354
- package/Libraries/Share/Share.js +1 -1
- package/Libraries/StyleSheet/normalizeColor.js +2 -2
- package/Libraries/Text/TextProps.js +1 -7
- package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
- package/Libraries/Utilities/HMRClient.js +1 -1
- package/flow/global.js +45 -0
- package/index.js +15 -10
- package/index.win32.js +15 -10
- package/jest/mockModal.js +31 -0
- package/jest/setup.js +5 -3
- package/overrides.json +7 -13
- package/package.json +20 -18
- package/rntypes/BatchedBridge.d.ts +23 -0
- package/rntypes/Devtools.d.ts +20 -0
- package/rntypes/LaunchScreen.d.ts +9 -0
- package/rntypes/globals.d.ts +496 -0
- package/rntypes/index.d.ts +9966 -0
- package/rntypes/legacy-properties.d.ts +266 -0
- package/src/Libraries/Components/Text/TextWin32.Props.ts +2 -2
- package/src/Libraries/Components/View/Tests/ViewWin32Test.tsx +64 -0
- package/src/Libraries/Components/View/ViewWin32.Props.ts +7 -12
- package/src/rntypes/BatchedBridge.d.ts +23 -0
- package/src/rntypes/Devtools.d.ts +20 -0
- package/src/rntypes/LaunchScreen.d.ts +9 -0
- package/src/rntypes/globals.d.ts +496 -0
- package/src/rntypes/index.d.ts +9966 -0
- package/src/rntypes/legacy-properties.d.ts +266 -0
- package/src/typings-index.ts +11 -4
- package/typings-index.d.ts +3 -1
- package/typings-index.js +7 -5
- package/typings-index.js.map +1 -1
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.win32.js +0 -30
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
- package/Libraries/Components/StaticContainer.react.js +0 -51
- package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -25
- package/Libraries/Interaction/InteractionMixin.js +0 -54
- package/Libraries/ReactNative/queryLayoutByID.js +0 -58
|
@@ -100,7 +100,6 @@ export function reportLogBoxError(
|
|
|
100
100
|
): void {
|
|
101
101
|
const ExceptionsManager = require('../../Core/ExceptionsManager');
|
|
102
102
|
|
|
103
|
-
error.forceRedbox = true;
|
|
104
103
|
error.message = `${LOGBOX_ERROR_MESSAGE}\n\n${error.message}`;
|
|
105
104
|
if (componentStack != null) {
|
|
106
105
|
error.componentStack = componentStack;
|
|
@@ -320,40 +319,40 @@ export function checkWarningFilter(format: string): WarningInfo {
|
|
|
320
319
|
return warningFilter(format);
|
|
321
320
|
}
|
|
322
321
|
|
|
322
|
+
export function getIgnorePatterns(): $ReadOnlyArray<IgnorePattern> {
|
|
323
|
+
return Array.from(ignorePatterns);
|
|
324
|
+
}
|
|
325
|
+
|
|
323
326
|
export function addIgnorePatterns(
|
|
324
327
|
patterns: $ReadOnlyArray<IgnorePattern>,
|
|
325
328
|
): void {
|
|
329
|
+
const existingSize = ignorePatterns.size;
|
|
326
330
|
// The same pattern may be added multiple times, but adding a new pattern
|
|
327
331
|
// can be expensive so let's find only the ones that are new.
|
|
328
|
-
|
|
332
|
+
patterns.forEach((pattern: IgnorePattern) => {
|
|
329
333
|
if (pattern instanceof RegExp) {
|
|
330
|
-
for (const existingPattern of ignorePatterns
|
|
334
|
+
for (const existingPattern of ignorePatterns) {
|
|
331
335
|
if (
|
|
332
336
|
existingPattern instanceof RegExp &&
|
|
333
337
|
existingPattern.toString() === pattern.toString()
|
|
334
338
|
) {
|
|
335
|
-
return
|
|
339
|
+
return;
|
|
336
340
|
}
|
|
337
341
|
}
|
|
338
|
-
|
|
342
|
+
ignorePatterns.add(pattern);
|
|
339
343
|
}
|
|
340
|
-
|
|
344
|
+
ignorePatterns.add(pattern);
|
|
341
345
|
});
|
|
342
|
-
|
|
343
|
-
if (newPatterns.length === 0) {
|
|
346
|
+
if (ignorePatterns.size === existingSize) {
|
|
344
347
|
return;
|
|
345
348
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
logs = new Set(
|
|
354
|
-
Array.from(logs).filter(log => !isMessageIgnored(log.message.content)),
|
|
355
|
-
);
|
|
356
|
-
}
|
|
349
|
+
// We need to recheck all of the existing logs.
|
|
350
|
+
// This allows adding an ignore pattern anywhere in the codebase.
|
|
351
|
+
// Without this, if you ignore a pattern after the a log is created,
|
|
352
|
+
// then we would keep showing the log.
|
|
353
|
+
logs = new Set(
|
|
354
|
+
Array.from(logs).filter(log => !isMessageIgnored(log.message.content)),
|
|
355
|
+
);
|
|
357
356
|
handleUpdate();
|
|
358
357
|
}
|
|
359
358
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -44,7 +44,8 @@ export type PermissionType =
|
|
|
44
44
|
| 'android.permission.WRITE_EXTERNAL_STORAGE'
|
|
45
45
|
| 'android.permission.BLUETOOTH_CONNECT'
|
|
46
46
|
| 'android.permission.BLUETOOTH_SCAN'
|
|
47
|
-
| 'android.permission.BLUETOOTH_ADVERTISE'
|
|
47
|
+
| 'android.permission.BLUETOOTH_ADVERTISE'
|
|
48
|
+
| 'android.permission.ACCESS_MEDIA_LOCATION';
|
|
48
49
|
*/
|
|
49
50
|
|
|
50
51
|
export interface Spec extends TurboModule {
|
|
@@ -62,6 +62,7 @@ const PERMISSIONS = Object.freeze({
|
|
|
62
62
|
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
|
|
63
63
|
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
|
|
64
64
|
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
|
|
65
|
+
ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',
|
|
65
66
|
});
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -75,6 +76,7 @@ class PermissionsAndroid {
|
|
|
75
76
|
ACCESS_BACKGROUND_LOCATION: string,
|
|
76
77
|
ACCESS_COARSE_LOCATION: string,
|
|
77
78
|
ACCESS_FINE_LOCATION: string,
|
|
79
|
+
ACCESS_MEDIA_LOCATION: string,
|
|
78
80
|
ADD_VOICEMAIL: string,
|
|
79
81
|
BLUETOOTH_ADVERTISE: string,
|
|
80
82
|
BLUETOOTH_CONNECT: string,
|
|
@@ -7,8 +7,9 @@ exports.PersonaCoin = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
9
|
const PersonaCoinPropTypes_1 = require("./PersonaCoinPropTypes");
|
|
10
|
-
const RCTPersonaCoin = react_native_1.requireNativeComponent('RCTPersonaCoin');
|
|
11
|
-
|
|
10
|
+
const RCTPersonaCoin = (0, react_native_1.requireNativeComponent)('RCTPersonaCoin');
|
|
11
|
+
const PersonaCoin = (props) => react_1.default.createElement(RCTPersonaCoin, { ...props });
|
|
12
|
+
exports.PersonaCoin = PersonaCoin;
|
|
12
13
|
exports.PersonaCoin.defaultProps = PersonaCoinPropTypes_1.PersonaCoinDefaultProps;
|
|
13
14
|
exports.PersonaCoin.displayName = 'PersonaCoin';
|
|
14
15
|
//# sourceMappingURL=PersonaCoin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaCoin.js","sourceRoot":"","sources":["../../src/Libraries/PersonaCoin/PersonaCoin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AAEzB,+CAAsD;AAEtD,iEAAiE;AAEjE,MAAM,cAAc,GAAG,qCAAsB,
|
|
1
|
+
{"version":3,"file":"PersonaCoin.js","sourceRoot":"","sources":["../../src/Libraries/PersonaCoin/PersonaCoin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AAEzB,+CAAsD;AAEtD,iEAAiE;AAEjE,MAAM,cAAc,GAAG,IAAA,qCAAsB,EAAC,gBAAgB,CAAC,CAAC;AAEzD,MAAM,WAAW,GAA+C,CAAC,KAAwB,EAAE,EAAE,CAAC,8BAAC,cAAc,OAAK,KAAK,GAAI,CAAC;AAAtH,QAAA,WAAW,eAA2G;AACnI,mBAAW,CAAC,YAAY,GAAG,8CAAuB,CAAC;AACnD,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\n\nimport { requireNativeComponent } from 'react-native';\nimport { IPersonaCoinProps } from './PersonaCoinTypes';\nimport { PersonaCoinDefaultProps } from './PersonaCoinPropTypes';\n\nconst RCTPersonaCoin = requireNativeComponent('RCTPersonaCoin');\n\nexport const PersonaCoin: React.FunctionComponent<IPersonaCoinProps> = (props: IPersonaCoinProps) => <RCTPersonaCoin {...props} />;\nPersonaCoin.defaultProps = PersonaCoinDefaultProps;\nPersonaCoin.displayName = 'PersonaCoin';\n"]}
|
|
@@ -608,6 +608,19 @@ export default class Pressability {
|
|
|
608
608
|
* and stores the new state. Validates the transition as well.
|
|
609
609
|
*/
|
|
610
610
|
_receiveSignal(signal: TouchSignal, event: PressEvent): void {
|
|
611
|
+
// Especially on iOS, not all events have timestamps associated.
|
|
612
|
+
// For telemetry purposes, this doesn't matter too much, as long as *some* do.
|
|
613
|
+
// Since the native timestamp is integral for logging telemetry, just skip
|
|
614
|
+
// events if they don't have a timestamp attached.
|
|
615
|
+
if (event.nativeEvent.timestamp != null) {
|
|
616
|
+
PressabilityPerformanceEventEmitter.emitEvent(() => {
|
|
617
|
+
return {
|
|
618
|
+
signal,
|
|
619
|
+
nativeTimestamp: event.nativeEvent.timestamp,
|
|
620
|
+
};
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
|
|
611
624
|
const prevState = this._touchState;
|
|
612
625
|
const nextState = Transitions[prevState]?.[signal];
|
|
613
626
|
if (this._responderID == null && signal === 'RESPONDER_RELEASE') {
|
|
@@ -623,19 +636,6 @@ export default class Pressability {
|
|
|
623
636
|
: '<<host component>>',
|
|
624
637
|
);
|
|
625
638
|
if (prevState !== nextState) {
|
|
626
|
-
// Especially on iOS, not all events have timestamps associated.
|
|
627
|
-
// For telemetry purposes, this doesn't matter too much, as long as *some* do.
|
|
628
|
-
// Since the native timestamp is integral for logging telemetry, just skip
|
|
629
|
-
// events if they don't have a timestamp attached.
|
|
630
|
-
if (event.nativeEvent.timestamp != null) {
|
|
631
|
-
PressabilityPerformanceEventEmitter.emitEvent(() => {
|
|
632
|
-
return {
|
|
633
|
-
signal,
|
|
634
|
-
touchDelayMs: Date.now() - event.nativeEvent.timestamp,
|
|
635
|
-
};
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
|
|
639
639
|
this._performTransitionSideEffects(prevState, nextState, signal, event);
|
|
640
640
|
this._touchState = nextState;
|
|
641
641
|
}
|
|
@@ -12,7 +12,7 @@ import {type PressabilityTouchSignal as TouchSignal} from './PressabilityTypes.j
|
|
|
12
12
|
|
|
13
13
|
export type PressabilityPerformanceEvent = $ReadOnly<{|
|
|
14
14
|
signal: TouchSignal,
|
|
15
|
-
|
|
15
|
+
nativeTimestamp: number,
|
|
16
16
|
|}>;
|
|
17
17
|
export type PressabilityPerformanceEventListener = PressabilityPerformanceEvent => void;
|
|
18
18
|
|
|
@@ -189,8 +189,10 @@ const AppRegistry = {
|
|
|
189
189
|
displayMode?: number,
|
|
190
190
|
): void {
|
|
191
191
|
if (appKey !== 'LogBox') {
|
|
192
|
-
const
|
|
193
|
-
|
|
192
|
+
const logParams = __DEV__
|
|
193
|
+
? '" with ' + JSON.stringify(appParameters)
|
|
194
|
+
: '';
|
|
195
|
+
const msg = 'Running "' + appKey + logParams;
|
|
194
196
|
infoLog(msg);
|
|
195
197
|
BugReporting.addSource(
|
|
196
198
|
'AppRegistry.runApplication' + runCount++,
|