react-native-windows 0.0.0-canary.424 → 0.0.0-canary.428
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 +4 -2
- package/Directory.Build.props +17 -14
- package/Directory.Build.targets +1 -58
- package/Folly/Folly.vcxproj +4 -11
- package/Folly/Folly.vcxproj.filters +0 -3
- package/Libraries/Alert/Alert.js +2 -2
- package/Libraries/Alert/Alert.windows.js +4 -4
- package/Libraries/Alert/RCTAlertManager.android.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +53 -54
- package/Libraries/Animated/AnimatedMock.js +8 -8
- package/Libraries/Animated/NativeAnimatedHelper.js +23 -20
- package/Libraries/Animated/SpringConfig.js +10 -10
- package/Libraries/Animated/bezier.js +19 -8
- package/Libraries/Animated/createAnimatedComponent.js +3 -3
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +2 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +10 -9
- package/Libraries/Animated/nodes/AnimatedStyle.js +2 -2
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/AppState/AppState.js +6 -5
- package/Libraries/BatchedBridge/MessageQueue.js +6 -8
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +2 -2
- package/Libraries/Blob/URL.js +25 -20
- package/Libraries/BugReporting/getReactData.js +14 -5
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +53 -17
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +59 -23
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +3 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +17 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -3
- package/Libraries/Components/Keyboard/Keyboard.js +8 -7
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +2 -2
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +5 -4
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +2 -1
- package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +0 -1
- package/Libraries/Components/RefreshControl/RefreshControl.js +2 -7
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +2 -7
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +2 -2
- package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +2 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -5
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +3 -5
- package/Libraries/Components/ScrollView/ScrollView.js +12 -12
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -5
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +2 -8
- package/Libraries/Components/Sound/SoundManager.js +1 -1
- package/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +0 -3
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +5 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +5 -4
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +0 -2
- package/Libraries/Components/TextInput/TextInput.js +15 -14
- package/Libraries/Components/TextInput/TextInput.windows.js +18 -17
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +2 -3
- package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +3 -3
- package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +3 -3
- package/Libraries/Components/ToastAndroid/ToastAndroid.windows.js +3 -3
- package/Libraries/Components/Touchable/BoundingDimensions.js +2 -2
- package/Libraries/Components/Touchable/PooledClass.js +11 -11
- package/Libraries/Components/Touchable/Position.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +26 -25
- package/Libraries/Components/Touchable/TouchableBounce.js +2 -5
- package/Libraries/Components/Touchable/TouchableHighlight.js +2 -5
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +5 -5
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -11
- package/Libraries/Components/Touchable/TouchableOpacity.js +2 -5
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -5
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +2 -5
- package/Libraries/Components/View/View.windows.js +1 -1
- package/Libraries/Components/View/ViewNativeComponent.js +3 -4
- package/Libraries/Core/Devtools/parseHermesStack.js +2 -1
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/InitializeCore.js +0 -2
- package/Libraries/Core/NativeExceptionsManager.js +2 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/ReactNativeVersionCheck.js +10 -1
- package/Libraries/Core/ReactNativeVersionCheck.windows.js +57 -0
- package/Libraries/Core/Timers/JSTimers.js +17 -13
- package/Libraries/Core/setUpAlert.js +1 -1
- package/Libraries/Core/setUpBatchedBridge.js +14 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +1 -1
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
- package/Libraries/Core/setUpSegmentFetcher.js +4 -4
- package/Libraries/Core/setUpTimers.js +11 -1
- package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +1 -1
- package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +2 -2
- package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +2 -2
- package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +2 -1
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +2 -1
- package/Libraries/HeapCapture/HeapCapture.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +2 -4
- package/Libraries/Image/Image.android.js +4 -4
- package/Libraries/Image/Image.ios.js +3 -3
- package/Libraries/Image/Image.windows.js +5 -5
- package/Libraries/Image/ImageAnalyticsTagContext.js +2 -3
- package/Libraries/Image/ImageBackground.js +10 -1
- package/Libraries/Image/ImagePickerIOS.js +6 -6
- package/Libraries/Image/ImageViewNativeComponent.js +3 -5
- package/Libraries/Image/NativeImageLoaderAndroid.js +1 -3
- package/Libraries/Image/TextInlineImageNativeComponent.js +3 -5
- package/Libraries/Inspector/Inspector.js +1 -1
- package/Libraries/Inspector/NetworkOverlay.js +2 -5
- package/Libraries/Interaction/BridgeSpyStallHandler.js +1 -1
- package/Libraries/Interaction/FrameRateLogger.js +2 -2
- package/Libraries/Interaction/InteractionManager.js +2 -4
- package/Libraries/Interaction/JSEventLoopWatchdog.js +4 -4
- package/Libraries/Interaction/PanResponder.js +3 -4
- package/Libraries/Interaction/TouchHistoryMath.js +7 -7
- package/Libraries/JSInspector/NetworkAgent.js +1 -6
- package/Libraries/LayoutAnimation/LayoutAnimation.js +3 -3
- package/Libraries/Lists/FillRateHelper.js +4 -3
- package/Libraries/Lists/FlatList.js +3 -4
- package/Libraries/Lists/ViewabilityHelper.js +4 -10
- package/Libraries/Lists/VirtualizeUtils.js +2 -6
- package/Libraries/Lists/VirtualizedList.js +12 -23
- package/Libraries/Lists/VirtualizedListContext.js +2 -3
- package/Libraries/Lists/VirtualizedSectionList.js +53 -62
- package/Libraries/Lists/__tests__/{FillRateHelper-test.js → FillRateHelper-test.windows.js} +7 -7
- package/Libraries/Lists/__tests__/{FlatList-test.js → FlatList-test.windows.js} +2 -2
- package/Libraries/Lists/__tests__/{SectionList-test.js → SectionList-test.windows.js} +14 -14
- package/Libraries/Lists/__tests__/ViewabilityHelper-test.js +14 -14
- package/Libraries/Lists/__tests__/{VirtualizeUtils-test.js → VirtualizeUtils-test.windows.js} +18 -21
- package/Libraries/Lists/__tests__/{VirtualizedList-test.js → VirtualizedList-test.windows.js} +32 -32
- package/Libraries/Lists/__tests__/{VirtualizedSectionList-test.js → VirtualizedSectionList-test.windows.js} +16 -14
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +12 -23
- package/Libraries/LogBox/LogBox.js +3 -3
- package/Libraries/LogBox/UI/AnsiHighlight.js +9 -4
- package/Libraries/LogBox/UI/LogBoxInspector.js +3 -1
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +3 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +6 -2
- package/Libraries/LogBox/UI/LogBoxNotification.js +6 -3
- package/Libraries/Modal/Modal.js +2 -1
- package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -27
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +58 -9
- package/Libraries/Network/RCTNetworkingWinShared.js +2 -2
- package/Libraries/Network/XHRInterceptor.js +5 -6
- package/Libraries/Performance/SamplingProfiler.js +3 -3
- package/Libraries/Performance/Systrace.js +8 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -3
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/Pressability/Pressability.windows.js +6 -6
- package/Libraries/Pressability/PressabilityDebug.js +14 -11
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +4 -2
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +6 -5
- package/Libraries/ReactNative/AppContainer.js +2 -2
- package/Libraries/ReactNative/AppRegistry.js +2 -3
- package/Libraries/ReactNative/I18nManager.js +2 -5
- package/Libraries/ReactNative/PaperUIManager.js +2 -3
- package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
- package/Libraries/ReactNative/RootTag.js +2 -3
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +3 -1
- package/Libraries/ReactNative/getNativeComponentAttributes.js +15 -1
- package/Libraries/Renderer/shims/ReactFabric.js +2 -2
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
- package/Libraries/Renderer/shims/ReactNative.js +2 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -2
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -2
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/Storage/AsyncStorage.js +21 -21
- package/Libraries/StyleSheet/StyleSheet.js +2 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
- package/Libraries/StyleSheet/processColor.js +2 -2
- package/Libraries/StyleSheet/processTransform.js +20 -1
- package/Libraries/StyleSheet/splitLayoutProps.js +1 -3
- package/Libraries/Text/Text.js +2 -1
- package/Libraries/Text/Text.windows.js +2 -1
- package/Libraries/Text/TextNativeComponent.js +3 -5
- package/Libraries/Text/TextNativeComponent.windows.js +3 -5
- package/Libraries/Utilities/Appearance.js +6 -5
- package/Libraries/Utilities/BackHandler.android.js +4 -4
- package/Libraries/Utilities/BackHandler.windows.js +4 -4
- package/Libraries/Utilities/HMRClient.js +2 -2
- package/Libraries/Utilities/JSDevSupportModule.js +3 -4
- package/Libraries/Utilities/MatrixMath.js +19 -19
- package/Libraries/Utilities/PerformanceLoggerContext.js +2 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +7 -8
- package/Libraries/Utilities/SceneTracker.js +4 -3
- package/Libraries/Utilities/__mocks__/BackHandler.js +3 -3
- package/Libraries/Utilities/buildStyleInterpolator.js +9 -9
- package/Libraries/Utilities/codegenNativeComponent.js +3 -2
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -2
- package/Libraries/Utilities/differ/deepDiffer.js +1 -1
- package/Libraries/Utilities/differ/insetsDiffer.js +1 -1
- package/Libraries/Utilities/differ/matricesDiffer.js +5 -1
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/differ/sizesDiffer.js +10 -4
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/mergeIntoFast.js +1 -1
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/useWindowDimensions.js +5 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +1 -1
- package/Libraries/Vibration/Vibration.js +2 -2
- package/Libraries/WebSocket/WebSocketInterceptor.js +6 -6
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/emitter/_EmitterSubscription.js +2 -1
- package/Libraries/vendor/emitter/_EventEmitter.js +2 -1
- package/Libraries/vendor/emitter/_EventSubscription.js +2 -1
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +1 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +34 -33
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +0 -1
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +3 -0
- package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.cpp +0 -5
- package/Microsoft.ReactNative/ReactCoreInjection.cpp +4 -11
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +6 -1
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +16 -9
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +3 -0
- package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
- package/Mso/future/futureWinRT.h +7 -5
- package/PropertySheets/External/Microsoft.ReactNative.Common.props +5 -3
- package/PropertySheets/External/Microsoft.ReactNative.Cpp.Dependencies.props +17 -0
- package/PropertySheets/Generated/PackageVersion.g.props +1 -1
- package/PropertySheets/JSEngine.props +3 -3
- package/PropertySheets/React.Cpp.props +9 -1
- package/PropertySheets/WinUI.props +0 -3
- package/ReactCommon/ReactCommon.vcxproj +3 -9
- package/ReactCommon/ReactCommon.vcxproj.filters +0 -3
- package/Scripts/Tfs/Start-TestServers.ps1 +19 -11
- package/Scripts/copyRNLibraries.js +8 -8
- package/Scripts/just.js +1 -1
- package/Scripts/run-desktop-integration-tests.js +6 -6
- package/Scripts/utils.js +1 -1
- package/Shared/OInstance.cpp +3 -92
- package/codegen/NativeAccessibilityInfoSpec.g.h +11 -5
- package/fmt/fmt.vcxproj +0 -3
- package/fmt/fmt.vcxproj.filters +0 -3
- package/jest/assetFileTransformer.js +2 -2
- package/jest/mockNativeComponent.js +4 -0
- package/jest/preprocessor.js +9 -77
- package/jest/setup.js +4 -3
- package/package.json +15 -15
- package/rntypes/index.d.ts +10 -1
- package/template/cpp-app/proj/MyApp.sln +2 -2
- package/template/cpp-app/proj/MyApp.vcxproj +9 -34
- package/template/cpp-app/proj/MyApp.vcxproj.filters +0 -1
- package/template/cpp-lib/proj/MyLib.sln +2 -2
- package/template/cpp-lib/proj/MyLib.vcxproj +9 -35
- package/template/cpp-lib/proj/MyLib.vcxproj.filters +0 -1
- package/template/cs-app/proj/Directory.Build.props +13 -0
- package/template/cs-app/proj/MyApp.csproj +3 -0
- package/template/cs-app/proj/MyApp.sln +2 -2
- package/template/cs-lib/proj/Directory.Build.props +13 -0
- package/template/cs-lib/proj/MyLib.csproj +3 -0
- package/template/cs-lib/proj/MyLib.sln +2 -2
- package/Folly/packages.config +0 -4
- package/Microsoft.ReactNative/packages.config +0 -12
- package/ReactCommon/packages.config +0 -4
- package/fmt/packages.config +0 -3
- package/template/cpp-app/proj/packages.config +0 -6
- package/template/cpp-lib/proj/packages.config +0 -6
package/.flowconfig
CHANGED
|
@@ -60,6 +60,9 @@
|
|
|
60
60
|
; Ignore the src folder - flow files are combined with ones from react-native into the root Libraries folder
|
|
61
61
|
.*/vnext/src/.*
|
|
62
62
|
|
|
63
|
+
; Ignore files with flow typing issues #9223
|
|
64
|
+
.*/vnext/Libraries/Core/ReactNativeVersionCheck.js
|
|
65
|
+
|
|
63
66
|
[untyped]
|
|
64
67
|
.*/node_modules/@react-native-community/cli/.*/.*
|
|
65
68
|
|
|
@@ -76,7 +79,6 @@ flow/
|
|
|
76
79
|
emoji=true
|
|
77
80
|
|
|
78
81
|
exact_by_default=true
|
|
79
|
-
indexed_access=false
|
|
80
82
|
|
|
81
83
|
format.bracket_spacing=false
|
|
82
84
|
|
|
@@ -120,4 +122,4 @@ untyped-import
|
|
|
120
122
|
untyped-type-import
|
|
121
123
|
|
|
122
124
|
[version]
|
|
123
|
-
^0.
|
|
125
|
+
^0.164.0
|
package/Directory.Build.props
CHANGED
|
@@ -7,13 +7,10 @@
|
|
|
7
7
|
<PropertyGroup>
|
|
8
8
|
<SolutionDir Condition="'$(SolutionDir)' == '' OR '$(SolutionDir)' == '*Undefined*'">$(MSBuildThisFileDirectory)</SolutionDir>
|
|
9
9
|
|
|
10
|
-
<Platform Condition="'$(Platform)' == ''">x64</Platform>
|
|
11
|
-
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
|
12
|
-
|
|
13
10
|
<!-- This property sets the CscTask to print the full path of the csharp file on errors and warnings rather than just the filename. -->
|
|
14
11
|
<GenerateFullPaths>true</GenerateFullPaths>
|
|
15
12
|
|
|
16
|
-
<!--
|
|
13
|
+
<!--
|
|
17
14
|
SourceLink is disabled by default since customer projects are still building our projects and therefore we don't want to force customers to use this.
|
|
18
15
|
The PR (windows-vs-pr.yml) and CI (publish.yml() turn it back on.
|
|
19
16
|
-->
|
|
@@ -24,6 +21,22 @@
|
|
|
24
21
|
|
|
25
22
|
<PropertyGroup Label="Configuration">
|
|
26
23
|
<ProjectName Condition="'$(ProjectName)'==''">$(MSBuildProjectName)</ProjectName>
|
|
24
|
+
|
|
25
|
+
<RootIntDir Condition="'$(RootIntDir)' == ''">$(ReactNativeWindowsDir)build</RootIntDir>
|
|
26
|
+
<RootOutDir Condition="'$(RootOutDir)' == ''">$(ReactNativeWindowsDir)target</RootOutDir>
|
|
27
|
+
<!-- Visual Studio forces using 'Win32' for the 'x86' platform. -->
|
|
28
|
+
<BaseIntDir Condition="'$(BaseIntDir)' == '' AND '$(Platform)' == 'Win32'">$(RootIntDir)\x86\$(Configuration)</BaseIntDir>
|
|
29
|
+
<BaseIntDir Condition="'$(BaseIntDir)' == '' AND '$(Platform)' != 'Win32'">$(RootIntDir)\$(Platform)\$(Configuration)</BaseIntDir>
|
|
30
|
+
<BaseOutDir Condition="'$(BaseOutDir)' == '' AND '$(Platform)' == 'Win32'">$(RootOutDir)\x86\$(Configuration)</BaseOutDir>
|
|
31
|
+
<BaseOutDir Condition="'$(BaseOutDir)' == '' AND '$(Platform)' != 'Win32'">$(RootOutDir)\$(Platform)\$(Configuration)</BaseOutDir>
|
|
32
|
+
|
|
33
|
+
<IntDir Condition="'$(ProjectName)' != ''">$(BaseIntDir)\$(ProjectName)\</IntDir>
|
|
34
|
+
<IntDir Condition="'$(ProjectName)' == ''">$(BaseIntDir)\$(MSBuildProjectName)\</IntDir>
|
|
35
|
+
<OutDir Condition="'$(ProjectName)' != ''">$(BaseOutDir)\$(ProjectName)\</OutDir>
|
|
36
|
+
<OutDir Condition="'$(ProjectName)' == ''">$(BaseOutDir)\$(MSBuildProjectName)\</OutDir>
|
|
37
|
+
|
|
38
|
+
<PublishDir>$(OutDir)\Publish\</PublishDir>
|
|
39
|
+
<GeneratedFilesDir>$(IntDir)Generated Files\</GeneratedFilesDir>
|
|
27
40
|
</PropertyGroup>
|
|
28
41
|
|
|
29
42
|
<!--
|
|
@@ -45,14 +58,4 @@
|
|
|
45
58
|
<FmtDir>$([MSBuild]::NormalizeDirectory($(FmtDir)))</FmtDir>
|
|
46
59
|
</PropertyGroup>
|
|
47
60
|
|
|
48
|
-
<PropertyGroup>
|
|
49
|
-
<ReactNativeWindowsPlatform Condition="'$(Platform)' == 'Win32'">x86</ReactNativeWindowsPlatform>
|
|
50
|
-
<ReactNativeWindowsPlatform Condition="'$(Platform)' != 'Win32'">$(Platform)</ReactNativeWindowsPlatform>
|
|
51
|
-
|
|
52
|
-
<IntDir>$(ReactNativeWindowsDir)build\$(ReactNativeWindowsPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
|
|
53
|
-
<OutDir>$(ReactNativeWindowsDir)target\$(ReactNativeWindowsPlatform)\$(Configuration)\$(ProjectName)\</OutDir>
|
|
54
|
-
<PublishDir>$(OutDir)\Publish\</PublishDir>
|
|
55
|
-
<GeneratedFilesDir>$(IntDir)Generated Files\</GeneratedFilesDir>
|
|
56
|
-
</PropertyGroup>
|
|
57
|
-
|
|
58
61
|
</Project>
|
package/Directory.Build.targets
CHANGED
|
@@ -4,61 +4,4 @@
|
|
|
4
4
|
<!-- This import will noop when customer code is built. This import is here to help building the bits in the react-native-windows repository. -->
|
|
5
5
|
<Import Condition="Exists($([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../')))" Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
<Target Name="Vars">
|
|
9
|
-
<Message Text="General" />
|
|
10
|
-
<Message Text="=> ApplicationType [$(ApplicationType)]" />
|
|
11
|
-
<Message Text="=> Configuration [$(Configuration)]" />
|
|
12
|
-
<Message Text="=> Platform [$(Platform)]" />
|
|
13
|
-
<Message Text="=> PlatformTarget [$(PlatformTarget)]" />
|
|
14
|
-
<Message Text="=> PlatformName [$(PlatformName)]" />
|
|
15
|
-
<Message Text="=> DefaultPlatformToolset [$(DefaultPlatformToolset)]" />
|
|
16
|
-
<Message Text="=> PlatformToolset [$(PlatformToolset)]" />
|
|
17
|
-
<Message Text="=> SolutionDir [$(SolutionDir)]" />
|
|
18
|
-
<Message Text="=> IntDir [$(IntDir)]" />
|
|
19
|
-
<Message Text="=> OutDir [$(OutDir)]" />
|
|
20
|
-
<Message Text="=> TargetDir [$(TargetDir)]" />
|
|
21
|
-
<Message Text="=> TargetPath [$(TargetPath)]" />
|
|
22
|
-
<Message Text="=> TLogLocation [$(TLogLocation)]" />
|
|
23
|
-
<Message Text="=> LastBuildUnsuccessful [$(LastBuildUnsuccessful)]" />
|
|
24
|
-
<Message Text="=> LastBuildState [$(LastBuildState)]" />
|
|
25
|
-
<Message Text="=> GeneratedFilesDir [$(GeneratedFilesDir)]" />
|
|
26
|
-
<Message Text="=> WinVer [$(WinVer)]" />
|
|
27
|
-
|
|
28
|
-
<Message Text="%0A" />
|
|
29
|
-
<Message Text="MSBuild" />
|
|
30
|
-
<Message Text="=> MSBuildToolsVersion [$(MSBuildToolsVersion)]" />
|
|
31
|
-
<Message Text="=> MSBuildToolsPath [$(MSBuildToolsPath)]" />
|
|
32
|
-
|
|
33
|
-
<Message Text="%0A" />
|
|
34
|
-
<Message Text="Microsoft.CppBuild.targets/MakeDirsForCl" />
|
|
35
|
-
<Message Text="=> PrecompiledHeaderOutputFile [@(CLCompile->Metadata('PrecompiledHeaderOutputFile')->DirectoryName()->Distinct())]" />
|
|
36
|
-
<Message Text="=> AssemblerListingLocation [@(CLCompile->Metadata('AssemblerListingLocation')->DirectoryName()->Distinct())]" />
|
|
37
|
-
<Message Text="=> ObjectFileName [@(CLCompile->Metadata('ObjectFileName')->DirectoryName()->Distinct())]" />
|
|
38
|
-
<Message Text="=> ProgramDataBaseFileName [@(CLCompile->Metadata('ProgramDataBaseFileName')->DirectoryName()->Distinct())]" />
|
|
39
|
-
<Message Text="=> XMLDocumentationFileName [@(CLCompile->Metadata('XMLDocumentationFileName')->DirectoryName()->Distinct())]" />
|
|
40
|
-
<Message Text="=> BrowseInformationFile [@(CLCompile->Metadata('BrowseInformationFile')->DirectoryName()->Distinct())]" />
|
|
41
|
-
<Message Text="=> PreprocessOutputPath [@(CLCompile->Metadata('PreprocessOutputPath')->DirectoryName()->Distinct())]" />
|
|
42
|
-
<Message Text="=> PreprocessorDefinitions [@(CLCompile->Metadata('PreprocessorDefinitions')->Distinct())]" />
|
|
43
|
-
<Message Text="=> ClDirsToMake [@(ClDirsToMake)]" />
|
|
44
|
-
|
|
45
|
-
<Message Text="%0A" />
|
|
46
|
-
<Message Text="=> UnmergedWinmdDirectory [$(UnmergedWinmdDirectory)]" />
|
|
47
|
-
<Message Text="=> MergedWinmdDirectory [$(MergedWinmdDirectory)]" />
|
|
48
|
-
<Message Text="=> FollyDir [$(FollyDir)]" />
|
|
49
|
-
<Message Text="=> ReactNativeWindowsDir [$(ReactNativeWindowsDir)]" />
|
|
50
|
-
<Message Text="=> ReactNativeDir [$(ReactNativeDir)]" />
|
|
51
|
-
<Message Text="=> YogaDir [$(YogaDir)]" />
|
|
52
|
-
<Message Text="=> ProjectHome [$(ProjectHome)]" />
|
|
53
|
-
<Message Text="=> UserRootDir [$(UserRootDir)]" />
|
|
54
|
-
<Message Text="=> MSBuildExtensionsPath [$(MSBuildExtensionsPath)]" />
|
|
55
|
-
<Message Text="=> MSBuildExtensionsPath32 [$(MSBuildExtensionsPath32)]" />
|
|
56
|
-
<Message Text="=> MSBuildExtensionsPath64 [$(MSBuildExtensionsPath64)]" />
|
|
57
|
-
<Message Text="=> VCTargetsPath [$(VCTargetsPath)]" />
|
|
58
|
-
|
|
59
|
-
<Message Text="%0A" />
|
|
60
|
-
<Message Text="JS Engine" />
|
|
61
|
-
<Message Text="=> V8AppPlatform [$(V8AppPlatform)]" />
|
|
62
|
-
<Message Text="=> V8Package [$(V8Package)]" />
|
|
63
|
-
</Target>
|
|
64
|
-
</Project>
|
|
7
|
+
</Project>
|
package/Folly/Folly.vcxproj
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<ProjectName>Folly</ProjectName>
|
|
7
7
|
<RootNamespace>Folly</RootNamespace>
|
|
8
8
|
<DefaultLanguage>en-US</DefaultLanguage>
|
|
9
|
-
<AppContainerApplication>true</AppContainerApplication>
|
|
10
9
|
<ApplicationType>Windows Store</ApplicationType>
|
|
11
10
|
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
|
11
|
+
<AppContainerApplication>true</AppContainerApplication>
|
|
12
12
|
</PropertyGroup>
|
|
13
13
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
14
14
|
<Import Project="$(ReactNativeWindowsDir)PropertySheets\React.Cpp.props" />
|
|
@@ -232,9 +232,6 @@
|
|
|
232
232
|
<SubType>Designer</SubType>
|
|
233
233
|
</Natvis>
|
|
234
234
|
</ItemGroup>
|
|
235
|
-
<ItemGroup>
|
|
236
|
-
<None Include="packages.config" />
|
|
237
|
-
</ItemGroup>
|
|
238
235
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
239
236
|
<!-- Include Warnings.props after Microsoft.Cpp.props to change default WarningLevel -->
|
|
240
237
|
<Import Project="$(ReactNativeWindowsDir)PropertySheets\Warnings.props" />
|
|
@@ -269,14 +266,7 @@
|
|
|
269
266
|
</ItemDefinitionGroup>
|
|
270
267
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
271
268
|
<ImportGroup Label="ExtensionTargets">
|
|
272
|
-
<Import Project="$(SolutionDir)packages\boost.1.76.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.76.0.0\build\boost.targets')" />
|
|
273
269
|
</ImportGroup>
|
|
274
|
-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
275
|
-
<PropertyGroup>
|
|
276
|
-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
|
277
|
-
</PropertyGroup>
|
|
278
|
-
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.76.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.76.0.0\build\boost.targets'))" />
|
|
279
|
-
</Target>
|
|
280
270
|
<Target Name="DownloadFolly" BeforeTargets="PrepareForBuild">
|
|
281
271
|
<PropertyGroup>
|
|
282
272
|
<FollyZipDir>$(IntDir)\.follyzip</FollyZipDir>
|
|
@@ -319,6 +309,9 @@
|
|
|
319
309
|
<ItemGroup>
|
|
320
310
|
<TemporaryFollyPatchFiles Include="$(MSBuildThisFileDirectory)\TEMP_UntilFollyUpdate\**\*.*" />
|
|
321
311
|
</ItemGroup>
|
|
312
|
+
<ItemGroup>
|
|
313
|
+
<PackageReference Include="boost" Version="1.76.0.0" />
|
|
314
|
+
</ItemGroup>
|
|
322
315
|
<Target Name="Deploy" />
|
|
323
316
|
<!-- Reenable this task if we need to temporarily replace any folly files for fixes, while we wait for PRs to land in folly -->
|
|
324
317
|
<Target Name="ApplyFollyTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFolly">
|
package/Libraries/Alert/Alert.js
CHANGED
|
@@ -46,8 +46,8 @@ class Alert {
|
|
|
46
46
|
if (Platform.OS === 'ios') {
|
|
47
47
|
Alert.prompt(title, message, buttons, 'default');
|
|
48
48
|
} else if (Platform.OS === 'android') {
|
|
49
|
-
const NativeDialogManagerAndroid =
|
|
50
|
-
.default;
|
|
49
|
+
const NativeDialogManagerAndroid =
|
|
50
|
+
require('../NativeModules/specs/NativeDialogManagerAndroid').default;
|
|
51
51
|
if (!NativeDialogManagerAndroid) {
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type {DialogOptions} from './NativeDialogManagerWindows';
|
|
9
|
-
const NativeDialogManagerWindows =
|
|
10
|
-
.default;
|
|
9
|
+
const NativeDialogManagerWindows =
|
|
10
|
+
require('./NativeDialogManagerWindows').default;
|
|
11
11
|
|
|
12
12
|
export type AlertType =
|
|
13
13
|
| 'default'
|
|
@@ -70,7 +70,7 @@ class Alert {
|
|
|
70
70
|
buttonNeutral,
|
|
71
71
|
buttonNegative,
|
|
72
72
|
buttonPositive,
|
|
73
|
-
].findIndex(b => b != null && b.style === 'default');
|
|
73
|
+
].findIndex((b) => b != null && b.style === 'default');
|
|
74
74
|
|
|
75
75
|
// XAML has an enum to specify the default button, which is:
|
|
76
76
|
// None = 0, Primary = 1, Secondary = 2, Close = 3
|
|
@@ -101,7 +101,7 @@ class Alert {
|
|
|
101
101
|
options && options.onDismiss && options.onDismiss();
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
const onError = errorMessage => console.warn(errorMessage);
|
|
104
|
+
const onError = (errorMessage) => console.warn(errorMessage);
|
|
105
105
|
NativeDialogManagerWindows.showAlert(config, onError, onAction);
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -12,7 +12,7 @@ import NativeDialogManagerAndroid from '../NativeModules/specs/NativeDialogManag
|
|
|
12
12
|
function emptyCallback() {}
|
|
13
13
|
|
|
14
14
|
module.exports = {
|
|
15
|
-
alertWithArgs: function(args, callback) {
|
|
15
|
+
alertWithArgs: function (args, callback) {
|
|
16
16
|
// TODO(5998984): Polyfill it correctly with DialogManagerAndroid
|
|
17
17
|
if (!NativeDialogManagerAndroid) {
|
|
18
18
|
return;
|
|
@@ -18,7 +18,6 @@ const AnimatedInterpolation = require('./nodes/AnimatedInterpolation');
|
|
|
18
18
|
const AnimatedModulo = require('./nodes/AnimatedModulo');
|
|
19
19
|
const AnimatedMultiplication = require('./nodes/AnimatedMultiplication');
|
|
20
20
|
const AnimatedNode = require('./nodes/AnimatedNode');
|
|
21
|
-
const AnimatedProps = require('./nodes/AnimatedProps');
|
|
22
21
|
const AnimatedSubtraction = require('./nodes/AnimatedSubtraction');
|
|
23
22
|
const AnimatedTracking = require('./nodes/AnimatedTracking');
|
|
24
23
|
const AnimatedValue = require('./nodes/AnimatedValue');
|
|
@@ -48,39 +47,39 @@ export type CompositeAnimation = {
|
|
|
48
47
|
...
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
const add = function(
|
|
50
|
+
const add = function (
|
|
52
51
|
a: AnimatedNode | number,
|
|
53
52
|
b: AnimatedNode | number,
|
|
54
53
|
): AnimatedAddition {
|
|
55
54
|
return new AnimatedAddition(a, b);
|
|
56
55
|
};
|
|
57
56
|
|
|
58
|
-
const subtract = function(
|
|
57
|
+
const subtract = function (
|
|
59
58
|
a: AnimatedNode | number,
|
|
60
59
|
b: AnimatedNode | number,
|
|
61
60
|
): AnimatedSubtraction {
|
|
62
61
|
return new AnimatedSubtraction(a, b);
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
const divide = function(
|
|
64
|
+
const divide = function (
|
|
66
65
|
a: AnimatedNode | number,
|
|
67
66
|
b: AnimatedNode | number,
|
|
68
67
|
): AnimatedDivision {
|
|
69
68
|
return new AnimatedDivision(a, b);
|
|
70
69
|
};
|
|
71
70
|
|
|
72
|
-
const multiply = function(
|
|
71
|
+
const multiply = function (
|
|
73
72
|
a: AnimatedNode | number,
|
|
74
73
|
b: AnimatedNode | number,
|
|
75
74
|
): AnimatedMultiplication {
|
|
76
75
|
return new AnimatedMultiplication(a, b);
|
|
77
76
|
};
|
|
78
77
|
|
|
79
|
-
const modulo = function(a: AnimatedNode, modulus: number): AnimatedModulo {
|
|
78
|
+
const modulo = function (a: AnimatedNode, modulus: number): AnimatedModulo {
|
|
80
79
|
return new AnimatedModulo(a, modulus);
|
|
81
80
|
};
|
|
82
81
|
|
|
83
|
-
const diffClamp = function(
|
|
82
|
+
const diffClamp = function (
|
|
84
83
|
a: AnimatedNode,
|
|
85
84
|
min: number,
|
|
86
85
|
max: number,
|
|
@@ -88,7 +87,7 @@ const diffClamp = function(
|
|
|
88
87
|
return new AnimatedDiffClamp(a, min, max);
|
|
89
88
|
};
|
|
90
89
|
|
|
91
|
-
const _combineCallbacks = function(
|
|
90
|
+
const _combineCallbacks = function (
|
|
92
91
|
callback: ?EndCallback,
|
|
93
92
|
config: {...AnimationConfig, ...},
|
|
94
93
|
) {
|
|
@@ -102,7 +101,7 @@ const _combineCallbacks = function(
|
|
|
102
101
|
}
|
|
103
102
|
};
|
|
104
103
|
|
|
105
|
-
const maybeVectorAnim = function(
|
|
104
|
+
const maybeVectorAnim = function (
|
|
106
105
|
value: AnimatedValue | AnimatedValueXY,
|
|
107
106
|
config: Object,
|
|
108
107
|
anim: (value: AnimatedValue, config: Object) => CompositeAnimation,
|
|
@@ -126,11 +125,11 @@ const maybeVectorAnim = function(
|
|
|
126
125
|
return null;
|
|
127
126
|
};
|
|
128
127
|
|
|
129
|
-
const spring = function(
|
|
128
|
+
const spring = function (
|
|
130
129
|
value: AnimatedValue | AnimatedValueXY,
|
|
131
130
|
config: SpringAnimationConfig,
|
|
132
131
|
): CompositeAnimation {
|
|
133
|
-
const start = function(
|
|
132
|
+
const start = function (
|
|
134
133
|
animatedValue: AnimatedValue | AnimatedValueXY,
|
|
135
134
|
configuration: SpringAnimationConfig,
|
|
136
135
|
callback?: ?EndCallback,
|
|
@@ -155,35 +154,35 @@ const spring = function(
|
|
|
155
154
|
};
|
|
156
155
|
return (
|
|
157
156
|
maybeVectorAnim(value, config, spring) || {
|
|
158
|
-
start: function(callback?: ?EndCallback): void {
|
|
157
|
+
start: function (callback?: ?EndCallback): void {
|
|
159
158
|
start(value, config, callback);
|
|
160
159
|
},
|
|
161
160
|
|
|
162
|
-
stop: function(): void {
|
|
161
|
+
stop: function (): void {
|
|
163
162
|
value.stopAnimation();
|
|
164
163
|
},
|
|
165
164
|
|
|
166
|
-
reset: function(): void {
|
|
165
|
+
reset: function (): void {
|
|
167
166
|
value.resetAnimation();
|
|
168
167
|
},
|
|
169
168
|
|
|
170
|
-
_startNativeLoop: function(iterations?: number): void {
|
|
169
|
+
_startNativeLoop: function (iterations?: number): void {
|
|
171
170
|
const singleConfig = {...config, iterations};
|
|
172
171
|
start(value, singleConfig);
|
|
173
172
|
},
|
|
174
173
|
|
|
175
|
-
_isUsingNativeDriver: function(): boolean {
|
|
174
|
+
_isUsingNativeDriver: function (): boolean {
|
|
176
175
|
return config.useNativeDriver || false;
|
|
177
176
|
},
|
|
178
177
|
}
|
|
179
178
|
);
|
|
180
179
|
};
|
|
181
180
|
|
|
182
|
-
const timing = function(
|
|
181
|
+
const timing = function (
|
|
183
182
|
value: AnimatedValue | AnimatedValueXY,
|
|
184
183
|
config: TimingAnimationConfig,
|
|
185
184
|
): CompositeAnimation {
|
|
186
|
-
const start = function(
|
|
185
|
+
const start = function (
|
|
187
186
|
animatedValue: AnimatedValue | AnimatedValueXY,
|
|
188
187
|
configuration: TimingAnimationConfig,
|
|
189
188
|
callback?: ?EndCallback,
|
|
@@ -209,35 +208,35 @@ const timing = function(
|
|
|
209
208
|
|
|
210
209
|
return (
|
|
211
210
|
maybeVectorAnim(value, config, timing) || {
|
|
212
|
-
start: function(callback?: ?EndCallback): void {
|
|
211
|
+
start: function (callback?: ?EndCallback): void {
|
|
213
212
|
start(value, config, callback);
|
|
214
213
|
},
|
|
215
214
|
|
|
216
|
-
stop: function(): void {
|
|
215
|
+
stop: function (): void {
|
|
217
216
|
value.stopAnimation();
|
|
218
217
|
},
|
|
219
218
|
|
|
220
|
-
reset: function(): void {
|
|
219
|
+
reset: function (): void {
|
|
221
220
|
value.resetAnimation();
|
|
222
221
|
},
|
|
223
222
|
|
|
224
|
-
_startNativeLoop: function(iterations?: number): void {
|
|
223
|
+
_startNativeLoop: function (iterations?: number): void {
|
|
225
224
|
const singleConfig = {...config, iterations};
|
|
226
225
|
start(value, singleConfig);
|
|
227
226
|
},
|
|
228
227
|
|
|
229
|
-
_isUsingNativeDriver: function(): boolean {
|
|
228
|
+
_isUsingNativeDriver: function (): boolean {
|
|
230
229
|
return config.useNativeDriver || false;
|
|
231
230
|
},
|
|
232
231
|
}
|
|
233
232
|
);
|
|
234
233
|
};
|
|
235
234
|
|
|
236
|
-
const decay = function(
|
|
235
|
+
const decay = function (
|
|
237
236
|
value: AnimatedValue | AnimatedValueXY,
|
|
238
237
|
config: DecayAnimationConfig,
|
|
239
238
|
): CompositeAnimation {
|
|
240
|
-
const start = function(
|
|
239
|
+
const start = function (
|
|
241
240
|
animatedValue: AnimatedValue | AnimatedValueXY,
|
|
242
241
|
configuration: DecayAnimationConfig,
|
|
243
242
|
callback?: ?EndCallback,
|
|
@@ -251,37 +250,37 @@ const decay = function(
|
|
|
251
250
|
|
|
252
251
|
return (
|
|
253
252
|
maybeVectorAnim(value, config, decay) || {
|
|
254
|
-
start: function(callback?: ?EndCallback): void {
|
|
253
|
+
start: function (callback?: ?EndCallback): void {
|
|
255
254
|
start(value, config, callback);
|
|
256
255
|
},
|
|
257
256
|
|
|
258
|
-
stop: function(): void {
|
|
257
|
+
stop: function (): void {
|
|
259
258
|
value.stopAnimation();
|
|
260
259
|
},
|
|
261
260
|
|
|
262
|
-
reset: function(): void {
|
|
261
|
+
reset: function (): void {
|
|
263
262
|
value.resetAnimation();
|
|
264
263
|
},
|
|
265
264
|
|
|
266
|
-
_startNativeLoop: function(iterations?: number): void {
|
|
265
|
+
_startNativeLoop: function (iterations?: number): void {
|
|
267
266
|
const singleConfig = {...config, iterations};
|
|
268
267
|
start(value, singleConfig);
|
|
269
268
|
},
|
|
270
269
|
|
|
271
|
-
_isUsingNativeDriver: function(): boolean {
|
|
270
|
+
_isUsingNativeDriver: function (): boolean {
|
|
272
271
|
return config.useNativeDriver || false;
|
|
273
272
|
},
|
|
274
273
|
}
|
|
275
274
|
);
|
|
276
275
|
};
|
|
277
276
|
|
|
278
|
-
const sequence = function(
|
|
277
|
+
const sequence = function (
|
|
279
278
|
animations: Array<CompositeAnimation>,
|
|
280
279
|
): CompositeAnimation {
|
|
281
280
|
let current = 0;
|
|
282
281
|
return {
|
|
283
|
-
start: function(callback?: ?EndCallback) {
|
|
284
|
-
const onComplete = function(result) {
|
|
282
|
+
start: function (callback?: ?EndCallback) {
|
|
283
|
+
const onComplete = function (result) {
|
|
285
284
|
if (!result.finished) {
|
|
286
285
|
callback && callback(result);
|
|
287
286
|
return;
|
|
@@ -304,13 +303,13 @@ const sequence = function(
|
|
|
304
303
|
}
|
|
305
304
|
},
|
|
306
305
|
|
|
307
|
-
stop: function() {
|
|
306
|
+
stop: function () {
|
|
308
307
|
if (current < animations.length) {
|
|
309
308
|
animations[current].stop();
|
|
310
309
|
}
|
|
311
310
|
},
|
|
312
311
|
|
|
313
|
-
reset: function() {
|
|
312
|
+
reset: function () {
|
|
314
313
|
animations.forEach((animation, idx) => {
|
|
315
314
|
if (idx <= current) {
|
|
316
315
|
animation.reset();
|
|
@@ -319,13 +318,13 @@ const sequence = function(
|
|
|
319
318
|
current = 0;
|
|
320
319
|
},
|
|
321
320
|
|
|
322
|
-
_startNativeLoop: function() {
|
|
321
|
+
_startNativeLoop: function () {
|
|
323
322
|
throw new Error(
|
|
324
323
|
'Loops run using the native driver cannot contain Animated.sequence animations',
|
|
325
324
|
);
|
|
326
325
|
},
|
|
327
326
|
|
|
328
|
-
_isUsingNativeDriver: function(): boolean {
|
|
327
|
+
_isUsingNativeDriver: function (): boolean {
|
|
329
328
|
return false;
|
|
330
329
|
},
|
|
331
330
|
};
|
|
@@ -336,7 +335,7 @@ type ParallelConfig = {
|
|
|
336
335
|
stopTogether?: boolean,
|
|
337
336
|
...
|
|
338
337
|
};
|
|
339
|
-
const parallel = function(
|
|
338
|
+
const parallel = function (
|
|
340
339
|
animations: Array<CompositeAnimation>,
|
|
341
340
|
config?: ?ParallelConfig,
|
|
342
341
|
): CompositeAnimation {
|
|
@@ -346,14 +345,14 @@ const parallel = function(
|
|
|
346
345
|
const stopTogether = !(config && config.stopTogether === false);
|
|
347
346
|
|
|
348
347
|
const result = {
|
|
349
|
-
start: function(callback?: ?EndCallback) {
|
|
348
|
+
start: function (callback?: ?EndCallback) {
|
|
350
349
|
if (doneCount === animations.length) {
|
|
351
350
|
callback && callback({finished: true});
|
|
352
351
|
return;
|
|
353
352
|
}
|
|
354
353
|
|
|
355
354
|
animations.forEach((animation, idx) => {
|
|
356
|
-
const cb = function(endResult) {
|
|
355
|
+
const cb = function (endResult) {
|
|
357
356
|
hasEnded[idx] = true;
|
|
358
357
|
doneCount++;
|
|
359
358
|
if (doneCount === animations.length) {
|
|
@@ -375,14 +374,14 @@ const parallel = function(
|
|
|
375
374
|
});
|
|
376
375
|
},
|
|
377
376
|
|
|
378
|
-
stop: function(): void {
|
|
377
|
+
stop: function (): void {
|
|
379
378
|
animations.forEach((animation, idx) => {
|
|
380
379
|
!hasEnded[idx] && animation.stop();
|
|
381
380
|
hasEnded[idx] = true;
|
|
382
381
|
});
|
|
383
382
|
},
|
|
384
383
|
|
|
385
|
-
reset: function(): void {
|
|
384
|
+
reset: function (): void {
|
|
386
385
|
animations.forEach((animation, idx) => {
|
|
387
386
|
animation.reset();
|
|
388
387
|
hasEnded[idx] = false;
|
|
@@ -390,13 +389,13 @@ const parallel = function(
|
|
|
390
389
|
});
|
|
391
390
|
},
|
|
392
391
|
|
|
393
|
-
_startNativeLoop: function() {
|
|
392
|
+
_startNativeLoop: function () {
|
|
394
393
|
throw new Error(
|
|
395
394
|
'Loops run using the native driver cannot contain Animated.parallel animations',
|
|
396
395
|
);
|
|
397
396
|
},
|
|
398
397
|
|
|
399
|
-
_isUsingNativeDriver: function(): boolean {
|
|
398
|
+
_isUsingNativeDriver: function (): boolean {
|
|
400
399
|
return false;
|
|
401
400
|
},
|
|
402
401
|
};
|
|
@@ -404,7 +403,7 @@ const parallel = function(
|
|
|
404
403
|
return result;
|
|
405
404
|
};
|
|
406
405
|
|
|
407
|
-
const delay = function(time: number): CompositeAnimation {
|
|
406
|
+
const delay = function (time: number): CompositeAnimation {
|
|
408
407
|
// Would be nice to make a specialized implementation
|
|
409
408
|
return timing(new AnimatedValue(0), {
|
|
410
409
|
toValue: 0,
|
|
@@ -414,7 +413,7 @@ const delay = function(time: number): CompositeAnimation {
|
|
|
414
413
|
});
|
|
415
414
|
};
|
|
416
415
|
|
|
417
|
-
const stagger = function(
|
|
416
|
+
const stagger = function (
|
|
418
417
|
time: number,
|
|
419
418
|
animations: Array<CompositeAnimation>,
|
|
420
419
|
): CompositeAnimation {
|
|
@@ -431,15 +430,15 @@ type LoopAnimationConfig = {
|
|
|
431
430
|
...
|
|
432
431
|
};
|
|
433
432
|
|
|
434
|
-
const loop = function(
|
|
433
|
+
const loop = function (
|
|
435
434
|
animation: CompositeAnimation,
|
|
436
435
|
{iterations = -1, resetBeforeIteration = true}: LoopAnimationConfig = {},
|
|
437
436
|
): CompositeAnimation {
|
|
438
437
|
let isFinished = false;
|
|
439
438
|
let iterationsSoFar = 0;
|
|
440
439
|
return {
|
|
441
|
-
start: function(callback?: ?EndCallback) {
|
|
442
|
-
const restart = function(result: EndResult = {finished: true}): void {
|
|
440
|
+
start: function (callback?: ?EndCallback) {
|
|
441
|
+
const restart = function (result: EndResult = {finished: true}): void {
|
|
443
442
|
if (
|
|
444
443
|
isFinished ||
|
|
445
444
|
iterationsSoFar === iterations ||
|
|
@@ -463,24 +462,24 @@ const loop = function(
|
|
|
463
462
|
}
|
|
464
463
|
},
|
|
465
464
|
|
|
466
|
-
stop: function(): void {
|
|
465
|
+
stop: function (): void {
|
|
467
466
|
isFinished = true;
|
|
468
467
|
animation.stop();
|
|
469
468
|
},
|
|
470
469
|
|
|
471
|
-
reset: function(): void {
|
|
470
|
+
reset: function (): void {
|
|
472
471
|
iterationsSoFar = 0;
|
|
473
472
|
isFinished = false;
|
|
474
473
|
animation.reset();
|
|
475
474
|
},
|
|
476
475
|
|
|
477
|
-
_startNativeLoop: function() {
|
|
476
|
+
_startNativeLoop: function () {
|
|
478
477
|
throw new Error(
|
|
479
478
|
'Loops run using the native driver cannot contain Animated.loop animations',
|
|
480
479
|
);
|
|
481
480
|
},
|
|
482
481
|
|
|
483
|
-
_isUsingNativeDriver: function(): boolean {
|
|
482
|
+
_isUsingNativeDriver: function (): boolean {
|
|
484
483
|
return animation._isUsingNativeDriver();
|
|
485
484
|
},
|
|
486
485
|
};
|
|
@@ -512,7 +511,7 @@ function unforkEvent(
|
|
|
512
511
|
}
|
|
513
512
|
}
|
|
514
513
|
|
|
515
|
-
const event = function(
|
|
514
|
+
const event = function (
|
|
516
515
|
argMapping: $ReadOnlyArray<?Mapping>,
|
|
517
516
|
config: EventConfig,
|
|
518
517
|
): any {
|