@fto-consult/expo-ui 5.7.5 → 5.7.6
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.7.
|
|
3
|
+
"version": "5.7.6",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
},
|
|
59
59
|
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@emotion/native": "^11.10.
|
|
61
|
+
"@emotion/native": "^11.10.6",
|
|
62
62
|
"@expo/html-elements": "^0.2.0",
|
|
63
63
|
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^3.10.
|
|
64
|
+
"@fto-consult/common": "^3.10.55",
|
|
65
65
|
"@gorhom/portal": "^1.0.14",
|
|
66
66
|
"@react-native-async-storage/async-storage": "^1.17.11",
|
|
67
67
|
"@react-native-community/datetimepicker": "^6.7.3",
|
|
68
68
|
"@react-native-community/netinfo": "^9.3.7",
|
|
69
69
|
"@react-native/assets-registry": "^0.72.0",
|
|
70
|
-
"@react-navigation/native": "^6.1.
|
|
71
|
-
"@react-navigation/native-stack": "^6.9.
|
|
70
|
+
"@react-navigation/native": "^6.1.6",
|
|
71
|
+
"@react-navigation/native-stack": "^6.9.12",
|
|
72
72
|
"@shopify/flash-list": "^1.4.0",
|
|
73
73
|
"apexcharts": "^3.37.2",
|
|
74
74
|
"expo": "^48.0.10",
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"expo-web-browser": "~12.1.1",
|
|
84
84
|
"file-saver": "^2.0.5",
|
|
85
85
|
"fs-extra": "^11.1.1",
|
|
86
|
-
"google-libphonenumber": "^3.2.
|
|
86
|
+
"google-libphonenumber": "^3.2.32",
|
|
87
87
|
"htmlparser2-without-node-native": "^3.9.2",
|
|
88
88
|
"process": "^0.11.10",
|
|
89
89
|
"prop-types": "^15.8.1",
|
|
90
90
|
"react": "^18.2.0",
|
|
91
|
-
"react-content-loader": "^6.2.
|
|
91
|
+
"react-content-loader": "^6.2.1",
|
|
92
92
|
"react-dom": "^18.2.0",
|
|
93
93
|
"react-native": "^0.71.3",
|
|
94
94
|
"react-native-big-list": "^1.6.0",
|
|
@@ -774,12 +774,15 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
774
774
|
}
|
|
775
775
|
const footers = this.getFootersFields(true);
|
|
776
776
|
let isAccordion = this.isAccordion();
|
|
777
|
+
const rowKeysColumns = {};
|
|
777
778
|
Object.mapToArray(columns,(headerCol1,headerIndex)=>{
|
|
778
779
|
if(!isObj(headerCol1)) return;
|
|
779
|
-
const
|
|
780
|
-
if(isAccordion && headerCol.accordion === false) return null;
|
|
781
|
-
let header = {...headerCol};
|
|
780
|
+
const header = Object.clone(headerCol1);
|
|
782
781
|
header.field = defaultStr(header.field, headerIndex)
|
|
782
|
+
if(header.primaryKey){
|
|
783
|
+
rowKeysColumns[header.field] = true;
|
|
784
|
+
}
|
|
785
|
+
if(isAccordion && header.accordion === false) return null;
|
|
783
786
|
header.type = defaultStr(header.jsType,header.type,"text").toLowerCase();
|
|
784
787
|
if(header.type.contains("date")){
|
|
785
788
|
this.dateFields[header.field] = header;
|
|
@@ -799,7 +802,8 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
799
802
|
if(!this.hasColumnsHalreadyInitialized){
|
|
800
803
|
this.initColumnsCallback({...header,colIndex,columnField:header.field});
|
|
801
804
|
}
|
|
802
|
-
})
|
|
805
|
+
});
|
|
806
|
+
this.rowKeysColumns = Object.keys(rowKeysColumns);
|
|
803
807
|
return footers;
|
|
804
808
|
}
|
|
805
809
|
getFootersFields(init){
|
|
@@ -3436,16 +3440,30 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
3436
3440
|
isVirtual(){
|
|
3437
3441
|
return false;
|
|
3438
3442
|
}
|
|
3439
|
-
|
|
3440
3443
|
getRowKey(row,rowIndex){
|
|
3441
3444
|
let k = rowIndex;
|
|
3445
|
+
if(isFunction(this.props.getRowKey)){
|
|
3446
|
+
k = this.props.getRowKey({row,rowData:row,data:row,rowIndex,item:row,index:rowIndex,context:this});
|
|
3447
|
+
if(typeof k =='string' && k || typeof k =='number'){
|
|
3448
|
+
return k;
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3442
3451
|
const rowKey = this.props.rowKey;
|
|
3452
|
+
const rKey = Array.isArray(this.rowKeysColumns) && this.rowKeysColumns.length ? this.rowKeysColumns : null;
|
|
3453
|
+
if(rKey){
|
|
3454
|
+
const rr = React.getKeyFromObj(row,rKey);
|
|
3455
|
+
if(rr){
|
|
3456
|
+
return rr;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
const rkey = React.getKeyFromObj(row,rowIndex,rowKey);
|
|
3460
|
+
if(rkey){
|
|
3461
|
+
return rkey;
|
|
3462
|
+
}
|
|
3443
3463
|
if(isNonNullString(rowKey) && isObj(row) && (isNonNullString(row[rowKey]) || isDecimal(row[rowKey]))){
|
|
3444
3464
|
return row[rowKey];
|
|
3445
3465
|
}
|
|
3446
|
-
if(
|
|
3447
|
-
k = this.props.getRowKey({row,rowData:row,data:row,rowIndex,item:row,index:rowIndex,context:this});
|
|
3448
|
-
} else if(isObj(row)){
|
|
3466
|
+
if(isObj(row)){
|
|
3449
3467
|
return React.getKey(row,rowIndex);
|
|
3450
3468
|
} else k = rowIndex;
|
|
3451
3469
|
if(isObj(row) && isNonNullString(row.rowKey)){
|
|
@@ -324,7 +324,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
324
324
|
const txt = defaultStr(text).trim();
|
|
325
325
|
if((txt.length <=1 && !error)){
|
|
326
326
|
if(validType.contains("unique") || validType.contains("required")){
|
|
327
|
-
callOnChange(txt);
|
|
327
|
+
callOnChange(toCase(txt));
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
if(props.onBlur){
|
|
@@ -388,9 +388,10 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
|
|
391
|
+
const tVal = toCase(text2);
|
|
392
|
+
if(tVal !== text){
|
|
392
393
|
setText(text2,true);
|
|
393
|
-
callOnChange(
|
|
394
|
+
callOnChange(tVal);
|
|
394
395
|
}
|
|
395
396
|
},
|
|
396
397
|
selection,
|
|
@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
|
|
|
5
5
|
import {defaultObj,defaultStr,defaultNumber,defaultBool} from "$cutils";
|
|
6
6
|
import View from "$ecomponents/View";
|
|
7
7
|
import { useNavigation} from '$cnavigation';
|
|
8
|
-
import Fab from "$
|
|
8
|
+
import Fab from "$layouts/Fab";
|
|
9
9
|
import APP from "$capp";
|
|
10
10
|
import AppBar,{createAppBarRef} from "$elayouts/AppBar";
|
|
11
11
|
import ErrorBoundary from "$ecomponents/ErrorBoundary";
|
|
@@ -205,7 +205,7 @@ export function renderActions({context,isUpdate,newElementLabel,makePhoneCallPr
|
|
|
205
205
|
flat : true,
|
|
206
206
|
onPress : createCallback({context:self,action:'makePhoneCall',force:true,callback:onPressToMakePhoneCall})
|
|
207
207
|
}:null,
|
|
208
|
-
copyToClipboard : (isUpdate)?{
|
|
208
|
+
copyToClipboard : (false && isUpdate)?{
|
|
209
209
|
text : 'Copier',
|
|
210
210
|
icon : COPY_ICON,
|
|
211
211
|
title : 'Copier',
|
|
@@ -63,7 +63,9 @@ export default function ScreenWrapperNavComponent(_props){
|
|
|
63
63
|
},[]);
|
|
64
64
|
setScreenOptions(options);
|
|
65
65
|
const allowDrawer = typeof options.allowDrawer ==='boolean'? options.allowDrawer : typeof options.withDrawer =='boolean'? options.withDrawer : typeof Screen.allowDrawer =='boolean'? Screen.allowDrawer : typeof Screen.withDrawer =='boolean' ? Screen.withDrawer : Screen.isModalScreen == true ? false : true;
|
|
66
|
+
const withFab = typeof options.withFab ==='boolean' ? options.withFab : typeof Screen.withFab =='boolean'? Screen.withFab : allowDrawer;
|
|
66
67
|
return <Screen
|
|
68
|
+
withFab = {withFab}
|
|
67
69
|
{...rest}
|
|
68
70
|
key = {sanitizedName}
|
|
69
71
|
authRequired={authRequired||allowDrawer}
|