Skip to content

Commit 7ca8638

Browse files
authored
Update wrapper to PSPSDFKit for Windows 2.0 (#223)
Update references Make JsonUtils compatible. update all nuget versions. removed alert from library search example as this is more than fast enough now.
1 parent 557898d commit 7ca8638

File tree

7 files changed

+16
-26
lines changed

7 files changed

+16
-26
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-pspdfkit",
3-
"version": "1.23.12",
3+
"version": "1.23.13",
44
"description": "A React Native module for the PSPDFKit library.",
55
"keywords": [
66
"react native",

samples/Catalog/Catalog.windows.js

-10
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ const examples = [
134134
action: async () => {
135135
await PSPDFKitLibrary.OpenLibrary("MyLibrary");
136136
await PSPDFKitLibrary.EnqueueDocumentsInFolderPicker("MyLibrary");
137-
alert(
138-
'Searching Library for "' +
139-
simpleSearch.searchString +
140-
'". Please wait.'
141-
);
142137
PSPDFKitLibrary.SearchLibrary("MyLibrary", simpleSearch)
143138
.then(result => {
144139
alert("Search : \n" + JSON.stringify(result));
@@ -155,11 +150,6 @@ const examples = [
155150

156151
await PSPDFKitLibrary.OpenLibrary("AssetsLibrary");
157152
await PSPDFKitLibrary.EnqueueDocumentsInFolder("AssetsLibrary", path);
158-
alert(
159-
'Searching Library for "' +
160-
complexSearchConfiguration.searchString +
161-
'". Please wait.'
162-
);
163153
PSPDFKitLibrary.SearchLibrary("AssetsLibrary", complexSearchConfiguration)
164154
.then(result => {
165155
alert("Search : \n" + JSON.stringify(result));

samples/Catalog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Catalog",
3-
"version": "1.23.12",
3+
"version": "1.23.13",
44
"private": true,
55
"scripts": {
66
"start": "node node_modules/react-native/local-cli/cli.js start"

samples/Catalog/windows/Catalog/Catalog.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
1414
<TargetPlatformVersion>10.0.17134.0</TargetPlatformVersion>
15-
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
15+
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<FileAlignment>512</FileAlignment>
1818
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -246,7 +246,7 @@
246246
</ItemGroup>
247247
<ItemGroup>
248248
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
249-
<Version>6.0.8</Version>
249+
<Version>6.2.8</Version>
250250
</PackageReference>
251251
</ItemGroup>
252252
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
@@ -263,7 +263,7 @@
263263
<SDKReference Include="Microsoft.VCLibs, Version=14.0">
264264
<Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
265265
</SDKReference>
266-
<SDKReference Include="PSPDFKitSDK, Version=1.12.0">
266+
<SDKReference Include="PSPDFKitSDK, Version=2.0.0">
267267
<Name>PSPDFKit for UWP</Name>
268268
</SDKReference>
269269
</ItemGroup>

windows/ReactNativePSPDFKit/ReactNativePSPDFKit/JsonUtils.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ internal static JToken SearchResultsToJson(IDictionary<string, LibraryQueryResul
108108
return queryResultsJson;
109109
}
110110

111-
private static JToken RangeToJson(IRange range)
111+
private static JToken RangeToJson(Range range)
112112
{
113113
return new JObject
114114
{
@@ -117,9 +117,9 @@ private static JToken RangeToJson(IRange range)
117117
};
118118
}
119119

120-
private static IRange ToRange(JToken rangeJson)
120+
private static Range ToRange(JToken rangeJson)
121121
{
122-
return new Range(rangeJson.Value<int>("postion"), rangeJson.Value<int>("length"));
122+
return new Range(rangeJson.Value<int>("position"), rangeJson.Value<int>("length"));
123123
}
124124

125125
private static JArray LibraryQueryReultToJson(LibraryQueryResult libraryQueryResult)

windows/ReactNativePSPDFKit/ReactNativePSPDFKit/ReactNativePSPDFKit.csproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
1414
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17134.0</TargetPlatformVersion>
15-
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
15+
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<FileAlignment>512</FileAlignment>
1818
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -122,23 +122,23 @@
122122
</ItemGroup>
123123
<ItemGroup>
124124
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
125-
<Version>6.0.8</Version>
125+
<Version>6.2.8</Version>
126126
</PackageReference>
127127
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
128-
<Version>4.0.0</Version>
128+
<Version>5.1.1</Version>
129129
</PackageReference>
130130
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
131-
<Version>2.0.0</Version>
131+
<Version>2.0.1</Version>
132132
</PackageReference>
133133
<PackageReference Include="Newtonsoft.Json">
134-
<Version>11.0.2</Version>
134+
<Version>12.0.2</Version>
135135
</PackageReference>
136136
</ItemGroup>
137137
<ItemGroup>
138138
<SDKReference Include="Microsoft.VCLibs, Version=14.0">
139139
<Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
140140
</SDKReference>
141-
<SDKReference Include="PSPDFKitSDK, Version=1.12.0">
141+
<SDKReference Include="PSPDFKitSDK, Version=2.0.0">
142142
<Name>PSPDFKit for UWP</Name>
143143
</SDKReference>
144144
</ItemGroup>
@@ -169,4 +169,4 @@
169169
<Target Name="AfterBuild">
170170
</Target>
171171
-->
172-
</Project>
172+
</Project>

0 commit comments

Comments
 (0)