Skip to content

Commit

Permalink
Bump glob-parent from 5.1.0 to 5.1.2 in /samples/NativeCatalog (#404)
Browse files Browse the repository at this point in the history
* Bump glob-parent from 5.1.0 to 5.1.2 in /samples/NativeCatalog

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.0 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](gulpjs/glob-parent@v5.1.0...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update the Manual Signing example on iOS to use the new Electronic Signatures API.

* Bump version number to 1.31.1

* Apply suggestions from code review

Co-authored-by: Stefan Kieleithner <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rad Azzouz <[email protected]>
Co-authored-by: Rad Azzouz <[email protected]>
Co-authored-by: Stefan Kieleithner <[email protected]>
  • Loading branch information
4 people authored Jun 21, 2021
1 parent ae764b3 commit 1f70698
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-pspdfkit",
"version": "1.31.0",
"version": "1.31.1",
"description": "A React Native module for the PSPDFKit library.",
"keywords": [
"react native",
Expand Down
2 changes: 1 addition & 1 deletion samples/Catalog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Catalog",
"version": "1.31.0",
"version": "1.31.1",
"private": true,
"scripts": {
"start": "react-native start",
Expand Down
2 changes: 1 addition & 1 deletion samples/Catalog/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5420,7 +5420,7 @@ react-native-permissions@^1.1.1:
integrity sha512-t0Ujm177bagjUOSzhpmkSz+LqFW04HnY9TeZFavDCmV521fQvFz82aD+POXqWsAdsJVOK3umJYBNNqCjC3g0hQ==

"react-native-pspdfkit@file:../..":
version "1.31.0"
version "1.31.1"

react-native-qrcode-scanner@^1.2.1:
version "1.2.1"
Expand Down
27 changes: 17 additions & 10 deletions samples/NativeCatalog/ios/NativeCatalog/Examples/CustomPdfView.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import <React/RCTUtils.h>
#import "NativeCatalog-Swift.h"

@interface CustomPdfView()<PSPDFSignatureViewControllerDelegate>
@interface CustomPdfView()<PSPDFSignatureCreationViewControllerDelegate>
@property (nonatomic, nullable) UIViewController *topController;
@end

Expand Down Expand Up @@ -85,19 +85,26 @@ - (UIViewController *)pspdf_parentViewController {
}

- (BOOL)startSigning {
// Programmatically show the signature view controller
PSPDFSignatureViewController *signatureController = [[PSPDFSignatureViewController alloc] init];
signatureController.naturalDrawingEnabled = YES;
signatureController.delegate = self;
PSPDFNavigationController *signatureContainer = [[PSPDFNavigationController alloc] initWithRootViewController:signatureController];
[_pdfController presentViewController:signatureContainer animated:YES completion:NULL];
// Programmatically show the signature creation view controller
if (@available(iOS 13.0, *)) {
PSPDFSignatureCreationViewController *signatureController = [[PSPDFSignatureCreationViewController alloc] init];
signatureController.configuration = [PSPDFSignatureCreationConfiguration configurationWithBuilder:^(PSPDFSignatureCreationConfigurationBuilder * _Nonnull builder) {
builder.availableModes = @[@(PSPDFSignatureCreationModeDraw)];
}];
signatureController.delegate = self;
[_pdfController presentViewController:signatureController animated:YES completion:NULL];
} else {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"This example is not available on iOS 12" message:@"This example requires iOS 13 and later." preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"Dismiss" style:UIAlertActionStyleDefault handler:NULL]];
[_pdfController presentViewController:alert animated:YES completion:NULL];
}

return YES;
}

#pragma mark - PSPDFSignatureViewControllerDelegate

- (void)signatureViewControllerDidFinish:(PSPDFSignatureViewController *)signatureController withSigner:(nullable PSPDFSigner *)signer shouldSaveSignature:(BOOL)shouldSaveSignature {
- (void)signatureCreationViewControllerDidFinish:(PSPDFSignatureCreationViewController * _Nonnull)signatureController API_AVAILABLE(ios(13.0)){
[signatureController dismissViewControllerAnimated:YES completion:^{
NSURL *samplesURL = [NSBundle.mainBundle.resourceURL URLByAppendingPathComponent:@"PDFs"];
NSURL *p12URL = [samplesURL URLByAppendingPathComponent:@"JohnAppleseed.p12"];
Expand Down Expand Up @@ -143,7 +150,7 @@ - (void)signatureViewControllerDidFinish:(PSPDFSignatureViewController *)signatu
// Set the bounding box to fit in the signature form element.
annotation.boundingBox = CGRectMake(signatureFormElement.boundingBox.origin.x + 70, signatureFormElement.boundingBox.origin.y - 25, 50, 50);
annotation.color = signatureController.drawView.strokeColor;
annotation.naturalDrawingEnabled = signatureController.naturalDrawingEnabled;
annotation.naturalDrawingEnabled = signatureController.drawView.naturalDrawingEnabled;
annotation.pageIndex = 0;

// Add the ink annotation.
Expand All @@ -163,7 +170,7 @@ - (void)signatureViewControllerDidFinish:(PSPDFSignatureViewController *)signatu
}];
}

- (void)signatureViewControllerDidCancel:(PSPDFSignatureViewController *)signatureController {
- (void)signatureCreationViewControllerDidCancel:(PSPDFSignatureCreationViewController * _Nonnull)signatureController API_AVAILABLE(ios(13.0)){
[signatureController dismissViewControllerAnimated:YES completion:NULL];
}

Expand Down
2 changes: 1 addition & 1 deletion samples/NativeCatalog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NativeCatalog",
"version": "1.31.0",
"version": "1.31.1",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
8 changes: 4 additions & 4 deletions samples/NativeCatalog/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3020,9 +3020,9 @@ getpass@^0.1.1:
assert-plus "^1.0.0"

glob-parent@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"

Expand Down Expand Up @@ -5511,7 +5511,7 @@ react-native-gesture-handler@^1.3.0:
prop-types "^15.7.2"

"react-native-pspdfkit@file:../..":
version "1.31.0"
version "1.31.1"

react-native-safe-area-view@^0.14.1:
version "0.14.8"
Expand Down

0 comments on commit 1f70698

Please sign in to comment.