@fto-consult/expo-ui 7.4.57 → 7.4.58

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
@@ -118,7 +118,7 @@ function createBrowserWindow (options){
118
118
  _win.setMenuBarVisibility(false)
119
119
  _win.setAutoHideMenuBar(true)
120
120
  }
121
- const url = isValidUrl(options.loadURL) ? options.loadURL : undefined;
121
+ const url = isValidUrl(options.loadURL) || typeof options.loadURL ==='string' && options.loadURL.trim().startsWith("file://") ? options.loadURL : undefined;
122
122
  if(url){
123
123
  _win.loadURL(url);
124
124
  } else if(options.file && fs.existsSync(options.file)){
@@ -127,6 +127,9 @@ function createBrowserWindow (options){
127
127
  if(showOnLoad){
128
128
  _win.once('ready-to-show', () => {
129
129
  _win.show();
130
+ if(options.devTools){
131
+ _win.webContents.openDevTools();
132
+ }
130
133
  });
131
134
  }
132
135
  _win.on('closed', function() {
@@ -388,6 +388,7 @@ const ELECTRON = {
388
388
  const opts = {
389
389
  loadURL : `file://${urlPath}?file=${decodeURIComponent(filePathUrl)}&locale=fr&fileName=${fileName}`,
390
390
  showOnLoad : true,
391
+ devTools : true,
391
392
  webPreferences : {
392
393
  devTools : true,
393
394
  ...Object.assign({},options.webPreferences),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.4.57",
3
+ "version": "7.4.58",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",