@fto-consult/expo-ui 8.33.1 → 8.35.0

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.
@@ -7,9 +7,9 @@
7
7
  "@react-native-community/netinfo": "11.1.0",
8
8
  "@react-native/assets-registry": "^0.72.0",
9
9
  "react-native-get-random-values": "~1.8.0",
10
- "@react-navigation/native": "^6.1.12",
11
- "@react-navigation/native-stack": "^6.9.20",
12
- "@react-navigation/stack": "^6.3.23",
10
+ "@react-navigation/native": "^6.1.14",
11
+ "@react-navigation/native-stack": "^6.9.22",
12
+ "@react-navigation/stack": "^6.3.25",
13
13
  "@shopify/flash-list": "1.6.3",
14
14
  "expo": "^50.0.8",
15
15
  "expo-camera": "~14.0.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.33.1",
3
+ "version": "8.35.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",
@@ -68,8 +68,8 @@
68
68
  "dependencies": {
69
69
  "@emotion/react": "^11.11.1",
70
70
  "@faker-js/faker": "^8.0.2",
71
- "@fto-consult/common": "^4.33.0",
72
- "@fto-consult/node-utils": "^1.6.6",
71
+ "@fto-consult/common": "^4.33.7",
72
+ "@fto-consult/node-utils": "^1.7.1",
73
73
  "apexcharts": "^3.46.0",
74
74
  "crypto-browserify": "^3.12.0",
75
75
  "file-saver": "^2.0.5",
@@ -85,7 +85,7 @@
85
85
  "react-native-iphone-x-helper": "^1.3.1",
86
86
  "react-native-mime-types": "^2.5.0",
87
87
  "react-native-paper": "^5.12.3",
88
- "react-native-paper-dates": "^0.21.9",
88
+ "react-native-paper-dates": "^0.22.3",
89
89
  "react-native-web": "^0.19.10",
90
90
  "react-virtuoso": "^4.7.1",
91
91
  "readable-stream": "^4.5.2",
@@ -182,6 +182,17 @@ const DialogComponent = React.forwardRef((props,ref)=>{
182
182
  {content}
183
183
  </ScrollView>
184
184
  }
185
+ const getRRProps = (containerProps)=>{
186
+ if(!isPreloader){
187
+ const {mediaQueryUpdateStyle} = containerProps;
188
+ containerProps.mediaQueryUpdateStyle = (...rest)=>{
189
+ const r = typeof mediaQueryUpdateStyle =="function"? mediaQueryUpdateStyle(...rest) : undefined;
190
+ const {width,height} = rest[0];
191
+ return isFullScreenDialog()? [r,{width,height}] : r;
192
+ }
193
+ }
194
+ return containerProps;
195
+ }
185
196
  return <ModalComponent
186
197
  onDismiss={(e)=>{
187
198
  return handleBack(e,false);
@@ -200,7 +211,7 @@ const DialogComponent = React.forwardRef((props,ref)=>{
200
211
  <Surface
201
212
  testID = {testID+"_Overlay"}
202
213
  ref={overlayRef}
203
- {...overlayProps}
214
+ {...getRRProps(overlayProps)}
204
215
  style={[styles.overlay,isAlert && styles.overlayAlert,{backgroundColor},overlayProps.style,fullScreenStyle]}
205
216
  >
206
217
  {(!isAlert && (actions || title || subtitle)) ? <AppBarDialog
@@ -369,10 +380,8 @@ const styles = StyleSheet.create({
369
380
  justifyContent: 'flex-start',
370
381
  flexGrow : 0,
371
382
  marginVertical : 0,
383
+ //maxWidth : "100%",
372
384
  ...Platform.select({
373
- /*android: {
374
- elevation: 2,
375
- },*/
376
385
  default: {
377
386
  shadowColor: 'rgba(0, 0, 0, .3)',
378
387
  shadowOffset: { width: 0, height: 1 },
@@ -1,10 +1,8 @@
1
- import KeyboardAvoidingView from "../KeyboardAvoidingView";
2
1
  import React from "$react";
3
2
  import {usePageDimensions} from "$cdimensions/utils";
4
3
 
5
4
  const DialogContentComponent = ({isPreloader,title,children,isFullScreen,...props})=>{
6
5
  usePageDimensions();
7
6
  return React.useMemo(()=>children,[children]);
8
- //return content;
9
7
  }
10
8
  export default DialogContentComponent;
@@ -1,15 +1,16 @@
1
1
  import React from "$react";
2
2
  import {
3
3
  StyleSheet,
4
- View,
5
4
  TouchableWithoutFeedback,
6
5
  } from 'react-native';
6
+ import View from "$ecomponents/View";
7
7
  import BackHandler from "$ecomponents/BackHandler";
8
8
  import PropTypes from "prop-types";
9
9
  import theme,{StyleProp} from "$theme";
10
10
  import Animation from "$ecomponents/Animation";
11
- import { Surface } from "react-native-paper";
11
+ //import { Surface } from "react-native-paper";
12
12
  import { Platform } from "react-native";
13
+ import Surface from "$ecomponents/Surface";
13
14
  import { Portal } from "react-native-paper";
14
15
  import {defaultStr} from "$cutils";
15
16
  import {
@@ -41,8 +42,10 @@ const ModalComponent = React.forwardRef((props,ref)=>{
41
42
  onDismiss,
42
43
  isPreloader,
43
44
  children,
45
+ testID,
44
46
  ...rest
45
47
  } = props;
48
+ testID = 'RN__ModalComponent__'+defaultStr(testID);
46
49
  if(animate !== false && isMobileNative() && defaultStr(animationType).toLowerCase().trim() !=='slide'){
47
50
  animate = false;
48
51
  }
@@ -107,9 +110,29 @@ const ModalComponent = React.forwardRef((props,ref)=>{
107
110
  },[animate]);
108
111
  const wrapperProps = animate ? {enteringCallback:callback,exitingCallback:callback} : {};
109
112
  return !visible?null: <Portal>
113
+ <TouchableWithoutFeedback
114
+ aria-label={overlayAccessibilityLabel}
115
+ //role="button"
116
+ disabled={!dismissable}
117
+ onPress={dismissable ? hideModal : undefined}
118
+ importantForAccessibility="no"
119
+ testID={testID+"__backdrop_Container"}
120
+ >
121
+ <View
122
+ testID={testID+"__backdrop"}
123
+ {...backdropProps}
124
+ mediaQueryUpdateStyle = {({width,height})=>{
125
+ return {width,height};
126
+ }}
127
+ style={[
128
+ styles.backdrop,
129
+ {backgroundColor:theme.colors.backdrop},
130
+ backdropProps.style,
131
+ ]}
132
+ />
133
+ </TouchableWithoutFeedback>
110
134
  <Anim
111
135
  ref={ref}
112
- testID={'RN__ModalComponent'}
113
136
  {...rest}
114
137
  accessibilityViewIsModal
115
138
  role="polite"
@@ -118,31 +141,15 @@ const ModalComponent = React.forwardRef((props,ref)=>{
118
141
  animationType = {animationType}
119
142
  animationDuration = {animationDuration}
120
143
  animationPosition = {animationPosition}
144
+ testID={testID}
121
145
  >
122
- <TouchableWithoutFeedback
123
- aria-label={overlayAccessibilityLabel}
124
- //role="button"
125
- disabled={!dismissable}
126
- onPress={dismissable ? hideModal : undefined}
127
- importantForAccessibility="no"
128
- testID="RN__ModalComponent__backdrop_Container"
129
- >
130
- <View
131
- testID="RN__ModalComponent__backdrop"
132
- {...backdropProps}
133
- style={[
134
- styles.backdrop,
135
- {backgroundColor:theme.colors.backdrop},
136
- backdropProps.style,
137
- ]}
138
- />
139
- </TouchableWithoutFeedback>
140
- <Surface testID="RN__ModalComponent__ContentContainer"
146
+ <Surface
141
147
  elevation = {5}
142
148
  {...contentContainerProps}
143
149
  {...wrapperProps}
144
150
  ref = {contentContainerRef}
145
- style={[styles.contentContainer,{ marginTop: TOP_INSET, marginBottom: BOTTOM_INSET,backgroundColor:'transparent' },contentContainerProps.style]}
151
+ testID={testID+"__ModalContentContainer"}
152
+ style={[styles.contentContainer,styles.surface,contentContainerProps.style]}
146
153
  >
147
154
  {children}
148
155
  </Surface>
@@ -154,6 +161,14 @@ const ModalComponent = React.forwardRef((props,ref)=>{
154
161
  const styles = StyleSheet.create({
155
162
  modal : {
156
163
  ...StyleSheet.absoluteFillObject,
164
+ height : "100%",
165
+ width : "100%",
166
+ },
167
+ surface : {
168
+ marginTop: TOP_INSET,
169
+ marginBottom: BOTTOM_INSET,
170
+ backgroundColor:'transparent',
171
+ height : "100%"
157
172
  },
158
173
  backdrop: {
159
174
  flex: 1,
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  "@fto-consult/expo-ui": {
3
- "version": "8.32.0",
3
+ "version": "8.26.0",
4
4
  "url": "https://github.com/borispipo/expo-ui#readme",
5
5
  "license": "ISC"
6
6
  },
@@ -39,6 +39,16 @@ module.exports = {
39
39
  "url": "https://github.com/pchmn/expo-material3-theme#readme",
40
40
  "license": "MIT"
41
41
  },
42
+ "@react-native-async-storage/async-storage": {
43
+ "version": "1.21.0",
44
+ "url": "https://github.com/react-native-async-storage/async-storage#readme",
45
+ "license": "MIT"
46
+ },
47
+ "@react-native-community/datetimepicker": {
48
+ "version": "7.6.1",
49
+ "url": "https://github.com/react-native-community/datetimepicker#readme",
50
+ "license": "MIT"
51
+ },
42
52
  "@react-native-community/netinfo": {
43
53
  "version": "11.1.0",
44
54
  "url": "https://github.com/react-native-netinfo/react-native-netinfo#readme",
@@ -50,17 +60,17 @@ module.exports = {
50
60
  "license": "MIT"
51
61
  },
52
62
  "@react-navigation/native": {
53
- "version": "6.1.12",
63
+ "version": "6.1.14",
54
64
  "url": "https://reactnavigation.org",
55
65
  "license": "MIT"
56
66
  },
57
67
  "@react-navigation/native-stack": {
58
- "version": "6.9.20",
68
+ "version": "6.9.22",
59
69
  "url": "https://github.com/software-mansion/react-native-screens#readme",
60
70
  "license": "MIT"
61
71
  },
62
72
  "@react-navigation/stack": {
63
- "version": "6.3.23",
73
+ "version": "6.3.25",
64
74
  "url": "https://reactnavigation.org/docs/stack-navigator/",
65
75
  "license": "MIT"
66
76
  },
@@ -174,11 +184,6 @@ module.exports = {
174
184
  "url": "https://github.com/react-native-community/react-native-svg",
175
185
  "license": "MIT"
176
186
  },
177
- "react-native-view-shot": {
178
- "version": "3.8.0",
179
- "url": "https://github.com/gre/react-native-view-shot",
180
- "license": "MIT"
181
- },
182
187
  "react-native-webview": {
183
188
  "version": "13.6.4",
184
189
  "url": "https://github.com/react-native-webview/react-native-webview#readme",