@fto-consult/expo-ui 1.4.4 → 1.4.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/package.json +2 -2
- package/src/App.js +8 -8
- package/src/auth/ThemeSelector/index.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
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
|
"@expo/html-elements": "^0.2.0",
|
|
62
62
|
"@expo/metro-config": "^0.4.0",
|
|
63
63
|
"@expo/webpack-config": "^0.17.2",
|
|
64
|
-
"@fto-consult/common": "^1.7.
|
|
64
|
+
"@fto-consult/common": "^1.7.6",
|
|
65
65
|
"@gorhom/portal": "^1.0.14",
|
|
66
66
|
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
67
67
|
"@react-native-community/datetimepicker": "6.2.0",
|
package/src/App.js
CHANGED
|
@@ -65,14 +65,14 @@ export default function getIndex(options){
|
|
|
65
65
|
<ErrorBoundary>
|
|
66
66
|
<StatusBar/>
|
|
67
67
|
<PreferencesContext.Provider value={preferences}>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
<DropdownAlert ref={notificationRef}/>
|
|
69
|
+
<PreloaderProvider/>
|
|
70
|
+
<DialogProvider responsive/>
|
|
71
|
+
<AlertProvider SimpleSelect={SimpleSelect}/>
|
|
72
|
+
<FormDataDialogProvider/>
|
|
73
|
+
{children}
|
|
74
|
+
<ErrorBoundaryProvider/>
|
|
75
|
+
<BottomSheetProvider/>
|
|
76
76
|
</PreferencesContext.Provider>
|
|
77
77
|
</ErrorBoundary>
|
|
78
78
|
</Portal.Host>
|
|
@@ -7,7 +7,7 @@ import Label from "$ecomponents/Label";
|
|
|
7
7
|
import Auth,{login} from "$cauth";
|
|
8
8
|
import View from "$ecomponents/View";
|
|
9
9
|
import { StyleSheet } from "react-native";
|
|
10
|
-
import {
|
|
10
|
+
import defaultTheme,{getColors} from "$theme/defaultTheme";
|
|
11
11
|
import theme,{defaultDarkTheme,Colors,defaultLightTheme} from "$theme";
|
|
12
12
|
import Provider from "$ecomponents/Form/FormData/DialogProvider";
|
|
13
13
|
import Dropdown from "$ecomponents/Dropdown";
|
|
@@ -41,10 +41,10 @@ export const getThemeFieldProps = (props,ref)=>{
|
|
|
41
41
|
user = defaultObj(user,loggedUser);
|
|
42
42
|
const isUserActive = loggedUser.code == user.code && user.code ? true : false;
|
|
43
43
|
const userTheme = defaultObj(user.theme);
|
|
44
|
-
const userThemeName = defaultStr(userTheme.name,
|
|
44
|
+
const userThemeName = defaultStr(userTheme.name,defaultTheme.name);
|
|
45
45
|
const isDark = theme.isDark() || theme.isDarkUI();
|
|
46
46
|
const defTheme = isDark ? {...defaultDarkTheme.colors,dark:true} : {...defaultLightTheme.colors,dark:false};
|
|
47
|
-
const itemsRef = React.useRef({...defaultObj(user.customThemes),...
|
|
47
|
+
const itemsRef = React.useRef({...defaultObj(user.customThemes),...getColors()});
|
|
48
48
|
const showThemeExplorer = (data)=>{
|
|
49
49
|
data = defaultObj(data,defTheme);
|
|
50
50
|
fields.name.disabled = ({data})=> data && isNonNullString(data.name);
|