@fto-consult/expo-ui 4.0.4 → 4.2.0
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 -3
- package/bin/index.js +60 -14
- package/bin/init.js +82 -0
- package/bin/package.js +59 -0
- package/electron/app/instance.js +1 -1
- package/electron/create-index-file.js +13 -0
- package/electron/dependencies.js +11 -0
- package/electron/index.js +71 -58
- package/electron/init/index.js +0 -0
- package/electron/init/main.js +10 -0
- package/electron/init/renderer.js +6 -0
- package/electron/is-initialized.js +12 -0
- package/electron/package.json +32 -0
- package/electron/pload.js +2 -2
- package/electron/preload.js +4 -4
- package/electron/{config.js → utils/config.js} +0 -0
- package/electron/{copy.js → utils/copy.js} +0 -0
- package/electron/{createDir.js → utils/createDir.js} +0 -0
- package/electron/{createDirSync.js → utils/createDirSync.js} +0 -0
- package/electron/{exec.js → utils/exec.js} +5 -2
- package/electron/{getDirname.js → utils/getDirname.js} +0 -0
- package/electron/utils/getIcon.js +25 -0
- package/electron/{parseArgs.js → utils/parseArgs.js} +0 -0
- package/electron/{postMessage.js → utils/postMessage.js} +0 -0
- package/electron/{session.js → utils/session.js} +0 -0
- package/electron/{writeFile.js → utils/writeFile.js} +0 -0
- package/package.json +3 -7
- package/readMe.md +8 -3
- package/src/components/Countries/resources/countries-normalized.json +1987 -1987
- package/src/components/Countries/resources/countries-with-not-extra.json +1211 -1211
- package/src/components/Countries/resources/countries.sql +243 -243
- package/src/components/Form/Fields/SelectTableData/Component.js +1 -1
- package/src/layouts/Screen/TableData.js +7 -1
- package/src/navigation/utils.js +2 -1
- package/src/screens/Auth/PermLine.js +195 -0
- package/src/screens/Auth/PermLines.js +102 -355
- package/src/screens/Auth/PermText.js +62 -0
- package/src/screens/Auth/index.js +3 -1
- package/src/screens/Auth/utils.js +36 -1
- package/electron/getIcon.js +0 -24
- package/electron/package.app.json +0 -44
package/electron/pload.js
CHANGED
|
@@ -101,8 +101,8 @@ module.exports = (ELECTRON,paths)=>{
|
|
|
101
101
|
|
|
102
102
|
const projectRoot = (paths || {}).projectRoot;
|
|
103
103
|
const electronProjectRoot = projectRoot && fs.existsSync(path.resolve(projectRoot,"electron")) && path.resolve(projectRoot,"electron") || null;
|
|
104
|
-
const rendererProcessIndex = electronProjectRoot && fs.existsSync(path.resolve(electronProjectRoot,"renderer.
|
|
105
|
-
//pour étendre les fonctionnalités au niveau du renderer proceess, bien vouloir écrire dans le fichier projectRoot/electron/renderer.
|
|
104
|
+
const rendererProcessIndex = electronProjectRoot && fs.existsSync(path.resolve(electronProjectRoot,"renderer","index.js")) && path.resolve(electronProjectRoot,"renderer","index.js");
|
|
105
|
+
//pour étendre les fonctionnalités au niveau du renderer proceess, bien vouloir écrire dans le fichier projectRoot/electron/renderer/index.js
|
|
106
106
|
// dans lequel exporter une fonction prenant en paramètre l'objet electron, que l'on peut étendre et le rendre accessible depuis l'application
|
|
107
107
|
const rendererProcess = rendererProcessIndex && require(`${rendererProcessIndex}`);
|
|
108
108
|
(typeof rendererProcess ==='function') && rendererProcess(ELECTRON);
|
package/electron/preload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const createDir = require("./createDir");
|
|
2
|
-
const postMessage = require("./postMessage");
|
|
1
|
+
const createDir = require("./utils/createDir");
|
|
2
|
+
const postMessage = require("./utils/postMessage");
|
|
3
3
|
const { contextBridge, ipcRenderer, shell } = require('electron')
|
|
4
4
|
const appInstance = require("./app/instance");
|
|
5
5
|
const path = require("path");
|
|
@@ -7,7 +7,7 @@ const fs = require("fs");
|
|
|
7
7
|
const isObj = x=>x && typeof x =='object' && !Array.isArray(x);
|
|
8
8
|
const isNonNullString = x=>x && typeof x =='string';
|
|
9
9
|
const ePath = path.resolve(__dirname);
|
|
10
|
-
const packagePath = path.resolve(ePath,"package.
|
|
10
|
+
const packagePath = path.resolve(ePath,"package.json");
|
|
11
11
|
if(!fs.existsSync(packagePath)){
|
|
12
12
|
throw {message : "Chemin du fichier "+packagePath+ " introuvable"};
|
|
13
13
|
}
|
|
@@ -40,7 +40,7 @@ if(typeof separator != 'string' || !separator){
|
|
|
40
40
|
return filePath.substring(0, sepIndex+1);
|
|
41
41
|
})();
|
|
42
42
|
}
|
|
43
|
-
const Config = require('./config');
|
|
43
|
+
const Config = require('./utils/config');
|
|
44
44
|
let confPath = process.env.ProgramData || process.env.ALLUSERSPROFILE;
|
|
45
45
|
if(confPath && typeof confPath =="string"){
|
|
46
46
|
if(fs.existsSync(confPath)){
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -31,7 +31,7 @@ const loaderTimer = function(timout) {
|
|
|
31
31
|
var P = ["\\", "|", "/", "-"];
|
|
32
32
|
var x = 0;
|
|
33
33
|
return setInterval(function() {
|
|
34
|
-
process.stdout.write("\r "+text+P[x++]);
|
|
34
|
+
process.stdout.write("\r "+text+" "+P[x++]);
|
|
35
35
|
x &= 3;
|
|
36
36
|
}, timout);
|
|
37
37
|
};
|
|
@@ -47,7 +47,10 @@ module.exports = function(cmdOpts,options){
|
|
|
47
47
|
return Promise.reject("Commande de script invalide, veuillez spécifier une chaine de caractère non nulle");
|
|
48
48
|
}
|
|
49
49
|
if(typeof projectRoot =='string' && projectRoot && fs.existsSync(projectRoot)){
|
|
50
|
-
return _exec(
|
|
50
|
+
return _exec(`cd ${projectRoot}`).then((r)=>{
|
|
51
|
+
try {
|
|
52
|
+
process.chdir(projectRoot);
|
|
53
|
+
} catch(e){}
|
|
51
54
|
return _exec(cmd,cmdOpts,logMessages);
|
|
52
55
|
})
|
|
53
56
|
}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const isWindow = process.platform =="win32",
|
|
2
|
+
isMac = process.platform =='darwin',
|
|
3
|
+
isLinux = process.platform =="linux";
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const getDirname = require("./getDirname");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const getIcon = (p)=>{
|
|
8
|
+
if(Array.isArray(p)){
|
|
9
|
+
for(let i in p){
|
|
10
|
+
const r = getIcon(p[i]);
|
|
11
|
+
if(r) return r;
|
|
12
|
+
}
|
|
13
|
+
} else if(typeof p =='string' && p && fs.existsSync(p)){
|
|
14
|
+
const ext = isWindow ? ".ico" : isMac ? ".incs" : ".png";
|
|
15
|
+
const possibles = ["icon","logo","favicon"];
|
|
16
|
+
for(let i in possibles){
|
|
17
|
+
const ico = path.join(getDirname(p),possibles[i]+ext);
|
|
18
|
+
if(fs.existsSync(ico)){
|
|
19
|
+
return ico;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
};
|
|
25
|
+
module.exports = getIcon;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.2.0",
|
|
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
|
"@emotion/native": "^11.10.0",
|
|
62
62
|
"@expo/html-elements": "^0.2.0",
|
|
63
63
|
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^2.
|
|
64
|
+
"@fto-consult/common": "^2.18.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.5.2",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"@react-navigation/native": "^6.1.1",
|
|
70
70
|
"@react-navigation/native-stack": "^6.9.7",
|
|
71
71
|
"@shopify/flash-list": "1.3.1",
|
|
72
|
-
"conf": "^10.2.0",
|
|
73
72
|
"expo": "^47.0.8",
|
|
74
73
|
"expo-camera": "~13.1.0",
|
|
75
74
|
"expo-clipboard": "~4.0.1",
|
|
@@ -85,8 +84,6 @@
|
|
|
85
84
|
"google-libphonenumber": "^3.2.31",
|
|
86
85
|
"htmlparser2-without-node-native": "^3.9.2",
|
|
87
86
|
"mongo-parse": "^2.1.0",
|
|
88
|
-
"node-machine-id": "^1.1.12",
|
|
89
|
-
"parent-package-json": "^2.0.1",
|
|
90
87
|
"prop-types": "^15.8.1",
|
|
91
88
|
"react": "18.1.0",
|
|
92
89
|
"react-apexcharts": "^1.4.0",
|
|
@@ -119,7 +116,6 @@
|
|
|
119
116
|
"@expo/webpack-config": "^0.17.3",
|
|
120
117
|
"babel-plugin-inline-dotenv": "^1.7.0",
|
|
121
118
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
122
|
-
"babel-plugin-transform-inline-environment-variables": "^0.4.4"
|
|
123
|
-
"electron": "^22.2.0"
|
|
119
|
+
"babel-plugin-transform-inline-environment-variables": "^0.4.4"
|
|
124
120
|
}
|
|
125
121
|
}
|
package/readMe.md
CHANGED
|
@@ -10,11 +10,16 @@ npm i --D @babel/plugin-proposal-export-namespace-from @babel/preset-react babel
|
|
|
10
10
|
|
|
11
11
|
### **Commandes electron : expo-ui electron cli**
|
|
12
12
|
|
|
13
|
-
### `expo-ui [build|start] [compile] [build] [url=local-url] [platform=[
|
|
13
|
+
### `expo-ui [build|start] [compile] [build] [url=local-url] [platform=[win32|darwin|linux|mas]] [arch=x64|x86] [out=outpout dir]`
|
|
14
14
|
|
|
15
|
-
1. \[build|start\], le script à exécuter : build|start
|
|
15
|
+
1. \[build|start|package\], le script à exécuter : build|start
|
|
16
16
|
2. \[compile\], si l'application sera compilé, via la commande expo export:web; valide lorsque aucune url n'est spécifiée
|
|
17
17
|
3. \[build\]\], si l'exécutable sera crée pour la plateforme \[platform\], valide uniquement pour le script \<\<build>>
|
|
18
18
|
4. \[url=local-url\], l'url à ouvrir via l'application electron (exemple : http://localhost:19006/), valide uniquement pour le script \<\<start>>;
|
|
19
|
-
5. \[
|
|
19
|
+
5. \[platform\], la plateforme vers laquelle on souhaite exporter l'exécutable electron, vailde uniquement pour le script \<\<build>>
|
|
20
20
|
6. \[arch\], l'architecture de l'exécutable à exporter, valide uniquement pour le script \<\<build>>
|
|
21
|
+
7. \[out\], le repertoire destitation, valide pour les scripts \[build et package\]
|
|
22
|
+
|
|
23
|
+
## **Générer le fichier binaire**
|
|
24
|
+
|
|
25
|
+
1. installer le package electron-packager : `npm install --save-dev electron-packager`
|