@fto-consult/expo-ui 6.67.13 → 6.67.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.67.13",
3
+ "version": "6.67.14",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -69,6 +69,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render}) {
69
69
  const [state,setState] = React.useState({
70
70
  isLoading : true,
71
71
  isInitialized:false,
72
+ hasCallInitApp : false,
72
73
  });
73
74
  React.useEffect(() => {
74
75
  const loadResources = ()=>{
@@ -189,11 +190,11 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render}) {
189
190
  Auth.loginUser(false);
190
191
  }
191
192
  setState({
192
- ...state,hasGetStarted:true,...defaultObj(args && args?.state),isInitialized:true,isLoading : false,
193
+ ...state,hasGetStarted:true,...defaultObj(args && args?.state),hasCallInitApp:true,isInitialized:true,isLoading : false,
193
194
  });
194
195
  }).catch((e)=>{
195
196
  console.error(e," loading resources for app initialization");
196
- setState({...state,isInitialized:true,isLoading : false,hasGetStarted:false});
197
+ setState({...state,isInitialized:true,hasCallInitApp,isLoading : false,hasGetStarted:false});
197
198
  })
198
199
  });
199
200
 
@@ -246,7 +247,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render}) {
246
247
  theme,
247
248
  ...defaultObj(pref),
248
249
  }),[theme,pref]);
249
- const isLoaded = !isLoading;
250
+ const isLoaded = !isLoading && state.hasCallInitApp;
250
251
  const child = isLoaded ? <NavigationContainer
251
252
  ref={navigationRef}
252
253
  initialState={initialState}
@@ -70,34 +70,36 @@ const SplashScreenComponent = ({isLoaded,children , duration, delay,logoWidth,lo
70
70
  if(animationDone && isLoaded){
71
71
  return React.isValidElement(children)?children:null;
72
72
  }
73
- return <Portal>
74
- <View style={[styles.container,{backgroundColor}]} testID={testID} id={testID}>
75
- {<View style={[StyleSheet.absoluteFill,{backgroundColor}]} testID={testID+"_Animation"}/>}
76
- <View style={styles.containerGlue} testID={testID+"_ContainerGlue"}>
77
- {(
78
- <Animated.View
79
- style={_staticBackground(logoOpacity, backgroundColor)}
80
- testID={testID+"_AnimationDone"}
81
- />
82
- )}
83
- {(
84
- React.isComponent(Component)? <Component testID={testID+"_CustomSplashComponent"}/> :
85
- <View testID={testID+"_LogoContainer"} style={[StyleSheet.absoluteFill,{backgroundColor}, styles.logoStyle]}>
86
- <Animated.View
87
- testID={testID+"_Logo"}
88
- style={_dynamicCustomComponentStyle(
89
- logoScale,
90
- logoOpacity,
91
- logoWidth,
92
- logoHeight
93
- )}>
94
- {<LogoProgress />}
95
- </Animated.View>
73
+ return <>
74
+ {!animationDone || !isLoaded ? <Portal>
75
+ <View style={[styles.container,{backgroundColor}]} testID={testID} id={testID}>
76
+ {<View style={[StyleSheet.absoluteFill,{backgroundColor}]} testID={testID+"_Animation"}/>}
77
+ <View style={styles.containerGlue} testID={testID+"_ContainerGlue"}>
78
+ {(
79
+ <Animated.View
80
+ style={_staticBackground(logoOpacity, backgroundColor)}
81
+ testID={testID+"_AnimationDone"}
82
+ />
83
+ )}
84
+ {(
85
+ React.isComponent(Component)? <Component testID={testID+"_CustomSplashComponent"}/> :
86
+ <View testID={testID+"_LogoContainer"} style={[StyleSheet.absoluteFill,{backgroundColor}, styles.logoStyle]}>
87
+ <Animated.View
88
+ testID={testID+"_Logo"}
89
+ style={_dynamicCustomComponentStyle(
90
+ logoScale,
91
+ logoOpacity,
92
+ logoWidth,
93
+ logoHeight
94
+ )}>
95
+ {<LogoProgress />}
96
+ </Animated.View>
97
+ </View>
98
+ )}
99
+ </View>
96
100
  </View>
97
- )}
98
- </View>
99
- </View>
100
- </Portal>
101
+ </Portal> : null}
102
+ </>
101
103
  }
102
104
 
103
105