@fto-consult/expo-ui 8.13.0 → 8.13.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.13.0",
3
+ "version": "8.13.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",
@@ -15,6 +15,7 @@ import {set as setSession,get as getSession} from "$session";
15
15
  import { showConfirm } from "$ecomponents/Dialog";
16
16
  import {close as closePreloader, isVisible as isPreloaderVisible} from "$epreloader";
17
17
  import SplashScreen from "$ecomponents/SplashScreen";
18
+ import {useAppComponent} from "$econtext/hooks";
18
19
  import {decycle} from "$cutils/json";
19
20
  import { setIsInitialized} from "$capp/utils";
20
21
  import {isObj,defaultObj,defaultStr} from "$cutils";
@@ -60,6 +61,7 @@ const NAVIGATION_PERSISTENCE_KEY = 'NAVIGATION_STATE';
60
61
  */
61
62
  function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
62
63
  AppStateService.init();
64
+ const SplashScreenComponent = useAppComponent("SplashScreen");
63
65
  const {FontsIconsFilter,beforeExit,AppWrapper,preferences:appPreferences,navigation,getStartedRouteName,components:{MainProvider}} = useContext();
64
66
  const {containerProps} = navigation;
65
67
  const [initialState, setInitialState] = React.useState(undefined);
@@ -284,7 +286,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
284
286
  <DropdownAlert ref={notificationRef}/>
285
287
  <ErrorBoundary>
286
288
  <StatusBar/>
287
- <SplashScreen isLoaded={isLoaded}>
289
+ <SplashScreen Component={SplashScreenComponent} isLoaded={isLoaded}>
288
290
  <PreferencesContext.Provider value={preferences}>
289
291
  {React.isValidElement(content) && content || child}
290
292
  </PreferencesContext.Provider>
@@ -113,24 +113,26 @@ class AnimatedSplash extends React.Component {
113
113
  },
114
114
  ],
115
115
  }
116
- const testID = defaultStr(testID,"RN_MainSplashScreen")
116
+ const testID = defaultStr(testID,"RN_MainSplashScreen");
117
+ const {Component} = this.props;
117
118
  return (
118
119
  <View testID={testID} style={[styles.container]}>
119
- {!animationDone && <View style={StyleSheet.absoluteFill} />}
120
- <View style={styles.containerGlue}>
120
+ {!animationDone && <View style={StyleSheet.absoluteFill} testID={`${testID}_AbsoluteFill`} />}
121
+ <View style={styles.containerGlue} testID={`${testID}_ContainerGlue`}>
121
122
  {!animationDone && (
122
123
  <Animated.View
124
+ testID={`${testID}_StaticBackground`}
123
125
  style={_staticBackground(logoOpacity, backgroundColor)}
124
126
  />
125
127
  )}
126
- <Animated.View style={[!disableAppScale && appScale, opacityClearToVisible, styles.flex]}>
128
+ <Animated.View testID={`${testID}_ChildrenContainer`} style={[!disableAppScale && appScale, opacityClearToVisible, styles.flex]}>
127
129
  {this.renderChildren()}
128
130
  </Animated.View>
129
- {!animationDone && (
130
- <View style={[StyleSheet.absoluteFill, styles.logoStyle]}>
131
+ {!animationDone && (React.isComponent(Component)? <Component testID={testID+"_CustomSplashComponent"}/> :
132
+ <View testID={`${testID}_AbsoluteFillContainer`} style={[StyleSheet.absoluteFill, styles.logoStyle]}>
131
133
  {<View testID={testID+"_LogoContainer"} style={[StyleSheet.absoluteFill,{backgroundColor}, styles.logoStyle]}>
132
134
  <Animated.View
133
- testID={testID+"_Logo"}
135
+ testID={testID+"_LogoProgressContainer"}
134
136
  style={_dynamicCustomComponentStyle(
135
137
  logoScale,
136
138
  logoOpacity,