react-native-pdf 6.6.2 → 6.7.1
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/README.md +17 -41
- package/android/build.gradle +71 -13
- package/android/src/main/java/org/wonday/pdf/{RCTPdfManager.java → PdfManager.java} +57 -21
- package/android/src/main/java/org/wonday/pdf/PdfView.java +25 -0
- package/android/src/main/java/org/wonday/pdf/{RCTPdfView.java → RNPDFPackage.java} +2 -3
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerDelegate.java +86 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerInterface.java +33 -0
- package/fabric/RNPDFPdfNativeComponent.js +46 -0
- package/index.d.ts +2 -0
- package/index.js +25 -27
- package/index.js.flow +2 -0
- package/ios/{RCTPdf/PdfManager.m → RNPDFPdf/PdfManager.mm} +1 -1
- package/ios/{RCTPdf/RCTPdfPageView.h → RNPDFPdf/RNPDFPdfPageView.h} +1 -1
- package/ios/{RCTPdf/RCTPdfPageView.m → RNPDFPdf/RNPDFPdfPageView.mm} +5 -5
- package/ios/{RCTPdf/RCTPdfPageViewManager.h → RNPDFPdf/RNPDFPdfPageViewManager.h} +1 -1
- package/ios/{RCTPdf/RCTPdfPageViewManager.m → RNPDFPdf/RNPDFPdfPageViewManager.mm} +4 -4
- package/ios/{RCTPdf/RCTPdfView.h → RNPDFPdf/RNPDFPdfView.h} +15 -5
- package/ios/{RCTPdf/RCTPdfView.m → RNPDFPdf/RNPDFPdfView.mm} +321 -54
- package/ios/{RCTPdf/RCTPdfViewManager.h → RNPDFPdf/RNPDFPdfViewManager.h} +1 -1
- package/ios/{RCTPdf/RCTPdfViewManager.m → RNPDFPdf/RNPDFPdfViewManager.mm} +7 -5
- package/ios/{RCTPdf.xcodeproj → RNPDFPdf.xcodeproj}/project.pbxproj +42 -42
- package/package.json +19 -3
- package/react-native-pdf.podspec +28 -3
- package/windows/RCTPdf/pch.h +2 -0
- package/ios/RCTPdf.xcodeproj/xcuserdata/wonday.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- /package/ios/{RCTPdf → RNPDFPdf}/PdfManager.h +0 -0
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
5267DA06210F0EDE00D20C59 /*
|
|
11
|
-
5267DA07210F0EDE00D20C59 /*
|
|
10
|
+
5267DA06210F0EDE00D20C59 /* RNPDFPdfView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5267DA03210F0EDD00D20C59 /* RNPDFPdfView.mm */; };
|
|
11
|
+
5267DA07210F0EDE00D20C59 /* RNPDFPdfViewManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.mm */; };
|
|
12
12
|
5267DA0A210F0F0800D20C59 /* PDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5267DA09210F0F0800D20C59 /* PDFKit.framework */; };
|
|
13
|
-
526B80401EABD92200259970 /*
|
|
14
|
-
52A324EA1FD3C3FB000B0B18 /* PdfManager.
|
|
15
|
-
52F79DB71EB2DA4F00CAD00C /*
|
|
13
|
+
526B80401EABD92200259970 /* RNPDFPdfPageViewManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.mm */; };
|
|
14
|
+
52A324EA1FD3C3FB000B0B18 /* PdfManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52A324E91FD3C3FB000B0B18 /* PdfManager.mm */; };
|
|
15
|
+
52F79DB71EB2DA4F00CAD00C /* RNPDFPdfPageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.mm */; };
|
|
16
16
|
/* End PBXBuildFile section */
|
|
17
17
|
|
|
18
18
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
/* End PBXCopyFilesBuildPhase section */
|
|
29
29
|
|
|
30
30
|
/* Begin PBXFileReference section */
|
|
31
|
-
20D8E03F1C8E946C00039823 /*
|
|
32
|
-
5267DA02210F0EDD00D20C59 /*
|
|
33
|
-
5267DA03210F0EDD00D20C59 /*
|
|
34
|
-
5267DA04210F0EDD00D20C59 /*
|
|
35
|
-
5267DA05210F0EDE00D20C59 /*
|
|
31
|
+
20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNPDFPdf.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
32
|
+
5267DA02210F0EDD00D20C59 /* RNPDFPdfView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfView.h; sourceTree = "<group>"; };
|
|
33
|
+
5267DA03210F0EDD00D20C59 /* RNPDFPdfView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfView.mm; sourceTree = "<group>"; };
|
|
34
|
+
5267DA04210F0EDD00D20C59 /* RNPDFPdfViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfViewManager.h; sourceTree = "<group>"; };
|
|
35
|
+
5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfViewManager.mm; sourceTree = "<group>"; };
|
|
36
36
|
5267DA09210F0F0800D20C59 /* PDFKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PDFKit.framework; path = System/Library/Frameworks/PDFKit.framework; sourceTree = SDKROOT; };
|
|
37
|
-
526B803E1EABD92200259970 /*
|
|
38
|
-
526B803F1EABD92200259970 /*
|
|
37
|
+
526B803E1EABD92200259970 /* RNPDFPdfPageViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfPageViewManager.h; sourceTree = "<group>"; };
|
|
38
|
+
526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfPageViewManager.mm; sourceTree = "<group>"; };
|
|
39
39
|
52A324E81FD3C3FB000B0B18 /* PdfManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdfManager.h; sourceTree = "<group>"; };
|
|
40
|
-
52A324E91FD3C3FB000B0B18 /* PdfManager.
|
|
41
|
-
52F79DB31EB2DA4F00CAD00C /*
|
|
42
|
-
52F79DB41EB2DA4F00CAD00C /*
|
|
40
|
+
52A324E91FD3C3FB000B0B18 /* PdfManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdfManager.mm; sourceTree = "<group>"; };
|
|
41
|
+
52F79DB31EB2DA4F00CAD00C /* RNPDFPdfPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfPageView.h; sourceTree = "<group>"; };
|
|
42
|
+
52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfPageView.mm; sourceTree = "<group>"; };
|
|
43
43
|
/* End PBXFileReference section */
|
|
44
44
|
|
|
45
45
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
20D8E0361C8E946C00039823 = {
|
|
58
58
|
isa = PBXGroup;
|
|
59
59
|
children = (
|
|
60
|
-
20D8E0411C8E946C00039823 /*
|
|
60
|
+
20D8E0411C8E946C00039823 /* RNPDFPdf */,
|
|
61
61
|
20D8E0401C8E946C00039823 /* Products */,
|
|
62
62
|
5267DA08210F0F0800D20C59 /* Frameworks */,
|
|
63
63
|
);
|
|
@@ -66,26 +66,26 @@
|
|
|
66
66
|
20D8E0401C8E946C00039823 /* Products */ = {
|
|
67
67
|
isa = PBXGroup;
|
|
68
68
|
children = (
|
|
69
|
-
20D8E03F1C8E946C00039823 /*
|
|
69
|
+
20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */,
|
|
70
70
|
);
|
|
71
71
|
name = Products;
|
|
72
72
|
sourceTree = "<group>";
|
|
73
73
|
};
|
|
74
|
-
20D8E0411C8E946C00039823 /*
|
|
74
|
+
20D8E0411C8E946C00039823 /* RNPDFPdf */ = {
|
|
75
75
|
isa = PBXGroup;
|
|
76
76
|
children = (
|
|
77
|
-
5267DA02210F0EDD00D20C59 /*
|
|
78
|
-
5267DA03210F0EDD00D20C59 /*
|
|
79
|
-
5267DA04210F0EDD00D20C59 /*
|
|
80
|
-
5267DA05210F0EDE00D20C59 /*
|
|
77
|
+
5267DA02210F0EDD00D20C59 /* RNPDFPdfView.h */,
|
|
78
|
+
5267DA03210F0EDD00D20C59 /* RNPDFPdfView.mm */,
|
|
79
|
+
5267DA04210F0EDD00D20C59 /* RNPDFPdfViewManager.h */,
|
|
80
|
+
5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.mm */,
|
|
81
81
|
52A324E81FD3C3FB000B0B18 /* PdfManager.h */,
|
|
82
|
-
52A324E91FD3C3FB000B0B18 /* PdfManager.
|
|
83
|
-
52F79DB31EB2DA4F00CAD00C /*
|
|
84
|
-
52F79DB41EB2DA4F00CAD00C /*
|
|
85
|
-
526B803E1EABD92200259970 /*
|
|
86
|
-
526B803F1EABD92200259970 /*
|
|
82
|
+
52A324E91FD3C3FB000B0B18 /* PdfManager.mm */,
|
|
83
|
+
52F79DB31EB2DA4F00CAD00C /* RNPDFPdfPageView.h */,
|
|
84
|
+
52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.mm */,
|
|
85
|
+
526B803E1EABD92200259970 /* RNPDFPdfPageViewManager.h */,
|
|
86
|
+
526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.mm */,
|
|
87
87
|
);
|
|
88
|
-
path =
|
|
88
|
+
path = RNPDFPdf;
|
|
89
89
|
sourceTree = "<group>";
|
|
90
90
|
};
|
|
91
91
|
5267DA08210F0F0800D20C59 /* Frameworks */ = {
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
/* End PBXGroup section */
|
|
100
100
|
|
|
101
101
|
/* Begin PBXNativeTarget section */
|
|
102
|
-
20D8E03E1C8E946C00039823 /*
|
|
102
|
+
20D8E03E1C8E946C00039823 /* RNPDFPdf */ = {
|
|
103
103
|
isa = PBXNativeTarget;
|
|
104
|
-
buildConfigurationList = 20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "
|
|
104
|
+
buildConfigurationList = 20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "RNPDFPdf" */;
|
|
105
105
|
buildPhases = (
|
|
106
106
|
20D8E03B1C8E946C00039823 /* Sources */,
|
|
107
107
|
20D8E03C1C8E946C00039823 /* Frameworks */,
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
);
|
|
112
112
|
dependencies = (
|
|
113
113
|
);
|
|
114
|
-
name =
|
|
115
|
-
productName =
|
|
116
|
-
productReference = 20D8E03F1C8E946C00039823 /*
|
|
114
|
+
name = RNPDFPdf;
|
|
115
|
+
productName = RNPDFPdf;
|
|
116
|
+
productReference = 20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */;
|
|
117
117
|
productType = "com.apple.product-type.library.static";
|
|
118
118
|
};
|
|
119
119
|
/* End PBXNativeTarget section */
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
buildConfigurationList = 20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "
|
|
134
|
+
buildConfigurationList = 20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "RNPDFPdf" */;
|
|
135
135
|
compatibilityVersion = "Xcode 3.2";
|
|
136
136
|
developmentRegion = English;
|
|
137
137
|
hasScannedForEncodings = 0;
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
projectDirPath = "";
|
|
144
144
|
projectRoot = "";
|
|
145
145
|
targets = (
|
|
146
|
-
20D8E03E1C8E946C00039823 /*
|
|
146
|
+
20D8E03E1C8E946C00039823 /* RNPDFPdf */,
|
|
147
147
|
);
|
|
148
148
|
};
|
|
149
149
|
/* End PBXProject section */
|
|
@@ -153,11 +153,11 @@
|
|
|
153
153
|
isa = PBXSourcesBuildPhase;
|
|
154
154
|
buildActionMask = 2147483647;
|
|
155
155
|
files = (
|
|
156
|
-
52A324EA1FD3C3FB000B0B18 /* PdfManager.
|
|
157
|
-
5267DA07210F0EDE00D20C59 /*
|
|
158
|
-
5267DA06210F0EDE00D20C59 /*
|
|
159
|
-
526B80401EABD92200259970 /*
|
|
160
|
-
52F79DB71EB2DA4F00CAD00C /*
|
|
156
|
+
52A324EA1FD3C3FB000B0B18 /* PdfManager.mm in Sources */,
|
|
157
|
+
5267DA07210F0EDE00D20C59 /* RNPDFPdfViewManager.mm in Sources */,
|
|
158
|
+
5267DA06210F0EDE00D20C59 /* RNPDFPdfView.mm in Sources */,
|
|
159
|
+
526B80401EABD92200259970 /* RNPDFPdfPageViewManager.mm in Sources */,
|
|
160
|
+
52F79DB71EB2DA4F00CAD00C /* RNPDFPdfPageView.mm in Sources */,
|
|
161
161
|
);
|
|
162
162
|
runOnlyForDeploymentPostprocessing = 0;
|
|
163
163
|
};
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
/* End XCBuildConfiguration section */
|
|
298
298
|
|
|
299
299
|
/* Begin XCConfigurationList section */
|
|
300
|
-
20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "
|
|
300
|
+
20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "RNPDFPdf" */ = {
|
|
301
301
|
isa = XCConfigurationList;
|
|
302
302
|
buildConfigurations = (
|
|
303
303
|
20D8E0461C8E946C00039823 /* Debug */,
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
defaultConfigurationIsVisible = 0;
|
|
307
307
|
defaultConfigurationName = Release;
|
|
308
308
|
};
|
|
309
|
-
20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "
|
|
309
|
+
20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "RNPDFPdf" */ = {
|
|
310
310
|
isa = XCConfigurationList;
|
|
311
311
|
buildConfigurations = (
|
|
312
312
|
20D8E0491C8E946C00039823 /* Debug */,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-pdf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.1",
|
|
4
4
|
"summary": "A react native PDF view component",
|
|
5
5
|
"description": "A react native PDF view component, support ios and android platform",
|
|
6
6
|
"main": "index.js",
|
|
@@ -32,8 +32,15 @@
|
|
|
32
32
|
"deprecated-react-native-prop-types": "^2.3.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
+
"@babel/core": "^7.20.2",
|
|
36
|
+
"@babel/runtime": "^7.20.1",
|
|
35
37
|
"prop-types": "^15.7.2"
|
|
36
38
|
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "*",
|
|
41
|
+
"react-native": "*",
|
|
42
|
+
"react-native-blob-util": ">=0.13.7"
|
|
43
|
+
},
|
|
37
44
|
"files": [
|
|
38
45
|
"android/",
|
|
39
46
|
"ios/",
|
|
@@ -47,6 +54,15 @@
|
|
|
47
54
|
"PdfView.js",
|
|
48
55
|
"PdfViewFlatList.js",
|
|
49
56
|
"PinchZoomView.js",
|
|
50
|
-
"react-native-pdf.podspec"
|
|
51
|
-
|
|
57
|
+
"react-native-pdf.podspec",
|
|
58
|
+
"fabric/"
|
|
59
|
+
],
|
|
60
|
+
"codegenConfig": {
|
|
61
|
+
"name": "rnpdf",
|
|
62
|
+
"type": "components",
|
|
63
|
+
"jsSrcsDir": "./fabric",
|
|
64
|
+
"android": {
|
|
65
|
+
"javaPackageName": "org.wonday.pdf"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
52
68
|
}
|
package/react-native-pdf.podspec
CHANGED
|
@@ -2,6 +2,8 @@ require 'json'
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
|
+
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
6
|
+
|
|
5
7
|
Pod::Spec.new do |s|
|
|
6
8
|
s.name = package['name']
|
|
7
9
|
s.version = package['version']
|
|
@@ -12,7 +14,30 @@ Pod::Spec.new do |s|
|
|
|
12
14
|
s.homepage = package['homepage']
|
|
13
15
|
s.source = { :git => 'https://github.com/wonday/react-native-pdf.git', :tag => "v#{s.version}" }
|
|
14
16
|
s.requires_arc = true
|
|
15
|
-
s.
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
s.framework = "PDFKit"
|
|
18
|
+
|
|
19
|
+
if fabric_enabled
|
|
20
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
21
|
+
|
|
22
|
+
s.pod_target_xcconfig = {
|
|
23
|
+
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"',
|
|
24
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
25
|
+
}
|
|
26
|
+
s.platforms = { ios: '11.0', tvos: '11.0' }
|
|
27
|
+
s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
|
|
28
|
+
s.source_files = 'ios/**/*.{h,m,mm,cpp}'
|
|
29
|
+
s.requires_arc = true
|
|
30
|
+
|
|
31
|
+
s.dependency "React"
|
|
32
|
+
s.dependency "React-RCTFabric"
|
|
33
|
+
s.dependency "React-Codegen"
|
|
34
|
+
s.dependency "RCT-Folly"
|
|
35
|
+
s.dependency "RCTRequired"
|
|
36
|
+
s.dependency "RCTTypeSafety"
|
|
37
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
38
|
+
else
|
|
39
|
+
s.platform = :ios, '8.0'
|
|
40
|
+
s.source_files = 'ios/**/*.{h,m,mm}'
|
|
41
|
+
s.dependency 'React-Core'
|
|
42
|
+
end
|
|
18
43
|
end
|
package/windows/RCTPdf/pch.h
CHANGED
|
@@ -26,4 +26,6 @@
|
|
|
26
26
|
#include <winrt/Windows.UI.Xaml.Media.h>
|
|
27
27
|
#include <winrt/Windows.UI.Xaml.Media.Imaging.h>
|
|
28
28
|
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
|
29
|
+
#include <winrt/Microsoft.UI.Xaml.Controls.h>
|
|
30
|
+
#include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h>
|
|
29
31
|
#include <winrt/Microsoft.ReactNative.h>
|
package/ios/RCTPdf.xcodeproj/xcuserdata/wonday.xcuserdatad/xcschemes/xcschememanagement.plist
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>SchemeUserState</key>
|
|
6
|
-
<dict>
|
|
7
|
-
<key>RCTPdf.xcscheme_^#shared#^_</key>
|
|
8
|
-
<dict>
|
|
9
|
-
<key>orderHint</key>
|
|
10
|
-
<integer>52</integer>
|
|
11
|
-
</dict>
|
|
12
|
-
</dict>
|
|
13
|
-
</dict>
|
|
14
|
-
</plist>
|
|
File without changes
|