@fto-consult/expo-ui 7.23.1 → 7.24.1
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/App.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.24.1",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"scripts": {
|
6
6
|
"clear-npx-cache": "npx clear-npx-cache",
|
@@ -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": "^4.7.
|
74
|
+
"@fto-consult/common": "^4.7.25",
|
75
75
|
"@fto-consult/node-utils": "^1.4.5",
|
76
76
|
"@pchmn/expo-material3-theme": "^1.3.2",
|
77
77
|
"@react-native-async-storage/async-storage": "1.18.2",
|
@@ -774,7 +774,7 @@ class DropdownComponent extends AppComponent {
|
|
774
774
|
showAdd = false;
|
775
775
|
}
|
776
776
|
if(typeof showAdd ==='function'){
|
777
|
-
showAdd = showAdd(props);
|
777
|
+
showAdd = showAdd(this.props);
|
778
778
|
}
|
779
779
|
showAdd = defaultBool(showAdd,false);
|
780
780
|
if(addIcon ===false) {
|
@@ -789,7 +789,7 @@ class DropdownComponent extends AppComponent {
|
|
789
789
|
onPress : (e)=>{
|
790
790
|
React.stopEventPropagation(e);
|
791
791
|
if(iconDisabled) return;
|
792
|
-
const onAddP = typeof onAddProps ==='function'? onAddProps(props) : onAddProps;
|
792
|
+
const onAddP = typeof onAddProps ==='function'? onAddProps(this.props) : onAddProps;
|
793
793
|
const aArgs = {...React.getOnPressArgs(e),...Object.assign({},onAddP),isMobile:isMob,context:this,visible:state.visible,field:name,props:this.props};
|
794
794
|
if(onAdd){onAdd(aArgs);}
|
795
795
|
else if(onAddPress){
|
@@ -22,12 +22,14 @@ const ErrorMessage = React.forwardRef(function(props,ref){
|
|
22
22
|
}
|
23
23
|
if(!error || !info || !error.toString) return null;
|
24
24
|
const pointerEvents = 'auto';
|
25
|
+
const backgroundColor = theme.colors.backgroundColor;
|
26
|
+
const color = theme.colors.onSurface;
|
25
27
|
return <Portal>
|
26
28
|
<Screen {...props} modal={false}>
|
27
|
-
<View ref={ref} testID={`${testID}_ErrorMessageContainer`} style={[{pointerEvents},styles.container]}>
|
29
|
+
<View ref={ref} testID={`${testID}_ErrorMessageContainer`} style={[{pointerEvents},styles.container,{backgroundColor}]}>
|
28
30
|
<View style={[styles.content,{pointerEvents}]} testID={`${testID}_ErrorMessageContentContainer`}>
|
29
|
-
<Label style={styles.title}>Oops!</Label>
|
30
|
-
<Label style={styles.subtitle}>{'Une erreur est survenue'}</Label>
|
31
|
+
<Label style={[styles.title,{color}]}>Oops!</Label>
|
32
|
+
<Label style={[styles.subtitle,{color}]}>{'Une erreur est survenue'}</Label>
|
31
33
|
<Label style={styles.error}>{error.toString()}</Label>
|
32
34
|
<Button mode="contained" iconProps={{marginVertical:0,pointerEvents,paddingVertical:0}} icon='home-variant' style={{backgroundColor:theme.colors.primary,marginHorizontal:10}} labelStyle={{color:theme.colors.primaryLabel}} onPress={goToHome}>
|
33
35
|
Retour à l'accueil
|
@@ -35,7 +37,7 @@ const ErrorMessage = React.forwardRef(function(props,ref){
|
|
35
37
|
<Expandable title="Plus de détail sur l'erreur">
|
36
38
|
<View>
|
37
39
|
<ScrollView style={{flex:1}} contentContainerStyle={{flex:1,flexGrow:1,paddingBottom:30}} testID='RN_ErrorBoundary_ScrollView'>
|
38
|
-
<Paragraph testID='RN_ErrorBoundary_StackDetails' style={[styles.componentStack,{color
|
40
|
+
<Paragraph testID='RN_ErrorBoundary_StackDetails' style={[styles.componentStack,{color}]}>
|
39
41
|
{info.componentStack}
|
40
42
|
</Paragraph>
|
41
43
|
</ScrollView>
|
@@ -65,7 +67,6 @@ ErrorMessage.propTypes = {
|
|
65
67
|
|
66
68
|
const styles = StyleSheet.create({
|
67
69
|
container: {
|
68
|
-
backgroundColor: '#fafafa',
|
69
70
|
flex: 1,
|
70
71
|
justifyContent: 'center',
|
71
72
|
...StyleSheet.absoluteFillObject,
|
package/src/navigation/index.js
CHANGED
@@ -53,10 +53,10 @@ export default function NavigationComponent (props){
|
|
53
53
|
initialRouteName={initialRouteName}
|
54
54
|
screenOptions={getScreenOptions}
|
55
55
|
>
|
56
|
-
{<Stack.Group>
|
56
|
+
{drawerScreens.length ? <Stack.Group>
|
57
57
|
{drawerScreens}
|
58
|
-
</Stack.Group
|
59
|
-
<Stack.Group
|
58
|
+
</Stack.Group>:null}
|
59
|
+
{stackScreens.length ? <Stack.Group
|
60
60
|
key = {"MODAL-DRAWERS-SCREENS"}
|
61
61
|
screenOptions={function(options){
|
62
62
|
return getScreenOptions(options,{
|
@@ -67,7 +67,7 @@ export default function NavigationComponent (props){
|
|
67
67
|
}}
|
68
68
|
>
|
69
69
|
{stackScreens}
|
70
|
-
</Stack.Group
|
70
|
+
</Stack.Group>:null}
|
71
71
|
</Stack.Navigator> }
|
72
72
|
</DrawerNavigator>
|
73
73
|
</MainNavigationProvider>
|