react-native-windows 0.0.0-canary.710 → 0.0.0-canary.712
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/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +3 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +8 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +2 -0
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/package.json +2 -2
- package/templates/cpp-app/template.config.js +17 -16
|
@@ -285,7 +285,9 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPropertyValue(PROPERT
|
|
|
285
285
|
|
|
286
286
|
case UIA_HelpTextPropertyId: {
|
|
287
287
|
pRetVal->vt = VT_BSTR;
|
|
288
|
-
auto helpText =
|
|
288
|
+
auto helpText = props->accessibilityHint.empty()
|
|
289
|
+
? ::Microsoft::Common::Unicode::Utf8ToUtf16(baseView->DefaultHelpText())
|
|
290
|
+
: ::Microsoft::Common::Unicode::Utf8ToUtf16(props->accessibilityHint);
|
|
289
291
|
pRetVal->bstrVal = SysAllocString(helpText.c_str());
|
|
290
292
|
hr = pRetVal->bstrVal != nullptr ? S_OK : E_OUTOFMEMORY;
|
|
291
293
|
break;
|
|
@@ -1284,6 +1284,10 @@ std::string CompositionBaseComponentView::DefaultAccessibleName() const noexcept
|
|
|
1284
1284
|
return "";
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
|
+
std::string CompositionBaseComponentView::DefaultHelpText() const noexcept {
|
|
1288
|
+
return "";
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1287
1291
|
CompositionViewComponentView::CompositionViewComponentView(
|
|
1288
1292
|
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
1289
1293
|
facebook::react::Tag tag)
|
|
@@ -82,6 +82,7 @@ struct CompositionBaseComponentView : public IComponentView,
|
|
|
82
82
|
|
|
83
83
|
virtual std::string DefaultControlType() const noexcept;
|
|
84
84
|
virtual std::string DefaultAccessibleName() const noexcept;
|
|
85
|
+
virtual std::string DefaultHelpText() const noexcept;
|
|
85
86
|
|
|
86
87
|
protected:
|
|
87
88
|
std::array<winrt::Microsoft::ReactNative::Composition::ISpriteVisual, SpecialBorderLayerCount>
|
package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp
CHANGED
|
@@ -660,6 +660,14 @@ std::string WindowsTextInputComponentView::DefaultControlType() const noexcept {
|
|
|
660
660
|
return "textinput";
|
|
661
661
|
}
|
|
662
662
|
|
|
663
|
+
std::string WindowsTextInputComponentView::DefaultAccessibleName() const noexcept {
|
|
664
|
+
return m_props->placeholder;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
std::string WindowsTextInputComponentView::DefaultHelpText() const noexcept {
|
|
668
|
+
return m_props->placeholder;
|
|
669
|
+
}
|
|
670
|
+
|
|
663
671
|
void WindowsTextInputComponentView::updateProps(
|
|
664
672
|
facebook::react::Props::Shared const &props,
|
|
665
673
|
facebook::react::Props::Shared const &oldProps) noexcept {
|
|
@@ -53,6 +53,8 @@ struct WindowsTextInputComponentView : CompositionBaseComponentView {
|
|
|
53
53
|
void onFocusGained() noexcept override;
|
|
54
54
|
bool focusable() const noexcept override;
|
|
55
55
|
std::string DefaultControlType() const noexcept override;
|
|
56
|
+
std::string DefaultAccessibleName() const noexcept override;
|
|
57
|
+
std::string DefaultHelpText() const noexcept override;
|
|
56
58
|
void onKeyDown(
|
|
57
59
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyboardSource &source,
|
|
58
60
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.0.0-canary.
|
|
13
|
+
<ReactNativeWindowsVersion>0.0.0-canary.712</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>d64dc2a331ecda6f1df921285a0087f417950e15</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.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.712",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@react-native-community/cli": "12.0.0-alpha.7",
|
|
27
27
|
"@react-native-community/cli-platform-android": "12.0.0-alpha.7",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "12.0.0-alpha.7",
|
|
29
|
-
"@react-native-windows/cli": "0.0.0-canary.
|
|
29
|
+
"@react-native-windows/cli": "0.0.0-canary.190",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
31
|
"@react-native/assets-registry": "0.73.0-nightly-20230622-0201e51bb",
|
|
32
32
|
"@react-native/codegen": "0.73.0-nightly-20230711-f396067cc",
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
const chalk = require('chalk');
|
|
10
10
|
const existsSync = require('fs').existsSync;
|
|
11
|
-
const fs = require('fs').promises;
|
|
12
11
|
const path = require('path');
|
|
13
12
|
const username = require('username');
|
|
14
13
|
const uuid = require('uuid');
|
|
14
|
+
const util = require('util');
|
|
15
|
+
|
|
16
|
+
const glob = util.promisify(require('glob'));
|
|
15
17
|
|
|
16
18
|
async function preInstall(config = {}, options = {}) {}
|
|
17
19
|
|
|
@@ -21,7 +23,7 @@ async function getFileMappings(config = {}, options = {}) {
|
|
|
21
23
|
);
|
|
22
24
|
const rnwVersion = require(path.join(rnwPath, 'package.json')).version;
|
|
23
25
|
|
|
24
|
-
const devMode =
|
|
26
|
+
const devMode = existsSync(path.join(rnwPath, 'src'));
|
|
25
27
|
|
|
26
28
|
const projectName =
|
|
27
29
|
config?.project?.windows?.project?.projectName ?? options?.name ?? 'MyApp';
|
|
@@ -66,31 +68,30 @@ async function getFileMappings(config = {}, options = {}) {
|
|
|
66
68
|
|
|
67
69
|
let fileMappings = [];
|
|
68
70
|
|
|
69
|
-
const templateFiles = await
|
|
71
|
+
const templateFiles = await glob('**/*', {
|
|
72
|
+
cwd: __dirname,
|
|
73
|
+
ignore: 'template.config.js',
|
|
74
|
+
nodir: true,
|
|
75
|
+
});
|
|
70
76
|
|
|
71
77
|
for (const file of templateFiles) {
|
|
72
78
|
const fileMapping = {
|
|
73
|
-
from: path.resolve(__dirname, file),
|
|
74
|
-
to: file,
|
|
79
|
+
from: path.resolve(__dirname, path.normalize(file)),
|
|
80
|
+
to: path.normalize(file),
|
|
75
81
|
replacements,
|
|
76
82
|
};
|
|
77
83
|
|
|
78
|
-
// Don't include this file nor directories
|
|
79
|
-
if (
|
|
80
|
-
file === 'template.config.js' ||
|
|
81
|
-
(await fs.stat(fileMapping.from)).isDirectory()
|
|
82
|
-
) {
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
84
|
// Perform simple file renames
|
|
87
85
|
const fileName = path.basename(fileMapping.to);
|
|
88
86
|
switch (fileName) {
|
|
89
87
|
case '_gitignore':
|
|
90
|
-
fileMapping.to = path.join(path.dirname(
|
|
88
|
+
fileMapping.to = path.join(path.dirname(fileMapping.to), '.gitignore');
|
|
91
89
|
break;
|
|
92
90
|
case 'NuGet_Config':
|
|
93
|
-
fileMapping.to = path.join(
|
|
91
|
+
fileMapping.to = path.join(
|
|
92
|
+
path.dirname(fileMapping.to),
|
|
93
|
+
'NuGet.config',
|
|
94
|
+
);
|
|
94
95
|
break;
|
|
95
96
|
}
|
|
96
97
|
|
|
@@ -104,7 +105,7 @@ async function getFileMappings(config = {}, options = {}) {
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
function postInstall(config = {}, options = {}) {
|
|
107
|
-
console.log(chalk.white.bold('To run your
|
|
108
|
+
console.log(chalk.white.bold('To run your new windows app:'));
|
|
108
109
|
console.log(chalk.white(' npx react-native run-windows'));
|
|
109
110
|
}
|
|
110
111
|
|