diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6d879d275cdb..df93eac23ab9 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1774,7 +1774,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - react-native-pdf (6.7.3): + - react-native-pdf (6.7.5): - DoubleConversion - glog - hermes-engine @@ -3182,7 +3182,7 @@ SPEC CHECKSUMS: react-native-launch-arguments: 5f41e0abf88a15e3c5309b8875d6fd5ac43df49d react-native-netinfo: fb5112b1fa754975485884ae85a3fb6a684f49d5 react-native-pager-view: 94195f1bf32e7f78359fa20057c97e632364a08b - react-native-pdf: dd6ae39a93607a80919bef9f3499e840c693989d + react-native-pdf: 2e2591ebd39422163850403b1c0cd7d6b351e168 react-native-performance: 3c608307be10964f8a97d3af462f37125b6d8fa5 react-native-plaid-link-sdk: f91a22b45b7c3d4cd6c47273200dc57df35068b0 react-native-quick-sqlite: 7c793c9f5834e756b336257a8d8b8239b7ceb451 @@ -3246,7 +3246,7 @@ SPEC CHECKSUMS: SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Turf: aa2ede4298009639d10db36aba1a7ebaad072a5e VisionCamera: c6c8aa4b028501fc87644550fbc35a537d4da3fb - Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8 + Yoga: 2a45d7e59592db061217551fd3bbe2dd993817ae PODFILE CHECKSUM: e479ec84cb53e5fd463486d71dfee91708d3fd9a diff --git a/package-lock.json b/package-lock.json index 9aaaf9f279dc..2271cc6d6692 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,7 +97,7 @@ "react-native-modal": "^13.0.0", "react-native-onyx": "2.0.66", "react-native-pager-view": "6.4.1", - "react-native-pdf": "6.7.3", + "react-native-pdf": "6.7.5", "react-native-performance": "^5.1.0", "react-native-permissions": "^3.10.0", "react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#da50d2c5c54e268499047f9cc98b8df4196c1ddf", @@ -36691,8 +36691,9 @@ } }, "node_modules/react-native-pdf": { - "version": "6.7.3", - "license": "MIT", + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/react-native-pdf/-/react-native-pdf-6.7.5.tgz", + "integrity": "sha512-d1S76p2Vwax2iG+kTnjINiUMvpjtJJvtMiYwHRbgGczT8GJjtXH49YCWOd+HfnUAU29cB+knzsKGYoZBMQM8Ow==", "dependencies": { "crypto-js": "4.2.0", "deprecated-react-native-prop-types": "^2.3.0" diff --git a/package.json b/package.json index 49c4ce3b8044..bf7df2e8576a 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "react-native-modal": "^13.0.0", "react-native-onyx": "2.0.66", "react-native-pager-view": "6.4.1", - "react-native-pdf": "6.7.3", + "react-native-pdf": "6.7.5", "react-native-performance": "^5.1.0", "react-native-permissions": "^3.10.0", "react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#da50d2c5c54e268499047f9cc98b8df4196c1ddf", diff --git a/patches/react-native-pdf+6.7.3.patch b/patches/react-native-pdf+6.7.3.patch deleted file mode 100644 index 0f0f270cefd1..000000000000 --- a/patches/react-native-pdf+6.7.3.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/node_modules/react-native-pdf/react-native-pdf.podspec b/node_modules/react-native-pdf/react-native-pdf.podspec -index fb36140..5d5f19e 100644 ---- a/node_modules/react-native-pdf/react-native-pdf.podspec -+++ b/node_modules/react-native-pdf/react-native-pdf.podspec -@@ -17,24 +17,11 @@ Pod::Spec.new do |s| - s.framework = "PDFKit" - - if fabric_enabled -- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' -- -- s.pod_target_xcconfig = { -- 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"', -- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", -- } - s.platforms = { ios: '11.0', tvos: '11.0' } -- s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED' - s.source_files = 'ios/**/*.{h,m,mm,cpp}' - s.requires_arc = true - -- s.dependency "React" -- s.dependency "React-RCTFabric" -- s.dependency "React-Codegen" -- s.dependency "RCT-Folly" -- s.dependency "RCTRequired" -- s.dependency "RCTTypeSafety" -- s.dependency "ReactCommon/turbomodule/core" -+ install_modules_dependencies(s) - else - s.platform = :ios, '8.0' - s.source_files = 'ios/**/*.{h,m,mm}' -diff --git a/node_modules/react-native-pdf/index.js b/node_modules/react-native-pdf/index.js -index c05de52..bea7af8 100644 ---- a/node_modules/react-native-pdf/index.js -+++ b/node_modules/react-native-pdf/index.js -@@ -367,11 +367,17 @@ export default class Pdf extends Component { - message[4] = message.splice(4).join('|'); - } - if (message[0] === 'loadComplete') { -+ let tableContents; -+ try { -+ tableContents = message[4]&&JSON.parse(message[4]); -+ } catch(e) { -+ tableContents = message[4]; -+ } - this.props.onLoadComplete && this.props.onLoadComplete(Number(message[1]), this.state.path, { - width: Number(message[2]), - height: Number(message[3]), - }, -- message[4]&&JSON.parse(message[4])); -+ tableContents); - } else if (message[0] === 'pageChanged') { - this.props.onPageChanged && this.props.onPageChanged(Number(message[1]), Number(message[2])); - } else if (message[0] === 'error') { diff --git a/patches/react-native-pdf+6.7.5.patch b/patches/react-native-pdf+6.7.5.patch new file mode 100644 index 000000000000..0cdcf4d5b0c9 --- /dev/null +++ b/patches/react-native-pdf+6.7.5.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js b/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js +index 596d796..4e47061 100644 +--- a/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js ++++ b/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js +@@ -22,6 +22,7 @@ + enablePaging: ?boolean, + enableRTL: ?boolean, + enableAnnotationRendering: ?boolean, ++ enableDoubleTapZoom: ?boolean, + showsHorizontalScrollIndicator: ?boolean, + showsVerticalScrollIndicator: ?boolean, + enableAntialiasing: ?boolean,