@fto-consult/expo-ui 1.5.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/auth/Login.js CHANGED
@@ -86,9 +86,8 @@ export default function LoginComponent(props){
86
86
  },1000)
87
87
  }
88
88
  },[withPortal])
89
- const {header,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,mutateData,canSubmit:canSubmitForm,onStepChange,...loginProps} = defaultObj(getProps({
89
+ const {header,withScrollView:customWithScrollView,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,mutateData,canSubmit:canSubmitForm,onStepChange,...loginProps} = defaultObj(getProps({
90
90
  ...state,
91
- withScrollView:customerWithScrollView,
92
91
  setState,
93
92
  state,
94
93
  showError : notifyUser,
@@ -171,7 +170,7 @@ export default function LoginComponent(props){
171
170
  setState({...state,step:step+1,data})
172
171
  }
173
172
  }
174
- const withScrollView = typeof customerWithScrollView =='boolean'? customerWithScrollView : true;
173
+ const withScrollView = typeof customWithScrollView =='boolean'? customWithScrollView : true;
175
174
  const Wrapper = withPortal ? ScreenWithoutAuthContainer : withScrollView ? ScrollView: View;
176
175
  const wrapperProps = withPortal ? {appBarProps,authRequired:false,title:loginTitle,withScrollView} : { style:styles.wrapper};
177
176
  return <Wrapper testID = {testID+"_Wrapper" }{...wrapperProps}>
@@ -14,6 +14,7 @@ import {navigate} from "$cnavigation";
14
14
  import theme from "$theme";
15
15
  import {isMobileNative} from "$cplatform";
16
16
  import appConfig from "$capp/config";
17
+ import Preloader from "$preloader";
17
18
  const UserProfileAvatarComponent = React.forwardRef(({drawerRef,...props},ref)=>{
18
19
  let u = defaultObj(Auth.getLoggedUser());
19
20
  const deviceNameRef = React.useRef(null);
@@ -46,7 +47,10 @@ const UserProfileAvatarComponent = React.forwardRef(({drawerRef,...props},ref)=>
46
47
  label : i18n.lang("logout",'Déconnexion'),
47
48
  icon : "logout",
48
49
  onPress : (a)=>{
49
- closeDrawer(Auth.signOut);
50
+ closeDrawer(()=>{
51
+ Preloader.open("Déconnexion en cours...");
52
+ Auth.signOut().finally(Preloader.close)
53
+ });
50
54
  }
51
55
  }
52
56
  ];