@fto-consult/expo-ui 2.5.4 → 2.5.5
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/index.js +5 -0
- package/package.json +3 -2
- package/src/components/Table/index.js +2 -2
- package/src/navigation/Drawer/items/index.js +28 -13
- package/src/screens/NetWork +4 -0
- package/src/screens/NetworkLogin/index.js +15 -0
- package/src/screens/NetworkLogin/index.web.js +7 -0
- package/src/screens/mainScreens.js +2 -0
package/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import {Platform } from 'react-native';
|
|
|
3
3
|
import { createRoot } from 'react-dom/client';
|
|
4
4
|
import appConfig from "$capp/config";
|
|
5
5
|
import { activateKeepAwake } from 'expo-keep-awake';
|
|
6
|
+
import { startNetworkLogging } from 'react-native-network-logger';
|
|
6
7
|
if (__DEV__) {
|
|
7
8
|
activateKeepAwake();
|
|
8
9
|
}
|
|
@@ -25,5 +26,9 @@ export default function ExpoUIApp (options){
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
if(__DEV__ && !isWeb){
|
|
30
|
+
startNetworkLogging();
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
///fix bug lié au fait que l'application stuck on splashscreen en environnement mobile
|
|
29
34
|
!isWeb && registerRootComponent(x=>null);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"resolutions": {
|
|
7
|
-
"@expo/cli": "xxx"
|
|
7
|
+
"@expo/cli": "xxx"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"publish1": "npm publish --access=public",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"react-native": "0.70.5",
|
|
98
98
|
"react-native-big-list": "^1.5.5",
|
|
99
99
|
"react-native-gesture-handler": "~2.8.0",
|
|
100
|
+
"react-native-network-logger": "^1.13.0",
|
|
100
101
|
"react-native-paper": "^4.12.5",
|
|
101
102
|
"react-native-paper-dates": "^0.9.2",
|
|
102
103
|
"react-native-reanimated": "~2.12.0",
|
|
@@ -86,7 +86,7 @@ const TableComponent = React.forwardRef(({containerProps,renderEmpty,isRowSelect
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
headers[columnField] = <View testID={testID+"_HeaderCell_"+columnField} {...headerCellContainerProps} {...hContainerProps} key={columnField} style={[styles.headerItem,styles.headerItemOrCell,headerCellContainerProps.style,hContainerProps.style,style]}>
|
|
89
|
-
<Label style={[theme.styles.w100,theme.styles.h100]} textBold primary>{content}</Label>
|
|
89
|
+
<Label splitText numberOfLines={2} style={[theme.styles.w100,theme.styles.h100,{maxHeight:70}]} textBold primary>{content}</Label>
|
|
90
90
|
</View>;
|
|
91
91
|
if(typeof renderFilterCell =='function'){
|
|
92
92
|
const filterCell = renderFilterCell(colArgs);
|
|
@@ -164,7 +164,7 @@ const TableComponent = React.forwardRef(({containerProps,renderEmpty,isRowSelect
|
|
|
164
164
|
scrollEventThrottle,
|
|
165
165
|
horizontal : true,
|
|
166
166
|
...scrollViewProps,
|
|
167
|
-
style : [scrollViewProps.style],
|
|
167
|
+
style : [{maxHeight:130},scrollViewProps.style],
|
|
168
168
|
contentContainerStyle : [styles.scrollView,scrollViewProps.contentContainerStyle,scrollViewFlexGrow,scrollContentContainerStyle]
|
|
169
169
|
}
|
|
170
170
|
const listWidth = '100%';
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { isRouteActive} from "$cnavigation";
|
|
6
6
|
import "$cutils";
|
|
7
|
+
import appConfig from "$capp/config";
|
|
8
|
+
import {isMobileNative} from "$platform";
|
|
9
|
+
import NetworkLoginScreen from "$escreens/NetworkLogin";
|
|
10
|
+
import {defaultVal} from "$utils";
|
|
7
11
|
import APP from "$capp";
|
|
8
12
|
///les items du drawer
|
|
9
13
|
import items from "$drawerItems";
|
|
@@ -12,6 +16,7 @@ import { screenName as aboutScreenName} from "$escreens/Help/About";
|
|
|
12
16
|
export const getItems = (force)=>{
|
|
13
17
|
const name = APP.getName();
|
|
14
18
|
const itx = typeof items === "function" ? items() : items;
|
|
19
|
+
const handleHelp = defaultVal(appConfig.get("handleHelpScreen"));
|
|
15
20
|
const r = [
|
|
16
21
|
{
|
|
17
22
|
label : name,
|
|
@@ -27,19 +32,29 @@ export const getItems = (force)=>{
|
|
|
27
32
|
}
|
|
28
33
|
})
|
|
29
34
|
r.push({divider:true});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
if(handleHelp){
|
|
36
|
+
const dataHelp = {
|
|
37
|
+
key : 'dataHelp',
|
|
38
|
+
label : 'Aide',
|
|
39
|
+
section : true,
|
|
40
|
+
divider : false,
|
|
41
|
+
items : [
|
|
42
|
+
{
|
|
43
|
+
icon : 'help',
|
|
44
|
+
label : 'A propos de '+name,
|
|
45
|
+
routeName : aboutScreenName,
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
};
|
|
49
|
+
if(__DEV__ && isMobileNative()){
|
|
50
|
+
dataHelp.items.unshift({
|
|
51
|
+
icon : 'math-log',
|
|
52
|
+
label : 'Inpecter les requêtes réseau',
|
|
53
|
+
routeName : NetworkLoginScreen.screenName,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
r.push(dataHelp);
|
|
57
|
+
}
|
|
43
58
|
return r;
|
|
44
59
|
}
|
|
45
60
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import NetworkLogger from 'react-native-network-logger';
|
|
6
|
+
import theme from "$theme";
|
|
7
|
+
|
|
8
|
+
const NetworkLoginScreen = () => <NetworkLogger
|
|
9
|
+
theme={theme.isDark()?"dark":undefined}
|
|
10
|
+
/>;
|
|
11
|
+
|
|
12
|
+
NetworkLoginScreen.displayName = "NetworkLogin";
|
|
13
|
+
NetworkLoginScreen.authRequired = false;
|
|
14
|
+
|
|
15
|
+
export default NetworkLoginScreen;
|