@fto-consult/expo-ui 1.1.4 → 1.1.6
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 +1 -9
- package/babel.config.js +13 -4
- package/expo-ui-path.js +31 -0
- package/expo.metro.config.js +35 -12
- package/index.js +1 -1
- package/is-os-case-sensitive.js +27 -0
- package/metro.config.js +4 -1
- package/package.json +102 -98
- package/src/components/Br/index.js +3 -4
- package/src/components/Chart/{appexchart.3.5.text → appexchart.3.5.html} +0 -0
- package/src/components/Chart/index.native.js +1 -4
- package/src/components/Html/View.js +1 -1
- package/src/components/Html/index.js +1 -0
- package/src/components/HtmlElements/index.js +9 -0
- package/src/index.js +14 -14
- package/src/navigation/Drawer/index.js +1 -1
- package/src/components/Br/index.web.js +0 -3
package/babel.config.alias.js
CHANGED
|
@@ -71,13 +71,5 @@ module.exports = (opts)=>{
|
|
|
71
71
|
if(typeof opts.mutator =='function'){
|
|
72
72
|
opts.mutator(r);
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
for(let i in r){
|
|
76
|
-
aliases.push({
|
|
77
|
-
root: r[i],
|
|
78
|
-
rootPathPrefix: i,
|
|
79
|
-
rootPathSuffix: '',
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
return aliases;
|
|
74
|
+
return r;
|
|
83
75
|
}
|
package/babel.config.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
+
require("./expo-ui-path");
|
|
1
2
|
module.exports = function(api,opts) {
|
|
2
3
|
opts = typeof opts =='object' && opts ? opts : {};
|
|
3
4
|
///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
|
|
4
|
-
|
|
5
|
+
let environmentPath = opts.environmentPath || opts.envPath;
|
|
5
6
|
const path = require("path");
|
|
6
7
|
const fs = require("fs");
|
|
7
8
|
const dir = path.resolve(__dirname);
|
|
8
9
|
api.cache(true);
|
|
9
10
|
const inlineDovOptions = {};
|
|
10
|
-
|
|
11
|
+
const options = {base:dir,...opts,platform:"expo"};
|
|
12
|
+
/*** par défaut, les variables d'environnements sont stockés dans le fichier .env situé à la racine du projet, référencée par la prop base */
|
|
13
|
+
if(!environmentPath || typeof environmentPath !== 'string'){
|
|
14
|
+
const baseStr = typeof options.base =='string' && fs.existsSync(options.base)? options.base : typeof options.dir =='string' && fs.existsSync(options.dir)? options.dir : dir;
|
|
15
|
+
environmentPath = path.resolve(baseStr,".env");
|
|
16
|
+
} else {
|
|
17
|
+
environmentPath = "";
|
|
18
|
+
}
|
|
19
|
+
if(environmentPath && fs.existsSync(environmentPath)){
|
|
11
20
|
// File ".env" will be created or overwritten by default.
|
|
12
21
|
try {
|
|
13
22
|
fs.copyFileSync(environmentPath, path.resolve(dir,'.env'));
|
|
@@ -16,7 +25,7 @@ module.exports = function(api,opts) {
|
|
|
16
25
|
inlineDovOptions.path = environmentPath;
|
|
17
26
|
}
|
|
18
27
|
}
|
|
19
|
-
const alias = require("./babel.config.alias")(
|
|
28
|
+
const alias = require("./babel.config.alias")(options);
|
|
20
29
|
return {
|
|
21
30
|
presets: [
|
|
22
31
|
['babel-preset-expo'],
|
|
@@ -24,7 +33,7 @@ module.exports = function(api,opts) {
|
|
|
24
33
|
],
|
|
25
34
|
plugins : [
|
|
26
35
|
["inline-dotenv",inlineDovOptions],
|
|
27
|
-
[
|
|
36
|
+
["module-resolver", {"alias": alias}],
|
|
28
37
|
['react-native-reanimated/plugin'],
|
|
29
38
|
['transform-inline-environment-variables'],
|
|
30
39
|
],
|
package/expo-ui-path.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const dir = path.resolve(__dirname)
|
|
8
|
+
let devExpoUIPath = path.resolve(dir);
|
|
9
|
+
const parentPackage = require("./parent-package");
|
|
10
|
+
if(parentPackage){
|
|
11
|
+
console.log(parentPackage," is parent packag path heinn")
|
|
12
|
+
}
|
|
13
|
+
///retourne le chemin vers le package @expo-ui
|
|
14
|
+
module.exports = (()=>{
|
|
15
|
+
const isDev = fs.existsSync(devExpoUIPath) && fs.existsSync(path.resolve(devExpoUIPath,"babel.config.alias.js"))
|
|
16
|
+
&& fs.existsSync(path.resolve(devExpoUIPath,"src"));
|
|
17
|
+
const isDevFile = path.resolve(dir,"expo-ui-production-path.js");
|
|
18
|
+
const expoUIPath = isDev ? "./expo-ui" : "@fto-consult/expo-ui"
|
|
19
|
+
try {
|
|
20
|
+
var writeStream = fs.createWriteStream(isDevFile);
|
|
21
|
+
writeStream.write("module.exports=\""+expoUIPath+"\";");
|
|
22
|
+
writeStream.end();
|
|
23
|
+
} catch{
|
|
24
|
+
if(fs.existsSync(isDevFile)){
|
|
25
|
+
try {
|
|
26
|
+
fs.rmSync(isDevFile);
|
|
27
|
+
} catch{}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return expoUIPath;
|
|
31
|
+
})();
|
package/expo.metro.config.js
CHANGED
|
@@ -1,26 +1,49 @@
|
|
|
1
1
|
const { getDefaultConfig } = require('@expo/metro-config');
|
|
2
2
|
const path = require("path");
|
|
3
|
+
const isCaseSensitive = require("./is-os-case-sensitive");
|
|
3
4
|
module.exports = (opts)=>{
|
|
4
5
|
opts = opts && typeof opts =='object'? opts : {};
|
|
5
|
-
let {dir,nodeModulesPaths} = opts;
|
|
6
|
+
let {dir,nodeModulesPaths,assetExts,sourceExts} = opts;
|
|
6
7
|
nodeModulesPaths = Array.isArray(nodeModulesPaths)? nodeModulesPaths : [];
|
|
8
|
+
assetExts = Array.isArray(assetExts)? assetExts: [];
|
|
9
|
+
sourceExts= Array.isArray(sourceExts)?sourceExts : [];
|
|
7
10
|
dir = dir || path.resolve(__dirname);
|
|
8
11
|
const projectRoot = path.resolve(dir);
|
|
9
|
-
const
|
|
12
|
+
const localDir = path.resolve(__dirname);
|
|
10
13
|
const config = getDefaultConfig(projectRoot);
|
|
11
|
-
config.watchFolders = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
config.watchFolders = [projectRoot];
|
|
15
|
+
if(projectRoot !== localDir){
|
|
16
|
+
config.watchFolders.push(localDir);
|
|
17
|
+
}
|
|
18
|
+
config.resolver.assetExts = [
|
|
19
|
+
...config.resolver.assetExts,
|
|
20
|
+
...assetExts,
|
|
21
|
+
"db",
|
|
22
|
+
"txt"
|
|
23
|
+
];
|
|
20
24
|
config.resolver.sourceExts = [
|
|
21
25
|
...config.resolver.sourceExts,
|
|
22
|
-
|
|
26
|
+
...sourceExts,"txt",
|
|
27
|
+
'jsx', 'js','tsx',
|
|
23
28
|
]
|
|
29
|
+
const allNodePaths = [
|
|
30
|
+
path.resolve(projectRoot, 'node_modules'),
|
|
31
|
+
path.resolve(localDir, 'node_modules'),
|
|
32
|
+
...nodeModulesPaths,
|
|
33
|
+
];
|
|
34
|
+
const existingNodesPath= {},nPaths = [];
|
|
35
|
+
allNodePaths.map(p=>{
|
|
36
|
+
if(!p || typeof p !='string') return;
|
|
37
|
+
if(isCaseSensitive){
|
|
38
|
+
p = p.toLocaleLowerCase();
|
|
39
|
+
}
|
|
40
|
+
if(!existingNodesPath[p]){
|
|
41
|
+
existingNodesPath[p] = true;
|
|
42
|
+
nPaths.push(p);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
config.resolver.nodeModulesPaths = nPaths;
|
|
24
47
|
// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
|
|
25
48
|
config.resolver.disableHierarchicalLookup = true;
|
|
26
49
|
return config;
|
package/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const defaultObj = x=> isObj(x)? x : {};
|
|
|
10
10
|
* config {object}, le fichier de configuration de l'application
|
|
11
11
|
* }
|
|
12
12
|
*/
|
|
13
|
-
export default function
|
|
13
|
+
export default function registerExpoUIApp (options){
|
|
14
14
|
options = defaultObj(options);
|
|
15
15
|
const config = defaultObj(options.config);
|
|
16
16
|
appConfig.current = config;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const dir = path.resolve(__dirname);
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
|
|
9
|
+
/*** check weather os is case sensitive
|
|
10
|
+
* @see : https://stackoverflow.com/questions/27367261/check-if-file-exists-case-sensitive/52908385#52908385
|
|
11
|
+
*/
|
|
12
|
+
function fileExistsWithCaseSync(filepath) {
|
|
13
|
+
var dir = path.dirname(filepath);
|
|
14
|
+
if (dir === '/' || dir === '.') return true;
|
|
15
|
+
var filenames = fs.readdirSync(dir);
|
|
16
|
+
if (filenames.indexOf(path.basename(filepath)) === -1) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return fileExistsWithCaseSync(dir);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/***vérifie si le système supporte la cassse où non
|
|
23
|
+
* c'est à dire si 2 noms de fichiers ayant la case différentes sont considérés comme le même où pas
|
|
24
|
+
*/
|
|
25
|
+
module.exports = (()=>{
|
|
26
|
+
return fileExistsWithCaseSync(path.resolve(dir,"metro.config.js")) == fileExistsWithCaseSync(path.resolve(dir,"Metro.config.js"))
|
|
27
|
+
})();
|
package/metro.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,98 +1,102 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"publish": "npm publish --access=public",
|
|
8
|
-
"unpublish": "npm -f unpublish @fto-consult/expo-ui",
|
|
9
|
-
"build-web": "",
|
|
10
|
-
"dev": "npx expo start -c --no-minify",
|
|
11
|
-
"start": "npx expo start --dev --no-minify",
|
|
12
|
-
"start-d": "npx expo start -c --no-dev --no-minify",
|
|
13
|
-
"start-p": "npm run start-d",
|
|
14
|
-
"expo-start-client": "npx expo start --dev --no-minify --dev-client",
|
|
15
|
-
"start-m": "npx expo start - c--dev--no -minify",
|
|
16
|
-
"android": "npx expo start --android -c",
|
|
17
|
-
"ios": "npx expo start --ios",
|
|
18
|
-
"web": "npx expo start --web",
|
|
19
|
-
"web-c": "npx expo start --web -c",
|
|
20
|
-
"eject": "expo eject",
|
|
21
|
-
"emulator": "npm run android-emulator",
|
|
22
|
-
"web-server": "npx serve web-build",
|
|
23
|
-
"build-android": "eas build --clear-cache -p android --profile preview",
|
|
24
|
-
"build-android-local": "eas build --platform android --local",
|
|
25
|
-
"build-android-dist": "eas build --clear-cache -p android",
|
|
26
|
-
"build-ios": "eas build --clear-cache -p ios --profile preview",
|
|
27
|
-
"build-ios-dist": "eas build --clear-cache -p ios",
|
|
28
|
-
"install-apk": "adb -s emulator-5554 install myapp.apk",
|
|
29
|
-
"android-emulator": "emulator -avd EMULATOR",
|
|
30
|
-
"flipper": "npx cross-env METRO_SERVER_PORT=19000 E:\\Studies\\react-native\\debugger\\Flipper-win\\Flipper.exe",
|
|
31
|
-
"build-electron": "electron-webpack && electron-builder --dir -c.compression=store",
|
|
32
|
-
"test:build": "electron-webpack && electron-builder --dir -c.compression=store -c.mac.identity=null",
|
|
33
|
-
"compile-electron": "webpack --config ./electron/webpack.config.js",
|
|
34
|
-
"compile-electron-p": "webpack --config ./electron/webpack.config.js --mode=production",
|
|
35
|
-
"electron": "electron ./electron",
|
|
36
|
-
"logcat": "adb -d logcat com.ftc.apps.salite1:E > errors.txt",
|
|
37
|
-
"logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
|
|
38
|
-
"electron-c": "npm run compile-electron && npm run electron",
|
|
39
|
-
"electron-p": "npm run compile-electron-p && npm run electron",
|
|
40
|
-
"update-app-version": "node ./update-app-version.js",
|
|
41
|
-
"find-licenses": "node ./find-licenses.js",
|
|
42
|
-
"fix-dependencies": "expo doctor --fix-dependencies"
|
|
43
|
-
},
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/borispipo/expo-ui.git"
|
|
47
|
-
},
|
|
48
|
-
"keywords": [
|
|
49
|
-
"Expo",
|
|
50
|
-
"React-Native"
|
|
51
|
-
],
|
|
52
|
-
"author": "Boris Fouomene",
|
|
53
|
-
"license": "ISC",
|
|
54
|
-
"bugs": {
|
|
55
|
-
"url": "https://github.com/borispipo/expo-ui/issues"
|
|
56
|
-
},
|
|
57
|
-
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"@babel/preset-react": "^7.18.6",
|
|
60
|
-
"@emotion/native": "^11.10.0",
|
|
61
|
-
"@expo/
|
|
62
|
-
"@expo/
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@react-native-
|
|
67
|
-
"@react-
|
|
68
|
-
"@react-
|
|
69
|
-
"@
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"babel-plugin-
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"expo
|
|
76
|
-
"expo-
|
|
77
|
-
"expo-
|
|
78
|
-
"expo-
|
|
79
|
-
"expo-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"react-
|
|
87
|
-
"react-
|
|
88
|
-
"react-
|
|
89
|
-
"react-native
|
|
90
|
-
"react-native-
|
|
91
|
-
"react-native-
|
|
92
|
-
"react-native-
|
|
93
|
-
"react-native-
|
|
94
|
-
"react-native-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@fto-consult/expo-ui",
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"publish": "npm publish --access=public",
|
|
8
|
+
"unpublish": "npm -f unpublish @fto-consult/expo-ui",
|
|
9
|
+
"build-web": "",
|
|
10
|
+
"dev": "npx expo start -c --no-minify",
|
|
11
|
+
"start": "npx expo start --dev --no-minify",
|
|
12
|
+
"start-d": "npx expo start -c --no-dev --no-minify",
|
|
13
|
+
"start-p": "npm run start-d",
|
|
14
|
+
"expo-start-client": "npx expo start --dev --no-minify --dev-client",
|
|
15
|
+
"start-m": "npx expo start - c--dev--no -minify",
|
|
16
|
+
"android": "npx expo start --android -c",
|
|
17
|
+
"ios": "npx expo start --ios",
|
|
18
|
+
"web": "npx expo start --web",
|
|
19
|
+
"web-c": "npx expo start --web -c",
|
|
20
|
+
"eject": "expo eject",
|
|
21
|
+
"emulator": "npm run android-emulator",
|
|
22
|
+
"web-server": "npx serve web-build",
|
|
23
|
+
"build-android": "eas build --clear-cache -p android --profile preview",
|
|
24
|
+
"build-android-local": "eas build --platform android --local",
|
|
25
|
+
"build-android-dist": "eas build --clear-cache -p android",
|
|
26
|
+
"build-ios": "eas build --clear-cache -p ios --profile preview",
|
|
27
|
+
"build-ios-dist": "eas build --clear-cache -p ios",
|
|
28
|
+
"install-apk": "adb -s emulator-5554 install myapp.apk",
|
|
29
|
+
"android-emulator": "emulator -avd EMULATOR",
|
|
30
|
+
"flipper": "npx cross-env METRO_SERVER_PORT=19000 E:\\Studies\\react-native\\debugger\\Flipper-win\\Flipper.exe",
|
|
31
|
+
"build-electron": "electron-webpack && electron-builder --dir -c.compression=store",
|
|
32
|
+
"test:build": "electron-webpack && electron-builder --dir -c.compression=store -c.mac.identity=null",
|
|
33
|
+
"compile-electron": "webpack --config ./electron/webpack.config.js",
|
|
34
|
+
"compile-electron-p": "webpack --config ./electron/webpack.config.js --mode=production",
|
|
35
|
+
"electron": "electron ./electron",
|
|
36
|
+
"logcat": "adb -d logcat com.ftc.apps.salite1:E > errors.txt",
|
|
37
|
+
"logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
|
|
38
|
+
"electron-c": "npm run compile-electron && npm run electron",
|
|
39
|
+
"electron-p": "npm run compile-electron-p && npm run electron",
|
|
40
|
+
"update-app-version": "node ./update-app-version.js",
|
|
41
|
+
"find-licenses": "node ./find-licenses.js",
|
|
42
|
+
"fix-dependencies": "expo doctor --fix-dependencies"
|
|
43
|
+
},
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/borispipo/expo-ui.git"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"Expo",
|
|
50
|
+
"React-Native"
|
|
51
|
+
],
|
|
52
|
+
"author": "Boris Fouomene",
|
|
53
|
+
"license": "ISC",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/borispipo/expo-ui/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@babel/preset-react": "^7.18.6",
|
|
60
|
+
"@emotion/native": "^11.10.0",
|
|
61
|
+
"@expo/html-elements": "^0.2.0",
|
|
62
|
+
"@expo/metro-config": "^0.4.0",
|
|
63
|
+
"@expo/webpack-config": "^0.17.2",
|
|
64
|
+
"@fto-consult/common": "^1.1.28",
|
|
65
|
+
"@gorhom/portal": "^1.0.14",
|
|
66
|
+
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
67
|
+
"@react-native-community/datetimepicker": "6.2.0",
|
|
68
|
+
"@react-native-community/netinfo": "9.3.0",
|
|
69
|
+
"@react-navigation/native": "^6.0.13",
|
|
70
|
+
"@react-navigation/native-stack": "^6.9.1",
|
|
71
|
+
"@shopify/flash-list": "1.1.0",
|
|
72
|
+
"babel-plugin-inline-dotenv": "^1.7.0",
|
|
73
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
74
|
+
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
75
|
+
"expo": "^46.0.15",
|
|
76
|
+
"expo-camera": "~12.3.0",
|
|
77
|
+
"expo-linking": "~3.2.2",
|
|
78
|
+
"expo-sqlite": "~10.3.0",
|
|
79
|
+
"expo-status-bar": "~1.4.0",
|
|
80
|
+
"expo-system-ui": "~1.3.0",
|
|
81
|
+
"expo-web-browser": "~11.0.0",
|
|
82
|
+
"google-libphonenumber": "^3.2.31",
|
|
83
|
+
"htmlparser2-without-node-native": "^3.9.2",
|
|
84
|
+
"parent-package-json": "^2.0.1",
|
|
85
|
+
"prop-types": "^15.8.1",
|
|
86
|
+
"react-apexcharts": "^1.4.0",
|
|
87
|
+
"react-content-loader": "^6.2.0",
|
|
88
|
+
"react-dom": "18.0.0",
|
|
89
|
+
"react-native": "0.69.6",
|
|
90
|
+
"react-native-big-list": "^1.5.5",
|
|
91
|
+
"react-native-gesture-handler": "~2.5.0",
|
|
92
|
+
"react-native-paper": "^4.12.5",
|
|
93
|
+
"react-native-paper-dates": "^0.9.2",
|
|
94
|
+
"react-native-reanimated": "~2.9.1",
|
|
95
|
+
"react-native-safe-area-context": "4.3.1",
|
|
96
|
+
"react-native-svg": "12.3.0",
|
|
97
|
+
"react-native-web": "~0.18.7",
|
|
98
|
+
"react-native-webview": "11.23.0",
|
|
99
|
+
"sharp-cli": "^2.1.0",
|
|
100
|
+
"tippy.js": "^6.3.7"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
import {BR } from '@expo/html-elements';
|
|
2
|
+
|
|
3
|
+
export default BR;
|
|
File without changes
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import FileSystem from "$file-system";
|
|
2
|
-
import appexChartCode from "./appexchart.3.5.
|
|
2
|
+
import appexChartCode from "./appexchart.3.5.html";
|
|
3
3
|
import React from "$react";
|
|
4
4
|
import WebView from "$ecomponents/WebView";
|
|
5
|
-
import HTMLView from '$ecomponents/Html/View';
|
|
6
5
|
import {defaultStr,uniqid} from "$utils";
|
|
7
6
|
import View from "$ecomponents/View";
|
|
8
7
|
|
|
9
8
|
let appexchartJSString = null;
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
10
|
export const ChartComponent = React.forwardRef(({options,containerId,...props},ref)=>{
|
|
14
11
|
const containerIdRef = React.useRef(defaultStr(containerId,uniqid("chart-container-id")))
|
|
15
12
|
const appexChartJS = appexchartJSString? (appexchartJSString+"\n"):"";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***@see : https://github.com/jsdf/react-native-htmlview */
|
|
2
2
|
import React, {PureComponent} from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import htmlToElement from './
|
|
4
|
+
import htmlToElement from './HtmlToElement';
|
|
5
5
|
import {Linking, Platform, StyleSheet, View} from 'react-native';
|
|
6
6
|
import {StyleProp} from "$theme";
|
|
7
7
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./HtmlToElement";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style
|
|
3
|
+
// license that can be found in the LICENSE file.
|
|
4
|
+
/***@see : https://www.npmjs.com/package/@expo/html-elements */
|
|
5
|
+
export * from "@expo/html-elements";
|
|
6
|
+
|
|
7
|
+
import {BR} from "@expo/html-elements";
|
|
8
|
+
|
|
9
|
+
export {BR as Br};
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "$react"
|
|
2
|
-
import { AppState,
|
|
2
|
+
import { AppState,BackHandler,} from "react-native";
|
|
3
|
+
import * as Linking from 'expo-linking';
|
|
3
4
|
import APP from "$capp";
|
|
4
5
|
import {AppStateService,trackIDLE,stop as stopIDLE} from "$capp/idle";
|
|
5
6
|
import { NavigationContainer} from '@react-navigation/native';
|
|
@@ -31,10 +32,10 @@ const NAVIGATION_PERSISTENCE_KEY = 'NAVIGATION_STATE';
|
|
|
31
32
|
function App(props) {
|
|
32
33
|
AppStateService.init();
|
|
33
34
|
const [initialState, setInitialState] = React.useState(undefined);
|
|
34
|
-
const appReadyRef = React.useRef(
|
|
35
|
+
const appReadyRef = React.useRef(true);
|
|
35
36
|
const [state,setState] = React.useState({
|
|
36
37
|
isLoading : true,
|
|
37
|
-
isInitialized:
|
|
38
|
+
isInitialized:true,
|
|
38
39
|
});
|
|
39
40
|
React.useEffect(() => {
|
|
40
41
|
const restoreState = () => {
|
|
@@ -99,17 +100,16 @@ function App(props) {
|
|
|
99
100
|
APP.setOnlineState(state);
|
|
100
101
|
});
|
|
101
102
|
NetInfo.fetch().catch((e)=>{});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
});
|
|
103
|
+
init().then(()=>{
|
|
104
|
+
if(Auth.isLoggedIn()){
|
|
105
|
+
Auth.loginUser(false);
|
|
106
|
+
}
|
|
107
|
+
setState({
|
|
108
|
+
...state,isInitialized:true,isLoading : false,
|
|
109
|
+
});
|
|
110
|
+
}).catch((e)=>{
|
|
111
|
+
console.error(e," initializing app")
|
|
112
|
+
setState({...state,isInitialized:true,isLoading : false});
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
const Events = {}
|
|
@@ -45,7 +45,7 @@ const DrawerNavigator = React.forwardRef(({content,children,state,...props},ref)
|
|
|
45
45
|
React.useEffect(()=>{
|
|
46
46
|
if(prevIsLoggedIn === isLoggedIn) return;
|
|
47
47
|
navigate("Home");
|
|
48
|
-
},[isLoggedIn])
|
|
48
|
+
},[isLoggedIn]);
|
|
49
49
|
if(!isLoggedIn) {
|
|
50
50
|
return <Login withPortal
|
|
51
51
|
onSuccess = {(data)=>{
|