@fto-consult/expo-ui 6.32.12 → 6.32.15
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/babel.config.alias.js +3 -0
- package/babel.config.js +0 -1
- package/package.json +2 -2
- package/src/context/Provider.js +4 -2
- package/src/realm/Provider/index.js +11 -0
- package/src/realm/Provider/realm.not-enabled.js +7 -0
- package/src/realm/index.js +13 -2
- package/src/realm/react/index.js +3 -1
- package/src/realm/realm/index.js +5 -0
- package/src/screens/Help/openLibraries.js +1 -1
package/babel.config.alias.js
CHANGED
|
@@ -127,5 +127,8 @@ module.exports = (opts)=>{
|
|
|
127
127
|
if(!r.$realm){
|
|
128
128
|
r.$realm = r.$erealm;
|
|
129
129
|
}
|
|
130
|
+
const {withRealm} = opts; //si la prise en compte de la base de données realm est nécessaire
|
|
131
|
+
const $realmProvider = path.resolve(r.$realm,"Provider");
|
|
132
|
+
r.$erealmProvider = r.$realmProvider = !withRealm ? path.resolve($realmProvider,"realm.not-enabled.js") : $realmProvider;
|
|
130
133
|
return r;
|
|
131
134
|
}
|
package/babel.config.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module.exports = function(api,opts) {
|
|
2
2
|
opts = typeof opts =='object' && opts ? opts : {};
|
|
3
3
|
api = api && typeof api =='object'? api : {};
|
|
4
|
-
|
|
5
4
|
const isLocalDev = require("./is-local-dev")();//si l'application est en developpement local
|
|
6
5
|
///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
|
|
7
6
|
//console.log(environmentPath," is envvv ",opts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.32.
|
|
3
|
+
"version": "6.32.15",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@expo/html-elements": "^0.5.1",
|
|
71
71
|
"@expo/vector-icons": "^13.0.0",
|
|
72
72
|
"@faker-js/faker": "^8.0.2",
|
|
73
|
-
"@fto-consult/common": "^3.
|
|
73
|
+
"@fto-consult/common": "^3.35.1",
|
|
74
74
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
75
75
|
"@react-native-async-storage/async-storage": "1.18.2",
|
|
76
76
|
"@react-native-community/datetimepicker": "7.2.0",
|
package/src/context/Provider.js
CHANGED
|
@@ -10,6 +10,7 @@ import Login from "$eauth/Login";
|
|
|
10
10
|
import {modes} from "$ecomponents/TextField";
|
|
11
11
|
import {isMobileMedia} from "$cdimensions";
|
|
12
12
|
import { prepareScreens } from "./TableData";
|
|
13
|
+
import ERealmProvider from "$erealmProvider";
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
/*****
|
|
@@ -38,7 +39,8 @@ import { prepareScreens } from "./TableData";
|
|
|
38
39
|
screens : {Array}, les écrans de navigation,
|
|
39
40
|
drawerItems : {object|array|function}, la fonction permettant d'obtenir les items du drawer principal de l'application,
|
|
40
41
|
containerProps : {object}, les props à passer au composant NavigationContainer de react-navigation
|
|
41
|
-
}
|
|
42
|
+
},
|
|
43
|
+
realm : {}, //les options de configurations de la base de données realmdb
|
|
42
44
|
*/
|
|
43
45
|
const Provider = ({children,getTableData,handleHelpScreen,navigation,components,convertFiltersToSQL,getStructData,tablesData,structsData,...props})=>{
|
|
44
46
|
const {extendAppTheme} = appConfig;
|
|
@@ -149,7 +151,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,components,
|
|
|
149
151
|
structsData,
|
|
150
152
|
appConfig
|
|
151
153
|
}}
|
|
152
|
-
children={children}
|
|
154
|
+
children={<ERealmProvider>{children}</ERealmProvider>}
|
|
153
155
|
/>;
|
|
154
156
|
}
|
|
155
157
|
const getTableOrStructDataCall = (tablesOrStructDatas,getTableOrStructDataFunc)=>{
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import useExpoUI from "$econtext";
|
|
2
|
+
import React from "$react";
|
|
3
|
+
|
|
4
|
+
export default function ExpoUIRealmProvider({children,...props}){
|
|
5
|
+
const {realm:{RealmProvider,Provider}} = useExpoUI();
|
|
6
|
+
RealmProvider = React.isComponent(RealmProvider)? RealmProvider : React.isComponent(Provider)?Provider : null;
|
|
7
|
+
if(!RealmProvider){
|
|
8
|
+
throw "Vous devez definir le provider realm de l'application, dans l'objet real de la fonction registerApp de $expo-ui";
|
|
9
|
+
}
|
|
10
|
+
return <RealmProvider>{children}</RealmProvider>
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default function RealNotEnabledProvider({children}){
|
|
2
|
+
return children;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const useExpoUIRealm = ()=>{
|
|
6
|
+
throw "La base de données realm n'est pas autorisée, veuillez l'autorisez dans les options de votre fichier babel.config.alias, options withRealm à true";
|
|
7
|
+
}
|
package/src/realm/index.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import Realm from "realm";
|
|
1
|
+
import Realm from "./realm";
|
|
2
2
|
|
|
3
3
|
export default Realm;
|
|
4
4
|
|
|
5
|
-
export * from "realm";
|
|
5
|
+
export * from "./realm";
|
|
6
|
+
|
|
7
|
+
export * from "./react";
|
|
8
|
+
|
|
9
|
+
export class Model extends Realm.Object{
|
|
10
|
+
constructor(props){
|
|
11
|
+
super(props);
|
|
12
|
+
}
|
|
13
|
+
static fields;
|
|
14
|
+
static tableName;//Table name.
|
|
15
|
+
static name;
|
|
16
|
+
}
|
package/src/realm/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {"@fto-consult/expo-ui":{"
|
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"version":"6.32.14","url":"https://github.com/borispipo/expo-ui#readme","license":"ISC"},"@emotion/native":{"version":"11.11.0","url":"https://emotion.sh","license":"MIT"},"@emotion/react":{"version":"11.11.1","url":"https://github.com/emotion-js/emotion/tree/main/packages/react","license":"MIT"},"@expo/html-elements":{"version":"0.5.1","url":"https://github.com/expo/expo/tree/main/packages/html-elements","license":"MIT"},"@expo/metro-config":{"version":"0.10.7","url":"https://github.com/expo/expo.git","license":"MIT"},"@expo/vector-icons":{"version":"13.0.0","url":"https://expo.github.io/vector-icons","license":"MIT"},"@expo/webpack-config":{"version":"19.0.0","url":"https://github.com/expo/expo-cli.git","license":"MIT"},"@faker-js/faker":{"version":"8.0.2","url":"https://github.com/faker-js/faker.git","license":"MIT"},"@fto-consult/common":{"version":"3.35.1","url":"https://github.com/borispipo/common#readme","license":"ISC"},"@pchmn/expo-material3-theme":{"version":"1.3.1","url":"https://github.com/pchmn/expo-material3-theme#readme","license":"MIT"},"@react-native-async-storage/async-storage":{"version":"1.18.2","url":"https://github.com/react-native-async-storage/async-storage#readme","license":"MIT"},"@react-native-community/datetimepicker":{"version":"7.2.0","url":"https://github.com/react-native-community/datetimepicker#readme","license":"MIT"},"@react-native-community/netinfo":{"version":"9.3.10","url":"https://github.com/react-native-netinfo/react-native-netinfo#readme","license":"MIT"},"@react-native/assets-registry":{"version":"0.72.0","url":"git@github.com:facebook/react-native.git","license":"MIT"},"@react-navigation/native":{"version":"6.1.7","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.13","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@realm/react":{"version":"0.6.0","url":"https://github.com/realm/realm-js/tree/main/packages/realm-react#readme","license":"Apache-2.0"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.42.0","url":"https://apexcharts.com","license":"MIT"},"babel-plugin-inline-dotenv":{"version":"1.7.0","url":"https://github.com/brysgo/babel-plugin-inline-dotenv#readme","license":"ISC"},"babel-plugin-module-resolver":{"version":"5.0.0","url":"https://github.com/tleunen/babel-plugin-module-resolver.git","license":"MIT"},"expo":{"version":"49.0.9","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.2","url":"https://docs.expo.dev/versions/latest/sdk/camera/","license":"MIT"},"expo-clipboard":{"version":"4.3.1","url":"https://docs.expo.dev/versions/latest/sdk/clipboard","license":"MIT"},"expo-font":{"version":"11.4.0","url":"https://docs.expo.dev/versions/latest/sdk/font/","license":"MIT"},"expo-image-picker":{"version":"14.3.2","url":"https://docs.expo.dev/versions/latest/sdk/imagepicker/","license":"MIT"},"expo-linking":{"version":"5.0.2","url":"https://docs.expo.dev/versions/latest/sdk/linking","license":"MIT"},"expo-sqlite":{"version":"11.3.3","url":"https://docs.expo.dev/versions/latest/sdk/sqlite/","license":"MIT"},"expo-status-bar":{"version":"1.6.0","url":"https://docs.expo.dev/versions/latest/sdk/status-bar/","license":"MIT"},"expo-system-ui":{"version":"2.4.0","url":"https://docs.expo.dev/versions/latest/sdk/system-ui","license":"MIT"},"expo-web-browser":{"version":"12.3.2","url":"https://docs.expo.dev/versions/latest/sdk/webbrowser/","license":"MIT"},"file-saver":{"version":"2.0.5","url":"https://github.com/eligrey/FileSaver.js#readme","license":"MIT"},"fs-extra":{"version":"11.1.1","url":"https://github.com/jprichardson/node-fs-extra","license":"MIT"},"google-libphonenumber":{"version":"3.2.33","url":"https://ruimarinho.github.io/google-libphonenumber/","license":"(MIT AND Apache-2.0)"},"htmlparser2-without-node-native":{"version":"3.9.2","url":"git://github.com/fb55/htmlparser2.git","license":"MIT"},"pdfmake":{"version":"0.2.7","url":"http://pdfmake.org","license":"MIT"},"process":{"version":"0.11.10","url":"git://github.com/shtylman/node-process.git","license":"MIT"},"prop-types":{"version":"15.8.1","url":"https://facebook.github.io/react/","license":"MIT"},"react":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-content-loader":{"version":"6.2.1","url":"https://github.com/danilowoz/react-content-loader","license":"MIT"},"react-dom":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-native":{"version":"0.72.4","license":"MIT"},"react-native-big-list":{"version":"1.6.1","url":"https://marcocesarato.github.io/react-native-big-list-docs/","license":"GPL-3.0-or-later"},"react-native-blob-util":{"version":"0.18.6","url":"https://github.com/RonRadtke/react-native-blob-util","license":"MIT"},"react-native-gesture-handler":{"version":"2.12.1","url":"https://github.com/software-mansion/react-native-gesture-handler#readme","license":"MIT"},"react-native-iphone-x-helper":{"version":"1.3.1","url":"https://github.com/ptelad/react-native-iphone-x-helper#readme","license":"MIT"},"react-native-mime-types":{"version":"2.4.0","license":"MIT"},"react-native-paper":{"version":"5.10.4","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.18.26","url":"https://github.com/web-ridge/react-native-paper-dates#readme","license":"MIT"},"react-native-reanimated":{"version":"3.3.0","url":"https://github.com/software-mansion/react-native-reanimated#readme","license":"MIT"},"react-native-safe-area-context":{"version":"4.6.3","url":"https://github.com/th3rdwave/react-native-safe-area-context#readme","license":"MIT"},"react-native-screens":{"version":"3.22.1","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"react-native-svg":{"version":"13.9.0","url":"https://github.com/react-native-community/react-native-svg","license":"MIT"},"react-native-web":{"version":"0.19.7","url":"git://github.com/necolas/react-native-web.git","license":"MIT"},"react-native-webview":{"version":"13.2.2","url":"https://github.com/react-native-webview/react-native-webview#readme","license":"MIT"},"react-virtuoso":{"version":"4.5.1","url":"https://virtuoso.dev/","license":"MIT"},"realm":{"version":"12.1.0","url":"https://realm.io","license":"apache-2.0"},"sharp-cli":{"version":"4.1.1","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"uninstall":{"version":"0.0.0","license":"MIT"},"websql":{"version":"2.0.3","url":"git://github.com/nolanlawson/node-websql.git","license":"Apache-2.0"},"xlsx":{"version":"0.18.5","url":"https://sheetjs.com/","license":"Apache-2.0"}};
|