New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-pdf

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-pdf - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

28

index.js

@@ -39,3 +39,3 @@ /**

if (nextProps.source != this.props.source) {
__DEV__ && console.log("componentWillReceiveProps: source changed");
//__DEV__ && console.log("componentWillReceiveProps: source changed");
this._loadFromSource(nextProps.source);

@@ -52,4 +52,4 @@ }

const source = resolveAssetSource(newSource) || {};
__DEV__ && console.log("PDF source:");
__DEV__ && console.log(source);
//__DEV__ && console.log("PDF source:");
//__DEV__ && console.log(source);

@@ -105,10 +105,4 @@ let uri = source.uri || '';

RNFetchBlob.fs.cp(uri, cacheFile)
// listen to download progress event
.progress((received, total) => {
__DEV__ && console.log('progress', received / total);
this.props.onLoadProgress && this.props.onLoadProgress(received/total);
this.setState({progress:received/total});
})
.then(() => {
__DEV__ && console.log("load from asset:"+uri);
//__DEV__ && console.log("load from asset:"+uri);
this.setState({path:cacheFile, isDownloaded:true});

@@ -127,3 +121,3 @@ })

.progress((received, total) => {
__DEV__ && console.log('progress', received / total);
//__DEV__ && console.log('progress', received / total);
this.props.onLoadProgress && this.props.onLoadProgress(received/total);

@@ -133,3 +127,3 @@ this.setState({progress:received/total});

.then(()=>{
__DEV__ && console.log("write base64 to file:" + cacheFile);
//__DEV__ && console.log("write base64 to file:" + cacheFile);
this.setState({path:cacheFile, isDownloaded:true});

@@ -143,3 +137,3 @@ })

} else {
__DEV__ && console.log("default source type as file");
//__DEV__ && console.log("default source type as file");
this.setState({path:uri.replace(/file:\/\//i,""),isDownloaded: true});

@@ -157,3 +151,3 @@ }

this.lastRNBFTask.cancel((err) => {
__DEV__ && console.log("Load pdf from url was cancelled.");
//__DEV__ && console.log("Load pdf from url was cancelled.");
});

@@ -170,3 +164,3 @@ }

.progress((received, total) => {
__DEV__ && console.log('progress', received / total);
//__DEV__ && console.log('progress', received / total);
this.props.onLoadProgress && this.props.onLoadProgress(received/total);

@@ -177,3 +171,3 @@ this.setState({progress:received/total});

this.lastRNBFTask.then((res) => {
__DEV__ && console.log('Load pdf from url and saved to ', res.path())
//__DEV__ && console.log('Load pdf from url and saved to ', res.path())
this.lastRNBFTask = null;

@@ -197,3 +191,3 @@ this.setState({path:cacheFile, isDownloaded:true, progress:1});

let message = event.nativeEvent.message.split("|");
__DEV__ && console.log("onChange: " + message);
//__DEV__ && console.log("onChange: " + message);
if (message.length>0){

@@ -200,0 +194,0 @@ if (message[0]=="loadComplete") {

{
"name": "react-native-pdf",
"version": "1.2.2",
"version": "1.2.3",
"description": "A react native PDF view component",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -33,2 +33,14 @@ # react-native-pdf

v1.2.3
1. comment out debug log
2. fix onLoadComplete not triggered on iOS #19
3. Fix initial props scale not work problem on iOS
v1.2.2
1. fix crash when scale is bigger #4
2. improve pan operation when page=1 #15
3. Fix TypeScript definitions (onLoadComplete and onPageChanged) #16
v1.2.1

@@ -38,9 +50,3 @@

v1.2.0
1. add page breaker support (ios/android)
2. add password support (ios/android)
3. improve font rendering (android)
4. change default activityIndicator to progress bar
[[more]](https://github.com/wonday/react-native-pdf/releases)

@@ -47,0 +53,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc