@fto-consult/expo-ui 8.80.0 → 8.81.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.
@@ -5,11 +5,11 @@ module.exports = (opts)=>{
5
5
  const dir = path.resolve(__dirname);
6
6
  const isDev = String(process.env.NODE_ENV).toLowerCase() !="production";
7
7
  const projectRoot = typeof opts.projectRoot =='string' && fs.existsSync(opts.projectRoot.trim()) && opts.projectRoot.trim() || process.cwd();
8
- const assets = path.resolve(dir,"assets");
9
8
  opts = typeof opts =='object' && opts ? opts : {};
10
9
  opts.platform = "expo";
11
- opts.assets = opts.assets || opts.alias && typeof opts.alias =='object' && opts.alias.$assets || assets;
12
10
  opts.projectRoot = opts.projectRoot || projectRoot;
11
+ const assets = fs.existsSync(path.resolve(opts.projectRoot,"assets")) ? path.resolve(opts.projectRoot,"assets") : path.resolve(dir,"assets");
12
+ opts.assets = opts.assets || opts.alias && typeof opts.alias =='object' && opts.alias.$assets || assets;
13
13
  opts.withPouchDB = opts.withPouchDB !== false && opts.withPouchdb !== false ? true : false;
14
14
  delete opts.withPouchdb;
15
15
  const expoUI = require("./expo-ui-path")();
@@ -1,40 +1,40 @@
1
-
2
- module.exports = {
3
- "@emotion/native": "^11.11.0",
4
- "@expo/html-elements": "^0.5.1",
5
- "@expo/vector-icons": "^14.0.0",
6
- "@pchmn/expo-material3-theme": "^1.3.2",
7
- "@react-native-community/netinfo": "11.1.0",
8
- "@react-native/assets-registry": "^0.72.0",
9
- "react-native-get-random-values": "~1.8.0",
10
- "@react-navigation/native": "^6.1.17",
11
- "@react-navigation/native-stack": "^6.9.26",
12
- "@react-navigation/stack": "^6.3.29",
13
- "@shopify/flash-list": "1.6.3",
14
- "expo": "^50.0.17",
15
- "expo-camera": "~14.1.3",
16
- "expo-clipboard": "~5.0.1",
17
- "expo-font": "~11.10.3",
18
- "expo-image-picker": "~14.7.1",
19
- "expo-linking": "~6.2.2",
20
- "expo-sharing": "~11.10.0",
21
- "expo-sqlite": "~13.4.0",
22
- "expo-status-bar": "~1.11.1",
23
- "expo-system-ui": "~2.9.4",
24
- "expo-web-browser": "~12.8.2",
25
- "react": "18.2.0",
26
- "react-native": "0.73.6",
27
- "react-native-safe-area-context": "4.8.2",
28
- "react-native-screens": "~3.29.0",
29
- "react-native-svg": "14.1.0",
30
- "react-native-webview": "13.6.4",
31
- "react-native-gesture-handler": "~2.14.0",
32
- "react-native-reanimated": "~3.6.2",
33
- "react-native-view-shot": "3.8.0",
34
- "expo-intent-launcher": "~10.11.0",
35
- "expo-image-manipulator": "~11.8.0",
36
- "expo-document-picker": "~11.10.1",
37
- "react-native-web": "~0.19.6",
38
- "react-dom": "18.2.0"
39
- };
1
+
2
+ module.exports = {
3
+ "@emotion/native": "^11.11.0",
4
+ "@expo/html-elements": "^0.5.1",
5
+ "@expo/vector-icons": "^14.0.0",
6
+ "@pchmn/expo-material3-theme": "^1.3.2",
7
+ "@react-native-community/netinfo": "11.1.0",
8
+ "@react-native/assets-registry": "^0.72.0",
9
+ "react-native-get-random-values": "~1.8.0",
10
+ "@react-navigation/native": "^6.1.17",
11
+ "@react-navigation/native-stack": "^6.9.26",
12
+ "@react-navigation/stack": "^6.3.29",
13
+ "@shopify/flash-list": "1.6.3",
14
+ "expo": "^50.0.17",
15
+ "expo-camera": "~14.1.3",
16
+ "expo-clipboard": "~5.0.1",
17
+ "expo-font": "~11.10.3",
18
+ "expo-image-picker": "~14.7.1",
19
+ "expo-linking": "~6.2.2",
20
+ "expo-sharing": "~11.10.0",
21
+ "expo-sqlite": "~13.4.0",
22
+ "expo-status-bar": "~1.11.1",
23
+ "expo-system-ui": "~2.9.4",
24
+ "expo-web-browser": "~12.8.2",
25
+ "react": "18.2.0",
26
+ "react-native": "0.73.6",
27
+ "react-native-safe-area-context": "4.8.2",
28
+ "react-native-screens": "~3.29.0",
29
+ "react-native-svg": "14.1.0",
30
+ "react-native-webview": "13.6.4",
31
+ "react-native-gesture-handler": "~2.14.0",
32
+ "react-native-reanimated": "~3.6.2",
33
+ "react-native-view-shot": "3.8.0",
34
+ "expo-intent-launcher": "~10.11.0",
35
+ "expo-image-manipulator": "~11.8.0",
36
+ "expo-document-picker": "~11.10.1",
37
+ "react-native-web": "~0.19.6",
38
+ "react-dom": "18.2.0"
39
+ };
40
40
 
@@ -1,18 +1,18 @@
1
- {
2
- "build": {
3
- "development": {
4
- "developmentClient": true,
5
- "distribution": "internal"
6
- },
7
- "preview": {
8
- "distribution": "internal",
9
- "android": {
10
- "buildType": "apk"
11
- }
12
- },
13
- "production": {}
14
- },
15
- "submit": {
16
- "production": {}
17
- }
18
- }
1
+ {
2
+ "build": {
3
+ "development": {
4
+ "developmentClient": true,
5
+ "distribution": "internal"
6
+ },
7
+ "preview": {
8
+ "distribution": "internal",
9
+ "android": {
10
+ "buildType": "apk"
11
+ }
12
+ },
13
+ "production": {}
14
+ },
15
+ "submit": {
16
+ "production": {}
17
+ }
18
+ }
package/expo-ui.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "name": "@fto-consult/expo-ui",
3
- "version": "6.44.4",
4
- "description": "Bibliothèque de composants UI Expo,react-native",
5
- "bin": {
6
- "expo-ui": "./bin/index.js"
7
- },
8
- "author": "Boris Fouomene",
9
- "license": "ISC",
10
- "homepage": "https://github.com/borispipo/expo-ui#readme"
1
+ {
2
+ "name": "@fto-consult/expo-ui",
3
+ "version": "6.44.4",
4
+ "description": "Bibliothèque de composants UI Expo,react-native",
5
+ "bin": {
6
+ "expo-ui": "./bin/index.js"
7
+ },
8
+ "author": "Boris Fouomene",
9
+ "license": "ISC",
10
+ "homepage": "https://github.com/borispipo/expo-ui#readme"
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.80.0",
3
+ "version": "8.81.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "react-native-paper-doc": "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ import BackHandler from "$ecomponents/BackHandler";
5
5
  import * as Linking from 'expo-linking';
6
6
  import APP from "$capp";
7
7
  import {AppStateService,trackIDLE,stop as stopIDLE} from "$capp/idle";
8
+ import {Provider as DrawerProvider} from "$ecomponents/Drawer";
8
9
  import { NavigationContainer} from '@react-navigation/native';
9
10
  import {navigationRef} from "$cnavigation"
10
11
  import NetInfo from '$cutils/NetInfo';
@@ -299,6 +300,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
299
300
  /> : myChildren}
300
301
  </ErrorBoundary>
301
302
  </Portal.Host>
303
+ <DrawerProvider testID="RN_DrawerProviderRight"/>
302
304
  </PaperProvider>
303
305
  </AppEntryRootView>
304
306
  </SafeAreaProvider>
package/src/auth/Login.js CHANGED
@@ -144,10 +144,10 @@ export default function LoginComponent(props){
144
144
  if(cS !== false && beforeSubmit(args) !== false){
145
145
  Preloader.open("vérification ...");
146
146
  setIsLoading(nextButtonRef,true);
147
- return auth.signIn(data).then((a)=>{
148
- if(typeof onSuccesRef.current =='function' && onSuccesRef.current(a)=== false) return;
147
+ return auth.signIn(data).then((result)=>{
148
+ if(typeof onSuccesRef.current =='function' && onSuccesRef.current({data,result})=== false) return;
149
149
  if(isFunction(onSuccess)){
150
- onSuccess(data);
150
+ onSuccess({data,result});
151
151
  } else {
152
152
  navigate("Home");
153
153
  }
@@ -171,6 +171,34 @@ export default function LoginComponent(props){
171
171
  appBarProps = {appBarProps}
172
172
  onSuccess = {onSuccess}
173
173
  auth = {auth}
174
+ formName = {formName}
175
+ /***
176
+ * permet de connecter un utilisatgeur au backend
177
+ * @param {object} data, la données liée à l'utilisateur à connecter
178
+ * @param {object} options, les options de connexion
179
+ * @return {object}, la données résultat à la fonction de connexion de l'utilisateur
180
+ */
181
+ signIn = {(data,options,...rest)=>{
182
+ options = defaultObj(options);
183
+ if(!isObj(data) || !Object.size(data,true)){
184
+ data = getData();
185
+ }
186
+ Preloader.open("Connexion ...");
187
+ return auth.signIn(data,...rest).then((result)=>{
188
+ if(typeof options.onSuccess === "function"){
189
+ if(options.onSuccess({data,result}) === false) return;
190
+ } else if(typeof options.callback === "function" && options.callback({data,result}) === false){
191
+ return;
192
+ }
193
+ if(isFunction(onSuccess) && onSuccess({data,result}) === false){
194
+ } else {
195
+ navigate("Home");
196
+ }
197
+ return result;
198
+ }).finally(()=>{
199
+ Preloader.close();
200
+ });
201
+ }}
174
202
  mediaQueryUpdateStyle={mediaQueryUpdateStyle}
175
203
  />
176
204
  const callArgs = {
@@ -9,7 +9,6 @@ import {renderSplitedActions} from "$ecomponents/AppBar/utils";
9
9
  import {isWeb,isNativeMobile,isTouchDevice} from "$cplatform";
10
10
  import Divider from "$ecomponents/Divider";
11
11
  import {isMobileOrTabletMedia} from "$cplatform/dimensions";
12
- import APP from "$capp/instance";
13
12
  import KeyboardAvoidingView from "$ecomponents/KeyboardAvoidingView";
14
13
  import {Elevations} from "$ecomponents/Surface";
15
14
  import {defaultStr} from "$cutils";