diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index e5808ddb..731dab74 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -462,7 +462,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- -## clipper (http://www.angusj.com/delphi/clipper.php) +## clipper2 (http://www.angusj.com/delphi/clipper.php) Boost Software License - Version 1.0 - August 17th, 2003 @@ -488,6 +488,7 @@ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + -------------------------------------------------------------------------------- ## cppformat (https://github.com/cppformat/cppformat) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db35a80..a77af94e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,18 @@ ## Newest Release +### 2.4.2 - 01 Feb 2023 +- Fixes bug issue for deleting multiple annotations (#38518) +- Bump PSPDFKit for Android version to 8.5.0 +- Bump PSPDFKit for iOS version to 12.0.3 +- Bump minimum SDK version compileSdkVersion to API 33 + +## Previous Releases + ### 2.4.1 - 22 Nov 2022 - Updates for PSPDFKit 12.0.1 for iOS. - Fixes Catalog example toolbar menu items not rendering. (#37368) - Fixes the Annotation Processing Catalog example. (#37534) -## Previous Releases - ### 2.4.0 - 25 Oct 2022 - Adds PDF generation from HTML, images and template. (#36736) diff --git a/LICENSE b/LICENSE index a074978e..55a90bb5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -All items and source code Copyright © 2010-2022 PSPDFKit GmbH. +All items and source code Copyright © 2010-2023 PSPDFKit GmbH. PSPDFKit is a commercial product and requires a license to be used. diff --git a/README.md b/README.md index 691e5c15..b96e4710 100644 --- a/README.md +++ b/README.md @@ -692,6 +692,6 @@ For Troubleshooting common issues you might encounter when setting up PSPDFKit f ## License This project can be used for evaluation or if you have a valid PSPDFKit license. -All items and source code Copyright © 2010-2022 PSPDFKit GmbH. +All items and source code Copyright © 2010-2023 PSPDFKit GmbH. See [LICENSE](./LICENSE) for details. diff --git a/android/.classpath b/android/.classpath index 993fef6c..4a04201c 100644 --- a/android/.classpath +++ b/android/.classpath @@ -1,6 +1,6 @@ - + diff --git a/android/build.gradle b/android/build.gradle index 27f26111..cf034b7b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -15,7 +15,7 @@ * Contains gradle configuration constants */ ext { - PSPDFKIT_VERSION = '8.4.1' + PSPDFKIT_VERSION = '8.5.0' } buildscript { @@ -46,7 +46,7 @@ android { versionCode 1 versionName "1.0" } - + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 6f5cb732..88b78f67 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -4,7 +4,7 @@ ~ ~ PSPDFKit ~ - ~ Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + ~ Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. ~ ~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW ~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java b/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java index b3e517f7..72c3fbc9 100644 --- a/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java +++ b/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/MainActivity.java b/android/src/main/java/com/pspdfkit/react/MainActivity.java index 8c249b18..03177571 100644 --- a/android/src/main/java/com/pspdfkit/react/MainActivity.java +++ b/android/src/main/java/com/pspdfkit/react/MainActivity.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/MainApplication.java b/android/src/main/java/com/pspdfkit/react/MainApplication.java index 32de83c2..fab40d55 100644 --- a/android/src/main/java/com/pspdfkit/react/MainApplication.java +++ b/android/src/main/java/com/pspdfkit/react/MainApplication.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java b/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java index b4f38336..4a063611 100644 --- a/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java +++ b/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java b/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java index 54b626ec..d02532c6 100644 --- a/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java +++ b/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/RNProcessor.java b/android/src/main/java/com/pspdfkit/react/RNProcessor.java index 600ff2d9..77755e1c 100644 --- a/android/src/main/java/com/pspdfkit/react/RNProcessor.java +++ b/android/src/main/java/com/pspdfkit/react/RNProcessor.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java b/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java index 4dd98a2a..53ff53b9 100644 --- a/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java +++ b/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -60,10 +60,11 @@ public class ReactPdfViewManager extends ViewGroupManager { public static final int COMMAND_ADD_ANNOTATIONS = 7; public static final int COMMAND_GET_FORM_FIELD_VALUE = 8; public static final int COMMAND_SET_FORM_FIELD_VALUE = 9; - public static final int COMMAND_REMOVE_ANNOTATION = 10; public static final int COMMAND_GET_ALL_ANNOTATIONS = 11; + public static final int COMMAND_REMOVE_ANNOTATION = 10; public static final int COMMAND_REMOVE_FRAGMENT = 12; public static final int COMMAND_SET_TOOLBAR_MENU_ITEMS = 13; + public static final int COMMAND_REMOVE_ANNOTATIONS = 14; private CompositeDisposable annotationDisposables = new CompositeDisposable(); @@ -106,6 +107,7 @@ public Map getCommandsMap() { commandMap.put("getFormFieldValue", COMMAND_GET_FORM_FIELD_VALUE); commandMap.put("setFormFieldValue", COMMAND_SET_FORM_FIELD_VALUE); commandMap.put("removeAnnotation", COMMAND_REMOVE_ANNOTATION); + commandMap.put("removeAnnotations", COMMAND_REMOVE_ANNOTATIONS); commandMap.put("getAllAnnotations", COMMAND_GET_ALL_ANNOTATIONS); commandMap.put("removeFragment", COMMAND_REMOVE_FRAGMENT); commandMap.put("setToolbarMenuItems", COMMAND_SET_TOOLBAR_MENU_ITEMS); @@ -249,6 +251,17 @@ public void accept(List annotations) { annotationDisposables.add(root.removeAnnotation(requestId, args.getMap(1))); } break; + case COMMAND_REMOVE_ANNOTATIONS: + if(args != null && args.size() == 2) { + final int requestId = args.getInt(0); + final ReadableArray annotations = args.getArray(1); + final int length = annotations.size(); + for (int i = 0; i < length; i++) { + ReadableMap annotation = annotations.getMap(i); + annotationDisposables.add(root.removeAnnotation(requestId, annotation)); + } + } + break; case COMMAND_GET_ALL_UNSAVED_ANNOTATIONS: if (args != null) { final int requestId = args.getInt(0); @@ -294,7 +307,7 @@ public void accept(JSONObject jsonObject) { } break; case COMMAND_REMOVE_FRAGMENT: - // Removing a fragment like this is not recommended, but it can be used as a workaround + // Removing a fragment like this is not recommended, but it can be used as a workaround // to stop `react-native-screens` from crashing the App when the back button is pressed. root.removeFragment(true); break; diff --git a/android/src/main/java/com/pspdfkit/react/TestingModule.java b/android/src/main/java/com/pspdfkit/react/TestingModule.java index a4fcff7d..398186c3 100644 --- a/android/src/main/java/com/pspdfkit/react/TestingModule.java +++ b/android/src/main/java/com/pspdfkit/react/TestingModule.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java b/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java index 861f771a..2fe999b4 100644 --- a/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java +++ b/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2022-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java index 7500399c..0c191004 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java index b83ccd98..8f43df74 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java index 8130af11..80fec444 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -21,6 +21,7 @@ import com.facebook.react.uimanager.events.Event; import com.facebook.react.uimanager.events.RCTEventEmitter; import com.pspdfkit.annotations.Annotation; +import com.pspdfkit.annotations.AnnotationType; import com.pspdfkit.react.helper.JsonUtilities; import org.json.JSONException; @@ -46,6 +47,9 @@ public PdfViewDataReturnedEvent(@IdRes int viewId, int requestId, @NonNull List< try { List> annotationsSerialized = new ArrayList<>(); for (Annotation annotation : annotationsToSerialize) { + if (annotation.getType() == AnnotationType.POPUP) { + continue; + } JSONObject instantJson = new JSONObject(annotation.toInstantJson()); annotationsSerialized.add(JsonUtilities.jsonObjectToMap(instantJson)); } diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentLoadFailedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentLoadFailedEvent.java index 81e215d9..13541b99 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentLoadFailedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentLoadFailedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSaveFailedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSaveFailedEvent.java index 3456add0..c2c1e8cc 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSaveFailedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSaveFailedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSavedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSavedEvent.java index 83c5ad8a..2c2b5275 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSavedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewDocumentSavedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewNavigationButtonClickedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewNavigationButtonClickedEvent.java index 22a07553..8fbce541 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewNavigationButtonClickedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewNavigationButtonClickedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewStateChangedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewStateChangedEvent.java index 1db73bc4..290184ae 100644 --- a/android/src/main/java/com/pspdfkit/react/events/PdfViewStateChangedEvent.java +++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewStateChangedEvent.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/helper/ColorHelper.java b/android/src/main/java/com/pspdfkit/react/helper/ColorHelper.java index a4ce8ac7..5b2a6b64 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/ColorHelper.java +++ b/android/src/main/java/com/pspdfkit/react/helper/ColorHelper.java @@ -5,7 +5,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java b/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java index dd576770..2b4b6a10 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java +++ b/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -25,48 +25,61 @@ public static EnumSet getAnnotationTypeFromString(@Nullable fina if (type == null || "all".equalsIgnoreCase(type)) { return EnumSet.allOf(AnnotationType.class); } - if ("pspdfkit/ink".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.INK); - } - if ("pspdfkit/link".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.LINK); - } - if ("pspdfkit/markup/highlight".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.HIGHLIGHT); - } - if ("pspdfkit/markup/squiggly".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.SQUIGGLY); - } - if ("pspdfkit/markup/strikeout".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.STRIKEOUT); - } - if ("pspdfkit/markup/underline".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.UNDERLINE); - } - if ("pspdfkit/note".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.NOTE); - } - if ("pspdfkit/shape/ellipse".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.CIRCLE); - } - if ("pspdfkit/shape/line".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.LINE); - } - if ("pspdfkit/shape/polygon".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.POLYGON); - } - if ("pspdfkit/shape/polyline".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.POLYLINE); - } - if ("pspdfkit/shape/rectangle".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.SQUARE); - } - if ("pspdfkit/text".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.FREETEXT); - } - if ("pspdfkit/stamp".equalsIgnoreCase(type)) { - return EnumSet.of(AnnotationType.STAMP); + + switch (type.toLowerCase()) { + case "pspdfkit/link": + return EnumSet.of(AnnotationType.LINK); + case "pspdfkit/ink": + return EnumSet.of(AnnotationType.INK); + case "pspdfkit/markup/highlight": + return EnumSet.of(AnnotationType.HIGHLIGHT); + case "pspdfkit/image": + case "pspdfkit/stamp": + return EnumSet.of(AnnotationType.STAMP); + case "pspdfkit/markup/squiggly": + return EnumSet.of(AnnotationType.SQUIGGLY); + case "pspdfkit/markup/strikeout": + return EnumSet.of(AnnotationType.STRIKEOUT); + case "pspdfkit/markup/underline": + return EnumSet.of(AnnotationType.UNDERLINE); + case "pspdfkit/note": + return EnumSet.of(AnnotationType.NOTE); + case "pspdfkit/shape/ellipse": + return EnumSet.of(AnnotationType.CIRCLE); + case "pspdfkit/shape/line": + return EnumSet.of(AnnotationType.LINE); + case "pspdfkit/shape/polygon": + return EnumSet.of(AnnotationType.POLYGON); + case "pspdfkit/shape/polyline": + return EnumSet.of(AnnotationType.POLYLINE); + case "pspdfkit/shape/rectangle": + return EnumSet.of(AnnotationType.SQUARE); + case "pspdfkit/caret": + return EnumSet.of(AnnotationType.CARET); + case "pspdfkit/text": + return EnumSet.of(AnnotationType.FREETEXT); + case "pspdfkit/richmedia": + return EnumSet.of(AnnotationType.RICHMEDIA); + case "pspdfkit/widget": + return EnumSet.of(AnnotationType.WIDGET); + case "pspdfkit/watermark": + return EnumSet.of(AnnotationType.WATERMARK); + case "pspdfkit/file": + return EnumSet.of(AnnotationType.FILE); + case "pspdfkit/sound": + return EnumSet.of(AnnotationType.SOUND); + case "pspdfkit/popup": + return EnumSet.of(AnnotationType.POPUP); + case "pspdfkit/trapnet": + return EnumSet.of(AnnotationType.TRAPNET); + case "pspdfkit/type3d": + return EnumSet.of(AnnotationType.TYPE3D); + case "pspdfkit/redact": + return EnumSet.of(AnnotationType.REDACT); + + case "all": + default: + return EnumSet.allOf(AnnotationType.class); } - return EnumSet.noneOf(AnnotationType.class); } } diff --git a/android/src/main/java/com/pspdfkit/react/helper/DocumentJsonDataProvider.java b/android/src/main/java/com/pspdfkit/react/helper/DocumentJsonDataProvider.java index 4bce606e..f341a6aa 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/DocumentJsonDataProvider.java +++ b/android/src/main/java/com/pspdfkit/react/helper/DocumentJsonDataProvider.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/helper/JsonUtilities.java b/android/src/main/java/com/pspdfkit/react/helper/JsonUtilities.java index 8f7572f6..e1066215 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/JsonUtilities.java +++ b/android/src/main/java/com/pspdfkit/react/helper/JsonUtilities.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/helper/RNConfigurationHelper.java b/android/src/main/java/com/pspdfkit/react/helper/RNConfigurationHelper.java index 3dcf6eab..bc86bf7a 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/RNConfigurationHelper.java +++ b/android/src/main/java/com/pspdfkit/react/helper/RNConfigurationHelper.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/helper/RNFileHelper.java b/android/src/main/java/com/pspdfkit/react/helper/RNFileHelper.java index 46b24f6f..144cb77a 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/RNFileHelper.java +++ b/android/src/main/java/com/pspdfkit/react/helper/RNFileHelper.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/react/menu/ReactGroupingRule.java b/android/src/main/java/com/pspdfkit/react/menu/ReactGroupingRule.java index 43e5495d..9d06eb60 100644 --- a/android/src/main/java/com/pspdfkit/react/menu/ReactGroupingRule.java +++ b/android/src/main/java/com/pspdfkit/react/menu/ReactGroupingRule.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/views/PdfView.java b/android/src/main/java/com/pspdfkit/views/PdfView.java index 748d62a5..3b076818 100644 --- a/android/src/main/java/com/pspdfkit/views/PdfView.java +++ b/android/src/main/java/com/pspdfkit/views/PdfView.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/views/PdfViewDocumentListener.java b/android/src/main/java/com/pspdfkit/views/PdfViewDocumentListener.java index 906d5500..73cacc81 100644 --- a/android/src/main/java/com/pspdfkit/views/PdfViewDocumentListener.java +++ b/android/src/main/java/com/pspdfkit/views/PdfViewDocumentListener.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/views/PdfViewModeController.java b/android/src/main/java/com/pspdfkit/views/PdfViewModeController.java index fbab084b..fe25f944 100644 --- a/android/src/main/java/com/pspdfkit/views/PdfViewModeController.java +++ b/android/src/main/java/com/pspdfkit/views/PdfViewModeController.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/views/ReactMainToolbar.java b/android/src/main/java/com/pspdfkit/views/ReactMainToolbar.java index c23242af..d025a307 100644 --- a/android/src/main/java/com/pspdfkit/views/ReactMainToolbar.java +++ b/android/src/main/java/com/pspdfkit/views/ReactMainToolbar.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/java/com/pspdfkit/views/ReactPdfUiFragment.java b/android/src/main/java/com/pspdfkit/views/ReactPdfUiFragment.java index 9c9b1850..3071fcf1 100644 --- a/android/src/main/java/com/pspdfkit/views/ReactPdfUiFragment.java +++ b/android/src/main/java/com/pspdfkit/views/ReactPdfUiFragment.java @@ -3,7 +3,7 @@ * * PSPDFKit * - * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/res/drawable/pspdf__ic_navigation_arrow.xml b/android/src/main/res/drawable/pspdf__ic_navigation_arrow.xml index a803a903..9ccd340f 100644 --- a/android/src/main/res/drawable/pspdf__ic_navigation_arrow.xml +++ b/android/src/main/res/drawable/pspdf__ic_navigation_arrow.xml @@ -3,7 +3,7 @@ ~ ~ PSPDFKit ~ - ~ Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + ~ Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. ~ ~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW ~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/res/layout/pspdf__toolbar_main.xml b/android/src/main/res/layout/pspdf__toolbar_main.xml index e9d3c000..77564b3b 100644 --- a/android/src/main/res/layout/pspdf__toolbar_main.xml +++ b/android/src/main/res/layout/pspdf__toolbar_main.xml @@ -3,7 +3,7 @@ ~ ~ PSPDFKit ~ - ~ Copyright © 2014-2022 PSPDFKit GmbH. All rights reserved. + ~ Copyright © 2014-2023 PSPDFKit GmbH. All rights reserved. ~ ~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW ~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/android/src/main/res/values/attrs.xml b/android/src/main/res/values/attrs.xml index bf940e50..f96922e0 100644 --- a/android/src/main/res/values/attrs.xml +++ b/android/src/main/res/values/attrs.xml @@ -4,7 +4,7 @@ ~ ~ PSPDFKit ~ - ~ Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. + ~ Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. ~ ~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW ~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/index.js b/index.js index 879f47e4..4443c191 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -267,6 +267,31 @@ class PSPDFKitView extends React.Component { } }; + removeAnnotations = function(annotations) { + if (Platform.OS === 'android') { + let requestId = this._nextRequestId++; + let requestMap = this._requestMap; + // We create a promise here that will be resolved once onDataReturned is called. + let promise = new Promise(function (resolve, reject) { + requestMap[requestId] = { resolve: resolve, reject: reject }; + }); + + UIManager.dispatchViewManagerCommand( + findNodeHandle(this.refs.pdfView), + this._getViewManagerConfig('RCTPSPDFKitView').Commands.removeAnnotations, + [requestId, annotations], + ); + + return promise; + } else if (Platform.OS === 'ios') { + return NativeModules.PSPDFKitViewManager.removeAnnotations( + annotations, + findNodeHandle(this.refs.pdfView), + ); + } + } + + /** * Gets all unsaved changes to annotations. * diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.h b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.h index 3fbfee23..b08928ee 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.h @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m index 066529da..373e5fc2 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -27,44 +27,51 @@ @implementation RCTConvert (PSPDFAnnotation) [annotationsJSON addObject:@{@"uuid" : annotation.uuid, @"name" : annotation.name ?: [NSNull null], @"creatorName" : annotation.user ?: [NSNull null]}]; } } - + return [annotationsJSON copy]; } + (PSPDFAnnotationType)annotationTypeFromInstantJSONType:(NSString *)type { - if (!type) { - return PSPDFAnnotationTypeAll; - } else if ([type isEqualToString:@"pspdfkit/ink"]) { - return PSPDFAnnotationTypeInk; - } else if ([type isEqualToString:@"pspdfkit/link"]) { - return PSPDFAnnotationTypeLink; - } else if ([type isEqualToString:@"pspdfkit/markup/highlight"]) { - return PSPDFAnnotationTypeHighlight; - } else if ([type isEqualToString:@"pspdfkit/markup/squiggly"]) { - return PSPDFAnnotationTypeSquiggly; - } else if ([type isEqualToString:@"pspdfkit/markup/strikeout"]) { - return PSPDFAnnotationTypeStrikeOut; - } else if ([type isEqualToString:@"pspdfkit/markup/underline"]) { - return PSPDFAnnotationTypeUnderline; - } else if ([type isEqualToString:@"pspdfkit/note"]) { - return PSPDFAnnotationTypeNote; - } else if ([type isEqualToString:@"pspdfkit/shape/ellipse"]) { - return PSPDFAnnotationTypeCircle; - } else if ([type isEqualToString:@"pspdfkit/shape/line"]) { - return PSPDFAnnotationTypeLine; - } else if ([type isEqualToString:@"pspdfkit/shape/polygon"]) { - return PSPDFAnnotationTypePolygon; - } else if ([type isEqualToString:@"pspdfkit/shape/polyline"]) { - return PSPDFAnnotationTypePolyLine; - } else if ([type isEqualToString:@"pspdfkit/shape/rectangle"]) { - return PSPDFAnnotationTypeSquare; - } else if ([type isEqualToString:@"pspdfkit/text"]) { - return PSPDFAnnotationTypeFreeText; - } else if ([type isEqualToString:@"pspdfkit/stamp"]) { - return PSPDFAnnotationTypeStamp; - } else { - return PSPDFAnnotationTypeUndefined; - } + + if (!type) { + return PSPDFAnnotationTypeAll; + } + + NSDictionary* annotationTypes = @{ + @"all": @(PSPDFAnnotationTypeAll), + @"pspdfkit/ink": @(PSPDFAnnotationTypeInk), + @"pspdfkit/link": @(PSPDFAnnotationTypeLink), + @"pspdfkit/markup/highlight": @(PSPDFAnnotationTypeHighlight), + @"pspdfkit/markup/squiggly": @(PSPDFAnnotationTypeSquiggly), + @"pspdfkit/markup/strikeout": @(PSPDFAnnotationTypeStrikeOut), + @"pspdfkit/markup/underline":@(PSPDFAnnotationTypeUnderline), + @"pspdfkit/note":@(PSPDFAnnotationTypeNote), + @"pspdfkit/shape/ellipse": @(PSPDFAnnotationTypeCircle), + @"pspdfkit/shape/line":@(PSPDFAnnotationTypeLine), + @"pspdfkit/shape/polygon":@(PSPDFAnnotationTypePolygon), + @"pspdfkit/shape/polyline":@(PSPDFAnnotationTypePolyLine), + @"pspdfkit/shape/rectangle":@(PSPDFAnnotationTypeSquare), + @"pspdfkit/text":@(PSPDFAnnotationTypeFreeText), + @"pspdfkit/stamp":@(PSPDFAnnotationTypeStamp), + @"pspdfkit/image":@(PSPDFAnnotationTypeStamp), + @"pspdfkit/caret":@(PSPDFAnnotationTypeCaret), + @"pspdfkit/richmedia":@(PSPDFAnnotationTypeRichMedia), + @"pspdfkit/widget":@(PSPDFAnnotationTypeWidget), + @"pspdfkit/watermark":@(PSPDFAnnotationTypeWatermark), + @"pspdfkit/file":@(PSPDFAnnotationTypeFile), + @"pspdfkit/sound":@(PSPDFAnnotationTypeSound), + @"pspdfkit/popup":@(PSPDFAnnotationTypePopup), + @"pspdfkit/trapnet":@(PSPDFAnnotationTypeTrapNet), + @"pspdfkit/type3d":@(PSPDFAnnotationTypeThreeDimensional), + @"pspdfkit/redact":@(PSPDFAnnotationTypeRedaction), + }; + + // Return undefined type, if submitted type is not supported + if(![[annotationTypes allKeys] containsObject: type.lowercaseString]) { + return PSPDFAnnotationTypeUndefined; + } + + return (unsigned long) annotationTypes[type.lowercaseString]; } @end diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.h b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.h index daa48cc9..f4a1f9d9 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.h @@ -1,5 +1,5 @@ // -// Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.m index eb21fc6d..a9c4a3a2 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationChange.m @@ -1,5 +1,5 @@ // -// Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.h b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.h index e5447efe..82268421 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.h @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.m index aa658756..fbdb18c6 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.m @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.h b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.h index 50e4be42..42276192 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.h @@ -1,5 +1,5 @@ // -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m index 31aaa9d2..fb39f9cf 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m @@ -1,5 +1,5 @@ // -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.h b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.h index 814ce3fd..db98807d 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.h @@ -1,5 +1,5 @@ // -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.m index f8e9a1b4..06a4d767 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFDocument.m @@ -1,5 +1,5 @@ // -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.h b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.h index b4662567..a3a8b53a 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.h @@ -1,5 +1,5 @@ // -// Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.m index b193334a..c4422cae 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFViewMode.m @@ -1,5 +1,5 @@ // -// Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.h b/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.h index 44948f9f..d87f9bb9 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.h +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.h @@ -1,5 +1,5 @@ // -// Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m b/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m index ac12aa5c..c066718a 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m @@ -1,5 +1,5 @@ // -// Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKit-Bridging-Header.h b/ios/RCTPSPDFKit/RCTPSPDFKit-Bridging-Header.h index 79e5bb91..27453aea 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKit-Bridging-Header.h +++ b/ios/RCTPSPDFKit/RCTPSPDFKit-Bridging-Header.h @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitManager.h b/ios/RCTPSPDFKit/RCTPSPDFKitManager.h index 0e82f15a..574f6e57 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitManager.h +++ b/ios/RCTPSPDFKit/RCTPSPDFKitManager.h @@ -1,5 +1,5 @@ // -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitManager.m b/ios/RCTPSPDFKit/RCTPSPDFKitManager.m index 9786db33..2f15806f 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitManager.m +++ b/ios/RCTPSPDFKit/RCTPSPDFKitManager.m @@ -1,5 +1,5 @@ // -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitView.h b/ios/RCTPSPDFKit/RCTPSPDFKitView.h index 4573c24a..060a0495 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitView.h +++ b/ios/RCTPSPDFKit/RCTPSPDFKitView.h @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitView.m b/ios/RCTPSPDFKit/RCTPSPDFKitView.m index e37031c2..9dfcfa04 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitView.m +++ b/ios/RCTPSPDFKit/RCTPSPDFKitView.m @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.h b/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.h index 5046230c..9980028c 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.h +++ b/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.h @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m b/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m index 174b97a3..6f19a424 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m +++ b/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. @@ -253,6 +253,38 @@ - (void)postProcessConfigurationOptionsWithJSON:(id)json forPDFViewController:(P }); } +RCT_EXPORT_METHOD(removeAnnotations:(id)jsonAnnotations reactTag:(nonnull NSNumber *)reactTag resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { + NSLog(@"remove annotations %@", jsonAnnotations); + if(![jsonAnnotations isKindOfClass: [NSArray class]]) { + reject(@"error", @"Please provide list of annotation objects", nil); + return; + } + NSMutableArray* annotationIDs = [@[] mutableCopy]; + for(NSDictionary* annotation in jsonAnnotations) { + [annotationIDs addObject: annotation[@"uuid"]]; + } + + NSMutableArray* errors = [@[] mutableCopy]; + + dispatch_async(dispatch_get_main_queue(), ^{ + RCTPSPDFKitView *component = (RCTPSPDFKitView *)[self.bridge.uiManager viewForReactTag:reactTag]; + for(NSString* uuid in annotationIDs){ + BOOL isSuccessful = [component removeAnnotationWithUUID: uuid]; + NSLog(@"Deleted annotation %@", uuid); + if(!isSuccessful) { + [errors addObject: uuid]; + } + } + + if([errors count] > 1) { + NSString* errorMessage = [NSString stringWithFormat: @"Failed to remove annotations: %@", errors]; + reject(@"error", errorMessage, nil); + return; + } + resolve(@(true)); + }); +} + RCT_EXPORT_METHOD(getAllUnsavedAnnotations:(nonnull NSNumber *)reactTag resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { dispatch_async(dispatch_get_main_queue(), ^{ RCTPSPDFKitView *component = (RCTPSPDFKitView *)[self.bridge.uiManager viewForReactTag:reactTag]; diff --git a/ios/RCTPSPDFKit/RNConfigurationHelper.swift b/ios/RCTPSPDFKit/RNConfigurationHelper.swift index 28962c0f..e6a3c00f 100644 --- a/ios/RCTPSPDFKit/RNConfigurationHelper.swift +++ b/ios/RCTPSPDFKit/RNConfigurationHelper.swift @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RNFileHelper.swift b/ios/RCTPSPDFKit/RNFileHelper.swift index df316828..e6c89937 100644 --- a/ios/RCTPSPDFKit/RNFileHelper.swift +++ b/ios/RCTPSPDFKit/RNFileHelper.swift @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RNProcessor.m b/ios/RCTPSPDFKit/RNProcessor.m index fb0997cc..792fe109 100644 --- a/ios/RCTPSPDFKit/RNProcessor.m +++ b/ios/RCTPSPDFKit/RNProcessor.m @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/RNProcessor.swift b/ios/RCTPSPDFKit/RNProcessor.swift index 4036adbb..4daa5f56 100644 --- a/ios/RCTPSPDFKit/RNProcessor.swift +++ b/ios/RCTPSPDFKit/RNProcessor.swift @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/ios/RCTPSPDFKit/UIColor.swift b/ios/RCTPSPDFKit/UIColor.swift index f80e2f99..02043884 100644 --- a/ios/RCTPSPDFKit/UIColor.swift +++ b/ios/RCTPSPDFKit/UIColor.swift @@ -1,5 +1,5 @@ // -// Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/package.json b/package.json index f5aeaccc..a2416292 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "2.4.1", + "version": "2.4.2", "description": "React Native PDF Library by PSPDFKit", "keywords": [ "react native", diff --git a/samples/Catalog/.bundle/config b/samples/Catalog/.bundle/config new file mode 100644 index 00000000..848943bb --- /dev/null +++ b/samples/Catalog/.bundle/config @@ -0,0 +1,2 @@ +BUNDLE_PATH: "vendor/bundle" +BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/samples/Catalog/.vscode/settings.json b/samples/Catalog/.vscode/settings.json new file mode 100644 index 00000000..0e14d8e2 --- /dev/null +++ b/samples/Catalog/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "disabled" +} \ No newline at end of file diff --git a/samples/Catalog/Catalog.js b/samples/Catalog/Catalog.js index 5de5d97d..ef8cc529 100644 --- a/samples/Catalog/Catalog.js +++ b/samples/Catalog/Catalog.js @@ -1,4 +1,4 @@ -// Copyright © 2016-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2016-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/samples/Catalog/__tests__/legacy_tests/AuthorNameScreen.js b/samples/Catalog/__tests__/legacy_tests/AuthorNameScreen.js index 00783cbe..bbccc8e8 100644 --- a/samples/Catalog/__tests__/legacy_tests/AuthorNameScreen.js +++ b/samples/Catalog/__tests__/legacy_tests/AuthorNameScreen.js @@ -3,7 +3,7 @@ // // PSPDFKit // -// Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/samples/Catalog/__tests__/legacy_tests/FormsScreen.js b/samples/Catalog/__tests__/legacy_tests/FormsScreen.js index 96d1da40..c76d5736 100644 --- a/samples/Catalog/__tests__/legacy_tests/FormsScreen.js +++ b/samples/Catalog/__tests__/legacy_tests/FormsScreen.js @@ -3,7 +3,7 @@ // // PSPDFKit // -// Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/samples/Catalog/__tests__/legacy_tests/GetAnnotationsScreen.js b/samples/Catalog/__tests__/legacy_tests/GetAnnotationsScreen.js index 7193177e..be8c1d7c 100644 --- a/samples/Catalog/__tests__/legacy_tests/GetAnnotationsScreen.js +++ b/samples/Catalog/__tests__/legacy_tests/GetAnnotationsScreen.js @@ -3,7 +3,7 @@ // // PSPDFKit // -// Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/samples/Catalog/__tests__/legacy_tests/Testing.js b/samples/Catalog/__tests__/legacy_tests/Testing.js index f3930dea..db4bbe9f 100644 --- a/samples/Catalog/__tests__/legacy_tests/Testing.js +++ b/samples/Catalog/__tests__/legacy_tests/Testing.js @@ -3,7 +3,7 @@ // // PSPDFKit // -// Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/samples/Catalog/__tests__/legacy_tests/styles.js b/samples/Catalog/__tests__/legacy_tests/styles.js index 2604c2d7..ba34d556 100644 --- a/samples/Catalog/__tests__/legacy_tests/styles.js +++ b/samples/Catalog/__tests__/legacy_tests/styles.js @@ -3,7 +3,7 @@ // // PSPDFKit // -// Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved. +// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved. // // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. diff --git a/samples/Catalog/android/.project b/samples/Catalog/android/.project index b0cc2740..dce8d60c 100644 --- a/samples/Catalog/android/.project +++ b/samples/Catalog/android/.project @@ -16,7 +16,7 @@ - 1666692500624 + 0 30 diff --git a/samples/Catalog/android/build.gradle b/samples/Catalog/android/build.gradle index 2afb2d02..99fedf26 100644 --- a/samples/Catalog/android/build.gradle +++ b/samples/Catalog/android/build.gradle @@ -3,8 +3,8 @@ buildscript { ext { minSdkVersion = 21 - compileSdkVersion = 31 - targetSdkVersion = 30 + compileSdkVersion = 33 + targetSdkVersion = 33 ndkVersion = "20.1.5948944" kotlin_version = '1.6.10' // <- add this line } diff --git a/samples/Catalog/examples/ProgrammaticAnnotations.js b/samples/Catalog/examples/ProgrammaticAnnotations.js index 2f5cb7c2..5661941e 100644 --- a/samples/Catalog/examples/ProgrammaticAnnotations.js +++ b/samples/Catalog/examples/ProgrammaticAnnotations.js @@ -252,6 +252,26 @@ export class ProgrammaticAnnotations extends BaseExampleAutoHidingHeaderComponen /> + {/* Change the type of annotations you would like to remove, for full list check in the file: ConversionHelpers.java or RCTConvert+PSPDFAnnotation.m */} +