@fto-consult/expo-ui 2.26.3 → 2.26.5

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.26.3",
3
+ "version": "2.26.5",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1102,7 +1102,7 @@ class DropdownComponent extends AppComponent {
1102
1102
  let {content} = node;
1103
1103
  const style = _isSelected ? {color:selectedColor,fontWeight:'bold'} : null;
1104
1104
  if(typeof (content) ==="string"){
1105
- content = <Label {...itemProps} style={[itemProps.style,styles.item,style]}>{content}</Label>
1105
+ content = <Label splitText {...itemProps} style={[itemProps.style,styles.item,style]}>{content}</Label>
1106
1106
  }
1107
1107
  const testID = "RN_DropdownItem_"+key;
1108
1108
  const select = !_isSelected;
@@ -397,7 +397,7 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
397
397
  const _isSelected = isSelected(value,index);
398
398
  const style = _isSelected ? {color:selectedColor,fontWeight:'bold'} : null;
399
399
  if(typeof (content) ==="string"){
400
- content = <Label testID={tID} {...itemProps} style={[itemProps.style,style]}>{content}</Label>
400
+ content = <Label splitText testID={tID} {...itemProps} style={[itemProps.style,style]}>{content}</Label>
401
401
  }
402
402
  return (
403
403
  <React.Fragment key={index}>
@@ -115,6 +115,12 @@ class SwiperComponent extends React.Component {
115
115
  return {
116
116
  onPanResponderTerminationRequest: () => false,
117
117
  onMoveShouldSetResponderCapture: () => true,
118
+ /***
119
+ * Disable panResponder on chidld of vie
120
+ * @see : https://stackoverflow.com/questions/45810262/how-to-disable-panresponder-on-child-component-react-native
121
+ *
122
+ */
123
+ onStartShouldSetPanResponderCapture: (evt, gestureState) => this.props.stopChildrenEventPropagation !== false ? true : false,
118
124
  onMoveShouldSetPanResponderCapture: (e, gestureState) => {
119
125
  const { gesturesEnabled, vertical, minDistanceToCapture } = this.props;
120
126
 
@@ -382,7 +388,12 @@ SwiperComponent.propTypes = {
382
388
  springConfig: PropTypes.object,
383
389
  minDistanceToCapture: PropTypes.number, // inside ScrollView
384
390
  minDistanceForAction: PropTypes.number,
385
-
391
+ /***
392
+ *
393
+ if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.
394
+ * @see : https://stackoverflow.com/questions/45810262/how-to-disable-panresponder-on-child-component-react-native
395
+ */
396
+ stopChildrenEventPropagation : PropTypes.bool,
386
397
  onAnimationStart: PropTypes.func,
387
398
  onAnimationEnd: PropTypes.func,
388
399
  onIndexChanged: PropTypes.func,
@@ -382,6 +382,8 @@ export default class TableDataScreenComponent extends FormDataScreen{
382
382
  let {tabProps,firstTabProps,tabsProps,withScrollView} = restProps;
383
383
  let testID = this.testIDProp;
384
384
  tabsProps = defaultObj(tabsProps);
385
+ tabsProps.tabContentProps = defaultObj(tabsProps.tabContentProps);
386
+ tabsProps.tabContentProps.stopChildrenEventPropagation = typeof tabsProps.tabContentProps.stopChildrenEventPropagation =="function" ? tabsProps.tabContentProps.stopChildrenEventPropagation : false;
385
387
  tabsProps.tabItemsProps = defaultObj(tabsProps.tabItemsProps);
386
388
  if(typeof withScrollView =='boolean' && typeof tabsProps.withScrollView !=='boolean'){
387
389
  tabsProps.withScrollView = withScrollView;
@@ -890,7 +892,7 @@ const styles = StyleSheet.create({
890
892
  },
891
893
  screenContent : {
892
894
  padding : 0,
893
- paddingBottom : 50,
895
+ paddingBottom : 10,
894
896
  },
895
897
  screenContentWithHeader : {
896
898
  marginTop : 0,
@@ -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} key={key}>
47
+ <Tab.Item testID={testID+"_Item_"+key} label={label} {...tabP} style={[{paddingBottom:50},tabP.style]} key={key}>
48
48
  {children}
49
49
  </Tab.Item>
50
50
  )