@fto-consult/expo-ui 6.42.2 → 6.44.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 +5 -0
- package/metro.config.js +14 -0
- package/package.json +7 -6
- package/src/components/BottomSheet/Sheet.js +12 -6
- package/src/components/Datagrid/IndexComponent.js +4 -3
- package/src/components/Datagrid/RenderType.js +2 -11
- package/src/navigation/index.js +2 -1
- package/src/screens/Help/openLibraries.js +1 -1
package/babel.config.alias.js
CHANGED
@@ -15,6 +15,10 @@ module.exports = (opts)=>{
|
|
15
15
|
const expoUI = require("./expo-ui-path")();
|
16
16
|
const euCommon = path.resolve(expoUI,"node_modules","@fto-consult","common");
|
17
17
|
const cpath = fs.existsSync(euCommon)? path.resolve(euCommon,"babel.config.alias") : "@fto-consult/common/babel.config.alias";
|
18
|
+
const mainAppPackage = path.resolve(projectRoot,"expo-ui.json");
|
19
|
+
if(fs.existsSync(mainAppPackage)){
|
20
|
+
opts.$packageJSON = mainAppPackage;
|
21
|
+
}
|
18
22
|
const r = require(`${cpath}`)(opts);
|
19
23
|
const expo = path.resolve(expoUI,"src");
|
20
24
|
r["$ecomponents"] = r["$expo-components"] = path.resolve(expo,"components");
|
@@ -74,6 +78,7 @@ module.exports = (opts)=>{
|
|
74
78
|
r.$ehooks = path.resolve(expo,"context","hooks");
|
75
79
|
///le chemin racine du projet expo-ui
|
76
80
|
r["$expo-ui-root-path"] = r["$expo-ui-root"]= path.resolve(expo,"..");
|
81
|
+
|
77
82
|
const $assets = r.$assets;
|
78
83
|
const $electron = path.resolve(dir,"electron");
|
79
84
|
const electronPaths = {
|
package/metro.config.js
CHANGED
@@ -41,5 +41,19 @@ module.exports = function(opts){
|
|
41
41
|
});*/
|
42
42
|
///on génère les librairies open sources utilisées par l'application
|
43
43
|
require("./find-licenses");
|
44
|
+
|
45
|
+
const packageJSonPath = path.resolve(projectRoot,"package.json");
|
46
|
+
const mainAppPackage = path.resolve(projectRoot,"expo-ui.json");
|
47
|
+
if(!fs.existsSync(mainAppPackage) && fs.existsSync(packageJSonPath)){
|
48
|
+
try {
|
49
|
+
const packageObj = require(`${packageJSonPath}`);
|
50
|
+
if(packageObj && typeof packageObj =='object'){
|
51
|
+
["scripts","private","main","repository","keywords","bugs","dependencies","devDependencies"].map(v=>{
|
52
|
+
delete packageObj[v];
|
53
|
+
});
|
54
|
+
fs.writeFileSync(mainAppPackage,JSON.stringify(packageObj,null,"\t"));
|
55
|
+
}
|
56
|
+
} catch{}
|
57
|
+
}
|
44
58
|
return config;
|
45
59
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.44.0",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"update-apexchart": "node ./bin/update-appex-chart.js",
|
44
44
|
"update-appexchart": "npm run update-apexchart",
|
45
45
|
"delete-node-modules": "rimraf ./**/node_modules",
|
46
|
-
"dev"
|
46
|
+
"dev": "npx expo start --no-dev --minify -c",
|
47
47
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
48
48
|
"update": "npm i expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @emotion/native@latest @fto-consult/common@latest @react-navigation/stack react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix && npm run update-apexchart && npm run find-licenses"
|
49
49
|
},
|
@@ -105,11 +105,11 @@
|
|
105
105
|
"react-native": "0.72.4",
|
106
106
|
"react-native-big-list": "^1.6.1",
|
107
107
|
"react-native-blob-util": "^0.18.6",
|
108
|
-
"react-native-gesture-handler": "
|
108
|
+
"react-native-gesture-handler": "~2.12.0",
|
109
109
|
"react-native-iphone-x-helper": "^1.3.1",
|
110
110
|
"react-native-mime-types": "^2.4.0",
|
111
|
-
"react-native-paper": "^5.10.
|
112
|
-
"react-native-paper-dates": "^0.19.
|
111
|
+
"react-native-paper": "^5.10.5",
|
112
|
+
"react-native-paper-dates": "^0.19.6",
|
113
113
|
"react-native-reanimated": "~3.3.0",
|
114
114
|
"react-native-safe-area-context": "4.6.3",
|
115
115
|
"react-native-screens": "~3.22.0",
|
@@ -120,7 +120,8 @@
|
|
120
120
|
"sharp-cli": "^4.1.1",
|
121
121
|
"tippy.js": "^6.3.7",
|
122
122
|
"websql": "^2.0.3",
|
123
|
-
"xlsx": "^0.18.5"
|
123
|
+
"xlsx": "^0.18.5",
|
124
|
+
"sentry-expo": "~7.0.0"
|
124
125
|
},
|
125
126
|
"devDependencies": {
|
126
127
|
"@expo/metro-config": "^0.10.7",
|
@@ -17,7 +17,7 @@ import View from "$ecomponents/View";
|
|
17
17
|
import Portal from "$ecomponents/Portal";
|
18
18
|
import { ScrollView } from "react-native";
|
19
19
|
import BackHandler from "$ecomponents/BackHandler";
|
20
|
-
import Reanimated, { useSharedValue,withTiming,useAnimatedStyle
|
20
|
+
import Reanimated, { useSharedValue,withTiming,useAnimatedStyle} from 'react-native-reanimated';
|
21
21
|
import {
|
22
22
|
Pressable,
|
23
23
|
Animated,
|
@@ -128,7 +128,7 @@ const BottomSheetComponent = React.forwardRef((props,ref)=> {
|
|
128
128
|
};
|
129
129
|
hasCallCallbackRef.current = false;
|
130
130
|
if(animatedHeight.value != 0){
|
131
|
-
animatedHeight.value =
|
131
|
+
animatedHeight.value = animate(0,{
|
132
132
|
duration: closeDuration,
|
133
133
|
callback,
|
134
134
|
});
|
@@ -142,7 +142,7 @@ const BottomSheetComponent = React.forwardRef((props,ref)=> {
|
|
142
142
|
onPanResponderMove: (e, gestureState) => {
|
143
143
|
const diff = gestureState.dy > 0 ? animatedHeight.value - gestureState.dy : Math.min(heightRef.current,animatedHeight.value-gestureState.dy);
|
144
144
|
if(diff >0 && diff !== animatedHeight.value){
|
145
|
-
animatedHeight.value =
|
145
|
+
animatedHeight.value = animate(diff,{duration:100});
|
146
146
|
}
|
147
147
|
},
|
148
148
|
onPanResponderRelease: (e, gestureState) => {
|
@@ -160,7 +160,7 @@ const BottomSheetComponent = React.forwardRef((props,ref)=> {
|
|
160
160
|
if(typeof customVisible !=='boolean' || customVisible === visible) return;
|
161
161
|
if(customVisible){
|
162
162
|
if(animatedHeight.value >0){
|
163
|
-
animatedHeight.value =
|
163
|
+
animatedHeight.value = animate(0);
|
164
164
|
}
|
165
165
|
setVisible(true);
|
166
166
|
} else {
|
@@ -175,7 +175,7 @@ const BottomSheetComponent = React.forwardRef((props,ref)=> {
|
|
175
175
|
if(visible){
|
176
176
|
addListener();
|
177
177
|
pan.setValue({ x: 0, y: 0 });
|
178
|
-
animatedHeight.value =
|
178
|
+
animatedHeight.value = animate(height,{
|
179
179
|
callback : ()=>{
|
180
180
|
if (typeof onOpen === "function") onOpen(props)
|
181
181
|
},
|
@@ -425,4 +425,10 @@ const styles = StyleSheet.create({
|
|
425
425
|
}
|
426
426
|
});
|
427
427
|
|
428
|
-
BottomSheetComponent.displayName = "BottomSheetComponent";
|
428
|
+
BottomSheetComponent.displayName = "BottomSheetComponent";
|
429
|
+
|
430
|
+
export const animate = (time,options)=>{
|
431
|
+
return withTiming(time,{
|
432
|
+
...Object.assign({},options)
|
433
|
+
});
|
434
|
+
}
|
@@ -5,16 +5,17 @@
|
|
5
5
|
import Accordion,{ TableData as TableDataAccordion} from "./Accordion";
|
6
6
|
import Table,{TableData as DatagridTableData} from "./Table";
|
7
7
|
import {isDesktopMedia,isMobileMedia} from "$cplatform/dimensions";
|
8
|
-
import {isFunction,defaultVal} from "$cutils";
|
8
|
+
import {isFunction,defaultVal,defaultStr} from "$cutils";
|
9
9
|
import React from "$react";
|
10
10
|
import {getRenderType} from "./utils";
|
11
11
|
|
12
12
|
|
13
13
|
const DatagridMainComponent = React.forwardRef((props,ref)=>{
|
14
14
|
const isDesk = isDesktopMedia();
|
15
|
-
const isMob = isMobileMedia();
|
15
|
+
const isMob = defaultStr(isMobileMedia());
|
16
16
|
const isTableData = typeof props.isTableData =='boolean'? props.isTableData : defaultStr(props.tableName,props.table).trim() || typeof props.fetchData ==='function'?true : false;
|
17
|
-
const
|
17
|
+
const rType = defaultStr(getRenderType()).toLowerCase().trim();
|
18
|
+
const renderType = defaultStr(rType && ['table','accordion'].includes(rType) ? rType : "",isDesk? "table":'accordion').trim().toLowerCase();
|
18
19
|
const canRenderAccordion = (isFunction(props.accordion) || (isObj(props.accordionProps) && isFunction(props.accordionProps.accordion)) || props.accordion === true);
|
19
20
|
const Component = React.useMemo(()=>{
|
20
21
|
if((renderType == 'accordion' || (renderType !=='table' && isMob)) && canRenderAccordion){
|
@@ -18,18 +18,9 @@ const DatagridRenderTypeComponent = (props)=>{
|
|
18
18
|
let type = defaultStr(get(typeKey),isDesk? "fixed":'accordion').toLowerCase().trim();
|
19
19
|
const rTypes = [
|
20
20
|
{...getActiveProps(type,'accordion'),tooltip:"Les éléments de liste s'affichent de manière optimisé pour téléphone mobile",code:'accordion',icon:accordionIcon,label:'Mobile',labelText:'environnement optimisé pour téléphone mobile'},
|
21
|
-
{...getActiveProps(type,'table'),tooltip:"Les éléments de listes s'affichent dans un tableau",code:'table',icon:tableIcon,label:'Tableau'}
|
21
|
+
{...getActiveProps(type,'table'),tooltip:"Les éléments de listes s'affichent dans un tableau",code:'table',icon:tableIcon,label:'Tableau'},
|
22
|
+
{...getActiveProps(type,'auto'),tooltip:"Les éléments de listes s'affichent de fasson automatique en fonction de la taille de l'écran",code:'auto',icon:"material-wb-auto",label:'Automatique'}
|
22
23
|
]
|
23
|
-
/*Object.map(rendersTypes,(t,i)=>{
|
24
|
-
if(isObj(t)){
|
25
|
-
if((isDesk && t.desktop) || (!isDesk && t.mobile)){
|
26
|
-
rTypes.push({
|
27
|
-
...t,
|
28
|
-
...getActiveProps(type,i)
|
29
|
-
})
|
30
|
-
}
|
31
|
-
}
|
32
|
-
});*/
|
33
24
|
let typeObj = {};
|
34
25
|
Object.map(rTypes,(t)=>{
|
35
26
|
if(isObj(t) && t.code == type){
|
package/src/navigation/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
module.exports = {"@fto-consult/expo-ui":{"version":"6.
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"6.42.2","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"},"@emotion/native":{"version":"11.11.0","url":"https://emotion.sh","license":"MIT"},"@emotion/react":{"version":"11.11.1","url":"https://github.com/emotion-js/emotion/tree/main/packages/react","license":"MIT"},"@expo/html-elements":{"version":"0.5.1","url":"https://github.com/expo/expo/tree/main/packages/html-elements","license":"MIT"},"@expo/metro-config":{"version":"0.10.7","url":"https://github.com/expo/expo.git","license":"MIT"},"@expo/vector-icons":{"version":"13.0.0","url":"https://expo.github.io/vector-icons","license":"MIT"},"@expo/webpack-config":{"version":"19.0.0","url":"https://github.com/expo/expo-cli.git","license":"MIT"},"@faker-js/faker":{"version":"8.0.2","url":"https://github.com/faker-js/faker.git","license":"MIT"},"@fto-consult/common":{"version":"3.39.1","url":"https://github.com/borispipo/common#readme","license":"ISC"},"@pchmn/expo-material3-theme":{"version":"1.3.1","url":"https://github.com/pchmn/expo-material3-theme#readme","license":"MIT"},"@react-native-async-storage/async-storage":{"version":"1.18.2","url":"https://github.com/react-native-async-storage/async-storage#readme","license":"MIT"},"@react-native-community/datetimepicker":{"version":"7.2.0","url":"https://github.com/react-native-community/datetimepicker#readme","license":"MIT"},"@react-native-community/netinfo":{"version":"9.3.10","url":"https://github.com/react-native-netinfo/react-native-netinfo#readme","license":"MIT"},"@react-native/assets-registry":{"version":"0.72.0","url":"git@github.com:facebook/react-native.git","license":"MIT"},"@react-navigation/native":{"version":"6.1.7","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.13","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@react-navigation/stack":{"version":"6.3.17","url":"https://reactnavigation.org/docs/stack-navigator/","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.42.0","url":"https://apexcharts.com","license":"MIT"},"babel-plugin-inline-dotenv":{"version":"1.7.0","url":"https://github.com/brysgo/babel-plugin-inline-dotenv#readme","license":"ISC"},"babel-plugin-module-resolver":{"version":"5.0.0","url":"https://github.com/tleunen/babel-plugin-module-resolver.git","license":"MIT"},"expo":{"version":"49.0.11","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.4","url":"https://docs.expo.dev/versions/latest/sdk/camera/","license":"MIT"},"expo-clipboard":{"version":"4.3.1","url":"https://docs.expo.dev/versions/latest/sdk/clipboard","license":"MIT"},"expo-font":{"version":"11.4.0","url":"https://docs.expo.dev/versions/latest/sdk/font/","license":"MIT"},"expo-image-picker":{"version":"14.3.2","url":"https://docs.expo.dev/versions/latest/sdk/imagepicker/","license":"MIT"},"expo-linking":{"version":"5.0.2","url":"https://docs.expo.dev/versions/latest/sdk/linking","license":"MIT"},"expo-sqlite":{"version":"11.3.3","url":"https://docs.expo.dev/versions/latest/sdk/sqlite/","license":"MIT"},"expo-status-bar":{"version":"1.6.0","url":"https://docs.expo.dev/versions/latest/sdk/status-bar/","license":"MIT"},"expo-system-ui":{"version":"2.4.0","url":"https://docs.expo.dev/versions/latest/sdk/system-ui","license":"MIT"},"expo-web-browser":{"version":"12.3.2","url":"https://docs.expo.dev/versions/latest/sdk/webbrowser/","license":"MIT"},"file-saver":{"version":"2.0.5","url":"https://github.com/eligrey/FileSaver.js#readme","license":"MIT"},"fs-extra":{"version":"11.1.1","url":"https://github.com/jprichardson/node-fs-extra","license":"MIT"},"google-libphonenumber":{"version":"3.2.33","url":"https://ruimarinho.github.io/google-libphonenumber/","license":"(MIT AND Apache-2.0)"},"htmlparser2-without-node-native":{"version":"3.9.2","url":"git://github.com/fb55/htmlparser2.git","license":"MIT"},"is-plain-obj":{"version":"4.1.0","license":"MIT"},"pdfmake":{"version":"0.2.7","url":"http://pdfmake.org","license":"MIT"},"process":{"version":"0.11.10","url":"git://github.com/shtylman/node-process.git","license":"MIT"},"prop-types":{"version":"15.8.1","url":"https://facebook.github.io/react/","license":"MIT"},"react":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-content-loader":{"version":"6.2.1","url":"https://github.com/danilowoz/react-content-loader","license":"MIT"},"react-dom":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-native":{"version":"0.72.4","license":"MIT"},"react-native-big-list":{"version":"1.6.1","url":"https://marcocesarato.github.io/react-native-big-list-docs/","license":"GPL-3.0-or-later"},"react-native-blob-util":{"version":"0.18.6","url":"https://github.com/RonRadtke/react-native-blob-util","license":"MIT"},"react-native-gesture-handler":{"version":"2.12.1","url":"https://github.com/software-mansion/react-native-gesture-handler#readme","license":"MIT"},"react-native-iphone-x-helper":{"version":"1.3.1","url":"https://github.com/ptelad/react-native-iphone-x-helper#readme","license":"MIT"},"react-native-mime-types":{"version":"2.4.0","license":"MIT"},"react-native-paper":{"version":"5.10.5","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.19.6","url":"https://github.com/web-ridge/react-native-paper-dates#readme","license":"MIT"},"react-native-reanimated":{"version":"3.3.0","url":"https://github.com/software-mansion/react-native-reanimated#readme","license":"MIT"},"react-native-safe-area-context":{"version":"4.6.3","url":"https://github.com/th3rdwave/react-native-safe-area-context#readme","license":"MIT"},"react-native-screens":{"version":"3.22.1","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"react-native-svg":{"version":"13.9.0","url":"https://github.com/react-native-community/react-native-svg","license":"MIT"},"react-native-web":{"version":"0.19.8","url":"git://github.com/necolas/react-native-web.git","license":"MIT"},"react-native-webview":{"version":"13.2.2","url":"https://github.com/react-native-webview/react-native-webview#readme","license":"MIT"},"react-virtuoso":{"version":"4.5.1","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"4.1.1","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"uninstall":{"version":"0.0.0","license":"MIT"},"websql":{"version":"2.0.3","url":"git://github.com/nolanlawson/node-websql.git","license":"Apache-2.0"},"xlsx":{"version":"0.18.5","url":"https://sheetjs.com/","license":"Apache-2.0"}};
|