@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
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TextProps,
|
|
3
|
+
TextPropsIOS,
|
|
4
|
+
TextPropsAndroid,
|
|
5
|
+
AccessibilityProps,
|
|
6
|
+
AccessibilityPropsIOS,
|
|
7
|
+
AccessibilityPropsAndroid,
|
|
8
|
+
TextInputProps,
|
|
9
|
+
TextInputIOSProps,
|
|
10
|
+
TextInputAndroidProps,
|
|
11
|
+
ViewProps,
|
|
12
|
+
ViewPropsIOS,
|
|
13
|
+
ViewPropsAndroid,
|
|
14
|
+
ToolbarAndroidProps,
|
|
15
|
+
ViewPagerAndroidProps,
|
|
16
|
+
SegmentedControlIOSProps,
|
|
17
|
+
ScrollViewProps,
|
|
18
|
+
ScrollViewPropsIOS,
|
|
19
|
+
ScrollViewPropsAndroid,
|
|
20
|
+
InputAccessoryViewProps,
|
|
21
|
+
NavigatorIOSProps,
|
|
22
|
+
ActivityIndicatorProps,
|
|
23
|
+
ActivityIndicatorIOSProps,
|
|
24
|
+
DatePickerIOSProps,
|
|
25
|
+
DrawerLayoutAndroidProps,
|
|
26
|
+
PickerItemProps,
|
|
27
|
+
PickerIOSItemProps,
|
|
28
|
+
PickerProps,
|
|
29
|
+
PickerPropsIOS,
|
|
30
|
+
PickerPropsAndroid,
|
|
31
|
+
PickerIOSProps,
|
|
32
|
+
ProgressBarAndroidProps,
|
|
33
|
+
ProgressViewIOSProps,
|
|
34
|
+
RefreshControlProps,
|
|
35
|
+
RefreshControlPropsIOS,
|
|
36
|
+
RefreshControlPropsAndroid,
|
|
37
|
+
RecyclerViewBackedScrollViewProps,
|
|
38
|
+
SliderProps,
|
|
39
|
+
SliderPropsIOS,
|
|
40
|
+
SliderPropsAndroid,
|
|
41
|
+
SwitchIOSProps,
|
|
42
|
+
ImageSourcePropType,
|
|
43
|
+
ImageProps,
|
|
44
|
+
ImagePropsIOS,
|
|
45
|
+
ImagePropsAndroid,
|
|
46
|
+
ImageBackgroundProps,
|
|
47
|
+
FlatListProps,
|
|
48
|
+
VirtualizedListProps,
|
|
49
|
+
SectionListProps,
|
|
50
|
+
ListViewProps,
|
|
51
|
+
MaskedViewIOSProps,
|
|
52
|
+
ModalProps,
|
|
53
|
+
TouchableWithoutFeedbackProps,
|
|
54
|
+
TouchableHighlightProps,
|
|
55
|
+
TouchableOpacityProps,
|
|
56
|
+
TouchableNativeFeedbackProps,
|
|
57
|
+
TabBarIOSItemProps,
|
|
58
|
+
TabBarIOSProps,
|
|
59
|
+
SnapshotViewIOSProps,
|
|
60
|
+
ButtonProps,
|
|
61
|
+
StatusBarProps,
|
|
62
|
+
StatusBarPropsIOS,
|
|
63
|
+
StatusBarPropsAndroid,
|
|
64
|
+
SwitchProps,
|
|
65
|
+
SwitchPropsIOS,
|
|
66
|
+
} from 'react-native';
|
|
67
|
+
|
|
68
|
+
declare module 'react-native' {
|
|
69
|
+
/*
|
|
70
|
+
* Previously, props interfaces where named *Properties
|
|
71
|
+
* They have been renamed to *Props to match React Native documentation
|
|
72
|
+
* The following lines ensure compatibility with *Properties and should be removed in the future
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/** @deprecated Use TextProps */
|
|
76
|
+
export type TextProperties = TextProps;
|
|
77
|
+
|
|
78
|
+
/** @deprecated Use TextPropsIOS */
|
|
79
|
+
export type TextPropertiesIOS = TextPropsIOS;
|
|
80
|
+
|
|
81
|
+
/** @deprecated Use TextPropsAndroid */
|
|
82
|
+
export type TextPropertiesAndroid = TextPropsAndroid;
|
|
83
|
+
|
|
84
|
+
/** @deprecated Use AccessibilityProps */
|
|
85
|
+
export type AccessibilityProperties = AccessibilityProps;
|
|
86
|
+
|
|
87
|
+
/** @deprecated Use AccessibilityPropsIOS */
|
|
88
|
+
export type AccessibilityPropertiesIOS = AccessibilityPropsIOS;
|
|
89
|
+
|
|
90
|
+
/** @deprecated Use AccessibilityPropsAndroid */
|
|
91
|
+
export type AccessibilityPropertiesAndroid = AccessibilityPropsAndroid;
|
|
92
|
+
|
|
93
|
+
/** @deprecated Use TextInputProps */
|
|
94
|
+
export type TextInputProperties = TextInputProps;
|
|
95
|
+
|
|
96
|
+
/** @deprecated Use TextInputIOSProps */
|
|
97
|
+
export type TextInputIOSProperties = TextInputIOSProps;
|
|
98
|
+
|
|
99
|
+
/** @deprecated Use TextInputAndroidProps */
|
|
100
|
+
export type TextInputAndroidProperties = TextInputAndroidProps;
|
|
101
|
+
|
|
102
|
+
/** @deprecated Use ViewProps */
|
|
103
|
+
export type ViewProperties = ViewProps;
|
|
104
|
+
|
|
105
|
+
/** @deprecated Use ViewPropsIOS */
|
|
106
|
+
export type ViewPropertiesIOS = ViewPropsIOS;
|
|
107
|
+
|
|
108
|
+
/** @deprecated Use ViewPropsAndroid */
|
|
109
|
+
export type ViewPropertiesAndroid = ViewPropsAndroid;
|
|
110
|
+
|
|
111
|
+
/** @deprecated Use ToolbarAndroidProps */
|
|
112
|
+
export type ToolbarAndroidProperties = ToolbarAndroidProps;
|
|
113
|
+
|
|
114
|
+
/** @deprecated Use ViewPagerAndroidProps */
|
|
115
|
+
export type ViewPagerAndroidProperties = ViewPagerAndroidProps;
|
|
116
|
+
|
|
117
|
+
/** @deprecated Use SegmentedControlIOSProps */
|
|
118
|
+
export type SegmentedControlIOSProperties = SegmentedControlIOSProps;
|
|
119
|
+
|
|
120
|
+
/** @deprecated Use ScrollViewProps */
|
|
121
|
+
export type ScrollViewProperties = ScrollViewProps;
|
|
122
|
+
|
|
123
|
+
/** @deprecated Use ScrollViewPropsIOS */
|
|
124
|
+
export type ScrollViewPropertiesIOS = ScrollViewPropsIOS;
|
|
125
|
+
|
|
126
|
+
/** @deprecated Use ScrollViewPropsAndroid */
|
|
127
|
+
export type ScrollViewPropertiesAndroid = ScrollViewPropsAndroid;
|
|
128
|
+
|
|
129
|
+
/** @deprecated Use InputAccessoryViewProps */
|
|
130
|
+
export type InputAccessoryViewProperties = InputAccessoryViewProps;
|
|
131
|
+
|
|
132
|
+
/** @deprecated Use NavigatorIOSProps */
|
|
133
|
+
export type NavigatorIOSProperties = NavigatorIOSProps;
|
|
134
|
+
|
|
135
|
+
/** @deprecated Use ActivityIndicatorProps */
|
|
136
|
+
export type ActivityIndicatorProperties = ActivityIndicatorProps;
|
|
137
|
+
|
|
138
|
+
/** @deprecated Use ActivityIndicatorIOSProps */
|
|
139
|
+
export type ActivityIndicatorIOSProperties = ActivityIndicatorIOSProps;
|
|
140
|
+
|
|
141
|
+
/** @deprecated Use DatePickerIOSProps */
|
|
142
|
+
export type DatePickerIOSProperties = DatePickerIOSProps;
|
|
143
|
+
|
|
144
|
+
/** @deprecated Use DrawerLayoutAndroidProps */
|
|
145
|
+
export type DrawerLayoutAndroidProperties = DrawerLayoutAndroidProps;
|
|
146
|
+
|
|
147
|
+
/** @deprecated Use PickerItemProps */
|
|
148
|
+
export type PickerItemProperties = PickerItemProps;
|
|
149
|
+
|
|
150
|
+
/** @deprecated Use PickerIOSItemProps */
|
|
151
|
+
export type PickerIOSItemProperties = PickerIOSItemProps;
|
|
152
|
+
|
|
153
|
+
/** @deprecated Use PickerProps */
|
|
154
|
+
export type PickerProperties = PickerProps;
|
|
155
|
+
|
|
156
|
+
/** @deprecated Use PickerPropsIOS */
|
|
157
|
+
export type PickerPropertiesIOS = PickerPropsIOS;
|
|
158
|
+
|
|
159
|
+
/** @deprecated Use PickerPropsAndroid */
|
|
160
|
+
export type PickerPropertiesAndroid = PickerPropsAndroid;
|
|
161
|
+
|
|
162
|
+
/** @deprecated Use PickerIOSProps */
|
|
163
|
+
export type PickerIOSProperties = PickerIOSProps;
|
|
164
|
+
|
|
165
|
+
/** @deprecated Use ProgressBarAndroidProps */
|
|
166
|
+
export type ProgressBarAndroidProperties = ProgressBarAndroidProps;
|
|
167
|
+
|
|
168
|
+
/** @deprecated Use ProgressViewIOSProps */
|
|
169
|
+
export type ProgressViewIOSProperties = ProgressViewIOSProps;
|
|
170
|
+
|
|
171
|
+
/** @deprecated Use RefreshControlProps */
|
|
172
|
+
export type RefreshControlProperties = RefreshControlProps;
|
|
173
|
+
|
|
174
|
+
/** @deprecated Use RefreshControlPropsIOS */
|
|
175
|
+
export type RefreshControlPropertiesIOS = RefreshControlPropsIOS;
|
|
176
|
+
|
|
177
|
+
/** @deprecated Use RefreshControlPropsAndroid */
|
|
178
|
+
export type RefreshControlPropertiesAndroid = RefreshControlPropsAndroid;
|
|
179
|
+
|
|
180
|
+
/** @deprecated Use RecyclerViewBackedScrollViewProps */
|
|
181
|
+
export type RecyclerViewBackedScrollViewProperties = RecyclerViewBackedScrollViewProps;
|
|
182
|
+
|
|
183
|
+
/** @deprecated Use SliderProps */
|
|
184
|
+
export type SliderProperties = SliderProps;
|
|
185
|
+
|
|
186
|
+
/** @deprecated Use SliderPropsIOS */
|
|
187
|
+
export type SliderPropertiesIOS = SliderPropsIOS;
|
|
188
|
+
|
|
189
|
+
/** @deprecated Use SliderPropsAndroid */
|
|
190
|
+
export type SliderPropertiesAndroid = SliderPropsAndroid;
|
|
191
|
+
|
|
192
|
+
/** @deprecated Use SwitchIOSProps */
|
|
193
|
+
export type SwitchIOSProperties = SwitchIOSProps;
|
|
194
|
+
|
|
195
|
+
/** @deprecated Use ImageSourcePropType */
|
|
196
|
+
export type ImagePropertiesSourceOptions = ImageSourcePropType;
|
|
197
|
+
|
|
198
|
+
/** @deprecated Use ImageProps */
|
|
199
|
+
export type ImageProperties = ImageProps;
|
|
200
|
+
|
|
201
|
+
/** @deprecated Use ImagePropsIOS */
|
|
202
|
+
export type ImagePropertiesIOS = ImagePropsIOS;
|
|
203
|
+
|
|
204
|
+
/** @deprecated Use ImagePropsAndroid */
|
|
205
|
+
export type ImagePropertiesAndroid = ImagePropsAndroid;
|
|
206
|
+
|
|
207
|
+
/** @deprecated Use ImageBackgroundProps */
|
|
208
|
+
export type ImageBackgroundProperties = ImageBackgroundProps;
|
|
209
|
+
|
|
210
|
+
/** @deprecated Use FlatListProps */
|
|
211
|
+
export type FlatListProperties<ItemT> = FlatListProps<ItemT>;
|
|
212
|
+
|
|
213
|
+
/** @deprecated Use VirtualizedListProps */
|
|
214
|
+
export type VirtualizedListProperties<ItemT> = VirtualizedListProps<ItemT>;
|
|
215
|
+
|
|
216
|
+
/** @deprecated Use SectionListProps */
|
|
217
|
+
export type SectionListProperties<ItemT> = SectionListProps<ItemT>;
|
|
218
|
+
|
|
219
|
+
/** @deprecated Use ListViewProps */
|
|
220
|
+
export type ListViewProperties = ListViewProps;
|
|
221
|
+
|
|
222
|
+
/** @deprecated Use MaskedViewIOSProps */
|
|
223
|
+
export type MaskedViewIOSProperties = MaskedViewIOSProps;
|
|
224
|
+
|
|
225
|
+
/** @deprecated Use ModalProps */
|
|
226
|
+
export type ModalProperties = ModalProps;
|
|
227
|
+
|
|
228
|
+
/** @deprecated Use TouchableWithoutFeedbackProps */
|
|
229
|
+
export type TouchableWithoutFeedbackProperties = TouchableWithoutFeedbackProps;
|
|
230
|
+
|
|
231
|
+
/** @deprecated Use TouchableHighlightProps */
|
|
232
|
+
export type TouchableHighlightProperties = TouchableHighlightProps;
|
|
233
|
+
|
|
234
|
+
/** @deprecated Use TouchableOpacityProps */
|
|
235
|
+
export type TouchableOpacityProperties = TouchableOpacityProps;
|
|
236
|
+
|
|
237
|
+
/** @deprecated Use TouchableNativeFeedbackProps */
|
|
238
|
+
export type TouchableNativeFeedbackProperties = TouchableNativeFeedbackProps;
|
|
239
|
+
|
|
240
|
+
/** @deprecated Use TabBarIOSItemProps */
|
|
241
|
+
export type TabBarIOSItemProperties = TabBarIOSItemProps;
|
|
242
|
+
|
|
243
|
+
/** @deprecated Use TabBarIOSProps */
|
|
244
|
+
export type TabBarIOSProperties = TabBarIOSProps;
|
|
245
|
+
|
|
246
|
+
/** @deprecated Use SnapshotViewIOSProps */
|
|
247
|
+
export type SnapshotViewIOSProperties = SnapshotViewIOSProps;
|
|
248
|
+
|
|
249
|
+
/** @deprecated Use ButtonProps */
|
|
250
|
+
export type ButtonProperties = ButtonProps;
|
|
251
|
+
|
|
252
|
+
/** @deprecated Use StatusBarProps */
|
|
253
|
+
export type StatusBarProperties = StatusBarProps;
|
|
254
|
+
|
|
255
|
+
/** @deprecated Use StatusBarPropsIOS */
|
|
256
|
+
export type StatusBarPropertiesIOS = StatusBarPropsIOS;
|
|
257
|
+
|
|
258
|
+
/** @deprecated Use StatusBarPropsAndroid */
|
|
259
|
+
export type StatusBarPropertiesAndroid = StatusBarPropsAndroid;
|
|
260
|
+
|
|
261
|
+
/** @deprecated Use SwitchProps */
|
|
262
|
+
export type SwitchProperties = SwitchProps;
|
|
263
|
+
|
|
264
|
+
/** @deprecated Use SwitchPropsIOS */
|
|
265
|
+
export type SwitchPropertiesIOS = SwitchPropsIOS;
|
|
266
|
+
}
|
package/src/typings-index.ts
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @packagedocumentation
|
|
3
3
|
*
|
|
4
|
-
* This package provides Win32 specific components
|
|
4
|
+
* This package provides Win32 specific components in addition to providing the core react-native primities.
|
|
5
5
|
* Cross platform React-native primitives should be imported from 'react-native'
|
|
6
6
|
* Win32 specific components need to be imported from '\@office-iss/react-native-win32'
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
|
-
This file is used to provide the typings for this package.
|
|
12
|
-
the package actually exports the whole of the win32 implementation of react-native.
|
|
13
|
-
|
|
11
|
+
This file is used to provide the typings for this package.
|
|
14
12
|
NOTE: Concrete classes, objects etc that actually need to be exported from the package,
|
|
15
13
|
need to also be added to index.win32.js
|
|
16
14
|
*/
|
|
17
15
|
|
|
16
|
+
// Importing from a copy of react-native types instead of from react-native
|
|
17
|
+
// to allow custom typescript resolvers to redirect react-native to react-native-win32
|
|
18
|
+
// when building bundles for the win32 platform
|
|
19
|
+
export * from './rntypes/index';
|
|
20
|
+
export type {
|
|
21
|
+
AccessibilityActionInfo,
|
|
22
|
+
AccessibilityActionName,
|
|
23
|
+
AccessibilityState
|
|
24
|
+
} from './Libraries/Components/View/ViewWin32.Props';
|
|
18
25
|
export * from './Libraries/Components/View/ViewWin32.Props';
|
|
19
26
|
export * from './Libraries/Components/View/ViewWin32';
|
|
20
27
|
export * from './Libraries/Components/Text/TextWin32.Props';
|
package/typings-index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @packagedocumentation
|
|
3
3
|
*
|
|
4
|
-
* This package provides Win32 specific components
|
|
4
|
+
* This package provides Win32 specific components in addition to providing the core react-native primities.
|
|
5
5
|
* Cross platform React-native primitives should be imported from 'react-native'
|
|
6
6
|
* Win32 specific components need to be imported from '\@office-iss/react-native-win32'
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
+
export * from './rntypes/index';
|
|
10
|
+
export type { AccessibilityActionInfo, AccessibilityActionName, AccessibilityState } from './Libraries/Components/View/ViewWin32.Props';
|
|
9
11
|
export * from './Libraries/Components/View/ViewWin32.Props';
|
|
10
12
|
export * from './Libraries/Components/View/ViewWin32';
|
|
11
13
|
export * from './Libraries/Components/Text/TextWin32.Props';
|
package/typings-index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @packagedocumentation
|
|
4
4
|
*
|
|
5
|
-
* This package provides Win32 specific components
|
|
5
|
+
* This package provides Win32 specific components in addition to providing the core react-native primities.
|
|
6
6
|
* Cross platform React-native primitives should be imported from 'react-native'
|
|
7
7
|
* Win32 specific components need to be imported from '\@office-iss/react-native-win32'
|
|
8
8
|
*
|
|
@@ -15,16 +15,18 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
15
15
|
o[k2] = m[k];
|
|
16
16
|
}));
|
|
17
17
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
-
for (var p in m) if (p !== "default" && !
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
/*
|
|
22
|
-
This file is used to provide the typings for this package.
|
|
23
|
-
the package actually exports the whole of the win32 implementation of react-native.
|
|
24
|
-
|
|
22
|
+
This file is used to provide the typings for this package.
|
|
25
23
|
NOTE: Concrete classes, objects etc that actually need to be exported from the package,
|
|
26
24
|
need to also be added to index.win32.js
|
|
27
25
|
*/
|
|
26
|
+
// Importing from a copy of react-native types instead of from react-native
|
|
27
|
+
// to allow custom typescript resolvers to redirect react-native to react-native-win32
|
|
28
|
+
// when building bundles for the win32 platform
|
|
29
|
+
__exportStar(require("./rntypes/index"), exports);
|
|
28
30
|
__exportStar(require("./Libraries/Components/View/ViewWin32.Props"), exports);
|
|
29
31
|
__exportStar(require("./Libraries/Components/View/ViewWin32"), exports);
|
|
30
32
|
__exportStar(require("./Libraries/Components/Text/TextWin32.Props"), exports);
|
package/typings-index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typings-index.js","sourceRoot":"","sources":["src/typings-index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;AAEH
|
|
1
|
+
{"version":3,"file":"typings-index.js","sourceRoot":"","sources":["src/typings-index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;AAEH;;;;EAIE;AAEF,2EAA2E;AAC3E,sFAAsF;AACtF,+CAA+C;AAC/C,kDAAgC;AAMhC,8EAA4D;AAC5D,wEAAsD;AACtD,8EAA4D;AAC5D,wEAAsD;AACtD,kFAAgE;AAChE,4EAA0D;AAC1D,sFAAoE;AACpE,wFAAsE;AACtE,wFAAsE;AACtE,kFAAgE;AAChE,sEAAoD;AACpD,2EAAyD;AACzD,2EAAyD","sourcesContent":["/**\n * @packagedocumentation\n *\n * This package provides Win32 specific components in addition to providing the core react-native primities.\n * Cross platform React-native primitives should be imported from 'react-native'\n * Win32 specific components need to be imported from '\\@office-iss/react-native-win32'\n *\n */\n\n/*\n This file is used to provide the typings for this package.\n NOTE: Concrete classes, objects etc that actually need to be exported from the package,\n need to also be added to index.win32.js\n*/\n\n// Importing from a copy of react-native types instead of from react-native\n// to allow custom typescript resolvers to redirect react-native to react-native-win32\n// when building bundles for the win32 platform\nexport * from './rntypes/index';\nexport type { \n AccessibilityActionInfo,\n AccessibilityActionName,\n AccessibilityState\n} from './Libraries/Components/View/ViewWin32.Props';\nexport * from './Libraries/Components/View/ViewWin32.Props';\nexport * from './Libraries/Components/View/ViewWin32';\nexport * from './Libraries/Components/Text/TextWin32.Props';\nexport * from './Libraries/Components/Text/TextWin32';\nexport * from './Libraries/Components/Button/ButtonWin32.Props';\nexport * from './Libraries/Components/Button/ButtonWin32';\nexport * from './Libraries/StyleSheet/PlatformColorValueTypesWin32';\nexport * from './Libraries/Components/Touchable/TouchableWin32.Props';\nexport * from './Libraries/Components/Touchable/TouchableWin32.Types';\nexport * from './Libraries/Components/Touchable/TouchableWin32';\nexport * from './Libraries/PersonaCoin/PersonaCoin';\nexport * from './Libraries/PersonaCoin/PersonaCoinTypes';\nexport * from './Libraries/Utilities/FocusManager.win32';"]}
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
import type {Options, DatePickerOpenAction} from './DatePickerAndroidTypes';
|
|
12
|
-
import NativeDatePickerAndroid from './NativeDatePickerAndroid';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Convert a Date to a timestamp.
|
|
16
|
-
*/
|
|
17
|
-
function _toMillis(options: Options, key: string) {
|
|
18
|
-
const dateVal = options[key];
|
|
19
|
-
// Is it a Date object?
|
|
20
|
-
if (typeof dateVal === 'object' && typeof dateVal.getMonth === 'function') {
|
|
21
|
-
options[key] = dateVal.getTime();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Opens the standard Android date picker dialog.
|
|
27
|
-
*
|
|
28
|
-
* ### Example
|
|
29
|
-
*
|
|
30
|
-
* ```
|
|
31
|
-
* try {
|
|
32
|
-
* const {action, year, month, day} = await DatePickerAndroid.open({
|
|
33
|
-
* // Use `new Date()` for current date.
|
|
34
|
-
* // May 25 2020. Month 0 is January.
|
|
35
|
-
* date: new Date(2020, 4, 25)
|
|
36
|
-
* });
|
|
37
|
-
* if (action !== DatePickerAndroid.dismissedAction) {
|
|
38
|
-
* // Selected year, month (0-11), day
|
|
39
|
-
* }
|
|
40
|
-
* } catch ({code, message}) {
|
|
41
|
-
* console.warn('Cannot open date picker', message);
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
class DatePickerAndroid {
|
|
46
|
-
/**
|
|
47
|
-
* Opens the standard Android date picker dialog.
|
|
48
|
-
*
|
|
49
|
-
* The available keys for the `options` object are:
|
|
50
|
-
*
|
|
51
|
-
* - `date` (`Date` object or timestamp in milliseconds) - date to show by default
|
|
52
|
-
* - `minDate` (`Date` or timestamp in milliseconds) - minimum date that can be selected
|
|
53
|
-
* - `maxDate` (`Date` object or timestamp in milliseconds) - maximum date that can be selected
|
|
54
|
-
* - `mode` (`enum('calendar', 'spinner', 'default')`) - To set the date-picker mode to calendar/spinner/default
|
|
55
|
-
* - 'calendar': Show a date picker in calendar mode.
|
|
56
|
-
* - 'spinner': Show a date picker in spinner mode.
|
|
57
|
-
* - 'default': Show a default native date picker(spinner/calendar) based on android versions.
|
|
58
|
-
*
|
|
59
|
-
* Returns a Promise which will be invoked an object containing `action`, `year`, `month` (0-11),
|
|
60
|
-
* `day` if the user picked a date. If the user dismissed the dialog, the Promise will
|
|
61
|
-
* still be resolved with action being `DatePickerAndroid.dismissedAction` and all the other keys
|
|
62
|
-
* being undefined. **Always** check whether the `action` before reading the values.
|
|
63
|
-
*
|
|
64
|
-
* Note the native date picker dialog has some UI glitches on Android 4 and lower
|
|
65
|
-
* when using the `minDate` and `maxDate` options.
|
|
66
|
-
*/
|
|
67
|
-
static async open(options: ?Options): Promise<DatePickerOpenAction> {
|
|
68
|
-
const optionsMs = options;
|
|
69
|
-
if (optionsMs != null) {
|
|
70
|
-
_toMillis(optionsMs, 'date');
|
|
71
|
-
_toMillis(optionsMs, 'minDate');
|
|
72
|
-
_toMillis(optionsMs, 'maxDate');
|
|
73
|
-
}
|
|
74
|
-
return NativeDatePickerAndroid.open(options);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* A date has been selected.
|
|
79
|
-
*/
|
|
80
|
-
static +dateSetAction: 'dateSetAction' = 'dateSetAction';
|
|
81
|
-
/**
|
|
82
|
-
* The dialog has been dismissed.
|
|
83
|
-
*/
|
|
84
|
-
static +dismissedAction: 'dismissedAction' = 'dismissedAction';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
module.exports = DatePickerAndroid;
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
import type {Options, DatePickerOpenAction} from './DatePickerAndroidTypes';
|
|
14
|
-
|
|
15
|
-
class DatePickerAndroid {
|
|
16
|
-
static async open(options: ?Options): Promise<DatePickerOpenAction> {
|
|
17
|
-
throw new Error('DatePickerAndroid is not supported on this platform.');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A date has been selected.
|
|
22
|
-
*/
|
|
23
|
-
static +dateSetAction: 'dateSetAction' = 'dateSetAction';
|
|
24
|
-
/**
|
|
25
|
-
* The dialog has been dismissed.
|
|
26
|
-
*/
|
|
27
|
-
static +dismissedAction: 'dismissedAction' = 'dismissedAction';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = DatePickerAndroid;
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
import type {Options, DatePickerOpenAction} from './DatePickerAndroidTypes';
|
|
14
|
-
|
|
15
|
-
class DatePickerAndroid {
|
|
16
|
-
static async open(options: ?Options): Promise<DatePickerOpenAction> {
|
|
17
|
-
throw new Error('DatePickerAndroid is not supported on this platform.');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A date has been selected.
|
|
22
|
-
*/
|
|
23
|
-
static +dateSetAction: 'dateSetAction' = 'dateSetAction';
|
|
24
|
-
/**
|
|
25
|
-
* The dialog has been dismissed.
|
|
26
|
-
*/
|
|
27
|
-
static +dismissedAction: 'dismissedAction' = 'dismissedAction';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = DatePickerAndroid;
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
export type Options = $ReadOnly<{|
|
|
12
|
-
date?: ?(Date | number),
|
|
13
|
-
minDate?: ?(Date | number),
|
|
14
|
-
maxDate?: ?(Date | number),
|
|
15
|
-
mode?: ?('calendar' | 'spinner' | 'default'),
|
|
16
|
-
|}>;
|
|
17
|
-
|
|
18
|
-
export type DatePickerOpenAction =
|
|
19
|
-
| {|
|
|
20
|
-
action: 'dateSetAction',
|
|
21
|
-
year: number,
|
|
22
|
-
month: number,
|
|
23
|
-
day: number,
|
|
24
|
-
|}
|
|
25
|
-
| {|
|
|
26
|
-
action: 'dismissedAction',
|
|
27
|
-
year: void,
|
|
28
|
-
month: void,
|
|
29
|
-
day: void,
|
|
30
|
-
|};
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const React = require('react');
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Renders static content efficiently by allowing React to short-circuit the
|
|
17
|
-
* reconciliation process. This component should be used when you know that a
|
|
18
|
-
* subtree of components will never need to be updated.
|
|
19
|
-
*
|
|
20
|
-
* const someValue = ...; // We know for certain this value will never change.
|
|
21
|
-
* return (
|
|
22
|
-
* <StaticContainer>
|
|
23
|
-
* <MyComponent value={someValue} />
|
|
24
|
-
* </StaticContainer>
|
|
25
|
-
* );
|
|
26
|
-
*
|
|
27
|
-
* Typically, you will not need to use this component and should opt for normal
|
|
28
|
-
* React reconciliation.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
type Props = $ReadOnly<{|
|
|
32
|
-
/**
|
|
33
|
-
* Whether or not this component should update.
|
|
34
|
-
*/
|
|
35
|
-
shouldUpdate?: ?boolean,
|
|
36
|
-
/**
|
|
37
|
-
* Content short-circuited by React reconciliation process.
|
|
38
|
-
*/
|
|
39
|
-
children: React.Node,
|
|
40
|
-
|}>;
|
|
41
|
-
class StaticContainer extends React.Component<Props> {
|
|
42
|
-
shouldComponentUpdate(nextProps: Props): boolean {
|
|
43
|
-
return !!nextProps.shouldUpdate;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
render(): React.Node {
|
|
47
|
-
return this.props.children;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
module.exports = StaticContainer;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
import invariant from 'invariant';
|
|
13
|
-
|
|
14
|
-
const ensurePositiveDelayProps = function(props: any) {
|
|
15
|
-
invariant(
|
|
16
|
-
!(
|
|
17
|
-
props.delayPressIn < 0 ||
|
|
18
|
-
props.delayPressOut < 0 ||
|
|
19
|
-
props.delayLongPress < 0
|
|
20
|
-
),
|
|
21
|
-
'Touchable components cannot have negative delay properties',
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
module.exports = ensurePositiveDelayProps;
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const InteractionManager = require('./InteractionManager');
|
|
12
|
-
import {type Handle} from './InteractionManager';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* This mixin provides safe versions of InteractionManager start/end methods
|
|
16
|
-
* that ensures `clearInteractionHandle` is always called
|
|
17
|
-
* once per start, even if the component is unmounted.
|
|
18
|
-
*/
|
|
19
|
-
const InteractionMixin = {
|
|
20
|
-
componentWillUnmount: function() {
|
|
21
|
-
while (this._interactionMixinHandles.length) {
|
|
22
|
-
InteractionManager.clearInteractionHandle(
|
|
23
|
-
this._interactionMixinHandles.pop(),
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
_interactionMixinHandles: ([]: Array<number>),
|
|
29
|
-
|
|
30
|
-
createInteractionHandle: function(): Handle {
|
|
31
|
-
const handle = InteractionManager.createInteractionHandle();
|
|
32
|
-
this._interactionMixinHandles.push(handle);
|
|
33
|
-
return handle;
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
// $FlowFixMe[signature-verification-failure]
|
|
37
|
-
clearInteractionHandle: function(clearHandle: number): void {
|
|
38
|
-
InteractionManager.clearInteractionHandle(clearHandle);
|
|
39
|
-
this._interactionMixinHandles = this._interactionMixinHandles.filter(
|
|
40
|
-
handle => handle !== clearHandle,
|
|
41
|
-
);
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Schedule work for after all interactions have completed.
|
|
46
|
-
*
|
|
47
|
-
* @param {function} callback
|
|
48
|
-
*/
|
|
49
|
-
runAfterInteractions: function(callback: Function): void {
|
|
50
|
-
InteractionManager.runAfterInteractions(callback);
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
module.exports = InteractionMixin;
|