@fto-consult/expo-ui 7.4.45 → 7.4.47

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.
@@ -130,10 +130,10 @@ const createPDFFile = (options)=>{
130
130
  if(!fileName.endsWith(`.${fileExtension}`)){
131
131
  fileName += "."+fileExtension
132
132
  }
133
- return fs.writeFile(_path.join(dir,filename), content,{charset},(err)=>{
133
+ return fs.writeFile(path.join(dir,filename), content,{charset},(err)=>{
134
134
  if(!err) {
135
135
  const fileUrl = 'file://'+(dir+'/'+filename).replaceAll("\\","/");
136
- const p = _path.join(dir,filename);
136
+ const p = path.join(dir,filename);
137
137
  const filePathUrl = 'file://'+p;
138
138
  resolve({content,fileName:filename,filename,path:p,filePathUrl,filePathUri:filePathUrl,fileUrl,filePath:p,fileUri:fileUrl})
139
139
  } else {
@@ -381,9 +381,9 @@ const ELECTRON = {
381
381
  },
382
382
  get printPDF (){
383
383
  return (options)=>{
384
- return createPDFFile(options).then(({path,filePathUrl})=>{
384
+ return createPDFFile(options).then(({path:mainPath,filePathUrl})=>{
385
385
  const urlPath = path.resolve(__dirname,"pdf-viewer","viewer.html");
386
- if(fs.existsSync(path)){
386
+ if(fs.existsSync(mainPath)){
387
387
  opts.loadURL = `file://${urlPath}?file=${decodeURIComponent(filePathUrl)}&locale=fr&fileName=${fileName}`;
388
388
  opts.showOnLoad = true;
389
389
  console.log("will print url ",options.loadURL,options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.4.45",
3
+ "version": "7.4.47",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",