@fto-consult/expo-ui 2.3.1 → 2.3.2
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": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@expo/html-elements": "^0.2.0",
|
|
63
63
|
"@expo/metro-config": "^0.4.0",
|
|
64
64
|
"@expo/webpack-config": "^0.17.2",
|
|
65
|
-
"@fto-consult/common": "^1.11.
|
|
65
|
+
"@fto-consult/common": "^1.11.15",
|
|
66
66
|
"@gorhom/portal": "^1.0.14",
|
|
67
67
|
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
68
68
|
"@react-native-community/datetimepicker": "6.5.2",
|
|
@@ -10,6 +10,7 @@ import Label from "$ecomponents/Label";
|
|
|
10
10
|
import theme from "$theme"
|
|
11
11
|
import Expandable from "$ecomponents/Expandable";
|
|
12
12
|
import { Dimensions } from "react-native";
|
|
13
|
+
import Grid from "$components/Grid";
|
|
13
14
|
|
|
14
15
|
const MIN_WIDTH = 250;
|
|
15
16
|
let windowWidth = Dimensions.get("window").width;
|
|
@@ -28,6 +29,12 @@ const FiltersAccordionComponent = React.forwardRef((props,ref)=>{
|
|
|
28
29
|
const filterTitle = defaultStr(customFilterTitle,'Filtres');
|
|
29
30
|
const canHandlerFilterRef = React.useRef(0);
|
|
30
31
|
const filteredRef = React.useRef({});
|
|
32
|
+
const cellProps = {
|
|
33
|
+
desktopSize : 4,
|
|
34
|
+
tabletSize :6,
|
|
35
|
+
phoneSize : 12,
|
|
36
|
+
style : [theme.styles.ph1],
|
|
37
|
+
}
|
|
31
38
|
const prepareContent = (filters)=>{
|
|
32
39
|
const content = []
|
|
33
40
|
const colMenus = [];
|
|
@@ -37,7 +44,7 @@ const FiltersAccordionComponent = React.forwardRef((props,ref)=>{
|
|
|
37
44
|
};
|
|
38
45
|
Object.map(filters,(filter,index)=>{
|
|
39
46
|
if(React.isValidElement(filter)){
|
|
40
|
-
content.push(<
|
|
47
|
+
content.push(<Grid.Cell {...cellProps} key={index}>{filter}</Grid.Cell>)
|
|
41
48
|
} else if(isObj(filter)){
|
|
42
49
|
const {onChange} = filter;
|
|
43
50
|
const key = defaultStr(filter.key,filter.field,filter.index,index+"");
|
|
@@ -65,7 +72,9 @@ const FiltersAccordionComponent = React.forwardRef((props,ref)=>{
|
|
|
65
72
|
}
|
|
66
73
|
}
|
|
67
74
|
mainFilterTitle +=(content.length?",":"")+"\n"+defaultStr(filter.label,filter.text,filter.field)+" : "+defVal+""
|
|
68
|
-
content.push(
|
|
75
|
+
content.push(
|
|
76
|
+
<Grid.Cell {...cellProps} key={key}>
|
|
77
|
+
<Filter
|
|
69
78
|
{...filter}
|
|
70
79
|
dynamicRendered
|
|
71
80
|
isLoading = {isLoading && filteredRef.current[key] ? true : false}
|
|
@@ -88,7 +97,7 @@ const FiltersAccordionComponent = React.forwardRef((props,ref)=>{
|
|
|
88
97
|
withBottomSheet
|
|
89
98
|
containerProps = {{...containerProps}}
|
|
90
99
|
inputProps = {{containerProps}}
|
|
91
|
-
|
|
100
|
+
/></Grid.Cell>)
|
|
92
101
|
}
|
|
93
102
|
})
|
|
94
103
|
return {content,mainFilterTitle,colMenus}
|
|
@@ -130,10 +139,10 @@ const FiltersAccordionComponent = React.forwardRef((props,ref)=>{
|
|
|
130
139
|
</View>
|
|
131
140
|
</Expandable>
|
|
132
141
|
</View>
|
|
133
|
-
{content.length ? <View style={styles.
|
|
134
|
-
<
|
|
142
|
+
{content.length ? <View style={[theme.styles.w100]}>
|
|
143
|
+
<Grid style={theme.styles.w100}>
|
|
135
144
|
{content}
|
|
136
|
-
</
|
|
145
|
+
</Grid>
|
|
137
146
|
</View> : null}
|
|
138
147
|
</View>
|
|
139
148
|
</Content>
|
|
@@ -481,7 +481,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
481
481
|
header.colIndex = colIndex;
|
|
482
482
|
this.state.columns[header.field] = header;
|
|
483
483
|
/*** les pieds de pages sont les données de type decimal, où qu'on peut compter */
|
|
484
|
-
if(header.footer !== false && (arrayValueExists(['decimal','number','money'],header.type) || header.format == 'money')){
|
|
484
|
+
if(header.footer !== false && ((arrayValueExists(['decimal','number','money'],header.type) && header.format) || header.format == 'money' || header.format =='number')){
|
|
485
485
|
footers[header.field] = header;
|
|
486
486
|
}
|
|
487
487
|
if(!this.hasColumnsHalreadyInitialized){
|