@fto-consult/expo-ui 6.58.5 → 6.58.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": "6.58.5",
3
+ "version": "6.58.6",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import {
3
3
  Platform,
4
4
  StyleSheet,
5
- Pressable,
5
+ TouchableWithoutFeedback,
6
6
  View,
7
7
  } from 'react-native';
8
8
  import Label from "$ecomponents/Label";
@@ -83,17 +83,17 @@ const AppbarContent = ({
83
83
 
84
84
  if (onPress) {
85
85
  return (
86
- <Pressable
86
+ <TouchableWithoutFeedback
87
87
  testID={testID+"_Container"}
88
88
  {...containerProps}
89
89
  role={touchableRole}
90
90
  accessibilityTraits={touchableRole}
91
- //accessibilityComponentType="button"
91
+ accessibilityComponentType="button"
92
92
  onPress={onPress}
93
93
  disabled={disabled}
94
94
  >
95
95
  {content}
96
- </Pressable>
96
+ </TouchableWithoutFeedback>
97
97
  );
98
98
  }
99
99
  return content;
@@ -5,11 +5,9 @@ import {
5
5
  Keyboard,
6
6
  PanResponder,
7
7
  StyleSheet,
8
- Pressable,
9
- I18nManager,
10
8
  TouchableWithoutFeedback,
9
+ I18nManager,
11
10
  } from 'react-native';
12
- import { TouchableRipple } from 'react-native-paper';
13
11
  import PropTypes from "prop-types";
14
12
  import View from "$ecomponents/View";
15
13
  import {defaultStr} from "$cutils";
@@ -162,6 +160,7 @@ export default class DrawerLayout extends React.PureComponent {
162
160
  outputRange: [0, 0.7],
163
161
  extrapolate: 'clamp',
164
162
  });
163
+ const animatedOverlayStyles = { opacity: overlayOpacity };
165
164
  const pointerEvents = drawerShown || permanent ? 'auto' : 'none';
166
165
  position = defaultStr(position).toLowerCase();
167
166
  if(position !=='left' && position !=='right'){
@@ -174,19 +173,22 @@ export default class DrawerLayout extends React.PureComponent {
174
173
  return (
175
174
  <View
176
175
  testID = {testID}
177
- style={[styles.mainWrapper,permanent ? styles.mainWrapperPermanent : styles.mainWrapperTemporary]}
176
+ style={{ flex: 1, backgroundColor: 'transparent',flexDirection:permanent?'row':'column'}}
178
177
  {...this._panResponder.panHandlers}
179
178
  >
180
- {!permanent && this.isOpen() ? <Pressable
181
- testID={testID+"_Backdrow"}
179
+ {!permanent && <TouchableWithoutFeedback
182
180
  pointerEvents={pointerEvents}
183
- ref = {this._backdropRef}
184
- style={[styles.overlay,{backgroundColor:theme.colors.backdrop,opacity: overlayOpacity}]}
185
- //pointerEvents={pointerEvents}
186
- //testID = {testID+"_TouchableWithoutFeedBack"}
181
+ testID = {testID+"_TouchableWithoutFeedBack"}
187
182
  onPress={this._onOverlayClick}
188
- /> : null}
189
- {posRight ? this.renderContent({testID}):null}
183
+ >
184
+ <Animated.View
185
+ testID={testID+"_Backdrow"}
186
+ pointerEvents={pointerEvents}
187
+ ref = {this._backdropRef}
188
+ style={[styles.overlay,{backgroundColor:theme.colors.backdrop}, animatedOverlayStyles]}
189
+ />
190
+ </TouchableWithoutFeedback>}
191
+ {posRight && this.renderContent({testID})}
190
192
  <Animated.View
191
193
  testID={testID+"_NavigationViewContainer"}
192
194
  ref={React.mergeRefs(navigationViewRef,this._navigationViewRef)}
@@ -448,20 +450,6 @@ const styles = StyleSheet.create({
448
450
  right: 0,
449
451
  zIndex: 1000,
450
452
  },
451
- mainWrapper : {
452
- flex: 1, backgroundColor: 'transparent'
453
- },
454
- mainWrapperPermanent : {
455
- flexDirection : "row",
456
- },
457
- mainWrapperTemporary : {
458
- flexDirection : "column",
459
- },
460
- touchableWithoutFeedBack : {
461
- //backgroundColor:'transparent',
462
- height : "100%",
463
- width : '100%',
464
- }
465
453
  });
466
454
 
467
455
  DrawerLayout.propTypes = {
@@ -1,7 +1,7 @@
1
1
  import {Colors} from "$theme";
2
2
  import React from 'react';
3
3
  import View from "$ecomponents/View";
4
- import {StyleSheet,ScrollView,Pressable} from 'react-native';
4
+ import {StyleSheet,ScrollView,TouchableWithoutFeedback} from 'react-native';
5
5
  //import ScrollView from "$ecomponents/ScrollView";
6
6
  import Label from "$ecomponents/Label";
7
7
  import Icon from "$ecomponents/Icon"
@@ -105,11 +105,11 @@ const ExpandableComponent = React.forwardRef(({
105
105
  />:null;
106
106
  return ( <View testID={testID+"_ExpandableContainer"} {...containerProps}>
107
107
  <Surface {...props} ref={ref} testID={testID}>
108
- <Pressable
108
+ <TouchableWithoutFeedback
109
109
  delayPressIn={0}
110
110
  borderless = {false}
111
111
  accessibilityTraits="button"
112
- //accessibilityComponentType="button"
112
+ accessibilityComponentType="button"
113
113
  //role="button"
114
114
  style={[styles.container,props.style]}
115
115
  onPress={handlePressAction}
@@ -157,7 +157,7 @@ const ExpandableComponent = React.forwardRef(({
157
157
  {!isIconPositionLeft ? expandIcon:null}
158
158
  </View>
159
159
  </View>
160
- </Pressable>
160
+ </TouchableWithoutFeedback>
161
161
  {(autoMountChildren !== false || isExpanded) ? <View testID={testID+'_Content'} {...contentProps}
162
162
  style={[{maxWidth:'100%'},styles.children,contentProps.style,!isExpanded && {opacity:0,height:0}]}
163
163
  >
@@ -1,7 +1,7 @@
1
1
  import Icon from "$ecomponents/Icon";
2
2
  import {defaultObj,isPlainObject,} from "$cutils";
3
3
  import React from "$react";
4
- import {Pressable,StyleSheet} from "react-native";
4
+ import {TouchableWithoutFeedback,StyleSheet} from "react-native";
5
5
  import PropTypes from "prop-types";
6
6
  import { renderItems } from "./utils";
7
7
 
@@ -55,7 +55,7 @@ const MenuComponent = React.forwardRef((props,ref)=>{
55
55
  if(typeof anchor =='function'){
56
56
  anchor = anchor({onPress:openMenu});
57
57
  } else if(React.isValidElement(anchor)){
58
- anchor = <Pressable {...anchorProps} onPress={onPress}>{anchor}</Pressable>
58
+ anchor = <TouchableWithoutFeedback {...anchorProps} onPress={onPress}>{anchor}</TouchableWithoutFeedback>
59
59
  } else if(React.isComponent(anchor)){
60
60
  const A = anchor;
61
61
  anchor = <A
@@ -2,7 +2,7 @@ import React from "$react";
2
2
  import {
3
3
  StyleSheet,
4
4
  View,
5
- Pressable,
5
+ TouchableWithoutFeedback,
6
6
  } from 'react-native';
7
7
  import BackHandler from "$ecomponents/BackHandler";
8
8
  import PropTypes from "prop-types";
@@ -41,10 +41,8 @@ const ModalComponent = React.forwardRef((props,ref)=>{
41
41
  onDismiss,
42
42
  isPreloader,
43
43
  children,
44
- testID,
45
44
  ...rest
46
45
  } = props;
47
- testID = defaultStr(testID,'RN__ModalComponent');
48
46
  if(animate !== false && isMobileNative() && defaultStr(animationType).toLowerCase().trim() !=='slide'){
49
47
  animate = false;
50
48
  }
@@ -111,7 +109,7 @@ const ModalComponent = React.forwardRef((props,ref)=>{
111
109
  return !visible?null: <Portal>
112
110
  <Anim
113
111
  ref={ref}
114
- testID={testID+"_RNModalComponent"}
112
+ testID={'RN__ModalComponent'}
115
113
  {...rest}
116
114
  pointerEvents={visible ? 'auto' : 'none'}
117
115
  accessibilityViewIsModal
@@ -122,21 +120,25 @@ const ModalComponent = React.forwardRef((props,ref)=>{
122
120
  animationDuration = {animationDuration}
123
121
  animationPosition = {animationPosition}
124
122
  >
125
- <Pressable
123
+ <TouchableWithoutFeedback
126
124
  accessibilityLabel={overlayAccessibilityLabel}
127
125
  //role="button"
128
126
  disabled={!dismissable}
129
127
  onPress={dismissable ? hideModal : undefined}
130
128
  importantForAccessibility="no"
131
- testID={testID+"_ModalComponent__backdrop"}
132
- {...backdropProps}
133
- style={[
134
- styles.backdrop,
135
- {backgroundColor:theme.colors.backdrop},
136
- backdropProps.style,
137
- ]}
138
- />
139
- <Surface testID={testID+"_ModalComponent__ContentContainer"}
129
+ testID="RN__ModalComponent__backdrop_Container"
130
+ >
131
+ <View
132
+ testID="RN__ModalComponent__backdrop"
133
+ {...backdropProps}
134
+ style={[
135
+ styles.backdrop,
136
+ {backgroundColor:theme.colors.backdrop},
137
+ backdropProps.style,
138
+ ]}
139
+ />
140
+ </TouchableWithoutFeedback>
141
+ <Surface testID="RN__ModalComponent__ContentContainer"
140
142
  elevation = {5}
141
143
  {...contentContainerProps}
142
144
  {...wrapperProps}
@@ -70,7 +70,7 @@ export default function ScreenWrapperNavComponent(_props){
70
70
  {...rest}
71
71
  key = {sanitizedName}
72
72
  authRequired={authRequired === false ? false : authRequired || allowDrawer}
73
- backAction={options.backAction !== false && Screen.backAction !==false && isModal || false}
73
+ backAction={options.backAction === false || Screen.backAction ===false ? false : isModal}
74
74
  modal={isModal}
75
75
  navigation = {navigation}
76
76
  route = {route}