@fto-consult/expo-ui 2.24.4 → 2.24.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": "2.24.4",
3
+ "version": "2.24.6",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,6 +11,7 @@ const AppexChartComponent = React.forwardRef(({chartContext,style,options,...pro
11
11
  chartContext.current.render();
12
12
  React.setRef(ref,chartContext.current)
13
13
  return ()=>{
14
+ React.setRef(ref,chartContext.current)
14
15
  destroyChart(chartContext.current);
15
16
  }
16
17
  },[]);
@@ -25,8 +25,8 @@ const ChartComponent = React.forwardRef(({options,style,height,width,chartId:cus
25
25
  options.chart = defaultObj(options.chart);
26
26
  const chartIdRef = React.useRef(options.chart.id,customChartID,uniqid("chart-id"));
27
27
  const chartId = chartIdRef.current;
28
- width = options.chart.width = defaultVal(options.chart.width,width);
29
- height = options.chart.height = defaultVal(options.chart.height,height)
28
+ options.chart.width = defaultVal(options.chart.width,width);
29
+ options.chart.height = defaultVal(options.chart.height,height,350)
30
30
  options.chart.id = chartId;
31
31
  testID = defaultStr(testID,"RN_ChartComponent");
32
32
  React.useEffect(()=>{
@@ -237,7 +237,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
237
237
  containerProps : customContainerProps,
238
238
  formProps : customFormProps,
239
239
  newElementLabel,
240
- prepareFields,
240
+ prepareField,
241
241
  ...rest
242
242
  } = getScreenProps(props);
243
243
  const table = this.table;
@@ -287,12 +287,12 @@ export default class TableDataScreenComponent extends FormDataScreen{
287
287
  extendObj(true,fields,customFields);
288
288
  }
289
289
  ///on effectue une mutator sur le champ en cours de modification
290
- if(typeof prepareFields =='function'){
290
+ if(typeof prepareField =='function'){
291
291
  Object.map(fields,(field,i,counterIndex)=>{
292
292
  if(!isObj(field)) return;
293
293
  const name = defaultStr(field.field,i) || "";
294
294
  const isPrimary = this.primaryKeyFields[name] && true || false;
295
- const f = prepareFields({field,isUpdate:isUpdated,name,index:i,counterIndex,isPrimary,fields,contex:this,data,datas,currentIndex,isUpdated,tableName,table});
295
+ const f = prepareField({field,isUpdate:isUpdated,name,index:i,counterIndex,isPrimary,fields,contex:this,data,datas,currentIndex,isUpdated,tableName,table});
296
296
  if(f === false) {
297
297
  delete fields[i];
298
298
  }
@@ -339,10 +339,6 @@ export default class TableDataScreenComponent extends FormDataScreen{
339
339
  archivedPermsFilter : this.archivedPermsFilter.bind(this),
340
340
  onPressCopyToClipboard : this.copyToClipboard.bind(this)
341
341
  }
342
- ///modifie le container par défaut de fasson à définir la bonne date pour les champs de type date
343
- if(isObj(fields.date)){
344
- fields.date.defaultValue = new Date();
345
- }
346
342
  if(isUpdated){
347
343
  fields.approved = this.isApprovable()? {
348
344
  text : 'Approuvé',
@@ -836,7 +832,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
836
832
 
837
833
  TableDataScreenComponent.propTypes = {
838
834
  ...defaultObj(FormData.propTypes),
839
- prepareFields : PropTypes.func,//La fonction permettant de faire des mutations sur le champ field à passer au formulaire form. si elle retourne false alors la field ne sera pas pris een compte
835
+ prepareField : PropTypes.func,//La fonction permettant de faire des mutations sur le champ field à passer au formulaire form. si elle retourne false alors la field ne sera pas pris een compte
840
836
  table : PropTypes.shape({
841
837
  tableName : PropTypes.string,
842
838
  table : PropTypes.string,