@fto-consult/expo-ui 6.3.0 → 6.4.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.
@@ -107,9 +107,9 @@ module.exports = (opts)=>{
107
107
  //le chemin ver le repertoire electron
108
108
  r.$eelectron = r["$e-electron"] = $electron;
109
109
  r.$electron = r.$electron || r.$eelectron;
110
- r.$econtext/hooks = path.resolve(expo,"context");
110
+ r.$econtext = path.resolve(expo,"context");
111
111
  if(!r.$context){
112
- r.$context = r.$econtext/hooks;
112
+ r.$context = r.$econtext;
113
113
  }
114
114
  const electronAssetsPath = path.resolve(dir,"electron","assets");
115
115
  if($assets){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.3.0",
3
+ "version": "6.4.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,7 +40,8 @@
40
40
  "find-licenses": "node ./find-licenses.js",
41
41
  "fix-dependencies": "expo-cli doctor --fix-dependencies",
42
42
  "delete-node-modules": "rimraf ./**/node_modules",
43
- "modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'"
43
+ "modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
44
+ "update": "npm i @emotion/native@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest sharp-cli@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
44
45
  },
45
46
  "bin": "./bin/index.js",
46
47
  "repository": {
@@ -61,15 +62,15 @@
61
62
  "@emotion/native": "^11.11.0",
62
63
  "@expo/html-elements": "^0.5.1",
63
64
  "@expo/vector-icons": "^13.0.0",
64
- "@fto-consult/common": "^3.19.0",
65
+ "@fto-consult/common": "^3.19.2",
65
66
  "@gorhom/portal": "^1.0.14",
66
- "@pchmn/expo-material3-theme": "^1.0.1",
67
+ "@pchmn/expo-material3-theme": "^1.3.1",
67
68
  "@react-native-async-storage/async-storage": "1.18.2",
68
69
  "@react-native-community/datetimepicker": "7.2.0",
69
70
  "@react-native-community/netinfo": "9.3.10",
70
71
  "@react-native/assets-registry": "^0.72.0",
71
- "@react-navigation/native": "^6.1.6",
72
- "@react-navigation/native-stack": "^6.9.12",
72
+ "@react-navigation/native": "^6.1.7",
73
+ "@react-navigation/native-stack": "^6.9.13",
73
74
  "@shopify/flash-list": "1.4.3",
74
75
  "apexcharts": "^3.41.0",
75
76
  "expo": "^49.0.3",
@@ -91,12 +92,12 @@
91
92
  "react": "^18.2.0",
92
93
  "react-content-loader": "^6.2.1",
93
94
  "react-dom": "^18.2.0",
94
- "react-native": "0.72.1",
95
+ "react-native": "0.72.3",
95
96
  "react-native-big-list": "^1.6.1",
96
97
  "react-native-blob-util": "^0.18.3",
97
- "react-native-gesture-handler": "~2.12.0",
98
+ "react-native-gesture-handler": "^2.12.0",
98
99
  "react-native-iphone-x-helper": "^1.3.1",
99
- "react-native-mime-types": "^2.3.0",
100
+ "react-native-mime-types": "^2.4.0",
100
101
  "react-native-paper": "^5.9.1",
101
102
  "react-native-paper-dates": "^0.18.12",
102
103
  "react-native-reanimated": "~3.3.0",
@@ -105,8 +106,7 @@
105
106
  "react-native-svg": "13.9.0",
106
107
  "react-native-web": "~0.19.6",
107
108
  "react-native-webview": "13.2.2",
108
- "react-navigation": "^4.4.4",
109
- "react-virtuoso": "^4.3.11",
109
+ "react-virtuoso": "^4.4.0",
110
110
  "sharp-cli": "^4.1.1",
111
111
  "tippy.js": "^6.3.7",
112
112
  "websql": "^2.0.3",
package/src/auth/Login.js CHANGED
@@ -21,13 +21,13 @@ import {isWeb} from "$cplatform";
21
21
  import ProviderSelector from "./ProviderSelector";
22
22
  import { ScrollView } from "react-native";
23
23
  import PropTypes from "prop-types";
24
- import getLoginProps from "$getLoginProps";
25
- const getProps = typeof getLoginProps =='function'? getLoginProps : x=>null;
24
+ import useContext from "$econtext/hooks";
26
25
 
27
26
  const WIDTH = 400;
28
27
 
29
28
  export default function LoginComponent(props){
30
29
  let {formName,step,appBarProps,onSuccess,withPortal,testID} = props;
30
+ const {components:{loginPropsMutator}} = useContext();
31
31
  const loginTitle = getTitle();
32
32
  testID = defaultStr(testID,"RN_Auth.LoginComponent");
33
33
  formName = React.useRef(uniqid(defaultStr(formName,"login-formname"))).current;
@@ -91,7 +91,7 @@ export default function LoginComponent(props){
91
91
  containerProps : customContainerProps,
92
92
  withHeaderAvatar,
93
93
  contentProps : customContentProps,
94
- withScrollView:customWithScrollView,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,mutateData,beforeSubmit:beforeSubmitForm,canSubmit:canSubmitForm,onStepChange,...loginProps} = defaultObj(getProps({
94
+ withScrollView:customWithScrollView,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,mutateData,beforeSubmit:beforeSubmitForm,canSubmit:canSubmitForm,onStepChange,...loginProps} = loginPropsMutator({
95
95
  ...state,
96
96
  setState,
97
97
  state,
@@ -105,7 +105,7 @@ export default function LoginComponent(props){
105
105
  nextButtonRef,
106
106
  ProviderSelector,
107
107
  previousButtonRef,
108
- }));
108
+ });
109
109
  const containerProps = defaultObj(customContainerProps);
110
110
  const contentProps = defaultObj(customContentProps);
111
111
 
@@ -6,6 +6,7 @@ import {colorsAlias,Colors} from "$theme";
6
6
  import {isObj} from "$cutils";
7
7
  import eMainScreens from "$escreens/mainScreens";
8
8
  import {ExpoUIContext} from "./hooks";
9
+ import Login from "$eauth/Login";
9
10
 
10
11
  /*****
11
12
  les utilitaires disponibles à passer au provider :
@@ -22,7 +23,7 @@ import {ExpoUIContext} from "./hooks";
22
23
  ReactNode,
23
24
  ReactComponent
24
25
  },
25
- //la fonction permettant de muter les props du composant TableLink
26
+ loginPropsMutator : ({object})=><{object}>, la fonction permettant de muter les props du composant Login,
26
27
  tableLinkPropsMutator : ({object})=><{object}>, la fonction permettant de muter les props du composant TableLink
27
28
  },
28
29
  navigation : {
@@ -42,6 +43,7 @@ const Provider = ({children,getTableData,navigation,components,getStructData,tab
42
43
  appConfig.structsData = appConfig.structsData = isObj(structsData)? structsData : null;
43
44
  appConfig.getTableData = getTableData;
44
45
  appConfig.getStructData = getStructData;
46
+ appConfig.LoginComponent = Login;
45
47
  //const colorScheme = useColorScheme();
46
48
  appConfig.extendAppTheme = (theme)=>{
47
49
  if(!isObj(theme)) return;
@@ -77,13 +79,11 @@ const Provider = ({children,getTableData,navigation,components,getStructData,tab
77
79
  navigation,
78
80
  components : {
79
81
  ...components,
82
+ loginPropsMutator : (props)=>{
83
+ return extendProps(components.loginPropsMutator,props);
84
+ },
80
85
  tableLinkPropsMutator : (props)=>{
81
- const prs = defaultObj(props);
82
- const o = typeof components.tableLinkPropsMutator ==='function'? components.tableLinkPropsMutator(props) : null;
83
- if(isObj(o)){
84
- return {...prs,...o};
85
- }
86
- return prs
86
+ return extendProps(components.tableLinkPropsMutator,props);
87
87
  }
88
88
  },
89
89
  getTableData,getStructData,tablesData,structsData,appConfig
@@ -92,4 +92,12 @@ const Provider = ({children,getTableData,navigation,components,getStructData,tab
92
92
  />;
93
93
  }
94
94
 
95
+ const extendProps = (cb,props)=>{
96
+ const prs = defaultObj(props);
97
+ const o = typeof cb ==='function'? cb(props) : null;
98
+ if(isObj(o)){
99
+ return {...prs,...o};
100
+ }
101
+ return prs
102
+ }
95
103
  export default Provider;