@office-iss/react-native-win32 0.66.2 → 0.67.0-preview.3

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.
Files changed (120) hide show
  1. package/.eslintignore +2 -0
  2. package/.flowconfig +6 -1
  3. package/CHANGELOG.json +209 -33
  4. package/CHANGELOG.md +96 -20
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +14 -1
  6. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
  7. package/Libraries/Animated/AnimatedEvent.js +23 -4
  8. package/Libraries/Animated/NativeAnimatedHelper.js +2 -2
  9. package/Libraries/Animated/components/AnimatedImage.js +3 -3
  10. package/Libraries/Animated/components/AnimatedScrollView.js +3 -3
  11. package/Libraries/Animated/components/AnimatedText.js +3 -3
  12. package/Libraries/Animated/components/AnimatedView.js +1 -3
  13. package/Libraries/Animated/createAnimatedComponent.js +3 -34
  14. package/Libraries/Components/Button/ButtonWin32.js +2 -2
  15. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  16. package/Libraries/Components/Button.js +3 -0
  17. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
  19. package/Libraries/Components/EnterString.win32.js +3 -3
  20. package/Libraries/Components/EnterString.win32.js.map +1 -1
  21. package/Libraries/Components/Pressable/Pressable.win32.js +384 -0
  22. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
  23. package/Libraries/Components/ScrollView/ScrollView.js +17 -16
  24. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
  25. package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -1
  26. package/Libraries/Components/Text/TextWin32.Props.d.ts +2 -2
  27. package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
  28. package/Libraries/Components/Text/TextWin32.js +1 -1
  29. package/Libraries/Components/Text/TextWin32.js.map +1 -1
  30. package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +0 -1
  31. package/Libraries/Components/TextInput/TextInput.win32.js +6 -6
  32. package/Libraries/Components/TextInput/TextInput.win32.js.map +1 -1
  33. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +0 -1
  34. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +1 -1
  35. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  36. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +2 -2
  37. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js.map +1 -1
  38. package/Libraries/Components/Touchable/TouchableWin32.js +2 -2
  39. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  40. package/Libraries/Components/View/Tests/ViewWin32Test.d.ts +0 -1
  41. package/Libraries/Components/View/View.js +1 -1
  42. package/Libraries/Components/View/View.win32.js +59 -3
  43. package/Libraries/Components/View/ViewAccessibility.js +1 -1
  44. package/Libraries/Components/View/ViewPropTypes.win32.js +546 -0
  45. package/Libraries/Components/View/ViewWin32.Props.d.ts +3 -6
  46. package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
  47. package/Libraries/Components/View/ViewWin32.js +5 -5
  48. package/Libraries/Components/View/ViewWin32.js.map +1 -1
  49. package/Libraries/Core/ExceptionsManager.js +45 -80
  50. package/Libraries/Core/ExtendedError.js +0 -1
  51. package/Libraries/Core/ReactNativeVersion.js +2 -2
  52. package/Libraries/Core/setUpBatchedBridge.js +1 -1
  53. package/Libraries/Core/setUpGlobals.js +2 -4
  54. package/Libraries/Core/setUpTimers.js +2 -2
  55. package/Libraries/Image/Image.ios.js +6 -0
  56. package/Libraries/Image/Image.win32.js +6 -0
  57. package/Libraries/Image/ImageBackground.js +10 -8
  58. package/Libraries/Image/ImageProps.js +28 -0
  59. package/Libraries/Image/Tests/ImageWin32Test.d.ts +0 -1
  60. package/Libraries/LogBox/Data/LogBoxData.js +18 -19
  61. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  62. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  63. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  64. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  65. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  66. package/Libraries/NewAppScreen/components/logo.png +0 -0
  67. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -1
  68. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +2 -0
  69. package/Libraries/PersonaCoin/PersonaCoin.js +3 -2
  70. package/Libraries/PersonaCoin/PersonaCoin.js.map +1 -1
  71. package/Libraries/Pressability/HoverState.win32.js +60 -0
  72. package/Libraries/Pressability/Pressability.js +13 -13
  73. package/Libraries/Pressability/Pressability.win32.js +962 -0
  74. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
  75. package/Libraries/ReactNative/AppRegistry.js +4 -2
  76. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +1569 -875
  77. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +529 -319
  78. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +570 -362
  79. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +1592 -891
  80. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +521 -311
  81. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +562 -354
  82. package/Libraries/Share/Share.js +1 -1
  83. package/Libraries/StyleSheet/normalizeColor.js +2 -2
  84. package/Libraries/Text/TextProps.js +1 -7
  85. package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
  86. package/Libraries/Types/CoreEventTypes.win32.js +191 -0
  87. package/Libraries/Utilities/HMRClient.js +1 -1
  88. package/flow/global.js +45 -0
  89. package/index.js +15 -10
  90. package/index.win32.js +15 -10
  91. package/jest/mockModal.js +31 -0
  92. package/jest/setup.js +5 -3
  93. package/overrides.json +42 -13
  94. package/package.json +20 -18
  95. package/rntypes/BatchedBridge.d.ts +23 -0
  96. package/rntypes/Devtools.d.ts +20 -0
  97. package/rntypes/LaunchScreen.d.ts +9 -0
  98. package/rntypes/globals.d.ts +496 -0
  99. package/rntypes/index.d.ts +9966 -0
  100. package/rntypes/legacy-properties.d.ts +266 -0
  101. package/src/Libraries/Components/Text/TextWin32.Props.ts +2 -2
  102. package/src/Libraries/Components/View/ViewWin32.Props.ts +6 -12
  103. package/src/rntypes/BatchedBridge.d.ts +23 -0
  104. package/src/rntypes/Devtools.d.ts +20 -0
  105. package/src/rntypes/LaunchScreen.d.ts +9 -0
  106. package/src/rntypes/globals.d.ts +496 -0
  107. package/src/rntypes/index.d.ts +9966 -0
  108. package/src/rntypes/legacy-properties.d.ts +266 -0
  109. package/src/typings-index.ts +11 -4
  110. package/typings-index.d.ts +3 -1
  111. package/typings-index.js +7 -5
  112. package/typings-index.js.map +1 -1
  113. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
  114. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  115. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.win32.js +0 -30
  116. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  117. package/Libraries/Components/StaticContainer.react.js +0 -51
  118. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -25
  119. package/Libraries/Interaction/InteractionMixin.js +0 -54
  120. package/Libraries/ReactNative/queryLayoutByID.js +0 -58
@@ -51,7 +51,7 @@ class Share {
51
51
  *
52
52
  * #### iOS
53
53
  *
54
- * - `url` - an URL to share
54
+ * - `url` - a URL to share
55
55
  *
56
56
  * At least one of URL and message is required.
57
57
  *
@@ -10,7 +10,7 @@
10
10
 
11
11
  /* eslint no-bitwise: 0 */
12
12
 
13
- import normalizeColorBase from '@react-native/normalize-color/base';
13
+ import _normalizeColor from '@react-native/normalize-color';
14
14
 
15
15
  import type {ColorValue} from './StyleSheet';
16
16
  import type {ProcessedColorValue} from './processColor';
@@ -27,7 +27,7 @@ function normalizeColor(
27
27
  }
28
28
 
29
29
  if (typeof color === 'string' || typeof color === 'number') {
30
- return normalizeColorBase(color);
30
+ return _normalizeColor(color);
31
31
  }
32
32
  }
33
33
 
@@ -66,13 +66,7 @@ export type TextProps = $ReadOnly<{|
66
66
  * Set hyphenation strategy on Android.
67
67
  *
68
68
  */
69
- android_hyphenationFrequency?: ?(
70
- | 'normal'
71
- | 'none'
72
- | 'full'
73
- | 'high'
74
- | 'balanced'
75
- ),
69
+ android_hyphenationFrequency?: ?('normal' | 'none' | 'full'),
76
70
  children?: ?Node,
77
71
 
78
72
  /**
@@ -16,7 +16,7 @@ const turboModuleProxy = global.__turboModuleProxy;
16
16
 
17
17
  function requireModule<T: TurboModule>(name: string): ?T {
18
18
  // Bridgeless mode requires TurboModules
19
- if (!global.RN$Bridgeless) {
19
+ if (global.RN$Bridgeless !== true) {
20
20
  // Backward compatibility layer during migration.
21
21
  const legacyModule = NativeModules[name];
22
22
  if (legacyModule != null) {
@@ -0,0 +1,191 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its 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
+ * @flow strict
8
+ * @format
9
+ */
10
+
11
+ import * as React from 'react';
12
+ import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
13
+
14
+ export type SyntheticEvent<T> = $ReadOnly<{|
15
+ bubbles: ?boolean,
16
+ cancelable: ?boolean,
17
+ currentTarget: number | React.ElementRef<HostComponent<mixed>>,
18
+ defaultPrevented: ?boolean,
19
+ dispatchConfig: $ReadOnly<{|
20
+ registrationName: string,
21
+ |}>,
22
+ eventPhase: ?number,
23
+ preventDefault: () => void,
24
+ isDefaultPrevented: () => boolean,
25
+ stopPropagation: () => void,
26
+ isPropagationStopped: () => boolean,
27
+ isTrusted: ?boolean,
28
+ nativeEvent: T,
29
+ persist: () => void,
30
+ target: ?number | React.ElementRef<HostComponent<mixed>>,
31
+ timeStamp: number,
32
+ type: ?string,
33
+ |}>;
34
+
35
+ export type ResponderSyntheticEvent<T> = $ReadOnly<{|
36
+ ...SyntheticEvent<T>,
37
+ touchHistory: $ReadOnly<{|
38
+ indexOfSingleActiveTouch: number,
39
+ mostRecentTimeStamp: number,
40
+ numberActiveTouches: number,
41
+ touchBank: $ReadOnlyArray<
42
+ $ReadOnly<{|
43
+ touchActive: boolean,
44
+ startPageX: number,
45
+ startPageY: number,
46
+ startTimeStamp: number,
47
+ currentPageX: number,
48
+ currentPageY: number,
49
+ currentTimeStamp: number,
50
+ previousPageX: number,
51
+ previousPageY: number,
52
+ previousTimeStamp: number,
53
+ |}>,
54
+ >,
55
+ |}>,
56
+ |}>;
57
+
58
+ export type Layout = $ReadOnly<{|
59
+ x: number,
60
+ y: number,
61
+ width: number,
62
+ height: number,
63
+ |}>;
64
+
65
+ export type TextLayout = $ReadOnly<{|
66
+ ...Layout,
67
+ ascender: number,
68
+ capHeight: number,
69
+ descender: number,
70
+ text: string,
71
+ xHeight: number,
72
+ |}>;
73
+
74
+ export type LayoutEvent = SyntheticEvent<
75
+ $ReadOnly<{|
76
+ layout: Layout,
77
+ |}>,
78
+ >;
79
+
80
+ export type TextLayoutEvent = SyntheticEvent<
81
+ $ReadOnly<{|
82
+ lines: Array<TextLayout>,
83
+ |}>,
84
+ >;
85
+
86
+ export type PressEvent = ResponderSyntheticEvent<
87
+ $ReadOnly<{|
88
+ altKey: ?boolean, // TODO(macOS)
89
+ button: ?number, // TODO(macOS)
90
+ changedTouches: $ReadOnlyArray<$PropertyType<PressEvent, 'nativeEvent'>>,
91
+ ctrlKey: ?boolean, // TODO(macOS)
92
+ force?: number,
93
+ identifier: number,
94
+ locationX: number,
95
+ locationY: number,
96
+ metaKey: ?boolean, // TODO(macOS)
97
+ pageX: number,
98
+ pageY: number,
99
+ shiftKey: ?boolean, // TODO(macOS)
100
+ target: ?number,
101
+ timestamp: number,
102
+ touches: $ReadOnlyArray<$PropertyType<PressEvent, 'nativeEvent'>>,
103
+ |}>,
104
+ >;
105
+
106
+ export type ScrollEvent = SyntheticEvent<
107
+ $ReadOnly<{|
108
+ contentInset: $ReadOnly<{|
109
+ bottom: number,
110
+ left: number,
111
+ right: number,
112
+ top: number,
113
+ |}>,
114
+ contentOffset: $ReadOnly<{|
115
+ y: number,
116
+ x: number,
117
+ |}>,
118
+ contentSize: $ReadOnly<{|
119
+ height: number,
120
+ width: number,
121
+ |}>,
122
+ layoutMeasurement: $ReadOnly<{|
123
+ height: number,
124
+ width: number,
125
+ |}>,
126
+ targetContentOffset?: $ReadOnly<{|
127
+ y: number,
128
+ x: number,
129
+ |}>,
130
+ velocity?: $ReadOnly<{|
131
+ y: number,
132
+ x: number,
133
+ |}>,
134
+ zoomScale?: number,
135
+ responderIgnoreScroll?: boolean,
136
+ key?: string, // TODO(macOS)
137
+ |}>,
138
+ >;
139
+
140
+ export type BlurEvent = SyntheticEvent<
141
+ $ReadOnly<{|
142
+ target: number,
143
+ |}>,
144
+ >;
145
+
146
+ export type FocusEvent = SyntheticEvent<
147
+ $ReadOnly<{|
148
+ target: number,
149
+ |}>,
150
+ >;
151
+
152
+ // [Windows Mouse events on Windows don't match up with the version in core
153
+ // introduced for react-native-web. Replace typings with our values to catch
154
+ // anything dependent on react-native-web specific values
155
+ export type MouseEvent = SyntheticEvent<
156
+ $ReadOnly<{|
157
+ target: number,
158
+ identifier: number,
159
+ pageX: number,
160
+ pageY: number,
161
+ locationX: number,
162
+ locationY: number,
163
+ timestamp: number,
164
+ pointerType: string,
165
+ force: number,
166
+ isLeftButton: boolean,
167
+ isRightButton: boolean,
168
+ isMiddleButton: boolean,
169
+ isBarrelButtonPressed: boolean,
170
+ isHorizontalScrollWheel: boolean,
171
+ isEraser: boolean,
172
+ shiftKey: boolean,
173
+ ctrlKey: boolean,
174
+ altKey: boolean,
175
+ |}>,
176
+ >;
177
+ // Windows]
178
+
179
+ // [Windows
180
+ export type KeyEvent = SyntheticEvent<
181
+ $ReadOnly<{|
182
+ altKey: boolean,
183
+ ctrlKey: boolean,
184
+ metaKey: boolean,
185
+ shiftKey: boolean,
186
+ key: string,
187
+ code: string,
188
+ eventPhase: number,
189
+ |}>,
190
+ >;
191
+ // Windows]
@@ -119,7 +119,7 @@ const HMRClient: HMRClientNativeInterface = {
119
119
  JSON.stringify({
120
120
  type: 'log',
121
121
  level,
122
- mode: global.RN$Bridgeless ? 'NOBRIDGE' : 'BRIDGE',
122
+ mode: global.RN$Bridgeless === true ? 'NOBRIDGE' : 'BRIDGE',
123
123
  data: data.map(item =>
124
124
  typeof item === 'string'
125
125
  ? item
package/flow/global.js CHANGED
@@ -16,8 +16,53 @@
16
16
  * writeability (`+`) when defining types.
17
17
  */
18
18
  declare var global: {
19
+ // setUpGlobals
20
+ +window: typeof global,
21
+ +self: typeof global,
22
+
23
+ // setXHR
24
+ +XMLHttpRequest: typeof XMLHttpRequest,
25
+ +FormData: typeof FormData,
26
+ +fetch: typeof fetch,
27
+ +Headers: typeof Headers,
28
+ +Request: typeof Request,
29
+ +Response: typeof Response,
30
+ +WebSocket: typeof WebSocket,
31
+ +Blob: typeof Blob,
32
+ +File: typeof File,
33
+ +FileReader: typeof FileReader,
34
+ +URL: typeof URL,
35
+ +URLSearchParams: typeof URLSearchParams,
36
+ +AbortController: typeof AbortController,
37
+ +AbortSignal: typeof AbortSignal,
38
+
39
+ // setUpAlert
40
+ +alert: typeof alert,
41
+
42
+ // setUpTimers
43
+ +clearInterval: typeof clearInterval,
44
+ +clearTimeout: typeof clearTimeout,
45
+ +setInterval: typeof setInterval,
46
+ +setTimeout: typeof setTimeout,
47
+ +requestAnimationFrame: typeof requestAnimationFrame,
48
+ +cancelAnimationFrame: typeof cancelAnimationFrame,
49
+ +requestIdleCallback: typeof requestIdleCallback,
50
+ +cancelIdleCallback: typeof cancelIdleCallback,
51
+ +setTimeout: typeof setTimeout,
52
+ // TODO(T97509743): use `typeof` when the next Flow release is available.
53
+ +queueMicrotask: <TArguments: Array<mixed>>(
54
+ jobCallback: (...args: TArguments) => mixed,
55
+ ) => void,
56
+
57
+ +console: typeof console,
58
+
59
+ // JavaScript environments specific
19
60
  +HermesInternal: ?$HermesInternalType,
20
61
 
62
+ // Internal-specific
63
+ +__DEV__?: boolean,
64
+ +RN$Bridgeless?: boolean,
65
+
21
66
  // Undeclared properties are implicitly `any`.
22
67
  [string | symbol]: any,
23
68
  };
package/index.js CHANGED
@@ -55,7 +55,6 @@ import typeof AppState from './Libraries/AppState/AppState';
55
55
  import typeof AsyncStorage from './Libraries/Storage/AsyncStorage';
56
56
  import typeof BackHandler from './Libraries/Utilities/BackHandler';
57
57
  import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
58
- import typeof DatePickerAndroid from './Libraries/Components/DatePickerAndroid/DatePickerAndroid';
59
58
  import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
60
59
  import typeof DevSettings from './Libraries/Utilities/DevSettings';
61
60
  import typeof Dimensions from './Libraries/Utilities/Dimensions';
@@ -297,15 +296,6 @@ module.exports = {
297
296
  );
298
297
  return require('./Libraries/Components/Clipboard/Clipboard');
299
298
  },
300
- get DatePickerAndroid(): DatePickerAndroid {
301
- warnOnce(
302
- 'DatePickerAndroid-merged',
303
- 'DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release. ' +
304
- "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
305
- 'See https://github.com/react-native-datetimepicker/datetimepicker',
306
- );
307
- return require('./Libraries/Components/DatePickerAndroid/DatePickerAndroid');
308
- },
309
299
  get DeviceInfo(): DeviceInfo {
310
300
  return require('./Libraries/Utilities/DeviceInfo');
311
301
  },
@@ -717,4 +707,19 @@ if (__DEV__) {
717
707
  );
718
708
  },
719
709
  });
710
+ /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
711
+ * attempting to access DatePickerAndroid. */
712
+ /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
713
+ * attempting to access DatePickerAndroid. */
714
+ Object.defineProperty(module.exports, 'DatePickerAndroid', {
715
+ configurable: true,
716
+ get() {
717
+ invariant(
718
+ false,
719
+ 'DatePickerAndroid has been removed from React Native. ' +
720
+ "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
721
+ 'See https://github.com/react-native-datetimepicker/datetimepicker',
722
+ );
723
+ },
724
+ });
720
725
  }
package/index.win32.js CHANGED
@@ -55,7 +55,6 @@ import typeof AppState from './Libraries/AppState/AppState';
55
55
  import typeof AsyncStorage from './Libraries/Storage/AsyncStorage';
56
56
  import typeof BackHandler from './Libraries/Utilities/BackHandler';
57
57
  import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
58
- import typeof DatePickerAndroid from './Libraries/Components/DatePickerAndroid/DatePickerAndroid';
59
58
  import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
60
59
  import typeof DevSettings from './Libraries/Utilities/DevSettings';
61
60
  import typeof Dimensions from './Libraries/Utilities/Dimensions';
@@ -303,15 +302,6 @@ module.exports = {
303
302
  );
304
303
  return require('./Libraries/Components/Clipboard/Clipboard');
305
304
  },
306
- get DatePickerAndroid(): DatePickerAndroid {
307
- warnOnce(
308
- 'DatePickerAndroid-merged',
309
- 'DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release. ' +
310
- "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
311
- 'See https://github.com/react-native-datetimepicker/datetimepicker',
312
- );
313
- return require('./Libraries/Components/DatePickerAndroid/DatePickerAndroid');
314
- },
315
305
  get DeviceInfo(): DeviceInfo {
316
306
  return require('./Libraries/Utilities/DeviceInfo');
317
307
  },
@@ -758,4 +748,19 @@ if (__DEV__) {
758
748
  );
759
749
  },
760
750
  });
751
+ /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
752
+ * attempting to access DatePickerAndroid. */
753
+ /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
754
+ * attempting to access DatePickerAndroid. */
755
+ Object.defineProperty(module.exports, 'DatePickerAndroid', {
756
+ configurable: true,
757
+ get() {
758
+ invariant(
759
+ false,
760
+ 'DatePickerAndroid has been removed from React Native. ' +
761
+ "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
762
+ 'See https://github.com/react-native-datetimepicker/datetimepicker',
763
+ );
764
+ },
765
+ });
761
766
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @flow strict-local
9
+ */
10
+
11
+ /* eslint-env jest */
12
+
13
+ 'use strict';
14
+
15
+ const React = require('react');
16
+ const Modal = require('../Libraries/Modal/Modal');
17
+
18
+ function mockModal(BaseComponent: $FlowFixMe) {
19
+ class ModalMock extends BaseComponent {
20
+ render(): React.Element<typeof Modal> {
21
+ return (
22
+ <BaseComponent {...this.props}>
23
+ {this.props.visible !== true ? null : this.props.children}
24
+ </BaseComponent>
25
+ );
26
+ }
27
+ }
28
+ return ModalMock;
29
+ }
30
+
31
+ module.exports = (mockModal: $FlowFixMe);
package/jest/setup.js CHANGED
@@ -110,9 +110,11 @@ jest
110
110
  getNativeRef: jest.fn(),
111
111
  }),
112
112
  )
113
- .mock('../Libraries/Modal/Modal', () =>
114
- mockComponent('../Libraries/Modal/Modal'),
115
- )
113
+ .mock('../Libraries/Modal/Modal', () => {
114
+ const baseComponent = mockComponent('../Libraries/Modal/Modal');
115
+ const mockModal = jest.requireActual('./mockModal');
116
+ return mockModal(baseComponent);
117
+ })
116
118
  .mock('../Libraries/Components/View/View', () =>
117
119
  mockComponent('../Libraries/Components/View/View', MockNativeMethods),
118
120
  )
package/overrides.json CHANGED
@@ -4,21 +4,22 @@
4
4
  "src/**"
5
5
  ],
6
6
  "excludePatterns": [
7
- "**/__snapshots__/**"
7
+ "**/__snapshots__/**",
8
+ "src/rntypes/**"
8
9
  ],
9
- "baseVersion": "0.66.0",
10
+ "baseVersion": "0.67.0-rc.1",
10
11
  "overrides": [
11
12
  {
12
13
  "type": "derived",
13
14
  "file": ".flowconfig",
14
15
  "baseFile": ".flowconfig",
15
- "baseHash": "a715deecb01066f69db3959e0d270f5a2a88e598"
16
+ "baseHash": "1920d4cf4c839eb21889eb28e4596fbbfcc4a0cd"
16
17
  },
17
18
  {
18
19
  "type": "derived",
19
20
  "file": "src/index.win32.js",
20
21
  "baseFile": "index.js",
21
- "baseHash": "96a5214433005766d7d57ceea5a1dd0a30d4e88f"
22
+ "baseHash": "3f55b3104a728f68008ba473bb64bbe8fc7ad8c9"
22
23
  },
23
24
  {
24
25
  "type": "patch",
@@ -55,13 +56,6 @@
55
56
  "baseHash": "a9a4a6c92de922a11f8b81642b1bf1270d0b7b96",
56
57
  "issue": 4378
57
58
  },
58
- {
59
- "type": "copy",
60
- "file": "src/Libraries/Components/DatePickerAndroid/DatePickerAndroid.win32.js",
61
- "baseFile": "Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js",
62
- "baseHash": "09d82215c57ca5873a53523a63006daebf07ffbc",
63
- "issue": 4378
64
- },
65
59
  {
66
60
  "type": "copy",
67
61
  "file": "src/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js",
@@ -80,6 +74,13 @@
80
74
  "baseHash": "0b409391c852a1001cee74a84414a13c4fe88f8b",
81
75
  "issue": 4378
82
76
  },
77
+ {
78
+ "type": "patch",
79
+ "file": "src/Libraries/Components/Pressable/Pressable.win32.js",
80
+ "baseFile": "Libraries/Components/Pressable/Pressable.js",
81
+ "baseHash": "614553aa8396b42e932f8c717ebc8b493d772d93",
82
+ "issue": 6240
83
+ },
83
84
  {
84
85
  "type": "copy",
85
86
  "file": "src/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js",
@@ -189,7 +190,14 @@
189
190
  "type": "patch",
190
191
  "file": "src/Libraries/Components/View/View.win32.js",
191
192
  "baseFile": "Libraries/Components/View/View.js",
192
- "baseHash": "77bfbef8e835e4fee49311779bb039a99ae44372"
193
+ "baseHash": "689895e8755aed42e913460d1fa964907a74f06c"
194
+ },
195
+ {
196
+ "type": "patch",
197
+ "file": "src/Libraries/Components/View/ViewPropTypes.win32.js",
198
+ "baseFile": "Libraries/Components/View/ViewPropTypes.js",
199
+ "baseHash": "2b12228aa1ab0e12844996a99ff5d38fbff689a1",
200
+ "issue": 6240
193
201
  },
194
202
  {
195
203
  "type": "platform",
@@ -216,7 +224,7 @@
216
224
  "type": "derived",
217
225
  "file": "src/Libraries/Image/Image.win32.js",
218
226
  "baseFile": "Libraries/Image/Image.ios.js",
219
- "baseHash": "e259481373eaf9acad79087e1fdd3c0e27e25ee5",
227
+ "baseHash": "c8d495e707fc61bbfb929b9a343f5460c3b60c28",
220
228
  "issue": 4320
221
229
  },
222
230
  {
@@ -370,6 +378,20 @@
370
378
  "type": "platform",
371
379
  "file": "src/Libraries/PersonaCoin/PersonaCoinTypes.ts"
372
380
  },
381
+ {
382
+ "type": "patch",
383
+ "file": "src/Libraries/Pressability/HoverState.win32.js",
384
+ "baseFile": "Libraries/Pressability/HoverState.js",
385
+ "baseHash": "2807a1cddb7c5135f63e5dd4d0706ac660f25d76",
386
+ "issue": 6240
387
+ },
388
+ {
389
+ "type": "patch",
390
+ "file": "src/Libraries/Pressability/Pressability.win32.js",
391
+ "baseFile": "Libraries/Pressability/Pressability.js",
392
+ "baseHash": "05c53428a4b7b142fabb6833ecf54ba88c0aa05d",
393
+ "issue": 6240
394
+ },
373
395
  {
374
396
  "type": "platform",
375
397
  "file": "src/Libraries/QuirkSettings/CachingNativeQuirkSettings.js"
@@ -423,6 +445,13 @@
423
445
  "baseHash": "1a196691fb0e9b656c348b7d42427c1c6163c9bb",
424
446
  "issue": 7074
425
447
  },
448
+ {
449
+ "type": "patch",
450
+ "file": "src/Libraries/Types/CoreEventTypes.win32.js",
451
+ "baseFile": "Libraries/Types/CoreEventTypes.js",
452
+ "baseHash": "22c50d13820ca4db6c6cf5e6563f8437d55c24af",
453
+ "issue": 6240
454
+ },
426
455
  {
427
456
  "type": "copy",
428
457
  "file": "src/Libraries/Utilities/BackHandler.win32.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-iss/react-native-win32",
3
- "version": "0.66.2",
3
+ "version": "0.67.0-preview.3",
4
4
  "description": "Implementation of react native on top of Office's Win32 platform.",
5
5
  "license": "MIT",
6
6
  "main": "./index.win32.js",
@@ -25,9 +25,9 @@
25
25
  "@react-native-community/cli": "^6.0.0",
26
26
  "@react-native-community/cli-platform-android": "^6.0.0",
27
27
  "@react-native-community/cli-platform-ios": "^6.0.0",
28
- "@react-native-windows/virtualized-list": "0.66.0",
28
+ "@react-native-windows/virtualized-list": "0.67.0-preview.1",
29
29
  "@react-native/assets": "1.0.0",
30
- "@react-native/normalize-color": "1.0.0",
30
+ "@react-native/normalize-color": "2.0.0",
31
31
  "@react-native/polyfills": "2.0.0",
32
32
  "abort-controller": "^3.0.0",
33
33
  "anser": "^1.4.9",
@@ -37,7 +37,6 @@
37
37
  "hermes-engine": "~0.9.0",
38
38
  "invariant": "^2.2.4",
39
39
  "jsc-android": "^250230.2.1",
40
- "metro-babel-register": "0.66.2",
41
40
  "metro-react-native-babel-transformer": "0.66.2",
42
41
  "metro-runtime": "0.66.2",
43
42
  "metro-source-map": "0.66.2",
@@ -46,8 +45,8 @@
46
45
  "promise": "^8.0.3",
47
46
  "prop-types": "^15.7.2",
48
47
  "react-clone-referenced-element": "^1.0.1",
49
- "react-devtools-core": "^4.13.0",
50
- "react-native-codegen": "^0.0.7",
48
+ "react-devtools-core": "4.19.1",
49
+ "react-native-codegen": "^0.0.8",
51
50
  "react-refresh": "^0.4.0",
52
51
  "regenerator-runtime": "^0.13.2",
53
52
  "scheduler": "^0.20.2",
@@ -57,36 +56,39 @@
57
56
  "ws": "^6.1.4"
58
57
  },
59
58
  "devDependencies": {
60
- "@rnw-scripts/eslint-config": "1.1.7",
61
- "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.1",
59
+ "@rnw-scripts/eslint-config": "1.1.8",
60
+ "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.0.2",
62
61
  "@rnx-kit/jest-preset": "^0.1.0",
63
62
  "@types/node": "^14.14.22",
64
63
  "@types/prop-types": "15.7.1",
65
- "@types/react": "16.9.11",
66
- "@types/react-native": "^0.64.4",
64
+ "@types/react": "^17.0.21",
65
+ "@types/react-native": "^0.65.0",
67
66
  "babel-eslint": "^10.1.0",
68
67
  "eslint": "7.12.0",
69
- "flow-bin": "^0.158.0",
68
+ "flow-bin": "^0.162.0",
70
69
  "jscodeshift": "^0.11.0",
71
70
  "just-scripts": "^1.3.3",
72
71
  "prettier": "1.19.1",
73
72
  "react": "17.0.2",
74
- "react-native": "0.66.0",
75
- "react-native-platform-override": "^1.4.17",
73
+ "react-native": "0.67.0-rc.1",
74
+ "react-native-platform-override": "^1.5.1",
76
75
  "react-shallow-renderer": "16.14.1",
77
- "typescript": "^3.8.3"
76
+ "typescript": "^4.4.4"
78
77
  },
79
78
  "peerDependencies": {
80
79
  "react": "17.0.2",
81
- "react-native": "^0.66.0"
80
+ "react-native": "0.67.0-rc.1"
82
81
  },
83
82
  "beachball": {
84
- "defaultNpmTag": "latest",
83
+ "defaultNpmTag": "preview",
85
84
  "disallowedChangeTypes": [
86
85
  "major",
87
86
  "minor",
88
- "prerelease"
87
+ "patch"
89
88
  ]
90
89
  },
91
- "promoteRelease": true
90
+ "promoteRelease": true,
91
+ "engines": {
92
+ "node": ">= 12.0.0"
93
+ }
92
94
  }
@@ -0,0 +1,23 @@
1
+ interface SpyData {
2
+ type: number;
3
+ module?: string | undefined;
4
+ method: string | number;
5
+ args: any[];
6
+ }
7
+
8
+ declare class MessageQueue {
9
+ static spy(spyOrToggle: boolean | ((data: SpyData) => void)): void;
10
+
11
+ getCallableModule(name: string): Object;
12
+ registerCallableModule(name: string, module: Object): void;
13
+ registerLazyCallableModule(name: string, factory: () => Object): void;
14
+ }
15
+
16
+ declare module 'react-native/Libraries/BatchedBridge/BatchedBridge' {
17
+ const BatchedBridge: MessageQueue;
18
+ export default BatchedBridge;
19
+ }
20
+
21
+ declare module 'react-native/Libraries/BatchedBridge/MessageQueue' {
22
+ export default MessageQueue;
23
+ }