@fto-consult/expo-ui 6.6.9 → 6.7.2
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.
|
|
3
|
+
"version": "6.7.2",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"fix-dependencies": "expo-cli doctor --fix-dependencies",
|
|
42
42
|
"delete-node-modules": "rimraf ./**/node_modules",
|
|
43
43
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
|
44
|
-
"update": "npm i @emotion/native@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest sharp-cli@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
|
|
44
|
+
"update": "npm i expo @emotion/native@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest sharp-cli@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
|
|
45
45
|
},
|
|
46
46
|
"bin": "./bin/index.js",
|
|
47
47
|
"repository": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@react-navigation/native-stack": "^6.9.13",
|
|
74
74
|
"@shopify/flash-list": "1.4.3",
|
|
75
75
|
"apexcharts": "^3.41.0",
|
|
76
|
-
"expo": "^49.0.
|
|
76
|
+
"expo": "^49.0.4",
|
|
77
77
|
"expo-camera": "~13.4.2",
|
|
78
78
|
"expo-clipboard": "~4.3.0",
|
|
79
79
|
"expo-font": "~11.4.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"react-native-svg": "13.9.0",
|
|
107
107
|
"react-native-web": "~0.19.6",
|
|
108
108
|
"react-native-webview": "13.2.2",
|
|
109
|
-
"react-virtuoso": "^4.4.
|
|
109
|
+
"react-virtuoso": "^4.4.1",
|
|
110
110
|
"sharp-cli": "^4.1.1",
|
|
111
111
|
"tippy.js": "^6.3.7",
|
|
112
112
|
"websql": "^2.0.3",
|
|
@@ -286,7 +286,7 @@ class SwiperComponent extends React.Component {
|
|
|
286
286
|
childrenProps = Array.isArray(childrenProps)? childrenProps : [];
|
|
287
287
|
const isReady = customHeight > 40 ? true : false;
|
|
288
288
|
const autoHeight = !!this.props.autoHeight;
|
|
289
|
-
const height = autoHeight ?
|
|
289
|
+
const height = autoHeight ? undefined : !isReady ? WIDTH_HEIGHT : customHeight;
|
|
290
290
|
if(withScrollView){
|
|
291
291
|
wrapperProps.nestedScrollEnabled = typeof wrapperProps.nestedScrollEnabled ==="boolean"? wrapperProps.nestedScrollEnabled : isNative;
|
|
292
292
|
if(typeof wrapperProps.showsVerticalScrollIndicator !=='boolean'){
|
|
@@ -440,7 +440,7 @@ const styles = {
|
|
|
440
440
|
backgroundColor: 'transparent',
|
|
441
441
|
},
|
|
442
442
|
// Fix web vertical scaling (like expo v33-34)
|
|
443
|
-
container: (positionFixed, x, y, width, height,autoHeight) => ({
|
|
443
|
+
container: (positionFixed, x, y, width, height,autoHeight) => addAutoHeight(({
|
|
444
444
|
backgroundColor: 'transparent',
|
|
445
445
|
// Fix safari vertical bounces
|
|
446
446
|
position: positionFixed ? 'fixed' : 'relative',
|
|
@@ -449,18 +449,16 @@ const styles = {
|
|
|
449
449
|
top: positionFixed ? y : 0,
|
|
450
450
|
left: positionFixed ? x : 0,
|
|
451
451
|
width,
|
|
452
|
-
height:!autoHeight ? undefined : height,
|
|
453
452
|
justifyContent: 'flex-start',
|
|
454
453
|
alignItems : 'flex-start',
|
|
455
|
-
}),
|
|
456
|
-
swipeArea: (vertical, count, width, height,autoHeight) => ({
|
|
454
|
+
}),height,autoHeight),
|
|
455
|
+
swipeArea: (vertical, count, width, height,autoHeight) => addAutoHeight(({
|
|
457
456
|
position: 'relative',
|
|
458
457
|
top: 0,
|
|
459
458
|
left: 0,
|
|
460
459
|
width:vertical ? width : width * count,
|
|
461
|
-
height:!autoHeight ? undefined : vertical ? height * count : height,
|
|
462
460
|
flexDirection: vertical ? 'column' : 'row',
|
|
463
|
-
}),
|
|
461
|
+
}),typeof height ==='number'? (vertical ? height * count : height) : undefiend,autoHeight),
|
|
464
462
|
scrollViewContentContainer : {
|
|
465
463
|
paddingBottom : 40,
|
|
466
464
|
flex : 1,
|
|
@@ -473,4 +471,11 @@ const styles = {
|
|
|
473
471
|
}
|
|
474
472
|
};
|
|
475
473
|
|
|
474
|
+
const addAutoHeight = (style,height,autoHeight)=>{
|
|
475
|
+
if(height !== undefined && autoHeight){
|
|
476
|
+
style.height = height;
|
|
477
|
+
}
|
|
478
|
+
return style;
|
|
479
|
+
}
|
|
480
|
+
|
|
476
481
|
export default SwiperComponent;
|
|
@@ -12,18 +12,27 @@ import Logo from "$ecomponents/Logo";
|
|
|
12
12
|
const DrawerNavigator = React.forwardRef(({content,children,state,...props},ref)=>{
|
|
13
13
|
const drawerRef = React.useRef(null);
|
|
14
14
|
const mergedRefs = React.useMergeRefs(drawerRef,ref);
|
|
15
|
+
const forceRender = React.useForceRender();
|
|
16
|
+
const refreshItemsRef = React.useRef(false);
|
|
15
17
|
const items = useGetItems({refresh:()=>{
|
|
16
18
|
if(drawerRef.current && drawerRef.current && drawerRef.current.forceRenderNavigationView){
|
|
17
19
|
return drawerRef.current.forceRenderNavigationView();
|
|
18
20
|
}
|
|
19
|
-
}});
|
|
21
|
+
},force:refreshItemsRef.current});
|
|
20
22
|
React.useEffect(()=>{
|
|
21
23
|
const onLogoutUser = ()=>{
|
|
22
24
|
setIsLoggedIn(false);
|
|
23
25
|
}
|
|
26
|
+
const refreshItems = ()=>{
|
|
27
|
+
refreshItemsRef.current = true;
|
|
28
|
+
forceRender();
|
|
29
|
+
refreshItemsRef.current = false;
|
|
30
|
+
};
|
|
24
31
|
APP.on(APP.EVENTS.AUTH_LOGOUT_USER,onLogoutUser);
|
|
32
|
+
APP.on(APP.EVENTS.UPDATE_THEME,refreshItems);
|
|
25
33
|
return ()=>{
|
|
26
34
|
APP.off(APP.EVENTS.AUTH_LOGOUT_USER,onLogoutUser);
|
|
35
|
+
APP.off(APP.EVENTS.UPDATE_THEME,refreshItems);
|
|
27
36
|
}
|
|
28
37
|
},[])
|
|
29
38
|
const headerCB = ({isMinimized})=>{
|
|
@@ -29,12 +29,12 @@ const useGetItems = (options)=>{
|
|
|
29
29
|
APP.on(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
|
|
30
30
|
APP.on(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
|
|
31
31
|
APP.on(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
|
|
32
|
-
APP.on(APP.EVENTS.UPDATE_THEME,refreshItems);
|
|
32
|
+
//APP.on(APP.EVENTS.UPDATE_THEME,refreshItems);
|
|
33
33
|
return ()=>{
|
|
34
34
|
APP.off(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
|
|
35
35
|
APP.off(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
|
|
36
36
|
APP.off(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
|
|
37
|
-
APP.off(APP.EVENTS.UPDATE_THEME,onLogoutUser);
|
|
37
|
+
//APP.off(APP.EVENTS.UPDATE_THEME,onLogoutUser);
|
|
38
38
|
}
|
|
39
39
|
},[])
|
|
40
40
|
return useMemo(()=>{
|