@fto-consult/expo-ui 6.31.5 → 6.31.7
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 +2 -2
- package/src/components/Dropdown/index.js +2 -3
- package/src/components/Form/Fields/SelectField.js +2 -0
- package/src/components/Form/Fields/SelectTableData/Component.js +3 -0
- package/src/components/Form/FormData/FormData.js +13 -1
- package/src/layouts/Screen/TableData.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.31.
|
|
3
|
+
"version": "6.31.7",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@expo/html-elements": "^0.5.1",
|
|
69
69
|
"@expo/vector-icons": "^13.0.0",
|
|
70
70
|
"@faker-js/faker": "^8.0.2",
|
|
71
|
-
"@fto-consult/common": "^3.32.
|
|
71
|
+
"@fto-consult/common": "^3.32.9",
|
|
72
72
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
73
73
|
"@react-native-async-storage/async-storage": "1.18.2",
|
|
74
74
|
"@react-native-community/datetimepicker": "7.2.0",
|
|
@@ -259,9 +259,6 @@ class DropdownComponent extends AppComponent {
|
|
|
259
259
|
for(let valueKey in selectedValuesKeys){
|
|
260
260
|
if(isObj(valuesKeys[valueKey])){
|
|
261
261
|
const node = valuesKeys[valueKey];
|
|
262
|
-
/*if(this.props.dynamicContent){
|
|
263
|
-
node = this.getNode({...node,callArgs:this.getCallArgs({...node,items:this.getItemsData()})});
|
|
264
|
-
}*/
|
|
265
262
|
const text = node.text;
|
|
266
263
|
if(!this.canHandleMultiple){
|
|
267
264
|
sDText = text;
|
|
@@ -370,6 +367,7 @@ class DropdownComponent extends AppComponent {
|
|
|
370
367
|
if(!selectedValuesKeys[keyNode.valueKey]){
|
|
371
368
|
newSelected.push(cVal);
|
|
372
369
|
hasChanged = true;
|
|
370
|
+
selectedValuesKeys[keyNode.valueKey] = true;
|
|
373
371
|
}
|
|
374
372
|
}
|
|
375
373
|
} else {
|
|
@@ -378,6 +376,7 @@ class DropdownComponent extends AppComponent {
|
|
|
378
376
|
if(!selectedValuesKeys[keyNode.valueKey]){
|
|
379
377
|
newSelected = value;
|
|
380
378
|
hasChanged = true;
|
|
379
|
+
selectedValuesKeys[keyNode.valueKey] = true;
|
|
381
380
|
}
|
|
382
381
|
}
|
|
383
382
|
if(hasChanged){
|
|
@@ -86,6 +86,9 @@ const TableDataSelectField = React.forwardRef(({foreignKeyColumn,isStructData,ge
|
|
|
86
86
|
if(fetchOptions.fields !== 'all' && (!Array.isArray(fetchOptions.fields) || !fetchOptions.fields.length)){
|
|
87
87
|
fetchOptions.fields = defaultFields;
|
|
88
88
|
}
|
|
89
|
+
if(fetchOptions.fields =='all'){
|
|
90
|
+
delete fetchOptions.fields;
|
|
91
|
+
}
|
|
89
92
|
const foreignKeyColumnValue = props.defaultValue;
|
|
90
93
|
let isDisabled = defaultBool(props.disabled,props.readOnly,false);
|
|
91
94
|
if(!isDisabled && props.readOnly === true){
|
|
@@ -37,7 +37,10 @@ export default class FormDataComponent extends AppComponent{
|
|
|
37
37
|
getField(fieldName){
|
|
38
38
|
return getFormField(this.getFormName(),fieldName)
|
|
39
39
|
}
|
|
40
|
-
getData(){
|
|
40
|
+
getData(...args){
|
|
41
|
+
return this.getFormData(...args);
|
|
42
|
+
}
|
|
43
|
+
getFormData(){
|
|
41
44
|
const form = this.getForm();
|
|
42
45
|
if(form){
|
|
43
46
|
return form.getData();
|
|
@@ -64,6 +67,15 @@ export default class FormDataComponent extends AppComponent{
|
|
|
64
67
|
reset(args){
|
|
65
68
|
return null;
|
|
66
69
|
}
|
|
70
|
+
isValid(...args){
|
|
71
|
+
return this.isFormValid(...args);
|
|
72
|
+
}
|
|
73
|
+
isFormValid(...args){
|
|
74
|
+
return this.getForm()?.isValid(...args);
|
|
75
|
+
}
|
|
76
|
+
getErrorText(){
|
|
77
|
+
return this.getForm()?.getErrorText();
|
|
78
|
+
}
|
|
67
79
|
getAppBarActionsProps(props){
|
|
68
80
|
let {data,onCancel,perm,beforeSaveArgumentsMutator,beforeSave,actions,saveDataMutator,...rest} = (defaultObj(props,this.props));
|
|
69
81
|
const onSave = typeof props.onSave ==='function'? props.onSave : this.props.onSave ;
|
|
@@ -211,6 +211,14 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
211
211
|
}
|
|
212
212
|
return a;
|
|
213
213
|
}
|
|
214
|
+
isUpdate(...args){
|
|
215
|
+
return this.isDocUpdate(...args);
|
|
216
|
+
}
|
|
217
|
+
isDocUpdate(){
|
|
218
|
+
const t = this.currentRenderingProps;
|
|
219
|
+
if(isObj(t) && 'isUpdate' in t) return t.isUpdate;
|
|
220
|
+
return this.isDocEditing(this.getCurrentData());
|
|
221
|
+
}
|
|
214
222
|
getComponentProps(props){
|
|
215
223
|
const table = this.table;
|
|
216
224
|
const {datas,currentIndex,data} = this.state;
|