@fto-consult/expo-ui 6.66.1 → 6.66.4
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 +2 -2
- package/src/AppEntry/App.js +3 -6
- package/src/context/Provider.js +2 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "6.66.
|
3
|
+
"version": "6.66.4",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^3.56.
|
74
|
+
"@fto-consult/common": "^3.56.6",
|
75
75
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
76
76
|
"@react-native-async-storage/async-storage": "1.18.2",
|
77
77
|
"@react-native-community/datetimepicker": "7.2.0",
|
package/src/AppEntry/App.js
CHANGED
@@ -30,7 +30,6 @@ import { DialogProvider as FormDataDialogProvider } from '$eform/FormData';
|
|
30
30
|
import ErrorBoundaryProvider from "$ecomponents/ErrorBoundary/Provider";
|
31
31
|
import notify, {notificationRef} from "$notify";
|
32
32
|
import DropdownAlert from '$ecomponents/Dialog/DropdownAlert';
|
33
|
-
import {AuthProvider} from '$cauth';
|
34
33
|
import { PreferencesContext } from '../Preferences';
|
35
34
|
import ErrorBoundary from "$ecomponents/ErrorBoundary";
|
36
35
|
import {updateTheme,defaultTheme} from "$theme";
|
@@ -63,7 +62,7 @@ const NAVIGATION_PERSISTENCE_KEY = 'NAVIGATION_STATE';
|
|
63
62
|
*/
|
64
63
|
function App({init:initApp,initialRouteName:appInitialRouteName,render}) {
|
65
64
|
AppStateService.init();
|
66
|
-
const {FontsIconsFilter,beforeExit,preferences:appPreferences,navigation,getStartedRouteName
|
65
|
+
const {FontsIconsFilter,beforeExit,preferences:appPreferences,navigation,getStartedRouteName} = useContext();
|
67
66
|
const {containerProps} = navigation;
|
68
67
|
const [initialState, setInitialState] = React.useState(undefined);
|
69
68
|
const appReadyRef = React.useRef(true);
|
@@ -271,8 +270,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render}) {
|
|
271
270
|
/>
|
272
271
|
</NavigationContainer> : null;
|
273
272
|
const content = isLoaded ? typeof render == 'function'? render({children:child,appConfig,config:appConfig}) : child : null;
|
274
|
-
return <
|
275
|
-
<SafeAreaProvider>
|
273
|
+
return <SafeAreaProvider>
|
276
274
|
<GestureHandlerRootView testID={"RN_MainAppGestureHanleRootView"} style={styles.gesture}>
|
277
275
|
<AppEntryRootView>
|
278
276
|
<PaperProvider
|
@@ -303,8 +301,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render}) {
|
|
303
301
|
</PaperProvider>
|
304
302
|
</AppEntryRootView>
|
305
303
|
</GestureHandlerRootView>
|
306
|
-
|
307
|
-
</AuthProvider>;
|
304
|
+
</SafeAreaProvider>
|
308
305
|
}
|
309
306
|
|
310
307
|
export default App;
|
package/src/context/Provider.js
CHANGED
@@ -13,7 +13,7 @@ import {modes} from "$ecomponents/TextField";
|
|
13
13
|
import {isMobileMedia} from "$cdimensions";
|
14
14
|
import { prepareScreens } from "./TableData";
|
15
15
|
import {extendFormFields} from "$ecomponents/Form/Fields";
|
16
|
-
|
16
|
+
import {AuthProvider} from '$cauth';
|
17
17
|
|
18
18
|
/*****
|
19
19
|
les utilitaires disponibles à passer au provider :
|
@@ -80,7 +80,6 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
|
|
80
80
|
appConfig.structsData = appConfig.structsData = isObj(structsData)? structsData : null;
|
81
81
|
getTableData = appConfig.getTable = appConfig.getTableData = getTableOrStructDataCall(tablesData,getTableData);
|
82
82
|
getStructData = appConfig.getStructData = getTableOrStructDataCall(structsData,getStructData);
|
83
|
-
appConfig.LoginComponent = Login;
|
84
83
|
swrConfig = defaultObj(swrConfig);
|
85
84
|
if(convertFiltersToSQL !== undefined){
|
86
85
|
appConfig.set("convertFiltersToSQL",convertFiltersToSQL);
|
@@ -191,7 +190,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
|
|
191
190
|
appConfig,
|
192
191
|
swrConfig,
|
193
192
|
}}
|
194
|
-
children={children}
|
193
|
+
children={<AuthProvider {...auth} LoginComponent={Login}>{children}</AuthProvider>}
|
195
194
|
/>;
|
196
195
|
}
|
197
196
|
const getTableOrStructDataCall = (tablesOrStructDatas,getTableOrStructDataFunc)=>{
|