@fto-consult/expo-ui 8.5.0 → 8.6.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/babel.config.alias.js +0 -3
- package/package.json +1 -1
- package/src/components/Image/index.js +5 -3
- package/src/layouts/ProfilAvatar/index.js +1 -0
- package/src/media/index.js +2 -2
- package/src/media/utils.js +1 -1
- package/App.js +0 -19
- package/docs/components/DocVersion/index.js +0 -21
- package/docs/navigation/drawerItems/index.js +0 -16
- package/docs/navigation/drawerSections.js +0 -14
- package/docs/screens/Datagrid/index.js +0 -12
- package/docs/screens/Home/index.js +0 -32
- package/docs/screens/Introduction/index.js +0 -13
- package/docs/screens/index.js +0 -8
- package/index.js +0 -1
package/babel.config.alias.js
CHANGED
@@ -17,9 +17,6 @@ module.exports = (opts)=>{
|
|
17
17
|
const cpath = fs.existsSync(euCommon)? path.resolve(euCommon,"babel.config.alias") : "@fto-consult/common/babel.config.alias";
|
18
18
|
const r = require(`${cpath}`)(opts);
|
19
19
|
const expo = path.resolve(expoUI,"src");
|
20
|
-
r.$edocs = path.resolve(expoUI,"docs");//l'alias de la documentation
|
21
|
-
r["$edocs-components"] = path.resolve(r.$edocs,"components");
|
22
|
-
r["$edocs-screens"] = path.resolve(r.$edocs,"screens");
|
23
20
|
r["$ecomponents"] = r["$expo-components"] = path.resolve(expo,"components");
|
24
21
|
r["$econfirm"] = path.resolve(r["$expo-components"],"Dialog","confirm");
|
25
22
|
r["$confirm"] = r["$confirm"] || r["$econfirm"];
|
package/package.json
CHANGED
@@ -174,8 +174,8 @@ export default function ImageComponent(props){
|
|
174
174
|
setEditorProps({...editorProps,visible:true,...props})
|
175
175
|
})
|
176
176
|
},
|
177
|
-
pickImage : (
|
178
|
-
opts = getCropProps(
|
177
|
+
pickImage : ()=>{
|
178
|
+
const opts = getCropProps(defaultObj(pickImageProps));
|
179
179
|
opts.base64 = true;
|
180
180
|
return pickImage(opts).then((image)=>handlePickedImage(image,opts));
|
181
181
|
},
|
@@ -229,7 +229,9 @@ export default function ImageComponent(props){
|
|
229
229
|
label : 'Enregistrer une photo',
|
230
230
|
icon : 'camera',
|
231
231
|
onPress : (a)=>{
|
232
|
-
|
232
|
+
const opts = getCropProps(defaultObj(pickImageProps));
|
233
|
+
opts.base64 = true;
|
234
|
+
takePhoto(opts).then(handlePickedImage);
|
233
235
|
}
|
234
236
|
})
|
235
237
|
}
|
@@ -113,6 +113,7 @@ const UserProfileAvatarComponent = React.forwardRef(({drawerRef,chevronIconProps
|
|
113
113
|
if(!withLabel){
|
114
114
|
return <View testID={"RNProfilAvatar_AvatarContainer"} style={[theme.styles.row,theme.styles.alignItemsCenter]}>
|
115
115
|
<Image
|
116
|
+
pickImageProps = {{quality:0.4}}
|
116
117
|
{...props}
|
117
118
|
{...aProps}
|
118
119
|
size={size}
|
package/src/media/index.js
CHANGED
@@ -65,7 +65,7 @@ export const pickImageOrVideo = (options)=>{
|
|
65
65
|
return checkPermission().then(()=>{
|
66
66
|
return new Promise((resolve,reject)=>{
|
67
67
|
ImagePicker.launchImageLibraryAsync(getFilePickerOptions(options)).then((result)=>{
|
68
|
-
if(!result.cancelled) {
|
68
|
+
if(!result.cancelled && !result.canceled) {
|
69
69
|
resolve(prepareImageResult(result));
|
70
70
|
} else {
|
71
71
|
notify.warning("Opération annulée par l'utilisateur");
|
@@ -116,7 +116,7 @@ export const takePhoto = (options)=>{
|
|
116
116
|
return checkPermission(ImagePicker.requestCameraPermissionsAsync).then((perm)=>{
|
117
117
|
options = {base64:true,...Object.assign({},options)}
|
118
118
|
return ImagePicker.launchCameraAsync({...getFilePickerOptions(options)}).then((result)=>{
|
119
|
-
if(!result.cancelled) {
|
119
|
+
if(!result.cancelled && !result.canceled) {
|
120
120
|
resolve(prepareImageResult(result));
|
121
121
|
} else {
|
122
122
|
notify.warning("Opération annulée par l'utilisateur");
|
package/src/media/utils.js
CHANGED
@@ -9,7 +9,7 @@ export const getFilePickerOptions = (options)=>{
|
|
9
9
|
base64 : false, //Whether to also include the image data in Base64 format.
|
10
10
|
exif : false, //Whether to also include the EXIF data for the image. On iOS the EXIF data does not include GPS tags in the camera case.
|
11
11
|
mediaTypes : ImagePicker.MediaTypeOptions.All, //@see : https://docs.expo.dev/versions/latest/sdk/imagepicker/#mediatypeoptions
|
12
|
-
quality :
|
12
|
+
quality : 0.5, //Specify the quality of compression, from 0 to 1. 0 means compress for small size, 1 means compress for maximum quality.
|
13
13
|
},options);
|
14
14
|
}
|
15
15
|
/*** retourne les ooptions pour la capture d'une photo
|
package/App.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import AppEntry from "./src";
|
2
|
-
import {disableAuth} from "$cauth";
|
3
|
-
import { registerRootComponent } from 'expo';
|
4
|
-
export default function MainExpoApp(props){
|
5
|
-
return <AppEntry
|
6
|
-
navigation={{
|
7
|
-
screens : require("./docs/screens").default,
|
8
|
-
drawerItems:require("./docs/navigation/drawerItems").default,
|
9
|
-
drawerSections : require("./docs/navigation/drawerSections")?.default,
|
10
|
-
}}
|
11
|
-
init ={({appConfig})=>{
|
12
|
-
disableAuth();
|
13
|
-
return Promise.resolve("test ted")
|
14
|
-
}}
|
15
|
-
{...props}
|
16
|
-
/>
|
17
|
-
}
|
18
|
-
|
19
|
-
registerRootComponent(MainExpoApp);
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import {H6} from "$ecomponents/Typography";
|
2
|
-
import appConfig from "$capp/config";
|
3
|
-
import Label from "$ecomponents/Label";
|
4
|
-
import Chip from "$ecomponents/Chip";
|
5
|
-
import View from "$ecomponents/View";
|
6
|
-
import { StyleSheet } from "react-native";
|
7
|
-
import theme from "$theme";
|
8
|
-
|
9
|
-
export default function DocVersionComponent(props){
|
10
|
-
return <Label fontSize={12} primary style = {[styles.label,props.style]} children={`Version ${appConfig.version}`} textBold
|
11
|
-
{...props}/>
|
12
|
-
}
|
13
|
-
|
14
|
-
const styles = StyleSheet.create({
|
15
|
-
label : {
|
16
|
-
borderRadius : 5,
|
17
|
-
padding : 2,
|
18
|
-
flexGrow : 0,
|
19
|
-
flex : 0,
|
20
|
-
}
|
21
|
-
})
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import Introdoction from "../../screens/Introduction";
|
2
|
-
import Datagrid from "../../screens/Datagrid";
|
3
|
-
export default [
|
4
|
-
{
|
5
|
-
text : "Introduction",
|
6
|
-
icon : "alpha-i-box",
|
7
|
-
drawerSection : "introduction",
|
8
|
-
routeName : Introdoction.screenName,
|
9
|
-
},
|
10
|
-
{
|
11
|
-
text : "Datagrid",
|
12
|
-
icon : "table",
|
13
|
-
drawerSection : "components",
|
14
|
-
routeName : Datagrid.screenName,
|
15
|
-
}
|
16
|
-
]
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import Screen from "$eScreen";
|
2
|
-
import Test from "$ecomponents/Datagrid/Test";
|
3
|
-
import React from "$react";
|
4
|
-
|
5
|
-
export default function DatagridScreen(props){
|
6
|
-
return <Screen{...props} contentContainerStyle={[{flex:1}]}>
|
7
|
-
<Test/>
|
8
|
-
</Screen>
|
9
|
-
};
|
10
|
-
|
11
|
-
DatagridScreen.screenName = "datagrid/test";
|
12
|
-
DatagridScreen.authRequired = false;
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import Screen from "$escreen";
|
2
|
-
import View from "$ecomponents/View";
|
3
|
-
import Label from "$ecomponents/Label";
|
4
|
-
import appConfig from "$capp/config";
|
5
|
-
import theme from "$theme";
|
6
|
-
import Link from "$ecomponents/Link";
|
7
|
-
import {StyleSheet} from "react-native";
|
8
|
-
import {H1,H2,H3,H4,H5,Paragraph} from "$ecomponents/Typography";
|
9
|
-
export default function ExpoUIHomeScreen (props){
|
10
|
-
return <Screen {...props}>
|
11
|
-
<View style={theme.styles.p1}>
|
12
|
-
<View testID="DocTestID" style={[theme.styles.alignItemsCenter]}>
|
13
|
-
<H3 textBold primary style={theme.styles.h3}>Développez rapidement des applications mobile, web et desktop.</H3>
|
14
|
-
</View>
|
15
|
-
<View style={[theme.styles.row,theme.styles.flexWrap,theme.styles.rowGap05]}>
|
16
|
-
<H5 primary textBold>{`${appConfig.name?.toLowerCase()}, version ${appConfig.version}, `}</H5>
|
17
|
-
<Paragraph>Un framework Prêt à l'emploi multiplateforme (Mobile, web et desktop) construit sur la base du framework</Paragraph>
|
18
|
-
<Link routeName={"https://docs.expo.dev/"}>
|
19
|
-
<H4 textBold>Expo</H4>
|
20
|
-
</Link>
|
21
|
-
</View>
|
22
|
-
</View>
|
23
|
-
</Screen>
|
24
|
-
}
|
25
|
-
|
26
|
-
ExpoUIHomeScreen.screenName = "Home";
|
27
|
-
|
28
|
-
ExpoUIHomeScreen.authRequired = true;
|
29
|
-
|
30
|
-
const styles = StyleSheet.create({
|
31
|
-
|
32
|
-
})
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import Screen from "$escreen";
|
2
|
-
import DocVersion from "$edocs/components/DocVersion";
|
3
|
-
import View from "$ecomponents/View";
|
4
|
-
|
5
|
-
export default function DocIntrodoctionScreen(props){
|
6
|
-
return <Screen {...props}>
|
7
|
-
<View>
|
8
|
-
<DocVersion/>
|
9
|
-
</View>
|
10
|
-
</Screen>
|
11
|
-
}
|
12
|
-
|
13
|
-
DocIntrodoctionScreen.screenName = "introduction";
|
package/docs/screens/index.js
DELETED
package/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {default} from "./App";
|