@fto-consult/expo-ui 2.31.2 → 2.31.4
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
|
@@ -1136,14 +1136,12 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1136
1136
|
if(!isNonNullString(field)) return;
|
|
1137
1137
|
let columns = {...this.state.columns};
|
|
1138
1138
|
columns[field].visible = !columns[field].visible;
|
|
1139
|
-
|
|
1139
|
+
const footers = this.getFootersFields();
|
|
1140
1140
|
if(isObj(footers[field])){
|
|
1141
1141
|
footers[field].visible = columns[field].visible;
|
|
1142
1142
|
}
|
|
1143
1143
|
this.prepareColumns({columns});
|
|
1144
|
-
this.setState({columns}
|
|
1145
|
-
if(removeFocus) document.body.click();
|
|
1146
|
-
});
|
|
1144
|
+
this.setState({columns});
|
|
1147
1145
|
}
|
|
1148
1146
|
/****le nombre maximum de courbes supportées */
|
|
1149
1147
|
getMaxSeriesSize(){
|
|
@@ -1788,7 +1786,6 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1788
1786
|
type : chartType.type,
|
|
1789
1787
|
})
|
|
1790
1788
|
}
|
|
1791
|
-
//console.log(chartOptions," is chart options");
|
|
1792
1789
|
const labelColor = theme.Colors.isValid(config.labelColor)? config.labelColor : theme.colors.text;
|
|
1793
1790
|
if(!isDonut){
|
|
1794
1791
|
chartOptions.xaxis = extendObj(true,{},{type: 'category'},chartProps.xaxis,{xaxis});
|
|
@@ -2352,11 +2349,13 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2352
2349
|
cells = [];
|
|
2353
2350
|
const footers = this.sectionListHeaderFooters[key];
|
|
2354
2351
|
Object.map(visibleColumnsNames,(v,column)=>{
|
|
2355
|
-
if(typeof widths[column] !== 'number')
|
|
2356
|
-
|
|
2352
|
+
if(!v || typeof widths[column] !== 'number') {
|
|
2353
|
+
return null;
|
|
2354
|
+
}
|
|
2357
2355
|
if(!column) return null;
|
|
2356
|
+
const width = widths[column];
|
|
2358
2357
|
const key2 = key+column;
|
|
2359
|
-
if(!
|
|
2358
|
+
if(!this.state.columns[column] || !footers[column]) {
|
|
2360
2359
|
if(this.isAccordion()) return null;
|
|
2361
2360
|
cells.push(<View key={key2} testID={testID+"_FooterCellContainer_"+key2} style={[tableStyles.headerItemOrCell,{width}]}></View>)
|
|
2362
2361
|
} else {
|
|
@@ -2930,43 +2929,43 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2930
2929
|
/>
|
|
2931
2930
|
}
|
|
2932
2931
|
renderSelectFieldCell({rowData,columnDef,columnField}){
|
|
2933
|
-
|
|
2934
|
-
|
|
2932
|
+
let v1 = rowData[columnField],_render = v1;
|
|
2933
|
+
if(isObjOrArray(columnDef.items)){
|
|
2935
2934
|
if(columnDef.multiple){
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2935
|
+
v1 = Object.toArray(v1);
|
|
2936
|
+
_render = "";
|
|
2937
|
+
v1.map((v)=>{
|
|
2938
|
+
for(let i in columnDef.items){
|
|
2939
|
+
let it = columnDef.items[i];
|
|
2940
|
+
if(isObj(it) && defaultVal(it.code,i) == v){
|
|
2941
|
+
_render+=(_render?arrayValueSeparator:"")+defaultStr(it.label,it.text,v);
|
|
2942
|
+
} else if(isNonNullString(it) && i == v){
|
|
2943
|
+
_render+=(_render?arrayValueSeparator:"")+it;
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
})
|
|
2947
|
+
if(!_render){
|
|
2948
|
+
return v1.join(arrayValueSeparator);
|
|
2949
|
+
}
|
|
2950
|
+
return _render;
|
|
2951
|
+
} else {
|
|
2939
2952
|
for(let i in columnDef.items){
|
|
2940
2953
|
let it = columnDef.items[i];
|
|
2941
|
-
if(isObj(it) && defaultVal(it.code,i) ==
|
|
2942
|
-
|
|
2943
|
-
} else if(isNonNullString(it) && i ==
|
|
2944
|
-
|
|
2954
|
+
if(isObj(it) && defaultVal(it.code,i) == v1){
|
|
2955
|
+
return defaultStr(it.label,it.text,v1);
|
|
2956
|
+
} else if(isNonNullString(it) && i == v1){
|
|
2957
|
+
return it;
|
|
2945
2958
|
}
|
|
2946
2959
|
}
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
} else {
|
|
2953
|
-
for(let i in columnDef.items){
|
|
2954
|
-
let it = columnDef.items[i];
|
|
2955
|
-
if(isObj(it) && defaultVal(it.code,i) == v1){
|
|
2956
|
-
return defaultStr(it.label,it.text,v1);
|
|
2957
|
-
} else if(isNonNullString(it) && i == v1){
|
|
2958
|
-
return it;
|
|
2960
|
+
if(_render === undefined || _render === null) return v1;
|
|
2961
|
+
if(isArray(_render)){
|
|
2962
|
+
return _render.join(arrayValueSeparator)
|
|
2963
|
+
} else if(isObj(_render)){
|
|
2964
|
+
return "";
|
|
2959
2965
|
}
|
|
2960
|
-
}
|
|
2961
|
-
if(_render === undefined || _render === null) return v1;
|
|
2962
|
-
if(isArray(_render)){
|
|
2963
|
-
return _render.join(arrayValueSeparator)
|
|
2964
|
-
} else if(isObj(_render)){
|
|
2965
|
-
return "";
|
|
2966
|
-
}
|
|
2967
2966
|
}
|
|
2968
|
-
return _render
|
|
2969
2967
|
}
|
|
2968
|
+
return _render
|
|
2970
2969
|
}
|
|
2971
2970
|
/*** retourne le rendu d'une cellule de la ligne du tableau
|
|
2972
2971
|
@parm, rowData, object, la ligne à afficher le rendu du contenu
|