@fto-consult/expo-ui 6.67.13 → 6.67.15
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.
|
3
|
+
"version": "6.67.15",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^3.
|
74
|
+
"@fto-consult/common": "^3.58.0",
|
75
75
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
76
76
|
"@react-native-async-storage/async-storage": "1.18.2",
|
77
77
|
"@react-native-community/datetimepicker": "7.2.0",
|
package/src/AppEntry/App.js
CHANGED
@@ -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
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
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
|
-
|
99
|
-
</View>
|
100
|
-
</Portal>
|
101
|
+
</Portal> : null}
|
102
|
+
</>
|
101
103
|
}
|
102
104
|
|
103
105
|
|