@fto-consult/expo-ui 9.0.1 → 9.0.3
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 +2 -4
- package/babel.config.js +0 -1
- package/bin/create-app.js +2 -2
- package/common-path.js +3 -0
- package/fto-consult-path.js +7 -0
- package/metro.config.js +4 -0
- package/package.json +3 -4
- package/src/components/Chart/utils.js +2 -2
- package/src/components/Menu/Menu.js +1 -1
- package/src/components/SelectCurrency/index.js +1 -1
- package/src/layouts/Screen/TableData.js +2 -2
- package/src/screens/Help/About.js +1 -1
- package/src/screens/Help/getReleaseText.js +1 -1
package/babel.config.alias.js
CHANGED
@@ -3,18 +3,16 @@ const fs = require("fs");
|
|
3
3
|
|
4
4
|
module.exports = (opts)=>{
|
5
5
|
const dir = path.resolve(__dirname);
|
6
|
-
const isDev = String(process.env.NODE_ENV).toLowerCase().trim() !="production";
|
7
6
|
const projectRoot = typeof opts.projectRoot =='string' && fs.existsSync(opts.projectRoot.trim()) && opts.projectRoot.trim() || process.cwd();
|
8
7
|
opts = typeof opts =='object' && opts ? opts : {};
|
9
|
-
opts.platform = "expo";
|
10
8
|
opts.projectRoot = opts.projectRoot || projectRoot;
|
11
9
|
const assets = fs.existsSync(path.resolve(opts.projectRoot,"assets")) ? path.resolve(opts.projectRoot,"assets") : path.resolve(dir,"assets");
|
12
10
|
opts.assets = opts.assets || opts.alias && typeof opts.alias =='object' && opts.alias.$assets || assets;
|
13
11
|
opts.withPouchDB = opts.withPouchDB !== false && opts.withPouchdb !== false ? true : false;
|
14
12
|
delete opts.withPouchdb;
|
15
13
|
const expoUI = require("./expo-ui-path")(projectRoot);
|
16
|
-
const cPath =
|
17
|
-
const r = require(`${
|
14
|
+
const cPath = require("./common-path")(projectRoot);
|
15
|
+
const r = require(`${path.resolve(cPath,"babel.config.alias.js")}`)({...opts,platform:"expo"});
|
18
16
|
const expo = path.resolve(expoUI,"src");
|
19
17
|
r["$ecomponents"] = path.resolve(expo,"components");
|
20
18
|
r["$econfirm"] = path.resolve(r["$ecomponents"],"Dialog","confirm");
|
package/babel.config.js
CHANGED
package/bin/create-app.js
CHANGED
@@ -43,8 +43,8 @@ module.exports = function(appName,{projectRoot:root}){
|
|
43
43
|
"scripts" : {
|
44
44
|
start : "npx expo start -c",
|
45
45
|
"dev" : "npx expo start --no-dev --minify -c",
|
46
|
-
"serve-web" : "npx serve
|
47
|
-
"build-web" : "npx expo export
|
46
|
+
"serve-web" : "npx serve dist --single",
|
47
|
+
"build-web" : "npx expo export",
|
48
48
|
"build-android" : "npx eas build --platform android --profile preview",
|
49
49
|
"build-ios" : "eas build --platform ios",
|
50
50
|
"generate-getTable" : "npx @fto-consult/expo-ui generate-getTable",
|
package/common-path.js
ADDED
@@ -0,0 +1,7 @@
|
|
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
|
+
///retourne le chemin vers le package @expo-ui
|
5
|
+
module.exports = function (projectRoot){
|
6
|
+
return require("./fto-consult-path")(projectRoot,"@fto-consult/expo-ui","expoUIRootPath");
|
7
|
+
};
|
package/metro.config.js
CHANGED
@@ -40,9 +40,13 @@ module.exports = function(opts){
|
|
40
40
|
]
|
41
41
|
config.watchFolders = Array.isArray(config.watchFolders)? config.watchFolders : [];
|
42
42
|
const expoUIP = require("./expo-ui-path")(projectRoot);
|
43
|
+
const cPath = require("./common-path")(projectRoot);
|
43
44
|
if(!config.watchFolders.includes(expoUIP)){
|
44
45
|
config.watchFolders.push(expoUIP);
|
45
46
|
}
|
47
|
+
if(cPath && !config.watchFolders.includes(cPath)){
|
48
|
+
config.watchFolders.push(cPath);
|
49
|
+
}
|
46
50
|
let hasFTO = false;
|
47
51
|
for(let i in config.watchFolders){
|
48
52
|
if(typeof config.watchFolders[i] ==="string" && config.watchFolders[i].includes("@fto-consult")){
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "9.0.
|
3
|
+
"version": "9.0.3",
|
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": {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"web-c": "npx expo start --web -c",
|
23
23
|
"eject": "expo eject",
|
24
24
|
"emulator": "npm run android-emulator",
|
25
|
-
"web-server": "npx serve
|
25
|
+
"web-server": "npx serve dist",
|
26
26
|
"build-android": "eas build --clear-cache -p android --profile preview",
|
27
27
|
"build-android-local": "eas build --platform android --local",
|
28
28
|
"build-android-dist": "eas build --clear-cache -p android",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"dependencies": {
|
68
68
|
"@emotion/react": "^11.11.4",
|
69
69
|
"@faker-js/faker": "^8.0.2",
|
70
|
-
"@fto-consult/common": "^4.
|
70
|
+
"@fto-consult/common": "^4.53.0",
|
71
71
|
"apexcharts": "^3.49.0",
|
72
72
|
"file-saver": "^2.0.5",
|
73
73
|
"google-libphonenumber": "^3.2.34",
|
@@ -89,7 +89,6 @@
|
|
89
89
|
"devDependencies": {
|
90
90
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
91
91
|
"@expo/metro-config": "~0.17.1",
|
92
|
-
"babel-plugin-inline-dotenv": "^1.7.0",
|
93
92
|
"babel-plugin-module-resolver": "^5.0.0",
|
94
93
|
"sharp-cli": "^2.1.1"
|
95
94
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
|
2
2
|
// Use of this source code is governed by a BSD-style
|
3
3
|
// license that can be found in the LICENSE file.
|
4
|
-
import {
|
5
|
-
import appConfig from "$
|
4
|
+
import {defaultNumber} from "$cutils";
|
5
|
+
import appConfig from "$capp/config";
|
6
6
|
|
7
7
|
/*** retourne le nombre maximal de courbes pouvant s'afficher sur un même graphe
|
8
8
|
* exempt du graphe de type pie/donut
|
@@ -17,7 +17,7 @@ import { withTheme,Surface,Portal} from 'react-native-paper';
|
|
17
17
|
import { NativeModules} from 'react-native';
|
18
18
|
import {defaultDecimal,extendObj} from "$cutils";
|
19
19
|
import theme,{StylePropTypes} from "$theme";
|
20
|
-
import APP from "$
|
20
|
+
import APP from "$capp/instance";
|
21
21
|
import MenuItem from "./Item";
|
22
22
|
import { MIN_WIDTH } from './utils';
|
23
23
|
|
@@ -5,7 +5,7 @@ import React from "$react";
|
|
5
5
|
import {defaultStr} from "$cutils";
|
6
6
|
import SimpleSelect from "$ecomponents/SimpleSelect";
|
7
7
|
import {currencies} from "$ccurrency";
|
8
|
-
import appConfig from "$
|
8
|
+
import appConfig from "$capp/config";
|
9
9
|
import Format from "./Format";
|
10
10
|
|
11
11
|
const CurrencySelector = React.forwardRef((props,ref)=>{
|
@@ -9,8 +9,8 @@ import PropTypes from "prop-types";
|
|
9
9
|
import notify from "$notify";
|
10
10
|
import Auth from "$cauth";
|
11
11
|
import {open as showPreloader,close as hidePreloader} from "$preloader";
|
12
|
-
import {canMakePhoneCall, makePhoneCall as makePCall} from "$
|
13
|
-
import copyToClipboard from "$
|
12
|
+
import {canMakePhoneCall, makePhoneCall as makePCall} from "$capp/makePhoneCall";
|
13
|
+
import copyToClipboard from "$capp/clipboard";
|
14
14
|
import {isMobileOrTabletMedia} from "$platform/dimensions";
|
15
15
|
import Tab from "$ecomponents/Tab";
|
16
16
|
import View from "$ecomponents/View";
|
@@ -12,7 +12,7 @@ import View from "$ecomponents/View";
|
|
12
12
|
import Label from "$ecomponents/Label";
|
13
13
|
import {defaultStr} from "$cutils";
|
14
14
|
import theme from "$theme";
|
15
|
-
import APP from "$
|
15
|
+
import APP from "$capp";
|
16
16
|
import AutoLink from "$ecomponents/AutoLink";
|
17
17
|
import getReleaseText from "./getReleaseText";
|
18
18
|
import appConfig from "$capp/config";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import View from "$ecomponents/View";
|
2
2
|
import Label from "$ecomponents/Label";
|
3
3
|
import theme from "$theme";
|
4
|
-
import appConfig from "$
|
4
|
+
import appConfig from "$capp/config";
|
5
5
|
export default function getReleaseLabel(){
|
6
6
|
return <View style={[theme.styles.row]}>
|
7
7
|
<Label style={[{color:theme.colors.text,fontSize:16}]}>Version </Label>
|