@fto-consult/expo-ui 5.1.0 → 5.2.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/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.2.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": "^2.21.4",
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>
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,