Skip to content

Commit a4d8c3a

Browse files
author
PSPDFKit
committed
Release 2.5.1
1 parent c476007 commit a4d8c3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2059
-1759
lines changed

.eslintrc.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:react/recommended',
6+
'@react-native-community',
7+
],
8+
plugins: ['simple-import-sort'],
49
parserOptions: {
10+
ecmaVersion: 12,
11+
parser: '@babel/eslint-parser',
512
requireConfigFile: false,
13+
sourceType: 'module',
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
617
},
718
rules: {
8-
'react/no-string-refs': 'off',
9-
'no-alert': 'off',
19+
'react/no-string-refs': 0,
20+
'no-alert': 0,
21+
'simple-import-sort/imports': 2,
1022
},
1123
};

.tool-versions

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
## Newest Release
2+
3+
### 2.5.1 - 03 Apr 2023
4+
- Updated NativeCatalog configuration and replaced deprecated AppDelegate.m
5+
- Bumps PSPDFKit for Android version to 8.6.0
6+
7+
## Previous Releases
8+
9+
### 2.5.0 - 23 Mar 2023
210
- Added magic ink tool for Android annotation toolbar configuration. (#39174)
311
- Upgrades React Native dependencies and project configuration to 0.71.2
412
- Adds Instant JSON for React Native
13+
- Updates for PSPDFKit for Android 8.5.1
14+
- Updates for PSPDFKit for iOS 12.1.3
15+
- PSPDFKit now requires React Native 0.71.0 or later.
516

617
### 2.4.2 - 01 Feb 2023
718
- Fixes bug issue for deleting multiple annotations (#38518)
819
- Bump PSPDFKit for Android version to 8.5.0
920
- Bump PSPDFKit for iOS version to 12.0.3
1021
- Bump minimum SDK version compileSdkVersion to API 33
1122

12-
## Previous Releases
13-
1423
### 2.4.1 - 22 Nov 2022
1524
- Updates for PSPDFKit 12.0.1 for iOS.
1625
- Fixes Catalog example toolbar menu items not rendering. (#37368)

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Contains gradle configuration constants
1616
*/
1717
ext {
18-
PSPDFKIT_VERSION = 'SNAPSHOT'
18+
PSPDFKIT_VERSION = '8.6.0'
1919
}
2020

2121
buildscript {
@@ -38,7 +38,7 @@ apply plugin: 'com.android.library'
3838

3939
android {
4040
compileSdkVersion 33
41-
buildToolsVersion "30.0.2"
41+
buildToolsVersion "30.0.3"
4242

4343
defaultConfig {
4444
minSdkVersion 21

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['module:metro-react-native-babel-preset'],
3+
};

index.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class PSPDFKitView extends React.Component {
2828
}
2929
: null;
3030
return (
31-
// eslint-disable-next-line react/jsx-no-undef
3231
<RCTPSPDFKitView
3332
ref="pdfView"
3433
fragmentTag="PSPDFKitView.FragmentTag"
@@ -267,7 +266,7 @@ class PSPDFKitView extends React.Component {
267266
}
268267
};
269268

270-
removeAnnotations = function(annotations) {
269+
removeAnnotations = function (annotations) {
271270
if (Platform.OS === 'android') {
272271
let requestId = this._nextRequestId++;
273272
let requestMap = this._requestMap;
@@ -277,20 +276,20 @@ class PSPDFKitView extends React.Component {
277276
});
278277

279278
UIManager.dispatchViewManagerCommand(
280-
findNodeHandle(this.refs.pdfView),
281-
this._getViewManagerConfig('RCTPSPDFKitView').Commands.removeAnnotations,
282-
[requestId, annotations],
279+
findNodeHandle(this.refs.pdfView),
280+
this._getViewManagerConfig('RCTPSPDFKitView').Commands
281+
.removeAnnotations,
282+
[requestId, annotations],
283283
);
284284

285285
return promise;
286286
} else if (Platform.OS === 'ios') {
287287
return NativeModules.PSPDFKitViewManager.removeAnnotations(
288-
annotations,
289-
findNodeHandle(this.refs.pdfView),
288+
annotations,
289+
findNodeHandle(this.refs.pdfView),
290290
);
291291
}
292-
}
293-
292+
};
294293

295294
/**
296295
* Gets all unsaved changes to annotations.
@@ -756,7 +755,6 @@ PSPDFKitView.propTypes = {
756755
};
757756

758757
if (Platform.OS === 'ios' || Platform.OS === 'android') {
759-
// eslint-disable-next-line no-unused-vars
760758
var RCTPSPDFKitView = requireNativeComponent(
761759
'RCTPSPDFKitView',
762760
PSPDFKitView,

package.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-pspdfkit",
3-
"version": "2.4.2",
3+
"version": "2.5.1",
44
"description": "React Native PDF Library by PSPDFKit",
55
"keywords": [
66
"react native",
@@ -22,33 +22,35 @@
2222
"lint": "eslint --ext .js,.jsx,.ts,.tsx ./*.js"
2323
},
2424
"peerDependencies": {
25-
"prop-types": "^15.8.1",
26-
"react": "18.2.0",
27-
"react-native": "^0.71.1",
2825
"cacheable-request": "^10.2.7",
26+
"decode-uri-component": "^0.2.1",
2927
"http-cache-semantics": "^4.1.1",
30-
"ua-parser-js": "^1.0.33",
3128
"json5": "^2.2.2",
3229
"minimatch": "^3.0.5",
33-
"decode-uri-component": "^0.2.1"
30+
"prop-types": "^15.8.1",
31+
"react": "18.2.0",
32+
"react-native": "^0.71.1",
33+
"ua-parser-js": "^1.0.33"
3434
},
3535
"devDependencies": {
36-
"@babel/core": "^7.19.6",
37-
"@babel/runtime": "^7.19.4",
38-
"@react-native-community/eslint-config": "^3.1.0",
39-
"babel-jest": "^29.2.2",
40-
"eslint": "^8.26.0",
41-
"jest": "^29.2.2",
42-
"metro-react-native-babel-preset": "^0.73.2",
43-
"react-native-codegen": "^0.70.6",
44-
"prettier": "^2.7.1",
45-
"eslint-plugin-ft-flow":"^2.0.1",
46-
"@tsconfig/react-native": "^2.0.2",
47-
"@types/jest": "^29.2.1",
48-
"@types/react": "^18.0.24",
36+
"@babel/core": "^7.21.4",
37+
"@babel/eslint-parser": "^7.21.3",
38+
"@babel/runtime": "^7.21.0",
39+
"@react-native-community/eslint-config": "^3.2.0",
40+
"@tsconfig/react-native": "^2.0.3",
41+
"@types/jest": "^29.5.0",
42+
"@types/react": "^18.0.33",
4943
"@types/react-test-renderer": "^18.0.0",
44+
"babel-jest": "^29.5.0",
45+
"eslint": "^8.37.0",
46+
"eslint-plugin-ft-flow": "^2.0.3",
47+
"eslint-plugin-simple-import-sort": "^10.0.0",
48+
"jest": "^29.5.0",
49+
"metro-react-native-babel-preset": "^0.76.1",
50+
"prettier": "^2.8.7",
51+
"react-native-codegen": "^0.71.5",
5052
"react-test-renderer": "18.2.0",
51-
"typescript": "4.8.4"
53+
"typescript": "5.0.3"
5254
},
5355
"jest": {
5456
"preset": "react-native",

samples/Catalog/Catalog.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@
77
//
88

99
// Imports
10-
import React, { Component } from 'react';
1110
import { NavigationContainer } from '@react-navigation/native';
1211
import { createStackNavigator } from '@react-navigation/stack';
12+
import React, { Component } from 'react';
1313

14-
import { PSPDFKitViewComponent } from './examples/PSPDFKitViewComponent';
15-
import { OpenImageDocument } from './examples/OpenImageDocument';
16-
import { SaveAs } from './examples/SaveAs';
17-
import { ManualSave } from './examples/ManualSave';
18-
import { EventListeners } from './examples/EventListeners';
19-
import { StateChange } from './examples/StateChange';
2014
import { AnnotationProcessing } from './examples/AnnotationProcessing';
21-
import { ProgrammaticAnnotations } from './examples/ProgrammaticAnnotations';
22-
import { ProgrammaticFormFilling } from './examples/ProgrammaticFormFilling';
23-
import { SplitPDF } from './examples/SplitPDF';
24-
import { ToolbarCustomization } from './examples/ToolbarCustomization';
25-
import { HiddenToolbar } from './examples/HiddenToolbar';
2615
import { CustomFontPicker } from './examples/CustomFontPicker';
16+
import { EventListeners } from './examples/EventListeners';
2717
import { GeneratePDF } from './examples/GeneratePDF';
28-
import HomeScreen from './examples/HomeScreen';
2918
import GeneratePDFMenu from './examples/GeneratePDFMenu';
19+
import { HiddenToolbar } from './examples/HiddenToolbar';
20+
import HomeScreen from './examples/HomeScreen';
3021
import InstantSynchronization from './examples/InstantSynchronization';
22+
import { ManualSave } from './examples/ManualSave';
23+
import { OpenImageDocument } from './examples/OpenImageDocument';
24+
import { ProgrammaticAnnotations } from './examples/ProgrammaticAnnotations';
25+
import { ProgrammaticFormFilling } from './examples/ProgrammaticFormFilling';
26+
import { PSPDFKitViewComponent } from './examples/PSPDFKitViewComponent';
27+
import { SaveAs } from './examples/SaveAs';
28+
import { SplitPDF } from './examples/SplitPDF';
29+
import { StateChange } from './examples/StateChange';
30+
import { ToolbarCustomization } from './examples/ToolbarCustomization';
3131
import { PSPDFKit } from './helpers/PSPDFKit';
3232

3333
// By default, this example doesn't set a license key, but instead runs in trial mode (which is the default, and which requires no

samples/Catalog/ExamplesNavigationMenu.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { NativeModules, Platform } from 'react-native';
2-
import { extractFromAssetsIfMissing } from './helpers/FileSystemHelpers';
2+
33
import {
44
exampleDocumentName,
55
exampleDocumentPath,
6-
tiffImagePath,
76
exampleImagePath,
7+
tiffImagePath,
88
} from './configuration/Constants';
9-
import { PSPDFKit } from './helpers/PSPDFKit';
109
import exampleDocumentConfiguration, {
1110
tiffImageConfiguration,
1211
} from './helpers/ExampleDocumentConfiguration';
@@ -16,7 +15,9 @@ import {
1615
fileExists,
1716
getOutputPath,
1817
} from './helpers/FileHelper';
18+
import { extractFromAssetsIfMissing } from './helpers/FileSystemHelpers';
1919
import { getMainBundlePath } from './helpers/ImageHelper';
20+
import { PSPDFKit } from './helpers/PSPDFKit';
2021

2122
const { RNProcessor: Processor } = NativeModules;
2223

samples/Catalog/android/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.pspdfkit.rn">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<uses-permission android:name="android.permission.INTERNET" />
54

65
<application
7-
android:name=".MainApplication"
8-
android:label="@string/app_name"
9-
android:icon="@mipmap/ic_launcher"
10-
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
6+
android:name=".MainApplication"
7+
android:label="@string/app_name"
8+
android:icon="@mipmap/ic_launcher"
9+
android:allowBackup="false"
10+
android:theme="@style/AppTheme"
11+
>
1212
<activity
13-
android:name=".MainActivity"
14-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
15-
android:launchMode="singleTask"
16-
android:windowSoftInputMode="adjustResize"
17-
android:exported="true">
13+
android:name=".MainActivity"
14+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
15+
android:launchMode="singleTask"
16+
android:windowSoftInputMode="adjustResize"
17+
android:exported="true"
18+
>
1819
<intent-filter>
1920
<action android:name="android.intent.action.MAIN" />
2021
<category android:name="android.intent.category.LAUNCHER" />

0 commit comments

Comments
 (0)