@amafil/react-native-pdf-toolkit 1.0.11 → 1.1.0
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/android/src/main/java/org/wonday/pdf/PdfManager.java +32 -0
- package/android/src/main/java/org/wonday/pdf/PdfView.java +1161 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerDelegate.java +18 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerInterface.java +6 -0
- package/fabric/RNPDFPdfNativeComponent.js +9 -1
- package/index.d.ts +68 -1
- package/index.js +89 -0
- package/index.js.flow +68 -0
- package/ios/RNPDFPdf/RNPDFPdfView.h +7 -0
- package/ios/RNPDFPdf/RNPDFPdfView.mm +1196 -0
- package/ios/RNPDFPdf/RNPDFPdfViewManager.mm +9 -16
- package/package.json +1 -1
|
@@ -46,6 +46,11 @@ RCT_EXPORT_VIEW_PROPERTY(enablePaging, BOOL);
|
|
|
46
46
|
RCT_EXPORT_VIEW_PROPERTY(enableRTL, BOOL);
|
|
47
47
|
RCT_EXPORT_VIEW_PROPERTY(enableAnnotationRendering, BOOL);
|
|
48
48
|
RCT_EXPORT_VIEW_PROPERTY(enableDoubleTapZoom, BOOL);
|
|
49
|
+
RCT_EXPORT_VIEW_PROPERTY(annotations, NSString);
|
|
50
|
+
RCT_EXPORT_VIEW_PROPERTY(annotationMode, BOOL);
|
|
51
|
+
RCT_EXPORT_VIEW_PROPERTY(annotationTool, NSString);
|
|
52
|
+
RCT_EXPORT_VIEW_PROPERTY(annotationEditable, BOOL);
|
|
53
|
+
RCT_EXPORT_VIEW_PROPERTY(annotationIdMode, NSString);
|
|
49
54
|
RCT_EXPORT_VIEW_PROPERTY(fitPolicy, int);
|
|
50
55
|
RCT_EXPORT_VIEW_PROPERTY(spacing, int);
|
|
51
56
|
RCT_EXPORT_VIEW_PROPERTY(password, NSString);
|
|
@@ -55,13 +60,13 @@ RCT_EXPORT_VIEW_PROPERTY(enableTextSelection, BOOL);
|
|
|
55
60
|
RCT_EXPORT_VIEW_PROPERTY(onTextSelectionChange, RCTBubblingEventBlock);
|
|
56
61
|
|
|
57
62
|
RCT_EXPORT_METHOD(startAutoScroll:(nonnull NSNumber *)reactTag
|
|
58
|
-
|
|
63
|
+
dpPerSecond:(double)dpPerSecond
|
|
59
64
|
resumeDelay:(double)resumeDelay)
|
|
60
65
|
{
|
|
61
66
|
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
62
67
|
RNPDFPdfView *view = (RNPDFPdfView *)viewRegistry[reactTag];
|
|
63
68
|
if ([view isKindOfClass:[RNPDFPdfView class]]) {
|
|
64
|
-
[view startAutoScroll:(CGFloat)
|
|
69
|
+
[view startAutoScroll:(CGFloat)dpPerSecond resumeDelay:(NSTimeInterval)(resumeDelay / 1000.0)];
|
|
65
70
|
}
|
|
66
71
|
}];
|
|
67
72
|
}
|
|
@@ -76,24 +81,12 @@ RCT_EXPORT_METHOD(stopAutoScroll:(nonnull NSNumber *)reactTag)
|
|
|
76
81
|
}];
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
RCT_EXPORT_METHOD(
|
|
80
|
-
pixels:(double)pixels
|
|
81
|
-
resumeDelay:(double)resumeDelay)
|
|
82
|
-
{
|
|
83
|
-
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
84
|
-
RNPDFPdfView *view = (RNPDFPdfView *)viewRegistry[reactTag];
|
|
85
|
-
if ([view isKindOfClass:[RNPDFPdfView class]]) {
|
|
86
|
-
[view startAutoScroll:(CGFloat)pixels resumeDelay:(NSTimeInterval)(resumeDelay / 1000.0)];
|
|
87
|
-
}
|
|
88
|
-
}];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
RCT_EXPORT_METHOD(stopAutoScroll:(nonnull NSNumber *)reactTag)
|
|
84
|
+
RCT_EXPORT_METHOD(saveAnnotations:(nonnull NSNumber *)reactTag)
|
|
92
85
|
{
|
|
93
86
|
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
94
87
|
RNPDFPdfView *view = (RNPDFPdfView *)viewRegistry[reactTag];
|
|
95
88
|
if ([view isKindOfClass:[RNPDFPdfView class]]) {
|
|
96
|
-
[view
|
|
89
|
+
[view saveAnnotations];
|
|
97
90
|
}
|
|
98
91
|
}];
|
|
99
92
|
}
|
package/package.json
CHANGED