@fto-consult/expo-ui 6.6.8 → 6.7.1

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.6.8",
3
+ "version": "6.7.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -41,7 +41,7 @@
41
41
  "fix-dependencies": "expo-cli doctor --fix-dependencies",
42
42
  "delete-node-modules": "rimraf ./**/node_modules",
43
43
  "modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
44
- "update": "npm i @emotion/native@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest sharp-cli@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
44
+ "update": "npm i expo @emotion/native@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest sharp-cli@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
45
45
  },
46
46
  "bin": "./bin/index.js",
47
47
  "repository": {
@@ -62,7 +62,7 @@
62
62
  "@emotion/native": "^11.11.0",
63
63
  "@expo/html-elements": "^0.5.1",
64
64
  "@expo/vector-icons": "^13.0.0",
65
- "@fto-consult/common": "^3.21.1",
65
+ "@fto-consult/common": "^3.21.3",
66
66
  "@gorhom/portal": "^1.0.14",
67
67
  "@pchmn/expo-material3-theme": "^1.3.1",
68
68
  "@react-native-async-storage/async-storage": "1.18.2",
@@ -73,7 +73,7 @@
73
73
  "@react-navigation/native-stack": "^6.9.13",
74
74
  "@shopify/flash-list": "1.4.3",
75
75
  "apexcharts": "^3.41.0",
76
- "expo": "^49.0.3",
76
+ "expo": "^49.0.4",
77
77
  "expo-camera": "~13.4.2",
78
78
  "expo-clipboard": "~4.3.0",
79
79
  "expo-font": "~11.4.0",
@@ -106,7 +106,7 @@
106
106
  "react-native-svg": "13.9.0",
107
107
  "react-native-web": "~0.19.6",
108
108
  "react-native-webview": "13.2.2",
109
- "react-virtuoso": "^4.4.0",
109
+ "react-virtuoso": "^4.4.1",
110
110
  "sharp-cli": "^4.1.1",
111
111
  "tippy.js": "^6.3.7",
112
112
  "websql": "^2.0.3",
@@ -285,7 +285,8 @@ class SwiperComponent extends React.Component {
285
285
  testID = defaultStr(testID,'RN_SwiperComponent');
286
286
  childrenProps = Array.isArray(childrenProps)? childrenProps : [];
287
287
  const isReady = customHeight > 40 ? true : false;
288
- const height = !isReady ? WIDTH_HEIGHT : customHeight;
288
+ const autoHeight = !!this.props.autoHeight;
289
+ const height = autoHeight ? undefined : !isReady ? WIDTH_HEIGHT : customHeight;
289
290
  if(withScrollView){
290
291
  wrapperProps.nestedScrollEnabled = typeof wrapperProps.nestedScrollEnabled ==="boolean"? wrapperProps.nestedScrollEnabled : isNative;
291
292
  if(typeof wrapperProps.showsVerticalScrollIndicator !=='boolean'){
@@ -313,12 +314,12 @@ class SwiperComponent extends React.Component {
313
314
  <View
314
315
  testID={testID+"_ContentContainer"}
315
316
  {...contentContainerProps}
316
- style={[styles.container(positionFixed, x, y, width, height),contentContainerProps.style]}
317
+ style={[styles.container(positionFixed, x, y, width, height,autoHeight),contentContainerProps.style]}
317
318
  >
318
319
  <Animated.View
319
320
  testID={testID+"_AnimatedContent"}
320
321
  style={[
321
- styles.swipeArea(vertical, this.count, width, height),
322
+ styles.swipeArea(vertical, this.count, width, height,autoHeight),
322
323
  swipeAreaProps.style,
323
324
  {
324
325
  transform: [{ translateX: pan.x }, { translateY: pan.y }],
@@ -339,7 +340,8 @@ class SwiperComponent extends React.Component {
339
340
  style={[
340
341
  childProps.style,
341
342
  contentProps.style,
342
- {width, height,maxHeight:height},
343
+ {width},
344
+ autoHeight && {height,maxHeight:height},
343
345
  ]}
344
346
  >
345
347
  <W {...wProps}>
@@ -373,6 +375,7 @@ class SwiperComponent extends React.Component {
373
375
  SwiperComponent.propTypes = {
374
376
  vertical: PropTypes.bool,
375
377
  activeIndex: PropTypes.number,
378
+ autoHeight : PropTypes.bool,//si la valeur de la taille des éléments sera automatiquement réajusté
376
379
  loop: PropTypes.bool,
377
380
  timeout: PropTypes.number,
378
381
  gesturesEnabled: PropTypes.func,
@@ -437,7 +440,7 @@ const styles = {
437
440
  backgroundColor: 'transparent',
438
441
  },
439
442
  // Fix web vertical scaling (like expo v33-34)
440
- container: (positionFixed, x, y, width, height) => ({
443
+ container: (positionFixed, x, y, width, height,autoHeight) => addAutoHeight(({
441
444
  backgroundColor: 'transparent',
442
445
  // Fix safari vertical bounces
443
446
  position: positionFixed ? 'fixed' : 'relative',
@@ -446,18 +449,16 @@ const styles = {
446
449
  top: positionFixed ? y : 0,
447
450
  left: positionFixed ? x : 0,
448
451
  width,
449
- height,
450
452
  justifyContent: 'flex-start',
451
453
  alignItems : 'flex-start',
452
- }),
453
- swipeArea: (vertical, count, width, height) => ({
454
+ }),height,autoHeight),
455
+ swipeArea: (vertical, count, width, height,autoHeight) => addAutoHeight(({
454
456
  position: 'relative',
455
457
  top: 0,
456
458
  left: 0,
457
459
  width:vertical ? width : width * count,
458
- height:vertical ? height * count : height,
459
460
  flexDirection: vertical ? 'column' : 'row',
460
- }),
461
+ }),typeof height ==='number'? (vertical ? height * count : height) : undefiend,autoHeight),
461
462
  scrollViewContentContainer : {
462
463
  paddingBottom : 40,
463
464
  flex : 1,
@@ -470,4 +471,11 @@ const styles = {
470
471
  }
471
472
  };
472
473
 
474
+ const addAutoHeight = (style,height,autoHeight)=>{
475
+ if(height !== undefined && autoHeight){
476
+ style.height = height;
477
+ }
478
+ return style;
479
+ }
480
+
473
481
  export default SwiperComponent;
@@ -42,7 +42,6 @@ const TabItemComponentNotThemed = ({
42
42
  icon = null;
43
43
  }
44
44
  const isIconTop = iconPosition =='top'? true : false;
45
-
46
45
  return (<TouchableRipple
47
46
  role="tab"
48
47
  accessibilityState={{ selected: active }}
@@ -106,7 +106,7 @@ TabComponent.Item = (props)=>null;
106
106
 
107
107
  const styles = StyleSheet.create({
108
108
  container : {
109
- minHeight : 300,
109
+ minHeight : 150,
110
110
  flex : 1,
111
111
  },
112
112
  })