@fto-consult/expo-ui 6.21.22 → 6.22.1
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/%ProgramData%/Microsoft/Windows/UUS/State/_active.uusver +1 -0
- package/app.config.json +11 -0
- package/babel.config.alias.js +3 -1
- package/expo-ui-path.js +1 -0
- package/index.js +6 -0
- package/package.json +3 -3
- package/src/App.js +6 -2
- package/src/components/Label/index.js +9 -3
- package/src/components/SplashScreen/index.js +3 -20
- package/src/components/SplashScreen/styles.js +0 -1
- package/src/index.js +3 -5
- package/src/screens/Help/openLibraries.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1023.609.1142.0
|
package/app.config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@FTO-CONSULT/EXPO-UI",
|
|
3
|
+
"version": "6.21.23",
|
|
4
|
+
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
|
+
"bin": {
|
|
6
|
+
"expo-ui": "./bin/index.js"
|
|
7
|
+
},
|
|
8
|
+
"author": "Boris Fouomene",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"homepage": "https://github.com/borispipo/expo-ui#readme"
|
|
11
|
+
}
|
package/babel.config.alias.js
CHANGED
|
@@ -116,7 +116,9 @@ module.exports = (opts)=>{
|
|
|
116
116
|
}
|
|
117
117
|
const jsonPath = path.resolve(projectRoot,'package.json');
|
|
118
118
|
if(fs.existsSync(jsonPath)){
|
|
119
|
-
|
|
119
|
+
try {
|
|
120
|
+
require("./electron/utils/copy")(jsonPath,path.resolve(dir,"electron","package.app.json"))
|
|
121
|
+
} catch{}
|
|
120
122
|
}
|
|
121
123
|
///on sauvegarde les chemins des fichiers utiles, qui seront utilisées par la variable electron plus tard
|
|
122
124
|
writeFile(path.resolve(dir,"electron","paths.json"),JSON.stringify(electronPaths));
|
package/expo-ui-path.js
CHANGED
|
@@ -15,6 +15,7 @@ module.exports = function (){
|
|
|
15
15
|
})
|
|
16
16
|
const expoUIPath = path.resolve(process.cwd(),"node_modules","@fto-consult","expo-ui");
|
|
17
17
|
const sep = path.sep;
|
|
18
|
+
//return path.resolve(__dirname,suffix).replace(sep,(sep+sep));///pour la résolution du module expo-ui en mode test
|
|
18
19
|
const rootPath = process.cwd();
|
|
19
20
|
const src = path.resolve(rootPath,"src");
|
|
20
21
|
try {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.22.1",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"expo-fix": "npx expo install --fix",
|
|
44
44
|
"delete-node-modules": "rimraf ./**/node_modules",
|
|
45
45
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
|
46
|
-
"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 @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest 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-safe-area-context@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-native-screens@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
|
|
46
|
+
"update": "npm i expo @emotion/native@latest @react-native-community/netinfo@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest 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-safe-area-context@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-native-screens@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
|
|
47
47
|
},
|
|
48
48
|
"bin": {
|
|
49
49
|
"expo-ui": "./bin/index.js"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@emotion/native": "^11.11.0",
|
|
67
67
|
"@expo/html-elements": "^0.5.1",
|
|
68
68
|
"@expo/vector-icons": "^13.0.0",
|
|
69
|
-
"@fto-consult/common": "^3.
|
|
69
|
+
"@fto-consult/common": "^3.25.0",
|
|
70
70
|
"@gorhom/portal": "^1.0.14",
|
|
71
71
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
72
72
|
"@react-native-async-storage/async-storage": "1.18.2",
|
package/src/App.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import '$session';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import {SWRConfig} from "$swr";
|
|
4
|
-
import {defaultObj} from "$cutils";
|
|
5
4
|
import Index from './index';
|
|
6
5
|
import notify from "$notify";
|
|
7
6
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
@@ -19,6 +18,7 @@ import {isTouchDevice} from "$platform";
|
|
|
19
18
|
import * as Utils from "$cutils";
|
|
20
19
|
import {useContext} from "$econtext/hooks";
|
|
21
20
|
import appConfig from "$capp/config";
|
|
21
|
+
import { useKeepAwake } from 'expo-keep-awake';
|
|
22
22
|
|
|
23
23
|
Object.map(Utils,(v,i)=>{
|
|
24
24
|
if(typeof v =='function' && typeof window !='undefined' && window && !window[i]){
|
|
@@ -29,6 +29,7 @@ Object.map(Utils,(v,i)=>{
|
|
|
29
29
|
export default function getIndex({onMount,onUnmount,render,onRender,init}){
|
|
30
30
|
const {swrConfig} = useContext();
|
|
31
31
|
const isScreenFocusedRef = React.useRef(true);
|
|
32
|
+
useKeepAwake();
|
|
32
33
|
///garde pour chaque écran sa date de dernière activité
|
|
33
34
|
const screensRef = React.useRef({});//la liste des écrans actifs
|
|
34
35
|
const activeScreenRef = React.useRef('');
|
|
@@ -130,7 +131,10 @@ export default function getIndex({onMount,onUnmount,render,onRender,init}){
|
|
|
130
131
|
subscription?.remove()
|
|
131
132
|
}
|
|
132
133
|
},
|
|
133
|
-
initReconnect(
|
|
134
|
+
initReconnect(cb) {
|
|
135
|
+
const callback = ()=>{
|
|
136
|
+
cb();
|
|
137
|
+
}
|
|
134
138
|
/* Register the listener with your state provider */
|
|
135
139
|
APP.on(APP.EVENTS.GO_ONLINE,callback);
|
|
136
140
|
return ()=>{
|
|
@@ -10,7 +10,7 @@ const defaultSelectable = canTextBeSelectable();
|
|
|
10
10
|
|
|
11
11
|
export const EllipsizeMode = {'head':'head','middle':'middle', 'tail':'tail' , 'clip':'clip'}
|
|
12
12
|
|
|
13
|
-
const LabelComponent = React.forwardRef(({ children,color,upperCase,fontSize,testID,wrap,id,wrapText,error,underlined,splitText,secondary,primary,bold,textBold,disabled,text,style,...rest},ref)=> {
|
|
13
|
+
const LabelComponent = React.forwardRef(({ children,role,color,upperCase,fontSize,testID,wrap,id,wrapText,error,underlined,splitText,secondary,primary,bold,textBold,disabled,text,style,...rest},ref)=> {
|
|
14
14
|
children = defaultVal(children,text);
|
|
15
15
|
let isText = false;
|
|
16
16
|
if(!React.isValidElement(children) && Array.isArray(children) && children.length){
|
|
@@ -64,7 +64,10 @@ const LabelComponent = React.forwardRef(({ children,color,upperCase,fontSize,tes
|
|
|
64
64
|
if(fontSize){
|
|
65
65
|
r1.fontSize = fontSize;
|
|
66
66
|
}
|
|
67
|
-
return (<Text
|
|
67
|
+
return (<Text allowFontScaling = {true} ref = {ref} selectable={defaultSelectable}
|
|
68
|
+
{...rest} {...restProps} testID={testID} disabled={disabled}
|
|
69
|
+
role={typeof role =='string' && role && supportedRoles.includes(role.trim()) && role.trim() || undefined}
|
|
70
|
+
style={[styles.label,splitText?styles.wrap:null,splitText?styles.w100:null,bold?styles.bold:null,r2,style,r1,styles.webFontFamilly]}>{children}</Text>)
|
|
68
71
|
}
|
|
69
72
|
let hasP = false;
|
|
70
73
|
if(isObj(rest)){
|
|
@@ -139,4 +142,7 @@ LabelComponentExported.withRef = React.forwardRef((props,ref)=>{
|
|
|
139
142
|
|
|
140
143
|
LabelComponentExported.withRef.displayName = "LabelComponent.Dynamic";
|
|
141
144
|
|
|
142
|
-
LabelComponentExported.WithRef = LabelComponentExported.withRef;
|
|
145
|
+
LabelComponentExported.WithRef = LabelComponentExported.withRef;
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
export const supportedRoles = ["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","group","heading","img","link","list","listitem","log","main","marquee","math","menu","menubar","menuitem","meter","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","searchbox","separator","slider","spinbutton","status","summary","switch","tab","table","tablist","tabpanel","term","timer","toolbar","tooltip","tree","treegrid","treeitem"];
|
|
@@ -102,32 +102,15 @@ const SplashScreenComponent = ({isLoaded,children , duration, delay,logoWidth,lo
|
|
|
102
102
|
const child = (animationDone && isLoaded)? React.isValidElement(children) && children : null;
|
|
103
103
|
return (
|
|
104
104
|
<View style={[styles.container]} testID={testID} id={testID}>
|
|
105
|
-
{!animationDone
|
|
106
|
-
<View style={styles.containerGlue}>
|
|
105
|
+
{!animationDone ? <View style={StyleSheet.absoluteFill} testID={testID+"_Animation"}/> : null}
|
|
106
|
+
<View style={styles.containerGlue} testID={testID+"_ContainerGlue"}>
|
|
107
107
|
{!animationDone && (
|
|
108
108
|
<Animated.View
|
|
109
109
|
style={_staticBackground(logoOpacity, backgroundColor)}
|
|
110
110
|
testID={testID+"_AnimationDone"}
|
|
111
111
|
/>
|
|
112
112
|
)}
|
|
113
|
-
{(animationDone || isNative) &&
|
|
114
|
-
{child}
|
|
115
|
-
</Component>}
|
|
116
|
-
{!animationDone && (
|
|
117
|
-
<Animated.Image
|
|
118
|
-
testID={testID+"AnimateImage"}
|
|
119
|
-
resizeMode={imageBackgroundResizeMode || "cover"}
|
|
120
|
-
source={imageBackgroundSource}
|
|
121
|
-
style={[disableImageBackgroundAnimation && _staticBackground(
|
|
122
|
-
logoOpacity,
|
|
123
|
-
backgroundColor
|
|
124
|
-
), disableImageBackgroundAnimation && _dynamicImageBackground(
|
|
125
|
-
imageScale,
|
|
126
|
-
logoOpacity,
|
|
127
|
-
backgroundColor
|
|
128
|
-
)]}
|
|
129
|
-
/>
|
|
130
|
-
)}
|
|
113
|
+
{(animationDone || isNative) && child}
|
|
131
114
|
{!animationDone && (
|
|
132
115
|
<PortalProvider>
|
|
133
116
|
<PaperProvider>
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "$react"
|
|
2
|
-
import { AppState
|
|
2
|
+
import { AppState} from "react-native";
|
|
3
3
|
import BackHandler from "$ecomponents/BackHandler";
|
|
4
4
|
import * as Linking from 'expo-linking';
|
|
5
5
|
import APP from "$capp";
|
|
@@ -59,7 +59,6 @@ const NAVIGATION_PERSISTENCE_KEY = 'NAVIGATION_STATE';
|
|
|
59
59
|
* getStartedRouteName : la route par défaut de getStarted lorsque l'application est en mode getStarted, c'est à dire lorsque la fonction init renvoie une erreur (reject)
|
|
60
60
|
*/
|
|
61
61
|
function App({init:initApp,initialRouteName:appInitialRouteName,render,onMount}) {
|
|
62
|
-
return <View><Text>Un test pas comme les tttt</Text></View>;
|
|
63
62
|
AppStateService.init();
|
|
64
63
|
const {FontsIconsFilter,beforeExit,preferences:appPreferences,getStartedRouteName} = useContext();
|
|
65
64
|
const [initialState, setInitialState] = React.useState(undefined);
|
|
@@ -176,7 +175,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render,onMount})
|
|
|
176
175
|
})
|
|
177
176
|
};
|
|
178
177
|
const unsubscribeNetInfo = NetInfo.addEventListener(state => {
|
|
179
|
-
|
|
178
|
+
APP.setOnlineState(state);
|
|
180
179
|
});
|
|
181
180
|
NetInfo.fetch().catch((e)=>{
|
|
182
181
|
console.log(e," is net info heinn")
|
|
@@ -190,8 +189,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render,onMount})
|
|
|
190
189
|
...state,hasGetStarted:true,...defaultObj(args && args?.state),isInitialized:true,isLoading : false,
|
|
191
190
|
});
|
|
192
191
|
}).catch((e)=>{
|
|
193
|
-
console.error(e,"
|
|
194
|
-
return;
|
|
192
|
+
console.error(e," loading resources for app initialization");
|
|
195
193
|
setState({...state,isInitialized:true,isLoading : false,hasGetStarted:false});
|
|
196
194
|
})
|
|
197
195
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {"@
|
|
1
|
+
module.exports = {"@FTO-CONSULT/EXPO-UI":{"name":"@FTO-CONSULT/EXPO-UI","version":"6.21.23","homepage":"https://github.com/borispipo/expo-ui#readme"}};
|