@fto-consult/expo-ui 5.8.9 → 5.8.10

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": "5.8.9",
3
+ "version": "5.8.10",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -57,12 +57,12 @@ const DatagridFactory = (Factory)=>{
57
57
  if(arg.renderRowCell === false || arg.isSectionListHeader === true) return super.renderRowCell(arg);
58
58
  const {columnDef,columnField} = arg;
59
59
  if(!columnDef.visible || columnDef.accordion === false || this.isSelectableColumn(columnDef,columnField)) return null;
60
- let {render,key,style} = super.renderRowCell(arg);
60
+ arg.isAccordion = true;
61
+ const {render,key,style} = super.renderRowCell(arg);
61
62
  if(render===null || !React.isValidElement(render)) return null;
62
- return <Label style={style} key={key}>
63
+ return <Label style={[style,{paddingTop:10,paddingBottom:10}]} key={key}>
63
64
  {render}
64
- </Label>
65
-
65
+ </Label>
66
66
  }
67
67
  rangeChanged(state){
68
68
  if(this.startEndIndexCounterElt && this.startEndIndexCounterElt.update){
@@ -87,7 +87,7 @@ const GridCellComponent = React.forwardRef((p,ref)=>{
87
87
  return getSizeStyle(p);
88
88
  }}
89
89
  ref={ref}
90
- style = {[styles.container,getSizeStyle(p).style,style]}
90
+ style = {[styles.container,customFlex !== undefined && {flex:customFlex},getSizeStyle(p).style,style]}
91
91
  >
92
92
  <C testID={testID+"_Content"} activeOpacity={activeOpacity} {...contentProps}
93
93
 
@@ -6,10 +6,10 @@ import PropTypes from "prop-types";
6
6
  import { StyleProp } from '$theme';
7
7
  import View from "$ecomponents/View";
8
8
 
9
- const GridComponent = React.forwardRef((p,ref)=>{
10
- const {onPress,responsive,activeOpacity,onLongPress,flexGrow =1,flex:customFlex,style,onPressIn,col,onPressOut,...props} = p;
9
+ const GridComponent = React.forwardRef(({onPress,responsive,activeOpacity,onLongPress,flexGrow,flex:customFlex,style,onPressIn,col,onPressOut,...props},ref)=>{
11
10
  const testID = defaultStr(props.testID,"RN_GridComponent");
12
11
  const flattenedStyle = StyleSheet.flatten(style);
12
+ flexGrow = typeof flexGrow =='number'? flexGrow : 0;
13
13
  const flex = customFlex !== undefined ? customFlex : (flattenedStyle && (col && flattenedStyle.width || !col && flattenedStyle.height)) ? undefined : undefined;
14
14
  const C = onPress || onLongPress || onPressIn || onPressOut ? TouchableOpacity : View;
15
15
  return <C {...props} activeOpacity={activeOpacity} onLongPress={onLongPress} onPressIn={onPressIn} onPressOut={onPressOut}
@@ -14,7 +14,6 @@ export default function DatabaseStatisticScreen ({withScreen,fetchDataProps,tabl
14
14
  containerProps = defaultObj(containerProps);
15
15
  const title = containerProps.title = defaultStr(containerProps.title,DatabaseStatisticScreen.title);
16
16
  contentProps = defaultObj(contentProps);
17
- const forceRender = React.useForceRender();
18
17
  if(Component == Cell){
19
18
  containerProps.desktopSize = defaultNumber(containerProps.desktopSize,12);
20
19
  containerProps.tabletSize = defaultNumber(containerProps.tabletSize,8);
@@ -58,7 +57,7 @@ export default function DatabaseStatisticScreen ({withScreen,fetchDataProps,tabl
58
57
  content = <Component {...containerProps} style={[containerProps.style,theme.styles.mr1,theme.styles.ml1]}>
59
58
  {content}
60
59
  </Component>;
61
- return withScreen !== false ? <Screen withScrollView title={defaultVal(customTitle,title)} {...props}>{content}</Screen> : content;
60
+ return withScreen !== false ? <Screen containerProps={{style:[{flexGrow:0,flex:0}]}} withScrollView title={defaultVal(customTitle,title)} {...props}>{content}</Screen> : content;
62
61
  }
63
62
 
64
63
  export const screenName = DatabaseStatisticScreen.screenName = "DatabaseStatistics";
@@ -101,7 +101,7 @@ const PermLines = React.forwardRef(({user,gridProps,defaultActions:cDefaultActio
101
101
  })
102
102
  return content;
103
103
  },[tables,allPerms,isUserMasterAdmin,disabled,tablePermPrefix])
104
- return <Expandable {...props} testID={testID} style={[theme.styles.w100,style]} containerProps={containerProps} titleProps = {{style:[styles.expandable,theme.styles.w100]}} title={title}>
104
+ return <Expandable withScrollView={false} {...props} testID={testID} style={[theme.styles.w100,style]} containerProps={containerProps} titleProps = {{style:[styles.expandable,theme.styles.w100]}} title={title}>
105
105
  <Grid testID={testID+"_Grid"} {...gridProps}>
106
106
  {content }
107
107
  </Grid>