@fto-consult/expo-ui 8.53.2 → 8.54.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/bin/create-app/App.js +3 -1
- package/bin/create-app/src/components/Form/customFields/IdField.js +28 -0
- package/bin/create-app/src/components/Form/customFields/SelectTableData.js +27 -0
- package/bin/create-app/src/components/Form/customFields/index.js +9 -0
- package/bin/create-app/src/screens/TableData/TableDataScreen.js +29 -3
- package/package.json +1 -1
- package/src/components/Form/Fields/IdField.js +42 -22
- package/src/components/Form/List/List.js +14 -3
- package/src/context/Provider.js +0 -1
- package/src/screens/Help/openLibraries.js +94 -123
- package/src/components/Barcode/Scanner/index.web.js +0 -5
- package/src/realm/Provider/index.js +0 -12
- package/src/realm/Provider/realm.not-enabled.js +0 -7
- package/src/realm/index.js +0 -16
- package/src/realm/react/index.js +0 -9
- package/src/realm/realm/index.js +0 -5
- package/src/realm/realm/index.web.js +0 -5
package/bin/create-app/App.js
CHANGED
@@ -12,6 +12,8 @@ import Notifications from "$components/Notifications";
|
|
12
12
|
import auth from "$src/auth";
|
13
13
|
import tablesData, { getTable as getTableData } from "$database/tables";
|
14
14
|
import {defaultStr} from "$cutils";
|
15
|
+
import customFormFields from "$components/Form/customFields";
|
16
|
+
|
15
17
|
|
16
18
|
export default function AppMainEntry(){
|
17
19
|
return <ExpoUIProvider
|
@@ -88,7 +90,7 @@ export default function AppMainEntry(){
|
|
88
90
|
test : Test, //ou test est le fom field associé au type test, ie le composant qui sera rendu pour ce type de Champ,
|
89
91
|
}
|
90
92
|
*/
|
91
|
-
customFormFields
|
93
|
+
customFormFields,
|
92
94
|
/***
|
93
95
|
la fonction permettant de muter les props du composant TableLink, permetant de lier les tables entre elles
|
94
96
|
Le composant TableLink permet de lier les données d'une tableData, L'usage dudit composant est définit dans la documentation de l'application
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import IdField from "$ecomponents/Form/Fields/IdField";
|
2
|
+
|
3
|
+
export default class IdFieldComponent extends IdField {
|
4
|
+
constructor(props) {
|
5
|
+
super(props);
|
6
|
+
}
|
7
|
+
isValidRuleDynamic() {
|
8
|
+
return true;
|
9
|
+
}
|
10
|
+
|
11
|
+
/*****
|
12
|
+
Le composant de type id, permet de générer un id pour chaque champ de ce type qui est en mode disabled en cas de modification de la donnée.
|
13
|
+
L'id générée peut être le résultat d'un appel d'api distante et doit être soit un nombre soit une chaine de caractère non null.
|
14
|
+
normalement les champs de type id sont unique dans une table data, la fonction suivante a pour but une fois, en cas d'ajout d'un novuel élémnent de la table data
|
15
|
+
et lorsque l'évènement onBlur est appelé sur le champ de type id, d'appeler une fonction distante afin de générer une valeur de l'id pour la valeur à enregistrer en bd;
|
16
|
+
@param {function} callback, la fonction de rappel à appeler une fois l'id récupérer. doit passer en paramètre de la dite fonction, l'id récupérée en bd. L'id récupérée en bd doit être unique et ne dois jamais été assigné à un autre élément de la table data
|
17
|
+
*/
|
18
|
+
fetchNewIdRemotely(callback){
|
19
|
+
return super.fetchNewIdRemotely(callback);
|
20
|
+
}
|
21
|
+
isTextField() {
|
22
|
+
return true;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
IdFieldComponent.propTypes = {
|
27
|
+
...Object.assign({},IdField.propTypes)
|
28
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import SelectTableData from "$ecomponents/Form/Fields/SelectTableData";
|
2
|
+
import React from "$react";
|
3
|
+
import fetch from "$capi/fetch";
|
4
|
+
|
5
|
+
const SelectTableDataComponentLayout = React.forwardRef(({fetchItems,...props},ref)=>{
|
6
|
+
return <SelectTableData
|
7
|
+
{...props}
|
8
|
+
ref = {ref}
|
9
|
+
parseMangoQueries = {true}
|
10
|
+
prepareFilters = {false}
|
11
|
+
/****
|
12
|
+
implémenter votre logique de récupération des données des en base de donées, des champs de type SelectTableData, permettant la sélection d'une table de donénes de la bd
|
13
|
+
*/
|
14
|
+
fetchItems={(path,opts)=>{
|
15
|
+
if(typeof fetchItems =='function'){
|
16
|
+
return fetchItems(path,opts);
|
17
|
+
}
|
18
|
+
return fetch(path,opts);
|
19
|
+
}}
|
20
|
+
/>
|
21
|
+
});
|
22
|
+
|
23
|
+
SelectTableDataComponentLayout.propTypes = SelectTableData.propTypes;
|
24
|
+
|
25
|
+
SelectTableDataComponentLayout.displayName = "SelectTableDataComponentLayout";
|
26
|
+
|
27
|
+
export default SelectTableDataComponentLayout;
|
@@ -8,16 +8,42 @@
|
|
8
8
|
|
9
9
|
import TableData from "$eScreen/TableData";
|
10
10
|
import notify from "$cnotify";
|
11
|
+
import {defaultStr} from "$cutils";
|
12
|
+
import getTable from "$database/tables/getTable"
|
11
13
|
|
12
14
|
|
13
15
|
export default class TableDataScreenItem extends TableData{
|
14
16
|
/**** cette méthode est très utile pour la vérification des id de type unique en base de données
|
17
|
+
Elle est valable pour les champs de type id, de type piece, ou dont la propriété primaryKey est à true ou la proprité unique est à true,
|
18
|
+
Elle est appelée pour les champs de type id en cas d'ajout d'un élément de la table data; Lorsque l'évènement onBlur est appelé sur le champ de type id,
|
19
|
+
La fonction suivante est appelée dans le but de vérifier s'il existe déjà en base de données une valeur idenetique à celle renseignée par l'utilisateur.
|
15
20
|
par exemple, vous avez une table en base de données dont l'id est le code et en création de la nouvelle données, vous vérifiez si celle entrée par l'utilisateur existe déjà en base ou non
|
16
21
|
Cette fonction doit retourner une promise, qui lorsque la donnée existe, elle doit retourner l'objet correspondant à l'id recherché en bd ou généer une exception si elle n'existe pas
|
17
|
-
|
22
|
+
@return {Promise<object>}
|
18
23
|
*/
|
19
|
-
fetchUniqueId ({value,field,fieldName,foreignKeyColumn,table:
|
20
|
-
|
24
|
+
fetchUniqueId ({value,field,fieldName,foreignKeyColumn,table:customTable,tableName:customTableName,foreignKeyTable}){
|
25
|
+
const tableObj = this.getTableObj(); //tableObj représente la table data, enreigstré dans $src/database/tables dont le nom est passé à l'item en cours
|
26
|
+
let tableName = defaultStr(foreignKeyTable,this.tableName,customTable,customTableName).trim().toUpperCase();
|
27
|
+
const foreignTableObj = tableName !== this.tableName ? getTable(tableName) : tableObj
|
28
|
+
foreignKeyColumn = defaultStr(foreignKeyColumn,field,fieldName);
|
29
|
+
if(!foreignKeyColumn){
|
30
|
+
return Promise.reject({message:"Impossible de faire un fetch de l'id unique pour la table"+foreignKeyTable+", de valuer : "+value})
|
31
|
+
}
|
32
|
+
if(!foreignTableObj){
|
33
|
+
return Promise.reject({message:`Impossible de récupérer la données d'id unique lié à la table ${foreignKeyTable}, colonne ${foreignKeyColumn} car la table data est invalide`})
|
34
|
+
}
|
35
|
+
tableName = defaultStr(foreignTableObj.tableName,this.tableName,foreignTableObj.table,tableName).toUpperCase();
|
36
|
+
//il s'agit là de récupérer une données en base de données, ayant dont la colonne [foreignKeyColumn.trim()] = value;
|
37
|
+
const where = {
|
38
|
+
[foreignKeyColumn.trim()] : value //la condition d'appel de la données à récupérer en base de données
|
39
|
+
};
|
40
|
+
/***
|
41
|
+
implémenter votre propre logique afin de récupérer la données, au backend; il est à noter que l'objet à retourner, si existant en bd doit être avoir au moins un champ définit de la forme : {[foreignKeyColmn]:[valuerEnBD]}
|
42
|
+
Si une exception est généré, alors cette exception doit avoir un champ status = 404, pour signifier que l'objet n'existe pas en bd
|
43
|
+
*/
|
44
|
+
return Promise.reject({
|
45
|
+
message : `Veuillez implémenter votre logique de récupération en bd du champ ${foreignKeyColumn} pour la valeur ${value} de la table data ${tableName}. Consultez le fichier $src/screens/TableDataScreen afin d'implémenetr la fonction fetchUniqueId`
|
46
|
+
});
|
21
47
|
}
|
22
48
|
/*** implémenter la routine beforeSave, avant l'enregistrement de la données liée à la table encours
|
23
49
|
-si cette fonction retourne une chaine de caractère, alors cette chaine est considérée comme une erreur et elle est affichée via une notification à l'utilisateur
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.54.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": {
|
@@ -14,6 +14,12 @@ export default class FormIDField extends TextField {
|
|
14
14
|
this.newFieldIdValue = undefined;
|
15
15
|
return super.UNSAFE_componentWillReceiveProps(nextProps);
|
16
16
|
}
|
17
|
+
/***
|
18
|
+
détermnine si la valeur est valide
|
19
|
+
*/
|
20
|
+
isValidIdValue(value){
|
21
|
+
return isNonNullString(value) || typeof value =="number";
|
22
|
+
}
|
17
23
|
componentDidMount(){
|
18
24
|
super.componentDidMount();
|
19
25
|
this.fetchNewId(false);
|
@@ -26,40 +32,51 @@ export default class FormIDField extends TextField {
|
|
26
32
|
errorCb(e);
|
27
33
|
}
|
28
34
|
}
|
29
|
-
|
35
|
+
|
36
|
+
/****
|
37
|
+
récupère la valeur de l'id distante
|
38
|
+
@param {function} cb, la fonction de rappel à appeler pour le rendu du résultata
|
39
|
+
*/
|
40
|
+
fetchNewIdRemotely(cb){
|
41
|
+
const data = defaultObj(this.props.data);
|
42
|
+
const fId = typeof this.props.fetchNewId =='function'? this.props.fetchNewId({...this.props,data,columnField:this.name}) : null;
|
43
|
+
if(isPromise(fId)){
|
44
|
+
return fId.then(cb).catch(e=>{
|
45
|
+
console.log(e," fetching new piece id ",this.name);
|
46
|
+
});
|
47
|
+
}
|
48
|
+
return cb(fId);
|
49
|
+
}
|
50
|
+
|
51
|
+
|
30
52
|
/*** met à jour la données du numéro de piece */
|
31
53
|
fetchNewId(focus){
|
32
54
|
if(this.isFilter()){
|
33
55
|
return Promise.resolve("");
|
34
56
|
}
|
35
57
|
const data = defaultObj(this.props.data);
|
36
|
-
|
58
|
+
const name = defaultStr(this.name, this.props.name);
|
59
|
+
if(!name) return Promise.resolve("");
|
37
60
|
const cb = (value)=>{
|
38
|
-
if(
|
61
|
+
if(this.isValidIdValue(value)){
|
39
62
|
this.newFieldIdValue = value;
|
40
63
|
this.validate({value});
|
41
64
|
if(focus) this.focus();
|
42
65
|
}
|
43
66
|
}
|
44
|
-
if(
|
45
|
-
cb(data[
|
46
|
-
return data[
|
67
|
+
if(this.isValidIdValue(data[name])){
|
68
|
+
cb(data[name]);
|
69
|
+
return data[name]
|
47
70
|
}
|
48
71
|
setTimeout(()=>{
|
49
|
-
|
50
|
-
if(isPromise(fId)){
|
51
|
-
return fId.then(cb).catch(e=>{
|
52
|
-
console.log(e," fetching new piece id ",this.name);
|
53
|
-
});
|
54
|
-
}
|
55
|
-
return cb(fId);
|
72
|
+
this.fetchNewIdRemotely(cb);
|
56
73
|
},10);
|
57
74
|
}
|
58
75
|
/*** retourne la valeur validée */
|
59
76
|
getValidValue(data){
|
60
77
|
const validValue = super.getValidValue(data);
|
61
78
|
if(!isNonNullString(this.name)) return validValue;
|
62
|
-
data[this.name] =
|
79
|
+
data[this.name] = this.isValidIdValue(data[this.name])? data[this.name] : this.isValidIdValue(validValue)? validValue : this.newFieldIdValue;
|
63
80
|
return validValue;
|
64
81
|
}
|
65
82
|
isValidRuleDynamic(){
|
@@ -69,30 +86,34 @@ export default class FormIDField extends TextField {
|
|
69
86
|
return false;
|
70
87
|
}
|
71
88
|
componentDidUpdate(){
|
72
|
-
if(!this.isFilter() && !
|
89
|
+
if(!this.isFilter() && !this.isValidIdValue(this.newFieldIdValue)){
|
73
90
|
this.fetchNewId();
|
74
91
|
}
|
75
92
|
}
|
76
93
|
_render(props,setRef){
|
77
94
|
delete props.validType;
|
95
|
+
const data = defaultObj(props.data);
|
96
|
+
const name = defaultStr(this.name, this.props.name);
|
97
|
+
const hasV = this.isValidIdValue(data[name]);
|
98
|
+
props.upper = typeof props.upper =="boolean"? props.upper : true;
|
78
99
|
if(!this.isFilter()){
|
79
|
-
const upper = props.upper
|
80
|
-
if(
|
100
|
+
const upper = props.upper ? UPPER_CASE : "";
|
101
|
+
if(name && hasV){
|
81
102
|
props.disabled = true;
|
82
103
|
props.validType = upper;
|
83
|
-
props.defaultValue =
|
104
|
+
props.defaultValue = data[name];
|
84
105
|
} else {
|
85
106
|
props.validType = 'required|'+upper;
|
86
107
|
}
|
87
108
|
if(typeof props.minLength !=='number'){
|
88
|
-
props.minLength = 2;
|
109
|
+
props.minLength = 2; //la longueur minimale d'un champ de type id est de 2
|
89
110
|
}
|
90
|
-
const defValue = props.defaultValue =
|
111
|
+
const defValue = props.defaultValue = this.isValidIdValue(props.defaultValue)? props.defaultValue : this.isValidIdValue(this.newFieldIdValue)? this.newFieldIdValue : undefined;
|
91
112
|
props.validRule = props.validType;
|
92
113
|
props.contentContainerProps = Object.assign({},props.contentContainerProps)
|
93
114
|
props.contentContainerProps.pointerEvents = defaultStr(props.contentContainerProps.pointerEvents,"auto");
|
94
115
|
props.enableCopy = typeof props.enableCopy ==='boolean'? props.enableCopy : (props.defaultValue || this.newFieldIdValue ? true : false);
|
95
|
-
props.readOnly = typeof props.
|
116
|
+
props.readOnly = typeof props.readOnly =="boolean"? props.readOnly : typeof props.disabled ==='boolean' ? props.disabled : false;
|
96
117
|
|
97
118
|
const {right} = props;
|
98
119
|
props.right = (props)=>{
|
@@ -105,7 +126,6 @@ export default class FormIDField extends TextField {
|
|
105
126
|
}
|
106
127
|
return r;
|
107
128
|
}
|
108
|
-
|
109
129
|
this.setValidRule(props.validType);
|
110
130
|
} else {
|
111
131
|
props.enableCopy = false;
|
@@ -463,8 +463,9 @@ export default class FormListComponent extends AppComponent {
|
|
463
463
|
primaryText = defaultFunc(primaryText,x=>null);
|
464
464
|
renderAvatar = defaultFunc(renderAvatar,x=>null);
|
465
465
|
/*** les props de chaque items de la liste */
|
466
|
-
itemProps=
|
466
|
+
itemProps= Object.clone(defaultObj(itemProps))
|
467
467
|
const descriptionNumberOfLines = typeof itemProps.rows ==='number' && itemProps.rows ? itemProps.rows : 3;
|
468
|
+
const {left:itemLeft,right:itemRight} = itemProps;
|
468
469
|
let counter = -1;
|
469
470
|
let is_o = this.isHandlingObject;
|
470
471
|
let addIconObj = null;
|
@@ -563,8 +564,9 @@ export default class FormListComponent extends AppComponent {
|
|
563
564
|
</View>
|
564
565
|
<View testID={testID+"_FormListWrapper"} style={[theme.styles.ph1]}>
|
565
566
|
<FlashList
|
566
|
-
items = {allData}
|
567
567
|
responsive
|
568
|
+
{...defaultObj(this.props.listProps)}
|
569
|
+
items = {allData}
|
568
570
|
prepareItems = {(items)=>{
|
569
571
|
const itx = [];
|
570
572
|
Object.map(items,(data,index,ct)=>{
|
@@ -572,7 +574,7 @@ export default class FormListComponent extends AppComponent {
|
|
572
574
|
const _index = this.getIndex({data,index,allData:items});
|
573
575
|
if(is_o && (!isNumber(_index) && !isNonNullString(_index))) return null;
|
574
576
|
counter++;
|
575
|
-
const pArgs = {avatarProps,context,itemProps,data:data,index,allData:allData};
|
577
|
+
const pArgs = {avatarProps,context,itemProps,data,item:data,index,allData:allData};
|
576
578
|
const deletable = deletableFunc(pArgs),
|
577
579
|
readOnly = readOnlyFunc(pArgs);
|
578
580
|
let avatar = renderAvatar.call(context,pArgs);
|
@@ -590,6 +592,12 @@ export default class FormListComponent extends AppComponent {
|
|
590
592
|
avatar = undefined;
|
591
593
|
}
|
592
594
|
itemProps.left = (lProps)=>{
|
595
|
+
const l = typeof itemLeft =="function"? itemLeft({...lProps,...pArgs}) : itemLeft;
|
596
|
+
if(l && React.isValidElement(l)){
|
597
|
+
return <>
|
598
|
+
{l}<Avatar suffix={ct} {...avatarProps} src={src}>{avatar}</Avatar>
|
599
|
+
</>
|
600
|
+
}
|
593
601
|
return <Avatar suffix={ct} {...avatarProps} src={src}>{avatar}</Avatar>
|
594
602
|
};
|
595
603
|
}
|
@@ -616,6 +624,7 @@ export default class FormListComponent extends AppComponent {
|
|
616
624
|
renderItem = {({item})=>{
|
617
625
|
const {data,title,description,key,_index,props,index,readOnly,deletable} = item;
|
618
626
|
const titleText = React.getTextContent(title);
|
627
|
+
const r = typeof itemRight =="function"? itemRight(item) : itemRight;
|
619
628
|
return <View key={key} testID={testID+".Cell"+key} style={[theme.styles.w100]}>
|
620
629
|
<Surface key={key} elevation={5} {...itemContainerProps} style={[styles.itemContainer,itemContainerProps.style]}>
|
621
630
|
<List.Item
|
@@ -637,6 +646,7 @@ export default class FormListComponent extends AppComponent {
|
|
637
646
|
React.stopEventPropagation(e);
|
638
647
|
this.delete({...data},index,title);
|
639
648
|
}}></Icon>}
|
649
|
+
{React.isValidElement(r)? r : null}
|
640
650
|
</View>
|
641
651
|
}}
|
642
652
|
/>
|
@@ -767,6 +777,7 @@ FormListComponent.propTypes = {
|
|
767
777
|
//sa peut être un contenu noeu où alors un élément où une chaine de caractère
|
768
778
|
onRemove : PropTypes.func,
|
769
779
|
onDelete : PropTypes.func,
|
780
|
+
listProps : PropTypes.object, //les props à passer au composant FlashList
|
770
781
|
}
|
771
782
|
|
772
783
|
const styles = StyleSheet.create({
|
package/src/context/Provider.js
CHANGED
@@ -86,7 +86,6 @@ Object.map(Utils,(v,i)=>{
|
|
86
86
|
loginPropsMutator : ({object})=><{object}>, la fonction permettant de muter les props du composant Login,
|
87
87
|
}
|
88
88
|
swrConfig : {object},//les paramètres de configuration de l'objet swr utilisée dans le composant SWRDatagrid
|
89
|
-
realm : {}, //les options de configurations de la base de données realmdb
|
90
89
|
*/
|
91
90
|
const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,auth:cAuth,components:cComponents,parseMangoQueries,getStructData,tablesData,structsData,...props})=>{
|
92
91
|
const {extendAppTheme} = appConfig;
|
@@ -1,22 +1,21 @@
|
|
1
1
|
module.exports = {
|
2
2
|
"@fto-consult/expo-ui": {
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"
|
3
|
+
"name": "@fto-consult/expo-ui",
|
4
|
+
"version": "8.54.0",
|
5
|
+
"repository": {
|
6
|
+
"type": "git",
|
7
|
+
"url": "git+https://github.com/borispipo/expo-ui.git"
|
8
|
+
},
|
9
|
+
"homepage": "https://github.com/borispipo/expo-ui#readme"
|
6
10
|
},
|
7
11
|
"@babel/plugin-proposal-export-namespace-from": {
|
8
12
|
"version": "7.18.9",
|
9
13
|
"url": "https://babel.dev/docs/en/next/babel-plugin-proposal-export-namespace-from",
|
10
14
|
"license": "MIT"
|
11
15
|
},
|
12
|
-
"@emotion/
|
13
|
-
"version": "11.11.
|
14
|
-
"url": "https://emotion
|
15
|
-
"license": "MIT"
|
16
|
-
},
|
17
|
-
"@expo/html-elements": {
|
18
|
-
"version": "0.5.1",
|
19
|
-
"url": "https://github.com/expo/expo/tree/main/packages/html-elements",
|
16
|
+
"@emotion/react": {
|
17
|
+
"version": "11.11.4",
|
18
|
+
"url": "https://github.com/emotion-js/emotion/tree/main/packages/react",
|
20
19
|
"license": "MIT"
|
21
20
|
},
|
22
21
|
"@expo/metro-config": {
|
@@ -24,59 +23,28 @@ module.exports = {
|
|
24
23
|
"url": "https://github.com/expo/expo.git",
|
25
24
|
"license": "MIT"
|
26
25
|
},
|
27
|
-
"@expo/vector-icons": {
|
28
|
-
"version": "14.0.0",
|
29
|
-
"url": "https://expo.github.io/vector-icons",
|
30
|
-
"license": "MIT"
|
31
|
-
},
|
32
26
|
"@expo/webpack-config": {
|
33
27
|
"version": "19.0.1",
|
34
28
|
"url": "https://github.com/expo/expo-webpack-integrations/tree/main/packages/webpack-config#readme",
|
35
29
|
"license": "MIT"
|
36
30
|
},
|
37
|
-
"@
|
38
|
-
"version": "
|
39
|
-
"url": "https://github.com/
|
40
|
-
"license": "MIT"
|
41
|
-
},
|
42
|
-
"@react-native-async-storage/async-storage": {
|
43
|
-
"version": "1.21.0",
|
44
|
-
"url": "https://github.com/react-native-async-storage/async-storage#readme",
|
45
|
-
"license": "MIT"
|
46
|
-
},
|
47
|
-
"@react-native-community/datetimepicker": {
|
48
|
-
"version": "7.6.1",
|
49
|
-
"url": "https://github.com/react-native-community/datetimepicker#readme",
|
31
|
+
"@faker-js/faker": {
|
32
|
+
"version": "8.4.1",
|
33
|
+
"url": "https://github.com/faker-js/faker.git",
|
50
34
|
"license": "MIT"
|
51
35
|
},
|
52
|
-
"@
|
53
|
-
"version": "
|
54
|
-
"url": "https://github.com/
|
55
|
-
"license": "
|
56
|
-
},
|
57
|
-
"@react-native/assets-registry": {
|
58
|
-
"version": "0.72.0",
|
59
|
-
"url": "git@github.com:facebook/react-native.git",
|
60
|
-
"license": "MIT"
|
61
|
-
},
|
62
|
-
"@react-navigation/native": {
|
63
|
-
"version": "6.1.16",
|
64
|
-
"url": "https://reactnavigation.org",
|
65
|
-
"license": "MIT"
|
66
|
-
},
|
67
|
-
"@react-navigation/native-stack": {
|
68
|
-
"version": "6.9.25",
|
69
|
-
"url": "https://github.com/software-mansion/react-native-screens#readme",
|
70
|
-
"license": "MIT"
|
36
|
+
"@fto-consult/common": {
|
37
|
+
"version": "4.37.0",
|
38
|
+
"url": "https://github.com/borispipo/common#readme",
|
39
|
+
"license": "ISC"
|
71
40
|
},
|
72
|
-
"@
|
73
|
-
"version": "
|
74
|
-
"url": "https://reactnavigation.org/docs/stack-navigator/",
|
41
|
+
"@fto-consult/node-utils": {
|
42
|
+
"version": "1.7.1",
|
75
43
|
"license": "MIT"
|
76
44
|
},
|
77
|
-
"
|
78
|
-
"version": "
|
79
|
-
"url": "https://
|
45
|
+
"apexcharts": {
|
46
|
+
"version": "3.47.0",
|
47
|
+
"url": "https://apexcharts.com",
|
80
48
|
"license": "MIT"
|
81
49
|
},
|
82
50
|
"babel-plugin-inline-dotenv": {
|
@@ -94,69 +62,48 @@ module.exports = {
|
|
94
62
|
"url": "https://github.com/crypto-browserify/crypto-browserify",
|
95
63
|
"license": "MIT"
|
96
64
|
},
|
97
|
-
"
|
98
|
-
"version": "
|
99
|
-
"url": "https://github.com/
|
65
|
+
"file-saver": {
|
66
|
+
"version": "2.0.5",
|
67
|
+
"url": "https://github.com/eligrey/FileSaver.js#readme",
|
100
68
|
"license": "MIT"
|
101
69
|
},
|
102
|
-
"
|
103
|
-
"version": "
|
104
|
-
"url": "https://
|
105
|
-
"license": "MIT"
|
106
|
-
},
|
107
|
-
"expo-clipboard": {
|
108
|
-
"version": "5.0.1",
|
109
|
-
"url": "https://docs.expo.dev/versions/latest/sdk/clipboard",
|
110
|
-
"license": "MIT"
|
111
|
-
},
|
112
|
-
"expo-font": {
|
113
|
-
"version": "11.10.3",
|
114
|
-
"url": "https://docs.expo.dev/versions/latest/sdk/font/",
|
115
|
-
"license": "MIT"
|
116
|
-
},
|
117
|
-
"expo-image-picker": {
|
118
|
-
"version": "14.7.1",
|
119
|
-
"url": "https://docs.expo.dev/versions/latest/sdk/imagepicker/",
|
120
|
-
"license": "MIT"
|
121
|
-
},
|
122
|
-
"expo-intent-launcher": {
|
123
|
-
"version": "10.11.0",
|
124
|
-
"url": "https://docs.expo.dev/versions/latest/sdk/intent-launcher/",
|
125
|
-
"license": "MIT"
|
70
|
+
"google-libphonenumber": {
|
71
|
+
"version": "3.2.34",
|
72
|
+
"url": "https://ruimarinho.github.io/google-libphonenumber/",
|
73
|
+
"license": "(MIT AND Apache-2.0)"
|
126
74
|
},
|
127
|
-
"
|
128
|
-
"version": "
|
129
|
-
"url": "https://
|
75
|
+
"html2canvas": {
|
76
|
+
"version": "1.4.1",
|
77
|
+
"url": "https://html2canvas.hertzen.com",
|
130
78
|
"license": "MIT"
|
131
79
|
},
|
132
|
-
"
|
133
|
-
"version": "
|
134
|
-
"url": "
|
80
|
+
"htmlparser2-without-node-native": {
|
81
|
+
"version": "3.9.2",
|
82
|
+
"url": "git://github.com/fb55/htmlparser2.git",
|
135
83
|
"license": "MIT"
|
136
84
|
},
|
137
|
-
"
|
138
|
-
"version": "
|
139
|
-
"url": "https://docs.expo.dev/versions/latest/sdk/sqlite/",
|
85
|
+
"is-plain-obj": {
|
86
|
+
"version": "4.1.0",
|
140
87
|
"license": "MIT"
|
141
88
|
},
|
142
|
-
"
|
143
|
-
"version": "
|
144
|
-
"url": "https://
|
89
|
+
"jsbarcode": {
|
90
|
+
"version": "3.11.6",
|
91
|
+
"url": "https://github.com/lindell/JsBarcode#readme",
|
145
92
|
"license": "MIT"
|
146
93
|
},
|
147
|
-
"
|
148
|
-
"version": "
|
149
|
-
"url": "https://
|
94
|
+
"prop-types": {
|
95
|
+
"version": "15.8.1",
|
96
|
+
"url": "https://facebook.github.io/react/",
|
150
97
|
"license": "MIT"
|
151
98
|
},
|
152
|
-
"
|
153
|
-
"version": "
|
154
|
-
"url": "https://
|
99
|
+
"react-content-loader": {
|
100
|
+
"version": "6.2.1",
|
101
|
+
"url": "https://github.com/danilowoz/react-content-loader",
|
155
102
|
"license": "MIT"
|
156
103
|
},
|
157
|
-
"react-
|
158
|
-
"version": "
|
159
|
-
"url": "https://
|
104
|
+
"react-dom": {
|
105
|
+
"version": "18.2.0",
|
106
|
+
"url": "https://reactjs.org/",
|
160
107
|
"license": "MIT"
|
161
108
|
},
|
162
109
|
"react-native-big-list": {
|
@@ -164,44 +111,68 @@ module.exports = {
|
|
164
111
|
"url": "https://marcocesarato.github.io/react-native-big-list-docs/",
|
165
112
|
"license": "GPL-3.0-or-later"
|
166
113
|
},
|
167
|
-
"react-native-
|
168
|
-
"version": "
|
169
|
-
"url": "https://github.com/
|
114
|
+
"react-native-iphone-x-helper": {
|
115
|
+
"version": "1.3.1",
|
116
|
+
"url": "https://github.com/ptelad/react-native-iphone-x-helper#readme",
|
170
117
|
"license": "MIT"
|
171
118
|
},
|
172
|
-
"react-native-
|
173
|
-
"version": "2.
|
174
|
-
"url": "https://github.com/software-mansion/react-native-gesture-handler#readme",
|
119
|
+
"react-native-mime-types": {
|
120
|
+
"version": "2.5.0",
|
175
121
|
"license": "MIT"
|
176
122
|
},
|
177
|
-
"react-native-
|
178
|
-
"version": "
|
179
|
-
"url": "https://github.
|
123
|
+
"react-native-paper": {
|
124
|
+
"version": "5.12.3",
|
125
|
+
"url": "https://callstack.github.io/react-native-paper",
|
180
126
|
"license": "MIT"
|
181
127
|
},
|
182
|
-
"react-native-
|
183
|
-
"version": "
|
184
|
-
"url": "https://github.com/
|
128
|
+
"react-native-paper-dates": {
|
129
|
+
"version": "0.22.3",
|
130
|
+
"url": "https://github.com/web-ridge/react-native-paper-dates#readme",
|
185
131
|
"license": "MIT"
|
186
132
|
},
|
187
|
-
"react-native-
|
188
|
-
"version": "
|
189
|
-
"url": "
|
133
|
+
"react-native-web": {
|
134
|
+
"version": "0.19.10",
|
135
|
+
"url": "git://github.com/necolas/react-native-web.git",
|
190
136
|
"license": "MIT"
|
191
137
|
},
|
192
|
-
"react-
|
193
|
-
"version": "
|
194
|
-
"url": "https://
|
138
|
+
"react-virtuoso": {
|
139
|
+
"version": "4.7.2",
|
140
|
+
"url": "https://virtuoso.dev/",
|
195
141
|
"license": "MIT"
|
196
142
|
},
|
197
|
-
"
|
198
|
-
"version": "
|
199
|
-
"url": "https://github.com/
|
143
|
+
"readable-stream": {
|
144
|
+
"version": "4.5.2",
|
145
|
+
"url": "https://github.com/nodejs/readable-stream",
|
146
|
+
"license": "MIT"
|
147
|
+
},
|
148
|
+
"sanitize-filename": {
|
149
|
+
"version": "1.6.3",
|
150
|
+
"url": "git@github.com:parshap/node-sanitize-filename.git",
|
151
|
+
"license": "WTFPL OR ISC"
|
152
|
+
},
|
153
|
+
"sharp-cli": {
|
154
|
+
"version": "2.1.1",
|
155
|
+
"url": "https://github.com/vseventer/sharp-cli",
|
200
156
|
"license": "MIT"
|
201
157
|
},
|
202
158
|
"stream-browserify": {
|
203
159
|
"version": "3.0.0",
|
204
160
|
"url": "https://github.com/browserify/stream-browserify",
|
205
161
|
"license": "MIT"
|
162
|
+
},
|
163
|
+
"tippy.js": {
|
164
|
+
"version": "6.3.7",
|
165
|
+
"url": "https://atomiks.github.io/tippyjs/",
|
166
|
+
"license": "MIT"
|
167
|
+
},
|
168
|
+
"vm": {
|
169
|
+
"version": "0.1.0",
|
170
|
+
"url": "https://github.com/DiegoRBaquero/node-vm#readme",
|
171
|
+
"license": "MIT"
|
172
|
+
},
|
173
|
+
"xlsx": {
|
174
|
+
"version": "0.18.5",
|
175
|
+
"url": "https://sheetjs.com/",
|
176
|
+
"license": "Apache-2.0"
|
206
177
|
}
|
207
178
|
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import useExpoUI from "$econtext/hooks";
|
2
|
-
import React from "$react";
|
3
|
-
|
4
|
-
export default function ExpoUIRealmProvider({children,...props}){
|
5
|
-
return children;
|
6
|
-
const {realm:{RealmProvider,Provider}} = useExpoUI();
|
7
|
-
RealmProvider = React.isComponent(RealmProvider)? RealmProvider : React.isComponent(Provider)?Provider : null;
|
8
|
-
if(!RealmProvider){
|
9
|
-
throw "Vous devez definir le provider realm de l'application, dans l'objet real de la fonction registerApp de $expo-ui";
|
10
|
-
}
|
11
|
-
return <RealmProvider>{children}</RealmProvider>
|
12
|
-
}
|
@@ -1,7 +0,0 @@
|
|
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
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
import Realm from "./realm";
|
2
|
-
|
3
|
-
export default Realm;
|
4
|
-
|
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
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import {createRealmContext} from '@realm/react';
|
2
|
-
export * from '@realm/react';
|
3
|
-
|
4
|
-
/*** permet de créer un contexte associé à l'objet Ream */
|
5
|
-
export const createContext = (realmConfig)=>{
|
6
|
-
return createRealmContext(realmConfig);
|
7
|
-
}
|
8
|
-
|
9
|
-
export * from "$erealmProvider";
|
package/src/realm/realm/index.js
DELETED