@fto-consult/expo-ui 7.4.46 → 7.4.48

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.
@@ -381,13 +381,14 @@ const ELECTRON = {
381
381
  },
382
382
  get printPDF (){
383
383
  return (options)=>{
384
- return createPDFFile(options).then(({path,filePathUrl})=>{
384
+ options = Object.assign({},options);
385
+ return createPDFFile(options).then(({path:mainPath,filePathUrl})=>{
385
386
  const urlPath = path.resolve(__dirname,"pdf-viewer","viewer.html");
386
- if(fs.existsSync(path)){
387
- opts.loadURL = `file://${urlPath}?file=${decodeURIComponent(filePathUrl)}&locale=fr&fileName=${fileName}`;
388
- opts.showOnLoad = true;
387
+ if(fs.existsSync(mainPath)){
388
+ options.loadURL = `file://${urlPath}?file=${decodeURIComponent(filePathUrl)}&locale=fr&fileName=${fileName}`;
389
+ options.showOnLoad = true;
389
390
  console.log("will print url ",options.loadURL,options);
390
- return this.createPDFWindow(opts)
391
+ return this.createPDFWindow(options)
391
392
  }
392
393
  })
393
394
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.4.46",
3
+ "version": "7.4.48",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",