@fto-consult/expo-ui 8.57.0 → 8.57.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.57.0",
3
+ "version": "8.57.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": {
@@ -36,7 +36,8 @@ const UserProfileAvatarComponent = React.forwardRef(({drawerRef,chevronIconProps
36
36
  props.src = u.avatar;
37
37
  size = defaultNumber(size,!withLabel?40:40);
38
38
  const userPseudo = Auth.getUserPseudo();
39
- const pseudo = defaultStr(userPseudo,Auth.getUserCode(),Auth.getUserEmail(),appConfig.authDefaultUsername,"appConfig.authDefaultUsername");
39
+ const defaultPseudo = "Default User";
40
+ const pseudo = defaultStr(userPseudo,Auth.getUserCode(),Auth.getUserEmail(),appConfig.authDefaultUsername,defaultPseudo);
40
41
  const label = defaultStr(Auth.getUserFullName(),userPseudo);
41
42
  const onLongPress = ()=>{
42
43
  appConfig.setDeviceId().then((r)=>{
@@ -45,9 +46,13 @@ const UserProfileAvatarComponent = React.forwardRef(({drawerRef,chevronIconProps
45
46
  }
46
47
  });
47
48
  };
49
+ const pseudoTooltip = (pseudo == defaultPseudo ? `Pour modifier la valeur du pseudo actuel, définissez dans le fichier package.json, la propriété : authDefaultUsername de type chaine de caractère`:"");
48
50
  const tooltip = "Pressez longtemps pour définir un identifiant unique pour l'appareil";
51
+ const pseudoContent = <Label splitText numberOfLines={1} style={{color:theme.colors.primaryOnSurface,fontSize:15}}>{pseudo}</Label>;
49
52
  const children = <View style={[styles.labelContainer,!withLabel && theme.styles.justifyContentCenter]}>
50
- <Label splitText numberOfLines={1} style={{color:theme.colors.primaryOnSurface,fontSize:15}}>{pseudo}</Label>
53
+ {pseudoTooltip?<Tooltip title={pseudoTooltip}>
54
+ {pseudoContent}
55
+ </Tooltip>:pseudoContent}
51
56
  <Label splitText numberOfLines={1} style={[{fontSize:12,color:theme.colors.secondaryOnSurface,marginTop:6},!withLabel && {textAlign:'center'}]}>
52
57
  {label}
53
58
  </Label>