@fto-consult/expo-ui 6.73.0 → 6.73.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": "6.73.
|
3
|
+
"version": "6.73.1",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^3.60.
|
74
|
+
"@fto-consult/common": "^3.60.3",
|
75
75
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
76
76
|
"@react-native-async-storage/async-storage": "1.18.2",
|
77
77
|
"@react-native-community/datetimepicker": "7.2.0",
|
@@ -122,8 +122,6 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
122
122
|
}
|
123
123
|
canMakePhoneCall = defaultBool(canMakePhoneCall,table.canMakePhoneCall);
|
124
124
|
makePhoneCallProps = isValidMakePhoneCallProps(makePhoneCallProps) && makePhoneCallProps || isValidMakePhoneCallProps(rest.makePhoneCallProps) && rest.makePhoneCallProps || isValidMakePhoneCallProps(table.makePhoneCallProps) && table.makePhoneCallProps || {};
|
125
|
-
const isExportable = !!Auth.isTableDataAllowed({table:tableName,action:'export'});
|
126
|
-
rest.exportable = isExportable;
|
127
125
|
rowKey = defaultStr(rowKey,table.rowKey,table.primaryKeyColumnName);
|
128
126
|
const title = React.isValidElement(customTitle,true) && customTitle || defaultStr(table.label,table.text)
|
129
127
|
columns = table.fields;
|
@@ -267,9 +267,8 @@ const TableDataSelectField = React.forwardRef(({foreignKeyColumn,foreignKeyLabel
|
|
267
267
|
const showAdd = React.useMemo(()=>{
|
268
268
|
if(isFilter || !foreignKeyTable) return false;
|
269
269
|
if(typeof canShowAdd ==='function'){
|
270
|
-
return canShowAdd({...props,table:foreignKeyTable,foreignKeyColumn,foreignKeyLabel,sortDir,foreignKeyTableObj:fKeyTable,foreignKeyTable})
|
271
|
-
}
|
272
|
-
if(Auth[isStructData?"isStructDataAllowed":"isTableDataAllowed"]({table:foreignKeyTable,action:'create'})){
|
270
|
+
return !!canShowAdd({...props,table:foreignKeyTable,foreignKeyColumn,foreignKeyLabel,sortDir,foreignKeyTableObj:fKeyTable,foreignKeyTable})
|
271
|
+
} else if(Auth[isStructData?"isStructDataAllowed":"isTableDataAllowed"]({table:foreignKeyTable,action:'create'})){
|
273
272
|
return !!defaultVal(customShowAdd,true);
|
274
273
|
}
|
275
274
|
return false;
|
@@ -36,8 +36,10 @@ const TableLinKComponent = React.forwardRef((props,ref)=>{
|
|
36
36
|
const pointerEvents = disabled || readOnly ? 'none' : 'auto';
|
37
37
|
const onPressLink = (event)=>{
|
38
38
|
React.stopEventPropagation(event);
|
39
|
-
if((isNonNullString(perm)
|
40
|
-
return;
|
39
|
+
if((isNonNullString(perm))){
|
40
|
+
if(!Auth.isAllowedFromString(perm))return;
|
41
|
+
} else {
|
42
|
+
if(!Auth[isStructData?"isStructDataAllowed":"isTableDataAllowed"]({table:foreignKeyTable,action:'read'})) return;
|
41
43
|
}
|
42
44
|
const args = {...React.getOnPressArgs(event),...rest,type,columnType:type,isStructData,fetch,foreignKeyTable,foreignKeyColumn,data,id,value:id};
|
43
45
|
let r = typeof onPress =='function'? onPress(args) : undefined;
|
@@ -35,7 +35,9 @@ export default function DatabaseStatisticScreen ({withScreen,fetchDataProps,item
|
|
35
35
|
if(table.databaseStatistic === false || table.databaseStatistics === false) return null;
|
36
36
|
const chartAllowedPerm = defaultStr(table.chartAllowedPerm);
|
37
37
|
const testID = "RN_DatabaseStatisticsCell_"+index;
|
38
|
-
if(
|
38
|
+
if(chartAllowedPerm){
|
39
|
+
if(!Auth.isAllowedFromStr(chartAllowedPerm)) return null;
|
40
|
+
} else if((!Auth.isTableDataAllowed({table:tableName}))) return null;
|
39
41
|
content.push(<Cell elevation = {5} withSurface mobileSize={12} desktopSize={3} tabletSize={6} {...contentProps} testID={testID} key = {index} >
|
40
42
|
<Surface testID = {testID+"_Surface"} elevation = {5} {...itemContainerProps} style={[theme.styles.w100,styles.itemContainer,itemContainerProps.style]}>
|
41
43
|
<DatabaseStatistic
|