@fto-consult/expo-ui 6.20.20 → 6.20.22

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.
@@ -1,5 +1,12 @@
1
+ const path = require("path");
1
2
  module.exports = function(api) {
3
+ const projectRoot = process.cwd();
4
+ const $src = path.resolve(projectRoot,"src");
2
5
  const alias = {
6
+ $src,
7
+ $component : path.resolve($src,"component"),
8
+ $navigation : path.relative($src,"navigation"),
9
+ $screens : path.resolve($src,"screens"),
3
10
  //your custom module resolver alias, @see : https://www.npmjs.com/package/babel-plugin-module-resolver
4
11
  }
5
12
  return require("@fto-consult/expo-ui/babel.config")(api,{
@@ -1,6 +1,7 @@
1
1
  import registerApp from "$expo-ui-root-path";
2
- import screens from "./src/screens";
3
- import drawerItems from "./src/navigation/drawerItems";
2
+ import screens from "$screens";
3
+ import drawerItems from "$navigation/drawerItems";
4
+ import Logo from "$components/Logo";
4
5
 
5
6
  registerApp({
6
7
  /**** application navigation */
@@ -11,7 +12,7 @@ registerApp({
11
12
  },
12
13
  /**application components */
13
14
  components : {
14
- logo : null,//logo component's properties
15
+ logo : Logo,//logo component's properties
15
16
  loginPropsMutator : {},//login props mutator
16
17
  },
17
18
  /*** //for application initialization
@@ -0,0 +1,6 @@
1
+ import Label from "$ecomponents/Label";
2
+ import appConfig from "$capp/config";
3
+
4
+ export default function LogoComponent(props){
5
+ return <Label primary textBolx>{appConfig.name}</Label>
6
+ }
package/bin/create-app.js CHANGED
@@ -12,7 +12,7 @@ module.exports = function(parsedArgs,{projectRoot:root}){
12
12
  }
13
13
  const devDependencies = packageObj.devDependencies;
14
14
  const inSameFolder = typeof mainPackage?.name =="string" && mainPackage?.name.trim().toLowerCase() === name?.toLowerCase().trim();
15
- const projectRoot = path.join(`${root}/${inSameFolder && name || ""}`);
15
+ const projectRoot = path.join(`${root}/${!inSameFolder && name || ""}`);
16
16
  createDirSync(projectRoot);
17
17
  const mainPackagePath = path.join(projectRoot,"package.json");
18
18
  mainPackage = fs.existsSync(mainPackagePath) && require(`${mainPackagePath}`) || null;
package/index.js CHANGED
@@ -20,7 +20,7 @@ export default function registerApp ({onMount,onUnmount,onRender,render,swrConfi
20
20
  const component = function(props){
21
21
  return <Provider {...props} {...rest} swrConfig={isObj(swrConfig) && swrConfig || {}} children={<App init={init} render={render} onMount={onMount} onUnmount={onUnmount} onRender={onRender}/>}/>
22
22
  };
23
- return isWeb ? registerRootComponent(component) : AppRegistry.registerComponent('main',() => component);
23
+ return AppRegistry.registerComponent('main',() => component);
24
24
  }
25
25
 
26
26
  ///fix bug lié au fait que l'application stuck on splashscreen en environnement mobile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.20.20",
3
+ "version": "6.20.22",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {