react-native-windows 0.77.0-preview.3 → 0.77.0
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/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +80 -3
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.h +4 -0
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/package.json +14 -14
- package/src/private/featureflags/ReactNativeFeatureFlags.js +2 -2
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
#include "DynamicAutomationProperties.h"
|
|
26
26
|
|
|
27
27
|
#include <Views/ViewPanel.h>
|
|
28
|
+
#include "FrameworkElementViewManager.h"
|
|
28
29
|
#include "Unicode.h"
|
|
29
30
|
#include "cdebug.h"
|
|
30
31
|
|
|
@@ -422,13 +423,24 @@ bool FrameworkElementViewManager::UpdateProperty(
|
|
|
422
423
|
else if (role == "toolbar")
|
|
423
424
|
DynamicAutomationProperties::SetAccessibilityRole(
|
|
424
425
|
element, winrt::Microsoft::ReactNative::AccessibilityRoles::ToolBar);
|
|
425
|
-
else if (role == "list")
|
|
426
|
+
else if (role == "list") {
|
|
426
427
|
DynamicAutomationProperties::SetAccessibilityRole(
|
|
427
428
|
element, winrt::Microsoft::ReactNative::AccessibilityRoles::List);
|
|
428
|
-
|
|
429
|
+
if (propertyValue.Type() == winrt::Microsoft::ReactNative::JSValueType::String) {
|
|
430
|
+
winrt::hstring controlType = FrameworkElementViewManager::getControlTypeFromAccessibilityRole(
|
|
431
|
+
winrt::Microsoft::ReactNative::AccessibilityRoles::List);
|
|
432
|
+
FrameworkElementViewManager::setLocalizedControlTypeFromAccessibilityRole(element, controlType);
|
|
433
|
+
}
|
|
434
|
+
} else if (role == "listitem") {
|
|
429
435
|
DynamicAutomationProperties::SetAccessibilityRole(
|
|
430
436
|
element, winrt::Microsoft::ReactNative::AccessibilityRoles::ListItem);
|
|
431
|
-
|
|
437
|
+
if (propertyValue.Type() ==
|
|
438
|
+
winrt::Microsoft::ReactNative::JSValueType::String) { // Set localized control type
|
|
439
|
+
winrt::hstring controlType = FrameworkElementViewManager::getControlTypeFromAccessibilityRole(
|
|
440
|
+
winrt::Microsoft::ReactNative::AccessibilityRoles::ListItem);
|
|
441
|
+
FrameworkElementViewManager::setLocalizedControlTypeFromAccessibilityRole(element, controlType);
|
|
442
|
+
}
|
|
443
|
+
} else
|
|
432
444
|
DynamicAutomationProperties::SetAccessibilityRole(
|
|
433
445
|
element, winrt::Microsoft::ReactNative::AccessibilityRoles::Unknown);
|
|
434
446
|
} else if (propertyValue.IsNull()) {
|
|
@@ -823,6 +835,71 @@ bool FrameworkElementViewManager::UpdateProperty(
|
|
|
823
835
|
return true;
|
|
824
836
|
}
|
|
825
837
|
|
|
838
|
+
winrt::hstring FrameworkElementViewManager::getControlTypeFromAccessibilityRole(
|
|
839
|
+
winrt::Microsoft::ReactNative::AccessibilityRoles role) {
|
|
840
|
+
switch (role) {
|
|
841
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Button:
|
|
842
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ImageButton:
|
|
843
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Switch:
|
|
844
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ToggleButton:
|
|
845
|
+
return winrt::to_hstring("button");
|
|
846
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Link:
|
|
847
|
+
return winrt::to_hstring("link");
|
|
848
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Image:
|
|
849
|
+
return winrt::to_hstring("image");
|
|
850
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::KeyboardKey:
|
|
851
|
+
return winrt::to_hstring("custom");
|
|
852
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Text:
|
|
853
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Header:
|
|
854
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Summary:
|
|
855
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Alert:
|
|
856
|
+
return winrt::to_hstring("text");
|
|
857
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Adjustable:
|
|
858
|
+
return winrt::to_hstring("slider");
|
|
859
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::CheckBox:
|
|
860
|
+
return winrt::to_hstring("checkbox");
|
|
861
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ComboBox:
|
|
862
|
+
return winrt::to_hstring("combobox");
|
|
863
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Menu:
|
|
864
|
+
return winrt::to_hstring("menu");
|
|
865
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::MenuBar:
|
|
866
|
+
return winrt::to_hstring("menubar");
|
|
867
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::MenuItem:
|
|
868
|
+
return winrt::to_hstring("menuitem");
|
|
869
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ProgressBar:
|
|
870
|
+
return winrt::to_hstring("progressbar");
|
|
871
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Radio:
|
|
872
|
+
return winrt::to_hstring("radiobutton");
|
|
873
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ScrollBar:
|
|
874
|
+
return winrt::to_hstring("scrollbar");
|
|
875
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::SpinButton:
|
|
876
|
+
return winrt::to_hstring("spinner");
|
|
877
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Tab:
|
|
878
|
+
return winrt::to_hstring("tabitem");
|
|
879
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::TabList:
|
|
880
|
+
return winrt::to_hstring("tab");
|
|
881
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ToolBar:
|
|
882
|
+
return winrt::to_hstring("toolbar");
|
|
883
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::List:
|
|
884
|
+
return winrt::to_hstring("list");
|
|
885
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::ListItem:
|
|
886
|
+
return winrt::to_hstring("listitem");
|
|
887
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::None:
|
|
888
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Search:
|
|
889
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::RadioGroup:
|
|
890
|
+
case winrt::Microsoft::ReactNative::AccessibilityRoles::Timer:
|
|
891
|
+
return winrt::to_hstring("group");
|
|
892
|
+
}
|
|
893
|
+
return winrt::to_hstring("custom");
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
void FrameworkElementViewManager::setLocalizedControlTypeFromAccessibilityRole(
|
|
897
|
+
xaml::UIElement element,
|
|
898
|
+
winrt::hstring value) {
|
|
899
|
+
auto controlTypeBoxedValue = winrt::Windows::Foundation::PropertyValue::CreateString(value);
|
|
900
|
+
element.SetValue(xaml::Automation::AutomationProperties::LocalizedControlTypeProperty(), controlTypeBoxedValue);
|
|
901
|
+
}
|
|
902
|
+
|
|
826
903
|
// Applies a TransformMatrix to the backing UIElement.
|
|
827
904
|
// In react-native, rotates and scales are applied about the center of the
|
|
828
905
|
// component, unlike XAML. Since the javascript layer sends a non-centered
|
|
@@ -13,6 +13,10 @@ class REACTWINDOWS_EXPORT FrameworkElementViewManager : public ViewManagerBase {
|
|
|
13
13
|
public:
|
|
14
14
|
FrameworkElementViewManager(const Mso::React::IReactContext &context);
|
|
15
15
|
|
|
16
|
+
static winrt::hstring getControlTypeFromAccessibilityRole(winrt::Microsoft::ReactNative::AccessibilityRoles role);
|
|
17
|
+
|
|
18
|
+
void setLocalizedControlTypeFromAccessibilityRole(xaml::UIElement element, winrt::hstring value);
|
|
19
|
+
|
|
16
20
|
void GetNativeProps(const winrt::Microsoft::ReactNative::IJSValueWriter &writer) const override;
|
|
17
21
|
|
|
18
22
|
// Helper functions related to setting/updating TransformMatrix
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.77.0
|
|
13
|
+
<ReactNativeWindowsVersion>0.77.0</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>77</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>1e639ef0de6e9ca02d4d463d7e9fe982d756c584</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.77.0
|
|
3
|
+
"version": "0.77.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"@react-native-community/cli": "15.0.0-alpha.2",
|
|
27
27
|
"@react-native-community/cli-platform-android": "15.0.0-alpha.2",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
|
|
29
|
-
"@react-native-windows/cli": "0.77.0
|
|
29
|
+
"@react-native-windows/cli": "0.77.0",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
|
-
"@react-native/assets-registry": "0.77.0
|
|
32
|
-
"@react-native/codegen": "0.77.0
|
|
33
|
-
"@react-native/community-cli-plugin": "0.77.0
|
|
34
|
-
"@react-native/gradle-plugin": "0.77.0
|
|
35
|
-
"@react-native/js-polyfills": "0.77.0
|
|
36
|
-
"@react-native/normalize-colors": "0.77.0
|
|
37
|
-
"@react-native/virtualized-lists": "0.77.0
|
|
31
|
+
"@react-native/assets-registry": "0.77.0",
|
|
32
|
+
"@react-native/codegen": "0.77.0",
|
|
33
|
+
"@react-native/community-cli-plugin": "0.77.0",
|
|
34
|
+
"@react-native/gradle-plugin": "0.77.0",
|
|
35
|
+
"@react-native/js-polyfills": "0.77.0",
|
|
36
|
+
"@react-native/normalize-colors": "0.77.0",
|
|
37
|
+
"@react-native/virtualized-lists": "0.77.0",
|
|
38
38
|
"abort-controller": "^3.0.0",
|
|
39
39
|
"anser": "^1.4.9",
|
|
40
40
|
"ansi-regex": "^5.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"yargs": "^17.6.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@react-native-windows/codegen": "0.77.0
|
|
72
|
+
"@react-native-windows/codegen": "0.77.0",
|
|
73
73
|
"@react-native/metro-config": "0.77.0-nightly-20241001-223e98cc4",
|
|
74
74
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
75
75
|
"@rnw-scripts/eslint-config": "1.2.30",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"just-scripts": "^1.3.3",
|
|
86
86
|
"prettier": "2.8.8",
|
|
87
87
|
"react": "18.3.1",
|
|
88
|
-
"react-native": "0.77.0
|
|
88
|
+
"react-native": "0.77.0",
|
|
89
89
|
"react-native-platform-override": "^1.9.49",
|
|
90
90
|
"react-refresh": "^0.14.0",
|
|
91
91
|
"typescript": "5.0.4"
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@types/react": "^18.2.6",
|
|
95
95
|
"react": "^18.2.0",
|
|
96
|
-
"react-native": "0.77.0
|
|
96
|
+
"react-native": "^0.77.0"
|
|
97
97
|
},
|
|
98
98
|
"beachball": {
|
|
99
|
-
"defaultNpmTag": "
|
|
99
|
+
"defaultNpmTag": "latest",
|
|
100
100
|
"disallowedChangeTypes": [
|
|
101
101
|
"major",
|
|
102
102
|
"minor",
|
|
103
|
-
"
|
|
103
|
+
"prerelease",
|
|
104
104
|
"premajor",
|
|
105
105
|
"preminor",
|
|
106
106
|
"prepatch"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<aa51de14d1f085127ad410580beb15f6>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -170,7 +170,7 @@ export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScript
|
|
|
170
170
|
/**
|
|
171
171
|
* Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
|
|
172
172
|
*/
|
|
173
|
-
export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations',
|
|
173
|
+
export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', false);
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
|