@fluentui-react-native/focus-zone 0.23.3 → 0.23.4

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.
Files changed (58) hide show
  1. package/.cache/tsconfig.tsbuildinfo +1 -1
  2. package/CHANGELOG.md +6 -0
  3. package/RCTFocusZone.podspec +1 -1
  4. package/SPEC.md +42 -0
  5. package/lib/FocusZone.d.ts +2 -6
  6. package/lib/FocusZone.d.ts.map +1 -1
  7. package/lib/FocusZone.js +28 -45
  8. package/lib/FocusZone.js.map +1 -1
  9. package/lib/FocusZone.types.d.ts +16 -15
  10. package/lib/FocusZone.types.d.ts.map +1 -1
  11. package/lib/FocusZone.types.js.map +1 -1
  12. package/lib/FocusZoneNativeComponent.d.ts +5 -3
  13. package/lib/FocusZoneNativeComponent.d.ts.map +1 -1
  14. package/lib/FocusZoneNativeComponent.js +3 -1
  15. package/lib/FocusZoneNativeComponent.js.map +1 -1
  16. package/lib/FocusZoneNativeComponent.win32.d.ts +16 -0
  17. package/lib/FocusZoneNativeComponent.win32.d.ts.map +1 -0
  18. package/lib/FocusZoneNativeComponent.win32.js +3 -0
  19. package/lib/FocusZoneNativeComponent.win32.js.map +1 -0
  20. package/lib/__tests__/FocusZone.test.js +68 -70
  21. package/lib/__tests__/FocusZone.test.js.map +1 -1
  22. package/lib/__tests__/FocusZone.types.test.d.ts +2 -0
  23. package/lib/__tests__/FocusZone.types.test.d.ts.map +1 -0
  24. package/lib/__tests__/FocusZone.types.test.js +26 -0
  25. package/lib/__tests__/FocusZone.types.test.js.map +1 -0
  26. package/macos/RCTFocusZone.m +76 -17
  27. package/macos/RCTFocusZoneComponentView.h +14 -0
  28. package/macos/RCTFocusZoneComponentView.mm +201 -0
  29. package/package.json +30 -8
  30. package/react-native.config.cjs +15 -0
  31. package/src/FocusZone.tsx +50 -0
  32. package/src/FocusZone.types.ts +16 -16
  33. package/src/FocusZoneNativeComponent.ts +8 -6
  34. package/src/FocusZoneNativeComponent.win32.ts +18 -0
  35. package/src/__tests__/FocusZone.test.tsx +105 -125
  36. package/src/__tests__/FocusZone.types.test.ts +36 -0
  37. package/tsconfig.json +5 -7
  38. package/windows/ExperimentalFeatures.props +33 -0
  39. package/windows/FRNFocusZone/FRNFocusZone.def +3 -0
  40. package/windows/FRNFocusZone/FRNFocusZone.rc +0 -0
  41. package/windows/FRNFocusZone/FRNFocusZone.vcxproj +147 -0
  42. package/windows/FRNFocusZone/FRNFocusZone.vcxproj.filters +44 -0
  43. package/windows/FRNFocusZone/FocusZoneComponentView.cpp +590 -0
  44. package/windows/FRNFocusZone/FocusZoneComponentView.h +7 -0
  45. package/windows/FRNFocusZone/ReactPackageProvider.cpp +24 -0
  46. package/windows/FRNFocusZone/ReactPackageProvider.h +24 -0
  47. package/windows/FRNFocusZone/ReactPackageProvider.idl +9 -0
  48. package/windows/FRNFocusZone/codegen/.clang-format +2 -0
  49. package/windows/FRNFocusZone/codegen/react/components/FRNFocusZoneSpec/FocusZone.g.h +243 -0
  50. package/windows/FRNFocusZone/packages.lock.json +151 -0
  51. package/windows/FRNFocusZone/pch.cpp +1 -0
  52. package/windows/FRNFocusZone/pch.h +40 -0
  53. package/windows/FRNFocusZone/resource.h +5 -0
  54. package/windows/FRNFocusZone/targetver.h +8 -0
  55. package/windows/FRNFocusZone.sln +43 -0
  56. package/windows/NuGet.Config +13 -0
  57. package/src/FocusZone.ts +0 -57
  58. package/src/__tests__/__snapshots__/FocusZone.test.tsx.snap +0 -1516
@@ -1,151 +1,131 @@
1
- import { act } from 'react';
2
- import { Button } from 'react-native';
1
+ /** @jsxImportSource @fluentui-react-native/framework-base */
2
+ import * as React from 'react';
3
+ import { StyleSheet, Text, View } from 'react-native';
3
4
 
4
- import * as renderer from 'react-test-renderer';
5
+ import { isPhasedComponent, useSlot } from '@fluentui-react-native/framework-base';
6
+ import type { SlotProp } from '@fluentui-react-native/framework-base';
7
+ import { render } from '@testing-library/react-native';
5
8
 
6
- import { FocusZone } from '..';
9
+ import { FocusZone } from '../FocusZone';
10
+ import type { NavigateAtEnd } from '../FocusZone.types';
7
11
 
8
- const onPress = () => {
9
- return;
12
+ jest.mock('react-native/Libraries/ReactNative/RendererProxy', () => ({
13
+ ...jest.requireActual('react-native/Libraries/ReactNative/RendererProxy'),
14
+ findNodeHandle: jest.fn(() => 42),
15
+ }));
16
+
17
+ type FocusZoneSlotConsumerProps = {
18
+ focusZone: SlotProp<typeof FocusZone> & { navigateAtEnd?: NavigateAtEnd };
10
19
  };
11
20
 
12
- describe('FocusZone No Props', () => {
13
- it('No children', () => {
14
- let component: renderer.ReactTestRenderer;
15
- act(() => {
16
- component = renderer.create(<FocusZone />);
17
- });
18
- expect(component!.toJSON()).toMatchSnapshot();
19
- });
21
+ function FocusZoneSlotConsumer({ focusZone }: FocusZoneSlotConsumerProps) {
22
+ const FocusZoneSlot = useSlot(FocusZone, focusZone);
23
+ return (
24
+ <FocusZoneSlot accessibilityHint="rendered as a slot" testID="slotted-focus-zone">
25
+ <Text>Slot content</Text>
26
+ </FocusZoneSlot>
27
+ );
28
+ }
20
29
 
21
- it('One child', () => {
22
- let component: renderer.ReactTestRenderer;
23
- act(() => {
24
- component = renderer.create(
25
- <FocusZone>
26
- <Button title="button" onPress={onPress} />
27
- </FocusZone>,
28
- );
29
- });
30
- expect(component!.toJSON()).toMatchSnapshot();
30
+ describe('FocusZone', () => {
31
+ afterEach(() => {
32
+ jest.restoreAllMocks();
31
33
  });
32
34
 
33
- it('Two children', () => {
34
- let component: renderer.ReactTestRenderer;
35
- act(() => {
36
- component = renderer.create(
37
- <FocusZone>
38
- <Button title="button" onPress={onPress} />
39
- <Button title="button" onPress={onPress} />
40
- </FocusZone>,
41
- );
42
- });
43
- expect(component!.toJSON()).toMatchSnapshot();
35
+ it('uses phased rendering and applies no styling defaults', async () => {
36
+ expect(isPhasedComponent(FocusZone)).toBe(true);
37
+
38
+ const component = await render(<FocusZone testID="focus-zone" />);
39
+ const focusZone = component.getByTestId('focus-zone');
40
+
41
+ expect(focusZone.type).toBe('RCTFocusZone');
42
+ expect(focusZone.props.navigateAtEnd).toBe('NavigateStopAtEnds');
43
+ expect(focusZone.props.style).toBeUndefined();
44
44
  });
45
45
 
46
- it('Three children', () => {
47
- let component: renderer.ReactTestRenderer;
48
- act(() => {
49
- component = renderer.create(
50
- <FocusZone>
51
- <Button title="button" onPress={onPress} />
52
- <Button title="button" onPress={onPress} />
53
- <Button title="button" onPress={onPress} />
54
- </FocusZone>,
55
- );
46
+ it('forwards native behavior, accessibility, style, callbacks, and children', async () => {
47
+ const onFocus = jest.fn();
48
+ const style = { opacity: 0.5 };
49
+ const component = await render(
50
+ <FocusZone
51
+ accessibilityLabel="Formatting tools"
52
+ disabled
53
+ focusZoneDirection="vertical"
54
+ navigationOrderInRenderOrder
55
+ onFocus={onFocus}
56
+ style={style}
57
+ tabKeyNavigation="Normal"
58
+ testID="focus-zone"
59
+ use2DNavigation
60
+ >
61
+ <Text>FocusZone content</Text>
62
+ </FocusZone>,
63
+ );
64
+ const focusZone = component.getByTestId('focus-zone');
65
+
66
+ expect(focusZone.props).toMatchObject({
67
+ accessibilityLabel: 'Formatting tools',
68
+ disabled: true,
69
+ focusZoneDirection: 'vertical',
70
+ navigationOrderInRenderOrder: true,
71
+ onFocus,
72
+ tabKeyNavigation: 'Normal',
73
+ use2DNavigation: true,
56
74
  });
57
- expect(component!.toJSON()).toMatchSnapshot();
75
+ expect(StyleSheet.flatten(focusZone.props.style)).toEqual(style);
76
+ expect(component.getByText('FocusZone content')).toBeTruthy();
58
77
  });
59
- });
60
78
 
61
- describe('FocusZone With Props', () => {
62
- it('defaultTabbableElement Prop', () => {
63
- let component: renderer.ReactTestRenderer;
64
- act(() => {
65
- component = renderer.create(
66
- <FocusZone defaultTabbableElement={null}>
67
- <Button title="button" onPress={onPress} />
68
- <Button title="button" onPress={onPress} />
69
- <Button title="button" onPress={onPress} />
70
- </FocusZone>,
71
- );
72
- });
73
- expect(component!.toJSON()).toMatchSnapshot();
79
+ it('maps circular navigation to the native end behavior', async () => {
80
+ const component = await render(<FocusZone isCircularNavigation testID="focus-zone" />);
81
+
82
+ expect(component.getByTestId('focus-zone').props.navigateAtEnd).toBe('NavigateWrap');
74
83
  });
75
84
 
76
- it('focusZoneDirection Prop', () => {
77
- let component: renderer.ReactTestRenderer;
78
- act(() => {
79
- component = renderer.create(
80
- <FocusZone focusZoneDirection="bidirectional">
81
- <Button title="button" onPress={onPress} />
82
- <Button title="button" onPress={onPress} />
83
- <Button title="button" onPress={onPress} />
84
- </FocusZone>,
85
- );
86
- });
87
- expect(component!.toJSON()).toMatchSnapshot();
85
+ it('preserves a native end behavior supplied by a legacy slot consumer', async () => {
86
+ const component = await render(<FocusZoneSlotConsumer focusZone={{ navigateAtEnd: 'NavigateContinue' }} />);
87
+
88
+ expect(component.getByTestId('slotted-focus-zone').props.navigateAtEnd).toBe('NavigateContinue');
88
89
  });
89
90
 
90
- it('disabled Prop', () => {
91
- let component: renderer.ReactTestRenderer;
92
- act(() => {
93
- component = renderer.create(
94
- <FocusZone disabled={true}>
95
- <Button title="button" onPress={onPress} />
96
- <Button title="button" onPress={onPress} />
97
- <Button title="button" onPress={onPress} />
98
- </FocusZone>,
99
- );
100
- });
101
- expect(component!.toJSON()).toMatchSnapshot();
91
+ it('forwards a registered native identifier as the default tabbable element', async () => {
92
+ const component = await render(<FocusZone defaultTabbableElement="preferred-item" testID="focus-zone" />);
93
+
94
+ expect(component.getByTestId('focus-zone').props.defaultTabbableElement).toBe('preferred-item');
102
95
  });
103
96
 
104
- it('isCircularNavigation Prop', () => {
105
- let component: renderer.ReactTestRenderer;
106
- act(() => {
107
- component = renderer.create(
108
- <FocusZone isCircularNavigation={true}>
109
- <Button title="button" onPress={onPress} />
110
- <Button title="button" onPress={onPress} />
111
- <Button title="button" onPress={onPress} />
112
- </FocusZone>,
113
- );
114
- });
115
- expect(component!.toJSON()).toMatchSnapshot();
97
+ it('resolves a default tabbable element ref to its native handle', async () => {
98
+ const defaultTabbableElement = React.createRef<View>();
99
+ const component = await render(
100
+ <FocusZone defaultTabbableElement={defaultTabbableElement} testID="focus-zone">
101
+ <View ref={defaultTabbableElement} />
102
+ </FocusZone>,
103
+ );
104
+
105
+ expect(defaultTabbableElement.current).not.toBeNull();
106
+ expect(component.getByTestId('focus-zone').props.defaultTabbableElement).toBe(42);
116
107
  });
117
108
 
118
- it('use2DNavigation Prop', () => {
119
- let component: renderer.ReactTestRenderer;
120
- act(() => {
121
- component = renderer.create(
122
- <FocusZone use2DNavigation={true}>
123
- <Button title="button" onPress={onPress} />
124
- <Button title="button" onPress={onPress} />
125
- <Button title="button" onPress={onPress} />
126
- </FocusZone>,
127
- );
128
- });
129
- expect(component!.toJSON()).toMatchSnapshot();
109
+ it('forwards componentRef without exposing it as a native prop', async () => {
110
+ const componentRef = React.createRef<View>();
111
+ const component = await render(<FocusZone componentRef={componentRef} testID="focus-zone" />);
112
+ const focusZone = component.getByTestId('focus-zone');
113
+
114
+ expect(componentRef.current).not.toBeNull();
115
+ expect(focusZone.props.componentRef).toBeUndefined();
130
116
  });
131
117
 
132
- it('All Props', () => {
133
- let component: renderer.ReactTestRenderer;
134
- act(() => {
135
- component = renderer.create(
136
- <FocusZone
137
- disabled={false}
138
- use2DNavigation={true}
139
- defaultTabbableElement={null}
140
- isCircularNavigation={false}
141
- focusZoneDirection="vertical"
142
- >
143
- <Button title="button" onPress={onPress} />
144
- <Button title="button" onPress={onPress} />
145
- <Button title="button" onPress={onPress} />
146
- </FocusZone>,
147
- );
118
+ it('can be consumed as a slot with merged render props', async () => {
119
+ const component = await render(
120
+ <FocusZoneSlotConsumer focusZone={{ accessibilityLabel: 'Slotted FocusZone', focusZoneDirection: 'horizontal' }} />,
121
+ );
122
+ const focusZone = component.getByTestId('slotted-focus-zone');
123
+
124
+ expect(focusZone.props).toMatchObject({
125
+ accessibilityHint: 'rendered as a slot',
126
+ accessibilityLabel: 'Slotted FocusZone',
127
+ focusZoneDirection: 'horizontal',
148
128
  });
149
- expect(component!.toJSON()).toMatchSnapshot();
129
+ expect(component.getByText('Slot content')).toBeTruthy();
150
130
  });
151
131
  });
@@ -0,0 +1,36 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import * as React from 'react';
3
+
4
+ import type { SlotProp } from '@fluentui-react-native/framework-base';
5
+ import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
6
+
7
+ import type { FocusZone } from '../FocusZone';
8
+ import type { FocusZoneProps, NativeProps } from '../FocusZone.types';
9
+
10
+ const componentRef = React.createRef<IFocusable>();
11
+ const defaultTabbableElement = React.createRef<React.Component>();
12
+
13
+ const props: FocusZoneProps = {
14
+ accessibilityLabel: 'Formatting tools',
15
+ componentRef,
16
+ defaultTabbableElement,
17
+ focusZoneDirection: 'horizontal',
18
+ isCircularNavigation: true,
19
+ };
20
+
21
+ const focusZoneSlot: SlotProp<typeof FocusZone> = props;
22
+ const nativeProps: NativeProps = {
23
+ defaultTabbableElement: 42,
24
+ focusZoneDirection: 'vertical',
25
+ navigateAtEnd: 'NavigateWrap',
26
+ };
27
+
28
+ // @ts-expect-error FocusZone direction must be one of the supported navigation axes.
29
+ const invalidDirection: FocusZoneProps = { focusZoneDirection: 'diagonal' };
30
+
31
+ describe('FocusZone types', () => {
32
+ it('accepts public props as a slot contract', () => {
33
+ expect(focusZoneSlot).toBeDefined();
34
+ expect(nativeProps).toBeDefined();
35
+ });
36
+ });
package/tsconfig.json CHANGED
@@ -7,21 +7,19 @@
7
7
  "tsBuildInfoFile": ".cache/tsconfig.tsbuildinfo"
8
8
  },
9
9
  "include": ["src"],
10
+ "exclude": ["**/*.stories.ts", "**/*.stories.tsx"],
10
11
  "references": [
11
12
  {
12
- "path": "../../utils/adapters/tsconfig.json"
13
+ "path": "../../agentic/desktop-driver/tsconfig.json"
13
14
  },
14
15
  {
15
- "path": "../../utils/interactive-hooks/tsconfig.json"
16
- },
17
- {
18
- "path": "../../../scripts/tsconfig.json"
16
+ "path": "../../framework-base/tsconfig.json"
19
17
  },
20
18
  {
21
- "path": "../../deprecated/foundation-composable/tsconfig.json"
19
+ "path": "../../utils/interactive-hooks/tsconfig.json"
22
20
  },
23
21
  {
24
- "path": "../../deprecated/foundation-settings/tsconfig.json"
22
+ "path": "../../../scripts/tsconfig.json"
25
23
  }
26
24
  ]
27
25
  }
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+
4
+ <PropertyGroup Label="Microsoft.ReactNative Experimental Features">
5
+ <!--
6
+ Required for building a New Architecture project.
7
+
8
+ Library projects can change this value to test against Old and New
9
+ Architectures when building the library project's local sln file.
10
+
11
+ Otherwise this value will be decided by the consuming RNW app.
12
+
13
+ See https://microsoft.github.io/react-native-windows/docs/new-architecture
14
+ -->
15
+ <RnwNewArch>true</RnwNewArch>
16
+
17
+ <!--
18
+ Changes compilation to assume use of Microsoft.ReactNative NuGet packages
19
+ instead of building the framework from source. Defaults to true.
20
+
21
+ This is set during library project creation and is used when building
22
+ the library project's local sln file.
23
+
24
+ Otherwise this value will be decided by the consuming RNW app.
25
+
26
+ See https://microsoft.github.io/react-native-windows/docs/nuget
27
+ -->
28
+ <UseExperimentalNuget>true</UseExperimentalNuget>
29
+
30
+ <ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>
31
+ </PropertyGroup>
32
+
33
+ </Project>
@@ -0,0 +1,3 @@
1
+ EXPORTS
2
+ DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
3
+ DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
@@ -0,0 +1,147 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- This project was created with react-native-windows 0.81.32 -->
3
+ <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4
+ <Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
5
+ <PropertyGroup Label="Globals">
6
+ <CppWinRTOptimized>true</CppWinRTOptimized>
7
+ <MinimalCoreWin>true</MinimalCoreWin>
8
+ <ProjectGuid>{85648B33-7A31-434B-ACE5-6E4F6E52EBAD}</ProjectGuid>
9
+ <ProjectName>FRNFocusZone</ProjectName>
10
+ <Keyword>Win32Proj</Keyword>
11
+ <RootNamespace>FRNFocusZone</RootNamespace>
12
+ <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='18.0'">10.0.26100.0</WindowsTargetPlatformVersion>
13
+ <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'==''">10.0</WindowsTargetPlatformVersion>
14
+ <DefaultLanguage>en-US</DefaultLanguage>
15
+ <MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
16
+ <AppxPackage>false</AppxPackage>
17
+ </PropertyGroup>
18
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
19
+ <PropertyGroup Label="ReactNativeWindowsProps">
20
+ <ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
21
+ <RunAutolinkCheck>false</RunAutolinkCheck>
22
+ <RnwNewArchOnly>true</RnwNewArchOnly>
23
+ </PropertyGroup>
24
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" />
25
+ <ItemGroup Label="ProjectConfigurations">
26
+ <ProjectConfiguration Include="Debug|Win32">
27
+ <Configuration>Debug</Configuration>
28
+ <Platform>Win32</Platform>
29
+ </ProjectConfiguration>
30
+ <ProjectConfiguration Include="Release|Win32">
31
+ <Configuration>Release</Configuration>
32
+ <Platform>Win32</Platform>
33
+ </ProjectConfiguration>
34
+ <ProjectConfiguration Include="Debug|x64">
35
+ <Configuration>Debug</Configuration>
36
+ <Platform>x64</Platform>
37
+ </ProjectConfiguration>
38
+ <ProjectConfiguration Include="Release|x64">
39
+ <Configuration>Release</Configuration>
40
+ <Platform>x64</Platform>
41
+ </ProjectConfiguration>
42
+ <ProjectConfiguration Include="Debug|ARM64">
43
+ <Configuration>Debug</Configuration>
44
+ <Platform>ARM64</Platform>
45
+ </ProjectConfiguration>
46
+ <ProjectConfiguration Include="Release|ARM64">
47
+ <Configuration>Release</Configuration>
48
+ <Platform>ARM64</Platform>
49
+ </ProjectConfiguration>
50
+ </ItemGroup>
51
+ <PropertyGroup Label="Configuration">
52
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
53
+ <CharacterSet>Unicode</CharacterSet>
54
+ <PlatformToolset Condition="'$(VisualStudioVersion)'=='18.0'">v145</PlatformToolset>
55
+ <PlatformToolset Condition="'$(PlatformToolset)'==''">v143</PlatformToolset>
56
+ <GenerateManifest>false</GenerateManifest>
57
+ </PropertyGroup>
58
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
59
+ <UseDebugLibraries>true</UseDebugLibraries>
60
+ </PropertyGroup>
61
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
62
+ <UseDebugLibraries>false</UseDebugLibraries>
63
+ <WholeProgramOptimization>true</WholeProgramOptimization>
64
+ </PropertyGroup>
65
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
66
+ <ImportGroup Label="ExtensionSettings">
67
+ </ImportGroup>
68
+ <ImportGroup Label="PropertySheets">
69
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70
+ </ImportGroup>
71
+ <ImportGroup Label="ReactNativeWindowsPropertySheets">
72
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" />
73
+ </ImportGroup>
74
+ <ItemDefinitionGroup>
75
+ <ClCompile>
76
+ <PrecompiledHeader>Use</PrecompiledHeader>
77
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
78
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
79
+ <WarningLevel>Level4</WarningLevel>
80
+ <SDLCheck>true</SDLCheck>
81
+ <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
82
+ <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
83
+ <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
84
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
85
+ <LanguageStandard>stdcpp20</LanguageStandard>
86
+ <AdditionalIncludeDirectories>
87
+ $(MSBuildThisFileDirectory);
88
+ %(AdditionalIncludeDirectories)
89
+ </AdditionalIncludeDirectories>
90
+ </ClCompile>
91
+ <Link>
92
+ <AdditionalDependencies>user32.lib;windowsapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
93
+ <SubSystem>Console</SubSystem>
94
+ <GenerateWindowsMetadata>true</GenerateWindowsMetadata>
95
+ <ModuleDefinitionFile>FRNFocusZone.def</ModuleDefinitionFile>
96
+ </Link>
97
+ </ItemDefinitionGroup>
98
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
99
+ <ClCompile>
100
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
101
+ </ClCompile>
102
+ </ItemDefinitionGroup>
103
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
104
+ <ClCompile>
105
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
106
+ </ClCompile>
107
+ </ItemDefinitionGroup>
108
+ <PropertyGroup Label="UserMacros" />
109
+ <ItemGroup>
110
+ <ClInclude Include="FocusZoneComponentView.h" />
111
+ <ClInclude Include="ReactPackageProvider.h">
112
+ <DependentUpon>ReactPackageProvider.idl</DependentUpon>
113
+ </ClInclude>
114
+ <ClInclude Include="resource.h" />
115
+ <ClInclude Include="pch.h" />
116
+ <ClInclude Include="targetver.h" />
117
+ </ItemGroup>
118
+ <ItemGroup>
119
+ <ClCompile Include="FocusZoneComponentView.cpp" />
120
+ <ClCompile Include="pch.cpp">
121
+ <PrecompiledHeader>Create</PrecompiledHeader>
122
+ </ClCompile>
123
+ <ClCompile Include="ReactPackageProvider.cpp">
124
+ <DependentUpon>ReactPackageProvider.idl</DependentUpon>
125
+ </ClCompile>
126
+ <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
127
+ </ItemGroup>
128
+ <ItemGroup>
129
+ <Midl Include="ReactPackageProvider.idl" />
130
+ </ItemGroup>
131
+ <ItemGroup>
132
+ <ResourceCompile Include="FRNFocusZone.rc" />
133
+ </ItemGroup>
134
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
135
+ <ImportGroup Label="ReactNativeWindowsTargets">
136
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" />
137
+ </ImportGroup>
138
+ <ItemGroup>
139
+ </ItemGroup>
140
+ <Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
141
+ <PropertyGroup>
142
+ <ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
143
+ </PropertyGroup>
144
+ <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props'))" />
145
+ <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets'))" />
146
+ </Target>
147
+ </Project>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Source Files">
5
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7
+ </Filter>
8
+ <Filter Include="Header Files">
9
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11
+ </Filter>
12
+ <Filter Include="Resource Files">
13
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15
+ </Filter>
16
+ </ItemGroup>
17
+ <ItemGroup>
18
+ <ClInclude Include="targetver.h">
19
+ <Filter>Header Files</Filter>
20
+ </ClInclude>
21
+ <ClInclude Include="resource.h">
22
+ <Filter>Header Files</Filter>
23
+ </ClInclude>
24
+ <ClInclude Include="FocusZoneComponentView.h">
25
+ <Filter>Header Files</Filter>
26
+ </ClInclude>
27
+ <ClInclude Include="pch.h">
28
+ <Filter>Header Files</Filter>
29
+ </ClInclude>
30
+ </ItemGroup>
31
+ <ItemGroup>
32
+ <ClCompile Include="FocusZoneComponentView.cpp">
33
+ <Filter>Source Files</Filter>
34
+ </ClCompile>
35
+ <ClCompile Include="pch.cpp">
36
+ <Filter>Source Files</Filter>
37
+ </ClCompile>
38
+ </ItemGroup>
39
+ <ItemGroup>
40
+ <ResourceCompile Include="FRNFocusZone.rc">
41
+ <Filter>Resource Files</Filter>
42
+ </ResourceCompile>
43
+ </ItemGroup>
44
+ </Project>