@fto-consult/expo-ui 6.6.8 → 6.6.9
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.
|
|
3
|
+
"version": "6.6.9",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -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.
|
|
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",
|
|
@@ -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
|
|
288
|
+
const autoHeight = !!this.props.autoHeight;
|
|
289
|
+
const height = autoHeight ? "100%" : !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
|
|
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) => ({
|
|
441
444
|
backgroundColor: 'transparent',
|
|
442
445
|
// Fix safari vertical bounces
|
|
443
446
|
position: positionFixed ? 'fixed' : 'relative',
|
|
@@ -446,16 +449,16 @@ const styles = {
|
|
|
446
449
|
top: positionFixed ? y : 0,
|
|
447
450
|
left: positionFixed ? x : 0,
|
|
448
451
|
width,
|
|
449
|
-
height,
|
|
452
|
+
height:!autoHeight ? undefined : height,
|
|
450
453
|
justifyContent: 'flex-start',
|
|
451
454
|
alignItems : 'flex-start',
|
|
452
455
|
}),
|
|
453
|
-
swipeArea: (vertical, count, width, height) => ({
|
|
456
|
+
swipeArea: (vertical, count, width, height,autoHeight) => ({
|
|
454
457
|
position: 'relative',
|
|
455
458
|
top: 0,
|
|
456
459
|
left: 0,
|
|
457
460
|
width:vertical ? width : width * count,
|
|
458
|
-
height:vertical ? height * count : height,
|
|
461
|
+
height:!autoHeight ? undefined : vertical ? height * count : height,
|
|
459
462
|
flexDirection: vertical ? 'column' : 'row',
|
|
460
463
|
}),
|
|
461
464
|
scrollViewContentContainer : {
|