react-native-windows 0.75.4 → 0.75.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/Microsoft.ReactNative/ComponentView.idl +11 -0
- package/Microsoft.ReactNative/Composition.Input.idl +1 -0
- package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +6 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +11 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +14 -11
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +9 -2
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +104 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +78 -0
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +17 -1
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
- package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
- package/Microsoft.ReactNative/packages.lock.json +67 -40
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/Shared/Shared.vcxitems +33 -0
- package/Shared/Shared.vcxitems.filters +1 -0
- package/Shared/TurboModuleManager.cpp +0 -3
- package/package.json +3 -3
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +1 -0
package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp
CHANGED
|
@@ -176,9 +176,8 @@ struct CompTextHost : public winrt::implements<CompTextHost, ITextHost> {
|
|
|
176
176
|
return false;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
m_outer->
|
|
180
|
-
|
|
181
|
-
y - (m_outer->m_layoutMetrics.frame.origin.y * m_outer->m_layoutMetrics.pointScaleFactor)});
|
|
179
|
+
auto pt = m_outer->getClientOffset();
|
|
180
|
+
m_outer->m_caretVisual.Position({x - pt.x, y - pt.y});
|
|
182
181
|
return true;
|
|
183
182
|
}
|
|
184
183
|
|
|
@@ -225,7 +224,8 @@ struct CompTextHost : public winrt::implements<CompTextHost, ITextHost> {
|
|
|
225
224
|
winrt::Microsoft::ReactNative::ComponentView view{nullptr};
|
|
226
225
|
winrt::check_hresult(
|
|
227
226
|
m_outer->QueryInterface(winrt::guid_of<winrt::Microsoft::ReactNative::ComponentView>(), winrt::put_abi(view)));
|
|
228
|
-
m_outer->rootComponentView()->TrySetFocusedComponent(
|
|
227
|
+
m_outer->rootComponentView()->TrySetFocusedComponent(
|
|
228
|
+
view, winrt::Microsoft::ReactNative::FocusNavigationDirection::None);
|
|
229
229
|
// assert(false);
|
|
230
230
|
// TODO focus
|
|
231
231
|
}
|
|
@@ -261,7 +261,7 @@ struct CompTextHost : public winrt::implements<CompTextHost, ITextHost> {
|
|
|
261
261
|
|
|
262
262
|
//@cmember Retrieves the coordinates of a window's client area
|
|
263
263
|
HRESULT TxGetClientRect(LPRECT prc) override {
|
|
264
|
-
*prc = m_outer->
|
|
264
|
+
*prc = m_outer->getClientRect();
|
|
265
265
|
return S_OK;
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -454,6 +454,7 @@ facebook::react::AttributedString WindowsTextInputComponentView::getAttributedSt
|
|
|
454
454
|
// Use BaseTextShadowNode to get attributed string from children
|
|
455
455
|
|
|
456
456
|
auto childTextAttributes = facebook::react::TextAttributes::defaultTextAttributes();
|
|
457
|
+
childTextAttributes.fontSizeMultiplier = m_fontSizeMultiplier;
|
|
457
458
|
|
|
458
459
|
childTextAttributes.apply(windowsTextInputProps().textAttributes);
|
|
459
460
|
|
|
@@ -463,9 +464,9 @@ facebook::react::AttributedString WindowsTextInputComponentView::getAttributedSt
|
|
|
463
464
|
// BaseTextShadowNode only gets children. We must detect and prepend text
|
|
464
465
|
// value attributes manually.
|
|
465
466
|
auto text = GetTextFromRichEdit();
|
|
466
|
-
// if (!m_props->text.empty()) {
|
|
467
467
|
if (!text.empty()) {
|
|
468
468
|
auto textAttributes = facebook::react::TextAttributes::defaultTextAttributes();
|
|
469
|
+
textAttributes.fontSizeMultiplier = m_fontSizeMultiplier;
|
|
469
470
|
textAttributes.apply(windowsTextInputProps().textAttributes);
|
|
470
471
|
auto fragment = facebook::react::AttributedString::Fragment{};
|
|
471
472
|
fragment.string = text;
|
|
@@ -491,66 +492,41 @@ WindowsTextInputComponentView::WindowsTextInputComponentView(
|
|
|
491
492
|
compContext,
|
|
492
493
|
tag,
|
|
493
494
|
reactContext,
|
|
494
|
-
ComponentViewFeatures::Default & ~ComponentViewFeatures::Background) {
|
|
495
|
-
/*
|
|
496
|
-
m_textChangedRevoker =
|
|
497
|
-
m_element.TextChanged(winrt::auto_revoke, [this](auto sender, xaml::Controls::TextChangedEventArgs args) {
|
|
498
|
-
auto data = m_state->getData();
|
|
499
|
-
data.attributedString = getAttributedString();
|
|
500
|
-
data.mostRecentEventCount = m_nativeEventCount;
|
|
501
|
-
m_state->updateState(std::move(data));
|
|
502
|
-
|
|
503
|
-
if (m_eventEmitter && !m_comingFromJS) {
|
|
504
|
-
auto emitter = std::static_pointer_cast<const facebook::react::WindowsTextInputEventEmitter>(m_eventEmitter);
|
|
505
|
-
facebook::react::WindowsTextInputEventEmitter::OnChange onChangeArgs;
|
|
506
|
-
onChangeArgs.text = winrt::to_string(m_element.Text());
|
|
507
|
-
onChangeArgs.eventCount = ++m_nativeEventCount;
|
|
508
|
-
emitter->onChange(onChangeArgs);
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
m_SelectionChangedRevoker = m_element.SelectionChanged(winrt::auto_revoke, [this](auto sender, auto args) {
|
|
513
|
-
if (m_eventEmitter) {
|
|
514
|
-
auto emitter = std::static_pointer_cast<const facebook::react::WindowsTextInputEventEmitter>(m_eventEmitter);
|
|
515
|
-
facebook::react::WindowsTextInputEventEmitter::OnSelectionChange onSelectionChangeArgs;
|
|
516
|
-
onSelectionChangeArgs.selection.start = m_element.SelectionStart();
|
|
517
|
-
onSelectionChangeArgs.selection.end = m_element.SelectionStart() + m_element.SelectionLength();
|
|
518
|
-
emitter->onSelectionChange(onSelectionChangeArgs);
|
|
519
|
-
}
|
|
520
|
-
});
|
|
521
|
-
*/
|
|
522
|
-
}
|
|
495
|
+
ComponentViewFeatures::Default & ~ComponentViewFeatures::Background) {}
|
|
523
496
|
|
|
524
497
|
void WindowsTextInputComponentView::HandleCommand(
|
|
525
|
-
winrt::
|
|
526
|
-
|
|
498
|
+
const winrt::Microsoft::ReactNative::HandleCommandArgs &args) noexcept {
|
|
499
|
+
Super::HandleCommand(args);
|
|
500
|
+
if (args.Handled())
|
|
501
|
+
return;
|
|
502
|
+
|
|
503
|
+
auto commandName = args.CommandName();
|
|
527
504
|
if (commandName == L"setTextAndSelection") {
|
|
528
505
|
int eventCount, begin, end;
|
|
529
|
-
winrt::hstring text;
|
|
506
|
+
std::optional<winrt::hstring> text;
|
|
530
507
|
|
|
531
|
-
winrt::Microsoft::ReactNative::ReadArgs(args, eventCount, text, begin, end);
|
|
508
|
+
winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), eventCount, text, begin, end);
|
|
532
509
|
if (eventCount >= m_nativeEventCount) {
|
|
533
510
|
m_comingFromJS = true;
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
511
|
+
{
|
|
512
|
+
if (text.has_value()) {
|
|
513
|
+
DrawBlock db(*this);
|
|
514
|
+
UpdateText(winrt::to_string(text.value()));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
SELCHANGE sc;
|
|
518
|
+
memset(&sc, 0, sizeof(sc));
|
|
519
|
+
sc.chrg.cpMin = static_cast<LONG>(begin);
|
|
520
|
+
sc.chrg.cpMax = static_cast<LONG>(end);
|
|
521
|
+
sc.seltyp = (begin == end) ? SEL_EMPTY : SEL_TEXT;
|
|
522
|
+
|
|
523
|
+
LRESULT res;
|
|
524
|
+
winrt::check_hresult(
|
|
525
|
+
m_textServices->TxSendMessage(EM_SETSEL, static_cast<WPARAM>(begin), static_cast<LPARAM>(end), &res));
|
|
526
|
+
}
|
|
549
527
|
|
|
550
528
|
m_comingFromJS = false;
|
|
551
529
|
}
|
|
552
|
-
} else {
|
|
553
|
-
Super::HandleCommand(commandName, args);
|
|
554
530
|
}
|
|
555
531
|
}
|
|
556
532
|
|
|
@@ -986,37 +962,35 @@ void WindowsTextInputComponentView::updateProps(
|
|
|
986
962
|
*std::static_pointer_cast<const facebook::react::WindowsTextInputProps>(oldProps ? oldProps : viewProps());
|
|
987
963
|
const auto &newTextInputProps = *std::static_pointer_cast<const facebook::react::WindowsTextInputProps>(props);
|
|
988
964
|
|
|
989
|
-
DWORD propBitsMask = 0;
|
|
990
|
-
DWORD propBits = 0;
|
|
991
|
-
|
|
992
965
|
Super::updateProps(props, oldProps);
|
|
993
966
|
|
|
994
967
|
if (!facebook::react::floatEquality(
|
|
995
968
|
oldTextInputProps.textAttributes.fontSize, newTextInputProps.textAttributes.fontSize) ||
|
|
969
|
+
(oldTextInputProps.textAttributes.allowFontScaling != newTextInputProps.textAttributes.allowFontScaling) ||
|
|
996
970
|
oldTextInputProps.textAttributes.fontWeight != newTextInputProps.textAttributes.fontWeight) {
|
|
997
|
-
|
|
998
|
-
|
|
971
|
+
m_propBitsMask |= TXTBIT_CHARFORMATCHANGE;
|
|
972
|
+
m_propBits |= TXTBIT_CHARFORMATCHANGE;
|
|
999
973
|
}
|
|
1000
974
|
|
|
1001
975
|
if (oldTextInputProps.secureTextEntry != newTextInputProps.secureTextEntry) {
|
|
1002
|
-
|
|
976
|
+
m_propBitsMask |= TXTBIT_USEPASSWORD;
|
|
1003
977
|
if (newTextInputProps.secureTextEntry) {
|
|
1004
|
-
|
|
978
|
+
m_propBits |= TXTBIT_USEPASSWORD;
|
|
1005
979
|
}
|
|
1006
980
|
}
|
|
1007
981
|
|
|
1008
982
|
if (oldTextInputProps.multiline != newTextInputProps.multiline) {
|
|
1009
983
|
m_multiline = newTextInputProps.multiline;
|
|
1010
|
-
|
|
984
|
+
m_propBitsMask |= TXTBIT_MULTILINE | TXTBIT_WORDWRAP;
|
|
1011
985
|
if (newTextInputProps.multiline) {
|
|
1012
|
-
|
|
986
|
+
m_propBits |= TXTBIT_MULTILINE | TXTBIT_WORDWRAP;
|
|
1013
987
|
}
|
|
1014
988
|
}
|
|
1015
989
|
|
|
1016
990
|
if (oldTextInputProps.editable != newTextInputProps.editable) {
|
|
1017
|
-
|
|
991
|
+
m_propBitsMask |= TXTBIT_READONLY;
|
|
1018
992
|
if (!newTextInputProps.editable) {
|
|
1019
|
-
|
|
993
|
+
m_propBits |= TXTBIT_READONLY;
|
|
1020
994
|
}
|
|
1021
995
|
}
|
|
1022
996
|
|
|
@@ -1048,62 +1022,7 @@ void WindowsTextInputComponentView::updateProps(
|
|
|
1048
1022
|
m_submitKeyEvents.clear();
|
|
1049
1023
|
}
|
|
1050
1024
|
|
|
1051
|
-
|
|
1052
|
-
if (oldTextInputProps.textAttributes.foregroundColor != newTextInputProps.textAttributes.foregroundColor) {
|
|
1053
|
-
if (newTextInputProps.textAttributes.foregroundColor)
|
|
1054
|
-
m_element.Foreground(newTextInputProps.textAttributes.foregroundColor.AsWindowsBrush());
|
|
1055
|
-
else
|
|
1056
|
-
m_element.ClearValue(::xaml::Controls::TextBlock::ForegroundProperty());
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
if (oldTextInputProps.textAttributes.fontStyle != newTextInputProps.textAttributes.fontStyle) {
|
|
1060
|
-
switch (newTextInputProps.textAttributes.fontStyle.value_or(facebook::react::FontStyle::Normal)) {
|
|
1061
|
-
case facebook::react::FontStyle::Italic:
|
|
1062
|
-
m_element.FontStyle(winrt::Windows::UI::Text::FontStyle::Italic);
|
|
1063
|
-
break;
|
|
1064
|
-
case facebook::react::FontStyle::Normal:
|
|
1065
|
-
m_element.FontStyle(winrt::Windows::UI::Text::FontStyle::Normal);
|
|
1066
|
-
break;
|
|
1067
|
-
case facebook::react::FontStyle::Oblique:
|
|
1068
|
-
m_element.FontStyle(winrt::Windows::UI::Text::FontStyle::Oblique);
|
|
1069
|
-
break;
|
|
1070
|
-
default:
|
|
1071
|
-
assert(false);
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
if (oldTextInputProps.textAttributes.fontFamily != newTextInputProps.textAttributes.fontFamily) {
|
|
1076
|
-
if (newTextInputProps.textAttributes.fontFamily.empty())
|
|
1077
|
-
m_element.FontFamily(xaml::Media::FontFamily(L"Segoe UI"));
|
|
1078
|
-
else
|
|
1079
|
-
m_element.FontFamily(xaml::Media::FontFamily(
|
|
1080
|
-
Microsoft::Common::Unicode::Utf8ToUtf16(newTextInputProps.textAttributes.fontFamily)));
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
if (oldTextInputProps.allowFontScaling != newTextInputProps.allowFontScaling) {
|
|
1084
|
-
m_element.IsTextScaleFactorEnabled(newTextInputProps.allowFontScaling);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
if (oldTextInputProps.selection.start != newTextInputProps.selection.start ||
|
|
1088
|
-
oldTextInputProps.selection.end != newTextInputProps.selection.end) {
|
|
1089
|
-
m_element.Select(
|
|
1090
|
-
newTextInputProps.selection.start, newTextInputProps.selection.end - newTextInputProps.selection.start);
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
if (oldTextInputProps.autoCapitalize != newTextInputProps.autoCapitalize) {
|
|
1094
|
-
if (newTextInputProps.autoCapitalize == "characters") {
|
|
1095
|
-
m_element.CharacterCasing(xaml::Controls::CharacterCasing::Upper);
|
|
1096
|
-
} else { // anything else turns off autoCap (should be "None" but
|
|
1097
|
-
// we don't support "words"/"sentences" yet)
|
|
1098
|
-
m_element.CharacterCasing(xaml::Controls::CharacterCasing::Normal);
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
*/
|
|
1102
|
-
|
|
1103
|
-
if (propBitsMask != 0) {
|
|
1104
|
-
DrawBlock db(*this);
|
|
1105
|
-
winrt::check_hresult(m_textServices->OnTxPropertyBitsChange(propBitsMask, propBits));
|
|
1106
|
-
}
|
|
1025
|
+
UpdatePropertyBits();
|
|
1107
1026
|
}
|
|
1108
1027
|
|
|
1109
1028
|
void WindowsTextInputComponentView::updateState(
|
|
@@ -1113,7 +1032,6 @@ void WindowsTextInputComponentView::updateState(
|
|
|
1113
1032
|
|
|
1114
1033
|
if (!m_state) {
|
|
1115
1034
|
assert(false && "State is `null` for <TextInput> component.");
|
|
1116
|
-
// m_element.Text(L"");
|
|
1117
1035
|
return;
|
|
1118
1036
|
}
|
|
1119
1037
|
|
|
@@ -1121,14 +1039,19 @@ void WindowsTextInputComponentView::updateState(
|
|
|
1121
1039
|
m_mostRecentEventCount = m_state->getData().mostRecentEventCount;
|
|
1122
1040
|
}
|
|
1123
1041
|
|
|
1042
|
+
if (auto root = rootComponentView()) {
|
|
1043
|
+
auto fontSizeMultiplier = root->FontSizeMultiplier();
|
|
1044
|
+
if (fontSizeMultiplier != m_fontSizeMultiplier) {
|
|
1045
|
+
fontSizeMultiplier = m_fontSizeMultiplier;
|
|
1046
|
+
m_propBitsMask |= TXTBIT_CHARFORMATCHANGE;
|
|
1047
|
+
m_propBits |= TXTBIT_CHARFORMATCHANGE;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1124
1051
|
if (m_mostRecentEventCount == m_state->getData().mostRecentEventCount) {
|
|
1125
1052
|
m_comingFromState = true;
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
UpdateText(
|
|
1129
|
-
m_state->getData().attributedString.getFragments().size()
|
|
1130
|
-
? m_state->getData().attributedString.getFragments()[0].string
|
|
1131
|
-
: "");
|
|
1053
|
+
auto &fragments = m_state->getData().attributedString.getFragments();
|
|
1054
|
+
UpdateText(fragments.size() ? fragments[0].string : "");
|
|
1132
1055
|
|
|
1133
1056
|
m_comingFromState = false;
|
|
1134
1057
|
}
|
|
@@ -1243,13 +1166,42 @@ std::string WindowsTextInputComponentView::GetTextFromRichEdit() const noexcept
|
|
|
1243
1166
|
void WindowsTextInputComponentView::FinalizeUpdates(
|
|
1244
1167
|
winrt::Microsoft::ReactNative::ComponentViewUpdateMask updateMask) noexcept {
|
|
1245
1168
|
Super::FinalizeUpdates(updateMask);
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1169
|
+
InternalFinalize();
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
void WindowsTextInputComponentView::UpdatePropertyBits() noexcept {
|
|
1173
|
+
if (m_propBitsMask != 0) {
|
|
1174
|
+
DrawBlock db(*this);
|
|
1175
|
+
winrt::check_hresult(m_textServices->OnTxPropertyBitsChange(m_propBitsMask, m_propBits));
|
|
1176
|
+
m_propBitsMask = 0;
|
|
1177
|
+
m_propBits = 0;
|
|
1249
1178
|
}
|
|
1250
1179
|
}
|
|
1251
1180
|
|
|
1252
|
-
|
|
1181
|
+
void WindowsTextInputComponentView::InternalFinalize() noexcept {
|
|
1182
|
+
if (m_mounted) {
|
|
1183
|
+
UpdatePropertyBits();
|
|
1184
|
+
|
|
1185
|
+
ensureDrawingSurface();
|
|
1186
|
+
if (m_needsRedraw) {
|
|
1187
|
+
DrawText();
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
void WindowsTextInputComponentView::onMounted() noexcept {
|
|
1193
|
+
Super::onMounted();
|
|
1194
|
+
|
|
1195
|
+
auto fontSizeMultiplier = rootComponentView()->FontSizeMultiplier();
|
|
1196
|
+
if (m_fontSizeMultiplier != fontSizeMultiplier) {
|
|
1197
|
+
m_fontSizeMultiplier = fontSizeMultiplier;
|
|
1198
|
+
m_propBitsMask |= TXTBIT_CHARFORMATCHANGE;
|
|
1199
|
+
m_propBits |= TXTBIT_CHARFORMATCHANGE;
|
|
1200
|
+
}
|
|
1201
|
+
InternalFinalize();
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
std::optional<std::string> WindowsTextInputComponentView::getAccessiblityValue() noexcept {
|
|
1253
1205
|
return GetTextFromRichEdit();
|
|
1254
1206
|
}
|
|
1255
1207
|
|
|
@@ -1291,9 +1243,9 @@ void WindowsTextInputComponentView::UpdateCharFormat() noexcept {
|
|
|
1291
1243
|
|
|
1292
1244
|
// set font size -- 15 to convert twips to pt
|
|
1293
1245
|
const auto &props = windowsTextInputProps();
|
|
1294
|
-
float fontSize =
|
|
1295
|
-
|
|
1296
|
-
|
|
1246
|
+
float fontSize = m_fontSizeMultiplier *
|
|
1247
|
+
(std::isnan(props.textAttributes.fontSize) ? facebook::react::TextAttributes::defaultTextAttributes().fontSize
|
|
1248
|
+
: props.textAttributes.fontSize);
|
|
1297
1249
|
// TODO get fontSize from props.textAttributes, or defaultTextAttributes, or fragment?
|
|
1298
1250
|
cfNew.dwMask |= CFM_SIZE;
|
|
1299
1251
|
cfNew.yHeight = static_cast<LONG>(fontSize * 15);
|
|
@@ -1360,8 +1312,8 @@ void WindowsTextInputComponentView::ensureDrawingSurface() noexcept {
|
|
|
1360
1312
|
winrt::Windows::Graphics::DirectX::DirectXPixelFormat::B8G8R8A8UIntNormalized,
|
|
1361
1313
|
winrt::Windows::Graphics::DirectX::DirectXAlphaMode::Premultiplied);
|
|
1362
1314
|
|
|
1363
|
-
|
|
1364
|
-
winrt::check_hresult(m_textServices->OnTxInPlaceActivate(&
|
|
1315
|
+
auto rc = getClientRect();
|
|
1316
|
+
winrt::check_hresult(m_textServices->OnTxInPlaceActivate(&rc));
|
|
1365
1317
|
|
|
1366
1318
|
LRESULT lresult;
|
|
1367
1319
|
winrt::check_hresult(
|
|
@@ -1391,6 +1343,7 @@ winrt::com_ptr<::IDWriteTextLayout> WindowsTextInputComponentView::CreatePlaceho
|
|
|
1391
1343
|
if (std::isnan(props.textAttributes.fontSize)) {
|
|
1392
1344
|
textAttributes.fontSize = 12.0f;
|
|
1393
1345
|
}
|
|
1346
|
+
textAttributes.fontSizeMultiplier = m_fontSizeMultiplier;
|
|
1394
1347
|
fragment1.string = props.placeholder;
|
|
1395
1348
|
fragment1.textAttributes = textAttributes;
|
|
1396
1349
|
attributedString.appendFragment(fragment1);
|
|
@@ -1440,7 +1393,11 @@ void WindowsTextInputComponentView::DrawText() noexcept {
|
|
|
1440
1393
|
static_cast<LONG>(offset.x) + static_cast<LONG>(m_imgWidth),
|
|
1441
1394
|
static_cast<LONG>(offset.y) + static_cast<LONG>(m_imgHeight)};
|
|
1442
1395
|
|
|
1443
|
-
|
|
1396
|
+
{
|
|
1397
|
+
m_cDrawBlock++; // Dont use AutoDrawBlock as we are already in draw, and dont need to draw again.
|
|
1398
|
+
winrt::check_hresult(m_textServices->OnTxInPlaceActivate(&rcClient));
|
|
1399
|
+
m_cDrawBlock--;
|
|
1400
|
+
}
|
|
1444
1401
|
|
|
1445
1402
|
const auto &props = windowsTextInputProps();
|
|
1446
1403
|
if (facebook::react::isColorMeaningful(props.backgroundColor)) {
|
|
@@ -46,8 +46,7 @@ struct WindowsTextInputComponentView
|
|
|
46
46
|
void FinalizeUpdates(winrt::Microsoft::ReactNative::ComponentViewUpdateMask updateMask) noexcept override;
|
|
47
47
|
static facebook::react::SharedViewProps defaultProps() noexcept;
|
|
48
48
|
const facebook::react::WindowsTextInputProps &windowsTextInputProps() const noexcept;
|
|
49
|
-
void HandleCommand(
|
|
50
|
-
override;
|
|
49
|
+
void HandleCommand(const winrt::Microsoft::ReactNative::HandleCommandArgs &args) noexcept override;
|
|
51
50
|
void OnRenderingDeviceLost() noexcept override;
|
|
52
51
|
void onLostFocus(const winrt::Microsoft::ReactNative::Composition::Input::RoutedEventArgs &args) noexcept override;
|
|
53
52
|
void onGotFocus(const winrt::Microsoft::ReactNative::Composition::Input::RoutedEventArgs &args) noexcept override;
|
|
@@ -66,8 +65,9 @@ struct WindowsTextInputComponentView
|
|
|
66
65
|
void OnKeyUp(const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept override;
|
|
67
66
|
void OnCharacterReceived(const winrt::Microsoft::ReactNative::Composition::Input::CharacterReceivedRoutedEventArgs
|
|
68
67
|
&args) noexcept override;
|
|
68
|
+
void onMounted() noexcept override;
|
|
69
69
|
|
|
70
|
-
std::optional<std::string>
|
|
70
|
+
std::optional<std::string> getAccessiblityValue() noexcept override;
|
|
71
71
|
void setAcccessiblityValue(std::string &&value) noexcept override;
|
|
72
72
|
bool getAcccessiblityIsReadOnly() noexcept override;
|
|
73
73
|
|
|
@@ -101,6 +101,8 @@ struct WindowsTextInputComponentView
|
|
|
101
101
|
const facebook::react::SharedColor &foregroundColor) noexcept;
|
|
102
102
|
bool ShouldSubmit(
|
|
103
103
|
const winrt::Microsoft::ReactNative::Composition::Input::CharacterReceivedRoutedEventArgs &args) noexcept;
|
|
104
|
+
void InternalFinalize() noexcept;
|
|
105
|
+
void UpdatePropertyBits() noexcept;
|
|
104
106
|
|
|
105
107
|
winrt::Windows::UI::Composition::CompositionSurfaceBrush m_brush{nullptr};
|
|
106
108
|
winrt::Microsoft::ReactNative::Composition::Experimental::ICaretVisual m_caretVisual{nullptr};
|
|
@@ -114,7 +116,7 @@ struct WindowsTextInputComponentView
|
|
|
114
116
|
winrt::com_ptr<ITextServices2> m_textServices;
|
|
115
117
|
unsigned int m_imgWidth{0}, m_imgHeight{0};
|
|
116
118
|
std::shared_ptr<facebook::react::WindowsTextInputShadowNode::ConcreteState const> m_state;
|
|
117
|
-
|
|
119
|
+
float m_fontSizeMultiplier{1.0};
|
|
118
120
|
int64_t m_mostRecentEventCount{0};
|
|
119
121
|
int m_nativeEventCount{0};
|
|
120
122
|
bool m_comingFromJS{false};
|
|
@@ -124,6 +126,8 @@ struct WindowsTextInputComponentView
|
|
|
124
126
|
bool m_drawing{false};
|
|
125
127
|
bool m_clearTextOnSubmit{false};
|
|
126
128
|
bool m_multiline{false};
|
|
129
|
+
DWORD m_propBitsMask{0};
|
|
130
|
+
DWORD m_propBits{0};
|
|
127
131
|
std::vector<facebook::react::CompWindowsTextInputSubmitKeyEventsStruct> m_submitKeyEvents;
|
|
128
132
|
};
|
|
129
133
|
|
|
@@ -23,10 +23,11 @@ void WindowsTextInputShadowNode::setContextContainer(ContextContainer *contextCo
|
|
|
23
23
|
m_contextContainer = contextContainer;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
AttributedString WindowsTextInputShadowNode::getAttributedString() const {
|
|
26
|
+
AttributedString WindowsTextInputShadowNode::getAttributedString(const LayoutContext &layoutContext) const {
|
|
27
27
|
// Use BaseTextShadowNode to get attributed string from children
|
|
28
28
|
|
|
29
29
|
auto childTextAttributes = TextAttributes::defaultTextAttributes();
|
|
30
|
+
childTextAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
|
|
30
31
|
|
|
31
32
|
childTextAttributes.apply(getConcreteProps().textAttributes);
|
|
32
33
|
|
|
@@ -38,6 +39,7 @@ AttributedString WindowsTextInputShadowNode::getAttributedString() const {
|
|
|
38
39
|
// value attributes manually.
|
|
39
40
|
if (!getConcreteProps().text.empty()) {
|
|
40
41
|
auto textAttributes = TextAttributes::defaultTextAttributes();
|
|
42
|
+
textAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
|
|
41
43
|
textAttributes.apply(getConcreteProps().textAttributes);
|
|
42
44
|
auto fragment = AttributedString::Fragment{};
|
|
43
45
|
fragment.string = getConcreteProps().text;
|
|
@@ -59,7 +61,7 @@ AttributedString WindowsTextInputShadowNode::getAttributedString() const {
|
|
|
59
61
|
// display at all.
|
|
60
62
|
// TODO T67606511: We will redefine the measurement of empty strings as part
|
|
61
63
|
// of T67606511
|
|
62
|
-
AttributedString WindowsTextInputShadowNode::getPlaceholderAttributedString() const {
|
|
64
|
+
AttributedString WindowsTextInputShadowNode::getPlaceholderAttributedString(const LayoutContext &layoutContext) const {
|
|
63
65
|
// Return placeholder text, since text and children are empty.
|
|
64
66
|
auto textAttributedString = AttributedString{};
|
|
65
67
|
auto fragment = AttributedString::Fragment{};
|
|
@@ -70,6 +72,7 @@ AttributedString WindowsTextInputShadowNode::getPlaceholderAttributedString() co
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
auto textAttributes = TextAttributes::defaultTextAttributes();
|
|
75
|
+
textAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
|
|
73
76
|
textAttributes.apply(getConcreteProps().textAttributes);
|
|
74
77
|
|
|
75
78
|
// If there's no text, it's possible that this Fragment isn't actually
|
|
@@ -86,10 +89,10 @@ void WindowsTextInputShadowNode::setTextLayoutManager(SharedTextLayoutManager te
|
|
|
86
89
|
m_textLayoutManager = std::move(textLayoutManager);
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString() const {
|
|
92
|
+
AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString(const LayoutContext &layoutContext) const {
|
|
90
93
|
const auto &state = getStateData();
|
|
91
94
|
|
|
92
|
-
auto reactTreeAttributedString = getAttributedString();
|
|
95
|
+
auto reactTreeAttributedString = getAttributedString(layoutContext);
|
|
93
96
|
|
|
94
97
|
// Sometimes the treeAttributedString will only differ from the state
|
|
95
98
|
// not by inherent properties (string or prop attributes), but by the frame of
|
|
@@ -101,10 +104,10 @@ AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString() con
|
|
|
101
104
|
return (!treeAttributedStringChanged ? state.attributedString : reactTreeAttributedString);
|
|
102
105
|
}
|
|
103
106
|
|
|
104
|
-
void WindowsTextInputShadowNode::updateStateIfNeeded() {
|
|
107
|
+
void WindowsTextInputShadowNode::updateStateIfNeeded(const LayoutContext &layoutContext) {
|
|
105
108
|
ensureUnsealed();
|
|
106
109
|
|
|
107
|
-
auto reactTreeAttributedString = getAttributedString();
|
|
110
|
+
auto reactTreeAttributedString = getAttributedString(layoutContext);
|
|
108
111
|
const auto &state = getStateData();
|
|
109
112
|
|
|
110
113
|
// Tree is often out of sync with the value of the TextInput.
|
|
@@ -125,13 +128,13 @@ void WindowsTextInputShadowNode::updateStateIfNeeded() {
|
|
|
125
128
|
// in the AttributedString, and when State is updated, it needs some way to
|
|
126
129
|
// reconstruct a Fragment with default TextAttributes.
|
|
127
130
|
auto defaultTextAttributes = TextAttributes::defaultTextAttributes();
|
|
128
|
-
|
|
131
|
+
defaultTextAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
|
|
129
132
|
defaultTextAttributes.apply(getConcreteProps().textAttributes);
|
|
130
133
|
|
|
131
134
|
auto newEventCount = state.reactTreeAttributedString.isContentEqual(reactTreeAttributedString)
|
|
132
135
|
? 0
|
|
133
136
|
: getConcreteProps().mostRecentEventCount;
|
|
134
|
-
auto newAttributedString = getMostRecentAttributedString();
|
|
137
|
+
auto newAttributedString = getMostRecentAttributedString(layoutContext);
|
|
135
138
|
|
|
136
139
|
// Even if we're here and updating state, it may be only to update the layout
|
|
137
140
|
// manager If that is the case, make sure we don't update text: pass in the
|
|
@@ -168,10 +171,10 @@ Size WindowsTextInputShadowNode::measureContent(
|
|
|
168
171
|
// during layout, but not during `measure`. If State is out-of-date in layout,
|
|
169
172
|
// it's too late: measure will have already operated on old State. Thus, we
|
|
170
173
|
// use the same value here that we *will* use in layout to update the state.
|
|
171
|
-
AttributedString attributedString = getMostRecentAttributedString();
|
|
174
|
+
AttributedString attributedString = getMostRecentAttributedString(layoutContext);
|
|
172
175
|
|
|
173
176
|
if (attributedString.isEmpty()) {
|
|
174
|
-
attributedString = getPlaceholderAttributedString();
|
|
177
|
+
attributedString = getPlaceholderAttributedString(layoutContext);
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
if (attributedString.isEmpty() && getStateData().mostRecentEventCount != 0) {
|
|
@@ -190,7 +193,7 @@ Size WindowsTextInputShadowNode::measureContent(
|
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
void WindowsTextInputShadowNode::layout(LayoutContext layoutContext) {
|
|
193
|
-
updateStateIfNeeded();
|
|
196
|
+
updateStateIfNeeded(layoutContext);
|
|
194
197
|
ConcreteViewShadowNode::layout(layoutContext);
|
|
195
198
|
}
|
|
196
199
|
|
|
@@ -41,8 +41,8 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode<
|
|
|
41
41
|
/*
|
|
42
42
|
* Returns a `AttributedString` which represents text content of the node.
|
|
43
43
|
*/
|
|
44
|
-
AttributedString getAttributedString() const;
|
|
45
|
-
AttributedString getPlaceholderAttributedString() const;
|
|
44
|
+
AttributedString getAttributedString(const LayoutContext &layoutContext) const;
|
|
45
|
+
AttributedString getPlaceholderAttributedString(const LayoutContext &layoutContext) const;
|
|
46
46
|
|
|
47
47
|
/*
|
|
48
48
|
* Associates a shared TextLayoutManager with the node.
|
|
@@ -62,13 +62,13 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode<
|
|
|
62
62
|
/**
|
|
63
63
|
* Get the most up-to-date attributed string for measurement and State.
|
|
64
64
|
*/
|
|
65
|
-
AttributedString getMostRecentAttributedString() const;
|
|
65
|
+
AttributedString getMostRecentAttributedString(const LayoutContext &layoutContext) const;
|
|
66
66
|
|
|
67
67
|
/*
|
|
68
68
|
* Creates a `State` object (with `AttributedText` and
|
|
69
69
|
* `TextLayoutManager`) if needed.
|
|
70
70
|
*/
|
|
71
|
-
void updateStateIfNeeded();
|
|
71
|
+
void updateStateIfNeeded(const LayoutContext &layoutContext);
|
|
72
72
|
|
|
73
73
|
SharedTextLayoutManager m_textLayoutManager;
|
|
74
74
|
|
|
@@ -31,17 +31,4 @@ WindowsTextInputState::WindowsTextInputState(
|
|
|
31
31
|
defaultThemePaddingTop(defaultThemePaddingTop),
|
|
32
32
|
defaultThemePaddingBottom(defaultThemePaddingBottom) {}
|
|
33
33
|
|
|
34
|
-
WindowsTextInputState::WindowsTextInputState(const WindowsTextInputState &previousState, const folly::dynamic &data)
|
|
35
|
-
: mostRecentEventCount(data.getDefault("mostRecentEventCount", previousState.mostRecentEventCount).getInt()),
|
|
36
|
-
cachedAttributedStringId(data.getDefault("opaqueCacheId", previousState.cachedAttributedStringId).getInt()),
|
|
37
|
-
attributedString(previousState.attributedString),
|
|
38
|
-
reactTreeAttributedString(previousState.reactTreeAttributedString),
|
|
39
|
-
paragraphAttributes(previousState.paragraphAttributes),
|
|
40
|
-
defaultThemePaddingStart(
|
|
41
|
-
data.getDefault("themePaddingStart", previousState.defaultThemePaddingStart).getDouble()),
|
|
42
|
-
defaultThemePaddingEnd(data.getDefault("themePaddingEnd", previousState.defaultThemePaddingEnd).getDouble()),
|
|
43
|
-
defaultThemePaddingTop(data.getDefault("themePaddingTop", previousState.defaultThemePaddingTop).getDouble()),
|
|
44
|
-
defaultThemePaddingBottom(
|
|
45
|
-
data.getDefault("themePaddingBottom", previousState.defaultThemePaddingBottom).getDouble()){};
|
|
46
|
-
|
|
47
34
|
} // namespace facebook::react
|
|
@@ -66,9 +66,6 @@ class WindowsTextInputState final {
|
|
|
66
66
|
double defaultThemePaddingBottom);
|
|
67
67
|
|
|
68
68
|
WindowsTextInputState() = default;
|
|
69
|
-
WindowsTextInputState(const WindowsTextInputState &previousState, const folly::dynamic &data);
|
|
70
|
-
folly::dynamic getDynamic() const;
|
|
71
|
-
MapBuffer getMapBuffer() const;
|
|
72
69
|
};
|
|
73
70
|
|
|
74
71
|
} // namespace facebook::react
|
|
@@ -72,9 +72,10 @@ HRESULT UiaNavigateHelper(
|
|
|
72
72
|
auto parentCV = view.Parent().as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
|
|
73
73
|
if (parentCV != nullptr) {
|
|
74
74
|
auto children = parentCV->Children();
|
|
75
|
-
for (auto
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
for (auto i = children.Size() - 1; i > 0; i--) {
|
|
76
|
+
auto child = children.GetAt(i);
|
|
77
|
+
if (child == view) {
|
|
78
|
+
uiaProvider = children.GetAt(i - 1)
|
|
78
79
|
.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
|
|
79
80
|
->EnsureUiaProvider();
|
|
80
81
|
break;
|
|
@@ -121,7 +122,9 @@ HRESULT UiaSetFocusHelper(::Microsoft::ReactNative::ReactTaggedView &view) noexc
|
|
|
121
122
|
if (rootCV == nullptr)
|
|
122
123
|
return UIA_E_ELEMENTNOTAVAILABLE;
|
|
123
124
|
|
|
124
|
-
return rootCV->TrySetFocusedComponent(strongView)
|
|
125
|
+
return rootCV->TrySetFocusedComponent(strongView, winrt::Microsoft::ReactNative::FocusNavigationDirection::None)
|
|
126
|
+
? S_OK
|
|
127
|
+
: E_FAIL;
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
bool WasUiaPropertyAdvised(winrt::com_ptr<IRawElementProviderSimple> &providerSimple, PROPERTYID propId) noexcept {
|
|
@@ -181,4 +184,26 @@ std::string extractAccessibilityValue(const facebook::react::AccessibilityValue
|
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
186
|
|
|
187
|
+
void DispatchAccessibilityAction(::Microsoft::ReactNative::ReactTaggedView &view, const std::string &action) noexcept {
|
|
188
|
+
auto strongView = view.view();
|
|
189
|
+
|
|
190
|
+
if (!strongView)
|
|
191
|
+
return;
|
|
192
|
+
|
|
193
|
+
auto baseView = strongView.try_as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
|
|
194
|
+
if (baseView == nullptr)
|
|
195
|
+
return;
|
|
196
|
+
|
|
197
|
+
auto props = std::static_pointer_cast<const facebook::react::ViewProps>(baseView->props());
|
|
198
|
+
if (props == nullptr)
|
|
199
|
+
return;
|
|
200
|
+
|
|
201
|
+
auto accessibilityActions = props->accessibilityActions;
|
|
202
|
+
for (size_t i = 0; i < accessibilityActions.size(); i++) {
|
|
203
|
+
if (accessibilityActions[i].name == action) {
|
|
204
|
+
baseView->GetEventEmitter()->onAccessibilityAction(action);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
184
209
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -33,4 +33,6 @@ long GetLiveSetting(const std::string &liveRegion) noexcept;
|
|
|
33
33
|
|
|
34
34
|
std::string extractAccessibilityValue(const facebook::react::AccessibilityValue &value) noexcept;
|
|
35
35
|
|
|
36
|
+
void DispatchAccessibilityAction(::Microsoft::ReactNative::ReactTaggedView &view, const std::string &action) noexcept;
|
|
37
|
+
|
|
36
38
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -37,8 +37,7 @@ winrt::Microsoft::ReactNative::ComponentView UnimplementedNativeViewComponentVie
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
void UnimplementedNativeViewComponentView::HandleCommand(
|
|
40
|
-
winrt::
|
|
41
|
-
const winrt::Microsoft::ReactNative::IJSValueReader &args) noexcept {
|
|
40
|
+
const winrt::Microsoft::ReactNative::HandleCommandArgs &args) noexcept {
|
|
42
41
|
// Do not call base to avoid unknown command asserts
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -25,8 +25,7 @@ struct UnimplementedNativeViewComponentView
|
|
|
25
25
|
facebook::react::LayoutMetrics const &layoutMetrics,
|
|
26
26
|
facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept override;
|
|
27
27
|
|
|
28
|
-
void HandleCommand(
|
|
29
|
-
override;
|
|
28
|
+
void HandleCommand(const winrt::Microsoft::ReactNative::HandleCommandArgs &args) noexcept override;
|
|
30
29
|
|
|
31
30
|
UnimplementedNativeViewComponentView(
|
|
32
31
|
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|