@fto-consult/expo-ui 2.5.4 → 2.5.6

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 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.4",
3
+ "version": "2.5.6",
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
- r.push({
31
- key : 'dataHelp',
32
- label : 'Aide',
33
- section : true,
34
- divider : false,
35
- items : [
36
- {
37
- icon : 'help',
38
- label : 'A propos de '+name,
39
- routeName : aboutScreenName,
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,4 @@
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
+
@@ -0,0 +1,19 @@
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
+ import Screen from "$elayouts/Screen/ScreenWithOrWithoutAuthContainer";
8
+
9
+ const NetworkLoginScreen = () => <Screen withScrollView title="Débuggin du réseau" subtitle = {false}>
10
+ <NetworkLogger
11
+ theme={theme.isDark()?"dark":undefined}
12
+ />
13
+ </Screen>;
14
+
15
+ NetworkLoginScreen.displayName = "NetworkLogin";
16
+ NetworkLoginScreen.authRequired = false;
17
+ NetworkLoginScreen.Modal = true;
18
+
19
+ export default NetworkLoginScreen;
@@ -0,0 +1,7 @@
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
+ export default function NetworkLoginScreen(){
6
+ return null;
7
+ }
@@ -1,6 +1,8 @@
1
1
  import Auth from "./Auth";
2
2
  import Help from "./Help";
3
+ import NetworkLoginScreen from "./NetworkLogin";
3
4
  export default [
4
5
  ...Auth,
5
6
  ...Help,
7
+ NetworkLoginScreen,
6
8
  ]