@fto-consult/expo-ui 6.22.0 → 6.22.1

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.
@@ -116,7 +116,9 @@ module.exports = (opts)=>{
116
116
  }
117
117
  const jsonPath = path.resolve(projectRoot,'package.json');
118
118
  if(fs.existsSync(jsonPath)){
119
- require("./electron/utils/copy")(jsonPath,path.resolve(dir,"electron","package.app.json"));
119
+ try {
120
+ require("./electron/utils/copy")(jsonPath,path.resolve(dir,"electron","package.app.json"))
121
+ } catch{}
120
122
  }
121
123
  ///on sauvegarde les chemins des fichiers utiles, qui seront utilisées par la variable electron plus tard
122
124
  writeFile(path.resolve(dir,"electron","paths.json"),JSON.stringify(electronPaths));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.22.0",
3
+ "version": "6.22.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -18,6 +18,7 @@ import {isTouchDevice} from "$platform";
18
18
  import * as Utils from "$cutils";
19
19
  import {useContext} from "$econtext/hooks";
20
20
  import appConfig from "$capp/config";
21
+ import { useKeepAwake } from 'expo-keep-awake';
21
22
 
22
23
  Object.map(Utils,(v,i)=>{
23
24
  if(typeof v =='function' && typeof window !='undefined' && window && !window[i]){
@@ -28,6 +29,7 @@ Object.map(Utils,(v,i)=>{
28
29
  export default function getIndex({onMount,onUnmount,render,onRender,init}){
29
30
  const {swrConfig} = useContext();
30
31
  const isScreenFocusedRef = React.useRef(true);
32
+ useKeepAwake();
31
33
  ///garde pour chaque écran sa date de dernière activité
32
34
  const screensRef = React.useRef({});//la liste des écrans actifs
33
35
  const activeScreenRef = React.useRef('');