@fto-consult/expo-ui 6.70.1 → 6.70.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": "6.70.1",
3
+ "version": "6.70.3",
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.58.1",
74
+ "@fto-consult/common": "^3.59.3",
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",
@@ -42,8 +42,7 @@ import { StyleSheet } from "react-native";
42
42
  import Logo from "$ecomponents/Logo";
43
43
  import AppEntryRootView from "./RootView";
44
44
  import { SafeAreaProvider } from 'react-native-safe-area-context';
45
- import { Dimensions,Keyboard } from 'react-native';
46
- import {isTouchDevice} from "$platform";
45
+ import {Keyboard } from 'react-native';
47
46
 
48
47
 
49
48
  let MAX_BACK_COUNT = 1;
@@ -81,6 +81,7 @@ const AutoSizerVerticalComponent = React.forwardRef(({onLayout,isScrollView,scre
81
81
  if(canUpdate && typeof getRenderingStyle ==='function'){
82
82
  getRenderingStyle({...cStyle,...restStyle});
83
83
  }
84
+ return children;
84
85
  return <View ref={layoutRef}
85
86
  onLayout={(a,b,c)=>{
86
87
  if(onLayout && onLayout(a,b,c) === false) return;
@@ -213,7 +213,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
213
213
  });
214
214
  const dataRef = React.useRef(null);
215
215
  const totalRef = React.useRef(0);
216
- const loading = (customIsLoading === true || isLoading || (isValidating && showProgressRef.current));
216
+ const loading = (customIsLoading === true || isLoading || (false && isValidating && showProgressRef.current));
217
217
  const {data,total} = React.useMemo(()=>{
218
218
  if((loading && customIsLoading !== false) || !isObjOrArray(result)){
219
219
  return {data:dataRef.current,total:totalRef.current};
@@ -1,27 +1,9 @@
1
1
  import React from '$react';
2
2
  import { ScrollView} from 'react-native';
3
3
  import PropTypes from "prop-types";
4
- import {defaultStr,defaultObj} from "$cutils";
5
- import {Vertical as AutoSizeVertical} from "$ecomponents/AutoSizer";
6
- import {isWeb} from "$cplatform";
7
4
 
8
5
  const ScrollViewComponent = React.forwardRef(({withAutoSizer,autoSizerProps,testID,...rest},ref) => {
9
6
  return <ScrollView testID={testID} {...rest} ref={ref}/>
10
- testID = defaultStr(testID,'RN_ScrollViewComponent');
11
- const autoSize = React.useRef(withAutoSizer).current;
12
- if(!autoSize || rest.horizontal === true || rest.vertical === false){
13
- return <ScrollView testID={testID} ref={ref} {...rest}/>
14
- }
15
- autoSizerProps = defaultObj(autoSizerProps);
16
- const autoSizerRef = React.useRef(null);
17
- return <AutoSizeVertical ref={autoSizerRef} isScrollView {...autoSizerProps} testID={testID+"_ScrollViewContainer"}>
18
- <ScrollView
19
- ref={ref} {...rest}
20
- testID={testID}
21
- style = {[{flex:1}]}
22
- contentContainerStyle = {[{flex:1,height:'100%'},rest.contentContainerStyle]}
23
- />
24
- </AutoSizeVertical>
25
7
  });
26
8
 
27
9
  ScrollViewComponent.displayName = "ScrollViewComponent";
@@ -6,6 +6,7 @@ import {defaultStr,isObj,defaultObj} from "$cutils";
6
6
  const AutoSizeVerticalList = React.forwardRef(({testID,autoSizerProps,...props},ref)=>{
7
7
  testID = defaultStr(testID,"RN_AutoSizeVerticalListComponent")
8
8
  autoSizerProps = defaultObj(autoSizerProps);
9
+ return <List {...props} style={[props.style]} ref={ref}/>;
9
10
  return <AutoSizeVertical withPadding={false} testID={testID+"_AutoSizerVertical"} {...autoSizerProps} >
10
11
  <List {...props} style={[props.style]} ref={ref}/>
11
12
  </AutoSizeVertical>
@@ -12,9 +12,9 @@ import { screenName as aboutScreenName} from "$escreens/Help/About";
12
12
  import theme from "$theme";
13
13
  import APP from "$capp/instance";
14
14
  import useExpoUI from "$econtext/hooks";
15
- import Auth from "$cauth";
15
+ import Auth,{useIsSignedIn} from "$cauth";
16
16
  import {getTableDataListRouteName} from "$enavigation/utils";
17
- import {isValidElement} from "$react";
17
+ import {isValidElement,usePrevious} from "$react";
18
18
 
19
19
  const useGetItems = (options)=>{
20
20
  const {navigation:{drawerItems,drawerSections,drawerItemsMutator},tablesData} = useContext();
@@ -24,6 +24,7 @@ const useGetItems = (options)=>{
24
24
  const {handleHelpScreen} = useExpoUI();
25
25
  const handleHelp = handleHelpScreen !== false;
26
26
  const refreshItemsRef = useRef(false);
27
+ const isSignedIn = useIsSignedIn();
27
28
  useEffect(()=>{
28
29
  const refreshItems = (...a)=>{
29
30
  refreshItemsRef.current = !refreshItemsRef.current;
@@ -32,13 +33,9 @@ const useGetItems = (options)=>{
32
33
  }
33
34
  }
34
35
  APP.on(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
35
- APP.on(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
36
- APP.on(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
37
36
  //APP.on(APP.EVENTS.UPDATE_THEME,refreshItems);
38
37
  return ()=>{
39
38
  APP.off(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
40
- APP.off(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
41
- APP.off(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
42
39
  //APP.off(APP.EVENTS.UPDATE_THEME,refreshItems);
43
40
  }
44
41
  },[])
@@ -140,7 +137,7 @@ const useGetItems = (options)=>{
140
137
  }
141
138
  });
142
139
  return items;
143
- },[showProfilOnDrawer,handleHelp,refreshItemsRef.current,force])
140
+ },[showProfilOnDrawer,handleHelp,refreshItemsRef.current,force,isSignedIn])
144
141
  }
145
142
 
146
143
  export default useGetItems;