@fto-consult/expo-ui 6.9.0 → 6.10.0
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.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"@react-navigation/native-stack": "^6.9.13",
|
|
74
74
|
"@shopify/flash-list": "1.4.3",
|
|
75
75
|
"apexcharts": "^3.41.0",
|
|
76
|
-
"expo": "^49.0.
|
|
76
|
+
"expo": "^49.0.5",
|
|
77
77
|
"expo-camera": "~13.4.2",
|
|
78
78
|
"expo-clipboard": "~4.3.0",
|
|
79
79
|
"expo-font": "~11.4.0",
|
|
80
|
-
"expo-image-picker": "~14.3.
|
|
80
|
+
"expo-image-picker": "~14.3.2",
|
|
81
81
|
"expo-linking": "~5.0.2",
|
|
82
82
|
"expo-sqlite": "~11.3.1",
|
|
83
83
|
"expo-status-bar": "~1.6.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"react-dom": "^18.2.0",
|
|
95
95
|
"react-native": "0.72.3",
|
|
96
96
|
"react-native-big-list": "^1.6.1",
|
|
97
|
-
"react-native-blob-util": "^0.18.
|
|
97
|
+
"react-native-blob-util": "^0.18.6",
|
|
98
98
|
"react-native-gesture-handler": "^2.12.0",
|
|
99
99
|
"react-native-iphone-x-helper": "^1.3.1",
|
|
100
100
|
"react-native-mime-types": "^2.4.0",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"react-native-paper-dates": "^0.18.12",
|
|
103
103
|
"react-native-reanimated": "~3.3.0",
|
|
104
104
|
"react-native-safe-area-context": "4.6.3",
|
|
105
|
-
"react-native-screens": "
|
|
105
|
+
"react-native-screens": "~3.22.0",
|
|
106
106
|
"react-native-svg": "13.9.0",
|
|
107
107
|
"react-native-web": "~0.19.6",
|
|
108
108
|
"react-native-webview": "13.2.2",
|
|
109
|
-
"react-virtuoso": "^4.4.
|
|
109
|
+
"react-virtuoso": "^4.4.2",
|
|
110
110
|
"sharp-cli": "^4.1.1",
|
|
111
111
|
"tippy.js": "^6.3.7",
|
|
112
112
|
"websql": "^2.0.3",
|
|
@@ -185,4 +185,4 @@ export const getRowStyle = ({row,bordered,numColumns,rowData,isAccordion,isTable
|
|
|
185
185
|
return style;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
export const willConvertFiltersToSQL = x=>!!appConfig.get("
|
|
188
|
+
export const willConvertFiltersToSQL = x=>!!appConfig.get("convertFiltersToSQL");
|
|
@@ -19,9 +19,9 @@ import useApp from "$econtext/hooks";
|
|
|
19
19
|
* foreignKeyTable : la tableData dans laquelle effectuer les donées de la requêtes
|
|
20
20
|
* foreignKeyLabel : Le libélé dans la table étrangère
|
|
21
21
|
*/
|
|
22
|
-
const TableDataSelectField = React.forwardRef(({foreignKeyColumn,prepareFilters:cPrepareFilters,bindUpsert2RemoveEvents,onAdd,showAdd:customShowAdd,canShowAdd,foreignKeyTable,fetchItemsPath,foreignKeyLabel,foreignKeyLabelIndex,dropdownActions,fields,fetchItems:customFetchItem,convertFiltersToSQL,mutateFetchedItems,onFetchItems,isFilter,isUpdate,isDocEditing,items,onAddProps,fetchOptions,...props},ref)=>{
|
|
22
|
+
const TableDataSelectField = React.forwardRef(({foreignKeyColumn,isStructData,getForeignKeyTable:cGetForeignKeyTable,prepareFilters:cPrepareFilters,bindUpsert2RemoveEvents,onAdd,showAdd:customShowAdd,canShowAdd,foreignKeyTable,fetchItemsPath,foreignKeyLabel,foreignKeyLabelIndex,dropdownActions,fields,fetchItems:customFetchItem,convertFiltersToSQL,mutateFetchedItems,onFetchItems,isFilter,isUpdate,isDocEditing,items,onAddProps,fetchOptions,...props},ref)=>{
|
|
23
23
|
props.data = defaultObj(props.data);
|
|
24
|
-
const {getTableData:
|
|
24
|
+
const {getTableData:appGetForeignKeyTable,getStructData} = useApp();
|
|
25
25
|
if(!foreignKeyColumn && isNonNullString(props.field)){
|
|
26
26
|
foreignKeyColumn = props.field;
|
|
27
27
|
}
|
|
@@ -32,6 +32,7 @@ const TableDataSelectField = React.forwardRef(({foreignKeyColumn,prepareFilters:
|
|
|
32
32
|
foreignKeyLabel = foreignKeyLabel.trim();
|
|
33
33
|
foreignKeyLabel = foreignKeyLabel.ltrim("[").rtrim("]").split(",");
|
|
34
34
|
}
|
|
35
|
+
const getForeignKeyTable = typeof cGetForeignKeyTable =='function'? cGetForeignKeyTable : isStructData ? getStructData: appGetForeignKeyTable;
|
|
35
36
|
convertFiltersToSQL = defaultVal(convertFiltersToSQL,willConvertFiltersToSQL());
|
|
36
37
|
const foreignKeyTableStr = defaultStr(foreignKeyTable,props.tableName,props.table);
|
|
37
38
|
if(typeof getForeignKeyTable !=='function'){
|
|
@@ -462,7 +462,7 @@ export default class FormListComponent extends AppComponent {
|
|
|
462
462
|
renderAvatar = defaultFunc(renderAvatar,x=>null);
|
|
463
463
|
/*** les props de chaque items de la liste */
|
|
464
464
|
itemProps= {...defaultObj(itemProps)}
|
|
465
|
-
const descriptionNumberOfLines = typeof itemProps.
|
|
465
|
+
const descriptionNumberOfLines = typeof itemProps.rows ==='number' && itemProps.rows ? itemProps.rows : 3;
|
|
466
466
|
let counter = -1;
|
|
467
467
|
let is_o = this.isHandlingObject;
|
|
468
468
|
let addIconObj = null;
|
|
@@ -367,7 +367,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
367
367
|
formattedValue,
|
|
368
368
|
displayText,
|
|
369
369
|
parsedValue,
|
|
370
|
-
numberOfLines,
|
|
370
|
+
rows:numberOfLines,
|
|
371
371
|
onChange : ({ nativeEvent: {target, text:text2} }) => {
|
|
372
372
|
if(canValueBeDecimal && (text2 && !text2.isNumber() && !text2.endsWith(".") && !text2.endsWith(","))) {
|
|
373
373
|
return;
|
|
@@ -376,12 +376,23 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
376
376
|
text2 = "0"+text2;
|
|
377
377
|
}
|
|
378
378
|
if(multiline){
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
379
|
+
let hasS = false;
|
|
380
|
+
if(text2){
|
|
381
|
+
const spl = text2.trim().split('\n');
|
|
382
|
+
if(spl.length>1){
|
|
383
|
+
heightRef.current+=MULTIPLE_HEIGHT+(10*(spl.length-1));
|
|
384
|
+
hasS = true;
|
|
385
|
+
setToggle(!toggle);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if(!hasS){
|
|
389
|
+
if(!text2 || text2.length < 30){
|
|
390
|
+
heightRef.current = MULTIPLE_HEIGHT;
|
|
391
|
+
setToggle(!toggle);
|
|
392
|
+
} else if(target.scrollHeight > heightRef.current){
|
|
393
|
+
heightRef.current = Math.max(target.scrollHeight,MULTIPLE_HEIGHT);
|
|
394
|
+
setToggle(!toggle);
|
|
395
|
+
}
|
|
385
396
|
}
|
|
386
397
|
}
|
|
387
398
|
const tVal = toCase(text2);
|
package/src/context/Provider.js
CHANGED
|
@@ -17,6 +17,7 @@ import Login from "$eauth/Login";
|
|
|
17
17
|
getStructData : ()=>{object|array}
|
|
18
18
|
tablesData : {object}, la liste des tables de données
|
|
19
19
|
strucsData : {object}, la liste des données de structures
|
|
20
|
+
convertFiltersToSQL : {boolean}, si les filtres de datagrid ou filtres seront convertis au format SQL
|
|
20
21
|
components : {
|
|
21
22
|
logo : {
|
|
22
23
|
object |
|
|
@@ -31,7 +32,7 @@ import Login from "$eauth/Login";
|
|
|
31
32
|
drawerItems : {object|array|function}, la fonction permettant d'obtenir les items du drawer principal de l'application
|
|
32
33
|
}
|
|
33
34
|
*/
|
|
34
|
-
const Provider = ({children,getTableData,navigation,components,getStructData,tablesData,structsData,...props})=>{
|
|
35
|
+
const Provider = ({children,getTableData,navigation,components,convertFiltersToSQL,getStructData,tablesData,structsData,...props})=>{
|
|
35
36
|
const {extendAppTheme} = appConfig;
|
|
36
37
|
const { theme : pTheme } = useMaterial3Theme();
|
|
37
38
|
navigation = defaultObj(navigation);
|
|
@@ -44,6 +45,9 @@ const Provider = ({children,getTableData,navigation,components,getStructData,tab
|
|
|
44
45
|
getTableData = appConfig.getTable = appConfig.getTableData = getTableOrStructDataCall(tablesData,getTableData);
|
|
45
46
|
getStructData = appConfig.getStructData = getTableOrStructDataCall(structsData,getStructData);
|
|
46
47
|
appConfig.LoginComponent = Login;
|
|
48
|
+
if(convertFiltersToSQL !== undefined){
|
|
49
|
+
appConfig.set("convertFiltersToSQL",convertFiltersToSQL);
|
|
50
|
+
}
|
|
47
51
|
//const colorScheme = useColorScheme();
|
|
48
52
|
appConfig.extendAppTheme = (theme)=>{
|
|
49
53
|
if(!isObj(theme)) return;
|
|
@@ -77,6 +81,7 @@ const Provider = ({children,getTableData,navigation,components,getStructData,tab
|
|
|
77
81
|
value={{
|
|
78
82
|
...props,
|
|
79
83
|
navigation,
|
|
84
|
+
convertFiltersToSQL,
|
|
80
85
|
components : {
|
|
81
86
|
...components,
|
|
82
87
|
loginPropsMutator : (props)=>{
|