@react-native-ohos/react-native-pdf 6.7.5-rc.1
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/DoubleTapView.js +125 -0
- package/LICENSE +21 -0
- package/PdfManager.js +26 -0
- package/PdfPageView.js +53 -0
- package/PdfView.js +416 -0
- package/PdfViewFlatList.js +30 -0
- package/PinchZoomView.js +125 -0
- package/README.OpenSource +11 -0
- package/README.md +13 -0
- package/fabric/RNPDFPdfNativeComponent.js +46 -0
- package/fabric/RTNPdfViewNativeComponent.tsx +56 -0
- package/harmony/pdfview/Index.ets +8 -0
- package/harmony/pdfview/build-profile.json5 +28 -0
- package/harmony/pdfview/consumer-rules.txt +0 -0
- package/harmony/pdfview/hvigorfile.ts +6 -0
- package/harmony/pdfview/obfuscation-rules.txt +18 -0
- package/harmony/pdfview/oh-package.json5 +11 -0
- package/harmony/pdfview/src/main/cpp/CMakeLists.txt +8 -0
- package/harmony/pdfview/src/main/cpp/ComponentDescriptors.h +39 -0
- package/harmony/pdfview/src/main/cpp/EventEmitters.cpp +40 -0
- package/harmony/pdfview/src/main/cpp/EventEmitters.h +50 -0
- package/harmony/pdfview/src/main/cpp/PdfEventEmitRequestHandler.h +53 -0
- package/harmony/pdfview/src/main/cpp/PdfViewJSIBinder.h +71 -0
- package/harmony/pdfview/src/main/cpp/PdfViewPackage.h +58 -0
- package/harmony/pdfview/src/main/cpp/Props.cpp +60 -0
- package/harmony/pdfview/src/main/cpp/Props.h +65 -0
- package/harmony/pdfview/src/main/cpp/RTNPdfViewSpecsJSI-generated.cpp +30 -0
- package/harmony/pdfview/src/main/cpp/RTNPdfViewSpecsJSI.h +33 -0
- package/harmony/pdfview/src/main/cpp/ShadowNodes.cpp +33 -0
- package/harmony/pdfview/src/main/cpp/ShadowNodes.h +48 -0
- package/harmony/pdfview/src/main/cpp/States.cpp +30 -0
- package/harmony/pdfview/src/main/cpp/States.h +57 -0
- package/harmony/pdfview/src/main/ets/Logger.ets +64 -0
- package/harmony/pdfview/src/main/ets/PdfViewPackage.ets +34 -0
- package/harmony/pdfview/src/main/ets/components/mainpage/RTNPdfView.ets +521 -0
- package/harmony/pdfview/src/main/ets/components/mainpage/types.ts +15 -0
- package/harmony/pdfview/src/main/module.json5 +11 -0
- package/harmony/pdfview/src/main/resources/base/element/string.json +8 -0
- package/harmony/pdfview/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/pdfview/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/pdfview/src/test/List.test.ets +29 -0
- package/harmony/pdfview/src/test/LocalUnit.test.ets +57 -0
- package/harmony/pdfview.har +0 -0
- package/index.d.ts +64 -0
- package/index.js +475 -0
- package/index.js.flow +65 -0
- package/package.json +63 -0
- package/windows/RCTPdf/PropertySheet.props +16 -0
- package/windows/RCTPdf/RCTPdf.def +3 -0
- package/windows/RCTPdf/RCTPdf.vcxproj +180 -0
- package/windows/RCTPdf/RCTPdf.vcxproj.filters +38 -0
- package/windows/RCTPdf/RCTPdfControl.cpp +667 -0
- package/windows/RCTPdf/RCTPdfControl.h +119 -0
- package/windows/RCTPdf/RCTPdfControl.idl +10 -0
- package/windows/RCTPdf/RCTPdfControl.xaml +33 -0
- package/windows/RCTPdf/RCTPdfViewManager.cpp +69 -0
- package/windows/RCTPdf/RCTPdfViewManager.h +51 -0
- package/windows/RCTPdf/ReactPackageProvider.cpp +15 -0
- package/windows/RCTPdf/ReactPackageProvider.h +16 -0
- package/windows/RCTPdf/ReactPackageProvider.idl +9 -0
- package/windows/RCTPdf/packages.config +4 -0
- package/windows/RCTPdf/pch.cpp +1 -0
- package/windows/RCTPdf/pch.h +31 -0
- package/windows/README.md +21 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" />
|
|
4
|
+
<PropertyGroup Label="Globals">
|
|
5
|
+
<CppWinRTOptimized>true</CppWinRTOptimized>
|
|
6
|
+
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
|
|
7
|
+
<MinimalCoreWin>true</MinimalCoreWin>
|
|
8
|
+
<ProjectGuid>{03b8503f-f40d-4013-829c-71b304537d90}</ProjectGuid>
|
|
9
|
+
<ProjectName>RCTPdf</ProjectName>
|
|
10
|
+
<RootNamespace>RCTPdf</RootNamespace>
|
|
11
|
+
<DefaultLanguage>en-US</DefaultLanguage>
|
|
12
|
+
<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
|
|
13
|
+
<AppContainerApplication>true</AppContainerApplication>
|
|
14
|
+
<ApplicationType>Windows Store</ApplicationType>
|
|
15
|
+
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
|
16
|
+
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
|
|
17
|
+
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
|
|
18
|
+
</PropertyGroup>
|
|
19
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
20
|
+
<PropertyGroup Label="ReactNativeWindowsProps">
|
|
21
|
+
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
|
|
22
|
+
</PropertyGroup>
|
|
23
|
+
<ItemGroup Label="ProjectConfigurations">
|
|
24
|
+
<ProjectConfiguration Include="Debug|ARM">
|
|
25
|
+
<Configuration>Debug</Configuration>
|
|
26
|
+
<Platform>ARM</Platform>
|
|
27
|
+
</ProjectConfiguration>
|
|
28
|
+
<ProjectConfiguration Include="Debug|ARM64">
|
|
29
|
+
<Configuration>Debug</Configuration>
|
|
30
|
+
<Platform>ARM64</Platform>
|
|
31
|
+
</ProjectConfiguration>
|
|
32
|
+
<ProjectConfiguration Include="Debug|Win32">
|
|
33
|
+
<Configuration>Debug</Configuration>
|
|
34
|
+
<Platform>Win32</Platform>
|
|
35
|
+
</ProjectConfiguration>
|
|
36
|
+
<ProjectConfiguration Include="Debug|x64">
|
|
37
|
+
<Configuration>Debug</Configuration>
|
|
38
|
+
<Platform>x64</Platform>
|
|
39
|
+
</ProjectConfiguration>
|
|
40
|
+
<ProjectConfiguration Include="Release|ARM">
|
|
41
|
+
<Configuration>Release</Configuration>
|
|
42
|
+
<Platform>ARM</Platform>
|
|
43
|
+
</ProjectConfiguration>
|
|
44
|
+
<ProjectConfiguration Include="Release|ARM64">
|
|
45
|
+
<Configuration>Release</Configuration>
|
|
46
|
+
<Platform>ARM64</Platform>
|
|
47
|
+
</ProjectConfiguration>
|
|
48
|
+
<ProjectConfiguration Include="Release|Win32">
|
|
49
|
+
<Configuration>Release</Configuration>
|
|
50
|
+
<Platform>Win32</Platform>
|
|
51
|
+
</ProjectConfiguration>
|
|
52
|
+
<ProjectConfiguration Include="Release|x64">
|
|
53
|
+
<Configuration>Release</Configuration>
|
|
54
|
+
<Platform>x64</Platform>
|
|
55
|
+
</ProjectConfiguration>
|
|
56
|
+
</ItemGroup>
|
|
57
|
+
<PropertyGroup Label="Configuration">
|
|
58
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
59
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
60
|
+
<GenerateManifest>false</GenerateManifest>
|
|
61
|
+
</PropertyGroup>
|
|
62
|
+
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
|
63
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
|
64
|
+
<LinkIncremental>true</LinkIncremental>
|
|
65
|
+
</PropertyGroup>
|
|
66
|
+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
|
67
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
|
68
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
69
|
+
<LinkIncremental>false</LinkIncremental>
|
|
70
|
+
</PropertyGroup>
|
|
71
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
72
|
+
<ImportGroup Label="ExtensionSettings">
|
|
73
|
+
</ImportGroup>
|
|
74
|
+
<ImportGroup Label="PropertySheets">
|
|
75
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
76
|
+
</ImportGroup>
|
|
77
|
+
<ImportGroup Label="PropertySheets">
|
|
78
|
+
<Import Project="PropertySheet.props" />
|
|
79
|
+
</ImportGroup>
|
|
80
|
+
<ImportGroup Label="ReactNativeWindowsPropertySheets">
|
|
81
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" />
|
|
82
|
+
</ImportGroup>
|
|
83
|
+
<PropertyGroup Label="UserMacros" />
|
|
84
|
+
<PropertyGroup />
|
|
85
|
+
<ItemDefinitionGroup>
|
|
86
|
+
<ClCompile>
|
|
87
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
88
|
+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
|
89
|
+
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
|
90
|
+
<WarningLevel>Level4</WarningLevel>
|
|
91
|
+
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
|
|
92
|
+
<!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
|
|
93
|
+
<AdditionalOptions Condition="'$(CppWinRTHeapEnforcement)'==''">/DWINRT_NO_MAKE_DETECTION %(AdditionalOptions)</AdditionalOptions>
|
|
94
|
+
<DisableSpecificWarnings>28204</DisableSpecificWarnings>
|
|
95
|
+
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
96
|
+
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
|
97
|
+
</ClCompile>
|
|
98
|
+
<Link>
|
|
99
|
+
<SubSystem>Console</SubSystem>
|
|
100
|
+
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
|
101
|
+
<ModuleDefinitionFile>RCTPdf.def</ModuleDefinitionFile>
|
|
102
|
+
</Link>
|
|
103
|
+
</ItemDefinitionGroup>
|
|
104
|
+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
|
105
|
+
<ClCompile>
|
|
106
|
+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
107
|
+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
108
|
+
</ClCompile>
|
|
109
|
+
</ItemDefinitionGroup>
|
|
110
|
+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
|
111
|
+
<ClCompile>
|
|
112
|
+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
113
|
+
</ClCompile>
|
|
114
|
+
</ItemDefinitionGroup>
|
|
115
|
+
<ItemGroup>
|
|
116
|
+
<ClInclude Include="RCTPdfControl.h">
|
|
117
|
+
<DependentUpon>RCTPdfControl.xaml</DependentUpon>
|
|
118
|
+
<SubType>Code</SubType>
|
|
119
|
+
</ClInclude>
|
|
120
|
+
<ClInclude Include="pch.h" />
|
|
121
|
+
<ClInclude Include="RCTPdfViewManager.h" />
|
|
122
|
+
<ClInclude Include="ReactPackageProvider.h">
|
|
123
|
+
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
|
124
|
+
</ClInclude>
|
|
125
|
+
</ItemGroup>
|
|
126
|
+
<ItemGroup>
|
|
127
|
+
<ClCompile Include="RCTPdfControl.cpp">
|
|
128
|
+
<DependentUpon>RCTPdfControl.xaml</DependentUpon>
|
|
129
|
+
<SubType>Code</SubType>
|
|
130
|
+
</ClCompile>
|
|
131
|
+
<ClCompile Include="pch.cpp">
|
|
132
|
+
<PrecompiledHeader>Create</PrecompiledHeader>
|
|
133
|
+
</ClCompile>
|
|
134
|
+
<ClCompile Include="RCTPdfViewManager.cpp" />
|
|
135
|
+
<ClCompile Include="ReactPackageProvider.cpp">
|
|
136
|
+
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
|
137
|
+
</ClCompile>
|
|
138
|
+
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
|
139
|
+
</ItemGroup>
|
|
140
|
+
<ItemGroup>
|
|
141
|
+
<Midl Include="RCTPdfControl.idl">
|
|
142
|
+
<DependentUpon>RCTPdfControl.xaml</DependentUpon>
|
|
143
|
+
<SubType>Code</SubType>
|
|
144
|
+
</Midl>
|
|
145
|
+
<Midl Include="ReactPackageProvider.idl" />
|
|
146
|
+
</ItemGroup>
|
|
147
|
+
<ItemGroup>
|
|
148
|
+
<None Include="RCTPdf.def" />
|
|
149
|
+
</ItemGroup>
|
|
150
|
+
<ItemGroup>
|
|
151
|
+
<None Include="packages.config" />
|
|
152
|
+
<None Include="PropertySheet.props" />
|
|
153
|
+
</ItemGroup>
|
|
154
|
+
<ItemGroup>
|
|
155
|
+
<Page Include="RCTPdfControl.xaml">
|
|
156
|
+
<SubType>Designer</SubType>
|
|
157
|
+
</Page>
|
|
158
|
+
</ItemGroup>
|
|
159
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
160
|
+
<ImportGroup Label="ReactNativeWindowsTargets">
|
|
161
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />
|
|
162
|
+
</ImportGroup>
|
|
163
|
+
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
|
|
164
|
+
<PropertyGroup>
|
|
165
|
+
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
|
|
166
|
+
</PropertyGroup>
|
|
167
|
+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" />
|
|
168
|
+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" />
|
|
169
|
+
</Target>
|
|
170
|
+
<ImportGroup Label="ExtensionTargets">
|
|
171
|
+
<Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
|
172
|
+
</ImportGroup>
|
|
173
|
+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
174
|
+
<PropertyGroup>
|
|
175
|
+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
|
176
|
+
</PropertyGroup>
|
|
177
|
+
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
|
178
|
+
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
|
179
|
+
</Target>
|
|
180
|
+
</Project>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<ItemGroup>
|
|
4
|
+
<Filter Include="Resources">
|
|
5
|
+
<UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
|
|
6
|
+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
7
|
+
</Filter>
|
|
8
|
+
<Filter Include="Generated Files">
|
|
9
|
+
<UniqueIdentifier>{926ab91d-31b5-48c3-b9a4-e681349f27f0}</UniqueIdentifier>
|
|
10
|
+
</Filter>
|
|
11
|
+
</ItemGroup>
|
|
12
|
+
<ItemGroup>
|
|
13
|
+
<ClCompile Include="pch.cpp" />
|
|
14
|
+
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
|
15
|
+
<ClCompile Include="ReactPackageProvider.cpp" />
|
|
16
|
+
<ClCompile Include="RCTPdf.cpp" />
|
|
17
|
+
<ClCompile Include="RCTPdfViewManager.cpp" />
|
|
18
|
+
</ItemGroup>
|
|
19
|
+
<ItemGroup>
|
|
20
|
+
<ClInclude Include="pch.h" />
|
|
21
|
+
<ClInclude Include="ReactPackageProvider.h" />
|
|
22
|
+
<ClInclude Include="RCTPdf.h" />
|
|
23
|
+
<ClInclude Include="RCTPdfViewManager.h" />
|
|
24
|
+
</ItemGroup>
|
|
25
|
+
<ItemGroup>
|
|
26
|
+
<None Include="RCTPdf.def" />
|
|
27
|
+
<None Include="packages.config" />
|
|
28
|
+
</ItemGroup>
|
|
29
|
+
<ItemGroup>
|
|
30
|
+
<None Include="PropertySheet.props" />
|
|
31
|
+
</ItemGroup>
|
|
32
|
+
<ItemGroup>
|
|
33
|
+
<Midl Include="ReactPackageProvider.idl" />
|
|
34
|
+
</ItemGroup>
|
|
35
|
+
<ItemGroup>
|
|
36
|
+
<Page Include="RCTPdfControl.xaml" />
|
|
37
|
+
</ItemGroup>
|
|
38
|
+
</Project>
|