@fto-consult/expo-ui 6.64.22 → 6.64.23
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/context/Provider.js +3 -2
- package/src/context/hooks.js +0 -6
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "6.64.
|
3
|
+
"version": "6.64.23",
|
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.55.
|
74
|
+
"@fto-consult/common": "^3.55.2",
|
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/context/Provider.js
CHANGED
@@ -6,7 +6,8 @@ import { useColorScheme } from 'react-native';
|
|
6
6
|
import {colorsAlias,Colors} from "$theme";
|
7
7
|
import {isObj,isNonNullString,defaultStr,extendObj} from "$cutils";
|
8
8
|
import {getMainScreens} from "$escreens/mainScreens";
|
9
|
-
import {ExpoUIContext
|
9
|
+
import {ExpoUIContext} from "./hooks";
|
10
|
+
import {enableAuth,disableAuth} from "$cauth/session";
|
10
11
|
import Login from "$eauth/Login";
|
11
12
|
import {modes} from "$ecomponents/TextField";
|
12
13
|
import {isMobileMedia} from "$cdimensions";
|
@@ -79,7 +80,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,c
|
|
79
80
|
const isColorShemeDark = colorScheme ==="dark";
|
80
81
|
if(components.authEnabled === false){
|
81
82
|
disableAuth();
|
82
|
-
}
|
83
|
+
} else enableAuth();
|
83
84
|
appConfig.extendAppTheme = (theme,Theme,...rest)=>{
|
84
85
|
if(!isObj(theme)) return;
|
85
86
|
const isDark = theme.dark || theme.isDark || isDynamicThemeSupported && isColorShemeDark ;
|
package/src/context/hooks.js
CHANGED
@@ -18,12 +18,6 @@ export const useContext = useExpoUI;
|
|
18
18
|
|
19
19
|
export const useApp = useContext;
|
20
20
|
|
21
|
-
export const disableAuth = ()=>{
|
22
|
-
appConfig.set("isAuthSingleUserAllowed",true);
|
23
|
-
appConfig.set("authDefaultUser",{code:"root",password:"admin123",label:"Master admin"});
|
24
|
-
return true;
|
25
|
-
}
|
26
|
-
|
27
21
|
/**** retourne un composant définit dans la props
|
28
22
|
components de la fonction registerApp appelée pour l'initialisation de l'application
|
29
23
|
@param {string} componentName : le nom du composant que l'on veut recupérer
|