@fto-consult/expo-ui 5.1.0 → 5.3.0

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/appConfig.txt CHANGED
@@ -20,4 +20,5 @@
20
20
  }
21
21
  getTableData : {function(tableName)=>table} retourne l'ojet table data,
22
22
  swrRefreshTimeout : {number} le délai d'inactivité auquel, une fois l'application active, les données de type listData sont rafraichies
23
+ handleHelpScreen : {boolean}, //if Help screen will be added on navigation's main drawer
23
24
  }
package/electron/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const {app, BrowserWindow,Tray,Menu,MenuItem,globalShortcut,systemPreferences,powerMonitor,ipcMain,dialog, nativeTheme} = require('electron')
2
- const appConfig = {};
3
2
  const session = require("./utils/session");
4
3
  const path = require("path");
5
4
  const fs = require("fs");
@@ -93,7 +93,7 @@ const removeListener = (channel, callback) => {
93
93
  };
94
94
  const ELECTRON = {
95
95
  get getPouchdb(){
96
- return (PouchDB,sqlPouch)=> {
96
+ return ({PouchDB,sqlPouch})=> {
97
97
  window.sqlitePlugin = {openDatabase:require('websql')};
98
98
  PouchDB.plugin(function CapacitorSqlitePlugin (PouchDB) {
99
99
  PouchDB.adapter('node-sqlite', sqlPouch(), true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -61,7 +61,7 @@
61
61
  "@emotion/native": "^11.10.0",
62
62
  "@expo/html-elements": "^0.2.0",
63
63
  "@expo/vector-icons": "^13.0.0",
64
- "@fto-consult/common": "^2.20.14",
64
+ "@fto-consult/common": "^3.3.3",
65
65
  "@gorhom/portal": "^1.0.14",
66
66
  "@react-native-async-storage/async-storage": "^1.17.11",
67
67
  "@react-native-community/datetimepicker": "^6.7.3",
@@ -70,7 +70,7 @@
70
70
  "@react-navigation/native": "^6.1.1",
71
71
  "@react-navigation/native-stack": "^6.9.7",
72
72
  "@shopify/flash-list": "^1.4.0",
73
- "expo": "^48.0.5",
73
+ "expo": "^48.0.7",
74
74
  "expo-camera": "~13.2.1",
75
75
  "expo-clipboard": "~4.1.1",
76
76
  "expo-font": "~11.1.1",
package/src/App.js CHANGED
@@ -40,7 +40,7 @@ Object.map(Utils,(v,i)=>{
40
40
  window[i] = v;
41
41
  }
42
42
  });
43
- export default function getIndex({onMount,onUnmount,onRender,preferences:appPreferences}){
43
+ export default function getIndex({onMount,onUnmount,onRender,preferences:appPreferences,...rest}){
44
44
  const isScreenFocusedRef = React.useRef(true);
45
45
  ///garde pour chaque écran sa date de dernière activité
46
46
  const screensRef = React.useRef({});//la liste des écrans actifs
@@ -186,7 +186,7 @@ export default function getIndex({onMount,onUnmount,onRender,preferences:appPref
186
186
  <DialogProvider responsive/>
187
187
  <AlertProvider SimpleSelect={SimpleSelect}/>
188
188
  <FormDataDialogProvider/>
189
- {<Index theme={theme}/>}
189
+ {<Index {...rest} theme={theme}/>}
190
190
  <ErrorBoundaryProvider/>
191
191
  <BottomSheetProvider/>
192
192
  </PreferencesContext.Provider>
@@ -66,6 +66,7 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
66
66
  }
67
67
  title = defaultVal(title,params.title,APP.getName());
68
68
  backActionProps = Object.assign({},backActionProps);
69
+ backActionProps.testID = defaultStr(backActionProps.testID,testID+"_BackAction");
69
70
 
70
71
  let BackActionComponent = backAction === false ? null : React.isComponent(backAction)? backAction : back ? Appbar.BackAction : Icon ;
71
72
  backActionProps.color = backActionProps.color && Colors.isValid(backActionProps.color)? backActionProps.color : anchorStyle.color;
@@ -90,6 +91,7 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
90
91
  children = {backAction}
91
92
  />
92
93
  }
94
+ console.log(backAction," is back actions");
93
95
  const [context] = React.useState({});
94
96
  actions = typeof actions =='function'? actions(getCallAgs()) : actions;
95
97
  const dimensions = Dimensions.get("window");
package/src/index.js CHANGED
@@ -33,7 +33,7 @@ const resetExitCounter = ()=>{
33
33
 
34
34
  const NAVIGATION_PERSISTENCE_KEY = 'NAVIGATION_STATE';
35
35
 
36
- function App(props) {
36
+ function App({init:initApp}) {
37
37
  AppStateService.init();
38
38
  const [initialState, setInitialState] = React.useState(undefined);
39
39
  const appReadyRef = React.useRef(true);
@@ -156,9 +156,9 @@ function App(props) {
156
156
  console.log(e," is net info heinn")
157
157
  });
158
158
  loadResources().finally(()=>{
159
- init().then(()=>{
159
+ (typeof initApp =='function'?initApp : init)().then(()=>{
160
160
  if(Auth.isLoggedIn()){
161
- Auth.loginUser(false);
161
+ Auth.loginUser(false);
162
162
  }
163
163
  setState({
164
164
  ...state,isInitialized:true,isLoading : false,
@@ -62,7 +62,7 @@ export default function ScreenWrapperNavComponent(_props){
62
62
  }
63
63
  },[]);
64
64
  setScreenOptions(options);
65
- const allowDrawer = typeof options.allowDrawer ==='boolean'? options.allowDrawer : typeof Screen.allowDrawer =='boolean'? Screen.allowDrawer : Screen.isModalScreen == true ? false : true;
65
+ const allowDrawer = typeof options.allowDrawer ==='boolean'? options.allowDrawer : typeof options.withDrawer =='boolean'? options.withDrawer : typeof Screen.allowDrawer =='boolean'? Screen.allowDrawer : Screen.isModalScreen == true ? false : true;
66
66
  return <Screen
67
67
  {...rest}
68
68
  key = {sanitizedName}