@fto-consult/expo-ui 8.76.0 → 8.76.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.76.0",
3
+ "version": "8.76.1",
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": {
@@ -9,6 +9,9 @@ import theme from "$theme"
9
9
  import {styles as rStyles,getRowStyle} from "../utils";
10
10
  import { useIsRowSelected,useDatagrid} from "../hooks";
11
11
  import {HStack} from "$ecomponents/Stack";
12
+ import { isMobileNative, isReactNativeWebview} from "$cplatform";
13
+
14
+ const isNative = isMobileNative() || isReactNativeWebview();
12
15
 
13
16
  const DatagridAccordionRow = React.forwardRef(({selectable,
14
17
  rowKey,
@@ -81,10 +84,7 @@ const DatagridAccordionRow = React.forwardRef(({selectable,
81
84
  const wrapStyle = React.useMemo(()=>{
82
85
  return getRowStyle({row:item,index,selected,numColumns,isAccordion:true,rowIndex:index});
83
86
  },[selected,numColumns]);
84
- const viewWrapperStyle = [selectable !== false && theme.styles.cursorPointer];
85
- if(!hasAvatar){
86
- viewWrapperStyle.push(styles.hasNotAvatar);
87
- }
87
+ const viewWrapperStyle = [selectable !== false && theme.styles.cursorPointer,hasAvatar ? styles.hasAvatar : styles.hasNotAvatar];
88
88
  if(selected) {
89
89
  const handleAvatarRowToggle = (event)=>{
90
90
  React.stopEventPropagation(event);
@@ -238,7 +238,9 @@ const styles = StyleSheet.create({
238
238
  },
239
239
  container : {
240
240
  paddingVertical : 0,
241
- paddingHorizontal : 7,
241
+ paddingLeft : isNative ? 7 : 2,
242
+ //paddingHorizontal : 7,
243
+ paddingRight : 7,
242
244
  marginHorizontal : 0,
243
245
  flexWrap : 'nowrap',
244
246
  justifyContent : 'center',
@@ -249,14 +251,17 @@ const styles = StyleSheet.create({
249
251
  marginRight : 10,
250
252
  },
251
253
  hasNotAvatar : {
252
- borderLeftWidth : 5,
254
+ borderLeftWidth : 7,
253
255
  paddingLeft : 0,
254
256
  height : "100%",
255
257
  borderLeftColor : "transparent",
256
258
  },
259
+ hasAvatar : {
260
+ paddingLeft : isNative ? 10 : 7,
261
+ },
257
262
  selected : {
258
- paddingHorizontal : 0,
259
- paddingVertical : 0,
263
+ //paddingHorizontal : 0,
264
+ //paddingVertical : 0,
260
265
  },
261
266
  contentContainerNotAvatar : {
262
267
  paddingLeft : 2,
@@ -30,7 +30,7 @@ module.exports = {
30
30
  "license": "MIT"
31
31
  },
32
32
  "@fto-consult/common": {
33
- "version": "4.46.7",
33
+ "version": "4.47.0",
34
34
  "url": "https://github.com/borispipo/common#readme",
35
35
  "license": "ISC"
36
36
  },