@fto-consult/expo-ui 6.67.12 → 6.67.13

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/metro.config.js CHANGED
@@ -52,8 +52,15 @@ module.exports = function(opts){
52
52
  'jsx', 'js','tsx',
53
53
  ]
54
54
 
55
+ // 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
56
+ config.resolver.disableHierarchicalLookup = true;
57
+
55
58
  // Remove all console logs in production...
56
59
  config.transformer.minifierConfig.compress.drop_console = false;
60
+
61
+ // 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`, @see : https://docs.expo.dev/guides/monorepos/
62
+ config.resolver.disableHierarchicalLookup = true;
63
+
57
64
  /*config.platforms = Array.isArray(config.platforms) && config.platforms || [];
58
65
  ['ios', 'android', 'windows', 'web',"electron"].map(p=>{
59
66
  if(!config.platforms.includes(p)){
@@ -61,6 +68,6 @@ module.exports = function(opts){
61
68
  }
62
69
  });*/
63
70
  ///on génère les librairies open sources utilisées par l'application
64
- require("./find-licenses");
71
+ //require("./find-licenses");
65
72
  return config;
66
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.67.12",
3
+ "version": "6.67.13",
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.57.8",
74
+ "@fto-consult/common": "^3.57.9",
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",
@@ -7,6 +7,7 @@ import View from "$ecomponents/View";
7
7
  import {isNativeMobile} from "$cplatform";
8
8
  import {defaultDecimal} from "$cutils";
9
9
  import {LogoProgress} from "$ecomponents/Logo";
10
+ import { Portal } from "react-native-paper";
10
11
  import {defaultStr} from "$cutils";
11
12
  import styles, {
12
13
  _solidBackground,
@@ -17,29 +18,28 @@ import styles, {
17
18
  _dynamicBackgroundOpacity,
18
19
  } from "./styles"
19
20
  import {useAppComponent} from "$econtext/hooks";
21
+ import theme from "$theme";
20
22
 
21
23
  const SplashScreenComponent = ({isLoaded,children , duration, delay,logoWidth,logoHeight,backgroundColor,imageBackgroundSource,imageBackgroundResizeMode,
22
24
  testID})=>{
23
25
  const [state,setState] = React.useState({
24
26
  animationDone: false,
25
- loadingProgress: new Animated.Value(0)
27
+ loadingProgress: new Animated.Value(0),
26
28
  });
27
- const { loadingProgress, animationDone } = state;
28
- const prevIsLoaded = React.usePrevious(isLoaded);
29
+ const { loadingProgress, animationDone} = state;
29
30
  React.useEffect(()=>{
30
- if(animationDone && (prevIsLoaded == isLoaded || !isLoaded)) return;
31
- if(!isNativeMobile()){
32
- setState({...state,animationDone:true});
31
+ if(!isLoaded){
32
+ setState({...state,loadingProgress : new Animated.Value(0),animationDone:false});
33
33
  } else {
34
34
  Animated.timing(loadingProgress, {
35
35
  toValue: 100,
36
- duration: duration || 1000,
36
+ duration: duration || 5000,
37
37
  delay: delay || 0,
38
- useNativeDriver: true,
38
+ useNativeDriver: isNativeMobile(),
39
39
  }).start(() => {
40
40
  setState({
41
41
  ...state,
42
- animationDone: true,
42
+ animationDone:true,
43
43
  })
44
44
  })
45
45
  }
@@ -67,34 +67,37 @@ const SplashScreenComponent = ({isLoaded,children , duration, delay,logoWidth,lo
67
67
  extrapolate: "clamp",
68
68
  }),
69
69
  }
70
- const child = (animationDone && isLoaded)? React.isValidElement(children) && children : null;
71
- if(animationDone && isLoaded) return child;
72
- return <View style={[styles.container]} testID={testID} id={testID}>
73
- {!animationDone ? <View style={StyleSheet.absoluteFill} testID={testID+"_Animation"}/> : null}
70
+ if(animationDone && isLoaded){
71
+ return React.isValidElement(children)?children:null;
72
+ }
73
+ return <Portal>
74
+ <View style={[styles.container,{backgroundColor}]} testID={testID} id={testID}>
75
+ {<View style={[StyleSheet.absoluteFill,{backgroundColor}]} testID={testID+"_Animation"}/>}
74
76
  <View style={styles.containerGlue} testID={testID+"_ContainerGlue"}>
75
- {!animationDone && (
77
+ {(
76
78
  <Animated.View
77
79
  style={_staticBackground(logoOpacity, backgroundColor)}
78
80
  testID={testID+"_AnimationDone"}
79
81
  />
80
82
  )}
81
- {!animationDone && (
82
- React.isComponent(Component)? <Component testID={testID+"_CustomSplashComponent"}/> :
83
- <View testID={testID+"_LogoContainer"} style={[StyleSheet.absoluteFill, styles.logoStyle]}>
84
- <Animated.View
85
- testID={testID+"_Logo"}
86
- style={_dynamicCustomComponentStyle(
87
- logoScale,
88
- logoOpacity,
89
- logoWidth,
90
- logoHeight
91
- )}>
92
- {<LogoProgress />}
93
- </Animated.View>
94
- </View>
83
+ {(
84
+ React.isComponent(Component)? <Component testID={testID+"_CustomSplashComponent"}/> :
85
+ <View testID={testID+"_LogoContainer"} style={[StyleSheet.absoluteFill,{backgroundColor}, styles.logoStyle]}>
86
+ <Animated.View
87
+ testID={testID+"_Logo"}
88
+ style={_dynamicCustomComponentStyle(
89
+ logoScale,
90
+ logoOpacity,
91
+ logoWidth,
92
+ logoHeight
93
+ )}>
94
+ {<LogoProgress />}
95
+ </Animated.View>
96
+ </View>
95
97
  )}
96
98
  </View>
97
99
  </View>
100
+ </Portal>
98
101
  }
99
102
 
100
103
 
@@ -70,4 +70,14 @@ export default {
70
70
  alignItems: "center",
71
71
  justifyContent: "center",
72
72
  },
73
+ mainContent : {
74
+ flex : 1,
75
+ width : "100%",
76
+ height : "100%",
77
+ },
78
+ animationNotFinished : {
79
+ opacity : 0,
80
+ width : 0,
81
+ height : 0,
82
+ },
73
83
  }
@@ -571,7 +571,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
571
571
  if(typeof this.props.clone ==='function' && this.props.clone(data,this) === false) return data;
572
572
  this.showPreloader();
573
573
  delete data.approved;
574
- Object.map(['_rev',...generatedColumnsProperties,...Object.keys(this.primaryKeyFields),'_id','code','updateBy','updatedDate','createBy','updatedHour','createdHour','createdDate'],(idx)=>{
574
+ Object.map(['_rev',...generatedColumnsProperties,...Object.keys(this.primaryKeyFields),'_id','code','updateBy',"created_at","updated_at",'updatedDate','createBy','updatedHour','createdHour','createdDate'],(idx)=>{
575
575
  data[idx] = undefined;
576
576
  delete data[idx];
577
577
  });