@fto-consult/expo-ui 1.5.2 → 1.5.4
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
CHANGED
|
@@ -84,18 +84,21 @@ module.exports = (opts)=>{
|
|
|
84
84
|
|
|
85
85
|
const HelpScreen = path.resolve(r["$escreens"],"Help");
|
|
86
86
|
/*** alias des termsOfUses */
|
|
87
|
+
r.$eTermsOfUses = path.resolve(HelpScreen,"TermsOfUses","content");
|
|
87
88
|
if(!r.$TermsOfUses){
|
|
88
|
-
r.$TermsOfUses =
|
|
89
|
+
r.$TermsOfUses = r.$eTermsOfUses;
|
|
89
90
|
}
|
|
90
91
|
/*** alias des privacyPolicy */
|
|
92
|
+
r.$ePrivacyPolicy = path.resolve(HelpScreen,"PrivacyPolicy","content");
|
|
91
93
|
if(!r.$PrivacyPolicy){
|
|
92
|
-
r.$PrivacyPolicy =
|
|
94
|
+
r.$PrivacyPolicy = r.$ePrivacyPolicy;
|
|
93
95
|
}
|
|
94
96
|
///on génère les librairies open sources utilisées par l'application
|
|
95
97
|
const root = path.resolve(r.$src,"..");
|
|
96
98
|
const outputPath = path.resolve(HelpScreen,"openLibraries.js");
|
|
97
99
|
require("./find-licenses")({
|
|
98
100
|
paths : [root,r["$expo-ui-root-path"]],
|
|
101
|
+
nodeModulesPath : path.resolve(root,"node_modules"),
|
|
99
102
|
outputPath
|
|
100
103
|
});
|
|
101
104
|
return r;
|
package/find-licenses.js
CHANGED
|
@@ -13,11 +13,14 @@ function isValidUrl(str) {
|
|
|
13
13
|
return !!pattern.test(str);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const loopPackages = (packages,projectPath)=>{
|
|
16
|
+
const loopPackages = (packages,projectPath,nodeModulesPath)=>{
|
|
17
17
|
if(!isObj(packages)) return;
|
|
18
|
-
|
|
18
|
+
nodeModulesPath = typeof nodeModulesPath =='string' && nodeModulesPath ? nodeModulesPath : "";
|
|
19
|
+
const p = path.resolve(projectPath,"node_modules");
|
|
19
20
|
for(let i in packages){
|
|
20
|
-
|
|
21
|
+
const packageRootPath = fs.existsSync(path.resolve(p,i))? path.resolve(p,i) : nodeModulesPath && fs.existsSync(path.resolve(nodeModulesPath,i)) ? path.resolve(nodeModulesPath,i) : null;
|
|
22
|
+
if(!packageRootPath) continue;
|
|
23
|
+
const packagePath = path.resolve(packageRootPath,"package.json");
|
|
21
24
|
if(fs.existsSync(packagePath)){
|
|
22
25
|
try {
|
|
23
26
|
let package = require(packagePath);
|
|
@@ -44,14 +47,14 @@ const loopPackages = (packages,projectPath)=>{
|
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
|
|
47
|
-
const findLicences = (projectPath)=> {
|
|
50
|
+
const findLicences = (projectPath,nodeModulesPath)=> {
|
|
48
51
|
if(projectPath && typeof projectPath =='string' && fs.existsSync(projectPath)){
|
|
49
52
|
const packagePath = path.resolve(projectPath,"package.json");
|
|
50
53
|
if(fs.existsSync(packagePath)){
|
|
51
54
|
const packages = require(packagePath);
|
|
52
55
|
if(isObj(packages)){
|
|
53
|
-
loopPackages(packages.devDependencies,projectPath);
|
|
54
|
-
loopPackages(packages.dependencies,projectPath);
|
|
56
|
+
loopPackages(packages.devDependencies,projectPath,nodeModulesPath);
|
|
57
|
+
loopPackages(packages.dependencies,projectPath,nodeModulesPath);
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -61,18 +64,18 @@ module.exports = (options)=>{
|
|
|
61
64
|
if(!options || typeof options !='object'){
|
|
62
65
|
options = {};
|
|
63
66
|
}
|
|
64
|
-
const {outputPath} = options;
|
|
67
|
+
const {outputPath,nodeModulesPath} = options;
|
|
65
68
|
const outputDir = outputPath && typeof outputPath =='string' && path.dirname(outputPath) || '';
|
|
66
69
|
if(outputDir && fs.existsSync(outputDir)){
|
|
67
70
|
openLibraries = {};
|
|
68
71
|
if(Array.isArray(options.paths)){
|
|
69
72
|
options.paths.map((p)=>{
|
|
70
73
|
if(p && typeof p =='string' && fs.existsSync(p)){
|
|
71
|
-
findLicences(p)
|
|
74
|
+
findLicences(p,nodeModulesPath)
|
|
72
75
|
}
|
|
73
76
|
})
|
|
74
77
|
} else {
|
|
75
|
-
findLicences(options.path)
|
|
78
|
+
findLicences(options.path,nodeModulesPath)
|
|
76
79
|
}
|
|
77
80
|
const s = Object.keys(openLibraries).sort((a,b)=>{
|
|
78
81
|
if (a.toLowerCase() < b.toLowerCase()) return -1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@expo/html-elements": "^0.2.0",
|
|
62
62
|
"@expo/metro-config": "^0.4.0",
|
|
63
63
|
"@expo/webpack-config": "^0.17.2",
|
|
64
|
-
"@fto-consult/common": "^1.
|
|
64
|
+
"@fto-consult/common": "^1.9.0",
|
|
65
65
|
"@gorhom/portal": "^1.0.14",
|
|
66
66
|
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
67
67
|
"@react-native-community/datetimepicker": "6.2.0",
|
package/src/auth/Login.js
CHANGED
|
@@ -177,6 +177,7 @@ export default function LoginComponent(props){
|
|
|
177
177
|
if(typeof field.step ==='number' && field.step !== state.step){}
|
|
178
178
|
else {
|
|
179
179
|
loginFields[i] = Object.clone(field);
|
|
180
|
+
hasLoginFields = true;
|
|
180
181
|
loginFields[i].autoFocus = !!loginFields[i].autoFocusOnStep;
|
|
181
182
|
}
|
|
182
183
|
}
|
|
@@ -74,7 +74,7 @@ export default function HelpScreen(props){
|
|
|
74
74
|
{deviceInfo}
|
|
75
75
|
</View>
|
|
76
76
|
<View testID={testID}>
|
|
77
|
-
<Label testID={testID+"_CopyRight"} style={theme.styles.
|
|
77
|
+
<Label testID={testID+"_CopyRight"} style={theme.styles.pv05}>{appConfig.copyright}</Label>
|
|
78
78
|
{appConfig.devMail? <AutoLink testID={testID+"_Email"} style={[theme.styles.row]}
|
|
79
79
|
email = {appConfig.devMail}
|
|
80
80
|
>
|
|
@@ -6,8 +6,8 @@ import Label from "$components/Label";
|
|
|
6
6
|
|
|
7
7
|
export default function ContentPrivacy (){
|
|
8
8
|
return <Label primary style={{fontSize:15,fontWeight:'bold',padding:10}}>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Pour modifier le contenu de la police de sécurité, il suffit de déclarer dans les alias, l'alias
|
|
10
|
+
$PrivacyPolicy prointant vers un fichier javascript dans lequel on exporte par défaut, soit un composant React
|
|
11
|
+
où encore un élément react valide dont le rendu remplacera ledit contenu.
|
|
12
|
+
</Label>
|
|
13
13
|
}
|
|
@@ -6,8 +6,8 @@ import Label from "$components/Label";
|
|
|
6
6
|
|
|
7
7
|
export default function ContentTermsOfUses (){
|
|
8
8
|
return <Label primary style={{fontSize:15,fontWeight:'bold',padding:10}}>
|
|
9
|
-
Pour
|
|
10
|
-
$TermsOfUses prointant
|
|
11
|
-
où encore un élément react valide
|
|
9
|
+
Pour modifier le contenu des Termes et contrat d'utilisation, il suffit de déclarer dans les alias, l'alias
|
|
10
|
+
$TermsOfUses prointant vers un fichier javascript dans lequel on exporte par défaut, soit un composant React
|
|
11
|
+
où encore un élément react valide dont le rendu remplacera ledit contenu.
|
|
12
12
|
</Label>
|
|
13
13
|
}
|