@fto-consult/expo-ui 2.20.0 → 2.20.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": "2.20.
|
|
3
|
+
"version": "2.20.1",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@emotion/native": "^11.10.0",
|
|
62
62
|
"@expo/html-elements": "^0.2.0",
|
|
63
63
|
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^1.23.
|
|
64
|
+
"@fto-consult/common": "^1.23.4",
|
|
65
65
|
"@gorhom/portal": "^1.0.14",
|
|
66
66
|
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
67
67
|
"@react-native-community/datetimepicker": "6.5.2",
|
|
@@ -118,6 +118,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
118
118
|
sectionListHeaderFooters : {value : {}},
|
|
119
119
|
sectionListDataSize : {value : {current : 0}},
|
|
120
120
|
enablePointerEventsRef : {value : {current:false}},
|
|
121
|
+
configureSectionListSelectedValues : {value : {}},
|
|
121
122
|
sectionListColumnsSize : {value : {current:0}}, //la taille du nombre d'éléments de section dans les colonnes
|
|
122
123
|
})
|
|
123
124
|
this.isLoading = this.isLoading.bind(this);
|
|
@@ -1004,12 +1005,13 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1004
1005
|
if(type.contains("date") || type =='time'){
|
|
1005
1006
|
return new Promise((resolve,reject)=>{
|
|
1006
1007
|
DialogProvider.open({
|
|
1008
|
+
title : 'Format de date',
|
|
1007
1009
|
fields : {
|
|
1008
1010
|
dateFormat : {
|
|
1009
1011
|
type : 'select_dateformat',
|
|
1010
1012
|
required : true,
|
|
1011
1013
|
text : 'Sélectionnez un format de date',
|
|
1012
|
-
defaultValue : "dd/mm/yyyy",
|
|
1014
|
+
defaultValue : defaultStr(this.configureSectionListSelectedValues[column.field],"dd/mm/yyyy"),
|
|
1013
1015
|
}
|
|
1014
1016
|
},
|
|
1015
1017
|
onCancelButtonPress : ()=>{
|
|
@@ -1021,6 +1023,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1021
1023
|
icon : "check",
|
|
1022
1024
|
onPress : ({data})=>{
|
|
1023
1025
|
column.format = data.dateFormat;
|
|
1026
|
+
this.configureSectionListSelectedValues[column.field] = data.dateFormat;
|
|
1024
1027
|
DialogProvider.close();
|
|
1025
1028
|
setTimeout(()=>{
|
|
1026
1029
|
resolve(column);
|
|
@@ -1058,7 +1061,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1058
1061
|
return cb();
|
|
1059
1062
|
}
|
|
1060
1063
|
return this.configureSectionListColumn(sectionListColumns[columnName]).then(cb).catch(notify.error)
|
|
1061
|
-
},
|
|
1064
|
+
}, 100);
|
|
1062
1065
|
}
|
|
1063
1066
|
removeAllColumnsInSectionList(){
|
|
1064
1067
|
const {sectionListColumns} = this.prepareColumns({sectionListColumns:{}});
|
|
@@ -1097,7 +1100,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1097
1100
|
onPress : ()=>{
|
|
1098
1101
|
setTimeout(()=>{
|
|
1099
1102
|
this.removeAllColumnsInSectionList();
|
|
1100
|
-
},
|
|
1103
|
+
},100)
|
|
1101
1104
|
}
|
|
1102
1105
|
},
|
|
1103
1106
|
...m,
|
|
@@ -1176,7 +1179,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1176
1179
|
onPress : ()=>{
|
|
1177
1180
|
setTimeout(() => {
|
|
1178
1181
|
this.toggleColumnVisibility(header.field);
|
|
1179
|
-
},
|
|
1182
|
+
},100);
|
|
1180
1183
|
return false;
|
|
1181
1184
|
},
|
|
1182
1185
|
title : title,
|
|
@@ -1896,7 +1899,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1896
1899
|
}
|
|
1897
1900
|
cb && setTimeout(() => {
|
|
1898
1901
|
cb();
|
|
1899
|
-
},
|
|
1902
|
+
}, 200);
|
|
1900
1903
|
}
|
|
1901
1904
|
isAllRowsSelected(update){
|
|
1902
1905
|
return this.selectedRowsCount && this.selectedRowsCount === this.getMaxSelectableRows()? true : false;
|
|
@@ -82,6 +82,7 @@ export const selectDateFormatFieldProps = ({onAdd:customOnAdd,onAddCustomFormat,
|
|
|
82
82
|
...defaultObj(props),
|
|
83
83
|
onAdd,
|
|
84
84
|
onAdd : undefined,
|
|
85
|
+
showAdd : false,
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
export const getDateFormatSelectorItems = x=> Object.map(DateLib.formats,(format)=>{
|
|
@@ -89,7 +90,7 @@ export const getDateFormatSelectorItems = x=> Object.map(DateLib.formats,(format
|
|
|
89
90
|
});
|
|
90
91
|
|
|
91
92
|
export const dateFormatSelectorRenderItem = ({item})=>{
|
|
92
|
-
return "{0}
|
|
93
|
+
return "{0} [{1}]".sprintf(item.label,item.code);
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
DateFormatSelector.propTypes = {
|