@fto-consult/expo-ui 6.71.5 → 6.71.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.71.5",
3
+ "version": "6.71.7",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -4,7 +4,6 @@ import PropTypes from "prop-types";
4
4
  import View from "$ecomponents/View";
5
5
  import theme from "$theme";
6
6
  import {defaultStr,defaultObj,defaultNumber} from "$cutils";
7
- import APP from "$capp/instance";
8
7
  import ActivityIndicator from "$ecomponents/ActivityIndicator";
9
8
 
10
9
  /***
@@ -279,14 +279,14 @@ class SwiperComponent extends React.Component {
279
279
  contentContainerProps = defaultObj(contentContainerProps);
280
280
  swipeAreaProps = defaultObj(swipeAreaProps);
281
281
  contentProps = defaultObj(contentProps);
282
- withScrollView = typeof withScrollView ==='boolean'? withScrollView : false;
282
+ withScrollView = true;//typeof withScrollView ==='boolean'? withScrollView : false;
283
283
  const Wrapper = withScrollView ? ScrollView : React.Fragment;
284
284
  const wrapperProps = withScrollView ? Object.assign({},scrollViewProps) : {};
285
285
  testID = defaultStr(testID,'RN_SwiperComponent');
286
286
  childrenProps = Array.isArray(childrenProps)? childrenProps : [];
287
287
  const isReady = customHeight > 40 ? true : false;
288
288
  const autoHeight = !!this.props.autoHeight;
289
- const height = autoHeight ? undefined : !isReady ? WIDTH_HEIGHT : customHeight;
289
+ const height = autoHeight ? this.state.height : !isReady ? WIDTH_HEIGHT : customHeight;
290
290
  if(withScrollView){
291
291
  if(typeof wrapperProps.showsVerticalScrollIndicator !=='boolean'){
292
292
  wrapperProps.showsVerticalScrollIndicator = !isNative;
@@ -373,6 +373,7 @@ class SwiperComponent extends React.Component {
373
373
 
374
374
  SwiperComponent.propTypes = {
375
375
  vertical: PropTypes.bool,
376
+ autoHeight : PropTypes.bool,//cette prop permet de redimensionner automatiquement le tab sur la page, utilise lorsque l'on souhaite que le tab aucupe toute les page
376
377
  activeIndex: PropTypes.number,
377
378
  autoHeight : PropTypes.bool,//si la valeur de la taille des éléments sera automatiquement réajusté
378
379
  loop: PropTypes.bool,
@@ -458,9 +459,9 @@ const styles = {
458
459
  left: 0,
459
460
  width:vertical ? width : width * count,
460
461
  flexDirection: vertical ? 'column' : 'row',
461
- }),typeof height ==='number'? (vertical ? height * count : height) : undefiend,autoHeight),
462
+ }),typeof height ==='number'? (vertical ? height * count : height) : undefined,autoHeight),
462
463
  scrollViewContentContainer : {
463
- paddingBottom : 40,
464
+ paddingBottom : 0,
464
465
  flex : 1,
465
466
  },
466
467
  preloaderContainer : {
@@ -1,15 +1,8 @@
1
1
  import React from "$react";
2
- import {Vertical as AutoSizeVertical} from "$ecomponents/AutoSizer";
3
2
  import List from "$ecomponents/List/Virtuoso";
4
- import {defaultStr,isObj,defaultObj} from "$cutils";
5
3
 
6
- const AutoSizeVerticalList = React.forwardRef(({testID,autoSizerProps,...props},ref)=>{
7
- testID = defaultStr(testID,"RN_AutoSizeVerticalListComponent")
8
- autoSizerProps = defaultObj(autoSizerProps);
9
- return <List {...props} style={[props.style]} ref={ref}/>;
10
- return <AutoSizeVertical withPadding={false} testID={testID+"_AutoSizerVertical"} {...autoSizerProps} >
11
- <List {...props} style={[props.style]} ref={ref}/>
12
- </AutoSizeVertical>
4
+ const AutoSizeVerticalList = React.forwardRef((props,ref)=>{
5
+ return <List {...props} ref={ref}/>;
13
6
  })
14
7
 
15
8
  AutoSizeVerticalList.displayName = "AutoSizeVerticalListComponent";
@@ -22,7 +22,7 @@ export default function TableRowComponent({cells,rowKey,rowData,index,...rest}){
22
22
  }
23
23
  return renderSectionHeader({isSectionListHeader:true,renderSectionListHeaderOnFirstCell:true,
24
24
  sectionListHeaderContainerProps : {
25
- style : {position:"relative",paddingLeft:"10px",paddingRight:"10px"}
25
+ style : {position:"relative",paddingLeft:10,paddingRight:10}
26
26
  },
27
27
  sectionListHeaderProps:{className:"table-section-list-header",style:styles.sectionListHeaderAbsolute,testID:"RN_TableComponentSectionListHeader"}
28
28
  ,...nativeProps,rowData,item:rowData,index,rowIndex:index,isTable:true,rowKey})
@@ -15,7 +15,7 @@ const styles = StyleSheet.create({
15
15
  container : {
16
16
  width : '100%',
17
17
  minHeight : 300,
18
- paddingBottom : 10,
18
+ paddingBottom : 0,
19
19
  paddingLeft : 0,
20
20
  paddingRight : 0,
21
21
  flex : 1,
@@ -13,7 +13,6 @@ import {canMakePhoneCall, makePhoneCall as makePCall} from "$app/makePhoneCall";
13
13
  import copyToClipboard from "$app/clipboard";
14
14
  import {isMobileOrTabletMedia} from "$platform/dimensions";
15
15
  import Tab from "$ecomponents/Tab";
16
- import Surface from "$ecomponents/Surface";
17
16
  import View from "$ecomponents/View";
18
17
  import {goBack as navGoBack} from "$cnavigation";
19
18
  import {renderTabsContent,renderActions} from "./utils";
@@ -25,6 +24,7 @@ import {isDocEditing,checkPrimaryKey} from "$ecomponents/Form";
25
24
  import i18n from "$i18n";
26
25
  import fetch from "$capi/fetch";
27
26
  import appConfig from "$capp/config";
27
+ import {Vertical} from "$ecomponents/AutoSizer";
28
28
 
29
29
 
30
30
  const HIDE_PRELOADER_TIMEOUT = 300;
@@ -416,14 +416,13 @@ export default class TableDataScreenComponent extends FormDataScreen{
416
416
  restProps.tabProps = tabProps = defaultObj(tabProps);
417
417
  const tabs = this.renderTabs(restProps);
418
418
  const tabKey = this.getTabsKey();
419
- const isMobile = isMobileOrTabletMedia();
419
+ const isMobOrTab = isMobileOrTabletMedia();
420
+ tabsProps.tabContentProps.autoHeight = typeof tabsProps.tabContentProps.autoHeight =="boolean"? tabsProps.tabContentProps.autoHeight : isMobOrTab;
420
421
  const contentProps = restProps.contentProps;
421
- const elevation = restProps.elevation;
422
- const renderingTabsProps = {tabs,data:this.getCurrentData(),isMobile,sessionName:this.getSessionName(),props:restProps,tabProps,tabsProps,context,tabKey};
422
+ const renderingTabsProps = {tabs,data:this.getCurrentData(),isMobile:isMobOrTab,sessionName:this.getSessionName(),props:restProps,tabProps,tabsProps,context,tabKey};
423
423
  const hasTabs = Object.size(tabs,true);
424
424
  let mainContent = undefined;
425
425
  testID = defaultStr(testID,"RN_TableDataScreenItem_"+restProps.tableName);
426
- const isMobOrTab = isMobileOrTabletMedia();
427
426
  firstTabProps = extendObj({},tabProps,firstTabProps);
428
427
  if(hasTabs){
429
428
  if(isMobOrTab){
@@ -441,7 +440,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
441
440
  contentProps.style = [contentProps.style,styles.noMargin,styles.noPadding,styles.content]
442
441
  mainContent = ct;
443
442
  } else {
444
- mainContent = <View {...contentProps} testID={testID+"_ContentContainer"} style={[styles.container,styles.noPadding,contentProps.style]}>
443
+ mainContent = <Vertical {...contentProps} testID={testID+"_ContentContainer"} style={[styles.container,styles.noPadding,contentProps.style]}>
445
444
  <ScrollView testID={testID+"_MainContentScrollView"} contentProps={{style:theme.styles.p1}}>
446
445
  <View testID={testID+"_ContentHeader"} style={[styles.screenContent,theme.styles.p1,header?styles.screenContentWithHeader:null]}>
447
446
  {header}
@@ -451,7 +450,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
451
450
  {ct}
452
451
  </View> : null}
453
452
  </ScrollView>
454
- </View>
453
+ </Vertical>
455
454
  }
456
455
  } else {
457
456
  mainContent = <ScrollView testID={testID+"_MainContentScrollViewWithoutTab"}>
@@ -44,7 +44,7 @@ export const renderTabsContent = ({tabs,context,data,sessionName,isMobile,props,
44
44
  }
45
45
  if(React.isValidElement(children)){
46
46
  tabsArr.push(
47
- <Tab.Item testID={testID+"_Item_"+key} label={label} {...tabP} style={[{paddingBottom:50},tabP.style]} key={key}>
47
+ <Tab.Item testID={testID+"_Item_"+key} label={label} {...tabP} key={key}>
48
48
  {children}
49
49
  </Tab.Item>
50
50
  )