react-native-windows 0.81.3 → 0.81.5
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +45 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
- package/Libraries/Renderer/shims/ReactNativeTypes.js +23 -11
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +23 -12
- package/Microsoft.ReactNative/ABIViewManager.cpp +12 -1
- package/Microsoft.ReactNative/ComponentView.idl +2 -0
- package/Microsoft.ReactNative/Composition.Input.idl +7 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +5 -0
- package/Microsoft.ReactNative/CompositionHwndHost.idl +1 -0
- package/Microsoft.ReactNative/CompositionSwitcher.idl +16 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +19 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.h +10 -1
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +15 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +15 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +75 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +10 -45
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +86 -19
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +95 -22
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +15 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +61 -74
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +71 -12
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +11 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +4 -3
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.cpp +245 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.h +80 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +33 -1
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +17 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +47 -23
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +3 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +3 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +8 -4
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +41 -15
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +20 -95
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +0 -41
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +0 -11
- package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -3
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +31 -101
- package/Microsoft.ReactNative/ReactNativeWin32App.h +2 -13
- package/Microsoft.ReactNative/ReactNativeWindow.idl +44 -0
- package/Mso/src/dispatchQueue/queueService.cpp +3 -1
- package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +2 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +2 -1
- package/Shared/Shared.vcxitems +7 -0
- package/Shared/Shared.vcxitems.filters +6 -0
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +2 -1
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +42 -25
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +2 -1
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +2 -1
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +11 -6
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +11 -6
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +1 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +2 -1
- package/codegen/react/components/rnwcore/ModalHostView.g.h +40 -23
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +11 -6
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +1 -0
- package/codegen/react/components/rnwcore/Switch.g.h +11 -6
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +2 -1
- package/codegen/react/components/rnwcore/VirtualView.g.h +41 -8
- package/package.json +21 -21
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.81.
|
|
13
|
+
<ReactNativeWindowsVersion>0.81.5</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>81</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>5</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>ff246e07a1fca3e9925f60981d8a9b9d75ceb87d</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -758,7 +758,8 @@ ResponseOperation OriginPolicyHttpFilter::SendRequestAsync(HttpRequestMessage co
|
|
|
758
758
|
if (originPolicy == OriginPolicy::CrossOriginResourceSharing) {
|
|
759
759
|
// If inner filter can AllowRedirect, disable for preflight.
|
|
760
760
|
winrt::impl::com_ref<IHttpBaseProtocolFilter> baseFilter;
|
|
761
|
-
|
|
761
|
+
baseFilter = m_innerFilter.try_as<IHttpBaseProtocolFilter>();
|
|
762
|
+
if (baseFilter) {
|
|
762
763
|
baseFilter.AllowAutoRedirect(false);
|
|
763
764
|
}
|
|
764
765
|
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -85,6 +85,11 @@
|
|
|
85
85
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeIsland.idl</DependentUpon>
|
|
86
86
|
<SubType>Code</SubType>
|
|
87
87
|
</ClCompile>
|
|
88
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeWindow.cpp">
|
|
89
|
+
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
90
|
+
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeWindow.idl</DependentUpon>
|
|
91
|
+
<SubType>Code</SubType>
|
|
92
|
+
</ClCompile>
|
|
88
93
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionUIService.cpp">
|
|
89
94
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
90
95
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionUIService.idl</DependentUpon>
|
|
@@ -315,6 +320,7 @@
|
|
|
315
320
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionRootAutomationProvider.h" />
|
|
316
321
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionDynamicAutomationProvider.h" />
|
|
317
322
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeIsland.h" />
|
|
323
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeWindow.h" />
|
|
318
324
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionUIService.h" />
|
|
319
325
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionViewComponentView.h" />
|
|
320
326
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ImageComponentView.h" />
|
|
@@ -710,6 +716,7 @@
|
|
|
710
716
|
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionContext.idl" />
|
|
711
717
|
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionHwndHost.idl" />
|
|
712
718
|
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeIsland.idl" />
|
|
719
|
+
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeWindow.idl" />
|
|
713
720
|
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionSwitcher.idl" />
|
|
714
721
|
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionUIService.idl" />
|
|
715
722
|
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactCompositionViewComponentBuilder.idl" />
|
|
@@ -204,6 +204,9 @@
|
|
|
204
204
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeIsland.cpp">
|
|
205
205
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
206
206
|
</ClCompile>
|
|
207
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeWindow.cpp">
|
|
208
|
+
<Filter>Source Files\Fabric\Composition</Filter>
|
|
209
|
+
</ClCompile>
|
|
207
210
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionUIService.cpp">
|
|
208
211
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
209
212
|
</ClCompile>
|
|
@@ -754,6 +757,9 @@
|
|
|
754
757
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeIsland.h">
|
|
755
758
|
<Filter>Header Files\Fabric\Composition</Filter>
|
|
756
759
|
</ClInclude>
|
|
760
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeWindow.h">
|
|
761
|
+
<Filter>Header Files\Fabric\Composition</Filter>
|
|
762
|
+
</ClInclude>
|
|
757
763
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionUIService.h">
|
|
758
764
|
<Filter>Header Files\Fabric\Composition</Filter>
|
|
759
765
|
</ClInclude>
|
|
@@ -28,7 +28,8 @@ struct ActivityIndicatorViewProps : winrt::implements<ActivityIndicatorViewProps
|
|
|
28
28
|
hidesWhenStopped = cloneFromProps->hidesWhenStopped;
|
|
29
29
|
animating = cloneFromProps->animating;
|
|
30
30
|
color = cloneFromProps->color;
|
|
31
|
-
size = cloneFromProps->size;
|
|
31
|
+
size = cloneFromProps->size;
|
|
32
|
+
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -30,7 +30,11 @@ struct AndroidDrawerLayoutProps : winrt::implements<AndroidDrawerLayoutProps, wi
|
|
|
30
30
|
drawerPosition = cloneFromProps->drawerPosition;
|
|
31
31
|
drawerWidth = cloneFromProps->drawerWidth;
|
|
32
32
|
drawerLockMode = cloneFromProps->drawerLockMode;
|
|
33
|
-
statusBarBackgroundColor = cloneFromProps->statusBarBackgroundColor;
|
|
33
|
+
statusBarBackgroundColor = cloneFromProps->statusBarBackgroundColor;
|
|
34
|
+
onDrawerSlide = cloneFromProps->onDrawerSlide;
|
|
35
|
+
onDrawerStateChanged = cloneFromProps->onDrawerStateChanged;
|
|
36
|
+
onDrawerOpen = cloneFromProps->onDrawerOpen;
|
|
37
|
+
onDrawerClose = cloneFromProps->onDrawerClose;
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
|
|
@@ -56,58 +60,71 @@ struct AndroidDrawerLayoutProps : winrt::implements<AndroidDrawerLayoutProps, wi
|
|
|
56
60
|
REACT_FIELD(statusBarBackgroundColor)
|
|
57
61
|
winrt::Microsoft::ReactNative::Color statusBarBackgroundColor{nullptr};
|
|
58
62
|
|
|
63
|
+
// These fields can be used to determine if JS has registered for this event
|
|
64
|
+
REACT_FIELD(onDrawerSlide)
|
|
65
|
+
bool onDrawerSlide{false};
|
|
66
|
+
|
|
67
|
+
REACT_FIELD(onDrawerStateChanged)
|
|
68
|
+
bool onDrawerStateChanged{false};
|
|
69
|
+
|
|
70
|
+
REACT_FIELD(onDrawerOpen)
|
|
71
|
+
bool onDrawerOpen{false};
|
|
72
|
+
|
|
73
|
+
REACT_FIELD(onDrawerClose)
|
|
74
|
+
bool onDrawerClose{false};
|
|
75
|
+
|
|
59
76
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
60
77
|
};
|
|
61
78
|
|
|
62
|
-
REACT_STRUCT(
|
|
63
|
-
struct
|
|
64
|
-
REACT_FIELD(offset)
|
|
65
|
-
float offset{};
|
|
79
|
+
REACT_STRUCT(AndroidDrawerLayoutSpec_onDrawerClose)
|
|
80
|
+
struct AndroidDrawerLayoutSpec_onDrawerClose {
|
|
66
81
|
};
|
|
67
82
|
|
|
68
|
-
REACT_STRUCT(
|
|
69
|
-
struct
|
|
70
|
-
REACT_FIELD(drawerState)
|
|
71
|
-
int32_t drawerState{};
|
|
83
|
+
REACT_STRUCT(AndroidDrawerLayoutSpec_onDrawerOpen)
|
|
84
|
+
struct AndroidDrawerLayoutSpec_onDrawerOpen {
|
|
72
85
|
};
|
|
73
86
|
|
|
74
|
-
REACT_STRUCT(
|
|
75
|
-
struct
|
|
87
|
+
REACT_STRUCT(AndroidDrawerLayoutSpec_onDrawerStateChanged)
|
|
88
|
+
struct AndroidDrawerLayoutSpec_onDrawerStateChanged {
|
|
89
|
+
REACT_FIELD(drawerState)
|
|
90
|
+
int32_t drawerState{};
|
|
76
91
|
};
|
|
77
92
|
|
|
78
|
-
REACT_STRUCT(
|
|
79
|
-
struct
|
|
93
|
+
REACT_STRUCT(AndroidDrawerLayoutSpec_onDrawerSlide)
|
|
94
|
+
struct AndroidDrawerLayoutSpec_onDrawerSlide {
|
|
95
|
+
REACT_FIELD(offset)
|
|
96
|
+
float offset{};
|
|
80
97
|
};
|
|
81
98
|
|
|
82
99
|
struct AndroidDrawerLayoutEventEmitter {
|
|
83
100
|
AndroidDrawerLayoutEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
84
101
|
: m_eventEmitter(eventEmitter) {}
|
|
85
102
|
|
|
86
|
-
using OnDrawerSlide =
|
|
87
|
-
using OnDrawerStateChanged =
|
|
88
|
-
using OnDrawerOpen =
|
|
89
|
-
using OnDrawerClose =
|
|
103
|
+
using OnDrawerSlide = AndroidDrawerLayoutSpec_onDrawerSlide;
|
|
104
|
+
using OnDrawerStateChanged = AndroidDrawerLayoutSpec_onDrawerStateChanged;
|
|
105
|
+
using OnDrawerOpen = AndroidDrawerLayoutSpec_onDrawerOpen;
|
|
106
|
+
using OnDrawerClose = AndroidDrawerLayoutSpec_onDrawerClose;
|
|
90
107
|
|
|
91
|
-
void onDrawerSlide(OnDrawerSlide
|
|
92
|
-
m_eventEmitter.DispatchEvent(L"drawerSlide", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
108
|
+
void onDrawerSlide(OnDrawerSlide &&value) const {
|
|
109
|
+
m_eventEmitter.DispatchEvent(L"drawerSlide", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
93
110
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
94
111
|
});
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
void onDrawerStateChanged(OnDrawerStateChanged
|
|
98
|
-
m_eventEmitter.DispatchEvent(L"drawerStateChanged", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
114
|
+
void onDrawerStateChanged(OnDrawerStateChanged &&value) const {
|
|
115
|
+
m_eventEmitter.DispatchEvent(L"drawerStateChanged", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
99
116
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
100
117
|
});
|
|
101
118
|
}
|
|
102
119
|
|
|
103
|
-
void onDrawerOpen(OnDrawerOpen
|
|
104
|
-
m_eventEmitter.DispatchEvent(L"drawerOpen", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
120
|
+
void onDrawerOpen(OnDrawerOpen &&value) const {
|
|
121
|
+
m_eventEmitter.DispatchEvent(L"drawerOpen", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
105
122
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
106
123
|
});
|
|
107
124
|
}
|
|
108
125
|
|
|
109
|
-
void onDrawerClose(OnDrawerClose
|
|
110
|
-
m_eventEmitter.DispatchEvent(L"drawerClose", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
126
|
+
void onDrawerClose(OnDrawerClose &&value) const {
|
|
127
|
+
m_eventEmitter.DispatchEvent(L"drawerClose", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
111
128
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
112
129
|
});
|
|
113
130
|
}
|
|
@@ -25,7 +25,8 @@ struct AndroidHorizontalScrollContentViewProps : winrt::implements<AndroidHorizo
|
|
|
25
25
|
{
|
|
26
26
|
if (cloneFrom) {
|
|
27
27
|
auto cloneFromProps = cloneFrom.as<AndroidHorizontalScrollContentViewProps>();
|
|
28
|
-
removeClippedSubviews = cloneFromProps->removeClippedSubviews;
|
|
28
|
+
removeClippedSubviews = cloneFromProps->removeClippedSubviews;
|
|
29
|
+
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -31,7 +31,8 @@ struct AndroidProgressBarProps : winrt::implements<AndroidProgressBarProps, winr
|
|
|
31
31
|
progress = cloneFromProps->progress;
|
|
32
32
|
animating = cloneFromProps->animating;
|
|
33
33
|
color = cloneFromProps->color;
|
|
34
|
-
testID = cloneFromProps->testID;
|
|
34
|
+
testID = cloneFromProps->testID;
|
|
35
|
+
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -30,7 +30,8 @@ struct AndroidSwipeRefreshLayoutProps : winrt::implements<AndroidSwipeRefreshLay
|
|
|
30
30
|
progressBackgroundColor = cloneFromProps->progressBackgroundColor;
|
|
31
31
|
size = cloneFromProps->size;
|
|
32
32
|
progressViewOffset = cloneFromProps->progressViewOffset;
|
|
33
|
-
refreshing = cloneFromProps->refreshing;
|
|
33
|
+
refreshing = cloneFromProps->refreshing;
|
|
34
|
+
onRefresh = cloneFromProps->onRefresh;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -56,21 +57,25 @@ struct AndroidSwipeRefreshLayoutProps : winrt::implements<AndroidSwipeRefreshLay
|
|
|
56
57
|
REACT_FIELD(refreshing)
|
|
57
58
|
bool refreshing{};
|
|
58
59
|
|
|
60
|
+
// These fields can be used to determine if JS has registered for this event
|
|
61
|
+
REACT_FIELD(onRefresh)
|
|
62
|
+
bool onRefresh{false};
|
|
63
|
+
|
|
59
64
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
60
65
|
};
|
|
61
66
|
|
|
62
|
-
REACT_STRUCT(
|
|
63
|
-
struct
|
|
67
|
+
REACT_STRUCT(AndroidSwipeRefreshLayoutSpec_onRefresh)
|
|
68
|
+
struct AndroidSwipeRefreshLayoutSpec_onRefresh {
|
|
64
69
|
};
|
|
65
70
|
|
|
66
71
|
struct AndroidSwipeRefreshLayoutEventEmitter {
|
|
67
72
|
AndroidSwipeRefreshLayoutEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
68
73
|
: m_eventEmitter(eventEmitter) {}
|
|
69
74
|
|
|
70
|
-
using OnRefresh =
|
|
75
|
+
using OnRefresh = AndroidSwipeRefreshLayoutSpec_onRefresh;
|
|
71
76
|
|
|
72
|
-
void onRefresh(OnRefresh
|
|
73
|
-
m_eventEmitter.DispatchEvent(L"refresh", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
77
|
+
void onRefresh(OnRefresh &&value) const {
|
|
78
|
+
m_eventEmitter.DispatchEvent(L"refresh", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
74
79
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
75
80
|
});
|
|
76
81
|
}
|
|
@@ -33,7 +33,8 @@ struct AndroidSwitchProps : winrt::implements<AndroidSwitchProps, winrt::Microso
|
|
|
33
33
|
value = cloneFromProps->value;
|
|
34
34
|
on = cloneFromProps->on;
|
|
35
35
|
thumbTintColor = cloneFromProps->thumbTintColor;
|
|
36
|
-
trackTintColor = cloneFromProps->trackTintColor;
|
|
36
|
+
trackTintColor = cloneFromProps->trackTintColor;
|
|
37
|
+
onChange = cloneFromProps->onChange;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -68,11 +69,15 @@ struct AndroidSwitchProps : winrt::implements<AndroidSwitchProps, winrt::Microso
|
|
|
68
69
|
REACT_FIELD(trackTintColor)
|
|
69
70
|
winrt::Microsoft::ReactNative::Color trackTintColor{nullptr};
|
|
70
71
|
|
|
72
|
+
// These fields can be used to determine if JS has registered for this event
|
|
73
|
+
REACT_FIELD(onChange)
|
|
74
|
+
bool onChange{false};
|
|
75
|
+
|
|
71
76
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
72
77
|
};
|
|
73
78
|
|
|
74
|
-
REACT_STRUCT(
|
|
75
|
-
struct
|
|
79
|
+
REACT_STRUCT(AndroidSwitchSpec_onChange)
|
|
80
|
+
struct AndroidSwitchSpec_onChange {
|
|
76
81
|
REACT_FIELD(value)
|
|
77
82
|
bool value{};
|
|
78
83
|
|
|
@@ -84,10 +89,10 @@ struct AndroidSwitchEventEmitter {
|
|
|
84
89
|
AndroidSwitchEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
85
90
|
: m_eventEmitter(eventEmitter) {}
|
|
86
91
|
|
|
87
|
-
using OnChange =
|
|
92
|
+
using OnChange = AndroidSwitchSpec_onChange;
|
|
88
93
|
|
|
89
|
-
void onChange(OnChange
|
|
90
|
-
m_eventEmitter.DispatchEvent(L"change", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
94
|
+
void onChange(OnChange &&value) const {
|
|
95
|
+
m_eventEmitter.DispatchEvent(L"change", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
91
96
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
92
97
|
});
|
|
93
98
|
}
|
|
@@ -25,7 +25,8 @@ struct InputAccessoryProps : winrt::implements<InputAccessoryProps, winrt::Micro
|
|
|
25
25
|
{
|
|
26
26
|
if (cloneFrom) {
|
|
27
27
|
auto cloneFromProps = cloneFrom.as<InputAccessoryProps>();
|
|
28
|
-
backgroundColor = cloneFromProps->backgroundColor;
|
|
28
|
+
backgroundColor = cloneFromProps->backgroundColor;
|
|
29
|
+
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -36,7 +36,11 @@ struct ModalHostViewProps : winrt::implements<ModalHostViewProps, winrt::Microso
|
|
|
36
36
|
allowSwipeDismissal = cloneFromProps->allowSwipeDismissal;
|
|
37
37
|
supportedOrientations = cloneFromProps->supportedOrientations;
|
|
38
38
|
identifier = cloneFromProps->identifier;
|
|
39
|
-
title = cloneFromProps->title;
|
|
39
|
+
title = cloneFromProps->title;
|
|
40
|
+
onRequestClose = cloneFromProps->onRequestClose;
|
|
41
|
+
onShow = cloneFromProps->onShow;
|
|
42
|
+
onDismiss = cloneFromProps->onDismiss;
|
|
43
|
+
onOrientationChange = cloneFromProps->onOrientationChange;
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -80,56 +84,69 @@ struct ModalHostViewProps : winrt::implements<ModalHostViewProps, winrt::Microso
|
|
|
80
84
|
REACT_FIELD(title)
|
|
81
85
|
std::optional<std::string> title;
|
|
82
86
|
|
|
87
|
+
// These fields can be used to determine if JS has registered for this event
|
|
88
|
+
REACT_FIELD(onRequestClose)
|
|
89
|
+
bool onRequestClose{false};
|
|
90
|
+
|
|
91
|
+
REACT_FIELD(onShow)
|
|
92
|
+
bool onShow{false};
|
|
93
|
+
|
|
94
|
+
REACT_FIELD(onDismiss)
|
|
95
|
+
bool onDismiss{false};
|
|
96
|
+
|
|
97
|
+
REACT_FIELD(onOrientationChange)
|
|
98
|
+
bool onOrientationChange{false};
|
|
99
|
+
|
|
83
100
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
84
101
|
};
|
|
85
102
|
|
|
86
|
-
REACT_STRUCT(
|
|
87
|
-
struct
|
|
103
|
+
REACT_STRUCT(ModalHostViewSpec_onOrientationChange)
|
|
104
|
+
struct ModalHostViewSpec_onOrientationChange {
|
|
105
|
+
REACT_FIELD(orientation)
|
|
106
|
+
std::string orientation;
|
|
88
107
|
};
|
|
89
108
|
|
|
90
|
-
REACT_STRUCT(
|
|
91
|
-
struct
|
|
109
|
+
REACT_STRUCT(ModalHostViewSpec_onDismiss)
|
|
110
|
+
struct ModalHostViewSpec_onDismiss {
|
|
92
111
|
};
|
|
93
112
|
|
|
94
|
-
REACT_STRUCT(
|
|
95
|
-
struct
|
|
113
|
+
REACT_STRUCT(ModalHostViewSpec_onShow)
|
|
114
|
+
struct ModalHostViewSpec_onShow {
|
|
96
115
|
};
|
|
97
116
|
|
|
98
|
-
REACT_STRUCT(
|
|
99
|
-
struct
|
|
100
|
-
REACT_FIELD(orientation)
|
|
101
|
-
std::string orientation;
|
|
117
|
+
REACT_STRUCT(ModalHostViewSpec_onRequestClose)
|
|
118
|
+
struct ModalHostViewSpec_onRequestClose {
|
|
102
119
|
};
|
|
103
120
|
|
|
104
121
|
struct ModalHostViewEventEmitter {
|
|
105
122
|
ModalHostViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
106
123
|
: m_eventEmitter(eventEmitter) {}
|
|
107
124
|
|
|
108
|
-
using OnRequestClose =
|
|
109
|
-
using OnShow =
|
|
110
|
-
using OnDismiss =
|
|
111
|
-
using OnOrientationChange =
|
|
125
|
+
using OnRequestClose = ModalHostViewSpec_onRequestClose;
|
|
126
|
+
using OnShow = ModalHostViewSpec_onShow;
|
|
127
|
+
using OnDismiss = ModalHostViewSpec_onDismiss;
|
|
128
|
+
using OnOrientationChange = ModalHostViewSpec_onOrientationChange;
|
|
112
129
|
|
|
113
|
-
void onRequestClose(OnRequestClose
|
|
114
|
-
m_eventEmitter.DispatchEvent(L"requestClose", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
130
|
+
void onRequestClose(OnRequestClose &&value) const {
|
|
131
|
+
m_eventEmitter.DispatchEvent(L"requestClose", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
115
132
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
116
133
|
});
|
|
117
134
|
}
|
|
118
135
|
|
|
119
|
-
void onShow(OnShow
|
|
120
|
-
m_eventEmitter.DispatchEvent(L"show", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
136
|
+
void onShow(OnShow &&value) const {
|
|
137
|
+
m_eventEmitter.DispatchEvent(L"show", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
121
138
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
122
139
|
});
|
|
123
140
|
}
|
|
124
141
|
|
|
125
|
-
void onDismiss(OnDismiss
|
|
126
|
-
m_eventEmitter.DispatchEvent(L"dismiss", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
142
|
+
void onDismiss(OnDismiss &&value) const {
|
|
143
|
+
m_eventEmitter.DispatchEvent(L"dismiss", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
127
144
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
128
145
|
});
|
|
129
146
|
}
|
|
130
147
|
|
|
131
|
-
void onOrientationChange(OnOrientationChange
|
|
132
|
-
m_eventEmitter.DispatchEvent(L"orientationChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
148
|
+
void onOrientationChange(OnOrientationChange &&value) const {
|
|
149
|
+
m_eventEmitter.DispatchEvent(L"orientationChange", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
133
150
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
134
151
|
});
|
|
135
152
|
}
|
|
@@ -29,7 +29,8 @@ struct PullToRefreshViewProps : winrt::implements<PullToRefreshViewProps, winrt:
|
|
|
29
29
|
titleColor = cloneFromProps->titleColor;
|
|
30
30
|
title = cloneFromProps->title;
|
|
31
31
|
progressViewOffset = cloneFromProps->progressViewOffset;
|
|
32
|
-
refreshing = cloneFromProps->refreshing;
|
|
32
|
+
refreshing = cloneFromProps->refreshing;
|
|
33
|
+
onRefresh = cloneFromProps->onRefresh;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -52,21 +53,25 @@ struct PullToRefreshViewProps : winrt::implements<PullToRefreshViewProps, winrt:
|
|
|
52
53
|
REACT_FIELD(refreshing)
|
|
53
54
|
bool refreshing{};
|
|
54
55
|
|
|
56
|
+
// These fields can be used to determine if JS has registered for this event
|
|
57
|
+
REACT_FIELD(onRefresh)
|
|
58
|
+
bool onRefresh{false};
|
|
59
|
+
|
|
55
60
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
56
61
|
};
|
|
57
62
|
|
|
58
|
-
REACT_STRUCT(
|
|
59
|
-
struct
|
|
63
|
+
REACT_STRUCT(PullToRefreshViewSpec_onRefresh)
|
|
64
|
+
struct PullToRefreshViewSpec_onRefresh {
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
struct PullToRefreshViewEventEmitter {
|
|
63
68
|
PullToRefreshViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
64
69
|
: m_eventEmitter(eventEmitter) {}
|
|
65
70
|
|
|
66
|
-
using OnRefresh =
|
|
71
|
+
using OnRefresh = PullToRefreshViewSpec_onRefresh;
|
|
67
72
|
|
|
68
|
-
void onRefresh(OnRefresh
|
|
69
|
-
m_eventEmitter.DispatchEvent(L"refresh", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
73
|
+
void onRefresh(OnRefresh &&value) const {
|
|
74
|
+
m_eventEmitter.DispatchEvent(L"refresh", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
70
75
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
71
76
|
});
|
|
72
77
|
}
|
|
@@ -32,7 +32,8 @@ struct SwitchProps : winrt::implements<SwitchProps, winrt::Microsoft::ReactNativ
|
|
|
32
32
|
thumbTintColor = cloneFromProps->thumbTintColor;
|
|
33
33
|
thumbColor = cloneFromProps->thumbColor;
|
|
34
34
|
trackColorForFalse = cloneFromProps->trackColorForFalse;
|
|
35
|
-
trackColorForTrue = cloneFromProps->trackColorForTrue;
|
|
35
|
+
trackColorForTrue = cloneFromProps->trackColorForTrue;
|
|
36
|
+
onChange = cloneFromProps->onChange;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -64,11 +65,15 @@ struct SwitchProps : winrt::implements<SwitchProps, winrt::Microsoft::ReactNativ
|
|
|
64
65
|
REACT_FIELD(trackColorForTrue)
|
|
65
66
|
winrt::Microsoft::ReactNative::Color trackColorForTrue{nullptr};
|
|
66
67
|
|
|
68
|
+
// These fields can be used to determine if JS has registered for this event
|
|
69
|
+
REACT_FIELD(onChange)
|
|
70
|
+
bool onChange{false};
|
|
71
|
+
|
|
67
72
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
68
73
|
};
|
|
69
74
|
|
|
70
|
-
REACT_STRUCT(
|
|
71
|
-
struct
|
|
75
|
+
REACT_STRUCT(SwitchSpec_onChange)
|
|
76
|
+
struct SwitchSpec_onChange {
|
|
72
77
|
REACT_FIELD(value)
|
|
73
78
|
bool value{};
|
|
74
79
|
|
|
@@ -80,10 +85,10 @@ struct SwitchEventEmitter {
|
|
|
80
85
|
SwitchEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
81
86
|
: m_eventEmitter(eventEmitter) {}
|
|
82
87
|
|
|
83
|
-
using OnChange =
|
|
88
|
+
using OnChange = SwitchSpec_onChange;
|
|
84
89
|
|
|
85
|
-
void onChange(OnChange
|
|
86
|
-
m_eventEmitter.DispatchEvent(L"change", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
90
|
+
void onChange(OnChange &&value) const {
|
|
91
|
+
m_eventEmitter.DispatchEvent(L"change", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
87
92
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
88
93
|
});
|
|
89
94
|
}
|
|
@@ -26,7 +26,8 @@ struct VirtualViewProps : winrt::implements<VirtualViewProps, winrt::Microsoft::
|
|
|
26
26
|
if (cloneFrom) {
|
|
27
27
|
auto cloneFromProps = cloneFrom.as<VirtualViewProps>();
|
|
28
28
|
initialHidden = cloneFromProps->initialHidden;
|
|
29
|
-
renderState = cloneFromProps->renderState;
|
|
29
|
+
renderState = cloneFromProps->renderState;
|
|
30
|
+
onModeChange = cloneFromProps->onModeChange;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -40,11 +41,45 @@ struct VirtualViewProps : winrt::implements<VirtualViewProps, winrt::Microsoft::
|
|
|
40
41
|
REACT_FIELD(renderState)
|
|
41
42
|
int32_t renderState{};
|
|
42
43
|
|
|
44
|
+
// These fields can be used to determine if JS has registered for this event
|
|
45
|
+
REACT_FIELD(onModeChange)
|
|
46
|
+
bool onModeChange{false};
|
|
47
|
+
|
|
43
48
|
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
44
49
|
};
|
|
45
50
|
|
|
46
|
-
REACT_STRUCT(
|
|
47
|
-
struct
|
|
51
|
+
REACT_STRUCT(VirtualViewSpec_onModeChange3)
|
|
52
|
+
struct VirtualViewSpec_onModeChange3 {
|
|
53
|
+
REACT_FIELD(x)
|
|
54
|
+
double x{};
|
|
55
|
+
|
|
56
|
+
REACT_FIELD(y)
|
|
57
|
+
double y{};
|
|
58
|
+
|
|
59
|
+
REACT_FIELD(width)
|
|
60
|
+
double width{};
|
|
61
|
+
|
|
62
|
+
REACT_FIELD(height)
|
|
63
|
+
double height{};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
REACT_STRUCT(VirtualViewSpec_onModeChange2)
|
|
67
|
+
struct VirtualViewSpec_onModeChange2 {
|
|
68
|
+
REACT_FIELD(x)
|
|
69
|
+
double x{};
|
|
70
|
+
|
|
71
|
+
REACT_FIELD(y)
|
|
72
|
+
double y{};
|
|
73
|
+
|
|
74
|
+
REACT_FIELD(width)
|
|
75
|
+
double width{};
|
|
76
|
+
|
|
77
|
+
REACT_FIELD(height)
|
|
78
|
+
double height{};
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
REACT_STRUCT(VirtualViewSpec_onModeChange)
|
|
82
|
+
struct VirtualViewSpec_onModeChange {
|
|
48
83
|
REACT_FIELD(mode)
|
|
49
84
|
int32_t mode{};
|
|
50
85
|
|
|
@@ -59,12 +94,10 @@ struct VirtualViewEventEmitter {
|
|
|
59
94
|
VirtualViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
60
95
|
: m_eventEmitter(eventEmitter) {}
|
|
61
96
|
|
|
62
|
-
using OnModeChange =
|
|
63
|
-
using OnModeChange2 = VirtualView_OnModeChange2;
|
|
64
|
-
using OnModeChange3 = VirtualView_OnModeChange3;
|
|
97
|
+
using OnModeChange = VirtualViewSpec_onModeChange;
|
|
65
98
|
|
|
66
|
-
void onModeChange(OnModeChange
|
|
67
|
-
m_eventEmitter.DispatchEvent(L"modeChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
99
|
+
void onModeChange(OnModeChange &&value) const {
|
|
100
|
+
m_eventEmitter.DispatchEvent(L"modeChange", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
68
101
|
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
69
102
|
});
|
|
70
103
|
}
|