@fto-consult/expo-ui 8.14.2 → 8.14.3

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": "8.14.2",
3
+ "version": "8.14.3",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",
package/src/App.js CHANGED
@@ -13,8 +13,8 @@ import App from "./AppEntry";
13
13
  * }
14
14
  */
15
15
 
16
- export default function ExpoUIAppEntryProvider({children,withSplashScreen,init,...rest}){
16
+ export default function ExpoUIAppEntryProvider({children,init,...rest}){
17
17
  return <Provider {...rest}>
18
- <App withSplashScreen = {withSplashScreen} init={init} children={children}/>
18
+ <App init={init} children={children}/>
19
19
  </Provider>
20
20
  }
@@ -59,10 +59,10 @@ const NAVIGATION_PERSISTENCE_KEY = 'NAVIGATION_STATE';
59
59
  * initialRouteName : la route initiale par défaut
60
60
  * getStartedRouteName : la route par défaut de getStarted lorsque l'application est en mode getStarted, c'est à dire lorsque la fonction init renvoie une erreur (reject)
61
61
  */
62
- function App({init:initApp,initialRouteName:appInitialRouteName,children,withSplashScreen}) {
62
+ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
63
63
  AppStateService.init();
64
64
  const SplashScreenComponent = useAppComponent("SplashScreen");
65
- const {FontsIconsFilter,beforeExit,AppWrapper,preferences:appPreferences,navigation,getStartedRouteName,components:{MainProvider}} = useContext();
65
+ const {FontsIconsFilter,beforeExit,AppWrapper,preferences:appPreferences,navigation,getStartedRouteName,withSplashScreen,components:{MainProvider}} = useContext();
66
66
  const {containerProps} = navigation;
67
67
  const [initialState, setInitialState] = React.useState(undefined);
68
68
  const appReadyRef = React.useRef(true);
@@ -266,9 +266,9 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children,withSpl
266
266
  />
267
267
  </NavigationContainer> : null;
268
268
  const content = isLoaded ? typeof children == 'function'? children({children:child,appConfig,config:appConfig}) : child : null;
269
- const SplashComponent = withSplashScreen === false ? React.Fragment : SplashScreen;
270
- console.log("with splassschend dis ",withSplashScreen," and ",splashProps);
271
- const splashProps = withSplashScreen === false ? {} : {isLoaded,Component:SplashScreenComponent};
269
+ const myChildren = <PreferencesContext.Provider value={preferences}>
270
+ {isLoaded ? React.isValidElement(content) && content || child : null}
271
+ </PreferencesContext.Provider>;
272
272
  return <SafeAreaProvider>
273
273
  <AppEntryRootView MainProvider={MainProvider} isInitialized={state.hasCallInitApp} isLoading={isLoading} hasGetStarted={hasGetStarted} isLoaded={isLoaded}>
274
274
  <PaperProvider
@@ -289,11 +289,11 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children,withSpl
289
289
  <DropdownAlert ref={notificationRef}/>
290
290
  <ErrorBoundary>
291
291
  <StatusBar/>
292
- <SplashComponent {...splashProps}>
293
- <PreferencesContext.Provider value={preferences}>
294
- {isLoaded ? React.isValidElement(content) && content || child : null}
295
- </PreferencesContext.Provider>
296
- </SplashComponent>
292
+ {withSplashScreen !== false ? <SplashScreen
293
+ children = {myChildren}
294
+ isLoaded = {isLoaded}
295
+ Component = {SplashScreenComponent}
296
+ /> : myChildren}
297
297
  </ErrorBoundary>
298
298
  </Portal.Host>
299
299
  </PaperProvider>