@fto-consult/expo-ui 8.25.2 → 8.25.4
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/babel.config.alias.js +1 -0
- package/babel.config.js +0 -3
- package/package.json +1 -1
- package/src/App.js +3 -3
- package/src/AppEntry/index.js +2 -1
- package/src/context/hooks.js +1 -2
- package/src/screens/Help/openLibraries.js +1 -1
package/babel.config.alias.js
CHANGED
@@ -12,6 +12,7 @@ module.exports = (opts)=>{
|
|
12
12
|
opts.withPouchDB = opts.withPouchDB !== false && opts.withPouchdb !== false ? true : false;
|
13
13
|
delete opts.withPouchdb;
|
14
14
|
const expoUI = opts.isWeb === true ? require("./expo-ui-path")() : path.resolve(projectRoot,"node_modules","@fto-consult","expo-ui");
|
15
|
+
console.log(expoUI," is expo ui and is web is ",opts.isWeb);
|
15
16
|
const r = require("@fto-consult/common/babel.config.alias")(opts);
|
16
17
|
const expo = path.resolve(expoUI,"src");
|
17
18
|
r["$ecomponents"] = r["$expo-components"] = path.resolve(expo,"components");
|
package/babel.config.js
CHANGED
@@ -13,9 +13,6 @@ module.exports = function(api,opts) {
|
|
13
13
|
}
|
14
14
|
/*** par défaut, les variables d'environnements sont stockés dans le fichier .env situé à la racine du projet, référencée par la prop base */
|
15
15
|
const alias = require("./babel.config.alias")(options);
|
16
|
-
if(false && !isWeb){
|
17
|
-
alias.uuid = path.resolve(__dirname,"src","uuid");
|
18
|
-
}
|
19
16
|
if(typeof options.aliasMutator =="function"){
|
20
17
|
options.aliasMutator({...options,alias});
|
21
18
|
}
|
package/package.json
CHANGED
package/src/App.js
CHANGED
@@ -18,6 +18,7 @@ import App from "./AppEntry";
|
|
18
18
|
|
19
19
|
export default function ExpoUIAppEntryProvider({children:cChildren,init,...rest}){
|
20
20
|
const [children,setChildren] = useState(null);
|
21
|
+
return null;
|
21
22
|
const canInit = typeof session.init =="function";
|
22
23
|
useEffect(()=>{
|
23
24
|
if(!canInit) return ()=>{}
|
@@ -27,7 +28,6 @@ export default function ExpoUIAppEntryProvider({children:cChildren,init,...rest}
|
|
27
28
|
</Provider>);
|
28
29
|
});
|
29
30
|
},[]);
|
30
|
-
|
31
|
-
<App init={init} children={cChildren}
|
32
|
-
</Provider>;
|
31
|
+
console.log("can init is cna idddd",canInit);
|
32
|
+
return canInit ? children : <Provider {...rest}><App init={init} children={cChildren}/></Provider>;
|
33
33
|
}
|
package/src/AppEntry/index.js
CHANGED
@@ -269,6 +269,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
|
|
269
269
|
/>
|
270
270
|
</NavigationContainer> : null;
|
271
271
|
const content = isLoaded ? typeof children == 'function'? children({children:child,appConfig,config:appConfig}) : child : null;
|
272
|
+
console.log(content," will rendddddddddddd")
|
272
273
|
const myChildren = <PreferencesContext.Provider value={preferences}>
|
273
274
|
{isLoaded ? React.isValidElement(content) && content || child : null}
|
274
275
|
</PreferencesContext.Provider>;
|
@@ -292,7 +293,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
|
|
292
293
|
<DropdownAlert ref={notificationRef}/>
|
293
294
|
<ErrorBoundary>
|
294
295
|
<StatusBar/>
|
295
|
-
{withSplashScreen
|
296
|
+
{withSplashScreen !== false || false ? <SplashScreen
|
296
297
|
children = {myChildren}
|
297
298
|
isLoaded = {isLoaded}
|
298
299
|
Component = {SplashScreenComponent}
|
package/src/context/hooks.js
CHANGED
@@ -5,10 +5,9 @@ import {isObj,isNonNullString,extendObj} from "$cutils";
|
|
5
5
|
import { StyleSheet } from "react-native";
|
6
6
|
import { createContext,useContext as useReactContext } from "react";
|
7
7
|
import _useSWR from "$swr";
|
8
|
-
|
9
8
|
export const ExpoUIContext = createContext(null);
|
10
9
|
|
11
|
-
export const useExpoUI = ()=> useReactContext(ExpoUIContext);
|
10
|
+
export const useExpoUI = ()=> (useReactContext(ExpoUIContext) || {});
|
12
11
|
|
13
12
|
export default useExpoUI;
|
14
13
|
|