@fto-consult/expo-ui 7.4.50 → 7.4.52

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/electron/index.js CHANGED
@@ -504,6 +504,12 @@ ipcMain.on("set-main-window-title",(event,title)=>{
504
504
 
505
505
 
506
506
  ipcMain.handle("create-browser-windows",function(event,options){
507
+ if(typeof options =='string'){
508
+ try {
509
+ const t = JSON.parse(options);
510
+ options = t;
511
+ } catch{}
512
+ }
507
513
  options = Object.assign({},options);
508
514
  createBrowserWindow(options);
509
515
  })
@@ -3,11 +3,8 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
-
7
6
  <title id="document-title">PDF Viewer</title>
8
-
9
7
  <link rel="stylesheet" type="text/css" href="./viewer.css">
10
-
11
8
  <script src="../../node_modules/pdfobject/pdfobject.min.js"></script>
12
9
  </head>
13
10
 
@@ -26,11 +23,14 @@
26
23
  } else if(params.title && title){
27
24
  title.innerHTML = `${params.title}`
28
25
  }
26
+ alert(JSON.stringify(params)," is params heeein");
27
+ alert(params.file," is paraments fieleeeeee");
29
28
  if(params.file){
30
29
  PDFObject.embed(params.file,container,params);
31
30
  } else if(params.dataURL){
32
31
  PDFObject.embed(params.dataURL,container,params);
33
32
  }
33
+ console.log(params," is params heeein marrrrrrrrrrr ");
34
34
  </script>
35
35
  </body>
36
36
  </html>
@@ -102,7 +102,7 @@ const removeListener = (channel, callback) => {
102
102
  const createWindow = (options)=>{
103
103
  options = Object.assign({},options);
104
104
  options.showOnLoad = typeof options.showOnLoad =='boolean'? options.showOnLoad : true;
105
- return ipcRenderer.invoke("create-browser-windows",options);
105
+ return ipcRenderer.invoke("create-browser-windows",JSON.stringify(options));
106
106
  };
107
107
 
108
108
  const createPDFFile = (options)=>{
@@ -123,7 +123,7 @@ const createPDFFile = (options)=>{
123
123
  console.warn('type de contenu invalide!! impression création fichier electron');
124
124
  return null;
125
125
  }
126
- fileName = defaultStr(fileName,uniqid("print-salite-file-name"))
126
+ fileName = defaultStr(fileName,uniqid("generated-printed-pdf-file-name"))
127
127
  fileExtension = defaultStr(fileExtension,extension,'pdf').split(".")[0];
128
128
  charset = defaultStr(charset,'utf-8')
129
129
  fileName = sanitize(fileName);
@@ -387,6 +387,7 @@ const ELECTRON = {
387
387
  if(fs.existsSync(mainPath)){
388
388
  options.loadURL = `file://${urlPath}?file=${decodeURIComponent(filePathUrl)}&locale=fr&fileName=${fileName}`;
389
389
  options.showOnLoad = true;
390
+ options.devTools = true;
390
391
  console.log("will print url ",options.loadURL,options);
391
392
  return this.createPDFWindow(options)
392
393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.4.50",
3
+ "version": "7.4.52",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",